Grasp
The GRAphical Scheme Programming Environment
Install / Use
/learn @panicz/GraspREADME
- GRASP: The GRAphical Scheme Programming Environment
This is the repository of the GRASP project, which is intended to be an extensible editor of s-expressions optimized for interacting via touch screen.
GRASP is still work in progress, and isn't yet mature enough to perform even the most basic editing tasks (but each day this moment is getting closer).
If you'd like to see a more detailed explanation, you may want to watch [[https://www.youtube.com/watch?v=bedP4m9FV8k][a demo]].
GRASP comes in three flavours: an Android client,
[[./doc/img/grasp-android.png]]
a desktop client
[[./doc/img/grasp-desktop.png]]
and a terminal client
[[./doc/img/grasp-terminal.png]]
** Building
In order to be built, GRASP requires a Java Runtime Environment and a POSIX shell. All the other dependencies are included in the =libs= directory.
Once both these requirements are met, GRASP can be built by typing
#+BEGIN_SRC bash ./build.scm #+END_SRC
in the repository's main directory. By default, the script will build all three clients (=android=, =terminal= and =desktop=), and the resulting =jar/apk= files will be contained in the =build= directory. The generated files contain all the required dependencies.
The particular targets can be selected by passing the =--targets= argument, followed by a comma-separated list of desired targets.
To get a list of all possible options, you can type
#+BEGIN_SRC bash ./build.scm --help #+END_SRC
In particular, the =--init= option can be used to pass in the =init= file, which is executed during GRASP's startup. (In case of the =.jar= packages, this file can also be later replaced/edited in the archives.)
** Debugging the Android client
Some builds of Android are capable of printing complete stack traces on application crash.
However, this usually isn't the case, so it is required to enable 'programmer options' on the Android device, and then enable USB debugging on the device in order to access that information.
It also requires adb application to be installed on an external
computer. If all these prerequisites are satisfied, the crash logs can
be fetched using the following command:
#+BEGIN_SRC bash adb logcat --buffer=crash #+END_SRC
If you happen to know how to access the crash information from the Android device itself and wouldn't mind sharing that information with me, I'd be grateful.
** Running the desktop client on Android
While it might seem ridiculous from the usability perspective, it may sometimes be convenient to be able to test the desktop client from Android.
The exact tutorial on running the X11 server in Termux can be found at https://wiki.termux.com/wiki/Graphical_Environment but once all the packages and apps are installed and configured, the VNC server can be run by typing (in Termux)
#+BEGIN_SRC bash vncserver -localhost #+END_SRC
Once this is done, it is also required to type
#+BEGIN_SRC bash export DISPLAY=":1" #+END_SRC
to be able to run the desktop client from a particular bash session.
** Older prototypes
The older prototypes of GRASP (for Android only) can be found in the [[https://github.com/panicz/grasp-android]] repository (which is now archived).
There is an even older prototype which runs in Racket, and which can be found in the [[https://github.com/panicz/sracket]] repository (the ~5.rkt~ file).
