r/programming • • Mar 16 '17

GNU Guile 2.2.0 released

http://wingolog.org/archives/2017/03/15/guile-2-2-omg
115 Upvotes

27 comments sorted by

3

u/greenspans Mar 16 '17

Guile was meant to be the universal scheme across all GNU tools. It did not get widely adopted although projects like guilemacs and xbindkeys are useful. It has a super easy C interface. It doesn't have great windows support.

Since Racket added typed racket and has better cross OS support it seems better to support Racket as a primary scheme. Guile is still a solid tool for adding simple scripting for your linux applications.

2

u/agumonkey Mar 16 '17

From the top of my head, racket performs less than Guile on average. Isn't it ?

2

u/greenspans Mar 16 '17

Not by much, point of scheme though is a convenience language, not for high performance applications. Love the idea of some scheme language being the global plugin for all tools, just because it's so easy to make DSLs.

1

u/agumonkey Mar 16 '17

Fair enough.

4

u/[deleted] Mar 17 '17

The reason for using Scheme varies depending on the programmer, but wanting high performance is not uncommon. Guile 2.2 is respectably fast, other implementations like Chez Scheme are incredibly fast and have good native code compilers. It's possible to program in a pleasant high-level language and have great performance.

Scheme gets lumped into the "scripting" language (what even is that, anyway?) category and Guile outperforms popular choices in this category like Ruby and Python.

3

u/capnrefsmmat Mar 17 '17

Racket has a JIT compiler and tends to be among the best-performing Schemes, I think, although something broke it in the benchmark suite so I can't compare anymore. Guile is in the middle of the performance range, doing better now with 2.2.

2

u/[deleted] Mar 17 '17

pretty sure racket is in the middle of a port to chez for better performance

3

u/[deleted] Mar 17 '17

Racket can do native compilation which Guile cannot do yet, so Racket can beat out Guile 2.2 for that reason. However, someone has written a tracing JIT for Guile and the discussion has started about how to integrate it or make the necessary core changes for it to live as a third-party library for those who want it.

16

u/BarMeister Mar 16 '17

What is it?

22

u/sigzero Mar 16 '17

Guile is an implementation of the Scheme programming language.

12

u/dangerbird2 Mar 16 '17

To add, it's designed as an extension language for GNU tools (originally for a replacement to Emacs Lisp, but that never panned out.). AFAIK, GNU's versions of Make and gdb both include support for Guile as a scripting language.

6

u/Hauleth Mar 16 '17

IIRC Guile was created as extension language for GIMP.

5

u/dangerbird2 Mar 16 '17 edited Mar 17 '17

GIMP uses TinyScheme as its extension language. Guile was created as a less terrible Lisp for use in Emacs. Instead, they just make ELisp less terrible by porting Common Lisp's standard library.

edit: GUILE, not GIMP

6

u/agumonkey Mar 16 '17

The double edged sword named lisp. In lisp everything is just a lib, so you can always tolerate "lame" core language, since it's up to you to make it what you want.

9

u/jyper Mar 16 '17

TIL GIMP is a lisp

Every program eventually expands to include a be a lisp interpreter.

0

u/[deleted] Mar 17 '17

Wait... GIMP was meant for Emacs? It turned out to be pretty great by itself. Just like hamburger helper without hamburger! (Ok, that's an awful analogy)

1

u/jephthai Mar 16 '17

I'm pretty sure that's just the most famous use of it -- lots of people wrote Gimp plugins in scheme for awhile. But I believe /u/dangerbird2 is correct. It's not easy to find old newsgroup evidence, but the wikipedia article suggests this is an accurate view.

1

u/[deleted] Mar 17 '17

Guile is much older than GIMP

2

u/BarMeister Mar 16 '17

Thanks

7

u/Deto Mar 16 '17

Version release announcements are a good opportunity for publicity (since they tend to get linked to like this) that I think a lot of authors squander by assuming that only people familiar with the project will be viewing the page.

13

u/greenspans Mar 16 '17

Their manual is so good it doubles as a book you could use to learn scheme

https://www.gnu.org/software/guile/manual/html_node/

9

u/dzecniv Mar 16 '17

The language that powers GNU Guix, the functional and bit-reproducible package manager that makes you declare a full distro in one guile file.

2

u/a_Tick Mar 17 '17

To be fair, Guix is largely a Guile skin over Nix. They're very upfront about this, and the project founder (Ludovic Courtès) has contributed to Nix.

3

u/[deleted] Mar 17 '17 edited Mar 17 '17

This is not accurate. Guix is similar to Nix, but its implementation is entirely unique. The only component they have in common is the C++ build daemon, but even this has diverged quite a bit and will eventually be replaced in Guix by a daemon written completely in Guile.

3

u/[deleted] Mar 16 '17

Wow, I haven't heard much about Guile since I was first working through SICP a few years ago. I remember thinking the C API wasn't so nice compared to that of Lua, and depended on massive amounts of global state.

I'm glad that Guile development is still proceeding. It was quite a good Scheme implementation, and despite not being as good as Lua from an embedding perspective, it was still far better than something like Tcl.

2

u/[deleted] Mar 17 '17

I chose Guile over Lua precisely because the C API was much nicer. With Lua you have to do all this stack manipulation to deal with function arguments whereas in Guile there's a much more straightforward API.

1

u/[deleted] Mar 17 '17

Yeah and stack manipulation of Lua_Stack is a bit of a mind-bender at first offsets-wise. Seems very "wrappable" though I worry that not exposing folks directly to the layer means debugging things later becomes a bit ugly.

I do love that Lua speed and the sandboxing though!