13 ms·
Ten years without Elixir
- richardfey 6y agoThis must be the most unflattering congratulations I have ever read. Sounds to me like Elixir should feel guilty of being successful despite not being Erlang.
- sevencolors 6y agoNegging for Programmers
- Terr_ 6y ago"Negging statements considered harmful."
- dguaraglia 6y agoUnderrated comment. The more I think about it, negging is almost a defining characteristics of the profession, isn’t it? C programmers complain about languages like D or Rust as fancypants languages that just add syntactic sugar. Vim users shame VSCode users ‘because who cares about nice features anyway’. People who insist in using Mutt and Pine to read their mail because ‘pretty GUIs are for pansies’, command line vs. GUI, Linux vs. Windows (and conversely, Windows vs. Linux), IRC vs. Slack and a million other examples. We are a bitter bunch, LOL
- joelbluminator 6y agoDefine successful...
- buzzerbetrayed 6y agoAgreed. This article was very off putting to me. And felt like someone complaining about something without taking the time to learn the something first. Probably because that’s what it was. > I feel as though this operator could be a detriment, or at least come with some prickily moral hazards I don’t care about how you “feel” about elixir, or how it “could” be. Take the time to learn it, then speak to what it _is_.
- brudgers 6y agoIn so far as the driving rationale for Elixir is not needing to learn Erlang, this seems like an odd criticism of the author.
- cambalache 6y agoWhile reading I was remembering the old saying: "If you dont have something nice to say about...", but that is not the point I guess, the point is that it come across as disingenuous and faux-polite.
- blackrock 6y agoThat was the lamest web page I ever had to open. Please learn some decent web design. And not create your own weird style.
- mssundaram 6y agoWait, you would qualify it as the lamest? I really don't see how it's very different than HackerNews in aesthetics and in design philosophy (minimalist, simple etc.)
- crad 6y agoGreat post, though as a disclaimer, it mirrors my own biases and thoughts on Elixir. I'm happy for its success, but I too find it a step backward. On the positive side, I don't think we'd have gotten rebar3 without hex guiding the way. That being said, I wish hex.pm did a better job at distinguishing between elixir packages and erlang packages. It's always super disappointing when I try and stay pure Erlang to have to sift through Elixir packages for what I am looking for. It's amazing how far Elixir has come in 10 years. I've always hoped it can become a gateway drug for Erlang. I don't think it will, and I guess that's okay, as it pushes Erlang forward in its own way.
- dnautics 6y ago> as it pushes Erlang forward in its own way. Yes. Thank goodness erlang is starting to adopt hex. And elixir is driving better documentation in erlang via the EEP process already, as well as things that people care about in modern systems like telemetry. I think over time it will push more use of binary strings and iolists.
- mononcqc 6y agoas one of the rebar3 co-authors, you'd have gotten rebar3 regardless of hex: we couldn't use the packages in there, and there were no packages that existed. We even entirely broke rules about how package versioning works compared to what Hex expects. However, we didn't spit on having a package manager (that wasn't a bad lazy index hosted on a github repo), and it became a very interesting bridge across communities that we don't regret working with. Our hope now is to try and make it possible to use more Elixir libraries from the Erlang side, but the two languages' build models make that difficult at times.
- iSloth 6y agoHow is this number two on the front page
- ogre_codes 6y agoHN Loves Elixir. I guess a bunch of people upvoted without reading?
- Grimm1 6y agoErlang's VM is great, Erlang the language isn't imo. Elixir just did it better imo and this person seemingly can't stand that people seem to like it more. Let people like the things they like :P I'm really not sure this needed a blog post.
- rad_gruchalski 6y ago> Erlang the language isn't imo. Why not?
- out_of_protocol 6y agoPersonal thoughts: In Elixir you have consistent utf-8 binary string usage everywhere, consistently named modules/functions, consistently ordered arguments/return values, and, thanks to the pipe operator, in 3rd party code as well. And none of that in erlang ;)
- dnautics 6y agoNo separation between header and code, structs are better than records (because they bear their data labels when you inspect them, even if you send to another node that doesn't recognize them), and also since elixir requires that the tags are modules, you can use them for polymorphism (this is the best of OOP without OOP). Much better documentation support, better compile time infrastructure, smart metaprogramming (this package would be a PITA in erlang: https://github.com/ityonemo/zigler https://github.com/ityonemo/zigler), opinionated but optional directory organization. Module namespaces which are trivially subdivided and aliased, easier time making anonymous GenServers. The Task module, full stop. The registry module, as well.
- rad_gruchalski 6y agoThanks.
- rad_gruchalski 6y agoThanks.
- hans1729 6y agoThis might, impressively, be the worst Webdesign I ever saw
- eitland 6y ago[x] Readable [x] Loaded fast [x] No moving parts [x] Don't mess with scroll [x] No autoplaying videos No, it definitely isn't the worst I've seen.
- generalk 6y agoI gotta put a big, giant X next to "Readable." I have HN at 170% zoom right now. I keep most of my font sizes around 14pt minimum. I have one useless eye and another that isn't so great even corrected with contact lenses. Give me more web design trends that emphasize fonts at a readable size AND color contrast with the background color. Dark gray Calibri Thin on a light gray background might impress some design nerds but I'll take large, margined, justified text well set from its background any day of the week.
- fatheart 6y agoDid you view it on a larger screen? I viewed it in mobile, I appreciate the design, but I do find it hard to read with only a few words fitting on a single line. I wonder if the poster you replied to also viewed it on mobile. Even when I hold my phone sideways, reading such short lines fatigues my eyes quickly.
- ogre_codes 6y agoWeb design was one of the better bits of this article. I don't agree with the content and I'm not a fan of full justification myself. But the simple, readable page is a sign of good taste... and makes the article easier to read.
- flyingfences 6y agoI miss the days when I could expect each website to look distinct and unique, for better or for worse.
- 6y ago
- dnautics 6y agoThe pipe operator seems silly until you learn to pipe into IO.inspect. for vscoders I use this snippet (https://slickb.it/bits/70 https://slickb.it/bits/70) which also labels with the line numbers, meaning you can multiline select a bunch of lines in your pipeline and when you're done ninja them out with another multiline select (usually line numbers have the same number of characters around each other). In combination with triggering single tests, it's invaluable for isolating errors in code. In action: https://youtu.be/WMYc3VzOSpg&t=23m20s https://youtu.be/WMYc3VzOSpg&t=23m20s I suppose the problem with this snippet is that it keeps you from using more powerful tools like tracer and recon.
- aeturnum 6y agoI think OP's point about building huge systems with pipes is well taken. They can become confusing when the break and over-use can be a code smell. Their power, as you point it, is in the ability to jump into any statement and add another action with minimal syntax. It's extremely useful while iterating on development because you can quickly check that something works (or check on what is happening).
- dnautics 6y agoI think it also encourages a declarative style of programming, so that's a win if you ask me, especially for large systems, though I can't measure this.
- jolux 6y agoIf you’re chaining more than three or four things together I think you’re definitely doing something wrong but I’m not sure I’ve ever seen someone do that in Elixir.
- dnautics 6y agoNot an antipattern for nimble_parsec: https://github.com/ityonemo/zigler/blob/fe845a9fbbfef92da8aba99ffd599a2e6551e807/lib/zig/doc/parser.ex#L88 https://github.com/ityonemo/zigler/blob/fe845a9fbbfef92da8ab... Plus think of how much easier that pipe makes it for you to understand what is going on.
- prophesi 6y agotl;dr: Author thinks the pipe operator introduces anti-patterns, after not using a pipe operator for 10 years.
- svrtknst 6y agoIn many cases, Erlang has a simplicity that is largely unmatched. I love the pipe operator and it's something I miss in a lot of languages, but just as often I miss the simple form of Erlang as well, being able to just define a series of simple, immutable clauses. In some sense, two ways to solve the same problem.
- desireco42 6y agoAs someone who really love Elixir, I agree with you and share your sentiment. I always found Erlang syntax, much different but once you get use to it, very simple. Docs, on the other hand, truly not the greatest thing :).
- mmcclure 6y agoFrom the perspective of someone coming the other direction (a developer working almost entirely with Elixir that needed to jump to Erlang docs occasionally), it's interesting to see the note on docs, and honestly the vibe I get from this blog post feels related to my personal overall gripe with the Erlang community. To be blunt, I really dreaded needing to jump to the Erlang documentation, largely because of a perceived gap in developer empathy. Elixir documentation feels like it's written in a way that wants you to be successful and enjoy the process, while Erlang documentation feels very perfunctory. Where Elixir documentation is rife with examples and hints, Erlang documentation almost makes you feel like an idiot for wanting to see similar examples. I wonder how much of that vibe is more due to priming because of community perception more than anything else. There's a distinct stereotype of Erlangers having a strong "I am very smart" vibe. That's not fair to a lot of the wonderful Erlang fans I've met that are extremely welcoming, but the wider Erlang community has a strong perception of gatekeeping where they almost don't seem like they want the language to be more accessible.
- eterm 6y agoIt's like 2000's MSDN vs current MSDN. The erlang documentation tells you what you need to know and is accurate but it isn't helpful in the way it should be. If you already know what you're doing, it can be a useful reference, but it doesn't aid understanding.
- enraged_camel 6y agoIn other words, it's a spec sheet, which is useful for people who are already experts in the language. Beginners and intermediates, on the other hand, need it to be something more like a textbook: something that contain not just the technical details, but also commentary and examples about them that tie them to "real life" scenarios.
- heleninboodler 6y ago> 2000's MSDN vs current MSDN Which one is better? I've been out of that world for close to 15 years.
- 6y ago
- honkycat 6y agoRe: Pipe operator Their argument for replacing the pipe operator is to do this instead: foo(X) -> final_function(maybe_function(X)). into this: foo(X) -> Maybe = maybe_function(X), final_function(Maybe). instead of this: x |> maybe_function() |> final_function() Their exact words: Spelling things out so pedantically makes code dead-simple & clear. Yes, there is a tad more code, but you will also note that nothing is hiding. Un-nesting simply dumbs things down. Now, who wouldn’t want that after hours of squinting at a screen? People love to trot out the "It's more explicit, its a bit more code but isn't it more READABLE" argument about everything. I've heard this argument used to oppose information hiding while refactoring functions to be smaller. And I would argue that "readable" is subjective, and that their argument is extremely weak. I love the pipeline operator and think it should be standard in every language. Also, his "Maybe" variable becomes a pain to maintain when you have a pipeline of multiple functions. edit: for bad formatting
- _nothing 6y agoYeah, I went on to read that post and also didn't quite understand their reasoning. It seems to me that one of the benefits of the pipe operator is that it very clearly lays out the steps involved, aka x |> maybe_function() |> final_function() so that the code is dead-simple and clear. It doesn't seem nested in the say way that final_function(maybe_function(X)) is. Granted, I don't have nearly the level of experience of the author so I can't say for sure, but it seems to me like they just haven't had enough experience with the pipe operator to see how it benefits the code "beauty".
- svrtknst 6y agoTbh I like both the erlang style and the Elixir style and don't see a _tremendous_ amount of difference, e.g. foo(X) -> Y = maybe_function(X), final_function(Y). Both, in my eyes, yield a declarative flow without mutations and overwriting variables
- djur 6y agoThis reminds me of the attitude held by some Go developers (and Rob Pike) that the reason people want map/filter/reduce and similar generic functions on containers is because they want "less code", and the counter is that a for loop is "more explicit", "clearer", "less magical", and so on. But for someone who is used to languages where these constructs (or list comprehensions) are idiomatic, they are perfectly clear and explicit, and using a for loop instead adds complexity.
- _nothing 6y agoContent aside, I don't get why people keep criticizing the site design, and I say that as a frontend dev. This appears to be the personal blog of a lone Erlang developer-- why should they put in effort to make bring it up to current design standards? It does what it's designed to do. It conveys information in a simple, readable way, same as HN itself. IMO there's nothing worth criticizing here. edit: typo
- ogre_codes 6y ago> bring it up to current design standards? I'm curious what makes this an out-of-date design. Did easy to read go out of style at some point? As far as I'm concerned this is the purest form of a text based blog. Pure content, decent font, Good contrast, no bullshit popups or animations to distract from the point.
- _nothing 6y ago> I'm curious what makes this an out-of-date design. I'm not a designer myself but the things that strike me immediately are that the fonts and colors seem out of fashion and the site looks somewhat awkward on mobile. But that's my whole point. You wouldn't want those things on the homepage of a startup, but this isn't that. It's just a simple blog and it does a good job of being a simple blog.
- ogre_codes 6y ago> site looks somewhat awkward on mobile Ah... yeah I'm on my desktop right now so didn't even think about that. I don't love the colors/ fonts or justification, but they also don't interfere with readability which is my #1 criteria for evaluating a site.
- pmontra 6y agoText is a 25 x 16 grid of characters on my phone. Luckily I read it first on my computer. Reader mode does help though.
- loveJesus 6y agoPraise the Lord, to me the the person writing the article seemed to be making fun of himself a little bit. Like a disgruntled but loving grandpa who has his ways, acknowledging how some things elixir does may actually be better, giving a congratulations to his grandchild as the central point.
- jolux 6y agoI get the sense that the author resents the popularity of Elixir on some level. Personally I appreciate that it removes boilerplate from Erlang and has a real macro system. I’m not picky about syntax in general but when verbosity can be eliminated I think it’s almost always a good idea. As for his opinion on the pipe operator, I have to wonder what he thinks of do-notation and point free style in Haskell, let alone APL and its ilk.
- jFriedensreich 6y agoAs someone who came to erlang at least in part because i hated ruby (and also rails/phoenix like frameworks) i can partially sympathise. I would however put pipe operators clearly on the pro side of elixir and also add the string handling to that list (no pun intended). I am ultimately really happy about Elixir giving BEAM some new popularity in otherwise unreachable audiences, even though i had really hoped for something more akin to erlang2 or similar to an erlangish coffeescript. But in the end even joe approved of elixir and i don't remember significant effort on erlang2 after initial experiments. But the problem seems not to be syntax but more culture. I see many ruby/rails people coming into the BEAM ecosystem who bring their poisonous way to think about systems with them, even when they understand the theory about functional programming and what BEAM is about, they seem to still fall back all the time, maybe partially because the syntax is too familiar. If is see defmodule TimelineLive do use Phoenix.LiveView i am already fighting a puking reflex, does elixir dictate to to build a framework like this? No, but the culture bleads over. Funnily this is a similar effect to java culture poison-swapping into javascript after class and decorator syntax was added.
- josephg 6y ago> Funnily this is a similar effect to java culture poison-swapping into javascript after class and decorator syntax was added. This is a great insight. I remember arguing at the time that adding that stuff to javascript was stupid, and people responded arguing that it increased accessibility of the language. It’s heresy, but I think there’s something to be said for bringing people in to a language slowly so they have time and inclination to leave their past experiences at the door. Rust uses the borrow checker. Ruby has metaclasses and it’s excessive magic everywhere. Javascript used to use prototype based inheritance and callbacks. I use classes sometimes and async everywhere but we paid a price for that syntax. The price was in our previously more cohesive identity as a community around how JS was written.
- jolux 6y agoDo you have actual criticisms of LiveView as a technology or are you just upset about macros?
- corytheboyd 6y agoMeta: if the author happens to see this comment, just letting you know your mobile styling is a bit off. Font size and letter/line spacing is all off (far too large). Just trying to be helpful, apologies if you already know!
- davidw 6y agoI didn't get a lot from this article, despite being in similar circumstances. I have a lot of Erlang experience - and I'd love to jump into Elixir, and I think Jose got a lot of things right with it. It's not just a "nicer" syntax - things like strings got fixed up.
- zelphirkalt 6y agoI once tried web framework after web framework, anything I could find, for Erlang. Many were outdated and I could no longer get them running. I was not an Erlang pro, so perhaps they did still work, but no instructions on how to get them working. Some offered documentation and I followed every single step, until something did not work any longer, like adding certificates. Simply could not make it accept the certificates I created using openpgp moments earlier and of course no documentation on what the certificates need to look like. I think that was Cowboy. The lack of beginner friendly documentation made me desparate. There must be one good and simply working web framework, I thought. I found a chat for N2O and entered that, asking questions and how to do something minimal with N2O, not a whole chat, which was the starting point of the framework, the only example it came with, which it already created, when you followed the tutorial or some steps I had found. I had seen interesting things in a video about it, particularly and how it handles / creates JS inside Erlang. When asking for help and mentioning, that no other framework had worked and that I need more documentation, which there is a lack of, I was told to stop "trolling" and to "f* off" ... That was only one person (one contributor of the framework actually), but others did not offer any insight or help either. That was when I stopped looking into Erlang in my free time, trying to get a web project going. I simply gave up at that point. Erlang itself is a great language. I often mention it as a language, where a lot of things are already there for a looong time. Concepts, which more and more languages now adopt for themselves and hype about. I have to agree with lack of beginner friendly documentation though, which is not "Look at the code!"
- fractallyte 6y agoBuild It with Nitrogen: https://builditwith.com/nitro https://builditwith.com/nitro This is a really excellent book, and a great introduction to Erlang with a mature web framework. And it's refreshing to have an alternative to the 'Rails' way.
- zelphirkalt 6y agoThank you for that recommendation. Might make me pick up Erlang with web development again in the future!
- dudul 6y agoI wouldn't say, like the author, that Erlang has "prettier syntax". At first glance, Elixir's syntax is much nicer and prettier (whatever that means). However, Erlang's syntax is both more terse and consistent. It has much fewer special cases, syntactic sugar and all. It is the syntax, once you know and understand it it's simple. That is really my main issue with Elixir. And I can understand if I'm in the minority, but I'm more comfortable typing a bit more for a consistent and predictable syntax.
- brightball 6y agoIs this in response to the “10ish Years with Elixir” post from Jose? https://news.ycombinator.com/item?id=25760213 https://news.ycombinator.com/item?id=25760213
- lawik 6y agoI thought this was an interesting perspective. I'm a big enthusiast about Elixir and I'm always curious to see how the die-hard Erlang people feel about it. Elixir makes me want to know more Erlang but I don't think I'll ever move to Erlang for my day-to-day use. Appreciate this author making a post commemorating Elixir with a fairly nuanced sentiment.
- fortran77 6y agoWe do a lot of work in Erlang and I have very reluctantly had to deal with Elixir. I, too, prefer the "purer" Erlang syntax, and have been turned off--just like the author of this essay--with the "Ruby-ness" of Elixir.
- pmarreck 6y agoThere's room for everyone on the BEAM.
- dc0d 6y ago"There are only two kinds of languages: the ones people complain about and the ones nobody uses." ― Bjarne Stroustrup, creator of C++ programming language The fact that Elixir is getting some hate is a good sign - it's reach is growing.