Live data from Hacker News

Ten years without Elixir

blog.cretaria.com

81–90 of 144 posts

Re: Ten years without Elixir

#81
post #60

Earlier quoted context omitted.

Do you have actual criticisms of LiveView as a technology or are you just upset about macros?

I love Elixir (former Ruby dev) but I do find many Ruby devs will turn to macros when regular functions will do. I haven't tried LiveView but it looks very interesting.

In this case I don't see how regular functions would do. It's a way of giving a module specific behavior in a way that fits in with the application structure Phoenix enforces. That aspect of it is very Railsy, but the way it's implemented is totally different. Elixir macros are much closer to Lisp macros than Ruby macros, because they are not object oriented. I personally find them much easier to read and understand as a result. Here's __using__ in Phoenix.LiveView: https://github.com/phoenixframework/phoenix_live_view/blob/v...

I think LiveView is a very compelling technology and I'm not sure we would have it if Elixir didn't exist, because Elixir brought a whole raft of different perspectives into the Erlang community. Erlang and Elixir are about as close as two languages can get, and I find complaints from either camp about the other silly. It reminds me of Python vs Ruby flame wars.

Maybe it's just because I'm used to C# and F# and the way they feel in the .NET world, but Elixir and Erlang both feel like different syntaxes over the exact same underlying language concepts.

Re: Ten years without Elixir

#82
I 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.

Re: Ten years without Elixir

#83
post #81

Earlier quoted context omitted.

I love Elixir (former Ruby dev) but I do find many Ruby devs will turn to macros when regular functions will do. I haven't tried LiveView but it looks very interesting.

In this case I don't see how regular functions would do. It's a way of giving a module specific behavior in a way that fits in with the application structure Phoenix enforces. That aspect of it is very Railsy, but the way it's implemented is totally different. Elixir macros are much closer to Lisp macros than Ruby macros, because they are not object oriented. I personally find them much easier to read and understand…

> While emacs has parts written in C, that portion really exists to enable elisp.

You might not have noticed that the parts of GNU Emacs written in C exceed 250,000 lines of code.

Re: Ten years without Elixir

#84
post #42

From 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 percei…

I've found that in general the longer someone has been on a project, the worse their documentation is. People who have both deep practical knowledge of a domain and can explain it clearly are so rare that we tend to remember them by name. Experts can bitch all they want about how Neil deGrasse Tyson isn't a 'real astrophysicist', but lets see you try to talk to the general public, or for that matter, college students…

> Experts can bitch all they want about how Neil deGrasse Tyson isn't a 'real astrophysicist', but lets see you try to talk to the general public, or for that matter, college students starting their senior year as undergrads in your field.

You mean like Feynman, Hawking, Penrose, Brian Green, Richard Dawkins, Steven Pinker, Freeman Dyson, Edward Frenkel and so on?

I agree that it is not a sin to be "just" a science popularizer _a la_ Asimov and people who hold that belief are just being obtuse. Equally obtuse are the people who think "Those scientists cannot communicate with the common man", well guess what, that skill is distributed almost randomly among that lot, so for every scientist with an opaque style there is a wonderful communicator. The same happen in IT/CS and in any other field.

Re: Ten years without Elixir

#85
post #49

Earlier quoted context omitted.

I onboarded a python dev onto elixir and he complained that elixir docs don't look like python docs, so it must be to some degree a matter of taste. I gotta say I don't hate the official erlang docs, they're not terrible. The state of documentation in erlang libraries , though, is frankly atrocious. Even libraries that had their genesis in elixir (like telemetry) are basically unbearable to read. I wish at least ther…

> I onboarded a python dev onto elixir and he complained that elixir docs don't look like python docs, so it must be to some degree a matter of taste. As someone who also came from Python I can't say I'm a fan of Elixir's docs either. I often find myself having to externally search for Elixir / Phoenix resources and when you compare Python vs Elixir in that regard it's no contest. Almost every web dev problem you cou…

Python community and resources are amazing!

I really don't like Python but I often find loads of code in Python which do exactly what I need, so I prototype things in Python and then port them to whatever language I'm using.

I can't say I've been impressed with Python docs, it's more the surrounding community / blog posts / stack overflow which does it for me.

Re: Ten years without Elixir

#86
post #49

Earlier quoted context omitted.

I onboarded a python dev onto elixir and he complained that elixir docs don't look like python docs, so it must be to some degree a matter of taste. I gotta say I don't hate the official erlang docs, they're not terrible. The state of documentation in erlang libraries , though, is frankly atrocious. Even libraries that had their genesis in elixir (like telemetry) are basically unbearable to read. I wish at least ther…

> I onboarded a python dev onto elixir and he complained that elixir docs don't look like python docs, so it must be to some degree a matter of taste. As someone who also came from Python I can't say I'm a fan of Elixir's docs either. I often find myself having to externally search for Elixir / Phoenix resources and when you compare Python vs Elixir in that regard it's no contest. Almost every web dev problem you cou…

nick, on several platforms you have done nothing but kvetch about your elixir onboarding experience. I think it's pretty good for most people, but at the same time it's just not for everyone, and I can think only one of two things is going on.

1. You drew the unlucky straw and it's not for you, for whatever reason. 2. You have a closed-minded mentality and it's keeping you from learning elixir.

Re: Ten years without Elixir

#87

This 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.

While 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.

Re: Ten years without Elixir

#88
post #65

Earlier quoted context omitted.

Not an antipattern for nimble_parsec: 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.

Looks like Haskell-like do notation would be helpful.

do you feel like the code presented is broken? I don't. Could it be better? Maybe... But how much? Is it worth a whole new pattern to learn?

Re: Ten years without Elixir

#89

This 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.

Agreed. 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_.

In so far as the driving rationale for Elixir is not needing to learn Erlang, this seems like an odd criticism of the author.

Re: Ten years without Elixir

#90

As 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 some…

There are parts of the OTP that really struggle with erlang's "purity". The best example I can give is the tftp module, which I wanted to use to do pxe booting. After about 2 days of trying to track the spaghetti callbacks back and forth between the tftp, tftp_engine, tftp_lib, and the callback module to fix a bug and commit a change to OTP, I gave up and wrote my own TFTP module in Elixir. With a very conservative amount of `use` macros, to help organize calls it came out beautifully: https://hexdocs.pm/trivial/Trivial.html

My point being, is that sometimes some patterns (in the case of tftp, a really awkward java-esque factory pattern) do not do so well in erlang's pure functional system and if you instead pass behaviours with `use` you can do much better and have saner code.

Post reply on HN