Hacker News new | comments | show | ask | jobs | submit login

Robert Virding's Lisp Flavored Erlang, which, among other things, does away with records, neatens up the syntax, and enabled Lisp style macros, but is still built on Erlang, and still contains it's high quality pattern matching.

Virding is one of the original contributors of Erlang.

http://groups.google.com/group/erlang-questions/browse_threa...

Copied here:

I have finally released LFE, Lisp Flavoured Erlang, which is a lisp syntax front-end to the Erlang compiler. Code produced with it is compatible with "normal" Erlang code. The is an LFE-mode for Emacs and the lfe-mode.el file is include in the distribution. Most things seem to work but some things have not been done yet:

- The interpreter does handle recursive letrecs, binaries, receive or try. - There is no lisp shell. - Documentation!

Yet. The system will be updated as new features are added. This is the 1st release so there is much left to do.

I have include the existing documentation lfe_guide.txt in this mail. There are a number of LFE test files and a version of the LFE interpreter written in LFE as examples of code. There are also a number of issues which need to be decided for the next version and I have included a file lfe_issues.txt which describe them in this mail. Both files are in the distribution.

Note that while this this lisp has been inspired by Scheme (one of the issues) it is a NOT Scheme, it is Erlang with a lisp syntax and many nice lisp features. Not for that matter is it Common Lisp. In fact features of the Erlang engine mean that it is actually impossible to implement full Scheme of CL. No, they shouldn't be changed or added.

It was quite writing Erlang code in lisp and I could easily consider using a lisp syntax for Erlang. I suppose it depends where your preferences lye. It was also easy to get into the traditional lisp habit of using long names for everything which I personally think is not a Good Thing. Perhaps we should do AFE, Arc Flavoured Erlang, instead? Although I think they have gone too far and missed what makes programs easy to read.

Macros are very nice, and it is easy to generate LFE code, which is one of the benefits of lisp syntax.

LFE also shows that it would probably be possible to write other front-ends inspired by other languages, though why anyone should want to I don't know. Perhaps back to a real Prolog syntax again.




WOW!


We're doing real time control for vehicles, which has to handle, among other things, valve timing, fuel flow, the transmission, suspension adjustments, braking. We can't afford to have the system break, and Erlang is built for mission critical systems, giving us quality primitives for handling concurrency and software breakage.

But in Erlang records and math are kinda broken, and we needed both. Hence, LFE.


Could you describe how records are broken in Erlang?


Essentially, the syntax for dealing with them is painful.

From the Recless project page:

http://code.google.com/p/recless/

Recless is a type inferring Erlang parse transform. Instead of writing these lines:

     City = ((Project#project.owner)#person.address)#address.city,
                                                                             
     NewProject =
       Project#project{owner =
        (Project#project.owner)#person{address =
          ((Project#project.owner)#person.address)#address{city =
            'Boston'}}}.
                                                                              
it lets your write these lines:

     City = Project.owner.address.city,

     NewProject = Project.owner.address.city = 'Boston'.


Thanks! Is there a link to the project?


My project, or Lisp Flavored Erlang?

Regardless, the answer (I believe) is, not at this time. But soon enough...


http://forum.trapexit.org/viewtopic.php?p=43950#43950

It's awesome. But, the shell is a little neutered, i.e. it breaks on (lambda (x) x)...hopefully that'll be fixed soon.


nods that's fairly high up in the priority list...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: