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?

Responsibility Is Taken Before It Is Given

https://lalitm.com/responsibility-is-taken-before-it-is-given/
1•lalitmaganti•42s ago•0 comments

Show HN: Security scanner for your SaaS. Find and fix Vulnerabilities. 35% off

https://sentrint.com/sample
1•Gourabdg•5m ago•0 comments

Cyberlandfillville

https://paperclip-factory.de/cyberlandfillville/
1•moritzwarhier•5m ago•0 comments

Gum Wrappers World

https://gww.su/map/
1•NaOH•6m ago•0 comments

Humazon

https://hughhowey.com/humazon/
2•herbertl•6m ago•0 comments

Plastic mechanical computer from 1963: The Digi-Comp 1 [video]

https://www.youtube.com/watch?v=-y8bGBE71yw
1•tobr•9m ago•0 comments

The Day of Small Things

https://robinrendle.com/notes/the-day-of-small-things/
1•herbertl•10m ago•0 comments

Paperditor – a free, open-source WYSIWYG Markdown editor

https://github.com/guisaldanha/paperditor/
1•guisaldanha•13m ago•0 comments

Minimally Invasive Education

https://en.wikipedia.org/wiki/Minimally_invasive_education
1•thunderbong•13m ago•0 comments

Lego Space Hubble Telescope

https://ideas.lego.com/product-ideas/cf7b0374-c853-4b6f-98c6-66b8ef7fcdaf
1•tcp_handshaker•14m ago•0 comments

Ctok: Reconstructed Claude Tokenizer

https://github.com/sanderland/ctok
1•krackers•14m ago•0 comments

LLMs anticipate verbal behavior from studying longitudinal conversations

https://arxiv.org/abs/2608.13454
1•anigbrowl•16m ago•1 comments

Hurricane Hits Big Island, Hawaii

https://www.nhc.noaa.gov/#Lala
1•saisrirampur•16m ago•0 comments

Concurrent Servers in Rust

https://eli.thegreenplace.net/2026/concurrent-servers-part-7-rust/
1•ingve•16m ago•0 comments

Can an LLM price a World Cup match better than the market (and make money)?

https://christian.bock.bio/posts/frontier_xg_worldcup/
2•cbock90•21m ago•0 comments

Show HN: Seedle, daily -dle for Minecraft seeds

https://seedle.loch.tools/
1•lwansbrough•23m ago•0 comments

An Astronaut Saw a Russian Missile [..] Then She Went Where It Landed

https://united24media.com/war-in-ukraine/an-astronaut-saw-a-russian-missile-head-for-ukraine-from...
1•defly•24m ago•0 comments

Meta will train its AI on Newsmax, a far-right media outlet

https://popular.info/p/meta-will-train-its-ai-on-far-right
3•Fellw•25m ago•1 comments

Secondhand booksellers in UK and Ireland suspect AI firms 'strange' bulk orders

https://www.theguardian.com/technology/2026/aug/15/uk-ireland-booksellers-suspect-ai-companies-bu...
1•heisenbit•25m ago•0 comments

Supply-chain controls matter more when agents install your dependencies

https://omniline.app/blog/supply-chain-controls-matter-more-when-agents-install-your-dependencies
1•libertas_quae_s•27m ago•0 comments

How Ozempic Destroyed Fat Positivity [video]

https://www.youtube.com/watch?v=LbZ31_60z3M
3•znpy•28m ago•0 comments

US hires over 2k 'best and brightest' video gamers as air traffic controllers

https://www.the-express.com/news/world-news/213828/us-hires-over-2-000-video-gamers-air-traffic-c...
2•speckx•28m ago•0 comments

Remembering the pre-Google web, when search was an experiment

https://arstechnica.com/gadgets/2026/08/remembering-the-pre-google-web-when-search-was-an-experim...
1•ohjeez•30m ago•0 comments

Kimi Work attaches raw agent sessions to feedback reports

3•ryanmerket•34m ago•0 comments

See how an H100 works in 3D with threejs

https://gpu.kylejeong.com/
1•Kylejeong21•34m ago•0 comments

What on Earth is Google doing?

https://www.digitaldigging.org/p/how-to-plant-a-nuclear-plant-in-iran
2•strogonoff•36m ago•0 comments

ESPConnect

https://github.com/thelastoutpostworkshop/ESPConnect
2•skibz•39m ago•0 comments

Antitrust: The Monster Case (1975, IBM)

https://time.com/archive/6846827/antitrust-the-monster-case/
1•asawfofor•40m ago•0 comments

The New Bottlenecks After Coding

https://robotpaper.ai/the-new-bottlenecks-after-coding/
1•royosherove•40m ago•0 comments

The teenagers who wired Romania [audio]

https://www.bbc.com/audio/play/p0p2vc20
2•alibarber•45m ago•0 comments