Slashdot Mirror


Guile Scheme Emacs-Lisp Compatibility Matures

In a posting to the Guile developers list today, it was announced that the Emacs-Lisp compiler for Guile has matured enough to run actual elisp programs. The author included a screencast demoing the new compiler running the Dunnet dungeon crawler. It is still a bit hackish: you need a load file that fakes a few Emacs side functions. In theory, most batch mode programs that don't do buffer manipulation should now work. After a few previous attempts, things could be on track for GNU Emacs 25 based on Guile.

13 of 46 comments (clear)

  1. Sonic boom! by Sodki · · Score: 2

    That means Emacs 25 will be filled with "Sonic boom"!

  2. Has anyone embedded Guile? by GreatBunzinni · · Score: 2

    I've heard of Guile in the past, but I never managed to come across any application that actually uses it. Guile's own project list is rather meek, and whenever people talk about embedding a programming language, the talk appears to always shift to Lua. Does anyone know why no one picks Guile for any task? It would be great if it was possible to hear from anyone who actually gave Guile a try in any project.

    --
    Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
    1. Re:Has anyone embedded Guile? by deKernel · · Score: 2

      The one application that I am aware of that does make use of Guile is GnuCash and it uses Guile for generating reports.

    2. Re:Has anyone embedded Guile? by Anonymous Coward · · Score: 4, Informative

      TeXmacs and Lilypond also embed Guile.

    3. Re:Has anyone embedded Guile? by Bomazi · · Score: 3, Interesting

      There are many other apps using it, like gnucash.

      Having used it before I can tell you that the C API is very well made, and C and scheme can call each other with few limitations. Scheme is an elegant language too.

      Lua has three main advantages over guile. It is trivial to package, has a smaller footprint, and works anywhere. Guile only really supports posix and windows.

      But the main competitor to guile is not lua, it is python. And the battle is all but lost. The two offer about the same functionality. They can easily interface with the outside (unlike Lua) and the C API works similarly, but python wins due to its more traditional syntax and larger developer base.

      As much as I like guile, the whole point of an extension language is to encourage third-party additions, so you want a language that attracts as many potential developers as possible (including beginners), and that language is not scheme. So unless your religion forbids it (i.e. it is a gnu program), python, or maybe javascript, is almost always a better choice.

    4. Re:Has anyone embedded Guile? by Michael+Duggan · · Score: 3, Informative

      Lilypond uses Guile extensively, and as time goes on, more and more of its code has been moving from C++ to Guile. For those not in the know, Lilypond is a typesetting program for music.

    5. Re:Has anyone embedded Guile? by macshit · · Score: 2

      Hmmm, of course such libraries do exist for Lua, it's just that you'll have to download them separately rather than finding them in the tarball that contains the actual interpreter...

      The most common use of Lua is as an "embedded" language—app is written in C, but linked with a Lua interpreter which the app calls to do whatever stuff it wants. I don't think actual sandboxing is all that common—it's common, for instance, for "embedded" Lua code to load various external modules/libraries to do stuff.

      [There's no particular reason not to write an entire app in Lua (works fine), it's just that its small size, standalone nature / lack of dependencies, and good C interface make it a very good fit for those times when you want to add an interpreter to your app...]

      --
      We live, as we dream -- alone....
    6. Re:Has anyone embedded Guile? by LizardKing · · Score: 2

      Guile was a failed attempt at making an embeddable scripting language for the larger GNU apps. It failed because very few people actually wanted to use Lisp for such a purpose, even in if it was in a minimalist Scheme like form. There was even a flame war aeons ago when Tcl was proposed as a ready made alternative to a fledgling Guile. RMS shot the idea down in flames since he considered Tcl beneath unworthy of use by "real programmers". As you've noted, since then alternatives such as Lua have become popular in the embedded scripting language niche.

    7. Re:Has anyone embedded Guile? by Jim+Hall · · Score: 2

      GNU Robots uses Guile, but I don't see it on the list. GNU Robots lets you construct a program for a robot, then you set it loose in a virtual environment. It can use sensors to detect objects, blast baddies, pick up rewards, and move around. You write the program in Scheme, which is loaded by GNU Robots via Guile.

  3. Glad to see this on Slashdot! by Lemming+Mark · · Score: 3, Funny

    This is the kind of article I'm always glad to see on Slashdot; emacs is cool, Lisp is cool, an article on something that's genuinely hardcore nerdy is always good to see! With the Linux on 8-bit micro article also posted today it feels like the nerd coefficient is running high today! Good!

  4. I tried Guile recently... by JanneM · · Score: 2

    ...and I like it; surprisingly so. Scheme is off-putting at first (and Andy Wingos blog posts aimed at long-time seasoned users don't help) but once I sat down and really wrote something in it it turns out to be very expressive and readable.

    What Guile needs, I think, is better packaging. Make a full-featured package set for the most popular platforms with the libraries you need to do real, fun stuff. Things like the Cairo and SDL library bindings for instance, and UI bindings.

    The libraries you want already exist and work well, but installing them by hand is a pain, especially when your aim is to learn the language, not deal with installation issues.

    Then add a set of docs to get things rolling. Docs for the libraries (the Cairo bindings have none; you basically use the C version docs.) A few Hello World-ish tutorials to get going with UI, graphics, communication, language bindings and so on, together with a general introduction to Scheme and Guile. Again, I think most of it is out there already, just not assembled and packaed in an accessible way.

    It's a really good system; shame to see it so underused.

    --
    Trust the Computer. The Computer is your friend.
  5. Re:Lisp is... by doom · · Score: 3, Funny

    Eric S Raymond wrote in "How to become a hacker [catb.org]" that Lisp is worth learning [...]

    But don't let that discourage you too much, lisp might be worth learning in any case.

  6. Re:(first) by mdmkolbe · · Score: 2

    I think you mean "(car posts)".