Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Fennel is really cool, and the fact that it builds on Lua—an already-popular language—is a huge win; Fennel gets access to the entire Lua ecosystem.

Importantly, Lua is pretty easy to embed in native applications. I haven’t found a Lisp or Scheme as easily-embeddable as Lua(+Fennel).

It’s also a good drop-in replacement for Lua. I write my Hammerspoon config in Fennel, and hopefully my Neovim config soon as well.



Chicken Scheme is embedded in C programs with one line.

https://wiki.call-cc.org/embedding

I've even embedded it in Objective-C programs running in iOS (could make OpenGLES calls in the repl and everything).

Full API spec:

https://wiki.call-cc.org/man/5/Embedding

FFI example:

https://wiki.call-cc.org/An%20extended%20FFI%20example

https://www.more-magic.net/posts/scheme-c-integration.html


Thanks for sharing this, I've bookmarked it to check out more later, but from the links you provided, it looks like Chicken Scheme is pretty friendly to use.


I used Chicken for several years in the past and looking at it again recently. Worked great under FreeBSD, Linux, has a large set of well-maintained extensions and has (mostly) excellent documentation. And IME Chicken developers were always willing to answer questions, easily reached on ICQ/mailing lists. That's probably still the case.


Chibi scheme is easily embeddable. Guile is a different beast to manage, but then you get a lot more power and speed. Not luaJIT speed, of course, but a lot faster than vanilla lua, and with proper threads as a bonus.

The others I haven't tried embedding, but I hear racket is really no fun to embed,but things might have changed with the chez transition.


Chibi Scheme, interesting. Also beautiful. Thank you.

Racket CS is also quite fast, comparable to Lua or faster (for numeric ops). It also uses rational numbers which makes it useful for exact numeric operations.


As a fellow hammerspoon user who is not smitten with Lua’s syntax, I would really appreciate seeing your config :-)


It’s pretty minimal right now as I’m in the process of porting over a larger config. Here’s what I have, although you might find it might be a bit underwhelming:

https://github.com/jonpalmisc/dotfiles/blob/master/hammerspo...


s7 Scheme is as easy to embed as Lua, you might like it. I used it for Scheme for Max and Scheme for Pd and it's been wonderful - it was the easiest to embed of a bunch of lisps I tried. It's not well known because it came out of the computer music world, but it has also been used in games and other media tools.

Janet is surprisingly similar to s7 in many ways. I've been keeping my eyes on it as well, I sure hope it continues! Schemes are so flexible that moving from one to another is just not that hard.


I haven't heard of S7 before—it looks like a great project as well. Thanks!


There's also Spacehammer[1] which is all written in Fennel. Having to write Lua would have kept me from Hammerspoon.

[1]: https://github.com/agzam/spacehammer




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: