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?

Can Frontier Models Recall Long-Tail Facts? A Cricket Stress Test

https://corvi.careers/blog/frontier-models-long-tail-facts/
1•sp1982•1m ago•0 comments

Building a CEL Engine for .NET

https://bsid.io/writing/building-a-cel-engine-for-net
1•jackedEngineer•1m ago•0 comments

Refactoring cuisine: how an Iraqi stew sailed to Singapore

https://iza.ac/posts/2026/07/the-journey-of-bamya/
1•infinitewalk•1m ago•0 comments

Browser-Based QBasic Environment

https://kavak.run/studio/
2•rickcarlino•4m ago•0 comments

RAMpocalypse, Now With Lawyers – ByteHaven – Where I ramble about bytes

https://blog.ppb1701.com/rampocalypse-now-with-lawyers
1•abdelhousni•7m ago•0 comments

Show HN: Codex fixed my 2010 MacBook Pro driver troubles with kernel patches

https://github.com/ldyeax/macbook2010_nouveau_and_sleep_fixes/
1•jimmaswell•8m ago•0 comments

Frontier LLMs drop from 83% to 43% once reasoning has to chain across domains

https://arxiv.org/abs/2607.18438
1•MarcoDewey•9m ago•1 comments

Anti-AI nostalgia and the cult of the past

https://www.seangoedecke.com/anti-ai-nostalgia/
1•gfysfm•10m ago•0 comments

Show HN: ClinicEvo – Know your face. Own your look

https://clinicevo.com/
1•not_wowinter13•11m ago•0 comments

Venus's rift valleys may still be actively growing

https://ethz.ch/en/news-and-events/eth-news/news/2026/07/venus-dead-far-from-it.html
1•MarcoDewey•15m ago•0 comments

Owen Song releases complete local speech synthesis in 9.36M parameters

https://runtimewire.com/article/owen-song-inflect-micro-v2-local-speech-9m-parameters
1•ryanmerket•15m ago•0 comments

Show HN: Lexicon a free Grammarly alternative, local writing assistant

https://lexicon-writer.pages.dev/
1•aashishharishch•16m ago•0 comments

Emacs Writing Machine

https://chainsawriot.com/postmannheim/2026/07/25/writeredeck.html
1•rbanffy•17m ago•0 comments

Show HN: Discrete6502 – one thing led to another

https://epatel.github.io/discrete6502/
2•epatel99•21m ago•1 comments

Kintsugi: A Japanese traditional ceramic conservation skill

https://blogs.cardiff.ac.uk/conservation/kintsugi-a-japanese-traditional-ceramic-conservation-skill/
1•lopespm•24m ago•0 comments

Pin every country you've visited on a 3D globe

https://pinglobe.world
1•Yueyin•24m ago•2 comments

Zig by Example

https://zigbyexample.neocities.org/
1•rbanffy•24m ago•0 comments

Multiple people injured in collision involving Waymo near downtown Los Angeles

https://www.latimes.com/california/story/2026-07-26/multiple-people-injured-pico-union-collision-...
1•gamblor956•27m ago•0 comments

OKLCH in CSS: why we moved from RGB and HSL

https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl
1•gregsadetsky•28m ago•0 comments

Carbon footprint of metal production could be >10 times higher than estimated

https://phys.org/news/2026-07-carbon-footprint-metal-production-higher.html
3•littlexsparkee•29m ago•4 comments

Share the tokens, not the API key

https://freeq.at/blog/share-the-tokens-not-the-api-key/
1•chadfowler•29m ago•0 comments

C++ Vs Rust: Which is better for writing AI/ML code with LLMs

https://richiejp.com/rust-vs-cpp-llm-coded-model-conversion-from-pytorch
2•richiejp•29m ago•0 comments

Symphony of Sirens

https://99percentinvisible.org/episode/episode-79-symphony-of-sirens-revisited/
2•Eridanus2•32m ago•0 comments

Teaching Kids Forth – Anna Liberty

https://gracefulliberty.com/articles/teaching-kids-forth/
10•rbanffy•40m ago•4 comments

A Gang of Thieves Pulled Off a Multimillion-Dollar Data Center Heist

https://www.nytimes.com/2026/07/12/magazine/data-center-heist.html
3•The_Gray•42m ago•1 comments

Building a Moat: Self Learning Agents

https://twitter.com/ataiiam/status/2074501252268937703
2•gmays•42m ago•0 comments

Show HN: Amplified Futures – no-wave VCV Rack 2 modules

https://github.com/dboles99/amplified-futures-vcv
1•dboles99•42m ago•0 comments

YouTube Premium (Free) for iPhones (iOS)

https://github.com/aditauqir/fyp
1•skmpe•44m ago•1 comments

Duress Codes and How to Use Them (2024)

https://safeescape.org/duress-codes/
7•jethronethro•47m ago•1 comments

Show HN: Porting Super Hexagon to the Playdate

https://captnemo.in/superhexagon/
3•captn3m0•48m ago•0 comments