1. 21
  1.  

  2. 3

    Nice write-up!

    It’s really great to see Guile continue to create a nice community around it. I remember when RMS touted it as the glue language to end all glue languages! Guile would DESTROY Python and Tcl/Tk and…

    But in typical FSF fashion, they created a really nice little Scheme implementation that has some real technical merit.

    What do you use Guile for when you’re not rewriting its innards?

    1. 1

      Nice post and a nice read, but I’ll admit I don’t understand the fascination with re-writing everything. Its very common, and commonly not a problem, for a programming language’s kernel or core or whatever they call it, to not be written in that language. Common Lisp is the first that comes to mind with its kernel written in C. Julia has a large amount of C++ and some scheme thrown in.

      Will rewriting all the C in scheme really benefit Guile?

      1. 6

        Common Lisp is the first that comes to mind with its kernel written in C

        How’s that? Most common lisp implementations are written entirely in common lisp.


        It seems logical for as much as possible of a language to be written in itself. The idea is—the reason we’re working on this language is because we like it and we think it’s a good idea to write programs in it. So what does it mean that we don’t think it’s a good idea to write its own compiler in it?

        1. 1

          I guess I should have been more specific and researched a tad more.

          I was referring to SBCL specifically and it’s their runtime that’s written in C. https://github.com/sbcl/sbcl/tree/master/src/runtime

        2. 4

          Will rewriting all the C in scheme really benefit Guile?

          I think the big win here is less about technical improvements but more just the act of lowering the bus factor and making it more accessible for contributions. Ideally you want to get to the point where anyone who uses Guile can read the source, understand what it’s doing, and contribute fixes.

          On the other hand I’m surprised it took this long; the reader is one of those things that is A) somewhat self-contained and upstream of the rest of the compiler and B) doing work that’s very error-prone and miserable to do in C. It just makes a lot more sense if you’re going to be doing a lot of string processing to do it in a language that actually has strings!

          1. 1

            On the other hand I’m surprised it took this long

            Note that Guile still maintains and will maintain C reader because of bootstrap.

          2. 2

            As the article explains, Guile currently has distinction of suspendable and non-suspendable code, and it is desirable to make more code suspendable. Rewriting C to Scheme makes code suspendable. You can make C code suspendable too, but it’s more difficult.

            1. 1

              As the article explains …

              I read the article. I’m not against the reasoning it lays out, but everything is a cost. For example, I seriously doubt the scheme version of all of that C is going to be as fast. Is the speed differential a worthy trade-off? I’m not arguing it is or isn’t, but I am curious if those kinds of trade-offs have been considered.