Hi, those of you who follow me on Twitter have pro...
# share-your-work
m
Hi, those of you who follow me on Twitter have probably already seen this, but recently a friend encouraged me to share it here as well. For some time, I've been working on a graphical Scheme programming environment that I have called GRASP (which stands for "GRAphical Scheme Programming"). Currently I am doing fourth prototype (which I hope will become the production version), which - as I imagine - should work in text terminals as well as on graphical displays. But by far, the third prototype was the most mature, and (at least in my opinion) the most pleasant to use. GRASP is intended to work natively on mobile devices, and the third prototype was written in Java entirely on my phone (using the Termux environment). I have recorded a few videos showing the touch interface to GRASP. For example, here's a demo which shows the definition of factorial

https://www.youtube.com/watch?v=H0YNZCO7gyQ

and here's another one, which shows how a screen can be splitted:

https://www.youtube.com/watch?v=dCKxKRIvCpU

I am mentioning this, because I think that - even though I do not develop it anymore - it wasn't actually that far from being useful software: it lets the user open files (supporting the basic part of the s-expression syntax) and save them as well, so with some patience it could be used for doing some "real" work. The main problem is that newly-created files are saved in the app's "internal storage", whereas the file browser can only open files from "external storage". This shouldn't be hard to solve, however, so if anyone's interested, the code is available at https://github.com/panicz/grasp-android/tree/master/stages The `stage5' directory contains a plain s-expression editor, and the `stage6' directory additionally includes the Kawa Scheme implementation and lets one evaluate the Scheme expressions (the drawback is that it takes significantly longer to build). Some Scheme features that are missing from both the parser and representation (and would be hard to add to this prototype) include: - dotted lists - strings - comments - vectors - quote/quasiquote/unquote etc. abbreviations (the abbreviations accidentally work in Kawa when they're used on symbols, but if the abbreviating characters were placed in front of opening parentheses, they'd be treated just as regular symbols) Also, there are some bugs related to positioning, but I wasn't really trying to fix them, given that I started a new prototype from scratch. The currently developed prototype can be found in the
retreat/GRASP
directory in the same repository. It is written in Kawa Scheme (but it requires an unreleased version of Kawa built from the tip of their repository), and it currently only works in text terminals. And I think that "works" is a slight exaggeration here. It is capable of parsing more Scheme syntax (including three types of comments, dotted lists and strings - though vectors and quote abbreviations still aren't supported). It also features a cursor that is supposed to work roughly as in the regular text editors. It uses a more classical representation of s-expressions, namely - good old cons-cells. (The information about whitespace and comments is stored in weak-key hash tables) In order to run this prototype, it's sufficient to run "./editor" (provided that a proper build of Kawa is available somewhere in the path - and that also requires a JVM). However, the "taste" of the editor can be obtained from the following "unit-test suite" (which doesn't yet pass, but should give a rough idea of the experience that I'm aiming at) https://github.com/panicz/grasp-android/blob/master/stages/retreat/GRASP/src/test-writing-map.scm Unfortunately none of those prototypes conveys the full spectrum of ideas that I'm trying to pursue. One important aspect was captured by the first prototype, the one that I wrote in Racket:

https://youtu.be/oxeB-8k-DBA?t=33

The demo shows (around seconds 35-45) a custom representation for graphs that can be used as an alternative to s-expressions. Of course the key idea isn't to represent graphs, but to be able to provide custom visual representations/interactions of any data structure. (This idea has recently been pursued by Leif Andersen, who calls it "visual interactive syntax", and implemented that as an extension to the dr Racket IDE as well as a browser based IDE for Clojure available at https://visr.pl/) In many ways, GRASP also seems similar to Boxer (that I learned about relatively recently), but to be honest, my greatest source of inspiration so far has been Emacs and the experience it provides for working with various Lisps, as well as its self-introspection capabilities.
💯 1
😀 1
🚀 7