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?

Show HN: Legant gives AI agents bounded authority to act on your behalf

https://github.com/legant-dev/legant
1•baris_erdem•37s ago•0 comments

I don't believe, I know (2019)

https://onlinedigeditions.com/publication/?i=634462&p=32&view=issueViewer
1•Tomte•38s ago•0 comments

Google's online dominance is showing signs of cracking in AI era

https://www.cnbc.com/2026/06/23/googles-online-dominance-is-showing-signs-of-cracking-in-ai-era.html
1•pseudolus•49s ago•0 comments

Incident Fest 2026

https://www.uptimelabs.io/incident-fest-26
1•outageaaarrgh•2m ago•0 comments

Show HN: Free tools to audit a landing page and check if AI recommends you

https://www.ismylandingpagevalid.com
1•Jxcques•3m ago•0 comments

Free EU AI Act Article 50 compliance checker for indie SaaS

https://aiact.bridgeai.one/
1•coollooc•3m ago•0 comments

Seawater batteries for energy storage, desalination and carbon sequestration

https://www.nature.com/articles/s44359-026-00158-1
1•westurner•4m ago•2 comments

Could less caffeine be smarter performance enhancer? Scientists find sweet spot

https://sciencex.com/news/2026-06-caffeine-smarter-scientists-sweet.html
1•pseudolus•6m ago•0 comments

How to get GLM 5.2 to 280 tokens per second

https://www.baseten.co/blog/how-we-built-the-worlds-fastest-api-for-glm-52/
1•mikejulietbravo•6m ago•1 comments

ByteDance's Seedance 2.5 breaks the 30-second barrier for AI video generation

https://the-decoder.com/bytedances-seedance-2-5-breaks-the-30-second-barrier-for-ai-video-generat...
1•thm•6m ago•0 comments

Boogu-Image – open-source image generation and editing model

https://github.com/boogu-project/Boogu-Image
1•modinfo•7m ago•0 comments

Skillhealth: Find Claude Code skills you never use and what they cost

https://github.com/mirko-pira/skillhealth
3•mirkopira•7m ago•0 comments

Two Months In: Assessing the Impact of NIST's Enrichment Cutbacks

https://blog.volerion.com/posts/two-months-in-nist-cuts-back-on-enrichment-efforts/
3•003random•10m ago•0 comments

Show HN: Screen recording app with automatic zoom, subtitles, and more (macOS)

https://screenotter.com
2•mohitgangrade•10m ago•0 comments

How the Space Program Has Influenced What We Carry

https://www.carryology.com/liking/how-the-space-program-has-influenced-what-we-carry/
1•surprisetalk•12m ago•0 comments

Nub – A Bun-like toolkit that extends Node.js instead of trying to replace it

https://github.com/nubjs/nub
1•colinmcd•12m ago•0 comments

LiteLLM Migrates to Rust

https://docs.litellm.ai/blog/litellm-rust-launch
2•lackoftactics•12m ago•0 comments

Faster aging in younger generations linked to rise in early-onset cancer

https://medicine.washu.edu/news/faster-aging-in-younger-generations-linked-to-rise-in-early-onset...
1•littlexsparkee•12m ago•0 comments

Bluerails Discovery

https://discovery.bluerails.com/
2•ashwinkumar01•13m ago•0 comments

The AI Last Mile Is the First Mile

https://newsletter.productdriven.com/p/the-ai-last-mile-is-actually-the
1•spo81rty•13m ago•0 comments

Your AI Agent Should Go to Therapy

https://www.encurtador.dev/redirecionamento/zi2zj1c
1•apattichis•14m ago•0 comments

Systemd-Bsod.service

https://www.freedesktop.org/software/systemd/man/257/systemd-bsod.service.html
2•birdculture•14m ago•1 comments

Verity.md – Gates, Memory and Cost control for coding agents

https://verity.md/
4•jaimefjorge•14m ago•1 comments

With Starfall, SpaceX eyes an edge in global cargo delivery from orbit

https://arstechnica.com/space/2026/06/with-starfall-spacex-eyes-an-edge-in-global-cargo-delivery-...
2•mattas•14m ago•1 comments

Show HN: Cc-fleet – run other LLMs as Claude Code workers, your sub drives

https://github.com/ethanhq/cc-fleet
2•ethanhq•17m ago•0 comments

Lost memoir of Hiroshima survivor found after decades in US archive

https://www.theguardian.com/books/2026/jun/23/lost-memoir-of-hiroshima-survivor-found-after-decad...
1•toomuchtodo•17m ago•0 comments

Show HN: AGI will not come from better models, it will come from meta harness

https://github.com/the-open-engine/zeroshot
1•covibes•18m ago•1 comments

A simple physics-inspired model sheds light on how AI learns

https://techxplore.com/news/2026-05-simple-physics-ai.html
1•doener•19m ago•0 comments

MSG Made Dossier on Activists Who Opposed Facial Recognition

https://www.404media.co/madison-square-garden-made-dossier-on-activists-who-opposed-facial-recogn...
4•cdrnsf•21m ago•0 comments

AI and Math State of the Art

https://stunning-naiad-817d91.netlify.app
2•dawdler-purge•22m ago•1 comments