Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. One Year of Sponsored Servo Development(servo.org ↗)
    37comments
  2. GLM Built Its Own Inference Infrastructure(z.ai ↗)
    20comments
  3. Nvidia announces native GPU programming in Rust(nvidia.com ↗)
    284comments
  4. Keys Not Included: recovering the signing keys for US driver's license barcodes(ryan.science ↗)
    65comments
  5. My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it(jakeasmith.com ↗)
    24comments
  6. The Relation Between Mathematics and Physics by Paul Dirac(cam.ac.uk ↗)
    20comments
  7. Training a 4B model to produce 81% faster query plans than Postgres(rohanbansal.com ↗)
    118comments
  8. OpenAI Model Misalignment Report(openai.com ↗)
    8comments
  9. Xiaomi Mimo 2.6 live post-training dashboard(xiaomi.com ↗)
    115comments
  10. Lucasart's Afterlife(togameforlife.wordpress.com ↗)
    17comments
  11. Comparison of Malloc() Algorithms(egbert.net ↗)
    11comments
  12. Small programming tricks(will-keleher.com ↗)
    239comments
  13. Cloudflare/Security-Audit-Skill(github.com/cloudflare ↗)
    14comments
  14. Backups Aren't Simple(filipovski.net ↗)
    147comments
  15. Developing provably correct Rust code with Verus(amazon.science ↗)
    19comments
  16. Breaking the 1.58-bit Barrier for Ternary LLMs(arxiv.org ↗)
    33comments
  17. A 32-year-old bug walks into a Telnet server(watchtowr.com ↗)
    27comments
  18. The engineering behind the US Strategic Petroleum Reserve(johnjwang.com ↗)
    79comments
  19. Online Z3 Guide(microsoft.github.io ↗)
    discuss
  20. The Return of Sail Power: Cargo Ships Are Turning Back to the Wind(gcaptain.com ↗)
    61comments
  21. Show HN: An e-ink frame that hears birds and draws them as 1800s illustrations(github.com/arnegiacomo ↗)
    243comments
  22. AWS says it can't restore some data from mideast facilities struck by Iran(wsj.com ↗)
    342comments
  23. HarnessTax: How Much Does the Harness Matter for Coding Agents?(harnesstax.github.io ↗)
    53comments
  24. Performance Improvements in .NET 11(devblogs.microsoft.com/dotnet ↗)
    64comments
  25. Back to the future: modules for Guix packages (2022)(guix.info ↗)
    1comments
  26. Japan's book scene is moving from bookstores to libraries(untranslatedjp.substack.com ↗)
    79comments
  27. PCB is brought to you by Fable 5(a6mzero.com ↗)
    53comments
  28. OpenSpec – A lightweight and configurable AI spec framework(openspec.dev ↗)
    63comments
  29. Reversing Factorio's RNG(gegell.github.io ↗)
    34comments
  30. Anecdotally, programmers dislike "reduce"(evanhahn.com ↗)
    234comments

My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

119 pointsby 1d agojakeasmith.com
24 comments
1d agoHN ↗

Author here, happy to answer any questions. I never imagined a polyfill for http_build_url would gain so much traction. After 12 years, deprecating it feels like the right move, especially given the new options from the community and PHP itself.

1h agoHN ↗

what a broken ecosystem.. The crazy thing is not that the package exists, but that it is used by JS devs.

1h agoHN ↗

There’s a bit more nuance as to why. It’s not fair to say that the average JS dev is reaching for a package like is-odd/is-even.

Years ago when npm was just getting started there was a lot of experimentation and land grabbing for packages. A few “prolific” developers were pushing these tiny utilities and then using them in their own projects which ended up being required as deps in other projects and then snowballed into is-odd being included in webpack at some point (I think I have that timeline roughly correct).

It’s still a crappy problem for sure but it’s not fair to paint most JS devs with a brush so broad.

1h agoHN ↗

I feel like I have to remind people of this quite often, but the history is such that npm was lightweight at one point, bundling wasn't a thing, and while `isodd`/`iseven` are of course silly, things like `isarray` were not functions that existed back then (we didn't have Array.isArray). `typeof [] === 'object'` in JS, so e.g. my package `is-arrayish` checked for a similar structure to an array (whereas Id guess `isarray` checked for the prototype). `isarray` failed for the `arguments` keyword, which was needed for variadics before argument spreads were added to the language I believe in ES5.

So of course they don't make sense now. But they were created for a reason. Before even Markov chains were a fad - let alone LLMs - we were trying to be as efficient as possible and maximize code reuse I stead of writing the same helper functions over and over again. That's what you're seeing.

58m agoHN ↗

I hate to bring politics into such discussions, but this thought struck me as funny.

The hubris of humanity... what you're describing is akin to the US Constitution and the Founding Father's goals, ending in Donald Trump.

Node is the same horror.

Nice ideas, great premise, and all turned to garbage in the end.

57m agoHN ↗

I think a lot of things end up that way, just at different timescales. Best we can do is learn from them and start again, IMO - however that looks.

44m agoHN ↗

"The road to Hell is paved with good intentions". Still true, probably thousands of years after the sentence was coined.

56m agoHN ↗

I’d say the deciding factor is that it has bugs where both fixing and not fixing them can have a negative impact. If there were no known bugs and there was no harm in using it, I’d probably just leave it there and not disturb anything, given that its use is so widespread, and instead merely note in the documentation that its purpose has become obsolete.

16m agoHN ↗

From the article:

So I had a decision to make. I could dive back into PHP after almost a decade away, hand the package to one of the people who’d offered, or let it keep sitting there.

We are in the AI era. As a maintainer of an open source project that I haven't touched for years, I would first start by asking an AI to produce a fix for the issue and check what it proposes. This definitely reduces the mental load and risk of breaking an old codebase that so many users depend on.

Deprecating the project is playing the open source game in an other dimension: tell the word that depending on this project was a bad idea in the first place and that everyone should move on. But releasing a fix on a deprecated project is fine too.

So both actions are on different dimensions, this isn't a choice between 2 options.

4h agoHN ↗

We used to work together at AOL. Glad to see you on here; I hope you're doing great!

3h agoHN ↗

Reading this threw me back to 2014 - how was working for AOL back then?

2h agoHN ↗

It hasn't been updated in 11 years. Not sure I'd call that "keeping it alive".

9m agoHN ↗

It doesn't seem to have gone moldy considering how many people have installed it in recent time.

3h agoHN ↗

There is nothing as permanent as a temporary fix that works.

3h agoHN ↗

For a package with that kind of install base, is there a final release that prints the migration options in a deprecation notice? People will find it years from now through old Stack Overflow answers.

3h agoHN ↗

The package is marked as abandoned on Packagist [1]

This package is abandoned and no longer maintained. No replacement package was suggested.

Both adding it as a dependency using composer and installing it from a lockfile results in:

    $ composer require jakeasmith/http_build_url
    […]
    Package jakeasmith/http_build_url is abandoned, you should avoid using it. No replacement was suggested.
    […]
    $ rm -r vendor/
    $ composer install
    […]
      - Installing jakeasmith/http_build_url (1.0.2): Extracting archive
    Package jakeasmith/http_build_url is abandoned, you should avoid using it. No replacement was suggested.
    […]

[1] https://packagist.org/packages/jakeasmith/http_build_url

1h agoHN ↗

Reading this made me really nostalgic. I cut my teeth in web/software dev in the Laravel 5.x days, and it's quite jarring comparing the day-to-day we have now with back then!

1h agoHN ↗

Should the repo be archived?

I rarely see people use that feature yet tons of repos on Github are essentially dead.

14m agoHN ↗

+1 on this - Jake's done the best thing with deprecating the package (which shows up locally in tooling and will also be surfaced by static analysis tooling (ie security vendors) based on that, but also archiving the repo indicates it to anyone who lands on the repo

24m agoHN ↗

Crazy that the bug went unnoticed. So many sites must have been broken by the "a" bug.

17m agoHN ↗

Thanks for pointing this out. I used PHP for one of my professional projects and never came through this - maybe because the library was not a part of our codebase.

This article will be very useful for people who might shift back to older PHP versions for compatibility and face it.