Live data from Hacker News

Lisp Flavoured Erlang

lfe.io

41–46 of 46 posts

Re: Lisp Flavoured Erlang

#41
post #35
post #20

As a Clojure fan, I tried using this, but I got the impression it has learned next to nothing from Clojure, so I ended up going with Elixir instead. Particularly: - No data structure literals (?) - (except e.g., '(1 2 3) for lists) - Manual module exports, instead of just having 2 versions of def - Other small syntactic annoyances, like plain parens everywhere, instead of brackets in some cases like Clojure, and atom…

LFE does have data structure literals for some of the main data types in Erlang. You have #() for tuples, #M() for maps, and #B() for binary syntax. Clojure additionally has syntax for vector literals, but vectors don't seem to be used very often in Erlang, though there is an Erlang module for dynamic arrays which is accessible in LFE. If you felt so inclined, I believe you could extend the LFE reader to add syntax f…

Great to hear that the map literal is there.

Completely agree it boils down to personal preference.

Re: Lisp Flavoured Erlang

#42
post #32
post #20

As a Clojure fan, I tried using this, but I got the impression it has learned next to nothing from Clojure, so I ended up going with Elixir instead. Particularly: - No data structure literals (?) - (except e.g., '(1 2 3) for lists) - Manual module exports, instead of just having 2 versions of def - Other small syntactic annoyances, like plain parens everywhere, instead of brackets in some cases like Clojure, and atom…

There is also Joxa, a somewhat Clojure-inspired Lisp on the BEAM VM: http://joxa.org/ Note that other languages on BEAM are much more "first-class" than other languages on the JVM, meaning interoperability is usually a lot easier.

Joxa is kind of dead (sadly).

Re: Lisp Flavoured Erlang

#43
post #20

As a Clojure fan, I tried using this, but I got the impression it has learned next to nothing from Clojure, so I ended up going with Elixir instead. Particularly: - No data structure literals (?) - (except e.g., '(1 2 3) for lists) - Manual module exports, instead of just having 2 versions of def - Other small syntactic annoyances, like plain parens everywhere, instead of brackets in some cases like Clojure, and atom…

> but I got the impression it has learned next to nothing from Clojure

I think that's a feature, since Clojure basically has no Lisp compatibility at all. No prior Lisp code runs in Clojure as it has zero backwards compatibility. Clojure has randomly renamed concepts which were known in Lisp already or removed them. Lists are no longer lists, ATOM means something entirely different, etc etc.

Though the compatibility of LFE with other dialects isn't that great in general:

http://lfex.github.io/hyperpolyglot/

Re: Lisp Flavoured Erlang

#44
post #27

Earlier quoted context omitted.

I am a fan of clojure. I'm interested in LFE, but I've been focussing on learning Haskell lately, and don't want to switch gears yet. The big thing that I miss in clojure are the data structures, and the ease of use of those data structures. Specifically vectors and maps. These exist all over the place, but no where (in my experience) are they as pain-free as clojure. That combined with their immutability (yet easy t…

> Specifically vectors and maps. These exist all over the place, but no where (in my experience) are they as pain-free as clojure. You don't use vectors very much on the BEAM in general, so I wouldn't consider this very important. Maps are more popular, but have a complicated relationship with records and records have, due to historical reasons, not seen much light on the BEAM in general until lately. Tuples, which y…

Adding this correction:

"Maps are more popular, but have a complicated relationship with records and maps have, due to historical reasons, not seen much light on the BEAM in general until lately."

The correction is that maps are the rarer thing, whereas records are more common, due to their lightweight implementation (tuples).

Re: Lisp Flavoured Erlang

#45
post #12

Earlier quoted context omitted.

Erlang Copied Scala's Actors & Erlang's VM is almost a Clone of the JVM - Apr 01, 2011 Erlang was released in 1986, Java in 1995, and Scala in 2004. I wouldn't be surprised if LFE were older than Scala.

According to Wikipedia, work on BEAM started in 1992. Still earlier than Java. LFE appeared in 2008, so it's newer than Scala.

Erlang was released into the 'wild' in 1988, but it had a Prolog-based VM, or JAM, Joe's Abstract Machine before the BEAM.[0]

The BEAM VM was being worked on in 1992 a year after work on Java in 1991.

[0] http://erlang.org/faq/implementations.html

Re: Lisp Flavoured Erlang

#46
post #45
post #12

Earlier quoted context omitted.

According to Wikipedia, work on BEAM started in 1992. Still earlier than Java. LFE appeared in 2008, so it's newer than Scala.

Erlang was released into the 'wild' in 1988, but it had a Prolog-based VM, or JAM, Joe's Abstract Machine before the BEAM.[0] The BEAM VM was being worked on in 1992 a year after work on Java in 1991. [0] http://erlang.org/faq/implementations.html

> The BEAM VM was being worked on in 1992 a year after work on Java in 1991.

You're right. What I meant by "still earlier than Java" is "still earlier than first public Java version", so there was no possibility to borrow anything.

Post reply on HN