Chicken Scheme 5.0 (lists.nongnu.org)
CHICKEN is a compiler for the Scheme programming language. It produces portable and efficient C and supports the R5RS and R7RS (work in progress) standards, and many extensions. More info at https://www.call-cc.org/
A new major version has just been released. See the announcement message here: http://lists.nongnu.org/archive/html/chicken-users/2018-11/msg00006.html
88 comments
[ 3.0 ms ] story [ 152 ms ] threadUnfortunately, it looks like some of the page references are broken for eggs. [0]
[0] http://wiki.call-cc.org/eggref/5/mpi
I've also notified the authors of these eggs.
When I applied for my present job (at a Golang/JS place), the dumb little coding exercise I was asked to do said it could be done in any language. Before thinking about whether or not it would actually be a good idea, I'd opened a new file and started hacking with this at the top:
;; you said any language
;; this is chicken scheme
And it worked! Thank you, chicken.
It turned out that keeping a regular writing schedule with a small group of people is quite hard. Gathering the news and coming up with interesting new content is quite a lot of work. Eventually the releases started to drift further apart because people did not find the time to write the articles anymore. Eventually nobody volunteered to put in the time anymore.
It's unfortunate, but people have busy lives and we're happy we find the time to develop the CHICKEN code itself. So, I don't see a way to restore it unless droves of new volunteers step up.
The FFI is really nice, given that Chicken compiles to C.
The Chicken IRC channel was a lot of help early on.
All in all an enjoyable experience!
[1] https://github.com/sebcat/kylling/blob/master/kylling.scm
I have asked so many stupid questions and they were so helpful. I would go as far as to say that they were an important part of me becoming proficient in scheme. The chicken community is my prime example of welcoming and nice open source communities.
I still use chicken from time to time, but I switched to guile for a project with an embedded scheme. I wrote quite a lot of scheme code and suddenly had a prelude in guile that wasn't so easily ported.
I think I would use chicken more but usually when reaching for scheme it seems to be because I want something embeddable. Even so, extremely excited about this release!
[1]: https://www.more-magic.net/posts/internals-gc.html
You can statically link to LGPL libraries so long as you also provide your program in "object form" so that the user can re-link their program with a different version of guile.
See: https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynami...
https://github.com/JeffBezanson/femtolisp
The complete CHICKEN 5 runtime should be a bit smaller already than the CHICKEN 4 runtime, because we dropped some stuff, but if the runtime is still too large for your needs, you can make a custom build that omits certain components. Here's a small tutorial on how to do that: https://wiki.call-cc.org/generating%20the%20smallest%20possi...
Regarding non-own dog food, http://wiki.call-cc.org/Software lists some projects using CHICKEN.
The ability to natively encode HTML in Scheme syntax was the main reason why I chose Chicken Scheme: LISP is perfect for creating HTML programmatically. However, while using Chicken Scheme, I discovered a few other features that were big timesavers:
(1) The simplicity of its FFI was incredible. It was immediate to link existing C libraries we were using in the Planck project, as Chicken Scheme compiles to C.
(2) Eggs were a joy to use. It was trivial to download and install them, compared to the amount of work needed for the usual C and Fortran libraries needed in our field (Lapack, Blas, HEALPix, etc.)
(3) Several tools were available: documentation generators (I don't remember the name of the one I used, but I remember the good looks of the documents it produced), seamless integration in Emacs, etc.
(4) Developers were super-friendly. I did not need to ask questions very often, but the few times I had to do so, I found them responsive and happy to help.
(5) The fact that the compiler produces an executable made deployment quite easy: once I verified that the necessary dynamic libraries were available, I compiled the code using Chicken Scheme on my laptop and then copied the executable on the server hosting the data to analyze.
Congratulations to the team for this new release!
[1] https://en.wikipedia.org/wiki/Planck_(spacecraft)#Low_Freque...
'printf' has always worked just as fine for this purpose.
Recently I coordinated the development of a similar tool for another experiment, but this time I was managing a team of three. While everybody knew how to program in Python, I was the only one with an adequate understanding of Scheme. So I decided to allow the members to use Python. (This time, however, we produced Markdown reports, which we converted to HTML using Pandoc.)
Most of the other codes I regularly develop for my job do not involve HTML reporting but make heavy use of Python libraries. In this case, I either stick with Python or use Julia.
For graphics, see eggs categorized "graphics" at https://eggs.call-cc.org - The CHICKEN 5 list of graphics eggs is not very long, but for CHICKEN 4 there are quite a few eggs, some of which will probably be ported soonish.
Your best bet is probably doodle: https://wiki.call-cc.org/eggref/4/doodle but feel free to browse the list of other graphics eggs.
https://htdp.org/2018-01-06/
If you really want something like pandas + lisp then you probably need Common Lisp and have to dig for some libraries.
https://docs.julialang.org/en/v1/manual/metaprogramming/inde...
This nice talk mentions a bit on how Julia is (not) a lisp (if I recall correctly):
"Julia: to Lisp or not to Lisp?": https://m.youtube.com/watch?v=dK3zRXhrFZY
This might also be of interest: https://tpapp.github.io/post/common-lisp-to-julia/
As well as (maybe) clasp: https://github.com/clasp-developers/clasp
That language is R. http://adv-r.had.co.nz/Functional-programming.html
I learned Racket (Lisp) and then realized I had so many thing inside of R that I was missing. Hadley Wickham's tidyverse and funtional Advance R book changed everything in my code.
The meta programming facilities in R still look very lispy, and are used to good effect throughout the Tidyverse family of packages.
If I had one wish, it would be to see something like the Tidyverse exist in something still closer to Scheme... like Racket.
I mean, scratch the surface on any of the FFI docs, and you’ll see that SEXPRs are right there lurking barely beneath the surface: http://dirk.eddelbuettel.com/code/rcpp.html
EDIT: and you can, as the parent comment says, do much worse than Hadley’s functional programming guide as an introduction.
Then why the surface? Why can't we just have a lisp with a good data-science library? Scheme seems the easiest of all the programming languages to me. I bet I can teach Scheme (not including advanced FP stuff though) to anybody faster than any other language although I have never used it to code anything serious (because libraries), I actually find it simpler than Python or even VBA. Phenomenally everybody seems so scared by the parentheses but these are not a serious problem given an intelligent IDE with proper outlining and highlighting.
I’d love to see a data science community around Racket in particular. In fact, you can do quite a lot in Racket today, just with not nearly the libraries and tooling as Python or R.
But as a consolation prize, R is pretty Schemey, and has the best collection of libraries for data around. It’s been a dream for years to figure out a way of making use of more of R from Racket, but time and deadlines keep getting in the way.
Personally I really want a language just for cleaning data in Racket first and then tidyverse.
I think it could be the starting point for some data science work in Racket.
Better to hide the LISP'y core underneath a syntax similar to a widely deployed language. Julia was a brilliant example that's getting a lot of uptake vs scientific LISP's as predicted.
[0] https://learnxinyminutes.com/docs/hy/
[1] http://docs.hylang.org/en/stable/quickstart.html
http://paste.call-cc.org/ is awful-based. My home page (http://parenteses.org/mario/) is also in awful, but it's nothing fancy.
It's been ported to CHICKEN 5, by the way: http://wiki.call-cc.org/eggref/5/awful
Congrats on the release!
[1] test.scm
(use srfi-1) (define (test number1 number2) (printf "Sum: ~s" (+ number1 number2))) (test 1 2)
(import (chicken format)) (define (test number1 number2) (printf "Sum: ~s" (+ number1 number2))) (test 1 2)
If you're trying to actually use srfi-1, that's now imported via (import srfi-1). (use...) no longer exists.
I didn’t get all the functionality I wanted built in the time allotted (some of the time was also spent trying to fix up an old Wyse60 serial console that was on the fritz), but I had a blast writing that in Chicken Scheme. I was surprised and enormously entertained that there’s a pretty well-baked Gopher server for Chicken... it supports IPv6 even!
Kudos to the Chicken team. While I like some of the Racket-isms in Racket, Chicken is a delight and has an awesome deployment story.
Gambit is faster on many benchmarks and has multiple backends. This makes it easier to run inside a browser, for example, with the JS backend. It also has better introspective capabilities than CHICKEN, if I remember correctly.
I believe Gambit is currently R5RS only with no plans to implement R7RS, and it has no native module system like CHICKEN does. If I understand correctly, Gerbil adds this to Gambit, but there's also the Black Hole module system. I don't know how compatible those are.
Both have full continuations, tail call optimization and take the standard serious. You can compile stand-alone programs with both, and both can link to C libraries quite easily.
Full disclosure: I'm a CHICKEN developer and my knowledge of Gambit is somewhat limited.
[1] https://extemporelang.github.io
[2] http://shenlanguage.org
I really want this to build as a Windows exe without the need for the Posix stuff, I think?
In addition, such names make the language more approachable for new users. Not only do they have to know that SRFI exist, but they have to look over all of them to see if one exists for what they need.
* Who created it?
* Why didn't them pick one of the other implementations?
* What's the history / background?
Could not find any of the answers to those questions after a few minutes of Googling around, nor in Wikipedia [1].
Closest I got is this page [2] that list "Felix Winkelmann" as the top core contributor. I'm guessing he is the author since the name rings a bell (after dabbling a bit with scheme and comparing implementations, so maybe I read his name somewhere, probably right here at HN).
Regarding the "why", I also think I read somewhere that the idea was to implement scheme using the ideas on "Cheney on the M.T.A." [3] and later the project took off, but I don't know the details... did I just make this up? :-p... damn, really need to improve my note taking process.
1: https://en.wikipedia.org/wiki/CHICKEN_(Scheme_implementation...
2: http://wiki.call-cc.org/maintainers
3: http://wiki.c2.com/?CheneyOnTheMta
EDIT: Found it! I think most I remember about Chicken history I read from these blog posts:
* https://spin.atomicobject.com/2013/05/02/chicken-scheme-part...
* https://spin.atomicobject.com/2013/06/19/chicken-scheme-spoc...
Great!
https://wiki.call-cc.org/chicken-5-roadmap
I wrote a more accessible introduction to CHICKEN 5's new features on my blog, https://www.more-magic.net/posts/chicken-5.html