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?

Eli Lilly's New Weight-Loss Treatment Shows Promising Results

https://www.wsj.com/health/pharma/eli-lillys-new-weight-loss-treatment-shows-promising-results-ca...
1•brandonb•1m ago•0 comments

Web Serial Support in Firefox

https://hacks.mozilla.org/2026/05/web-serial-support-in-firefox/
1•tech234a•2m ago•0 comments

World Genesis: Autonomous Agent Civilization Simulator

https://github.com/GeoLambdaAI/world-genesis
1•Gtombri•3m ago•0 comments

Show HN: Synrix: hardware-verified memory routing for edge AI agents

https://github.com/AstronomikalOne/synrix-demo
1•Ryan_Synrix•3m ago•0 comments

Starbucks scraps AI inventory tool across North America

https://www.reuters.com/business/starbucks-scraps-ai-inventory-tool-across-north-america-2026-05-21/
3•louiereederson•5m ago•0 comments

Discover Meko: The Data Infrastructure for Agents That Work and Learn Together

https://www.yugabyte.com/blog/meko-data-infrastructure-for-agents-that-work-and-learn-together/
1•mooreds•6m ago•0 comments

Could Universal GLP-1 Drugs End the Obesity Epidemic?

https://www.cremieux.xyz/p/could-universal-glp-1-drugs-end-the
1•brandonb•6m ago•0 comments

SpaceX IPO filing lays bare losses and Musk control as it stakes future on AI

https://www.reuters.com/legal/transactional/bound-mars-elon-musks-spacex-unveils-filing-blockbust...
3•1vuio0pswjnm7•7m ago•0 comments

Pope Leo launches an AI commission days before he releases a papal letter

https://fortune.com/2026/05/18/pope-leo-ai-commission-papal-letter-anthropic-co-founder-christoph...
2•1vuio0pswjnm7•9m ago•0 comments

22% Layoff at ClickUp

https://twitter.com/dj_curfew/status/2057522382315929802
2•jscheel•9m ago•1 comments

The International Space Station is leaking again

https://arstechnica.com/space/2026/05/uh-oh-the-international-space-station-is-leaking-again/
1•LorenDB•13m ago•0 comments

Blog ran on Ubuntu 16.04 for 10 years. I migrated it to FreeBSD

https://crocidb.com/post/this-blog-ran-on-ubuntu-16-04-for-10-years-i-migrated-it-to-freebsd/
3•speckx•13m ago•0 comments

Movesia – Control the Unity Editor with Plain English Commands

https://movesia.com
1•DexOmg•16m ago•0 comments

Distribution Fine Tuning: A post-training step to make models write better

https://dft.rosmine.ai/
1•sgt•16m ago•0 comments

Volo: Flight tracker built for group travel, delays, gates, and real connections

https://apps.apple.com/us/app/volo-flight-tracking/id6756634383
1•darpanypatel1•17m ago•0 comments

Built a subscription tracker that uses email forwarding instead of bank linking

https://www.subalert.org
1•momolii•18m ago•1 comments

Show HN: AI readiness toolkit: AI two-minute CODE maturity check

https://github.com/bjcoombs/ai-native-toolkit
1•ben30•19m ago•0 comments

Schlitz beer ending production after 177 years

https://www.boston25news.com/news/trending/schlitz-beer-ending-production-after-177-years/ABPDGCI...
2•1vuio0pswjnm7•20m ago•0 comments

JEP Draft: Enhanced Local Variable Declarations (Preview)

https://openjdk.org/jeps/8357464
1•theanonymousone•22m ago•0 comments

The XGO Programming Language

https://github.com/goplus/xgo
1•quux0r•23m ago•0 comments

The Founder Mental Health Survey

https://www.foundermental.health/
3•jasonshen•26m ago•0 comments

Event-Sourced Domain Modeling

https://www.esdm.io/
4•goloroden•27m ago•0 comments

Socket raises $60M Series C at $1B valuation

https://socket.dev/blog/series-c
2•slymax•27m ago•0 comments

Children in Australia tell UK kids how a social media ban has affected them

https://www.bbc.co.uk/newsround/videos/cx21x5x05wno
3•DropDead•28m ago•0 comments

AI token streaming isn't about SSE vs. WebSockets

https://zknill.io/posts/ai-token-streaming-isnt-about-sse-vs-websockets/
1•zknill•28m ago•0 comments

Exploring Ref Qualifiers in C++

https://www.meetingcpp.com/blog/items/Exploring-ref-qualifiers-in-Cpp.html
1•jandeboevrie•30m ago•0 comments

Claw Patrol: an open-source security firewall for agents

https://deno.com/blog/clawpatrol
2•slymax•31m ago•0 comments

Apple Music's AI stance: "Technology should amplify artists, not replace them"

https://9to5mac.com/2026/05/20/apple-music-shares-what-it-is-doing-to-keep-music-fair-in-an-ai-wo...
2•mgh2•31m ago•0 comments

Just You Wait

https://shiflett.org/blog/2026/just-you-wait
3•speckx•33m ago•0 comments

ATmosphere 1.0.0 – Liftoff – ActivityPub for WordPress

https://activitypub.blog/2026/05/20/atmosphere-1-0-0-liftoff/
1•Tomte•33m ago•0 comments