Chicken Scheme 6.0

(code.call-cc.org)

262 points | by eatonphil 16 hours ago

13 comments

  • DASD 15 hours ago
    Folks may also be interested that this version, 6.0, supports Crunch(although Crunch itself has not been declared a 1.0 status, currently @ .993), which is a compiler for a statically typed subset of Scheme R7RS. (https://wiki.call-cc.org/eggref/6/crunch)
    • valorzard 13 hours ago
      CRUNCH is really cool, I helped make it work better on Windows (although it requires a bit of setup)
  • orsenthil 14 hours ago
    For an introduction:

    CHICKEN is a compiler that translates Scheme source files into C, which in turn can be fed to a C compiler to generate a standalone executable. An interpreter is also available and can be used as a scripting environment or for testing programs before compilation.

    • rtpg 10 hours ago
      does this mean that you can't do `eval`-like things in "production" systems?
      • p_l 9 hours ago
        IIRC not compiled (you can include the interpreter).

        But then Scheme was always less EVAL-friendly of the lisps

        • shakna 7 hours ago
          I'm not seeing the less friendly... Eval, and sandboxing eval, are builtin features of the Scheme standard.
          • bandrami 5 hours ago
            It has eval but it lacks reader macros (or at least it did thirty years ago) which is what makes eval useful on lisp2 systems.
  • trescenzi 14 hours ago
    I started playing with Chicken over the weekend because I was looking for a scheme that you could build binaries of and that had a lively ecosystem. I've really enjoyed it. So far I've mostly played with web stuff. Built a wrapper around makemkvcon for ripping some dvds I've been meaning to rip that'll do a little bit of automatic naming of output using the tv db.

    I was slightly worried that I'd start using v5 and then v6 would come out but it looked like they'd been working on it for a while so I figured I'd have some time on v5. Turns out I was wrong!

    • SomeHacker44 3 hours ago
      How would it be for a 2D game?
      • trescenzi 1 hour ago
        I’ve thought a tiny bit about this. I think I’d lean towards Guile for a game because of Hoot, wasm compiler, and Chickadee, little game library. But I’m remarkably unqualified to have a real opinion since I’ve used Chicken for 72 hours now.
  • Myzura 1 hour ago
    Happy to see CHICKEN 6.0 out. Moving to full R7RS and UTF-8 strings was long overdue. The change from blobs to bytevectors and the process-object API look particularly clean. Anyone who has already started porting code — any major gotchas so far?
  • sabot90260 1 hour ago
    Native UTF-8 strings are the part I care about most here. The old blob-versus-string juggling was the first thing that bit me porting code.
  • ziotom78 14 hours ago
    I was eagerly waiting for this release, which brings full Unicode support.

    Congratulations to the team, Chicken Scheme is a little gem!

  • rmunn 13 hours ago
    For those who use Chicken Scheme: what made you pick it over other Lisps? What are some things it does particularly well?
    • hellcow 11 hours ago
      The eggs are great. For instance I can be up and running building an SDL2 game or make a webserver quickly.

      It has good emacs support with geiser-chicken.

      Because it compiles down to C the FFI provides a lot of nice ergonomics beyond what I get with Chez Scheme.

      Error messages are actually useful with a stacktrace. Can't overstate this.

      It supports optional type definitions which reduces the number of tests I need.

      The docs are adequate, though I frequently add "MIT scheme" to my search queries. I wasn't able to get chicken-doc setup in NixOS, and the docs website has gone down on me a bunch lately. I wish Chicken had complete documentation available including its eggs in an offline format, like a PDF.

      • anta40 6 hours ago
        What about Gambit? Perhaps it's a better, optimizing compiler but the built-in library is rather minimalist?
    • mario-goulart 34 minutes ago
      To me it is the combination of what is listed in https://www.call-cc.org/.
    • whartung 13 hours ago
      The compiler. That’s the gem of the system.

      The generated C is reasonably portable, so you can run Scheme programs on systems that “don’t run Scheme”.

      • ziotom78 12 hours ago
        Absolutely. And eggs too [1]: these are libraries provided by the community, very easy to import and use.

        [1] https://wiki.call-cc.org/eggs

        • rmunn 11 hours ago
          What happens if you try to run Python eggs under Chicken? Do you get Roko's Basilisk? :-)
          • sph 11 hours ago
            Pythons are too cold to hatch Chicken eggs, and viceversa
    • atemerev 6 hours ago
      Self-contained, compact, compiled, fast, ready to use.

      SBCL is not compact and its "image" concept is not universally liked by everyone.

      Guile and Racket are not fast (nor compact).

      Chez Scheme is not "ready to use".

  • Decabytes 12 hours ago
    Why do people use chicken over gambit? Is it due to chicken’s larger ego system and eggs, or is there more?
  • zelphirkalt 6 hours ago
    I only used Chicken for a short time, because of a UTF-8 bug it had/has, but I always liked Chicken's docs. They seem to be written with care and often make things understandable. When I look up Scheme things and don't understand something, sometimes I specifically go for the Chicken Scheme docs, to see if I understand its explanation.
  • danialsams 9 hours ago
    ngl this is a massive update full R7Rs support UTF-8 strings and they finally ditched blobs for bytevectors the closure reuse otpimization sounds interesting too ngl
  • anthk 7 hours ago
    Uhm. I'm divided. Common Lisp it's the weird cousin, bloated at first but in the end you get SBCL, ECL or CCL and almost everything will work the same. With Scheme, you need to instal SRFI's to complete SICP exercises and then there's R5RS and R7RS.

    You have no way to run Hypergiant under Guile. In Common Lisp, tons of packages for QuickLisp/UltraLisp will run on SBCL, CCL and ECL with ease.

    In the end Scheme+Dependencies can be more convoluted than a subset of Common Lisp (you can avoid CLOS if you don't need it for instance).

    • drob518 1 hour ago
      That dynamic was exactly why I moved from Scheme to CL many years ago (full disclosure, Clojure is my daily driver, now). I loved the minimalism of the RxRS documents, but they really only covered the small core of the language, and then all the implementations were completely different when it came to libraries. And those differences always needed to be understood in order to write real-world programs. SRFIs helped, but adoption was spotty. Every multi-implementation language has some of that, but Scheme had more than most. For me, the choices were to use a very full-featured Scheme like Racket (which is great) or go to CL and then use something like SBCL. I went with CL and later jumped to Clojure (which, IMO, is a better, more modern Lisp that fits better with today’s multi-core hardware than either Scheme or CL).
    • hajile 4 hours ago
      Scheme SRFIs make Scheme a much bigger language while also making it painful to use because you have to research which SRFI are implemented in your scheme variant then map those SRFI numbers to what they actually do then you usually need read the raw SRFI because that's the only documentation around.

      R7RS is going on 14 years old and there's still no R7RS-large either. They really need to just take the critical SFRIs, give them names and proper documentation, then call them R7RS-large and move the current work to a future R8RS.

      • anthk 3 hours ago
        Indeed. Scheme it's amazing for embedded (such as s9) and its small size. Also, the SICP it's cool to do with Chicken Scheme and this ~/.csirc (and chicken install srfi-203 and srfi-216):

            (import scheme)
            (import (srfi 203))
            (import (srfi 216))
         
         (define (displaynl x)
          (display x)
          (newline))
         
         (define pi (* 4 (atan 1.0)))
         
        Even if Chicken has Hypergiant to play with 3D objects, Common Lisp has Kandria, Sketch, Kons-9...

        From Scheme, after finishing SICP as an Scheme exercise (and CS course), just jump into Common Lisp, and finish both Gentle Introduction to Symbolic Computation and Paradigms of Artificial Intelligence, where you will implement a micro-Scheme in Common Lisp itself as an exercise.

        SBCL allows you to create working stuff with very few dependencies (uiop and the like from QuickLisp/Ultralisp). With Scheme/Chicken you will get lost in a maze of eggs and SRFI's.

        And, on CS/academics, if you finish SICP both GITC and PAIP on on Common Lisp will be a breeze and it will give you superpowers with these three books.

        • bigfishrunning 1 hour ago
          I guess you mean s7 -- I find s7 scheme fits into a lua shaped hole for scripting larger applications quite well without having to use lua (which is a personal preference). I used s7 scheme for scripting a C program years ago, and moved on to writing programs with chicken scheme.

          I really think in an alternate universe chicken scheme could fit into the python niche, because the eggs feel very "batteries included". Super excited for this release!

    • zelphirkalt 2 hours ago
      However, with Schemes the SRFI implementations usually (?) come with the standard library, so you don't actually "have to install" them. Still gotta know the usual suspects, like SRFI for tests, SRFI for vectors, hash tables, random numbers, etc. if you want your code to be mostly portable to other Schemes.
    • jeandrek 5 hours ago
      I've never really heard of installing SRFIs (could be my ignorance); do you mean importing them? Or is installing SRFI implementations as their own packages really common? (Haven't really tried R7.)

      The anti-R6/R7 folks (or what I've heard) won't see a problem so long as you can use CL to build fancy serious software, which lets Scheme stay small and simple for education. (Of course ideally you'd be able to do any SICP exercise on a Scheme implementation out of the box, though.)

      • anthk 4 hours ago
        For that I use Chicken 5 with trace, srfi-203 and srfi-216.
  • dvduval 15 hours ago
    [flagged]
    • Waterluvian 14 hours ago
      They’re patch notes for a release of some software that I can only assume is used by poultry to plot world domination.
  • personjerry 13 hours ago
    Disappointed to learn this is unrelated to the Chicken chicken chicken https://www.youtube.com/watch?v=yL_-1d9OSdk