
GNU Guile 2.2.0 - amirouche
https://www.gnu.org/software/guile/news/gnu-guile-220-released.html
======
pkd
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!

~~~
peatmoss
While others in this thread rightly point out that there's still work to be
done to make GuileEmacs, I'm interested in another use case that seems like it
could potentially be realized in the near-ish term:

lib-org-mode.

I love org-mode, but wish that some of the features could be ported elsewhere
just to make the format more ubiquitous. Or a stand-along org-mode notebook
server. Or support in other text editors. Or...

~~~
flukus
Do we want the format to be more ubiquitous? Org-mode is fantastic, but the
format itself is .... obviously organic.

~~~
peatmoss
So that I can use it everywhere and people won't look askance? Definitely!

If I compare RMarkdown and org-mode, for example, org is strictly better for
academic writing or anywhere else where internal cross-references are needed.
Org isn't an astounding format, but it is quietly competent.

------
mwcampbell
Also check out this personal blog post from Andy Wingo, the primary developer:

[http://wingolog.org/archives/2017/03/15/guile-2-2-omg](http://wingolog.org/archives/2017/03/15/guile-2-2-omg)

~~~
mschaef
That whole blog is worth a good read through. Lots of interesting stuff,
particularly if you care about dynamic language implementation.

------
avar
For those excited about the "Guile's Elisp implementation" in this release.
The last major Guile release was 6 years ago, and much of this GuileEmacs work
is still highly WIP and from my searching on emacs-devel seems to have stalled
in 2015 for lack of volunteers.

Just because Guile implements Elisp the _language_ doesn't mean there isn't a
ton of work to be done on Emacs itself to swap out its native VM for Guile,
and it seems nobody's keen on finishing up that work.

~~~
microtherion
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/](http://vanderburg.org/old_pages/Tcl/war/)

~~~
belorn
Tcl was accused of being a scripting language that is more suitable for simple
scripts, so I went and took a look at the Wikipedia article to see if it too
presented a similar view. To quote: _" It is commonly used embedded into C
applications,[9] for rapid prototyping, scripted applications, GUIs, and
testing.[10]"_

Is wikipedia also doing a fud attack on Tcl (as it naturally could be the
case), or is RMS post simply a less diplomatic and less friendly way to say
that Tcl don't have the same purpose and use case as languages like c and c++?
Any turning complete language can of course be used for anything, but looking
at how something is used often give a good hint on where its strengths are.

~~~
microtherion
At the time, Tcl was being used for fairly large apps (and it still is, e.g.
in WaveSurfer). As for large scale suitability, I would guess that both Tcl
and guile nowadays are eclipsed by Lua for embedded scripting, which to me
would suggest that "simple" won out over "powerful".

What is not mentioned in that thread (at least not in RMS' original message)
is that what triggered his edict was that somebody extended gdb with Tcl as
the extension language. This was an absolutely reasonable use case for Tcl -
the lightweight syntax makes it perfect as an interactive, embedded scripting
language.

This discussion led to the creation of Guile, the withering of Tcl support in
gdb, and eventually the introduction of a gdb that used Guile as its extension
language — in 2014, 20 years after RMS decided that the Tcl extension (which I
believe pretty much worked already) was unacceptable.

Of course, as astute readers will already have guessed, Tcl was BSD
licensed...

~~~
the_why_of_y
Your narrative omits that gdb added Python scripting support in 2009.

Of course, as astute readers will already have guessed, Python is permissively
licensed.

~~~
microtherion
Both true, but I did not want to further digress. I would argue that the fact
that it took 15 years for scripting support to show up again is evidence that
the original policy was counter-productive.

------
davexunit
This release has been a long time coming and I'm happy that the day has
finally arrived. There's a small patch of mine in this release (my first
compiler hack ever) that optimizes comparison operations for floating point
numbers. If anyone is interested in hacking on compilers, I highly recommend
checking out Guile as one of the easier points of entry into the space. Andy
Wingo, the author, even wrote up a blog post with plenty of project ideas to
improve things: [http://wingolog.org/archives/2016/02/04/guile-compiler-
tasks](http://wingolog.org/archives/2016/02/04/guile-compiler-tasks)

------
porker
For others looking for what Guile is: "Guile is an implementation of the
Scheme programming language."

------
lloydde
The mailing list announcement is better both for the detailed content and not
being served as difficult to read on mobile "justified" text:
[https://lists.gnu.org/archive/html/guile-
devel/2017-03/msg00...](https://lists.gnu.org/archive/html/guile-
devel/2017-03/msg00095.html)

~~~
tambourine_man
Thank you, I gave up reading it because of the justification. There was no
"reader" version available for Safari either.

------
davexunit
To try out Guile 2.2.0 easily from any GNU/Linux distro (from the full release
notes):

    
    
        Bonus track!  This release also contains a new experiment, a binary
        installation package for the x86_64 architecture.
        
        The GNU Guix project (https://guixsd.org/) has assembled a graph of
        package definitions (for example, GCC, glibc, Guile, and so on) and is
        able to build that graph in an entirely deterministic way starting
        from only a handful of trusted bootstrap binaries.  Guix recently
        added a "guix pack" facility that can export build products from a
        Guix system, including all run-time dependencies.
        
        We have used the new "guix pack" to generate an experimental binary
        distribution for the Guile 2.2.0 release.  If you are on an x86_64
        system running GNU/Linux, begin by running the following commands:
        
          wget https://ftp.gnu.org/gnu/guile/guile-2.2.0-pack-x86_64-linux-gnu.tar.lz
          wget 
        https://ftp.gnu.org/gnu/guile/guile-2.2.0-pack-x86_64-linux-gnu.tar.lz.sig
          gpg --verify guile-2.2.0-pack-x86_64-linux-gnu.tar.lz.sig
        
        If verification fails, then see above for instructions on how to
        import the appropriate GPG key.  For reference, the pack's sha256sum
        is:
        
          c707b9cf6f97ecca3a4e3e704e62b83f95f1aec28ed1535f5d0a1d36af07a015  
        guile-2.2.0-pack-x86_64-linux-gnu.tar.lz
        
        Then in your root directory -- yes! -- do:
        
          cd /
          sudo tar xvf path/to/guile-2.2.0-pack-x86_64-linux-gnu.tar.lz
        
        This tarball will extract some paths into /gnu/store and also add a
        /opt/guile-2.2.0 symlink.  To run Guile, just invoke:
        
          /opt/guile-2.2.0/bin/guile
        
        Voilà!

~~~
vog
Technical question: What are .lz files? Is this LZMA compression? If so, why
not using the more popular .xz format?

~~~
iso-8859-1
Here's why:
[http://www.nongnu.org/lzip/xz_inadequate.html](http://www.nongnu.org/lzip/xz_inadequate.html)

tl;dr: Because apparently some people believe that not only can they afford to
exclude some users by avoiding zip's, but they must also bike-shed some more.

~~~
__s
That seems like a well thought out article

------
didibus
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?

~~~
amirouche
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](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...](http://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi#n2392)

8) Guile has a lot of supporters cf.
[https://lists.gnu.org/mailman/listinfo/guile-
user](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/](http://guildhall.hypermove.net/) and
[http://sph.mn/content/3e73](http://sph.mn/content/3e73)

~~~
microtherion
> 0) Guile is a GNU project

Honest question: How does that help nowadays? Certainly in the early 90s,
browsing the GNU ftp site was terrific for discovery, and in the 80s, GNU
tapes were even more powerful, but nowadays, GNU seems to be irrelevant for
discovery. I can't think of a single software project in the last 20 years
that I've discovered through its GNU association. Similarly, GNU used to be
important as an infrastructure provider for open source software, but nowadays
is one hosting option among many, and not a particularly attractive one.

GNU has never helped much in developing software, the individual projects
always stood and fell with their maintainers. So it seems to me that nowadays
people put their projects under the GNU umbrella mainly because they buy into
a particular worldview of how software should be licensed.

~~~
Fice
I'm not a participant in the GNU project, but, as I see it, the most important
thing about GNU is that they actually have ethics and culture, and that's what
keeps the project relevant for decades. They hold to their principles and are
able to follow their own way without succumbing to pop culture of the modern
IT.

So yes, being part of the GNU project is probably more of a cultural thing
than an immediate practical advantage.

~~~
Fice
On the other hand, the GNU project tries to build a coherent operating system,
which means that Guile, being part of GNU, is the preferred choice of the
extension language for other GNU projects. This makes it very likely for Guile
to stay relevant for a long time.

------
hisham_hm
Congratulations to the Guile team for the release! They're great people, and
the Lua community is happy for having shared a devroom at FOSDEM with them for
two years in a row.

------
3legcat
Interesting talk on Guile 2.2:

Guile 2.2 performance notes (FOSDEM 2016)
[https://www.youtube.com/watch?v=fU4Tly29Tps](https://www.youtube.com/watch?v=fU4Tly29Tps)

------
stonewhite
Anyone tried GuileEmacs with this version and noticed any differences?

~~~
davexunit
IIRC there is still some unmerged elisp implementation code out there that
improves certain things, but performance is still bad because things are not
yet optimized.

------
bitwize
Congrats to the Guile team. Remember -- Guile goes with everything.

------
calebm
It seems that guile and lua have similar goals (one of the largest being to
function as an extension language). Anyone have practical pros/cons between
them?

~~~
amirouche
read
[https://news.ycombinator.com/item?id=13888550](https://news.ycombinator.com/item?id=13888550)

------
hackbinary
How does Guile compare to Racket?

~~~
amirouche
AFAIK+AFAIU Racket does have some specific kind of macros (ported to Guile but
not in Guile distribution proper), There is guile-log that has no equivalent
in Racket. Both support multiple language frontends but Racket seems to have
more languages and in general Racket community seems bigger.

------
_pmf_
Any word about Windows support?

~~~
AlexeyBrin
If you are using Windows 10, it should work under WSL (Windows System for
Linux).

------
nerdponx
How does this stack up against all the other popular Lisp variants out there?

~~~
ArneBab
For Schemes, see [http://ecraven.github.io/r7rs-
benchmarks/benchmark.html](http://ecraven.github.io/r7rs-
benchmarks/benchmark.html) — my takeaway:

\- Performance: Guile 2.2.0 is halfways between the medium-speed Schemes and
the high-performance Schemes. On par with Larceny, MIT, chicken and bigloo
(and racket IIRC, but that’s missing in the benchmarks right now).

\- Compatibility: Guile 2.2.0 is among the 10 most complete r7rs Schemes,
missing only circular lists (the other failed task succeeds when allowing a
longer task time).

~~~
Fice
Notably, they were able to achieve this performance with bytecode interpreter.
Unlike other mentioned Scheme implementations, Guile does not use a native
compiler (neither JIT nor AOT).

------
andrewvijay
Why are those brackets there in the syntax? What's the need? It looks hard to
read when the programs are bigger. Is there any super advantage to it?

~~~
ArneBab
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 realized, for example, in wisp — a language frontend for Guile:
[http://www.draketo.de/english/wisp](http://www.draketo.de/english/wisp)

It’s a full Scheme, but without the parentheses (behind the scenes it simply
infers the parentheses, adds them and hands the result to the regular Scheme
frontend in Guile).

Wisp is also standardized as Scheme Request For Implementation 119:
[https://srfi.schemers.org/srfi-119/srfi-119.html](https://srfi.schemers.org/srfi-119/srfi-119.html)

    
    
        display "Hello World!" ↦ (display "Hello World!")
    

In short: I think this question is justified. But there are many people who
start preferring parentheses when they get over the initial readability
barrier.

~~~
branchly2
> 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 your source code programatically? It's always assumed that the
reader implicitly knows why this is a good and important thing. Perhaps a
practical example showing

(A) how this would work,

(B) what the benefit is, and

(C) how the added work in reasoning is worth that benefit.

Note: I personally like the parentheses, as they group everything together so
simply.

~~~
davexunit
>Could you please give an example of why you'd want to change your source code
programatically?

To create new syntax and be your own language designer. This is what macro
systems allow for. Here's a very contrived and simple example. Guile comes
with no equivalent of the `++` operator that we know from C, C++, etc. So in
the event that we have some imperative code that is mutating a counter, we'd
have to write something like this:

    
    
        (define counter 0)
        ;; do some stuff...
        (set! counter (+ counter 1))
    

Quite a lot more typing! It would be especially annoying if we had many such
counters. Normally, when we want to factorize code, we'd write a function, but
there's a problem: We can't write a function that mutates any given variable.
So, this wouldn't work:

    
    
        (define (++ n) (set! n (+ n 1)))
        (define counter 0)
        (++ counter)
    

This is just mutating a local variable `n`, nothing happens to the variable
`counter`, it's still 0. So what do we do? Instead of a function abstraction,
we'll use a syntactic abstraction instead. Here is a macro that does what we
want:

    
    
        (define-syntax-rule (++ var) (set! var (+ var 1)))
        (define counter-a 0)
        (define counter-b 0)
        (++ counter-a)
        (++ counter-b)
        (++ counter-a)
    

Now `counter-a` is 2 and `counter-b` is 1. The `++` macro is a program that
writes programs. It takes `(++ counter-a)` and _expands_ it into the code
`(set! counter-a (+ counter-a 1))`.

The reason these syntactic abstractions are so easy to make is because of the
homoiconic Lisp syntax. I hope this has made sense and is helpful. Moving on
from this simple example, we can create entirely new languages that are
embedded in Scheme if we wanted to, adding things that are too specific to a
problem domain to ever be in the standard language's syntax but very useful
for the problem we are trying to solve.

~~~
naters
Is the last line in your failed function example supposed to read:

    
    
        (++ counter)
    
    ?

~~~
davexunit
Yup, sorry. Fixed.

