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?

Arista 7060XE7 Series

https://www.arista.com/en/products/7060xe7-series
1•berlianta•2m ago•0 comments

Incorruptible

https://steveblank.com/2026/06/09/incorruptible/
2•sblank•3m ago•0 comments

How to Revive a Wemo Smart Device

https://retronetwork.net/guides/wemorevive/
1•reaperducer•4m ago•0 comments

Fastsync: I doubled rsync's local copy speed

https://www.sami-lehtinen.net/blog2/fastsync-how-i-doubled-rsyncs-speed
2•Sami_Lehtinen•4m ago•0 comments

Show HN: Instagram for Gmail, a feed where mail expires

https://github.com/matiasbattocchia/mizzle-mail
1•cabra•5m ago•0 comments

Meta alleges NSO violated spyware injunction with new WhatsApp attacks

https://arstechnica.com/tech-policy/2026/06/meta-alleges-nso-violated-spyware-injunction-with-new...
1•stalfosknight•6m ago•0 comments

Granola Notes from WWDC 2026

https://wwdc.jacobstechtavern.com/2026
1•jakey_bakey•8m ago•1 comments

I ran an arbitrage bot on Polymarket. Here are the real numbers

https://kacho.io/polymarket-arbitrage-real-numbers
1•kachoio•8m ago•0 comments

America's Workforce Academy by Meta

https://www.meta.com/actions/americas-workforce-academy/
1•burger_moon•9m ago•0 comments

Show HN: Hires Chess Trainer – drill the mistakes from your own chess games

https://github.com/gaelazzo/python_chess
1•gaelazzo•10m ago•0 comments

The Data the CIA World Factbook Left Orphaned

https://bamwor.com/en/reports/cia-world-factbook-orphaned-data
1•speckx•10m ago•0 comments

Apple Container Hits 1.0

https://github.com/apple/container/releases/tag/1.0.0
1•frastefanini•10m ago•0 comments

EU Says Decision Not to Launch Siri AI in Europe Is Apple's Alone

https://www.macrumors.com/2026/06/09/eu-says-decision-not-to-launch-siri-ai-in-europe-is-apples/
3•bushwart•13m ago•0 comments

Symbolicating a minified stack trace by hand: why source maps can't do it alone

https://tracewayapp.com/blog/deep-dive-into-the-sourcemaps
2•dusanstanojevic•15m ago•0 comments

What an $83,000/month AWS EC2 server does

https://www.youtube.com/watch?v=ndUMnCjrU1A
3•sunbirdLabs•16m ago•1 comments

Meta account recovery allowed unauthenticated access to full account PII

https://twitter.com/IntCyberDigest/status/2063406949354311935
4•croes•16m ago•0 comments

$250M iPhone Settlement Proposed in Apple Lawsuit over Misrepresented AI

https://www.classaction.org/news/250m-iphone-16-settlement-resolves-apple-lawsuit-over-allegedly-...
2•Topfi•17m ago•0 comments

AI takes people at their word

https://futuresearch.ai/ai-takes-people-at-their-word/
4•mckennameyer•17m ago•1 comments

Show HN: Ocdify – Offline AI that organizes your Mac files, 100% on-device

https://ocdify.vyanlabs.in
2•sourishsarmah•18m ago•0 comments

Personal apps with no back end: static site and OAuth PKCE and OpenRouter

https://type2fun.net/infinitely-scalable-personal-apps.html
2•msyea•18m ago•1 comments

Show HN: Mac screen recorder that adds zoom animations from click data

https://screencharm.com/
3•snazarov92•18m ago•0 comments

Apple made a request to the EC to be exempted from interop obligations under DMA

https://audiovisual.ec.europa.eu/en/media/video/I-290903
6•latexr•19m ago•1 comments

Exceptions should not be handled – they should be aggregated

https://zenodo.org/records/20492768
2•ErystelaThevale•19m ago•0 comments

Industrial 3-D Printers Are Getting Cheaper

https://www.nytimes.com/2026/06/09/us/3d-printer-industrial-formlabs.html
5•dogichow•20m ago•0 comments

We have to change the rules of security

https://opensourcesecurity.io/2026/06-rules-of-security/
2•RyeCombinator•21m ago•0 comments

Unified Controllable and Faithful Text-to-CAD Generation with LLMs

https://arxiv.org/abs/2604.19773
4•PaulHoule•24m ago•0 comments

Self-hosting email the hard way from your own routable IPv4 block up

https://anil.recoil.org/notes/recoil-self-hosting-2026
2•birdculture•25m ago•0 comments

Only Bounds

https://smallcultfollowing.com/babysteps/blog/2026/06/09/only-bounds/
2•EvgeniyZh•25m ago•0 comments

Keystone: The First Agent Harness Framework

https://medium.com/@tacoda/introducing-keystone-the-first-agent-harness-framework-3d30ead01b05
4•tacoda•25m ago•0 comments

Show HN: Sandbox AI-app lifecycle, from build to run

https://capakit.com/
4•leroman•26m ago•1 comments