Hacker Timesnew | past | comments | ask | show | jobs | submit | more agent281's commentslogin

Isn't it being a method call not quite equivalent? Are you able to define the method over arbitrary data types?

In Elixir, it is just a macro so it applies to all functions. I'm only a Scala novice so I'm not sure how it would work there.


> Are you able to define the method over arbitrary data types?

Yes exactly, which is why it is not equivalent. No macro needed here. In Scala 2 syntax:

``` implicit class AnyOps[A](private val a: A) extends AnyVal { def |>[B](f: A => B) = f(a) } ```


> I know HN has a bit of a click-bait love relationship with Erlang/Elixir but it hasn't translated over to adoption and there are companies that are just burning money trying to do what you get out of the box for free with the Erlang stack.

Do you or the community have a sense why that is?


Elixir is "bad" because it is not a friendly language for people who want to be architecture astronauts at the code level (you can definitely be an architecture astronaut at the process management level but that's a very advanced concept). And a lot of CTOs are architecture astronauts.


That's the opposite of my experience. I tend to get those "architect astronauts" in teams using other languages platforms, and the folks I work with Erlang or Elixir tend to be pragmatic and willing to dig down the stack to troubleshoot problems.


That's what I wrote! (Read the first three words with a heap of sardonicism). Edited to add quotes around bad


Not just that, but there is no giant gorilla backing BEAM. Google pushes Go and Java, Microsoft node and c#


Apologies for my ignorance but what's an "architecture astronaut"?


Here's the original article: https://www.joelonsoftware.com/2001/04/21/dont-let-architect...

> When you go too far up, abstraction-wise, you run out of oxygen. Sometimes smart thinkers just don’t know when to stop, and they create these absurd, all-encompassing, high-level pictures of the universe that are all good and fine, but don’t actually mean anything at all.

> These are the people I call Architecture Astronauts. It’s very hard to get them to write code or design programs, because they won’t stop thinking about Architecture. They’re astronauts because they are above the oxygen level, I don’t know how they’re breathing. They tend to work for really big companies that can afford to have lots of unproductive people with really advanced degrees that don’t contribute to the bottom line.


Joel was wrong about one thing, they also work at startups. My roommate worked at a startup where the senior frontend developer was basically building react in svelte + zod. Once a week he would see all his work deleted and completely rewritten in a fever dream PR that the senior produced. Completely impossible for grug developer to follow what's going on, his job eventually became "running this guy's code through chatgpt and adding comments and documentation".


My personal opinion as a fan and adopter of the stack is that the benefit is often seen down the line, with the upfront adoption cost being roughly the same.

E.g. the built in telemetry system is fantastic, but when you are first adopting the stack it still takes a day or two to read the docs and get events flowing into - say - DataDog, which is roughly the same amount of time as basically every other solution.

The benefit of Elixir here is that the telemetry stack is very standardized across Elixir projects and libraries, and there are fewer moving pieces - no extra microservices or docker containers to ship with everything else. But that benefit comes 2 years down the line when you need to change the telemetry system.


These incremental benefits don't translate to an order of magnitude more productivity, or stability, or profitability. Given the choice, as a business owner, future proofing is about being able to draw from the most plentiful and cheapest pool of workers. The sausage all looks the same on the outside.


That is not true, especially with Section 174 (for the US). Right now, if you want to hire an Elixir engineer, you're better off finding a generalist willing to learn and use Elixir, and you would probably get someone who is very capable.

With Section 174 in play in the US, it tends to drive companies hiring specialists and attempting to use AI for the rest of it.

My own experience is that ... I don't really want to draw from the most plentiful and cheapest pool of workers. I've seen the kind of tech that produces. You basically have a small handful of software engineers carrying the rest.

Elixir itself is a kind of secret, unfair advantage for tech startups that uses it.


>you're better off finding a generalist willing to learn and use Elixir, and you would probably get someone who is very capable.

This is a thing I really don't get. People are like "but what about the hiring pool". A competent software engineer will learn your stack. It's not that hard to switch languages. Except maybe going from Python to C++.


I'm biased, because I worked at WhatsApp, but it may be one of the most famous users of Erlang... and from its start until when I left (late 2019) I think we only hired three people with Erlang experience. Everyone else who worked in Erlang learned on the job.

We seemed to do pretty well, although some of our code/setup wasn't very idiomatic (for example, I'm pretty sure we didn't use the Erlang release feature properly at all)


After you've done releases a few times, it ends up being quite easy. The biggest issues I had was complete release (aka erlang itself) updates.

Admittedly, I didn't have a whole company core product riding on my upgrades.


We just pushed code, compiled, and hotloaded... Pretty much ignoring the release files; we had them, but I think the contents weren't correct and we never changed the release numbers, etc.

For otp updates, we would shutdown beam in an orderly fashion, replace the files, and start again. (Potentially installing the new one before shutting down, I can't remember).

Post facebook, more of boring OS packages and slow rollouts than hotloading.


Thank you for providing the information, its always good to see how others were rolling out updates.


For a lot of people learning a new stack is a big perk to switching jobs.


There's no killer app, as in a reason to add it to your tech stack.

The closest I've come across was trying to maintain an ejabberd cluster and add some custom extensions.

Between mnesia and the learning curve of the language itself, it was not fun.

There are also no popular syntax-alikes. There is no massive corporation pushing Erlang either directly or indirectly through success. Supposedly Erlang breeds success but it's referred to as a "secret" weapon because no one big is pushing it.

Erlang seems neat but it feels like you need to take a leap of faith and businesses are risk averse.


> There is no massive corporation pushing Erlang either directly or indirectly through success.

Isn't there this "small" company that has a chat app that is using erlang :P


Well jayd did the same thing as that small company (which I joined in 2011 when it was small and left in 2019 when it was not so small), run ejabberd to solve a problem. In our case, Erlang subsumed pretty much the rest of our service over time. When I started, chat was Erlang, but status messages, registration, and contacts were PHP with MySQL, media was PHP (with no database), but those all got sucked into Erlang with mnesia because it was better for us.

But I guess it doesn't always work that way. FB chat was built on ejabberd and then migrated away.


Erlang looks weird--Prolog-base, tail recursive loops, extensive pattern matching.

Also, a lot of the power of Erlang is the OTP (Open Telecom Platform) even more than Erlang, itself. You have to internalize those architectural decisions (expect crashes--do fast restart) to get the full power of Erlang.

Elixir seems like it has been finding more traction by looking more like mainstream languages. In addition, languages on the BEAM (like Elixir) made the BEAM much better documented, understood and portable.


Eventually, you use Elixir enough, and Erlang starts looking pretty.


My line is, the three things Elixir has over Erlang is protocols, macros, and a syntax that doesn't summon Cthulhu.


Are you really programming if the constant threat of the old one isnt looming just beyond your vision ?


Anyway, the options seem to be either summoning transcendent threats by superficial syntax or by well entrenched semantics. There seems to be no other choice.


What are your thoughts on gleam?


Well, if we're talking medium-size companies - hard to bring any new language.

If we're talking pure modern-tech company - good luck bringing anything other than JS because "more developers == more growth" mentality.

So it's either end up being used where decision makers know/want-to-learn Erlang/Elixir or when all other possiblity was exhausted.


I wonder how much the workforce plays into it.

If you have a bunch of people who work at companies that are trying to maximize eyeballs then they shuffle around to different companies, are they going to adopt the goals of the new company? Or is their existing perspective and skills going to shape the new company?

I imagine it's a bit of both. Given how big Google and Meta are and how much talent circulates among big tech companies, this might cause companies to lean a bit more heavily into the attention economy than they might otherwise need to.

Also, attention is just easier to measure than satisfaction. Makes it easier to fall down that path.


> Also, attention is just easier to measure than satisfaction

This is a big part of it. Measuring how long someone stares at the screen is easy. It is in many cases a reasonable proxy for satisfaction - provided you mostly only care about the user as a source of revenue.

The social medias have demonstrated fairly concretely that it's a poor proxy if you care about the user's wellbeing. But they already got their bag, so they are hardly incentivised to fix that now.


I used to own a part of the Facebook homepage and maximizing its metrics was my job.

They told us they cared about wellbeing. I made a feature that demonstrably improved wellbeing, and we had lots of data and surveys etc to prove it.

But it decreased watch-time on shortform (what we used to call TikTok style) videos so the Director made me delete it. That started my disillusionment process that eventually made me quit.

Money is the only thing that matters to them.


Yeah, I was working at Oculus when the wellbeing narrative started to fall apart across Meta. Was a good time to get out.


While it initially makes a reasonable proxy you end up polluting the measurements gradually by engineering for maximum screen time. The Artificialy created screentime is increasingly unrelated to satisfaction and ultimately not at all.

Take how Google sorts results by popularity while it is also the main source of "popularity".

The word means something different now.


I wouldn’t say they are hardly incentivized now. They were never incentivized.

What company cares about a users well being? The only companies that might care are ones where the population growth rate of humanity is the bottleneck on their new user acquisition and those companies are slowly morphing into sovereign nations already


Indeed. It was however expedient to pay lip service to the idea of promoting user wellbeing at various times (i.e. shortly post-Cambridge analytica at Facebook)


Did you ever see Crystal? It's more or less a typed Ruby. I've heard that you can port some code directly.

https://crystal-lang.org/


YesI have. But I need to get work done so I rather use a language with a larger ecosystem.

Also, I've come to prefer more FP.


I think there are a couple of bugs in the pseudo-code:

traverse_node(page, version, key): retry: # Read the page pageCopy = copy(page)

    # BUG1: version is an argument so it likely won't be correct on retry
    if version != atomic_load(page.version):
        goto retry;
    
    # Go to the next page
    childPtr = binary_search(pageCopy, key)
    nextPage = load(childPtr)
    nextVersion = atomic_load(nextPage.version)

    # BUG2: seems like we should be using nextVersion instead of version
    # Validate that no writer overtook the reader
    if version != atomic_load(page.version):
        goto retry;
    
    # Safely traverse to the next node
    page = nextPage
Or am I misunderstanding something here?


Then after that, they passed Hawley Smoot Tariff Act to make up for the budget short fall. That caused an already bad situation to get much, much worse.


Given how companies operate internationally, is it fair to compare the stock market valuation against GDP? If Apple moved to a New Zealand based stock exchange, would that mean that the stock market in New Zealand wasn't healthy?

Also, could an increase in internationalization explain the relative difference between the Buffet Indicator today vs 25 years ago during the DotCom boom?


Interesting point -- I wonder if there are variations on this calculation available with global GDP, or ideally, company market cap adjusted by percentage of US revenue/profit to US GDP.


Foreign investment in US stocks is certainly a factor. It’s been on the rise since the 90s and it could be interpreted as making the US markets overheated, if foreign investment suddenly pulled out…


Trump is pretty old at this point. Even if he decided to go full dictator, how long does he have? Maybe 5 to 10 years? I don't think it would be quite as "stable" as Putin's Russia.


The things Trump has put in place may long outlive him. Roe v Wade lasted a long time.


No doubt his administration will cast a long shadow. I was only responding to the allusion that he could become a long term dictator.


Most of HN is probably too young to remember him, but Trump seems closer to Putin's predecessor Boris Yeltsin from 30 years ago. They have flamboyant and unpredictable public personas in common. Yeltsin also loved public performances, media attention, and direct engagement with large crowds. He often made chaotic decisions based on gut feeling and instincts rather than any clear strategy. Over time, alcoholism made Yeltsin increasingly dysfunctional. His health deteriorated and he was frequently absent. His inner circle, which included powerful billionaires, selected a reliable young successor to maintain their grip and negotiated Yeltsin's resignation in exchange for legal immunity for himself and his family. That successor was Vladimir Putin, a relatively unknown and bureaucratic head of Russia's version of the CIA/FBI. Once in power, Putin systematically outmaneuvered those billionaires who had expected him to be loyal, and played them against each other to gain absolute personal control over the country.

Trump is a known quantity. His destructiveness is limited by his inability to maintain focus. I'd be much more worried about who follows him. Will they represent a return to decency, or will it be someone just as destructive but far more disciplined - like Putin?


TBH, I am one of those people that's a little too young to remember Yeltsin. I know him generally, but wasn't aware of the direct through line to Putin. Overall, that's a pretty sobering analysis.


> But it's weird to me to see these articles that are so excited about being able to install Python easily when that's been doable with conda for ages. (And conda has additional features not present in uv or other tools.)

I used conda for awhile around 2018. My environment became borked multiple times and I eventually gave up on it. After that, I never had issues with my environment becoming corrupted. I knew several other people who had the same issues and it stopped after they switched away from conda.

I've heard it's better now, but that experience burned me so I haven't kept up with it.


Hilarious because I watched this while my code was compiling.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: