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

I love Erlang, and am one of the very few people who (in the past) managed to find work doing it full time. The actor paradigm it provides is surprisingly simple and elegant to write an app, even on a single node, and of course making distributed apps is fairly straightforward as a result of it.

I have found that I like Lisp-Flavoured-Erlang (LFE) a bit more, since I still find the prolog-esque syntax a bit frustrating. I've been doing this stuff for like 6 years, and I still occasionally get tripped up on when to do a comma, semicolon, or period occasionally. While I'm not a huge fan of LISP-2 semantics, overall I find the syntax for LFE to be a lot more consistent than raw Erlang.

This isn't to crap all over regular Erlang though; Erlang was the first language I had seen that fully embraced pattern-matching, and I find that kind of pattern to be incredibly elegant.

If someone reading this hasn't tried out Erlang, do yourself a favor, download and install it, and build a simple TCP chat server. I can virtually guarantee you that it will be easier than anything you've built in C/C++, and it's incredibly satisfying to have something you built in a few hours have the ability to scale correctly.

> I still occasionally get tripped up on when to do a comma, semicolon, or period occasionally

Those are affectionately called "ant turd tokens", because they're kind of small and it's easy to miss which one is which, especially when moving code around.

I got to work with Erlang professionally a few years back, and miss it in a lot of ways.

Not being facetious, but could the joy resemble the fun I associate with developing with Ruby?

I'm not super familiar with Ruby (had a bad initial experience with some awful Rails code and never went back), but maybe?

From what I've read in blog posts, it feels like the coolness of Ruby comes from the feeling of "holy crap, something that would have taken me two days in Java/C/C++ took me an hour with Ruby" (hopefully I'm summarizing this more or less correctly).

Erlang has definitely given that feeling to me. Distributed programming can be really, really hard, and gluing things together with sockets and whatnot can lead to a lot of really difficult bugs. Since Erlang embraces distribution and concurrency as part of its paradigm, it sometimes kind of feels like outright magic. Sometimes things feel like they went a bit...too perfect, like you missed something, when you really haven't.

I'm not going to say that it fixes every issue with concurrency; you can still have race conditions and Mnesia and ets can be a bit finnickey if you're not careful, but I think I can honestly say that, for distributed apps, I can accomplish 20x as much as I could with most other platforms.

If I understand you and OP correctly, it’s a kind of joy derived from doing something for a while, being acutely aware of the limitations and frustrations that come with it, and then discovering a brand new way of working that doesn’t involve any of the slog you’d grown accustomed to.

Speaking purely personally, mathematics has consistently been the discipline that’s delivered the most bang for my buck in that regard - learning a new branch can let you solve problems that are just impossible to solve, or take pages and pages of computation, in a few lines.

You did understand me correctly :).

I agree with mathematics; I came to the same conclusion about five years ago; I realized understanding some basic type theory made a whole lot of programming easier for me.

It's kind of dry reading, but I've been trying to get into different process calculi lately; specifically the Pi Calculus and Join Calculus, since these things feel like a cool hybrid of computer-science and mathematics.

Insightful! Any process calculus or type theory literature to recommend? Found https://pdfs.semanticscholar.org/12d9/eae1638729aeb237b5be44... while googling - would this be a good place to start?

I'm still learning, but I've really enjoyed this book [1]. It's pretty theory-heavy, especially at first, but overall I have found it fairly approachable.

Also, Tony Hoare's book on CSP is actually a fairly interesting read; certainly interesting if you like Go. You can actually download it legally free here: [2]

In regards to type theory, I'd recommend starting by learning Haskell, just to make the terminology a little less scary, then picking up the book "Basic Simple Type Theory" by J Roger Hindley. Don't let the name fool you, it's still pretty heavy stuff; there's no way I would have been able to get through it if I hadn't learned Haskell beforehand. [3]

[1] https://www.amazon.com/Programming-Distributed-Computing-Sys...

[2] http://usingcsp.com/

[3] https://www.amazon.com/Simple-Cambridge-Theoretical-Computer...

I worked with Ruby for about 10 years before diving into Erlang. I liked a lot about the Erlang ecosystem, but the syntax was a bit challenging. About a year later, I found Elixir. It provided all the joys of Ruby for me combined with all the things I loved about Erlang. This is completely subjective, obviously, but I've worked with a lot of languages over the past 30 years and Elixir has been by far my favorite. I hope to finish out my career doing Elixir.

I'll re-ask in this subtree. What does the "ladder of ideas" look like for ruby? [0]

[0] https://news.ycombinator.com/item?id=20388593

if you want that kind of joy with erlang, try elixir. it's basically ruby on the erlang vm.

I don't get why people think Elixir is like Ruby. Other than some syntactic similarities, I can't think of any substantial similarities.

> I don't get why people think Elixir is like Ruby. Other than some syntactic similarities, I can't think of any substantial similarities.

The creators of elixir were rubyists. As someone who used to Ruby and now Elixirs, a lot of the joy of the platform (relevant to gp's comment) has made it over. Elixir is legitimately as fun to program in as Ruby, if not more so. I think that the developers of elixir care about the user experience in a way that basically no other language seems to.

I could of course be biased because before Ruby I used to program in an actor-like C++ framework, so everything just feels like I'm coming home to a home I never knew existed to me.

A lot of the tooling is Ruby-like. Phoenix and Rails are very similar as well.

They do have some major fundamental differences though and I think the similarity is often overstated.

Phoenix is similar to Rails superficially, I’m so far as they both have some MVCish structure and some generators. The similarities really stop there though.

Phoenix doesn’t have a magical asset pipeline, it doesn’t have a whole library of language extensions a la ActiveSupport, it doesn’t represent dB rows as objects. Those are just a few things off the top of my head.

Additionally all requests to an app running Phoenix/Cowboy/Plug are separate processes and can happen in parallel without having to stand up multiple app instances.

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