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?

Show HN: Startup ideas from customer complaints, in seconds instead of months

https://blink-ideas-web.onrender.com/
1•drewgallagher•49s ago•0 comments

Disney+ Cracks Open the Door to TikTok Creator Videos

https://www.nytimes.com/2026/08/05/business/media/disney-tiktok-videos.html
1•bookofjoe•2m ago•1 comments

Show HN: VS Code Extension – Semantic Code Search (Semble)

https://github.com/SeanPedersen/vscode-semble
1•sean_pedersen•4m ago•0 comments

The Moon is Down; I have not heard the clock (2021)

https://www.lesswrong.com/posts/7nAvPLfidGG54XquJ/the-moon-is-down-i-have-not-heard-the-clock
2•Ariarule•5m ago•0 comments

OpenDoctrines, open source grand strategy game moddable via WASM in 13 languages

https://github.com/Pr1nted/Open-Doctrines
2•Pr1nted•10m ago•1 comments

I built fingerprint unlock for Mac (no Magic Keyboard) [video]

https://www.youtube.com/watch?v=tB3lk-PNA6I
1•Timothee•16m ago•0 comments

How much faster could racehorses get?

https://www.worksinprogress.news/p/why-horses-have-stopped-getting-faster
1•jprs•17m ago•0 comments

Show HN: Plan Review – independent review for Claude Code plans

https://github.com/dachev/plan-review
1•blago•18m ago•0 comments

Show HN: BlazeRules – YAML rule engine for streaming data, upto 5M records/SEC

1•jspuri•20m ago•0 comments

What it takes to build agent infrastructure yourself

https://twitter.com/harsehaj/status/2079593790814527998
1•gmays•24m ago•0 comments

Simon Willison on Technical Blogging

https://writethatblog.substack.com/p/simon-willison-on-technical-blogging
3•herbertl•24m ago•1 comments

Open source Cloud AI agents

https://www.krowoc.com/
1•nikonruslan7•28m ago•0 comments

The following is a valid DOS COM executable

https://oldbytes.space/@gloriouscow/117045701876951834
1•birdculture•28m ago•0 comments

PLS Try My OS

https://sites.google.com/view/taco-so-test/home
3•TACOCODER•34m ago•1 comments

New Orleans will use AI to answer 911 calls instead of a human

https://www.shreveporttimes.com/story/news/local/louisiana/2026/07/28/is-new-orleans-using-ai-to-...
10•champagnepapi•37m ago•3 comments

Equity Is Worth More Than Cash Because of Optionality

https://peter.website/equity-beats-cash
1•shachaf•37m ago•0 comments

The Investors Whose SpaceX Shares Vanished Before They Could Cash In

https://www.wsj.com/finance/stocks/spacex-ipo-spv-investors-2698a174
2•chirau•38m ago•2 comments

Space to cook: notes on engineering leadership

https://ianmccrystal.com/posts/notes-on-engineering-leadership/
1•ogundipeore•43m ago•0 comments

Hardware Devices That Support GNU/Linux

https://www.fsf.org/resources/hw/
1•Vanessaroulette•43m ago•0 comments

Obviously, DOGE Did Not Save Money

https://www.nationalreview.com/corner/obviously-doge-did-not-save-money/
3•petethomas•44m ago•0 comments

Dictionary Compression in Materialize

https://materialize.com/blog/dictionary-compression-in-materialize/
1•nate_stewart•44m ago•0 comments

I got a 1998 CD-ROM world atlas running on Windows 11

https://trevmex.com/post/824245295374303232/my-son-found-a-world-atlas-in-a-thrift-store-so-i
1•ilimllza•44m ago•0 comments

Meta fined $567M in largest child safety ruling against social media giant

https://www.bbc.com/news/articles/cd7lz3wr2rlo
5•tartoran•45m ago•0 comments

New Mexico court orders Meta to pay $567M over harms to children's mental health

https://www.theguardian.com/technology/2026/aug/06/new-mexico-court-meta
3•devonnull•45m ago•0 comments

Curating Crime and Punishment: What 10 Images Reveal About American Justice

https://www.themarshallproject.org/2026/08/06/crime-punishment-america-photos-archive
1•greenie_beans•45m ago•0 comments

European firms afraid of US tech kill switch but haven't made an escape plan

https://www.theregister.com/off-prem/2026/08/06/european-firms-afraid-of-us-tech-kill-switch-but-...
1•gpi•46m ago•0 comments

All Agent Skills

https://allagentskills.com
3•Diablo556•46m ago•0 comments

Tracely – Turn AI agent production failures into CI regression tests

https://tracely-studio.xyz/
2•jwuthri•49m ago•0 comments

The Code Shackle

https://codeshackle.com
2•kallisti5•55m ago•1 comments

I launched a fake deodorant brand to see if AI would notice

https://xcancel.com/antibot/captcha
3•glaslong•56m ago•1 comments