frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Repair-JSON-stream – Fix broken JSON from LLM streaming (1.7x faster)

https://github.com/prxtenses/repair-json-stream
1•prxtenses•2h ago
I've been building LLM-powered apps and kept hitting the same problem: when you stream JSON from OpenAI/Anthropic, it arrives incomplete mid-generation.

{"message": "I'm currently generating your resp

JSON.parse dies. You either wait for the full response (slow) or try to parse incrementally (hard). I wrote a single-pass state machine that repairs broken JSON as chunks arrive.

Technical approach: - Zero external dependencies - everything from scratch - No regex (avoids ReDoS vulnerabilities) - O(n) single-pass processing - Stack-based context tracking - Character classification via bitmask lookup table - Works in Node.js, Deno, Bun, browsers, Cloudflare Workers

What it handles: - Truncated strings and unclosed brackets - Python constants (None, True, False) - Single quotes, trailing commas, unquoted keys - JSONP wrappers, MongoDB types (NumberLong) - LLM "thinking" blocks and markdown fences - String concatenation ("a" + "b")

The streaming benchmark shows 1.7x faster than jsonrepair - we avoid re-parsing the entire document on each chunk. 7KB minified. TypeScript-first with full type definitions.

Curious what edge cases others have hit - always looking to improve coverage.

My ideal Linux source package format (at the moment)

https://utcc.utoronto.ca/~cks/space/blog/linux/MyIdealSourcePackageFormat
1•zdw•1m ago•0 comments

What Happened in 2025

https://avc.xyz/what-happened-in-2025
1•gz5•2m ago•0 comments

Ask HN: What 2026 changes are journalists missing when covering new costs laws?

1•criticalmathq•2m ago•0 comments

Vision Import for PDFs

https://revise.io/guide/pdf-import
1•artursapek•2m ago•0 comments

The Year I Started Writing Code, Again

https://hackpravj.com/blog/the-year-i-started-writing-code-again/
1•pravj•3m ago•1 comments

Show HN: Circuit Artist –Circuit simulator with propagation animation and rewind

https://github.com/lets-all-be-stupid-forever/circuit-artist
2•rafinha•6m ago•0 comments

Top Visualizations of 2025

https://www.visualcapitalist.com/our-top-25-visualizations-of-2025/
1•Kaibeezy•6m ago•0 comments

One Formula That Demystifies 3D Graphics

https://www.youtube.com/watch?v=qjWkNZ0SXfo
1•msephton•7m ago•0 comments

Show HN: Dockerized benchmark suite for Sharp vs. Lazy-Image (Rust-based)

https://github.com/albert-einshutoin/lazy-image-test
2•einshutoin•14m ago•1 comments

Field Mapping Along Java's West Coast

https://www.openstreetmap.org/user/rphyrin/diary/408015
1•altilunium•17m ago•0 comments

Messages in bottles across the digital sea

https://adrift.today/
2•icyfox•19m ago•0 comments

The seventh-largest Spanish company

https://en.wikipedia.org/wiki/Mondragon_Corporation
1•whitehexagon•19m ago•0 comments

Show HN: Chaos Engineering for AI Agents

https://github.com/deepankarm/agent-chaos
1•deepankarm44•21m ago•1 comments

Show HN: Eimi – Turn any information into daily cards

https://eimi.tech
2•xjconlyme•22m ago•0 comments

Oil Tanker Pursued by the U.S. Appears to Claim Russian Protection

https://www.wsj.com/politics/national-security/oil-tanker-pursued-by-the-u-s-appears-to-claim-rus...
1•JumpCrisscross•23m ago•0 comments

2026: The Year of Java in the Terminal

https://xam.dk/blog/lets-make-2026-the-year-of-java-in-the-terminal/
4•based2•23m ago•1 comments

Scaffolding to Superhuman: How Curriculum Learning Solved 2048 and Tetris

https://kywch.github.io/blog/2025/12/curriculum-learning-2048-tetris/
13•a1k0n•25m ago•0 comments

Trump administration removes three spyware-linked executives from sanctions list

https://www.reuters.com/business/trump-administration-removes-three-spyware-linked-executives-san...
5•campuscodi•27m ago•0 comments

Desktop-2FA: offline desktop application for generating, managing TOTP 2FA codes

https://github.com/wrogistefan/desktop-2fa
1•thunderbong•27m ago•1 comments

A man taking over the Large Hadron Collider – only to switch it off

https://www.theguardian.com/science/2025/dec/31/large-hadron-collider-head-of-cern-mark-thomson
1•spopejoy•29m ago•0 comments

Built a local-first crypto P&L and TurboTax Online export tool (open source)

1•metalusmonk•30m ago•0 comments

Trump Signs Defense Bill Prohibiting China-Based Engineers in Pentagon IT Work

https://www.propublica.org/article/trump-law-microsoft-digital-escort-ban-china
4•_____k•30m ago•1 comments

What I learned building an opinionated and minimal coding agent

https://mariozechner.at/posts/2025-11-30-pi-coding-agent/
1•PaulHoule•30m ago•0 comments

The Compiler Is Your Best Friend, Stop Lying to It

https://blog.daniel-beskin.com/2025-12-22-the-compiler-is-your-best-friend-stop-lying-to-it
2•based2•32m ago•0 comments

Playing to Lose

https://powering-the-planet.ghost.io/playing-to-lose/
1•DamonHD•32m ago•0 comments

The Cost of a Closure in C, the Rest

https://thephd.dev/the-cost-of-a-closure-in-c-c2y-followup
3•gsky•32m ago•0 comments

Autonomous Medical Officer Support Software on the ISS (2024)

https://ntrs.nasa.gov/citations/20240012964
2•StatsAreFun•33m ago•0 comments

PS5 ROM Keys

https://www.psdevwiki.com/ps5/Keys#PS5_ROM_Keys
4•m00dy•34m ago•0 comments

What Is Apache Spark: Complete 2026 Guide to AI-Native Big Data Processing

https://www.netcomlearning.com/blog/apache-spark
3•based2•35m ago•0 comments

The HSBC app refuses to work if "Bitwarden" is installed on user's Android phone

https://twitter.com/nixcraft/status/2006133658495656377
2•fortran77•35m ago•3 comments