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?

Software Disenchantment

https://tonsky.me/blog/disenchantment/
1•diginova•1m ago•0 comments

Neuron Atlas – Qwen3.6

https://www.goodfire.com/research/public_neuron_atlas/all_labels
1•Klaster_1•2m ago•0 comments

Tufazip: Learning to Compress a Billion Bytes of Wikipedia

https://tufalabs.ai/research/tufazip/
1•theanonymousone•3m ago•0 comments

My Amiga 4000 Has Never Been This Fast [video]

https://www.youtube.com/watch?v=DBjQ_mVEn5I
1•doener•4m ago•0 comments

What a Rewrite of Libexpat Needs

https://blog.hartwork.org/posts/what-a-libexpat-rewrite-needs/
2•spyc•6m ago•0 comments

Janax Hand-written x86/ARM64 assembly OS where an agent selfcompiles native code

https://github.com/nicoconvoz/Janax
1•nicoconvoz•7m ago•1 comments

An OpenEverest MySQL Cluster: Galera Health and a Live Failover Test

https://www.percona.com/blog/inside-an-openeverest-mysql-cluster-galera-health-and-a-live-failove...
1•Sigmazero60•7m ago•0 comments

Notesfromeveryday

1•gakriti•8m ago•0 comments

Should computer scientists experiment more? (1998)

https://www.researchgate.net/publication/2954925_Should_Computer_Scientists_Experiment_More
1•datadrako•8m ago•1 comments

Rex-on-Exe

https://blog.exe.dev/rex
1•teledream•8m ago•0 comments

ReasoningBank: Enabling agents to learn from experience (April 2026)

https://research.google/blog/reasoningbank-enabling-agents-to-learn-from-experience/
1•zerop•9m ago•0 comments

A resale hype meter that refuses to rate items without real sold-price data

https://www.aiplannermail.com/hype-meter/
1•malek_oweis•9m ago•0 comments

Google will launch Android app verification requirement globally in January 2027

https://arstechnica.com/gadgets/2026/11/google-will-launch-android-app-verification-requirement-g...
1•pjmlp•10m ago•0 comments

Sprite Sheet Generation Using a Diffusion Model [pdf]

https://marcovolino.github.io/docs/papers/2025-wong-cvmp.pdf
1•doener•12m ago•0 comments

Physics Programming Part 5: Spring Physics

https://www.youtube.com/watch?v=nDk4XqJLG14
1•birdculture•13m ago•0 comments

Scala Without the JVM: Close to Rust's Speed, with 25x Less Memory Than the JVM

https://wvlet.org/uni/blog/native-server-performance
1•theanonymousone•14m ago•1 comments

Algorithm changed how I think about compression – Information theory [video]

https://www.youtube.com/watch?v=qbsb9DpdZ6s
2•doener•14m ago•0 comments

The neural basis of decision making

https://pubmed.ncbi.nlm.nih.gov/17600525/
1•andsoitis•15m ago•0 comments

Sashiko: Lessons from building an agentic code review system for Linux

https://cloud.google.com/blog/products/application-development/lessons-from-building-sashiko-an-a...
1•geoffbp•16m ago•0 comments

Where we're going, we don't need chatbots

https://dbushell.com/2026/11/19/we-dont-need-chatbots/
1•orphereus•16m ago•0 comments

Princeton neuroscience PhD student detained by ICE

https://www.dailyprincetonian.com/article/2026/11/princeton-news-broadfocus-princeton-phd-neurosc...
1•rl1987•17m ago•0 comments

I vibecoded 70k LOC with DeepSeek and let Opus review it

https://github.com/qxphq/notes/blob/main/26-11-20.md
2•qxphq•21m ago•0 comments

Electric cooking could be as important as EVs in the global energy transition

https://theconversation.com/electric-cooking-could-be-as-important-as-evs-in-the-global-energy-tr...
2•zeristor•23m ago•0 comments

A TPM that BitLocker trusts, on Apple's Virtualization framework

https://scaleninja.com/blog/bitlocker-tpm-virtualization-framework/
3•onzr•23m ago•0 comments

Let Gemini tackle repetitive chores on your Mac

https://blog.google/innovation-and-ai/products/gemini-app/computer-use-mac/
2•yackrru•23m ago•0 comments

Enemy AI: chasing a player without Navigation2D or A* pathfinding (2020)

https://abitawake.com/news/articles/enemy-ai-chasing-a-player-without-navigation2d-or-a-star-path...
1•sammatilda•26m ago•0 comments

Valkey 9.2 offers forkless snapshots, compressed replication, ACL roles and more

https://valkey.io/blog/valkey-9.2-release/
1•gslin•28m ago•0 comments

Time-use data expose the "double burden" and "second shift" as myths

https://socialsommentary.substack.com/p/the-not-so-subtle-sexism-of-the-unpaid
1•dandare•30m ago•0 comments

Anthropic's founders and employees are now worth more than 45M families

https://bsky.app/profile/steverattner.bsky.social/post/3n2oxywvqy22v
3•doener•35m ago•0 comments

Solidcraft is the Fusion360 I always wanted

https://solidcraft.io/
1•olup•35m ago•0 comments