frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•1y ago

Comments

nine_k•1y ago
> Introducing the ‘packed’ data format, a binary format that allows using data as it is, without the need for a deserialisation step. A notable perk of this format is that traversals on packed trees is proven to be faster than on ‘unpacked’ trees: as the fields of data structures are inlines, there are no pointer jumps, thus making the most of the L1 cache.

That is, a "memory dump -> zero-copy memory read" of a subgraph of Haskell objects, allowing to pass such trees / subgraphs directly over a network. Slightly reminiscent of Cap'n Proto.

90s_dev•1y ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•1y ago
They mention this in the article.
spockz•1y ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•1y ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•1y ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•1y ago
> the serialised version of the data is usually bigger than its in-memory representation

I don’t think this is common. Perhaps for arrays of floats serialized as JSON or something. But I can’t think of a case where binary serialization is bigger. Data types like maps are necessarily larger in memory to support fast lookup and mutability.

nine_k•1y ago
I suppose all self-describing formats, like protobuf, or thrift or, well, JSON are bigger than the efficient machine representation, because they carry the schema in every message, one way or another.
IsTom•1y ago
If you use a lot of sharing in immutable data it can grow a lot when serializing. A simple pathological example would be a tree that has all left subtrees same as the right ones. It takes O(height) space in memory, but O(2^height) when serialized.
gitroom•1y ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•1y ago
This was very well written. Excellent article!
NetOpWibby•1y ago
Is this like MessagePack for Haskell?

Would SpaceXAI Acquire Vercel?

https://twitter.com/jessethanley/status/2093298774949146796
1•eyehurtsme•1m ago•0 comments

Pdfboss – fast rust-based pdf library, with Python bindings

https://pdfboss.dev
1•ransomware•2m ago•0 comments

TwitterWebViewer has been permanently discontinued

4•avidruntime•3m ago•0 comments

Claude Max for OSS developer plan of Matz (Ruby) is running out

https://twitter.com/yukihiro_matz/status/2093347403101589618
1•tosh•3m ago•0 comments

Archil Persistent Sandboxes

https://archil.com/post/introducing-persistent-sandboxes
1•dhorthy•5m ago•0 comments

Ask HN: How do we get our US Cellular (T-Mobile?) phone number back? (complex)

1•CoryMO•5m ago•0 comments

Reflexio: Reduce task failure by 36% while saving token by more than 50%

https://www.reflexio.ai
1•yilu331•5m ago•1 comments

Dimethylmercury Poison MIT

https://whdh.com/news/first-on-7-patient-brought-to-mgh-for-exposure-to-chemical-substance-prompt...
2•dukefishron•8m ago•0 comments

What Hanging from a Bar for 30 Seconds Can Do for Your Body

https://time.com/article/2026/08/25/hanging-from-bar-benefits/
2•mooreds•8m ago•0 comments

Build with Muse Image: generate, edit, and compose images on Meta Model API

https://developer.meta.com/ai/resources/blog/build-with-muse-Image/
2•mfiguiere•9m ago•0 comments

Show HN: SplatIt. Self-hosted game servers for Splatoon on Wii U

https://github.com/oxixes/splatit
1•oxixes•9m ago•0 comments

Spotify Backstage Meet LiteLLM for Corporate AI Governance

https://github.com/acarmisc/backstage-plugin-litellm-govai
1•acarmisc•11m ago•0 comments

Sonic Pi

https://sonic-pi.net/
1•Bluestein•11m ago•0 comments

Claude: Free Plan for Scientists

https://claude.com/programs/team-plan-for-scientists
1•tosh•11m ago•0 comments

Accel-SIM 2.0: Validated GPU Simulation with Full Hopper Support

https://github.com/accel-sim/accel-sim-framework
1•matt_d•11m ago•0 comments

France opens door to fighter jet cooperation with Sweden

https://www.politico.eu/article/france-doesnt-rule-out-fighter-jet-cooperation-with-sweden-dassau...
1•madspindel•14m ago•0 comments

A Little Less Software Clutter

https://aradar.top/posts/targz-manager/
2•aradar46•19m ago•0 comments

Vertical Tornado/Waterspout [video]

https://www.youtube.com/watch?v=r9IH8ohS-X4
2•Eridanus2•20m ago•0 comments

CSVLint helps you to check that your CSV file is readable

https://csvlint.io/
2•amai•21m ago•0 comments

Ask HN: AI writes better code than me. How to keep my identity?

4•jdw64•22m ago•2 comments

Show HN: Blast – Open-source sandbox-as-a-service

https://github.com/stanford-mast/blast
2•calebhwin•22m ago•0 comments

Researchers Put Spinach into Bread and Saw the Body's Insulin Response Change

https://www.sciencealert.com/researchers-put-spinach-directly-into-bread-and-saw-the-bodys-insuli...
3•downbad_•23m ago•0 comments

U.K. Supreme Court Opens Door for Spyware Victims to Sue Foreign States

https://www.lawfaremedia.org/article/u.k.-supreme-court-opens-door-for-spyware-victims-to-sue-for...
6•hn_acker•24m ago•0 comments

WAL and S3: Lakebase storage for the era of agents

https://neon.com/blog/wal-s3-lakebase-storage-for-the-era-of-agents
2•kunalsin9h•24m ago•0 comments

PJ Harvey Tuesday #5

https://therumpus.net/2013/11/26/pj-harvey-tuesday-5-this-mess-were-in/
2•jruohonen•24m ago•0 comments

Artwork-TUI – spreadsheet-driven generative art tool in the terminal

https://github.com/andri-berger/artwork-tui
2•barney100•25m ago•0 comments

Brain Doesn't Think in Words

https://news.mit.edu/2026/separating-logic-and-language-0708
3•myelinscience•25m ago•1 comments

Firekeep

https://github.com/kapella-hub/FirekeepHQ
2•kapella•27m ago•0 comments

Origami Projector: a Glitch-like app for site editing

https://jan.miksovsky.com/posts/2026/08-28-origami-projector.html
2•Tomte•28m ago•0 comments

Disturbed loners probably pose an exponentially increasing threat to society

https://stefankelly.substack.com/p/disturbed-loners-probably-pose-an
3•pressentiment•28m ago•1 comments