
Chicken Scheme - jrajav
http://www.call-cc.org/
======
thecombjelly
I would highly recommend chicken scheme for most projects. It isn't as mature
as other ecosystems, but it is getting there fast and is already quite mature
and practical. I've used it to build multiple web apps/sites.[0][1]

Learn more about the features it provides: <http://wiki.call-
cc.org/man/4/Getting%20started>

An index of the many libs it supports: <http://wiki.call-cc.org/chicken-
projects/egg-index-4.html>

Why another lisp? [http://wiki.call-cc.org/man/4/faq#why-yet-another-scheme-
imp...](http://wiki.call-cc.org/man/4/faq#why-yet-another-scheme-
implementation)

Getting good performance: <https://news.ycombinator.com/item?id=5381472>

[0] <http://thintz.com?hn=t> [1] <https://a.keeptherecords.com/demo>

------
tsewlliw
The absolute most interesting thing about Chicken Scheme is the way it does
allocations and garbage collection. I've wanted for a long time to make the
time to add a always-on cpu and memory profiler to Chicken Scheme that just
tallys the "return" addresses during the gc, meaning at each cg cycle you have
a pretty darn good tracing profiler, and keeps the "return" addresses in cells
when they are moved off stack, so at any moment you can blame your memory
usage on particular code. Clearly you _could_ do this sort of thing with a lot
of runtimes, but Chicken's design really lends itself to it.

~~~
pmelendez
It really does. This dissertation explores the differences with other
implemantations [PDF] <http://www.cs.indiana.edu/~dyb/papers/3imp.pdf>

~~~
tsewlliw
I'm totally going to read that.

Also, I'm really interested in the debug-ability of Chicken. Instead of a
stacktrace, which sort of captures "where you're going", a stacktrace in
Chicken captures "how you got here", which in conjunction with using immutable
data structures would make the most absolutely amazing blob of data to be sent
back by a customer - you could potentially restart execution __with their data
__and step thru.

------
profquail
The Chicken website has some good information for programmers coming from
other languages:

Chicken for Ruby programmers: <http://wiki.call-cc.org/chicken-for-ruby-
programmers>

Chicken for Python programmers: <http://wiki.call-cc.org/chicken-for-python-
programmers>

Chicken for PHP programmers: <http://wiki.call-cc.org/chicken-for-php-
programmers>

Chicken for C programmers: <http://wiki.call-cc.org/language-comparison>

------
tehwalrus
What's the difference between Chicken and Gambit[1]? I've been reading
about/playing with the latter for a few weeks, because of its interop with C
(and therefore potential for integration with other C-friendly code, which is
why there is an iPhone app that runs the repl.) My interest is that I'd like
to write an application core in Scheme, and then write a GUI for iPhone, OS X,
Linux and Windows, and I figured Gambit was best for this.

If I should be playing with Chicken instead, tell me why! :)

[1] <http://gambitscheme.org/wiki/index.php/Main_Page>

~~~
sea6ear
My sense from looking at this same question before (although not doing
anything, so this is just impression not experience) is that Gambit is being
used more for embedded uses like what you are describing.

I've been interested in Gambit because it seems to allow fairly direct
intermixing of Scheme and C code. I don't recall seeing Chicken being able to
mix the two in the same file.

Chicken seems to have more libraries available and might be better for use
doing things like Unix scripting or system tasks.

By the way, if you are interested in Gambit, and are on Debian/Ubuntu, I would
suggest building Gambit from source rather than using the gambc package in the
repo. It looks like that package is very out of date at this point. (It's
actually been orphaned in Debian and I've been considering adopting it to
bring it up to date.)

~~~
outworlder
> I've been interested in Gambit because it seems to allow fairly direct
> intermixing of Scheme and C code. I don't recall seeing Chicken being able
> to mix the two in the same file.

Actually, it can. Just use a 'foreign-lambda' to embed your C code as a
string, if that's what you want.

In fact, Chicken and Gambit's FFI are so similar that I managed to use an
OpenGLES FFI from Gambit on Chicken with just a couple of macros to convert
between them.

------
melling
It's nice that Scheme garners some attention on HN. It's more useful, however,
when someone explains how they used it to build a business. Also, there are
lots of Schemes and Lisps. Where does Chicken fit as far as libraries and
support? Racket is the Scheme that I hear the most about.

<http://en.wikipedia.org/wiki/Racket_(programming_language)>

Are these compatible?

~~~
thecombjelly
I have built numerous businesses and websites with chicken scheme. It rocks.

The largest one is a basic CRM for a small niche. It runs super fast and
development was a breeze. I run it compiled with a number of optimizations
enabled.[0]

My personal website is also built in chicken scheme and runs fast even though
it is running in interpreted mode.[1]

[0] <https://a.keeptherecords.com/demo>, source code:
<https://github.com/ThomasHintz/keep-the-records>

[1] <http://thintz.com?hn=t>

------
gbaygon
I'm considering a lisp dialect for a personal project (REST Api w/sqlite
embedded in an ARM device running linux).

I'm evaluating racket, clojure, even IronScheme over mono.

Do you recommend using Chicken Scheme, what are his advantages/disadvantages
over the other languages mentioned earlier?

~~~
kyllo
I've never used Chicken Scheme (only Racket), but I've read a few articles
about it and the advantages seem to be:

-Compiles to C, so it's highly portable and you get the performance optimization benefits of whichever C compiler you're using

-Lots of libraries

-Good packaging system, with packages that are cutely referred to as "eggs" (similar to Ruby's "gems" system)

Racket is great too, though, and DrRacket is an excellent IDE with minimal
install/configuration difficulty. It just works.

I'm not really sure what tools exist for Chicken Scheme. With Clojure, you're
probably going to need to configure emacs or another text editor for syntax
highlighting and REPL. I write Clojure in Sublime Text 2 with SublimeREPL but
that requires some config and isn't technically free. There are Eclipse and
NetBeans plugins, but I dislike Java IDEs for their enormous memory footprint.

~~~
emidln
I write for Chicken Scheme inside vim and tmux with some minor plumbing to
send my selections/buffers to evaluate in another tmux pane that contains my
repl.

This is basically the same thing you do for every other language when using
vim/tmux.

Feel free to replace vim/tmux with $EDITOR/$TERMINALMUXER of your choice here,
outside of emacs, which kinda does this already as long as you don't care
about updating your repl buffer at the same time as you are editing code (say,
whatever code you send doesn't return immediately because it's doing something
time-consuming). vim+conque has this same issue as emacs, making
$EDITOR/$TERMINALMUXER the only alternative if you want to use the repl to
hack/dispatch big jobs.

~~~
aeosynth
I use <https://github.com/benmills/vimux> for vim/tmux plumbing.

------
paines
For anyone who still has a GP2X lying around: I uploaded a Puyopuyo clone to
<http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?0,0,0,0,25,2919> a week ago,
written in Chicken + SDL. My first ever Scheme/Lisp project...

------
peatmoss
Chicken, together with its eggs system has always struck me as very
professional feeling. Plus, bind (dead simple ffi for C stuff) seems like a
huge win where C is required.

That all said, I've become quite enamored of Clojure's various data types.
Does anyone know if there has been an attempt to create things like immutable
maps, vectors, and whatnot for scheme (esp Chicken Scheme)? I found a blog
post a while back that talks about FSet for common lisp, but have failed to
find an analogue for scheme. [http://blog.thezerobit.com/2012/07/21/immutable-
persistent-d...](http://blog.thezerobit.com/2012/07/21/immutable-persistent-
data-structures-in-common-lisp.html)

~~~
ZaneA
There is at least an immutable maps implementation here, <http://wiki.call-
cc.org/eggref/4/persistent-hash-map>

Not too sure about the others though.

~~~
peatmoss
I guess maps is the structure I'm most keen on. Thanks!

------
klrr
Its community is great.

~~~
elrzn
I second this. Chicken's community is the friendliest and least toxic I can
think of.

------
sigzero
What about it?

~~~
muuh-gnu
Advertisment.

------
jones7
"The disadvantage is that execution of Scheme code on multiple processor cores
is not available."

So you're throwing away most of the computing power of a modern CPU. But other
than that it's totally awesome I'm sure, after all who needs computing power.

Sounds more like a toy to me.

~~~
ZaneA
In some ways it just encourages a different style of development. There is
more emphasis on forking processes and communicating between them, which some
may consider to be a better practice anyway. It all depends on your domain. On
the other hand, there's nothing stopping you from binding to pthreads and
seeing how far you get with that (and from a quick search it appears that
people have had some success with it, especially if you're calling into a lot
of C libraries).

------
miloshadzic
Every time Racket or some other Scheme-like language is on HN I wonder why
they aren't used more. It's probably just an illusion of the bubble I live in.

~~~
whatshisface
Languages are a lot like startups, they take forever to gain traction.

------
pmelendez
Chicken scheme had been around for 12 years... How did this make the front
page?

~~~
profquail
Only brand-new links are allowed on the front page?

~~~
pmelendez
No, but it is hardly _news_ if it had been around for more than a decade. If
the poster finds that there is something new about it, a link to the specific
item would be more helpful.

For instance:

<https://news.ycombinator.com/item?id=2241015>

<https://news.ycombinator.com/item?id=3440777>

<https://news.ycombinator.com/item?id=3297071>

~~~
scott_s
I find it much more tiresome when people complain that something is not
_news_.

~~~
pmelendez
I am not complaining about the link not being news. I am complaining about the
lack of explanation about why it is relevant today.

This is similar to if somebody would post stuff like:

Mono C# compiler [<http://www.mono-project.com/CSharp_Compiler>]

Pypy [<http://pypy.org/>]

Those are interesting implementations for well known languages that aren't
new. If I post them without explanation of why I found them interesting and
relevant now, then I would mislead people and they might conclude that it is
advertising.

Am I alone with this?

~~~
billsix
I agree with you.

~~~
pmelendez
Thanks :)

