I can totally relate to this. Programming in Erlang felt so natural compared to the knots I was twisting myself into writing C++. I was churning out C++ code, but wasn't having fun. Suddenly Erlang made it fun and programming became addictive.
> Suddenly Erlang made it fun and programming became addictive. I'm saying this with complete sincerity: WHAT IS IT THAT YOU PEOPLE SEE!? What is the fun? What are you addicted to? Typing and seeing the output? Solving a problem? I feel like I am missing out on some amazing life altering experience when I see people state that. The same thing I have with the article - what does it mean to love a programming language?
How I fell in love with Erlang
151–160 of 263 posts
Re: How I fell in love with Erlang
#152> X equals X plus one? That’s not math. That’s a lie. That's really interesting... My wife, who has no real mathematical background had the EXACT same reaction when I was trying to teach her some simple programming. I tried to explain that equals in that context was more of a storage operator than a statement that said line is true. She found it very frustrating and we gave up on the endeavor shortly thereafter. I've…
This blocked me from understanding computer programming for 3 years. I thought of 'variables' as immutable and the fact that they were not didn't really click at all. Once I mentally transitioned from 'it's a label attached to a value' to 'it's a named box which holds a value' life got a lot easier. I was 15 when it finally clicked (on a TI programmable calculator...).
I guess I got through that when I was 7 on a pass-me-down ZX81 from a relative who just had upgraded to a Spectrum (I assume).
I mentally called bull when reading boragonul's story because:
a) BASIC has a REPL
b) Kids back then had near infinite patience/time.
c) These computers came with pretty good manuals explaining BASIC
There was very little external stimuli. As an example: TV broadcasters in Europe were literally mostly shut off during the day to save power. Radio was on all day, but it was 99% boring adult stuff.
Re: How I fell in love with Erlang
#153My current stack is Elixir + Rustler on server and Rust + Wasm at frontend. Thanks for reading :)
Re: How I fell in love with Erlang
#154It's funny how HN goes through these Erlang cycles. It's a long standing tradition, starting off with 'Erlang Day': https://news.ycombinator.com/front?day=2009-03-11 Erlang gets a lot of stuff right for scalable web based stuff, and even though there are many of its influences that have by now made it into other languages and eco systems it is still amazing to me that such a well thought out system is run with such i…
Re: How I fell in love with Erlang
#155There is also Erlang the Movie 2 trying to sell Erlang (called Outlaw Techno Psyhchobitch in the video) with rock and hot chick: https://youtu.be/rRbY3TMUcgQ?t=262 And they were right, rebranding was all Erlang needed 13 years ago
That's absolutely terrible and hilarious at the same time.
Re: How I fell in love with Erlang
#156I want to get into Erlang, but I also know a lot of languages that are cool, effective, but rarely used in jobs.
That's the downside. If you look at the monthly "who is hiring" posts here on HN, you rarely see Erlang jobs. Elixir shows up a bit more often but it's still uncommon.
Re: How I fell in love with Erlang
#157Took me a long time to figure out what gets lost with Erlang is: a) Ubiquity — everything understands HTTP. Erlang nodes only talk to Erlang (or a compatible runtime) b) Because there are no middleware standards (REST, GraphQL, OAuth, etc.), you must build or integrate your own abstractions c) Giving up infrastructure (reverse proxies, load balancers, CDNs), You handle distribution yourself or through OTP design d) I…
OTP includes an http client and server. And ERTS includes an http mode for sockets. You may prefer 3rd party http servers (yaws and Cowboy are popular) or clients, but you have options that come with Erlang.
[No comment on b; I'm not sure I aprechiate the concept of standardized middleware]
> c) Giving up infrastructure (reverse proxies, load balancers, CDNs), You handle distribution yourself or through OTP design
You can put all this stuff between the users and you Erlang cluster. Within your Erlang cluster, I don't think it makes sense to leave the cluster and go back in... If you had a large server process in [language of choice], you probably wouldn't send request out to a load balancer to come back into the same process. If you have an n-tier system you may use a load balancer for requests to the other tier... In Erlang, the simplest analog is processes that serve the same request queue would join a pg group, and processes that want to send a request send to one of the members of the group.
> d) Interoperability with browsers and APIs, requiring bridging via something like Cowboy or gRPC gateway
If you want to talk http, you need something that talks http; there's at least 3 reasonable options, plus an http parser for sockets so you can do it yourself without as much fiddly bits. I guess I don't understand what you're looking for here.
Re: How I fell in love with Erlang
#158Earlier quoted context omitted.
> It's an action verb. The difference is that it is an instruction. Conventional mathematical notation, while declarative by default, switches into instruction mode just the same with the "let" keyword. The usage of the "=" operator then becomes equivalent: e.g. let x = 1. But as the aforementioned x = x + 1 comes from notations that are never declarative, where every statement is an instruction, the "let" keyword is…
Is that the topic? I do think what I'm trying to say here is: sorry, but your "conventional notation" sucks because "what is actually happening" is so very different from how the thing is overwhelmingly used for most people.
Yes. "=" doesn't mean anything in the void of space. Conventional mathematical notation is what established "=" as meaning "equal to", as referenced by the original comment. But the same notation also uses it for assignment when in instruction mode, so imperative languages that use x = x + 1 syntax are quite consistent with it.
> but your "conventional notation" sucks
Maybe, but it's all anyone really knows nowadays. It's what you are going to learn in math class in school. It's what you are going to find used in mathematical papers. It is how you are going to express mathematical concepts to your friends and colleagues. Worse is better, I suppose, but it is what has set the standard. It is the de facto language of math. For whatever shortcomings it does have, virtually everyone on earth recognizes it, which is very powerful.
> so very different from how the thing is overwhelmingly used for most people.
I'm not sure how to grok this. let x = 1 is something anyone who has taken high school math will have encountered. Assignment is perfectly in line with the understandings of most people.
Do you mean that expression entirely using imperative constructs is unfamiliar to those who grew up with a primarily declarative view of math? That might be fair, but I'm not sure x = x + 1 is a specific stumbling block in that case. One has to understand imperative logic in its entirety to use these languages anyway, at which point nobody is going to think that x = x + 1 is intended to be declarative equality.
Re: How I fell in love with Erlang
#159Took me a long time to figure out what gets lost with Erlang is: a) Ubiquity — everything understands HTTP. Erlang nodes only talk to Erlang (or a compatible runtime) b) Because there are no middleware standards (REST, GraphQL, OAuth, etc.), you must build or integrate your own abstractions c) Giving up infrastructure (reverse proxies, load balancers, CDNs), You handle distribution yourself or through OTP design d) I…
This reads as if it isn't trivial to have an HTTP API for your public API in Erlang/Elixir, which is weird. Sure there isn't an included HTTP API for Erlang processes, but why exactly would you want one? They're not for the public internet, as their an implementation detail of your system. The majority of what they're capable of just isn't relevant to the public internet.
Re: How I fell in love with Erlang
#160For what it's worth, I'm stuck on the very first x = x + 1 thing. Not sure if you want to call it a screwup or bad grammar or whatnot, but it is perhaps the huge mistake that the "equals" sign was used for something that feels like, but emphatically DOES NOT mean, "is equal to." It's "put this into that". It's an action verb. Should have perhaps insisted on x x
I believe you can blame Ken Thompson for this. In DMR's paper about early C history, he says: > Other fiddles in the transition from BCPL to B were introduced as a matter of taste, and some remain controversial, for example the decision to use the single character = for assignment instead of :=. I think Ken did most of the early design of B and DMR came along later to help with C. Ken has a famously terse style, so I…
x ← x + 1
Not familiar, perhaps understandable.