The Bad Side of Scheme Shell

Posted by Daniel Lyons Wed, 06 Feb 2008 08:50:00 GMT

I have never used such a frustrating development environment as scsh.

As much as I desperately want to like it, and should like it, for all the right reasons,

  • The interactive version is basically unusable. The REPL blows.
  • The built-ins seem fragile, especially the very-cool awk which I can’t seem to get to work.
  • DrScheme has library functions which should be present in scsh, but aren’t (fold-files comes to mind, probably because I’ve spent three hours trying to replicate the functionality in scsh and being unable to.)
  • Scsh is built on Scheme-48, which seems to be not particularly widely used compared to PLT and Bigloo/Chicken, so it’s missing SRFIs. Plus, loading SRFIs seems to be wonky (load doesn’t work, but the command line switch -l does, and it seems obnoxious that I’d have to use absolute paths for either.)

Scsh would be just perfect if someone had ever finished that port of it to PLT. As it stands right now, it sucks having two different Scheme environments on my machine: the really nice DrScheme one and then two different flavors of hell with Emacs, Hen mode for Chicken and run-scheme with scsh.

What to do, what to do.

Tags , ,  | 2 comments

Lisp Befuddlement

Posted by Daniel Lyons Thu, 31 Jan 2008 08:24:00 GMT

The world seems to be a little bit less optimistic today, because Arc has been out for 24 hours and has not yet changed the world.

In case you can’t tell, I like Lisp a lot. Seeing a Lisp machine work recently changed my opinion of Lisp a bit. I had been looking forward to Arc as a Lisp-2 with dirty macros and a lot of opinionatedness, basically as a tiny Scheme which celebrates all that’s gross about the other half of the Lisp family. But now that it’s here I’m not sure I see the point. It’s not that I don’t love Paul Graham, either. I just feel like something is awry.

There are, as it turns out, a number of minor Lisps out there which attempt to address some aspect of what makes Lisp annoying:

  1. Qi attempts to bring advances in functional programming back to Lisp.
  2. Lush tries to push Lisp into the multimedia/science sector.
  3. Scsh attempts to blend Unix and Scheme together.
  4. newLisp is a refresher and a shot at bringing Lisp to the web.
  5. Liskell is a Lisp syntax for Haskell with macros.

The problem, essentially, is that the Lisp machine was not a machine programmed in Lisp. It was a comprehensive environment which blurred the distinctions between language, operating system, hardware and editor. To use Emacs is to accept that the editor and the language/OS/hardware will be separate. To use Common Lisp on a modern OS is to accept that the language and the OS are separate. This goes against the nature of Lisp as fully realized on the Lisp machine. It feels inauthentic.

Of the five above, I have the most interest in the Scheme shell because I see it bringing back the tight integration between Lisp and the OS. Scsh not only brings a concise process spawning/piping and IO redirecting sublanguage to Scheme, it also bridges most of the POSIX APIs. It’s way more than just a shell, covering territory you’d traditionally need C for at the low level, the shell for process control, and a scripting language for logic. Instead you get all three for the price of one. I’m very intrigued.

This of course makes me wish I knew more Scheme. Which is an awkward position to be in as a Lisp partisan of so many years. This quote from Lambda the Ultimate helps:

An hygienic macro is one where the meanings of symbols that aren’t parameters to the macro are bound at the definition site rather than the expansion site.

Another user points out that you can accomplish variable capture with a hygienic macro as well as an unhygienic one, but there are problems you can run into with an unhygienic one that you can’t solve with gensym.

I wish I were less tired so I could be more coherent about all this, but it’s been a hell of a day, a hell of a week, and a hell of a month.

Tags , ,  | 1 comment