frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

What's wrong with the JSON gem API?

https://byroot.github.io/ruby/json/2025/08/02/whats-wrong-with-the-json-gem-api.html
36•ezekg•4h ago

Comments

ezekg•4h ago
First thing we could do here is rename the JSON.parse :symbolize_names keyword to :symbolize_keys -- always trips me up for some reason.
athorax•3h ago
Why? JSON is name-value pairs https://www.json.org/json-en.html
ezekg•3h ago
I guess I'm more thinking about Ruby/Rails conventions, e.g. methods like Hash#symbolize_keys.

Mixing the two has always been a smell to me, but maybe you're right.

caseyohara•3h ago
Sure, but JSON.parse returns a Hash, which is key-value pairs. The method argument is about the return value, not the input value, so it is more like "Parse this JSON, and symbolize the keys in the resulting Hash before returning it to me". Plus, as mentioned, symbolize_keys is more conventional.
fuzzy_biscuit•3h ago
Maybe it could just be an alias. People do also refer to them as key-value pairs, so that feels reasonable.
jmull•3h ago
Changing the default behavior for duplicate keys is unnecessary... and therefore should not be done.

IMO, it's nuts to purposely introduce random bugs into the apps of everyone who uses your dependency.

anitil•1h ago
There was a post here recently about how this sort of behaviour on duplicate keys has actually led to security issues (in the context of Go) [0]

[0] https://news.ycombinator.com/item?id=44308953

jmull•42m ago
The issue was triggered by using multiple parsers, with different behaviors.

The change of behavior here would prevent the specific problem, but makes the general problem worse.

This change creates a new code path that did not exist when all the app code was developed and tested, so there's a decent chance something bad can happen that it's not prepared for.

Open models by OpenAI

https://openai.com/open-models/
1356•lackoftactics•8h ago•528 comments

Genie 3: A new frontier for world models

https://deepmind.google/discover/blog/genie-3-a-new-frontier-for-world-models/
1107•bradleyg223•11h ago•404 comments

Spotting base64 encoded JSON, certificates, and private keys

https://ergaster.org/til/base64-encoded-json/
217•jandeboevrie•6h ago•98 comments

Ollama Turbo

https://ollama.com/turbo
239•amram_art•6h ago•145 comments

Create personal illustrated storybooks in the Gemini app

https://blog.google/products/gemini/storybooks/
71•xnx•4h ago•25 comments

Consider using Zstandard and/or LZ4 instead of Deflate

https://github.com/w3c/png/issues/39
125•marklit•8h ago•70 comments

Claude Opus 4.1

https://www.anthropic.com/news/claude-opus-4-1
639•meetpateltech•8h ago•240 comments

Things that helped me get out of the AI 10x engineer imposter syndrome

https://colton.dev/blog/curing-your-ai-10x-engineer-imposter-syndrome/
695•coltonv•11h ago•534 comments

Scientific fraud has become an 'industry,' analysis finds

https://www.science.org/content/article/scientific-fraud-has-become-industry-alarming-analysis-finds
271•pseudolus•14h ago•232 comments

What's wrong with the JSON gem API?

https://byroot.github.io/ruby/json/2025/08/02/whats-wrong-with-the-json-gem-api.html
36•ezekg•4h ago•8 comments

The First Widespread Cure for HIV Could Be in Children

https://www.wired.com/story/the-first-widespread-cure-for-hiv-could-be-in-children/
62•sohkamyung•3d ago•11 comments

Ask HN: Have you ever regretted open-sourcing something?

109•paulwilsonn•3d ago•143 comments

uBlock Origin Lite now available for Safari

https://apps.apple.com/app/ublock-origin-lite/id6745342698
963•Jiahang•16h ago•383 comments

Show HN: Stagewise (YC S25) – Front end coding agent for existing codebases

https://github.com/stagewise-io/stagewise
31•juliangoetze•10h ago•34 comments

Kyber (YC W23) is hiring enterprise account executives

https://www.ycombinator.com/companies/kyber/jobs/6RvaAVR-enterprise-account-executive-ae
1•asontha•4h ago

Build Your Own Lisp

https://www.buildyourownlisp.com/
216•lemonberry•13h ago•58 comments

US reportedly forcing TSMC to buy 49% stake in Intel to secure tariff relief

https://www.notebookcheck.net/Desperate-measures-to-save-Intel-US-reportedly-forcing-TSMC-to-buy-49-stake-in-Intel-to-secure-tariff-relief-for-Taiwan.1079424.0.html
293•voxadam•7h ago•342 comments

Quantum machine learning via vector embeddings

https://arxiv.org/abs/2508.00024
8•adbabdadb•2h ago•0 comments

Injecting Java from native libraries on Android

https://octet-stream.net/b/scb/2025-08-03-injecting-java-from-native-libraries-on-android.html
3•todsacerdoti•2d ago•0 comments

Los Alamos is capturing images of explosions at 7 millionths of a second

https://www.lanl.gov/media/publications/1663/dynamics-of-dynamic-imaging
104•LAsteNERD•10h ago•86 comments

Cow vs. Water Buffalo Mozzarella

http://itscheese.com/reviews/mozzarella
19•indigodaddy•3d ago•17 comments

Under the Hood of AFD.sys Part 1: Investigating Undocumented Interfaces

https://leftarcode.com/posts/afd-reverse-engineering-part1/
24•omegadev•2d ago•5 comments

The mystery of Winston Churchill's dead platypus was finally solved

https://www.bbc.com/news/articles/cglzl1ez283o
43•benbreen•2d ago•7 comments

AI is propping up the US economy

https://www.bloodinthemachine.com/p/the-ai-bubble-is-so-big-its-propping
113•mempko•5h ago•129 comments

Cannibal Modernity: Oswald de Andrade's Manifesto Antropófago (1928)

https://publicdomainreview.org/collection/manifesto-antropofago/
20•Thevet•2d ago•3 comments

Tell HN: Anthropic expires paid credits after a year

176•maytc•23h ago•87 comments

No Comment (2010)

https://prog21.dadgum.com/57.html
60•ColinWright•10h ago•50 comments

Eleven Music

https://elevenlabs.io/blog/eleven-music-is-here
164•meetpateltech•9h ago•204 comments

Apache ECharts 6

https://echarts.apache.org/handbook/en/basics/release-note/v6-feature/
261•makepanic•18h ago•30 comments

GitHub pull requests were down

https://www.githubstatus.com/incidents/6swp0zf7lk8h
113•lr0•9h ago•150 comments