Two Years of GNU Guile Scheme 2.0
Two years ago Guile Scheme, the official extension language of the GNU project, released version 2.0, a major upgrade to the implementation. As part of the two year anniversary, the maintainers organized a challenge to hack a small project using Guile in 30 days as part of a birthday software potluck. The two coolest dishes appear to be OpenGL support using the FFI, and XCB bindings built using the XML specification for XCB: "guile-xcb is a language implemented in the Guile VM that parses the XML
files used by the xcb project to specify the X protocol and compiles
them into Guile modules containing all the methods and data needed to
send requests to the X server and receive replies/events back. If new X
extensions are added to the xcb library, guile-xcb can compile and add
them with no additional work.
"
See the release announcement for details on the other dishes.
Sounds stupid and pointless. *golf clap*
Another cool thing about GNU guile is that the most recent version supports SRFI-105, "curly-infix-expressions", as developed by the Readable Lisp S-expressions Project. Curly-infix expressions let you write stuff like {a + b} instead of (+ a b), which is a big improvement in readability.
- David A. Wheeler (see my Secure Programming HOWTO)
I've wanted to get into Lisp, but it's frustrating that my everyday GNU environment is split between Guile and Emacs Lisp. I wish that the project, talked about for years, to rewrite Emacs and base it on Guile would take off. It would save Guile, in a sense, because in spite of Scheme's status as the official GNU extension language it tends to be overlooked, and Emacs would benefit greatly from the bindings already developed for Guile.
I love Scheme. I even wrote my own scheme interpreter way back and used it as the embedded control language in QuickLogic's P&R tools. However, only software geeks like Scheme, making it a terrible language for tool control for anything but software dev tools. TCL beat the heck out of Scheme in terms of popularity for this purpose. Python beat the heck out of Scheme as well. Perl got adopted by the text mashing crowd. Also, Guile, at least in the 1.0 version had issues. For example, it really wanted to have main in it's code, while your entire application was something it called. TCL has a better architecture for embedding. Anyway, this is nice, but I don't personally see a significant future for Scheme.
Celebrate failure, and then learn from it - Nolan Bushnell
...is that just me? I don't consider myself particularly smart or educated but I can program in C as well as numerous scripting languages, and when I look at a strange new language I can usually sort of see what's going on, but when I look at Scheme I am just left completely bewilderd. Then again, I've never seriously attempted to learn the language so maybe this is one of those things that looks hard but simply isn't, once you get used to it.
RPN has always scared people. It's why HP calculators don't dominate the market.
I guess Guile Scheme...
(puts on sunglasses)
does go with everything.
Only in my happiest, wildest, wettest dreams.
Copyleft-only languages have no chance, particularly among languages intended to be embedded in applications. Permissively licensed alternatives to Guile among Scheme implementations seem to include: Gauche, Ypsilon, TinyScheme, Scheme 48, Owl, and the SCheme SHell (scsh).
And of course Scheme itself is dwarfed, in terms of both popularity and performance by other languages. Haskell seems to be the best overall functional language at the moment, and, when choosing a scripting / macro-language without a commitment to functional languages, better alternatives would be Lua (made faster than Scheme by LuaJIT), JavaScript / CoffeeScript (V8), and Ruby (Topaz).
--libman
Curly-infix-expressions (as well as sweet-expressions, which are a superset) are just additional abbreviations. In curly-infix, the surrounding "{...}" indicate that it's a list, but that parameters are written in a different order than they are actually stored. So {a + b + c} is just (+ a b c). We're now wrapping up sweet-expression notation, which is a superset that uses syntactically-relevant indentation (like Python). Check out http://readable.sourceforge.net/ for more info, and in particular, please join the mailing list!!
- David A. Wheeler (see my Secure Programming HOWTO)
Java, not JavaScript. They are completely different. Netscape just used the Java name since it was trendy back then.
Good to see that my trollbait still works.
You need to dream wilder, wetter.
There's no problem. You can use spaces or tabs, but you HAVE to be consistent when you use one or the other. So if you indent a line with a tab, all sibling and child lines MUST start with a tab... multiple spaces don't count. You can even mix, but you still have to be consistent, so if you use tab space space, all later siblings and child lines must start with tab space space.
- David A. Wheeler (see my Secure Programming HOWTO)
Guile 2 was a major upgrade to Guile's performance and expressiveness as a language, and has become a pleasant foundation for its users.
Who are its users? The Guile homepage states:
Successful and long-lived examples of Free Software projects that use Guile are TeXmacs, LilyPond, and GnuCash.
How many of those are using Guile 2 yet? Zero as far as I can tell.
TeXmacs lists on its todo page: "Internally present Guile as a plug-in, which could later be replaced by another Scheme implementation."
Scheme is normally considered a functional programming language. The 1989 paper "Conception, Evolution, and Application of Functional Programming Languages" by Paul Hudak defines functional programming languages as languages "in which computation is carried out entirely through the evaluation of expressions" (as opposed to setting mutable states, like variables, or allowing routines with side-effects). That paper specifically identifies Lisps (including Scheme) as languages that can be used as functional programming languages, as well as ML and Haskell. Like ML, Scheme provides mechanisms that let you "escape" outside the functional programming paradigm, but "well-written code" normally doesn't do that.
- David A. Wheeler (see my Secure Programming HOWTO)
Actually, the braces are implemented in the reader. In Common Lisp terminology, they can be implemented as a "reader macro", but this is a completely different step than the Lisp "macros" usually refer to. This means that you can use {...} with data or code, and you can even use them as inputs to macros (in the usual sense). Thus, you can combine Scheme's "define-syntax" with {...} without problems. The SRFI-105 spec has some examples you might want to look at.
- David A. Wheeler (see my Secure Programming HOWTO)
How many of those are using Guile 2 yet? Zero as far as I can tell.
To be fair, Guile 2 is a huge upgrade from Guile 1. Internal are completely different. Such transitions will take a long time. It's fair to assume that some will never switch from Guile 1. Not every application needs an uber advanced and fast extension language like Guile 2 (and it is very fast IMO, as far as scripting languages go).
The main impediment to adoption I think was barely missing the Debian Squeeze and the last set of distro releases... but it made it into Wheezy and I think is in every other major distro's latest/upcoming release.
The perils of distro release cycles...
HAL 7000, fewer features than the HAL 9000, but just as homicidal!
How many of those are using Guile 2 yet? Zero as far as I can tell.
To be fair, Guile 2 is a huge upgrade from Guile 1. Internal are completely different.
Yes, that's the point. It has not become a pleasant foundation for its users. It may or may not have become a pleasant foundation for applications that have not yet used it. But there is no large project using GUILE 2 as an extension language. It is not really useful for that any more.
People are using GUILE 2 as a standalone language. Which is nice, but not what it is being marketed for. They left their niche and their marketed users behind in order to compete with full Scheme implementations instead. But that's not where they were somewhat competitive and successful.
You a Java guy? And have *wet* dreams?
Sheesh.
> The main impediment to adoption I think was barely missing the Debian Squeeze
Nobody is preventing the Guile people to offer prebuilt packages for the 3-4 most popular distros.
"Want to try out new release? Just download and click this deb, and there you go!"
You dont have to wait for distros to do that work for you. Of course, you can, but then you cannot whine if you are not on top of their priority list.
> The perils of distro release cycles...
Sounds like an whiney excuse to me. "We would have taken over the world by now if only distro X had shipped us more timely."
The problem with Guile is bootstrapping. Nobody uses it because nobody uses it, and since nobody uses it, nobody writes libraries for it, so nobody uses it.
The way to get around the bootstrapping problem is "easy": Write a killer app and make Guile an integral part of it. Inject Guile into one of the already popular apps, Emacs, GDB, Texinfo, etc. It is your responsibility to somehow amass a critical mass. If you try it directly, i.e. just by advertising Guile _itself_, it wont work. Just do what Javascript did, attach yourself onto something important.
Careful, I emphasized *Scheme* and not *Common Lisp*. All Schemes are *required* to be properly tail recursive, per spec, which combined with garbage collection completely deals with the pure-functional-style memory pressures properly. It's true that nobody in practice writes large (Common) Lisp projects in functional style, but Common Lisp doesn't guarantee proper tail recursion (and implementations don't typically provide it), so that should be unsurprising that you can't really scale that up in Common Lisp.
- David A. Wheeler (see my Secure Programming HOWTO)