Today i'd like to announce my newest Project "Ambrhino". Ambrhino integrates
Amber Smalltalk with the Java Virtual Machine.
Ambrhino can act as a Server to serve Amber and persist changes to the filesystem (you could use it instead of node.js).
It can also act as a runtime to execute Amber-Programs.
Ambrhino is written in Java and uses JSR223 to execute Javascript with the
Mozilla Rhino Engine
An interesting feature is, that you can directly call Java classes from a compiled Amber Smalltalk, e.g.:
buttonPrintit := .
buttonPanel add: buttonPrintit.
A really cool feature is that it seems to be possible to add Smalltalk BlockClosures as ActionListeners to (Swing-) Buttons like this:
buttonDoit addActionListener: [
self eval: (textArea javaObject getSelectedText).
].
The main goal of this project is not to use Amber to write Swing-Applications - it feels somehow weird to use a Webbased-IDE to create a native Swing Application ...
Someday i want to use it to create Android-Applications with Amber - i could start an Ambrhino-Server on the Android-Emulator to create/ compile/ package programs. The Android-API will be called with the
Android Scripting Framework (ASF)
But to get familiar with the (sometimes strange looking) Smalltalk-Java-Javascript-Mixture, i made a little Swing-Application - a simple Workspace to execute Smalltalk-Code.
To try it out you may fork the project on
Github or just download the
ambrhino.zip unpack it and start the workspace.bat file.
Like in other Smalltalk-Workspaces you can select text and execute it by pressing "do it" or "print it".
To get an idea of what is possible you can copy
this gist to the workspace and execute it. It fetches via HTTP-GET content from a Webserver and displays it on a JTextPane. Not really useful - but somehow cool.
Ideas, Hints, Help and rants are very welcome!