Live data from Hacker News

GNU Guile 2.2.0

gnu.org

61–70 of 149 posts

Re: GNU Guile 2.2.0

#62
post #52

Can anyone tell me if Guile is relevant? The list of example programs written in Guile is small. EmacsLisp and not Scheme seems to be the Gnu lisp of choice. The VM is not the fastest and not the most portable. Is there any driver behind it?

Yes, it is relevant. For example, Guile powers an entire GNU/Linux distribution[0] where Guile is used for the init system, initial ram disk, and package manager.

[0] https://www.gnu.org/software/guix/

Re: GNU Guile 2.2.0

#63

Earlier quoted context omitted.

Nostalgia is an odd word to use here when Guile is a Scheme, and so is part of the Lisp family.

is lisp older than C?

Yes.

It's the second-oldest high level programming language (after Fortran).

- Fortran: 1957

- Lisp: 1958

- ...

- C: 1972

Re: GNU Guile 2.2.0

#64
post #21

Earlier quoted context omitted.

The super advantage of Lisp (including Scheme): Its format for defining data is the same as for writing code, making macros a natural part of the syntax: You can change your source code just like you’d change any other list (or rather tree) data type. However all this can be represented fully without parentheses — and this is possible with Guile using a reader extension without losing any of its power. This is realiz…

> The super advantage of Lisp (including Scheme): Its format for defining data is the same as for writing code, making macros a natural part of the syntax: You can change your source code just like you’d change any other list (or rather tree) data type. I've heard this repeatedly over the years, but the explanation unfortunately always stops right there. Could you please give an example of why you'd want to change yo…

Macros don't "change source code". That is a serious, but common misconception: that they are somehow self-modifying code.

Lisp macros give meaning to syntax that doesn't previously have meaning. In this regard, they are the same as functions.

(foo (boonly) blarg) doesn't have any meaning because foo hasn't been defined.

We can fix that by writing a function foo. Then (boonly) and blarg have to be valid expressions and we are good.

Or we can make it mean something can by writing a macro foo. The macro foo is a function that will operate on the entire form (foo (boonly) blarg) and calculate a replacement for it. The Lisp form expander (a feature of the compiler or interpreter) will call the macro and accept its return value as the replacement for the macro call. Then, the replacement is scanned for more macros; the entire process removes all macros until all that is left is special operators and functions.

A practical example of a macro is the ANSI Common Lisp standard macro called loop which provides a syntax for iterating variables, stepping through collections, and taking various actions or gathering results:

  (loop for bit in '(0 3 7 13)
        for mask = (ash 1 bit)
        summing mask) -> 8329 

This entire looping mini-language is implemented in the loop macro. When you call (loop ... args) the macro takes over, analyzes the phrases and compiles them into other syntax.

Re: GNU Guile 2.2.0

#65
post #15

For me this is the most exciting part: Complete Emacs-compatible Elisp implementation Thanks to the work of Robin Templeton, Guile's Elisp implementation is now fully Emacs-compatible, implementing all of Elisp's features and quirks in the same way as the editor we know and love. This means we can finally have a proper GuileEmacs!

This is fantastic news. Are there any other major roadblocks for GuileEmacs?

yes! String representation for instance, lake of utf-8 filenames support (at least there is bug) but nothing that can't be fixed.

Re: GNU Guile 2.2.0

#66

Earlier quoted context omitted.

Given that Guile was basically launched by an RMS FUD attack on Tcl more than 20 years ago, 6 years seems like a rounding error. http://vanderburg.org/old_pages/Tcl/war/

It's been 6 years since Guile 2.0, when Guile went from being an interpreter only to having a VM and AOT compiler.

You mean a jit compiler. There is still not AOT compiler for GNU Guile AFAIK. Except janneke work.

Re: GNU Guile 2.2.0

#67
post #52

Can anyone tell me if Guile is relevant? The list of example programs written in Guile is small. EmacsLisp and not Scheme seems to be the Gnu lisp of choice. The VM is not the fastest and not the most portable. Is there any driver behind it?

You usually don't write anything other than emacs extensions in emacs lisp -- it would be overkill to have to start emacs just to start an HTTP server. For these purposes, guile would be a better choice?

yes.

Re: GNU Guile 2.2.0

#68
post #41

Earlier quoted context omitted.

In lisp/scheme, you write the abstract syntax tree, skipping the parse step entirely.

> skipping the parse step entirely. Not strictly true... there is still parsing involved in reading Lisp data structures from a character stream. (It's just much less involved than in traditional infix languages.) The way to think of it is this: 1) Lisp has a much more comprehensive (and read/write) syntax for its core data structures. 2) Lisp, the language, is defined in terms of those data structures rather than in…

I think of it as serialing/deserializins the AST to text :)

Re: GNU Guile 2.2.0

#69

Earlier quoted context omitted.

It's been 6 years since Guile 2.0, when Guile went from being an interpreter only to having a VM and AOT compiler.

You mean a jit compiler. There is still not AOT compiler for GNU Guile AFAIK. Except janneke work.

Guile uses an ahead of time (AOT) compiler. Someone wrote an experimental tracing JIT recently [0] but that's not part of Guile itself.

[0] https://github.com/8c6794b6/guile-tjit

Re: GNU Guile 2.2.0

#70
post #52

Can anyone tell me if Guile is relevant? The list of example programs written in Guile is small. EmacsLisp and not Scheme seems to be the Gnu lisp of choice. The VM is not the fastest and not the most portable. Is there any driver behind it?

0) Guile is a GNU project

1) Guile has no Global Interpreter Lock.

2) Guile is a scheme, so it is homo-iconic cf. https://en.wikipedia.org/wiki/Homoiconicity

3) Scheme (and lisp in general) are nice to write Domain Specific Languages.

4) Guile doesn't have a particular overhead for calling simple functions which makes it possibly as fast as C.

5) Guile has a very powerful object oriented programming framework beating by far Python and Ruby OO systems.

6) Guile is optimised for immutability which makes it for safer code.

7) Guile has Guix which has 'guix pack' command which is awesome cf. http://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi...

8) Guile has a lot of supporters cf. https://lists.gnu.org/mailman/listinfo/guile-user

9) Guile has awesome maintainers

Also, there is not a lot of packages. But programs written in Guile or using Guile tend to be of higher quality, cf. http://guildhall.hypermove.net/ and http://sph.mn/content/3e73

Post reply on HN