8 ms·
Why the Cool Kids Don't Use Erlang [video]
- shadeless 12y agoPrevious discussion: [0] Talk on lowering the barrier to entry into Erlang ecosystem: [1] (slides: [2]) [0] https://news.ycombinator.com/item?id=7927849 https://news.ycombinator.com/item?id=7927849 [1] https://www.youtube.com/watch?v=Djv4C9H9yz4 https://www.youtube.com/watch?v=Djv4C9H9yz4 [2] http://www.erlang-factory.com/static/upload/media/1404379022862808josevalimdavethomassf2014.pdf http://www.erlang-factory.com/static/upload/media/1404379022...
- ghayes 12y agoI feel like Elixir in general goes a long way to lowering the barrier to using BEAM and OTP.
- GeorgeHahn 12y agoDo you think folks who are just getting started in the Erlang ecosystem would be better to learn Elixir before Erlang?
- phamilton 12y agoI think so. I would be careful not to approach it as another Ruby (there's a lot of overlap in the ecosystem and community) as there are a lot of things that can and should be done differently.
- RobertKerans 12y agoI'm at a basic level with Elixir (played around a little bit with Erlang first), and so far I'd say definitely - the syntax choices seem very, very good, and it's a pleasure to work with. I can now read Erlang code pretty easily because of this, the concepts and structure are often the same, but introduced in a far more understandable way, and it's felt a hell of a lot smoother than going Erlang first - YMMV of course.
- jallmann 12y agoI tried to do a startup in Erlang a few years ago. Haven't been able to watch the video because there aren't subtitles or a transcript, but here is why I don't use Erlang anymore: the type system. Erlang/OTP does MANY things correctly, where "correctly" is taken to be "in line with my tastes", and yes this includes the inane issue of syntax. But the type system? Normally that wouldn't bother me, but I'm coming from OCaml, where exhaustive checking of algebraic data types makes me invincible. With dynamic typing, my code feels extremely vulnerable, especially when refactoring a codebase. Of course, Erlang isn't alone in this (I abandoned Ruby for similar reasons), but the pain of refactoring feels more acute in Erlang -- perhaps because idiomatic Erlang uses many short functions, making it easy to miss usages. So you have to rely on run-time testing to ensure complete coverage -- and that is nowhere near as easy nor reliable as a compiler that automatically checks everything for you. My dream language is one with ML semantics running on top of BEAM. That seems like a natural progression for a platform that was designed to be reliable -- while there have been attempts to graft a more versatile type system onto the Erlang base language, the cleanest way forward seems to be a language purpose-built for the task.
- felixgallo 12y agoOut of curiosity, did you try using dialyzer? I understand ADTs are strictly better, but was there a particular problem that dialyzer couldn't pragmatically solve for you?
- jallmann 12y agoYes, while Dialyzer was somewhat useful, it only seemed to catch a subset of possible errors. The set of errors it missed was large enough that I just gave up on Erlang altogether. I never took the time to figure out what Dialyzer could and couldn't catch. This was a few years ago, so I don't really have any particular examples in mind anymore, but IIRC it may have had to do with being mostly unable to validate the structure of tuples as parameters to functions.
- oinksoft 12y ago> validate the structure of tuples as parameters to > functions. Dialyzer can definitely do that, you just need to specify a type that is a tuple: -type something() :: {Thing :: thingtype(), Thing2 :: thing2type()}. %% ... -spec foo(something()) -> thingtype(). But I agree that Dialyzer can feel incomplete. It's been a little while now but I recall having to use `term()' in specs (basically, untyped) to suppress false positives in some cases. It was also quite slow. Still, a much better situation than Ruby.
- asa400 12y agoWarning: wall of text ahead. My Erlang experience is admittedly hobbyist, and mostly as a consequence of working my way through Fred's excellent http://learnyousomeerlang.com/ http://learnyousomeerlang.com/ and fooling around with side projects. As I see it, Erlang does a lot of cool stuff, at a semantic and systems level, but utterly fails when it comes to things like approachability and marketing. These topics are universal to all languages, so I feel that my experience as a relative noob may help to illuminate the general outsider's perception. First, the things it does well (taken from my admittedly tiny experience with the system): - Simple language: I love that the surface area of the language really is not that large. - Concurrency is built in to the core: unlike most languages, the concurrency story is just "there". There isn't fuss or ceremony or terror around it. It has been well thought out, and learning actors in their beautiful Erlang implementation helped me take that knowledge elsewhere (mainly Scala, which I'll come back to). - Legacy: you hear about the systems people have built with it and it just blows your mind. The ability of the language and runtime to behave as a cohesive, robust unit exists in few other places, if at all. The sort of reliability and scale achieved as a result of this fact is incredible. And not so well: - Beginner's story: The build tool was not immediately apparent, and it seemed like the community had still not settled on one. The dependency story seemed primitive and still not settled. The repl is pretty shit compared to every other repl I've ever used: ruby, python, clojure, scala, etc. These are obviously "subjective" perceptions, but I'm a fairly captive audience. I already wanted to learn Erlang, so these things will put me off much less than someone who has to be sold on it. - General marketing: everyone keeps talking about phone switches and Whatsapp, but I'm not writing software for a phone switch or Whatsapp. I know Erlang works for other uses because I've seen some of the cool stuff the community has done, but I don't think the rest of the world goes out of their way to find awesome uses. It's still seen as this extremely narrow, focused language, when actually people are using it for all sorts of things. A robust general-purpose library ecosystem goes a long way to address this, as people see a lib for their task and go, "ahh, a library for Foo! I can use Erlang!" - Reliability marketing: Reliability for most programmers is not "Nine 9's of uptime". It's "how badly does this environment let me fuck up before everything goes to hell?" They are effectively two sides of the same coin, with one focused on a negative and the other on a positive. I see a huge, neglected part of Erlang's potential sell in its inability to market itself as letting you move faster and break more things. This doesn't mean you get to be an idiot, but it effectively says to the programmer "I'm going to make it harder for you to create a brittle system. Go on and try to build that adventurous new feature, because I've got your back if shit hits the fan". Related to these points is that there are other environments that get people "most of the way there" without having to learn a totally alien ecosystem. These are, namely, Go and Scala. Erlangers will argue that with Go or Scala you may get some of the features of Erlang, you don't get the whole package. This is true, but people don't think this way. People think "does this sufficiently solve my problem, and does it do so at a cost I can live with?" For people familiar with C, the cost of doing a Go project is minimal. Basically, you get concurrency and GC taken care of, while maintaining most of the syntax, semantics, deployment strategy, and programming styles you already know. With Scala, you get robustness, concurrency, and distributed computing in the form of Akka (to a level that satisfies most people), while preserving access to Java libraries. Personally, Scala's arguments have been persuasive to me, which is why I'm attempting to introduce it at work in lieu of Erlang. In addition to being more approachable for my mostly Ruby and Javascript-programming colleagues than Erlang (I concede that this point is definitely debatable), I can do nearly goddamn anything in Scala: data analysis, NLP, network services, webapps,number crunching, etc. I work mostly in data on a team that has a large deployment of microservices, and for many questions we face I wouldn't even know where to begin in Erlang. Scala, despite its flaws in terms of binary compatibility, immaturity, type-snobbery, retains a relentlessly practical, marketable feel, that I feel much more confident in bringing before a group of programmers who know neither ecosystem. If the Erlang community hopes to see the language and system achieve greater general adoption, it has to learn to sell to the general case. It doesn't have to win, but it has to make it easy for people to reap Erlang's amazing features while not missing their Java, Ruby, or Python libs too much, or taking too long to get started. Big ups to Elixir, as its community seems to be working hard to address these problems, and hopefully greater-Erlang can capitalize on the momentum.
- rdtsc 12y agoOn a more lighthearted note, here is the "Erlang II The Movie" he made: https://www.youtube.com/watch?v=rRbY3TMUcgQ&x-yt-ts=1421914688&x-yt-cl=84503534 https://www.youtube.com/watch?v=rRbY3TMUcgQ&x-yt-ts=14219146...
- davidw 12y agoHe's also the same guy behind other videos like "MongoDB is web scale!": https://www.youtube.com/channel/UCGHa3q15FmqB4D9yNlxrdKQ https://www.youtube.com/channel/UCGHa3q15FmqB4D9yNlxrdKQ Time for a new one, I loved the Erlang sequel.
- deleted 12y ago[deleted]