Skip to content

panicz/grasp

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
October 22, 2023 00:15
December 31, 2022 00:29
December 30, 2022 09:37
December 30, 2022 09:37
November 6, 2023 07:33
November 15, 2023 09:57

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 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 the Android client

The Android client can be built in the Termux app on Android devices. It requires the tools that are installed for the buildAPKs project (you can review the build-android.sh script for the details).

If the termux storage is set up properly,the script tries to copy the APK to the Download/GRASP directory of the Android

If those dependencies are satisfied, it should be sufficient to type in the terminal:

./build-android.sh

On the first run, it generates and stores a key for signing the package - if you want to be serious about it, you’d probably need to update the credentials (or something).

The script should also work on most other systems, but

  • in addition to JVM runtime - it requires tools such as

aapt and zipalign (other, JVM-based tools such as d8 or apksigner are included in the tools directory).

Running and/or building the desktop/terminal client

Both terminal and desktop clients can either be run directly from source, or precompiled to .jar files.

In both cases, they require the Java Runtime Environment to be present on the system.

In order to run the clients directly from the source, it should be sufficient to run

./grasp-terminal

to run the terminal client, or

./grasp-desktop

to run the desktop client.

This operation recompiles all the sources every time it is run, so it can take considerable amount of time, especially on slower machines. Therefore it can make sense to pre-compile all the sources before running.

This can be achieved by running

./build-terminal.sh

for the terminal client, and

./build-desktop.sh

for the desktop client.

After the operation is done, the terminal client can be invoked by running

java -jar build/grasp-terminal.jar

and the desktop client - by running

java -jar build/grasp-desktop.jar

The .jar files generated this way contain all the required dependencies, which - in the case of the desktop client - means just the Kawa compiler, and in the case of the terminal client - also the Lanterna library for terminal rendering.

(Both dependencies are included in the libs directory.)

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:

adb logcat --buffer=crash

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)

vncserver -localhost

Once this is done, it is also required to type

export DISPLAY=":1"

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).

About

The GRAphical Scheme Programming Environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published