HNHacker News
TopNewBestAskShowJobs

asa400

1,194 karma · joined April 10, 2013

submissionscomments
asa400··on BYD Sells 4.6M Vehicles in 2025, Meets Revised Sales Goal
It's like the 1970s all over again with how the US Big 3 makers are facing an existential threat held at bay only by protectionism. They're going to have to learn to compete yet again.
asa400··on 2026: The Year of Java in the Terminal?
> That said, if the Java community wanted to port reasonable tooling to their platform, I'm sure Claude could do a reasonable job of getting a decent chunk of BubbleTea and friends bootstrapped.

There's a poster upthread who seems to have done what you're describing: https://github.com/WilliamAGH/tui4j

asa400··on Stepping down as Mockito maintainer after ten years
Agreed - I like your phrasing of it. There are some good ideas in OOP. I don't know that I'd go as far as to credit OOP for those ideas, but things like polymorphism and encapsulation can be very useful. What I objected to was, as you said, OOP became "the only way to do it". It became a dogma. I was very happy when functional programming started to break through and show that there were other ways that were not only viable, but often better.
asa400··on Stepping down as Mockito maintainer after ten years
No thanks, I'll pass on the amateur psychoanalysis. Good luck to you sir.
asa400··on Stepping down as Mockito maintainer after ten years
I'm sorry you felt the need to post this in response to a figure of speech. Please keep your moralizing to yourself. Thank you.
asa400··on Stepping down as Mockito maintainer after ten years
I worked on a project where a dev wanted to mock out the database in tests "for performance, because the database is slow". I almost lost my shit.

Even funnier, this was all hypothetical and yet taken as gospel. We hadn't even written the tests yet, so it was impossible to say whether they were slow or not. Nothing had been measured, no performance budget had been defined, no prototype of the supposedly slow tests had been written to demonstrate the point.

We ended up writing - no joke - less than 100 tests total, almost all of which hit the database, including some full integration tests, and the entire test suite finished in a few seconds.

I'm all for building in a way that respects performance as an engineering value, but we got lost somewhere along the way.

asa400··on Stepping down as Mockito maintainer after ten years
I can’t concur with this enough.

I’ve been on projects where mocking _literally made the project less reliable_ because people ended up “testing” against mocks that didn’t accurately reflect the behavior of the real APIs.

It left us with functionality that wasn’t actually tested and resulted in real bugs and regressions that shipped.

Mocking is one of these weird programmer pop-culture memetic viruses that spread in the early 2000s and achieved complete victory in the 2010s, like Agile and OOP, and now there are entire generations of devs who it’s not that they’re making a bad or a poorly argued choice, it’s that they literally don’t even know there are other ways of thinking about these problems because these ideas have sucked all the oxygen out of the room.

asa400··on Autoland saves King Air, everyone reported safe
It's a question of incentives.

For safety regulators, the incentives are all on the side of limiting acute downside (e.g. a plane crashing), not maximizing potential aggregate upside (e.g. millions of tons of fuel saved per year and millions of tons of C02 not in the atmosphere).

Society punishes regulators that approve products that kill people, so regulators adapt to this and as a result tend to be very conservative.

Regulators don't capture any of the upside (reputational or otherwise) when a new product enters the market and cures disease, makes cars more efficient, helps planes land on their own in an emergency, etc.

I don't know what "right" should be here, but you've hit on a good point. It's complicated.

asa400··on Rue: Higher level than Rust, lower level than Go
I wholeheartedly concur based on my experience with Rust (and other languages) over the last ~7 or so years.

> If I call a function which returns an object of type T, I can safely assume the object lasts forever. It cannot be mutated by any other code (since its mine). And I'm not going to break anything else if I mutate the object myself. These are really nice properties to have when programming at scale.

I rarely see this mentioned in the way that you did, and I'll try to paraphrase it in my own way: Rust restricts what you can do as a programmer. One can say it is "less powerful" than C. In exchange for giving up some power, it gives you more information: who owns an object, what other callers can do with that object, the lifetime of that object in relation to other objects. And critically, in safe Rust, these are _guarantees_, which is the essence of real abstraction.

In large and/or complicated codebases, this kind of information is critical in languages without garbage garbage collection, but even when I program in languages with garbage collection, I find myself wanting this information. Who is seeing this object? What do they know about this object, and when? What can they do with it? How is this ownership flowing through the system?

Most languages have little/no language-level notion of these concepts. Most languages only enforce that types line up nominally (or implement some name-identified interface), or the visibility of identifiers (public/private, i.e. "information hiding" in OO parlance). I feel like Rust is one of the first languages on this path of providing real program dataflow information. I'm confident there will be future languages that will further explore providing the programmer with this kind of information, or at least making it possible to answer these kinds of questions easier.

asa400··on Garage – An S3 object store so reliable you can run it outside datacenters
Other than knowing this about SQLite beforehand, is there any way one could discover that this is happening through tracing?
asa400··on Framework Raises DDR5 Memory Prices by 50% for DIY Laptops
> I assume you're on a quest to assert a "let a completely unregulated free market roar" position

No. I’m genuinely curious, because I agree with you about how critical these components are. I ask because it doesn’t seem to me like the answers are immediately straightforward and wanted to hear serious replies to those questions.

asa400··on Framework Raises DDR5 Memory Prices by 50% for DIY Laptops
Clarifying because I think the downvoters maybe misunderstood the nature of my question: I meant, in the opinion of the parent commenter should the principals of Samsung etc. be jailed? I wasn’t taking a position myself, just asking what they thought.
asa400··on Microservices should form a polytree
> I might have a different take. I think microservices should each be independent such that it really doesn't matter how they end up being connected.

The connections you allow or disallow are basically the main interesting thing about microservices. Arbitrarily connected services become mudpits, in my experience.

> Think more actors/processes in a distributed actor/csp concurrent setup.

A lot of actor systems are explicitly designed as trees, especially with regard to lifecycle management and who can call who. E.g. A1 is not considered started until its children A2 and A3 (which are independent of each other and have no knowledge of each other) are also started.

> Also for many system designs, you would explicitly want a different topology, so you really shouldn't restrict yourself mentally with this advice.

Sometimes restrictions like these are useful, as they lead to shared common understanding.

I'd bet an architecture that designed with a restricted topology like this has a better chance of composing with newly introduced functionality over time than an architecture that allows any service to call any other[1]. Especially so if this tree-shaped architecture has some notion of "interface" services that hide all of the subservices in that branch of the tree, only exposing the public interface through one service. Reusing my previous example, this would mean that some hypothetical B branch of the tree has no knowledge of A2 and A3, and would have to access their functionality through A1.

This allows you to swap out A2 and A3, or add A4 and A5, or A2-2, or whatever, and callers won't have to know or care as long as A1's interface is stable. These tree-shaped topologies can be very useful.

1 - https://www.youtube.com/watch?v=GqmsQeSzMdw

asa400··on Framework Raises DDR5 Memory Prices by 50% for DIY Laptops
How much RAM should they be allowed to buy? Who should decide that?
asa400··on Framework Raises DDR5 Memory Prices by 50% for DIY Laptops
Serious question: should the principals of the RAM manufacturers be jailed?
asa400··on Jepsen: NATS 2.12.1
You don’t even have to train an AI. At this point, in lieu of evidence to the contrary, we should default to “it loses committed writes”.
asa400··on Vanity activities
> Hiring is not an entirely rational process

Agreed! I'd go so far as to say hiring is irrational in the aggregate.

The usual "rational" artifacts, if we can call them that (coding challenges, resumés, etc.) serve almost exclusively to eliminate candidates rather than boost good candidates. Firms are generally ok with false negatives from these artifacts as simply the cost of doing business.

> From there, it follows that meeting someone and letting them know you exist increases the chances (however small) that they can and will assist you on your career path.

I've seen this described as "people hire who they vibe with", and I've yet to see it play otherwise in my career. I'm not saying this is good, or fair, or desirable. It just is.

The folks who get offers are the ones who can meet people, tell stories (even true ones!), listen, and demonstrate that they can empathize with and contribute to messy, flawed organizations.

Humans have yet to invent a technology more powerful than social relationships, and I think technologists downplay this at their own peril.

asa400··on A Look at Rust from 2012
I'm not sure what this cheap snipe accomplishes.

I've been writing Rust professionally and personally since at least 2018 and this has never happened to me.

There are plenty of real criticisms one can make about Rust (I've made and will continue to make plenty) but I think your argument would be more compelling if you updated your experience with the present-day Rust toolchain. The Rust project takes stability very seriously.

asa400··on Perl's decline was cultural
> Erlang is, by my accounting, not even a functional langauge at all.

How do you figure?

The essence of FP is functions of the shape `data -> data` rather than `data -> void`, deemphasizing object-based identity, and treating functions as first-class tools for abstraction. There's enough dynamic FP languages at this point to establish that these traits are held in common with the static FP languages. Is Clojure not an FP language?

> It takes more than just having immutable values to be functional, and forcing users to leave varibles as immutable was a mistake, which Elixir fixes.

All data in Elixir is immutable. Bindings can be rebound but the data the bindings point to remains immutable, identical to Erlang.

Elixir just rewrites `x = 1; x = x + 1` to `x1 = 1; x2 = x1 + 1`. The immutable value semantics remain, and anything that sees `x` in between expressions never has its `x` mutated.

> Erlang code in practice is just imperative code written with immutable values, and like a lot of other modern languages, occasional callouts to things borrowed from functional programming like "map", but it is not a functional language in the modern sense.

I did a large amount of Scala prior to doing Erlang/Elixir and while I had a lot of fun with Applicative and Monoid I'm not sure they're the essence of FP. Certainly an important piece of the puzzle but not the totality.

asa400··on Perl's decline was cultural
> And yet, as the industry grew and all sorts of people from all sorts of backgrounds converged in this space, the tolerance and appetite for funky/terse waned in favor of explicit/verbose/accessible. It's probably for the better in the end, but it did feel a little bit like the mom-and-pop store on the corner that had weird pickled things at the register and a meemaw in the back got replaced by a generic Circle K with a lesser soul.

This is an amazing point that I haven't seen anyone else make about languages in this way.

As someone who got into the industry right after Perl's heyday and never learned or used it but learned programming from some former Perl power users, Perl has a pre-corporate/anarchic/punk feel about it that is completely opposite to something like Golang that feels like it was developed by a corporation, for a corporation. Perl is wacky, but it feels alive (the language itself, if not the community). By contrast, Golang feels dead, soulless.

asa400··on Perl's decline was cultural
> One of my coworkers gave me some great perspective by saying, "at least it's not written in Bash!"

I wish bash was the thing that was dying. As an industry, we need to make better choices.

asa400··on A Look at Rust from 2012
> Rust is a cool language and I hope it eventually settles down enough to be considered for "real" projects.

I keep seeing folks with this "when will Rust be ready" sentiment and it feels a bit dated to me at this point.

At my last job we built machine control software for farm equipment (embedded Linux, call it firmware if you like). The kind of thing that would have been in C or C++ not long ago. Worked great, Rust itself was never the issue. Code from the very first versions continued to work with no problems over years of feature additions, bugfixes, rewriting, edition upgrades, etc.

The job before that, my team wrote a large library of 3D geometry analysis algorithms code that powered some fun and novel CAD manufacturing tools. In Rust. Worked great. It was fast enough, and crucially, we could run it against user-provided data without feeling like we were going to get owned by some buffer overrun. 10 years earlier it 100% would have been in C or C++ and I would have been terrified to throw externally generated user data at it. We were able to do what we needed to do and it served real paying users. What more do you need?

Rust is everywhere. It's in the browser. It's in databases. It's in container/VM runtimes. It's in networking code. It's in firmware. It's in the OS. It's in application code. It's in cryptography. It's in Android. Rust is all over the place.

The only other thing I can think of with a similar combined breadth and depth of deployment to Rust on "real" projects (other than C/C++) is Java.

If I needed something to both work and be maintainable by somebody in 2055, Rust is one of the few things I'd bother to put on the list, alongside C, C++, Java, Python, and Javascript.

asa400··on Response to "Ruby Is Not a Serious Programming Language"
> what's the perception re: current blockers for widespread adoption? Years ago, it was nothing more or less than third-party libs and frameworks. That must be better by now, or there's a short-list of what's missing?

It's complicated.

The library/framework situation is much better than it used to be. There isn't much that's glaringly missing anymore. Some things have lighter maintenance than one might like, but most stuff is there.

I think Elixir and the BEAM have a weird problem in that it's somewhat hard to understand their benefits until you use them. This is not the case with a lot of other stuff. If you were coming from Java in the 90s and you saw Ruby, you didn't have to use Ruby to realize just how much less code it took to do similar things. You could just see code examples.

If you used Perl back in the day, you didn't have to actually use Python to see how much easier it was to read Python as a novice compared to Perl's eccentricities.

The BEAM is tough to sell because its benefits are not something you can easily see on a screen at a meetup, for example. "What if you had a VM that was designed for the ground up for concurrency" doesn't sell. People respond with "well my language already has threads and promises". "What if your language gave you a builtin toolkit to partition and restart the various different subsystems in a rigorous, well-defined way?" People say, "I already have systemd and it restarts my services."

Having done it for some years now, the BEAM kinda has "the quality without a name"[0]. It feels "whole" in a way that other environments don't, and that's difficult to show. This is not something that shows up trivially on a slide deck or a landing page, and most people don't want to take a gamble on a smaller language community that's seen as different and weird compared to the more mainstream language they already know, especially when the most positive things they hear are "it's a functional language that does concurrency better". For most people, this just isn't a compelling enough pitch to get them to leave Python or Javascript or Java (or Ruby).

By the way, I'm not blaming folks, this is both a rational and normal way of evaluating risk when faced with an unintelligible upside and an immediately apparent downside (small community, uncertain career prospects, questionable library coverage, etc.). I think as a community, we (Elixir) have done a poor job in making Elixir seem less risky.

> Somewhat of a tangent, but TFA doesn't mention python and I would think for rubyists this is (still) the elephant in the room. It kind of won to the extent they target the same niches and same audiences, for better or worse.

IMHO Python won the war. Ruby won server-side webapps battle with Rails, which is still going strong, but Python won literally everything else by a landslide. And Python still even has Django. Python is _everywhere_. There's no stats on this that I know of, but I bet 90%+ of Ruby usage is Rails. This is not the case with Python.

To be clear, this is all in the context of adoption. Ruby may never have Python's adoption, but Ruby has been hugely influential. Tons of other technology can trace its lineage to Ruby, whether it's Elixir as a language, or Rust's tooling (Cargo), etc.

> I know it's kinda naive, but I was really hoping elixir would get all of the ruby crowd excited, and they'd move the best parts that they can't live without into elixir. Why didn't they / don't they?

Rails still has a large amount of inertia, both technically and culturally. It's still very good at its niche. Getting Rails folks to move away from Rails would take something as better as Rails was than the Java stuff that came before it. Plus, some people just love Ruby! Elixir isn't Ruby. Elixir is more explicit, doesn't have mutability, doesn't have objects, etc. The similarity really ends at syntax, and I think a lot of Ruby folks are happy with what Ruby is, which is totally fine.

Sorry for the long answer.

[0] - https://onluminousgrounds.wordpress.com/2010/04/24/the-quali...

asa400··on 100k TPS over a billion rows: the unreasonable effectiveness of SQLite
From your experience, would you call these behaviors bugs, or are they more known issues that result from SQLites specific implementation quirks? What kinds of workloads were you throwing at it when these types of issues happened? Asking as someone who really enjoys and respects SQLite but hasn't encountered these specific behaviors before.
asa400··on Why I stopped using JSON for my APIs
Whenever people bring up binary formats I have to bring up Erlang External Term Format (ETF)[0].

It's the native format Erlang nodes use to serialize data to communicate with each other, but it's just a simple Type-Length-Value binary format, so anything can implement it.

It's small enough that you can create a reasonably complete and fast implementation of it for your language in an afternoon. It's self-describing, so if you can read ETF you can read any ETF message, as there are no out of band schemas. I love it.

[0] - https://www.erlang.org/doc/apps/erts/erl_ext_dist.html

asa400··on Response to "Ruby Is Not a Serious Programming Language"
> Many people that adore Elixir also think Ruby is a no go, despite the latter being a strong influence. Arguments against Elixir tend to revolve around its lack of traction, not its lack of seriousness.

Elixir is funny. I've done Elixir for years now, and did some Ruby at the beginning of my career. A ton of people come to Elixir for the familiarity of the Ruby-like syntax but with a functional programming basis. They like Ruby but get tired of OOP and mutable state and want to try something else. They tend to stay for the runtime/VM, called the BEAM.

Don't get me wrong, the Elixir language is nice, but the BEAM and its operational characteristics feel night-and-day compared to Ruby and most other languages that were designed for a world of single-threaded programming.

When you're using the BEAM (any language - there are a few now) there's this amazing sense that you're using something that was _designed to be operated_. You can instrument anything. You can trace anything. You can see the live state of anything. You can restart anything. It's a holistic _system_ for building systems, not just a language.

asa400··on Cloudflare outage should not have happened
> unwrap() and the family of methods like it are a Rust anti-pattern from the early days of Rust. It dates back to before many of the modern error-handling and safety-conscious features of the language and type system.

I think your argument would be more effective if you dropped this angle.

Unwrap is assert. No more, no less. It's tremendously useful to have it in the language for situations when the cost of encoding some invariant in your program's types is far larger than the benefit you'd gain from doing so. It's not some vestigial thing from way back before anyone received enlightenment that they could use sum types to discriminate errors. It's just a different tool.

I completely agree there are systems and situations where you want to be able to statically verify an absence of panics, but the way you're describing the situation sounds similar to when I hear folks describe anything that came before as "legacy" with a denigrating inflection.

asa400··on Cloudflare outage should not have happened
You probably know about these, but for the benefit of folks who don't, you can forbid slice access and direct unwraps with clippy. Obviously this only lints your own code and not dependencies.

  - https://rust-lang.github.io/rust-clippy/master/#unwrap_used
  - https://rust-lang.github.io/rust-clippy/master/#indexing_slicing
  - https://rust-lang.github.io/rust-clippy/master/#string_slice
asa400··on Trillions spent and big software projects are still failing
Speaking as someone in the US, I've worked at multiple companies (some startups, some small businesses, some larger) that have either outright imploded or had mass department-level layoffs inside that 1-2 year timeframe. Some of them I would have stayed at longer than 1-2 years if I had the choice. I'm not claiming it's universal by any means, but there is a lot of volatility at US businesses in my personal experience.
asa400··on A million ways to die from a data race in Go
It's true that message sends with Erlang processes do not perform rendezvous synchronization (i.e., sends are nonblocking), but they can be used in a similar way by having process A send a message to process B and then blocking on a reply from process B. This is not the same as unbuffered channel blocking in Go or Clojure, but it's somewhat similar.

For example, in Erlang, `receive` _is_ a blocking operation that you have to attach a timeout to if you want to unblock it.

You're correct about identity/names: the "queue" part of processes (the part that is most analogous to a channel) is their mailbox, which cannot be interacted with except via message sends to a known pid. However, you can again mimic some of the channel-like functionality by sending around pids, as they are first class values, and can be sent, stored, etc.

I agree with all of your points, just adding a little additional color.

← PreviousPage 4 of 10Next →