Hacker News new | past | comments | ask | show | jobs | submit login
Joxa – A Modern Lisp for the Erlang VM (joxa.org)
112 points by giancarlostoro on June 5, 2015 | hide | past | favorite | 21 comments



Interesting - can anyone provide an in-depth comparison to LFE [1]? From a quick look, it looks like Joxa is more similar to Clojure than it is to Common Lisp, whereas LFE takes the opposite appoach.

[1] https://github.com/rvirding/lfe


Its mostly about approach. LFE (literally Lisp Flavored Erlang) is Erlang with an S-expression based syntax. Joxa is a self contained Lisp that happens to run on the Erlang VM.

Those are the core differences. Joxa also has some very clear and distinct goals of its own. Those goals are not really relevant to this discussion though.


Not quite, LFE is a self-contained Lisp system with all the things you would expect a lisp system to have. It has been designed to run on the Erlang/OTP system and to efficiently use all the features of that system and its VM. This means that LFE has a clean interface to Erlang/OTP so it can easily be used together with applications written in Erlang. Mixing components written in Erlang and in LFE to write a larger application is straight-forward and painless.

If I could rename it then a better name would be EFL (Erlang Flavoured Lisp), which is what it is. The "Flavoured" in the name comes from that I had earlier implemented a Lisp machines flavors system on another lisp, with an english spelling thrown in as a joke.


Oh, wow -- that's a great tidbit! I hadn't heard that before, Robert (one for the LFE Lore files ...)


If I recall correctly Joxa is Lisp-1 and LFE is a Lisp-2.


This is true as well.


The obvious difference is that LFE is maintained by Robert Virding (one of the original creators of Erlang itself). I'd imagine this would translate to LFE being more "Erlangy", but this assumption comes from a lack of experience with either.


So a couple of comments here :-) Robert is actually an old-school Lisper (and a hard-core one, too). LFE has been inspired not only by CL but also Maclisp. The point being that, yeah, he's an Erlang guy, but he was first a Lisp guy (and has always remained so).

Second comment: LFE is a Lisp, but it's a Lisp whose first and foremost goal was to allow one to build fully Erlang (and OTP)-compatible systems in Lisp. Clojure's Lisp has a Java flavour; LFE's Lisp has an Erlang flavour. They are both very real and compelling Lisps :-)


Thanks for the clarifications.


I will see if I can get Eric (the creator) to reply.


I really like the idea of both Joxa and LFE (a Lisp on the Erlang VM!), but the main factor keeping me from using them for general purpose programming is the lack of "modern" collections. I would love to see them implement persistent data structures à la Clojure, with a unified interface for vectors, sets, etc. I know the Joxa stance is "make a good macro system and let users implement these" but as a (new) user, the task looks too intimidating.

The Elixir approach looks great, but it's unfortunately not a Lisp.


Indeed, it would be nice to have an EFL: Elixir Flavoured Lisp. (Lazy) Streams and clojure'ish protocols (lispy virtual methods) makes a big difference in abstraction. Erlang as it is, supports ADTs but not object abstraction (i.e. different kinds of set implementations with different implementation/representation) See http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf for discussion.


> Joxa is a small semantically clean, functional lisp.

What does "semantically clean" mean?


I read that to mean that the semantics don't have edge or ad-hoc cases.


Thats exactly what it means. Its has a very simple syntax that is a nice mix of the semantics of Core Erlang laid on very straightforward and minimal lisp. The goal was to build up more semantically complex structures in the language itself. In effect, Joxa is designed as a platform for language design more then a language in and of itself. Now I just need to find the time to get back to it.


If you replace "Joxa" with "LFE" here you would get a good description of LFE.


Such as?


Yes, 'as'[0] in Python is a great example. Idk how establishing an alias could mean deleting anything other than the alias but interacting with the global/nonlocal keyword it can lead to some weird interactions[1].

Also in Python, True and False are a blessed instances of 1 and 0 with their logical operators overidden. So True + True == 2, but True is 1 => False.

You can also search #watjs for more example of 'unclean' semantics.

[0]: https://docs.python.org/3.4/reference/compound_stmts.html#ex... [1]: https://bugs.python.org/issue24321#msg244357


True == 1 => True. Also, it makes heaps of sense to have the identity `1 if boolean else 0` baked into the language.


While I agree on the pragmatic value of it, and I think this is a pretty minor blemish in the semantics of Python.

You can easily have booleans as a completely different type, and yet avoid stuff like: `1 if boolean else 0`...

In Haskell, for example, `True + True` and `True == 1` are compile errors (unless you defined wacky Num instances), and the boolean/int "identity" is simply handled by `fromEnum` (which works on any Enum, not only Bool)

    1 == fromEnum True
    0 == fromEnum False


Is the link in the top-right broken? http://i.imgur.com/U08DB9p.png




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: