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?

Escalate hard decisions with the advisor tool

https://code.claude.com/docs/en/advisor
1•mfiguiere•3m ago•0 comments

NYT head of engineering and gaming experience allegedly shot by elderly in-laws

https://www.nbcnews.com/news/us-news/new-york-executive-shot-killed-laws-bay-area-park-police-say...
1•Vaslo•4m ago•0 comments

Made a thing, if you use Grok and Pi check it out. Or scoll on bros

https://github.com/JangMan-J/pi-grok-agent
1•JangManJ•9m ago•1 comments

HouseOS – self-hosted homesystem platform, designed to be operated by agents

https://github.com/boitech-dev/HouseOS
1•owazabi•10m ago•1 comments

Found in translation: the selfless legacy of Eien Ni Hen

https://magnvsrpgjourney.substack.com/p/found-in-translation-the-selfless
1•wk_end•10m ago•0 comments

Range – open a 1 TB AI model in 3 seconds without downloading it

https://getrange.sh/
1•andreygrehov•10m ago•0 comments

How I Made a Zero Dependency Terminal Text Editor in C Using POSIX System Calls

https://111nation.github.io/posts/creating-text-editor/
1•111nation•10m ago•0 comments

Openprinter

https://www.crowdsupply.com/open-tools/openprinter
2•animal_spirits•13m ago•0 comments

Recalld – A memory layer for AI agents that returns only relevant facts

https://recalld.ai/
1•costinu•17m ago•1 comments

When to choose Sonnet over Opus, what it costs, and how to tune it

https://claude.dev/blog/building-with-claude-sonnet-5-5/
2•pretext•18m ago•0 comments

Summary Advice (Churchill, 1940)

https://www.futilitycloset.com/2026/09/26/summary-advice/
1•hoyd•18m ago•0 comments

Walmart promises to never use AI to charge shoppers higher prices

https://corporate.walmart.com/about/everyday-affordability/letter-from-our-ceo
1•DeepLogin•19m ago•1 comments

Oil Rises as Strait of Hormuz Talks Stall

https://coinmarketcap.com/community/post/379677190/
1•joeymabia1•20m ago•1 comments

Bioenergetic Landscapes

https://worldsensorium.com/bioenergetic-landscapes-rethinking-our-relationship-with-trees/
1•dnetesn•22m ago•0 comments

Blade Runner

https://blue-continuum.com/remembering-the-future-blade-runner
1•dnetesn•23m ago•0 comments

The AI as the New Compiler

https://www.buildwithdc.co/posts/beyond-ai-driven-development-part-1-the-ai-as-the-new-compiler/
1•wslh•23m ago•0 comments

Claude and Jev Play Pokémon

https://claude-and-jev-play-pokemon.singlepageapp.co/
1•stephenheron•26m ago•0 comments

Show HN: What a VM for your AI agent costs across 13 sandbox providers

https://vm-price-board.sf.tools/
1•theMackabu•29m ago•0 comments

Show HN: Serverless, cheater-proof MTG engine using zero-knowledge play

https://chiplis.com/ironsmith/
1•nicolas-siplis•34m ago•0 comments

ESP32S3 cluster running 1.58-bit (BitNet) Language model

https://github.com/Low-Zi-Hong/ESP32s3-LLM-Cluster
1•nkko•34m ago•0 comments

DrawDB: Online database diagram editor and SQL generator

https://github.com/drawdb-io/drawdb
3•redbell•35m ago•0 comments

OpenAI, Hugging Face Attack – Music Video

https://www.reddit.com/r/AIDangers/s/S7YoH2hBqx
2•AJAlabs•35m ago•1 comments

Women Behind North Korea's IT Worker Operations

https://haydenmckenzie.com/research/dprk-it-worker-cell-part-one
2•sbarre•36m ago•0 comments

Remembering the Chicago Pile, the First Nuclear Reactor

https://www.newyorker.com/tech/annals-of-technology/remembering-chicago-pile-worlds-first-nuclear...
2•conorcleary•37m ago•0 comments

Spec Driven Development in 14mins

https://productmindset.substack.com/p/sdd-explained-in-14-minutes-14-free
1•pavan_matcha•37m ago•3 comments

Cap Snatching

https://en.wikipedia.org/wiki/Cap_snatching
1•rolph•38m ago•0 comments

Deutsche Bahn "joke" is no longer funny

https://jonworth.eu/your-deutsche-bahn-joke-is-no-longer-fu/
3•marvinborner•39m ago•0 comments

Stanford CME295 Transformers n LLMs – Autumn 2026 – Lecture 1 – Transformers [video]

https://www.youtube.com/watch?v=114i2Kz-LZA
1•mdp2021•42m ago•0 comments

Starship Achieved Orbit

https://twitter.com/SpaceX/status/2104653511883628569
5•karp773•44m ago•5 comments

Machine-Generated, Machine-Checked Proofs for a Verified Compiler (ICFP'26) [video]

https://www.youtube.com/watch?v=Dmt0h99iOmM
1•matt_d•46m ago•0 comments