
Lisp Flavored Erlang - pmoriarty
http://lfe.io/
======
tokenrove
A big thing is that v0.8 adds the (foo:bar 1 2 3) syntax; I tried using LFE
for a while a few years ago and just found the (: foo bar) syntax too
cumbersome. I think I had meant to hack it into LFE but in the meantime I
discovered that Erlang's native syntax, while perhaps idiosyncratic in some
ways, is pretty nice for daily use.

The big advantage of LFE would be macros, which otherwise have to be done with
parse transforms in vanilla Erlang. (I understand Elixir also has macros, but
sad to say I haven't gotten to dig into it yet.)

Now that I know LFE has the namespace-style syntactic convenience, I'm going
to have to try it again.

------
breckinloggins
A few years ago I wrote a minimal lisp in erlang using pg's paper. I called it
erlisp[1]. I did it in order to learn Erlang while reading the original Seven
Languages in Seven Weeks book.

If you want to learn the basics of a language, I highly recommend writing a
lisp in it using only the Roots of Lisp paper and the target language's
reference guide. It's a fun challenge.

[1] (yes, it's a pun)
[https://github.com/breckinloggins/erlisp](https://github.com/breckinloggins/erlisp)

~~~
oubiwann
That's very cool :-) I think rvirding would approve ;-)

Did you ever check out LFE afterwards. to compare your approach with Robert's?

~~~
rvirding
Yes, implementing languages is fun, implementing lisp doubly so.

------
diginux
Those interested in this may also want to checkout Joxa
([http://joxa.org/](http://joxa.org/)).

~~~
technomancy
I was pretty disappointed when I found LFE's insistence on staying very close
to Erlang's semantics had forced it into implementing a Lisp-2. It's a very
odd mix for FP.

Joxa deviates a bit further from some of Erlang's semantics, but in a way that
allows it to express FP concepts in a much more streamlined way. Really
intriguing design.

~~~
oubiwann
@technomancy, Hey man! Good to see you here ... but not even a _little_ love
for a Lisp-2? ;-)

We've chatted about this before, and I guess I just got used to (funcall ...)
in CL. There's no question, though, that being able to call functions without
that is very clean.

You know, if you squint just right, the name/arity uniqueness in Erlang is a
pretty nice match for a Lisp-2 ;-)

------
MCRed
To be honest, I left FP for a long time after learning lisp, and erlang is
what brought me back.

The erlang syntactic is really quite good. IT's new, yes, it's not lisp, it's
not C, you have to learn a new syntax. Get over yourself, it's not that hard.

And once you learn it, it's nice and consistent and comprehinsible.

But elixir is even better. Elixir brings a lot of great features to erlang,
while retaining interoperability, and one of the things about elixir is its
syntax is much nicer (in my opinion) and it's certainly more accessible to
most people.

Learn elixir.

~~~
girvo
I thought Erlang was quite old?

~~~
ghayes
Erlang dates back to Ericsson's CSLab in 1986. It's explained in good detail
in this thesis by Joe Armstrong[0]. From that paper, the first significant
production use came in 1995 with the Ericsson AXD301 switch.

[0]
[http://www.erlang.org/download/armstrong_thesis_2003.pdf](http://www.erlang.org/download/armstrong_thesis_2003.pdf)

------
chisleu
I know you guys take your FP pretty seriously. The closest I get to FP is
Javascript applications, but when someone says "list-flavored" anything, my
brain autocorrects to "shit-flavored". Unfair as it might be...
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

~~~
fnordsensei
Fair enough. Now, I use Clojure(Script) which is somewhat less paranthesy than
your average Lisp, but I see far fewer stacked parens there than in the
equivalent JS.

); } }); ); } });

~~~
chisleu
Yep. Cool stuff indeed. I did the traditional "write a LISP interpreter in ML"
and I found some great things in ML. However nothing about LISP made me happy.
It seemed like a cumbersome pain. I have never used Clojure before. I'll check
it out. I still don't think it will be awesome enough to make me really learn
it over Erlang.

Sad to see my comment down voted. It was mostly a joke.

))))))))))))))))))))))))))))))))

~~~
fnordsensei
Not by me, I'm too weak to downvote anything.

I used Common Lisp during University, and mostly found it to be in my way.
Although I might not have been a good enough programmer by then, to be fair.
ML, on the other hand, I loved. I've been meaning to try out Haskell as I hear
it is the spiritual successor of ML.

Clojure has many of the conveniences of a modern language, such as data type
literals, to mention something incredibly basic but essential. I. e.,
everything is a "sequence" underneath, sure, but you can still write [1 2 3 4
5] and get yourself a vector/array type of deal. Thus it manages to dispel
some of the dusty feeling I got from Common Lisp.

~~~
lispm
What does make you think Common Lisp doesn't have data type literals?

A literal vector in Common Lisp:

    
    
        #(1 2 3 4 5)
    

A literal 3d 2x2x2 array in Common Lisp:

    
    
        #3A(((0 1) (2 3)) ((4 5) (6 7)))
    

Using it:

    
    
        CL-USER 4 > (map 'vector #'sqrt #(1 2 3)) 
        #(1.0 1.4142135 1.7320508)

