frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

State Engineering for Agents

https://twitter.com/kleptobyte/status/2060973079140929823
1•Kleptobyte•23s ago•0 comments

CXL-ClusterSim: Modeling CXL-Based Disaggregated Memory

https://arxiv.org/abs/2605.27745
1•rbanffy•1m ago•0 comments

Dear Steve Lemay

https://ilyabirman.net/meanwhile/all/dear-steve-lemay/
1•exizt88•4m ago•0 comments

Review of the MoErgo Glove80 Keyboard

https://arslan.io/2024/04/22/review-of-the-moergo-glove80-keyboard/
1•akyuu•5m ago•0 comments

Show HN: TIL – a timeline file format with a spiral viewer and editor

https://til.rfy.nz
1•rellfy•6m ago•0 comments

Show HN: Monolith, live typed queries on real Postgres for Java (no JDBC)

https://github.com/singlr-ai/monolith
1•uday_singlr•8m ago•0 comments

A Brief-Ish History of SETI. Part VIII: Paradox? What Paradox?

https://www.universetoday.com/articles/a-brief-ish-history-of-seti-part-viii-paradox-what-paradox
1•tcp_handshaker•16m ago•0 comments

Go Hug an Open Source Maintainer (and Is Rsync Slop Now?)

https://techstackups.com/articles/the-rsync-thing-and-why-you-should-be-nice-to-open-source-maint...
1•ritzaco•16m ago•0 comments

Tell HN: Meta's AI support feature allows Instagram accounts to be stolen

3•parable•17m ago•0 comments

Mapa.ua – Ukraine War Map

https://mapa.ua/
1•airlabs-co•18m ago•0 comments

Can I just say f*** AI, f*** AI, f*** AI? [video]

https://www.youtube.com/shorts/0z7Q0Bg9TAY
1•tcp_handshaker•18m ago•0 comments

Show HN: Font Wizard Pro – a font manager for iPhone and iPad

https://apps.apple.com/us/app/font-wizard-pro-font-manager/id352966034
1•stalinkay•19m ago•0 comments

Simple systems are the best systems

https://jerodsanto.net/2026/05/simple-systems-are-the-best/
2•jerodsanto•23m ago•0 comments

Economic Growth and Community Well-Being Are Not Opposites

https://www.civicbrand.com/insights/articles/economic-growth-and-community-well-being-are-not-opp...
1•mooreds•24m ago•0 comments

Beyond the API: Why Critical Infrastructure Is Going Streaming

https://schematichq.com/blog/beyond-the-api-why-critical-infrastructure-is-going-streaming
2•mooreds•24m ago•0 comments

Tiendli – e-commerce, reservations and marketplace for Latam SMEs

https://tiendli.com
2•zuomy•27m ago•0 comments

Spaniel – OpenTelemetry viewer for local development (Postman for your traces)

https://github.com/zfogg/spaniel
1•zfogg•28m ago•0 comments

It's Not Just X. It's Y

https://mail.cyberneticforests.com/its-not-just-data-its-post-training/
5•mooreds•30m ago•0 comments

Linear CEO Responds to Corgi (YC S24) CEO on Grindmaxxing

https://twitter.com/karrisaarinen/status/2061139112426623054
3•hbcdbff•31m ago•0 comments

Atherton spent $145K to delay train electrification. The rest of us paid $400M

https://peninsulaforeveryone.org/blog/atherton-spent-145k-to-delay-caltrain-electrification-the-r...
6•mslate•33m ago•1 comments

Fish Sleep a Lot Like Us. (They Even Nap.)

https://www.nytimes.com/2026/05/27/science/fish-sleep-a-lot-like-us-they-even-nap.html
1•cainxinth•35m ago•0 comments

Ask HN: Do you use Cloudflare bot protection? If so, why do you use it?

1•Velocifyer•36m ago•0 comments

Agent-stack – one command to make any repo token-efficient for Claude Code

https://github.com/drmahdikazempour/agent-stack
1•mahdikaz•37m ago•0 comments

G7 Agrees on Shared Language Around Open-Source AI, Open Weights AI

https://www.phoronix.com/news/G7-On-Open-Source-AI
1•winter_blue•39m ago•0 comments

JavaScript Crossword

https://lyra.horse/fun/jscrossword/
3•marvinborner•41m ago•0 comments

Show HN: Pictolab (online HDR image editor)

https://pictolab.io/
2•ChadNauseam•43m ago•2 comments

What Is Code

https://martinfowler.com/articles/what-is-code.html
3•wapasta•48m ago•0 comments

Pixelnet – The social network for game developers

https://pixelnet.flarum.cloud
2•telui•48m ago•1 comments

The need for a socialist planned economy (2021)

https://www.marxist.ca/article/the-need-for-a-socialist-planned-economy
7•vhantz•50m ago•1 comments

New in Svelte – June 2026

https://svelte.dev/blog/whats-new-in-svelte-june-2026
2•levmiseri•52m ago•0 comments