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)
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.
R5RS supports reader macros? Which would be 1998, and I guess only 28 years ago.
That's why SRFI-49 and its descendants were a possibility. Wisp, JavaScript, brainfuck, etc. implementations all exist because the tools exist in the language.
The less-eval-friendly thing is R5RS only requires two possible "environment specifiers" (2nd arg to eval), returned by SCHEME-REPORT-ENVIRONMENT and NULL-ENVIRONMENT, with no special form or procedure to get the current lexical environment; and R4RS (I just checked) does not specify eval. There's pretty much no manipulation of environments in the standard; the best is something like
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!
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.
I am currently looking into simple options for using Scheme as a scripting language in a game written in C. So far, s7 made a good impression for embedding it, but I am also not that far into evaluating the actual performance. I looked a bit at Chicken, and it seemed possible to embed, but too complicated for my purposes.
By the way, what do you use to postprocess your DVDs? My experience is that DVDs had awful quality and got interlaced unless using a good player (like cyberlink powerdvd) which was always improving with the video greatly and deinterlacing it?
Just to run with the joke - one project I worked on was a CPython extension. We used Chicken to build out our library to do some rather hacky things and bring async/await to Python before it supported it.
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.
I wrote the initial support for chicken some 11 years ago; it wasn't _great_, but I see that Jao and others have worked on it some since then. Glad to see it's working well!
In many benchmarks, Racket is significantly faster than many other Scheme implementations, including Chicken: https://ecraven.github.io/r7rs-benchmarks/ This is because it is now based on Chez.
Racket may be significant faster than many, esp since transitioning to Chez, but its still very hard/problematic to compile to a binary, and if wrapped into a binary still very bloated in size.
FWIW: I enjoy working with Gambit, especially since it can compile to C and standalone binaries and also scores even higher than Racket.
Well, SBCL can just use sources just fine. On Guile not being fast enough, it got a JIT since version 3 and it can be pretty fast. It must be, you know, because if not Guix would be even slower.
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
53 comments
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.
But then Scheme was always less EVAL-friendly of the lisps
That's why SRFI-49 and its descendants were a possibility. Wisp, JavaScript, brainfuck, etc. implementations all exist because the tools exist in the language.
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!
It is being used by many projects for this purpose: GNU Cash, Lilypond, GNU Guix... I don't know about games, however.
sdl is in the package manager, making it fairly easy to hook into, and "standard". From there its about the same as anything else.
Because I was cross-compiling, I compiled to C and had a... Somewhat complicated Makefile for building Linux, Windows, Android binaries all at once.
Debugging Android made me give up, in the end. The platform, not the tools I had, was the pain point.
Congratulations to the team, Chicken Scheme is a little gem!
The generated C is reasonably portable, so you can run Scheme programs on systems that “don’t run Scheme”.
[1] https://wiki.call-cc.org/eggs
And we did call it basilisk.
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.
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".
It is certainly not compact, though.
[0] https://news.ycombinator.com/item?id=49252127
[1] https://wiki.call-cc.org/eggref/6/crunch
FWIW: I enjoy working with Gambit, especially since it can compile to C and standalone binaries and also scores even higher than Racket.