MurphyA/hacker-news huggingface dataset:
by DanielHB | 2025-05-25 09:23:19+00:00
DI is a very religious concept, people hate it or love it.

I myself am on the dislike camp, I have found that mocking modules (like you can with NodeJS testing frameworks) for tests gives most of the benefits with way less development hell. However you do need to be careful with the module boundaries (basically structure them as you would with DI) otherwise you can end up with a very messy testing system.

The value of DI is also directly proportional to the size of the service being tested, DI went into decline as things became more micro-servicy with network-enforced module boundaries. People are just mocking external services in these kind of codebases instead of internal modules, which makes the boundaries easier.

I can see strict DI still being useful in large monolith codebases worked by a lot of hands, if only to force people to structure their modules properly.
by srean | 2025-05-25 09:24:05+00:00
In a free market with competition, probably yes.

The market is far from free, big money is near impossible to compete against. In effect, when they pour tens of billions the work that gets done could have been done perhaps with millions.

Take a look at Chinese AI accomplishments and at what point it has been achieved. Granted plagiarism might be reducing some of the costs, but in a free market, things would have been a lot cheaper.

Similar example India's accomplishments in space.
by ffsm8 | 2025-05-25 09:25:16+00:00
You're talking from the perspective of Java, which has been designed from the ground up with dependency injection in mind.

Dependency injection is the inversion of control pattern at the heart, which is something like oxygen to a Java dev.

In other languages, these issues are solved differently. From my perspective as someone whoes day job has been roughly 60+% Java for over 10 yrs now... I think I agree with the central message of the article. Unless you're currently in Java world, you're probably better off without it.

These patterns work and will on paper reduce complexity - but if comes at the cost of a massively increased mental overhead if you actually need to address a bug that touches more then a miniscule amount of code.

/Edit: and I'd like to mention that the article actually only dislikes the frameworks, not the pattern itself
by Traubenfuchs | 2025-05-25 09:25:23+00:00
Don't hate a paradigm because you only experienced one bad implementation of it.

In IntelliJ, with the Spring Framework, you can have thorough tooling: You can inspect beans, their dependencies, you even get a visual bean graph, you can write mocks and test dependencies and don't even need interfaces anymore and if a dependency is missing, you will receive an IDE warning before runtime.

I do not understand why people are so excited about a language and its frameworks where the wheel is still actively being reinvented in a worse way.
by amiga386 | 2025-05-25 09:26:05+00:00
That would only be if the dice order didn't matter. Multiply by 16! for the number of ways you can place your rolled dice in the grid.

Then you find that 26^16 is less than 6^16*16!

https://www.danvk.org/wp/2007-08-02/how-many-boggle-boards-a...
by SillyUsername | 2025-05-25 09:26:53+00:00
Agreed, and I conflated the two since I've been describing SOLID in ways other devs in my team would understand for years.

Liskov substitution for example is an overkill way of saying don't create an implementation that throws an UnsupportedOperationException, instead break the interfaces up (Interface Segregation "I" in SOLID) and use the interface you need.

Quoting the theory to junior devs instead just makes their eyes roll :D
by dhash | 2025-05-25 09:28:50+00:00
fantastic — I’m sure folks who have poked binaries or written patches have all had the desire for something like this. Glad to see that it exists!

I’m definitely going to use this for solving some problems that i’m currently facing.

For anyone curious about what hare-brained scheme that one could hatch with this, i’d like the ability to do something like a PGO’d shared library —- watch the process run and exit, tracing all dlopen’s to create a new shared library with only the right functions from all the referenced libraries.

Hopefully this works, and if not, i’ll at least fail at something interesting :)
by chvid | 2025-05-25 09:30:46+00:00
You probably don't need functional programming. Here is how to do it with a for-loop.

You don't see many articles written like that because it kinda would be obvious that the author hasn't bothered to understand the approach that he is critizing.

Yet when it comes to OO concepts people from "superior" platforms like Go or the FP crowd just cannot let go of airing their ignorance.

Just leave OO alone unless you are genuinely interested in the approach.
by vineyardmike | 2025-05-25 09:31:17+00:00
> neither party has offered suitable presidential candidates in the last 3 elections

Were we witnessing the same elections? Because I saw one side of the ballot as suitable 3/3 times, and the other side… not event close. Were they perfect, no, but the difference in quality has been baffling 3/3 times.

The actual reality is that many people have a belief system that is wildly different than their fellow countrymen. And whew, what a set of beliefs to act upon and force upon the world.
by imiric | 2025-05-25 09:32:16+00:00
> I never mentioned throwing them out

Eh, your entire comment was dismissive about the "technologies", and not unlike countless similar reactions about the topic. So any serious points you wanted to make were easy to miss within the sarcasm.

I do agree with your point that valid use cases don't need to rely on hype, but at the same time, the technology that powers it doesn't need to be invisible to users. Some amount of marketing around it shouldn't be an issue. The thing is that we've been flooded with it for the past decade+, and the critical thinking public has become desensitized to the bullshit. But this doesn't mean that underneath that there is zero legitimate value, as some people vocally claim.
by tinco | 2025-05-25 09:32:17+00:00
I ran SMB over a 20gbit network (2x 10gbit). The use case was 3D rendering (photogrammetry specifically). There were multiple render nodes, and a central service coordinating the rendering process. The projects would be on SSD's on the central SMBD server, and after they were manually configured (using Agisoft Metashape) they'd be rendered. Projects would sometimes start as tens of gigabytes worth of photos, and the artifacts (including intermediates) would balloon into the hundreds of gigabytes, we'd have dozens of these projects per week.

I researched quite extensively prior to landing on SMB, but it really seems like there isn't a better way of doing this. The environment was mixed windows/linux, but if there was a better pure linux solution I would've pushed our office staff to switch to Ubuntu.
Show HN: es6_maps v1.0.0, new Elixir syntax feature via runtime compiler hacking
by kzemek | 2025-05-25 09:33:00+00:00
Hi HN! It’s been a year since I posted a Show HN[0] for the initial release of my Elixir library, `es6_maps`. It enables JS-style "shorthand" map literals (`%{foo, bar}`) in Elixir through runtime compiler modification.

We’ve been using `es6_maps` successfully in production throughout the year. During that time, we identified a couple minor pain points I wanted to fix:

* Other tools working on token or AST level could be surprised by the de-facto invalid syntax.

* `es6_maps` was only active at compilation time, so we couldn't paste-in shorthand code in deployed shells (very useful for debugging!)

This week I released a new version, v1.0.0, that fixes these issues and more. `es6_maps` now amends the Elixir compiler at a different point (`:elixir.string_to_tokens/5`), which improves compatibility with other Elixir tools and happens to be a more stable API. Also, `es6_maps` can now be used at runtime, and includes an ElixirLS plugin to ensure it's active while the language server analyzes the code.

The v1.0.0 release also signals production readiness. `es6_maps` has been battle tested, hasn't had any compatibility issues with new Elixir versions (and is now less likely to), and includes a formatter that can revert your shorthands whenever you'd want to "get out".

Let me know what you think!

[0] https://news.ycombinator.com/item?id=40333500
by MattPalmer1086 | 2025-05-25 09:33:08+00:00
Imagine you have a 12Gb zip file, and you want to add one more file to it. Very easy and quick if the index is at the end, very slow if it's at the start (assuming your index now needs more space than is available currently).

Reading the index from the end of the file is also quick; where you read next depends on what you are trying to find in it, which may not be the start.
by srean | 2025-05-25 09:35:02+00:00
> The money is generally coming from value generation or value extraction.

This is the crux of the matter, a critical assumption. It breaks at many places.

One can make a boat load of money by predicting market movements slightly better. The value produced is not zero, but does not seem proportionate.

The size of the HFT market seems disproportionate to the value they purportedly produce by removing microsecond scale inefficiencies in the market. A bulk of the futures and options market is not from hedging but just gambling, it's not creating value, at least not in any proportionate sense.
by john01dav | 2025-05-25 09:36:00+00:00
The filing fee is a few hundred dollars (I won't share the exact amount as that would disclose where I am in more detail than I'm comfortable with publicly) where I am. I had one of those low cost lawyer subscriptions (legal shield) at the time of some of these incidents, and the lawyer whom they provided said that it's extremely unlikely that I'd get that back. This filing fee excludes all cases except the car. This lawyer also said that I wouldn't be able to get compensation for the substantial time investment in a small claims suit, or for the original damages.
by metalman | 2025-05-25 09:36:05+00:00
I got a replacement battery for my truck , and was sent to a large warehouse, and beside the shippers desk was a huge cubby hole rack with dozens of different stickers to go on the batteries, but of course there are mire than 1 such warehouses, and also actualname branded manufacturers with there own retail, and to make the point of wierdness, there is also a local battery manufacturer that does not sell to the retail market here and ships most of there mostly industrial products into the world market. Then there are refrigerators, and well every other domestic item. The whole monsterouse edifice serving to validate peoples choices and descision making prowess. I buy used as much as possible, or hand made. And I will at some point incorporate a heat pump into my house, it will be a ground source pump to hot water for heat and domestic use, powered from an off grid solar array, no fans.....no screen, just a couple of set points on the units, the whole thing just back up in a passive solar house, so , any failure is just a minor discomfort. The actual pumps themselves are truely wonders of precision engineering and manufacturing.....get a good one.
by mattmanser | 2025-05-25 09:36:25+00:00
DI wasn't around when Java (or .Net) came out. DI is a fairly new thing too, relatively speaking, like after ORMs and anonymous methods. Like after Java 7 I think. Or maybe 8? Not a Java person myself.

I know in .net, it was only really the switch to .net core where it became an integral part of the frameworks. In MVC 5 you had to add a third party DI container.

So how can it have been designed for it from the ground up?

In fact, if you're saying 10 years, that's roughly when DI became popular.

You're wrong about other languages not needing it, yes statically typed languagess need it for unit testing, but you don't seem to realize that from a practical perspective DI solves a lot of the problems around request lifetimes too. And from an architectural context it solves a lot of the problem of how to stop bad developers overly coupling their services.

Before DI people often used static methods, so you'd have a real mess of heavily interdependent services. It can still happen now but.its nowhere near as bad as the mess of programming in the 2000s.

DI helped reduce coupling and spaghetti code.

DI also forces you to 'declare' your dependencies, so it's easy to see when a class has got out of control.

Edit: I could keep on adding, but one final thing. Java and .Net are actually quite cumbersome to use DI, and Go is actually easier. Because Go has implicit interfaces, but older languages don't and it would really help reduce boiler plate DI code.

A lot of interfaces in Java/C# only exist to allow DI tow work, and are otherwise a pointless waste of time/code.
by wcoenen | 2025-05-25 09:37:28+00:00
Unreal Tournament is given as an example of an old game that never died. But I've tried to play it with a group of friends, and we found it too buggy. Unmaintained games will stop working eventually.

First there was a brightness problem; the game was too dark on multiple computers to be playable. Eventually we found a patch somewhere for that. Next we noticed that the player hosting the game could run much faster than the others. We gave up after that.
by netcan | 2025-05-25 09:38:48+00:00
> People can quibble about the origin of the idea and who is to blame.

Look... I think there is a whole lot of extremely motivated reasoning. Even the British weren't that keen to defend British imperialism by the time of India's independence. The Brits being already responsible for so many sins, make an easy place to put "blame" that cannot be borne elsewhere.

The alternative is to "blame" nationalism, self determination, liberalism. republicanism, and/or democracy.

Everyone knew that India was going to civil war. It was a big factor delaying British decolonisation. Gandhi's whole ideology/rhetoric as independence loomed changed to try an prevent it. Naive in retrospect.

This has always been the sticking point, for modern nationalism. People have strong, inconvenient notions of who the "nation" is.
by mycatisblack | 2025-05-25 09:40:40+00:00
I must have completely missed those speeches. Looked it up,

At a "Believers' Summit" event hosted by the conservative group Turning Point Action in West Palm Beach, Florida, on July 26, 2024, Donald Trump told an audience of Christian voters: "You gotta get out and vote. In four years, you don't have to vote again, we'll have it fixed so good you're not going to have to vote." He also said: "Christians get out and vote. Just this time. You won't have to do it anymore. Four more years. You know what? It'll be fixed. It'll be fine. You won't have to vote anymore my beautiful Christians."

Looks like we’re out of the short term loops and well into the decadal effects with this man.

As a European, I’d like to add that the impulse response on the collective memory will be multi-generational.
by bgwalter | 2025-05-25 09:41:25+00:00
Paul Graham clearly loves writing and spending many iterations on producing something perfect. That was also his approach with the Arc language.

I may be projecting my own preferences here, but such a person is likely to have an ambivalent relationship with LLMs, which just output bland mediocrity or falsehoods.

In his previous essay, he warned that one should not create things that make the world worse. He softened it up by saying, without proof, that creating awesome things is probably fine (are LLMs awesome, I don't think so?).

Now he talks about good writing. I get the impression that he is one of the last remaining humanists in Silicon Valley, who at least has doubts about the direction we are going in and would be happy if YC startups created something else.
by TeMPOraL | 2025-05-25 09:42:20+00:00
> when you need a delayed job server to have the user context of different users depending who triggered the job

I feel this is just a facet of the same confusion that leads to creating beautiful declarative systems, which end up being used purely imperatively because it's the only way to use them to do something useful in the real world; or, the "config file format lifecycle" phenomenon, where config files naturally tend to become ugly, half-assed Turing-complete programming languages.

People design systems too simple and constrained for the job, then notice too late and have to hack around it, and then you get stuff like this.
by 2muchcoffeeman | 2025-05-25 09:45:06+00:00
It might add a layer of variation just to keep things interesting. There are many exercises that work the same or similar muscle groups, but doing the same thing over and over gets boring.

I’ve tried other AI program generators and honestly they aren’t all that bad. I got one to spit out a program based on what I currently needed to work on at the time and the result was OK.

Unless you’re one of those body building types, AI is probably fine.
by sverhagen | 2025-05-25 09:45:42+00:00
I think so.

Also, what I think is also important to differentiate between: dependency injection, and programming against interfaces.

Interfaces are good, and there was a while where infant DI and mocking frameworks didn't work without them, so that folks created an interface for every class and only ever used the interface in the dependent classes. But the need for interfaces has been heavily misunderstood and overstated. Most dependencies can just be classes, and that means you can in fact click right into the implementation, not because the IDE understands DI, but because it understands the language (Java).

Don't hate DI for the gotten-out-of-control "programming against interfaces".
by buran77 | 2025-05-25 09:45:58+00:00
> make old games unplayable that you need patches and emulators for

So then they're playable just fine. You can use a PC/console from that era, VMs or emulators, apply patches, or get the versions from storefronts like GOG.

That's the crux of the matter, for older games there are many ways to keep playing them potentially forever. But for many newer games this might never be possible, especially for the multiplayer-only or always-online games, on top of the DRM. Maybe some regulation will push developers or publishers to release the components needed to make the game work (remove DRM, release the online components, etc.) once it's no longer offered for sale.
by encom | 2025-05-25 09:46:09+00:00
A few things. People care because RAR is ancient, and there are a lot of RAR-archives in the wild. And also WinRAR has resisted enshittification - it's a very well made piece of software that has had a mostly stable UI. It works, and works well, so why change?

About lzma, I believe zst beats it on every metric. I resisted it for a while, because it's tainted by Facebook, but I can't argue with the results.
by benreesman | 2025-05-25 09:46:50+00:00
The API version I'm getting for Opus 4 via gptel is aligned in a way that will win me back to Claude if its intentional and durable. There seems to be maybe some generalized capability lift but its hard to tell, these things are aligment constrained to a level below earlier frontier models and the dynamic cost control and what not is a liability for people who work to deadlines. Its net negative.

The 3.7 bait and switch was the last straw for me and closed frontier vendors or so I said, but I caught a candid, useful, Opus 4 today on a lark, and if its on purpose its like a leadership shakeup level change. More likely they just don't have the "fuck the user" tune yet because they've only run it for themsrlves.

I'm not going to make plans contingent on it continuing to work well just yet, but I'm going to give it another audition.
by 59nadir | 2025-05-25 09:47:32+00:00
> There's a third, and I think more common group: folks who know all that's involved with reinventing the wheel, and how to do it, and know the juice of doing it isn't worth the squeeze, and there's no value in doing it yourself, educational or otherwise.

I think this view of things is usually related to the fact that large parts of this group are simply too bad at reinventing wheels and in large part are gun-shy because of previously failed attempts at doing a good job.

One of my former leads had worked for 7+ years in the same company by the time I showed up and he was absolutely useless as a programmer beyond just gluing together libraries because that's all he had ever done. He barely also knew the platform we ran on because he simply had developed no skill when it came to understanding things.

For him and people like him reinventing wheels is simply not worth the time and since they're so bad at it and always fail they'll never actually learn anything. I heard from him last year (7 years after we both left the company we worked together at) and he still only glues libraries together, but he does it in Rust instead of Erlang nowadays.
by defrost | 2025-05-25 09:47:54+00:00
> There have even been socio-political theories claiming that British rule created the Indian caste system.

Can't say I ever ran across that in any serious context .. sounds more than a little fringe given the history of such systems pre-dating British rule.

> Circa 2000, the idea that Rwandan tribal divisions were actually created by colonial era racism.

More amplified by lingering colonial and post colonial influences .. but not created.

> No great power drew lines in Yugoslavia, Cyprus or Turkey-Greece. Conflict and expulsion occurred regardless.

The claim isn't that all divisions are created by great powers imposing arbitrary boundaries on third parties, the claim is that certain particular actions of that type had a significant impact on specific conflicts.

We appear to agree that exact national boundaries (and passports also ?) are a relatively recent occurrence in world history, things that have appeared more and more and carried greater and greater weight in the past few hundred years.

> The idea that colonial era sins created postcolonial strife is national-liberal cope,

Interesting. Not a view held by the now 90+ year old that taught me Ham Radio, handled antipodean comms for NASA back in the day, defused lingering aerial mines in the Boy Scouts post (and during) WWII and fought (on the British Colonial side) in the Mau Mau uprising .. his opinion was that colonial rule left a long shadow on many African former colonies.

Mind you, his opinion came from first hand experience rather than a modern anti-woke perspective.

Again, the claim is not that colonialism was the root of all evil that followed .. that's as ridiculous as the notion that colonial era sins created absolutely zero postcolonial issues in all former colonies.

> Take {X} and {Y} as examples.

Why not the Congo's and Vietnam? As there is no claim of one sweeping rule, specific "counter examples" (if applicable) neither prove nor refulte the notion that colonialism created issues that varied in impact and magnitude in different parts of the world.