Geiser

Update: Since a few months ago, Geiser has its own home in the interwebs.

I hope you’ll pardon a shameless plug of one of my latest hacks, Geiser, a new Emacs-Scheme interaction mode.

After having lots of fun implementing Fuel, i was left with a lot of Elisp code that, i realized, could be easily reused for languages other than Factor. I also decided that it was high time to stop whining about Scheme environments not being dynamic enough and do something about it. As they say, talk is cheap.

Thusly, Geiser was born, and today it came of 0.0.1 0.0.2 age, as per the git tag in its repository.

If you know Slime or Fuel, you know what Geiser aims at: a pleasant, live interaction with Scheme without leaving Emacs. This first release is by no means there yet, but you’ll already find some joy using it: module-aware and incremental evaluation, jumping to definitions, dynamic symbol completion and automatic signature display in the echo area are the highlights.

Currently, Geiser supports two Scheme implementations: Guile and PLT. Yeah, i like both (and several others). It’s been really fun discovering how to tweak them to obtain the metadata i wanted, and their developers and users have been helpful, kind and patient to no end. A big thanks to them (you know who you are), and my promise that i’ll keep nagging.

Both Guile and PLT have given me many pleasant surprises. Guile is the most common-lispy Scheme around, and the recent hard work and improvements by the likes of Andy Wingo is making much of the criticism it memetically receives just moot. And PLT is by no means the rigid system i thought it was, while retaining all the great features i knew it had. Try any of them, with or without Geiser: they’re real fun.

Back to Geiser, this being an alpha release, there’s no screencasts or real documentation… the code just escaped leaving a blood trail, you know. Maybe one day it’ll have a webpage, a mailing list and even users. In the meantime, if you’re brave enough, the README will hopefully do; and, of course, the code:

  git clone git://gitorious.org/geiser/mainline.git

(If you’re not brave enough, but curious, the code is browsable here.)

Needless to say, all kinds of comments, criticisms and laundry lists are welcome and, actually, encouraged.

Happy scheming!

Not your parents’ shell

The developers of scsh, the Scheme shell, have just released version 0.6.7 of their awesome Scheme implementation. Scsh is, in my opinion, simply the best scripting language around, by a long stretch. It was initially implemented by Olin Shivers on top of scheme48, as a result of his problems with traditional shell languages: he wrote a detailed rationale on the design principles behind scsh that is full of insight and a must read. In addition, this page is full of writings by Olin and other minds behind s48/scsh (like Michael Sperber or Martin Gasbichler) with interesting details on many aspects of scsh’s implementation.

CommanderDuring the last years, scsh has become, slowly but surely, my default scripting tool (emacs’ eshell is also fine, but, you know, elisp is not scheme), my only nit being its lack of a shell prompt powerful enough to fully replace zsh or bash. But, lo and behold, it seems the writing may be on the wall for my bash/zsh’s days: a beauty called Commander S is well underway. Commander S is an interactive frontend for scsh, based on the ncurses library, described in the workshop paper Commander S – The shell as a browser, by Gasbichler and Knauel. In the author’s words:

Commander S is a new approach to interactive Unix shells based on interpretation of command output and cursor-oriented terminal programs. The user can easily refer to the output of previous commands when composing new command lines or use interactive viewers to further explore the command results. Commander S is extensible by plug-ins for parsing command output and for viewing command results interactively. The included job control avoids garbling of the terminal by informing the user in a separate widget and running background processes in separate terminals. Commander S is also an interactive front-end to scsh, the Scheme Shell, and it closely integrates Scheme evaluation with command execution.

Although it’s not yet released, the brave and bold among you can already give it a try from its CVS repository.

(I wish i had time for Conjure: one of the features i had in mind was some sort of interactive build tasks inspector, and Commander S’s plug-ins look like an excellent implementation vehicle for such a thing. You’re not looking for a nifty scheme project, are you?)

Tags: , ,

Posted in Hacks, Scheme. 3 Comments »

Conjure reaches a baby milestone

The latest conjure48 version at my repository is able to build s42, and run the test suites—doc generation is almost there too.

If you have the s42 source tree, you can try it with the following incantations [1]:

  $ ln -s conjure/examples/s42/build.scm .
  $ ln -s conjure/examples/s42/build.exec .
  $ scheme48
  > ,exec ,load "build.exec"
  > (build-system "s42" "test")

That will run the testsuite. Other goals that can be used instead of ‘test’ are ‘runners’, ‘s42.image’ or ‘doc’. If you take a look at the build script and find it ugly, please keep in mind that this is still alpha code, and that s42 is a rather complex system when it comes to building. This simpler build file for a test C project is closer to what we envision. From here, we’ll be polishing the syntax and interfaces to attain our DSL-for-non-schemers goal.

If you are in Vienna tomorrow, don’t miss rotty’s talk on scheme, s48 and s42 for Debienna, where Conjure will make its world wide debut :-).

—-
[1] There are some tricky issues that you may stumble upon to get there. Please, do not hesitate to contact us at #conjure in Freenode.

Tags: , ,

Conjure becomes verbose

Conjure48′s development is evolving at a slow but steady pace. We are already able, for instance, to compile C/C++ code, including dynamic libraries, both in GNU/Linux and Mac OS X. And a build script for s42 (getting rid of Scons in the process) is on the way.

Our latest addition is rotty’s logging package, which is not Conjure-specific and very interesting, in and by itself. Actually, this new logging facility is part of Spells, thus being portable to several Scheme implementations. Please, follow the link above for rotty’s detailed report.

As an aside, and just in case you’re wondering how on earth Spells, s42 and Conjure relate to each other, here’s a quick summary of the stuff we’re trying to release:

  • Spells is a portable set of Scheme libraries, compatible with several Scheme implementations: Scheme48, PLT Scheme, Guile and Gauche are our current targets. Spells includes lots of utilities, from regular expressions to an implementation of T’s object system, a document generation system or a unit testing framework. Of course, we’re not generating all that stuff from scratch, but frequently adapting existing libraries to Spells’ portability framework. You can get a feeling of Spells breadth in this draft API documentation.
  • s42 is a collection of scheme48 libraries and extensions. To boot, it includes all Spells modules, and then much more (for instance, spenet, and implementation of rotty’s network API proposal).
  • s42 serves as the basis to s48-worlds, a framework aimed at supporting distributed s48 package repositories (a little bit like PLT’s PLaneT).
  • Conjure uses Spells for portability, and is the build system for s42. In other Schemes, it will run as a standalone make replacement, without any dependency on s42.

As you can imagine, there’s lots of room for new developers by here, whatever your Scheme of choice is. If you want to join the fun, drop any of us a mail, or look for us at #conjure or #scheme in Freenode.

Tags: , , ,

Posted in Hacks. 2 Comments »

Conjure, a make replacement in scheme

My current scheming is centered around Conjure, a make(1) replacement written in Scheme.

If you are familiar with Scons, a good approximation is to think about Conjure as Scons, but using Scheme instead of Python. The key point in these systems is that the language is not just an implementation detail (as, say, C is in make), but soars up to surface in that build scripts are actually Scheme (or Python) programs.

I don’t think i need to go into the details of why having at your disposal a full-fledged high-level language has advantages. But of course, more power implies more risks, and end users my be confused with, or not willing to learn, your favourite programming language. This, in my opinion, is a problem much easily surmountable in Scheme than Python (and that’s one of the reasons i keep working on Conjure, Scons notwithstanding). How so? Syntactic abstraction, of course. Besides having a far simpler syntax, Scheme (and Lisp in general) is the perfect vehicle to implementing domain-specific languages (see, for instance this nice article by V.S. Lugosky).

Thus, one of the goals of Conjure is to provide a declarative DSL tailored to defining software construction tasks and their interrelationships, usable as such even without any knowledge of Scheme. But then, DSL or not, a Conjure build file is still a Scheme program, and power users can extend and twist the system as much as they want.

The initial draft of the Conjure User’s Manual has an introductory section where i indulge in a boring discussion of these issues, if you’re so perversely inclined. The rest of the manual, by the way, is hopelessly inaccurate and out of sync with the current implementation, which you can browse in my darcs repository.

As you will see, nowadays Conjure is embedded in a wider plan for world domination which includes Spells, s48-worlds and s42. Those projects have been impulsed by my talented and indefatigable friend and conniver Rotty, who finally assimilated me into the s48 underground.

The Conjure homepage provides more details and links. Please, don’t be put off if you’re not a scheme48 aficionado: eventually, Conjure will run on as many Scheme implementations as possible. This is why it is based on Spells (which had its beginnings as a Conjure library, but thanks to Rotty has grown up into a project (very) worth in and by itself), a portability framework. Think of the current conjure48 as a proof-of-concept implementation that will settle the basis for the portable Conjure.

Tags: , , ,

Posted in Hacks. 1 Comment »
Follow

Get every new post delivered to your Inbox.

Join 26 other followers