frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•9mo ago

Comments

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

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

carterschonwald•9mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•9mo 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•9mo 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•9mo 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•9mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•9mo ago
This was very well written. Excellent article!
NetOpWibby•9mo ago
Is this like MessagePack for Haskell?

CG/SQL – SQL dialect compiler to C for sqlite3 mimicking stored procedures

https://ricomariani.github.io/CG-SQL-author/
1•linkdd•1m ago•0 comments

The AI Memory Solution We All Need (No, It's Not OpenClaw)

https://chrislema.com/the-ai-memory-solution-we-all-need-no-its-not-openclaw/
1•Manik_agg•2m ago•0 comments

Show HN: Windows tray app for monitoring Claude Code limits in WSL

https://github.com/sr-kai/claudeusagewin
1•Nlupus•6m ago•0 comments

Gaming market melts down after Google reveals new AI game design tool

https://www.tomshardware.com/video-games/gaming-market-melts-down-after-google-reveals-new-ai-gam...
1•thunderbong•9m ago•0 comments

Contracts in Nix

https://sraka.xyz/posts/contracts.html
1•todsacerdoti•11m ago•0 comments

Pi: The Minimal Agent Within OpenClaw

https://lucumr.pocoo.org/2026/1/31/pi/
1•tosh•14m ago•1 comments

Show HN: Drizzle-docs-generator – Generate database docs from Drizzle schemas

https://github.com/rikeda71/drizzle-docs-generator
1•rikeda71•14m ago•0 comments

A New LLM System for Synthesis Planning

https://www.science.org/content/blog-post/new-llm-system-synthesis-planning
1•u1hcw9nx•17m ago•0 comments

Free software that converts DOS computers into a cash register

https://www.facebook.com/daleharrispos
2•xupybd•22m ago•2 comments

Atomic Commits for AI Agents

https://raine.dev/blog/atomic-commits-for-ai-agents/
2•rane•22m ago•0 comments

nanochat can now train GPT-2 grade LLM for –$73 (3 hours on single 8XH100 node)

https://twitter.com/karpathy/status/2017703360393318587
1•tosh•23m ago•0 comments

Coding Agent VMs on NixOS with Microvm.nix

https://michael.stapelberg.ch/posts/2026-02-01-coding-agent-microvm-nix/
2•secure•23m ago•0 comments

Thomas Nagel: What is it like to be a Bat? [pdf] (1974)

https://www.sas.upenn.edu/~cavitch/pdf-library/Nagel_Bat.pdf
2•bryanrasmussen•24m ago•1 comments

'I spoke to ChatGPT 8 times a day' – Gen Z's loneliness 'crisis'

https://www.bbc.com/news/articles/cg4ewrw2drpo
2•pera•25m ago•0 comments

A Broken Heart

https://allenpike.com/2026/a-broken-heart/
1•memalign•28m ago•0 comments

You Still Struggle with CORS Even After Reading Docs

https://evan-moon.github.io/2020/05/21/about-cors/en/
1•bboydart•28m ago•0 comments

Rethinking the Heritability of Aging

https://www.science.org/doi/10.1126/science.aee3844
1•XzetaU8•30m ago•0 comments

EigenVibe – local, ordinal feed ranking using a persistent "preference manifold"

https://eigenvibe.com/
1•Eidur•31m ago•1 comments

The Book of PF, 4th edition

https://nostarch.com/book-of-pf-4th-edition
1•0x54MUR41•35m ago•0 comments

Humans are the AI Bottleneck [video]

https://www.youtube.com/watch?v=2hcsmtkSzIw
1•jonbaer•37m ago•0 comments

The Tide Pool

https://thetidepool.org/
1•bluesnowmonkey•39m ago•1 comments

Show HN: SearchSound.cloud: Easily find downloadable music from SoundCloud

https://searchsound.cloud/
1•LucaDiba•39m ago•0 comments

Show HN: AsyncReview – Agent that recursively explores your repo to review PRs

https://github.com/AsyncFuncAI/AsyncReview
1•sashimikun•40m ago•0 comments

Vind

https://github.com/loft-sh/vind
2•saiyampathak•47m ago•0 comments

Fela Kuti First African to Get Grammys Lifetime Achievement Award

https://www.aljazeera.com/news/2026/2/1/fela-kuti-becomes-first-african-to-get-grammys-lifetime-a...
2•defrost•49m ago•0 comments

Ask HN: Is There an LLM Captcha?

1•baalimago•53m ago•0 comments

Sad to Say: An AI Creativity Test (The Billy Joel Test)

2•daly•58m ago•1 comments

'Tesla is (still) trying to deceive investors into thinking it has SF robotaxis'

https://electrek.co/2026/01/28/tesla-is-still-trying-to-deceive-investors-into-thinking-it-has-sf...
5•MilnerRoute•1h ago•2 comments

The surprisingly big health benefits of just a little exercise

https://www.nature.com/articles/d41586-026-00237-0
1•XzetaU8•1h ago•0 comments

Vibe Coding Paralysis: When Infinite Productivity Breaks Your Brain

https://twitter.com/francedot/status/2017858253439345092
3•frabonacci•1h ago•1 comments