from Hacker News

Programming languages to watch: LiveScript, Julia, Elixir

by philippelh on 8/7/13, 1:12 PM with 103 comments

  • by enobrev on 8/7/13, 1:42 PM

    This may possibly be intentional, but seems a bit confusing. The original name of Javascript was LiveScript when initially released with Netscape in the 90s.

    http://en.wikipedia.org/wiki/JavaScript#Birth_at_Netscape

    Edit: It seems it is intentional:

    "LiveScript was one of the original names for JavaScript, so it seemed fitting. It's an inside joke for those who know JavaScript well."

    http://livescript.net/#name

  • by gordonguthrie on 8/7/13, 2:01 PM

    If you are into functional programming and new functional languages we have a good little conference called Mostly Functional going on @ Turing

    http://mostlyfunctional.com

    We have two presentations on languages targeting the Erlang VM, Elixir and Joxa, as well as other goodness...

    (Disclaimer, I am the organiser)

  • by lubomir on 8/7/13, 2:38 PM

    What this article calls currying is actually partial application.

    Partial application is a technique where you take a function that requires n arguments, pass in the first one and get a function that needs n-1 arguments.

    Currying is a technique where you take a function that takes n arguments and turn it into a function that can be partially applied. E.g. in Haskell it works with tuples as arguments. There is function 'curry :: ((a, b) -> c) -> (a -> b -> c)' and its counterpart 'uncurry :: (a -> b -> c) -> ((a, b) -> c)'.

  • by why-el on 8/7/13, 5:34 PM

    Just for the record, Elixir was favourably reviewed by the creator of Erlang itself.[1]

    [1]http://joearms.github.io/2013/05/31/a-week-with-elixir.html

  • by gnosis on 8/7/13, 1:46 PM

    To me, much more interesting than "a language targeting the Erlang VM.. [that] mostly imports Erlang's syntax" is:

    Lisp Flavoured Erlang:

    http://www.trapexit.org/forum/viewtopic.php?p=40268

  • by laureny on 8/8/13, 1:55 AM

    Of all the "Javascript.next" languages I hear on a regular basis, it seems to me Microsoft's Typescript is the one most likely to become successful, if only because every time I read an article about it, most of the comments are extremely positive about it and it looks like there are already some fairly large projects written in it.

    In comparison, I don't see a bright future for Dart nor Livescript (although I secretly root for Dart because I have more confidence in Google to take this language somewhere interesting).

  • by terhechte on 8/7/13, 1:46 PM

    I really like Julia. I'm currently playing around with it whenever I find some spare time. I don't see it as a competitor to R, I think it could well be something along the lines of Python or Go.

    It is LLVM based, and already really fast even though it is still a 0.2 and the JIT seems to have a lot of room for optimisation.

    Whats more, it seems to offer just the right blend of language features: - Easily include C libraries via a simple ffi [1] - It is homoiconic like Lisp and thus allows for fantastic macro facilities [2]

    - It has solid parallel programming support via a Coroutines implementation (Tasks) (similar to Goroutines as far as I can tell)

    - It is a non-pure functional language

    - In contrast to Go it has generics, so functional constructs like map, apply, drop, reduce, fold, partition & friends are already in there (or can easily be implemented) [3]

    - It has optional types, so that you can assign types and the compiler will check for it and mark errors and will be able to create optimised code, but you don't have to [4]

    - Running external programs is a joy [5] (Example: a=readall(`echo hello`))

    The community seems to be very alive. There's a simple web framework called "Morsel" and I've recently set it up against a couple of contenders from the web framework benchmark (cpoll-cppsp, phreeze, and some others), and even though it is still a version 0.2, the performance for the json serialization benchmark would be pretty close to Scalatra (I yet have to publish these numbers, will do so soon).

    I really hope that Julia will grow, as I love the choices that went into the design of the language, and it would be a shame if it would be only a replacement for R instead of something much bigger, as it is such a nice language.

    [1] http://docs.julialang.org/en/latest/manual/calling-c-and-for...

    [2] http://docs.julialang.org/en/latest/manual/metaprogramming/

    [3] http://docs.julialang.org/en/latest/stdlib/base/#general-col...

    [4] http://docs.julialang.org/en/latest/manual/types/

    [5] http://docs.julialang.org/en/latest/manual/running-external-...

  • by noelwelsh on 8/7/13, 1:48 PM

    Nice selection.

    Livescript looks like it fixes some of the warts of Coffeescript while also raising the level of abstraction.

    Julia is something I've already been looking at. I'm a bit torn on it -- it has vastly fewer libraries than Scipy and R so I don't know if I'm ready to "wear the hair shirt". At this point in life I'm more concerned with doing stuff with existing libraries than building the libraries myself.

    Elixir I'm less excited about, because I'm not so excited about Erlang. I feel that Scala provides all of what I'd want from Erlang, along with better sequential performance.

  • by AndyKelley on 8/7/13, 3:24 PM

    Shameless plug: My 2d canvas-based game engine supports LiveScript out of the box: https://github.com/superjoe30/chem/
  • by sinkasapa on 8/7/13, 6:33 PM

    I hope that some Elixir features make it in to Erlang but I guess I'm one of those rare people that likes the Erlang syntax a lot better. I don't really understand the hate for it, it seems so clear and specific. Anyway, if people want choices for an Erlang like experience, without the Prolog syntax, check out LFE:

    https://github.com/rvirding/lfe

  • by oinksoft on 8/7/13, 2:11 PM

      Some other cool features of Elixir:
        ...
        * List comprehensions
    
    I'd just like to point out that Erlang has list comprehensions as well.
  • by _sh on 8/7/13, 11:39 PM

    The language I'm most interested in currently is kernel: mathematically underpinned by the vau calculus, with a smart creator and steward, and a better abstract model for macros than even Racket's stellar syntax-parse. Implementations abound.

    http://en.wikipedia.org/wiki/Kernel_(programming_language)

  • by ambirex on 8/7/13, 1:50 PM

    When looking at languages like LiveScript (or CoffeeScript) I say to myself: "Javascript has been around for 18 years, how long will this be around for?"

    Not saying not to use it, but my use case has to overcome that question.

  • by bayesianhorse on 8/7/13, 2:04 PM

    Julia is in a weird place. It improves in speed over R and Python, but the head start of both of these languages is strong. Also it will be some time until julia can provide equivalent support for GUI and Web programming.
  • by acjohnson55 on 8/7/13, 2:59 PM

    How is currying better than partial function application (particularly with keyword arguments)? If your function isn't commutative, then it seems to give greater importance/flexibility to the first arguments.
  • by kenjackson on 8/7/13, 3:26 PM

    I've been playing with TypeScript a fair bit lately. Really like it: http://www.typescriptlang.org/

    Haven't used LiveScript yet.

  • by pc86 on 8/7/13, 4:51 PM

    As someone who has just this week started serious study of Erlang, I'll have to look at Elixir as well. Ending statements with periods does take some getting used to!
  • by lsdr on 8/7/13, 6:09 PM

    Have yet to take a look in Julia, but I've been playing around with Elixir for a while and looks great. Elixir macros particularly got my attention:

    http://elixir-lang.org/getting_started/5.html

    There is a book on Elixir coming out from Pragmatic Programmers sometime and will be written by Dave Thomas, which might generate a certain buzz too. This may be a good time to dive into it a bit more.

  • by santialbo on 8/7/13, 5:11 PM

    LiveScript looks amazing. I love how much F#-y looks. I'm definitely going to start using it for personal projects.
  • by gpsarakis on 8/7/13, 6:12 PM

    Julia and Elixir definitely seem worth checking. I especially like the interchangeability between Erlang & Elixir.
  • by stewbrew on 8/8/13, 6:05 AM

    What features do these languages offer that make it worth watching them? Neither of them seems to offer anything novel.
  • by nnq on 8/7/13, 5:33 PM

    I really hope people would promote Livescript or GorillaScript more, as better compile-to-js languages.

    ...Coffeescript stole the spotlight and nobody wants to hear about anything else, but it's mediocre and boring language-wise!

  • by ilaksh on 8/7/13, 6:33 PM

    Also check out ToffeeScript.
  • by kldavenport on 8/8/13, 3:12 AM

    What about R?