frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Zram as Swap

https://wiki.archlinux.org/title/Zram#Usage_as_swap
1•seansh•6m ago•0 comments

Green’s Dictionary of Slang - Five hundred years of the vulgar tongue

https://greensdictofslang.com/
1•mxfh•8m ago•0 comments

Nvidia CEO Says AI Capital Spending Is Appropriate, Sustainable

https://www.bloomberg.com/news/articles/2026-02-06/nvidia-ceo-says-ai-capital-spending-is-appropr...
1•virgildotcodes•10m ago•2 comments

Show HN: StyloShare – privacy-first anonymous file sharing with zero sign-up

https://www.styloshare.com
1•stylofront•12m ago•0 comments

Part 1 the Persistent Vault Issue: Your Encryption Strategy Has a Shelf Life

1•PhantomKey•16m ago•0 comments

Show HN: Teleop_xr – Modular WebXR solution for bimanual robot teleoperation

https://github.com/qrafty-ai/teleop_xr
1•playercc7•18m ago•1 comments

The Highest Exam: How the Gaokao Shapes China

https://www.lrb.co.uk/the-paper/v48/n02/iza-ding/studying-is-harmful
1•mitchbob•23m ago•1 comments

Open-source framework for tracking prediction accuracy

https://github.com/Creneinc/signal-tracker
1•creneinc•25m ago•0 comments

India's Sarvan AI LLM launches Indic-language focused models

https://x.com/SarvamAI
2•Osiris30•26m ago•0 comments

Show HN: CryptoClaw – open-source AI agent with built-in wallet and DeFi skills

https://github.com/TermiX-official/cryptoclaw
1•cryptoclaw•28m ago•0 comments

ShowHN: Make OpenClaw respond in Scarlett Johansson’s AI Voice from the Film Her

https://twitter.com/sathish316/status/2020116849065971815
1•sathish316•31m ago•2 comments

CReact Version 0.3.0 Released

https://github.com/creact-labs/creact
1•_dcoutinho96•32m ago•0 comments

Show HN: CReact – AI Powered AWS Website Generator

https://github.com/creact-labs/ai-powered-aws-website-generator
1•_dcoutinho96•33m ago•0 comments

The rocky 1960s origins of online dating (2025)

https://www.bbc.com/culture/article/20250206-the-rocky-1960s-origins-of-online-dating
1•1659447091•38m ago•0 comments

Show HN: Agent-fetch – Sandboxed HTTP client with SSRF protection for AI agents

https://github.com/Parassharmaa/agent-fetch
1•paraaz•40m ago•0 comments

Why there is no official statement from Substack about the data leak

https://techcrunch.com/2026/02/05/substack-confirms-data-breach-affecting-email-addresses-and-pho...
8•witnessme•44m ago•1 comments

Effects of Zepbound on Stool Quality

https://twitter.com/ScottHickle/status/2020150085296775300
2•aloukissas•47m ago•1 comments

Show HN: Seedance 2.0 – The Most Powerful AI Video Generator

https://seedance.ai/
2•bigbromaker•50m ago•0 comments

Ask HN: Do we need "metadata in source code" syntax that LLMs will never delete?

1•andrewstuart•56m ago•1 comments

Pentagon cutting ties w/ "woke" Harvard, ending military training & fellowships

https://www.cbsnews.com/news/pentagon-says-its-cutting-ties-with-woke-harvard-discontinuing-milit...
6•alephnerd•59m ago•2 comments

Can Quantum-Mechanical Description of Physical Reality Be Considered Complete? [pdf]

https://cds.cern.ch/record/405662/files/PhysRev.47.777.pdf
1•northlondoner•59m ago•1 comments

Kessler Syndrome Has Started [video]

https://www.tiktok.com/@cjtrowbridge/video/7602634355160206623
2•pbradv•1h ago•0 comments

Complex Heterodynes Explained

https://tomverbeure.github.io/2026/02/07/Complex-Heterodyne.html
4•hasheddan•1h ago•0 comments

MemAlign: Building Better LLM Judges from Human Feedback with Scalable Memory

https://www.databricks.com/blog/memalign-building-better-llm-judges-human-feedback-scalable-memory
1•superchink•1h ago•0 comments

CCC (Claude's C Compiler) on Compiler Explorer

https://godbolt.org/z/asjc13sa6
2•LiamPowell•1h ago•0 comments

Homeland Security Spying on Reddit Users

https://www.kenklippenstein.com/p/homeland-security-spies-on-reddit
42•duxup•1h ago•10 comments

Actors with Tokio (2021)

https://ryhl.io/blog/actors-with-tokio/
1•vinhnx•1h ago•0 comments

Can graph neural networks for biology realistically run on edge devices?

https://doi.org/10.21203/rs.3.rs-8645211/v1
1•swapinvidya•1h ago•1 comments

Deeper into the shareing of one air conditioner for 2 rooms

1•ozzysnaps•1h ago•0 comments

Weatherman introduces fruit-based authentication system to combat deep fakes

https://www.youtube.com/watch?v=5HVbZwJ9gPE
3•savrajsingh•1h ago•0 comments
Open in hackernews

Just say no to broken JSON

https://lemire.me/blog/2025/07/04/just-say-no-to-broken-json/
8•ingve•7mo ago

Comments

chrisjj•7mo ago
> {"key": "value\nda"}

> My convention is that \n is the one-byte ASCII control character linefeed. This JSON is not valid.

How is this not valid?

rurban•7mo ago
Daniel seems to be pretty confused on this one. All examples produce the correct error response.
orangecat•7mo ago
That confused me too, apparently it needs to be "\\n".
chrisjj•7mo ago
/He/ may need it to be //n, but JSON does not. It is valid. https://jsonlint.com/ confirms.
Doxin•7mo ago
Part of the confusion here is that writing '{"key": "value\nda"}' in python is NOT producing a string like this:

    {"key": "value\nda"}
but instead like this:

    {"key": "value
    da"}
you need to either double-escape it, or use raw strings. In python these both:

    '{"key": "value\\nda"}'
    r'{"key": "value\nda"}'
will produce the following string:

    {"key": "value\nda"}
chrisjj•7mo ago
Correction: \\n
kiitos•7mo ago
In addition to the prior comments re: how the example JSON parse failures are actually correct...

    Let me consider a broken JSON document: `{"key": "value\nda"}`
So using xxd on that input we get

    00000000: 7b22 6b65 7922 3a20 2276 616c 7565 5c6e  {"key": "value\n
    00000010: 6461 227d                                da"}
or as a contiguous hex string 7b226b6579223a2276616c75655c6e6461227d which is definitely valid JSON.

> My convention is that \n is the one-byte ASCII control character linefeed, unless otherwise stated.

That would be the following bytes

    00000000: 7b22 6b65 7922 3a20 2276 616c 7565 0a64  {"key": "value.d
    00000010: 6122 7d                                  a"}
which is for sure invalid JSON, but is also for sure different than the original document.

Transforming the characters `\n` (5c6e) into the character LF (0a) is a function of whatever primitive/type is used to represent the original string literal, and how it gets interpreted by the language in which it is defined.

For example in Go that same `{"key": "value\nda"}` would transform the \n to LF if it's wrapped in double-quotes (and the interior double-quotes appropriately escaped) which would result in a sequence of bytes that are not valid JSON. But it would leave the \n alone if it's wrapped in single backticks, which would result in a sequence of bytes that would be totally valid JSON.

> To avoid technical debt, systems should simply reject invalid JSON.

It seems like every system mentioned in the post... does simply reject invalid JSON. In fact I'm not aware of anything that would accept that invalid JSON... ?

> The problem is not with Python, JavaScript and friends. The problem is with people generating JSON documents where the strings are not escaped. I am telling them to stop doing it.

By this does the author mean "generating JSON documents where the strings are" invalid JSON -- i.e. contain 0x0a? Presumably not, as nobody would get very far if they're producing invalid JSON. So it's probably not this.

Or do they mean where strings are valid JSON that encode \n as 0x5c 0x6e? But this is fine, right? So probably not this either?

Or does the author mean that they expect every \n to be transformed to \\n automatically and universally, i.e. 0x5c 0x5c 0x6e? But that wouldn't make any sense!

Very confusing post.