frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

My Home Fibre Network Disintegrated

https://alienchow.dev/post/fibre_disintegration/
80•alienchow•2h ago•52 comments

'The answer cannot be nothing': The battle over Canada's mystery brain disease

https://www.bbc.com/news/articles/c623r47d67lo
66•lewww•1h ago•21 comments

Show HN: Ferrite – Markdown editor in Rust with native Mermaid diagram rendering

https://github.com/OlaProeis/Ferrite
106•OlaProis•4h ago•37 comments

The Concise TypeScript Book

https://github.com/gibbok/typescript-book
9•javatuts•59m ago•1 comments

Finding and fixing Ghostty's largest memory leak

https://mitchellh.com/writing/ghostty-memory-leak-fix
363•thorel•11h ago•72 comments

Show HN: I used Claude Code to discover connections between 100 books

https://trails.pieterma.es/
291•pmaze•13h ago•84 comments

CPU Counters on Apple Silicon: article + tool

https://blog.bugsiki.dev/posts/apple-pmu/
42•verte_zerg•3d ago•0 comments

A Year of Work on the Arch Linux Package Management (ALPM) Project

https://devblog.archlinux.page/2026/a-year-of-work-on-the-alpm-project/
34•susam•4h ago•0 comments

Open Chaos: A self-evolving open-source project

https://www.openchaos.dev/
352•stefanvdw1•14h ago•72 comments

Show HN: Librario, a book metadata API that aggregates G Books, ISBNDB, and more

89•jamesponddotco•6h ago•29 comments

Show HN: VAM Seek – 2D video navigation grid, 15KB, zero server load

https://github.com/unhaya/vam-seek
15•haasiy•3h ago•0 comments

'Bandersnatch': The Works That Inspired the 'Black Mirror' Interactive Feature (2019)

https://www.hollywoodreporter.com/tv/tv-news/black-mirror-bandersnatch-real-life-works-influences...
4•rafaepta•5d ago•0 comments

Code and Let Live

https://fly.io/blog/code-and-let-live/
281•usrme•1d ago•103 comments

Eulogy for Dark Sky, a data visualization masterpiece (2023)

https://nightingaledvs.com/dark-sky-weather-data-viz/
416•skadamat•18h ago•168 comments

AI is a business model stress test

https://dri.es/ai-is-a-business-model-stress-test
224•amarsahinovic•13h ago•230 comments

Ripple: The Elegant TypeScript UI Framework

https://jsdev.space/meet-ripple/
6•javatuts•2h ago•4 comments

Show HN: Play poker with LLMs, or watch them play against each other

https://llmholdem.com/
96•projectyang•11h ago•47 comments

An Experimental Approach to Printf in HLSL

https://www.abolishcrlf.org//2025/12/31/Printf.html
11•ibobev•3d ago•0 comments

Overdose deaths are falling in America because of a 'supply shock': study

https://www.economist.com/united-states/2026/01/08/why-overdose-deaths-are-falling-in-america
109•marojejian•10h ago•75 comments

Brands upset Buy For Me is featuring their products on Amazon without permission

https://www.modernretail.co/technology/brands-are-upset-that-buy-for-me-is-featuring-their-produc...
76•spenvo•4d ago•47 comments

Show HN: PrintReadyBook

https://printreadybook.com/
8•cboulio•2h ago•2 comments

Datadog, thank you for blocking us

https://www.deductive.ai/blogs/datadog-thank-you-for-blocking-us
57•binarylogic•1d ago•28 comments

Sisyphus Now Lives in Oh My Claude

https://github.com/Yeachan-Heo/oh-my-claude-sisyphus
16•deckardt•4h ago•11 comments

Workers at Redmond SpaceX lab exposed to toxic chemicals

https://www.fox13seattle.com/video/fmc-w1ga4pk97gxq0hj5
68•SilverElfin•3h ago•6 comments

Show HN: mcpc – Universal command-line client for Model Context Protocol (MCP)

https://github.com/apify/mcp-cli
31•jancurn•4d ago•3 comments

Visual regression tests for personal blogs

https://marending.dev/notes/visual-testing/
5•beingflo•4d ago•2 comments

Code Is Clay

https://campedersen.com/code-is-clay
54•ecto•10h ago•26 comments

ChatGPT Health is a marketplace, guess who is the product?

https://consciousdigital.org/chatgpt-health-is-a-marketplace-guess-who-is-the-product/
262•yoaviram•2d ago•251 comments

ASCII-Driven Development

https://medium.com/@calufa/ascii-driven-development-850f66661351
113•_hfqa•2d ago•71 comments

Kodbox: Open-source cloud desktop with multi-storage fusion and web IDE

https://github.com/kalcaddle/kodbox
13•indigodaddy•5h ago•0 comments
Open in hackernews

Httpz – Zero-Allocation HTTP/1.1 Parser for OxCaml

https://github.com/avsm/httpz
79•noelwelsh•3d ago

Comments

avsm•15h ago
(author here) I'm just adding data-race free parallelism support to this right now to switch my website over to using it! For those familiar with OCaml syntax, the OxCaml parse function is fun:

    val parse : buffer -> len:int -> #(status * request * header list) @ local
This takes in a buffer and returns an unboxed tuple on the stack, so there's no GC activity involved beyond stack management for each HTTP request.

https://github.com/avsm/httpz/blob/main/lib/httpz.mli#L154

cdaringe•14h ago
Interesting parser, fun to read.
henearkr•11h ago
Oh I got the joke! (I'm pretty sure it was intended)

Yes a parser is a fun to read ;)

ptrwis•12h ago
Doesn't (honest question) the operating system kernel prevent data races in memory accesses at the level of system calls like brk? I wonder at what level the operating system handles such things?
ptrwis•12h ago
I mean, aren't system calls thread-safe?
spooneybarger•8h ago
As a general rule, not all system calls are thread safe.
gethly•14h ago
ocaml looks more like a spec than actual code.
beckford•14h ago
If you were looking at the parse link in the author's comment, you were looking at a spec (called a module interface in OCaml/OxCaml, similar to an interface in Java). The parse implementation is at https://github.com/avsm/httpz/blob/240051dd5f00281b09984a14a...

That said, I would be happy if all I needed to type in was a spec.

nospice•13h ago
"Zero heap allocations: Parser results are stack-allocated using OxCaml unboxed records and local lists" - honest question, why?

On almost any platform on which you want to run a HTTP server - including bare metal - it usually doesn't matter if you keep state near the stack pointer or not. What matters is that you use it well, making it play well with CPU caches, etc. Or is there something specifically horrible about OxCaml's heap allocator?

avsm•13h ago
In a conventional GCed language, you need to minimise heap allocations to avoid putting too much pressure on the garbage collector. The OxCaml extensions allows values to be passed 'locally' (that is, on the callstack) as an alternative to heap allocation. When the function returns, the values are automatically deallocated (and the type system guarantees safety).

This means that I can pass in a buffer, parse it, do my business logic, and then return, without ever allocating anything into the global heap. However, if I do need to allocate into it (for example, a complex structure), then it's still available.

It's kind of Rust in reverse: OxCaml has a GC by default, but you can write very high-performance code that effectively never uses a GC. There's also emerging support for data-race-free parallelisation as well.

The webserver I'm putting together also uses io_uring, which provides zero-copy buffers from kernel to userspace. The support for one-shot effect handlers in OCaml allows me to directly resume a blocked fiber straight from the io_uring loop, and then this httpz parser operates directly on that buffer. Shared memory all the way with almost no syscalls!

ori_b•11h ago
Unboxed records are fine, but stack-allocated lists make me nervous. What happens when someone gives you 8 megs of headers, and you run out of stack?

This code seems to put a 32k limit on it, but it's a manual check and error return. What about code that forgets to manually add that limit, or sets it too high? How do you decide when to bump that limit, since 32k is an artificial constraint?

outpost_mystic2•10h ago
By default in oxcaml, "stack" / local allocations happen in a separate stack on the heap (which the runtime allocates for you). If you allocate enough to exceed that capacity, it will resize it dynamically for you.
naasking•8h ago
So stack-local arena. Neat.
noelwelsh•10h ago
I think there are several advantages of stack allocation:

* freeing stack allocated memory is O(1) with a small constant factor: simply set the stack pointer to a new location. In a generational garbage collector, like OCaml, minor garbage collection is O(amount of retained memory) with a larger constant factor.

* judiciously stack allocating memory can improve data locality.

* unboxed data takes up less space, again improving locality.

Overall, I think this about improving constant factors---which makes a big difference in practice!

infamouscow•13h ago
I'm excited to see what comes of OxCaml the next few years.
messe•11h ago
> Local lists (@ local): Header list grows on the stack, not heap

Does this mean unbounded stack growth? I'd much rather heap allocation if that's the case, as at least that can be recovered from in the case of allocation failure (assuming your OS, language, and stdlib allow for it).

avsm•11h ago
This particular iteration is unbounded, but the next step is to pass in a GADT argument to specify which headers the application wants, so only those are parsed into a heterogenous tuple.
messe•10h ago
That sounds like a rather elegant solution to it.
spooneybarger•7h ago
The OxCaml work is great. I don't use OCaml much but I have been following along with OxCaml as they are doing fascinating work that leverages a lot of research that interests me.