Lightweight Languages
Denise writes: "'What happens if you get a bunch of academic computer scientists and implementors of languages such as Perl, Python, Smalltalk and Curl, and lock them into a room for a day? Bringing together the academic and commercial sides of language design and implementation was the interesting premise behind last weekend's Lightweight Languages Workshop, LL1, at the AI Lab at MIT.' Simon Cozens report, on perl.com, says it wasn't the flame fest you might have imagined."
Both matz and Dave Thomas were invited to attend the conference, but unfortunately they both had prior commitments at the time.
Well, we can see that you learned to program in BASIC. ;) Not all languages need assignment as their primary form of computation ...
::= x (variable)
I'd say that the lambda calculus is more lightweight, and also easier to program in than your example:
exp
| exp1 exp2 (application)
| (fn x => exp) (function)
Basically the key is that you have higher-order functions (you can pass them around), and that's it. With this, it's relatively easy to code up booleans, integers, lists, recursive functions, trees, or practically anything. (If you wanted to do IO, you'd need some kind of primitive functions for interfacing with the machine.) Since everything is higher-order, it's easy to code these once and then pass them around. It's not as nice as a modern language, but it's nicer than a turing machine...
Actually, there is a simpler language that uses only two functions (!), but this one is pretty hard to program in directly.
If you want to experience the Turing tarpit (where anything is possible, but nothing is easy enough to actually do) firsthand, try the Brainfuck language, based closely on the turing machine. the language has 8 instructions, and only one of them (input) has any arguments beyond an implicit current location. The compiler is 240 bytes!
My Karma: ran over your Dogma
StrawberryFrog
He's talking about curl, not cURL.
I'm the co-organizer of the LL1 workshop, at
ll1.mit.edu
Actually we did invite ESR, and we actually scheduled the workshop around his constraints. However, there were a few misunderstandings, and four days before the workshop we got mail to the effect that he wasn't coming.
Maybe next time.
Yup, BF, turing machines & lambda calculus are "light" in the sense that they are tiny but theretically complete & of not much practical programming use. For instance, you can't do TCP sockets in Brainfuch no matter how hard you code, cos there's no way to get to the OS socket API.
The PHP that I use at work (and the Perl, Python, Ruby etc that other people use for similar tasks) are "light" in the sense of flexible, and quick to knock something together, inegrates well & comes with a great big heavy library full of usefull stuff.
My Karma: ran over your Dogma
StrawberryFrog
I wrote a paper about it. Although it's true I am a pointy-headed academic, I do occasionally hack a few lines of code, and I when I've solved a problem over in the research world whose solution would be useful to hackers, I try very hard to write papers that are readable by your generic hacker.
If you go here http://www.cc.gatech.edu/~shivers/citations.html you'll see a list of papers I've written. These are the ones that people in the perl/scripting/lightweight-languages community might find interesting:
-
A universal scripting framework
-
The SRE regular-expression notation
-
Atomic heap transactions and fine-grain interrupts
-
Automatic management of operating-system resources
-
Continuations and threads: Expressing machine
concurrency directly in advanced languages
-
Supporting dynamic languages on the Java virtual machine
-
A Scheme shell
-
Scsh reference manual
#1 is the lightweight-languages paper on which my talk last week was based. By the way, the expect/chat & make replacements I mention in the future work section of that paper are basically done. I've three students at Georgia Tech who are wrapping up the implementation of a nice recompilation system called sake (pronounced "sah-kay," like the fish), which I like very much. A student who worked for me at MIT two years ago did an expect & chat replacement. (Lots of the scripts in my#2 has an opening flame about a problem in the open-source community I call "the 80% solution" problem. The regex notation it describes is now standard with scsh.
#4 & #6 will be of interest to VM designers.
#8 is, ahh, somewhat more well known for its non-technical content. But I'm on a new set of meds now, and doing a lot better, really.
-Olin