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?

Ask HN: What are some good benchmarks for different agent harnesses?

1•Bnjoroge•2m ago•0 comments

A Leaked GitHub Token Exposed the Exact Ozempic Formula

https://www.pentesty.co/blog/novo-nordisk-ozempic-fulcrumsec-breach-2026
2•johnzoro107•3m ago•0 comments

Ask HN: After you ship a feature, what happens to what you learned?

2•gaggle_dk•5m ago•0 comments

Show HN: Vitrus – the company brain that tells you what it doesn't know

https://github.com/ahmetvural79/Vitrus
1•ahvural•5m ago•0 comments

Hackingpal

https://github.com/hackingpal/hackingpal
1•jadamsl•10m ago•0 comments

Ask HN: What are your parameter count estimates for Opus 4.8 and GPT-5.5?

1•ahriad•11m ago•0 comments

Query with Curl

https://daniel.haxx.se/blog/2026/06/21/query-with-curl/
2•Sami_Lehtinen•12m ago•0 comments

Extracted Value

https://extractedvalue.com/
1•turtleyacht•16m ago•0 comments

Multi Pong – multiplayer pong game

https://multi-pong.projects.lasz.uk/
1•dr_kretyn•16m ago•0 comments

New V4 encryption format that supports hardware-bound encryption using Yubikeys

https://www.vaultsort.com/
2•VaultSort•18m ago•0 comments

Epoll vs. Io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
9•Sibexico•21m ago•0 comments

The Tiny Sailing Game That Feels Surprisingly Real [video]

https://www.youtube.com/watch?v=30n_fdzgjJA
2•coolwulf•21m ago•0 comments

Russia's Putin is spending $26B to live forever

https://startupfortune.com/russias-putin-is-spending-26-billion-to-live-forever/
2•insanetech•22m ago•0 comments

First Pure-Go Cubrid Driver: Gocubrid

https://hexacluster.ai/blog/announcing-first-pure-go-cubrid-driver-gocubrid
1•avivallssa•25m ago•1 comments

South Korea Could Build Nuclear Submarines, but It Shouldn't

https://warontherocks.com/south-korea-could-build-nuclear-submarines-but-it-shouldnt/
1•bear_with_me•26m ago•1 comments

Show HN: Callimachus – Local search across your AI coding-agent history

https://github.com/BetaBots-LLC/callimachus
2•arishaller•28m ago•2 comments

Not just books: renting a sewing machine from the library can improve democracy

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
21•sohkamyung•34m ago•6 comments

Jobflo – A local-first job tracker built with SwiftUI

https://lymegrove.com/jobflo/
1•jsrothwell•34m ago•0 comments

Adblock Plus doing just fine after updating to Manifest V3 two years ago

https://blog.adblockplus.org/blog/adblock-plus-doing-just-fine-after-updating-to-manifest-v3-two-...
3•twapi•36m ago•1 comments

Turns Out, There Is a Cabal of Elite Crazies Trying to Control the World

https://www.esquire.com/news-politics/politics/a71619211/peter-thiel-dialog-club-wired-report/
61•throwaway81523•37m ago•16 comments

Show HN: Domvault – self-hostable second brain with consent-based note sharing

https://github.com/dys5315/domvault
3•quietdrift_04•38m ago•0 comments

Why Amazon hates 'human-in-the-loop' AI governance

https://www.theregister.com/security/2026/06/20/why-amazon-hates-human-in-the-loop-ai-governance/...
5•ano-ther•39m ago•0 comments

28% Faster: Blink Prototype That Shows Why Apple iOS Browser Engine Ban Must End

https://open-web-advocacy.org/es/blog/28-percent-faster--the-blink-prototype-that-shows-why-apple...
3•SoKamil•40m ago•1 comments

Lessons from wasps on how societies survive power struggles

https://www.ucl.ac.uk/news/2026/may/comment-lessons-wasps-how-societies-survive-power-struggles
4•hhs•40m ago•0 comments

One Prompt Agentic AI Marketing for Game Developers

https://www.youtube.com/watch?v=B2ASCTomtIA
3•bingewave•41m ago•0 comments

'Buy less' campaigns don't work

https://www.lse.ac.uk/buy-less-campaigns-dont-work
4•hhs•44m ago•0 comments

FunnyBench – Can AI Models Tell Funny Jokes?

https://funnybench.lol
3•Mockapapella•44m ago•1 comments

Stop calling the Super Productionizer a 'baby blender' – Frank Elavsky

https://www.frank.computer/blog/2025/06/baby-blender.html
13•cratermoon•45m ago•2 comments

Researchers used math to crack Wordle

https://www.binghamton.edu/news/story/6327/s-m-a-r-t-these-researchers-used-math-to-crack-wordle
4•hhs•49m ago•1 comments

Show HN: TLA+ Process Studio

https://tlaplus-process-studio.com/?example=meeting-lifecycle
5•uptodatenews•50m ago•0 comments