The Obol (Sufrin/Oxford) interpreter

Bernard Sufrin of Oxford has an interpreted language available for the JVM. His Obol language can be used in conjunction with Java rather as one uses Jython scripts.
About the only information available is a PDF. My interest was in the Obol shell. I have added a disambiguation page to Wikipedia to differentiate Sufrin’s Obol from the other two: the Tromso Obol and the Berkeley Obol. These days ‘Rio’ is about as overloaded a project name as ‘Obol’.

Passing Obol any arg other than -w would seem to result in a console-only interpreter, e.g.,

I:\Obol>java -cp . -jar Obol.jar -h

If you load a GUI script, e.g.,

I:\Obol>java -cp . -jar Obol.jar .\Examples\swing.ob

you may see warnings. In this respect Obol scripting is rather like Perl

if () {
…} else

where else follows on the same line as the closing brace.

In the case of Obol, this means that

let jb=JButton(“Test Button”) in
{ jb.addActionListener
(java.awt.event.ActionListener.new
{| actionPerformed event =

must be re-written as

let jb=JButton(“Test Button”) in
{ jb.addActionListener
(java.awt.event.ActionListener.new {|
actionPerformed event = { …

and the warnings disappear.

For more of Sufrin’s work and ideas see his projects page on Scala and such.

And if the obol is under your tongue …

Leave a Reply

You must be logged in to post a comment.