Live data from Hacker News

Elixir is for programmers

blog.pluralsight.com

11–20 of 53 posts

Re: Elixir is for programmers

#11

Too bad the lists aren't counting lists and are dumb cons cells. :( Has a cool Leiningen (clojure) inspired build/dependency tool.

There are many things in Elixir that seem to be inspired by Clojure and/or lisp in general (which I think is great, by the way):

* AST-level macros with quote/unquote

* Reducers (efficient list processing)

* Protocols (which are like inside-out interfaces)

Re: Elixir is for programmers

#13

It's interesting to see Elixir mentioned more and more. I don't _quite_ see the use-case for it, but I'm so content with Erlang I'm almost surely not the audience the language targets. Will be fun to see if Elixir builds its own community or if Elixir folks slowly filter into the Erlang community as a whole. - - - EDIT It occurs to me that the HN crowd might like Lisp Flavored Erlang: http://lfe.github.io/ It's a lis…

Erlang is awesome, but the syntax is just so out there that it's hard to get used to it when you're usually hacking with Ruby/Python/PHP etc.

If I would be working with a functional language for 8 hours a day, perhaps Erlang wouldn't seem so alien, but I'm not so it is.

Elixir for this reason is truly a godsend, and perhaps with time I can see myself sipping more and more Erlang because of it.

Re: Elixir is for programmers

#14

Edit: The below is actually wrong > For years I’ve wanted to be able to write my own control flow structures, such as an each...else that runs an else block if the each is empty (Handlebars templates have this). Actually, python does have a (little-known) `for...else` structure that does what you want. http://psung.blogspot.ca/2007/12/for-else-in-python.html

python's for/else doesn't do what the grandparent post asked for -- that post asked for the else clause to execute if the container that was being iterated over is empty, and in python's for/else (as your link notes) the else clause executes whenever the for clause terminates normally (that is, other than by a break statement). These are very different constructs.

Re: Elixir is for programmers

#15
I tried to like Erlang, but the syntax turned me off.

Elixir was just what I needed. Makes the power of Erlang accessible. I like Elixir's docs, tooling, and syntax, and look forward to seeing it progress.

Re: Elixir is for programmers

#16
If you liked the nice simple assert, you can get an imitation in Python tests using py.test: http://pytest.org/latest/assert.html

Source code:

    def test_function():
         assert f() == 4
Output:

        def test_function():
    >       assert f() == 4
    E       assert 3 == 4
    E        +  where 3 = f()
Here's how it works: http://pytest.org/latest/assert.html#assert-details -- when importing the test module, all simple asserts are rewritten (which has some limitations if side effects are involved).

No more verbose self.assertTheItemIsInThisList(item, list) at least.

Re: Elixir is for programmers

#17
post #2

I really like Elixir. Not only does it have a clean, pleasant syntax, macros, but it has all the good parts from Erlang, namely: * BEAM VM (isolated heaps, very well tuned scheduler, concurrent garbage collection) * Pattern matching, once you've tried it, it is hard to go back. * Ability to call Erlang code BEAM VM is really a secret gem and many didn't get a chance to play with it because they didn't like Erlang's s…

This is what I came here to say. All of the 'raw language' niceties that Geoffrey mentioned in the article are true, but for me one of the greatest things in Elixir is processes. Just, the way the Erlang system operates is so well thought out, I'm more impressed every time I learn something new.

Shameless self-promotion here - I run http://www.elixirsips.com, which is a screencast series that releases 2 new episodes per week covering some topic in Elixir. I started it out as I started learning Elixir, and I've been going for quite a while now (I'm on Episode 33 next, so 16 weeks so far). It's the most fun I've had with a programming language since I first saw Ruby, and I think the BEAM VM is the future (as is Rust/Go/clojure's core.async, other concurrency-oriented programming models, etc).

So yeah, Elixir's amazing and everyone should play with it. I think just looking at these items mentioned in the article aren't even giving it a fair shake - learn about Erlang's concurrency and distribution models, or else you aren't even scratching the surface :)

Re: Elixir is for programmers

#18

Edit: The below is actually wrong > For years I’ve wanted to be able to write my own control flow structures, such as an each...else that runs an else block if the each is empty (Handlebars templates have this). Actually, python does have a (little-known) `for...else` structure that does what you want. http://psung.blogspot.ca/2007/12/for-else-in-python.html

python's for/else doesn't do what the grandparent post asked for -- that post asked for the else clause to execute if the container that was being iterated over is empty, and in python's for/else (as your link notes) the else clause executes whenever the for clause terminates normally (that is, other than by a break statement). These are very different constructs.

So it does. I wonder what language I was thinking of then.

Re: Elixir is for programmers

#19
post #13

It's interesting to see Elixir mentioned more and more. I don't _quite_ see the use-case for it, but I'm so content with Erlang I'm almost surely not the audience the language targets. Will be fun to see if Elixir builds its own community or if Elixir folks slowly filter into the Erlang community as a whole. - - - EDIT It occurs to me that the HN crowd might like Lisp Flavored Erlang: http://lfe.github.io/ It's a lis…

Erlang is awesome, but the syntax is just so out there that it's hard to get used to it when you're usually hacking with Ruby/Python/PHP etc. If I would be working with a functional language for 8 hours a day, perhaps Erlang wouldn't seem so alien, but I'm not so it is. Elixir for this reason is truly a godsend, and perhaps with time I can see myself sipping more and more Erlang because of it.

usually hacking with Ruby/Python/PHP etc

Erlang is designed to create solid production systems. If someone is obsessed with quick hacks and fad-of-the-week programming, they will feel uncomfortable in a real development environment.

Post reply on HN