Live data from Hacker News

Ten years without Elixir

blog.cretaria.com

71–80 of 144 posts

Re: Ten years without Elixir

#71

Earlier quoted context omitted.

> Erlang the language isn't imo. Why not?

Personal 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 ;)

most of that has to with libraries, not the language. I'd take good libraries with Erlang semantics and syntax over good libraries with other lang's semantics and syntax.

Re: Ten years without Elixir

#72
post #7

Erlang'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.

> Let people like the things they like

Does that include writing blog posts? Or, liking Erlang over Elixir? Or, bashing Elixir?

How do any of those stop people from liking what they like? Unlike, what you did.

I'm not really sure this needed a hypocritical comment.

Re: Ten years without Elixir

#73
post #60

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…

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.

Re: Ten years without Elixir

#74
post #66

Re: 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…

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

If you're interested in what the code is trying to achieve, then `map`, `filter` and the like is clearly more explicit.

If you're interested in what actually gets executed (if you're trying to optimize for performance, say), then the `for` loop is clearly explicit than the abstract counterparts.

It depends on what what you're looking for.

Re: Ten years without Elixir

#75

Re: 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…

The pipe operator, if you wish to use it, also has the benefit of enforcing consistency when writing functions where the primary data structure being acted on has to be the first argument.

There is, of course, still people asking for a way to specify the argument to pipe into, but I, for one, am very pleased this was never introduced (and there are no signs it ever will be).

Re: Ten years without Elixir

#76
post #36

Earlier quoted context omitted.

I 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).

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

My longest pipe chain in Elixir so far (with ~1 year of usage) is this[1], where I build a GraphQL context from an HTTP session. I personally think it's clean enough, but your comment made me wonder if it can be better.

[1] https://github.com/RodrigoLeiteF/craftup/blob/main/backend/l...

Re: Ten years without Elixir

#77
I 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!"

Re: Ten years without Elixir

#78

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…

Can you expand a bit more on what you mean by Ruby culture poisoning Elixir? I've never used Ruby in my life and that part was entirely lost on me.

Re: Ten years without Elixir

#79
post #68

The pipe operator seems silly until you learn to pipe into IO.inspect. for vscoders I use this snippet ( 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 singl…

Well I believe that no pipe is better than a a handicapped pipe operator. The Elixir implementation inverts the classical order of piping last in functional languages to the detriment of it. IMO a language should either support pipe last AND currying by default or supply a multitude of thread operators like Clojure does (->, ->>, as->, etc). Elixir's is just middle-of-the-road-weird.

Is it to its detriment? What's really at stake here? Elixir's pipe operator takes a stance, and I love that. It enforces consistency. I feel it's a lot better than having the "sometimes first, sometimes last" that Erlang and Clojure have.

Re: Ten years without Elixir

#80
post #16
post #8

This might, impressively, be the worst Webdesign I ever saw

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

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

Post reply on HN