Homer:
|
(comes out of other side of matter transporter) Hmmm!
|
Professor Frink:
|
I take it from that little impressed noise that you are
interested in purchasing that matter transporter, sir.
|
Homer:
|
(not fond of the price, hearable in voice) Ummmmmmm... two
bucks... it only transports matter... ummm... well, ah...
I'll give you thirty-five cents.
|
Professor Frink:
|
Sold! But I must warn you, this device carries a
frighteningly high risk of catastrophic--
|
Homer:
|
(annoyed) I said I'll take it!
|
-The Simpsons
|
|
"Another reader asks why I ignore FORTH, which has a respectable number of dedicated - dare I say fanatic? -
devotees. Alas, I continue to agree with my mad friend: FORTH is not a higher level language at all. Instead,
it's a kind of assembly language that uses the programmer as a pre-compiler."
|
-Jerry Pournelle
|
|
|
It's an implementation of a
Forth /
Postscript
style language in Ruby. The syntax has been slightly altered to make some things a
little easier (like creating dictionaries). Otherwise it is pretty straight
ahead PostScript.
|
|
I have been doing a lot of language research and I thought
it was time to implement a language. Using a higher level language like Ruby
allowed me to build the interpreter very quickly.
The code is in a shape that it could be used as production code
but I really hope you don't. You can download the code to look at it and play with it, but
I wouldn't use this as a macro extension language. I have no intention of maintaining this
long run, I provide it only as educational material.
|
What Is Interesting About Ripley? |
|
The language itself and how it is processed is not particularly interesting
if you already know Forth or PostScript. However, I think there are some interesting things about how
the implementation was created.
The first is the interaction between Ripley and Ruby. Ruby is truly object
oriented, so every variable can be inspected to see if it supports methods. This is important because
of the nature of the PostScript language. For example, executable arrays are distinguished from normal arrays
in that execution of the array is postponed during evaluation. Ruby can inspect the objects to see if there
is an override method attached to the array that represents an executable array.
The second is how the operands are handled. A set of scripts is used to parse the operand code to generate
stubs to talk to the interpreter, as well as test code, type checking and documentation. This allows for the
programmer to be able to add an operand to the system quickly with all of the support requirements automatically.
There is some reasonably elaborate automatic testing code that checks the interpreter against a set of known
good outputs. If all the tests pass you can alter the interpreter code while remaining reasonbly confident
that you haven't broken anything.
|
|
One of my two permanent dogs (the other dog is a foster dog).
I named the implementation after her because I thought it would be nice if people were visiting
and wanted to talk about the language that she would hear her name. Plus, like her the language
is simple and fun to play with.
We adopted her from the
Peninsula Humane Society. If you want to adopt a nice dog that needs a good home I
would recommend the Ohlone Humane Society mainly
because my wife and I volunteer for them.
|
|
Jack Herrington, Project Lead: Full time programmer now working for Macromedia. Other
sites from Jack:
|
|
We are hosted on Sourceforge:
|
Copyright (©) 2003, Jack D. Herrington, All Rights Reserved
|
|