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?

Dream IDE

https://github.com/dreamide/dream
1•handfuloflight•2m ago•0 comments

Question of the moment: "Should a chatbot manage your bank account?"

https://news.uga.edu/should-a-chatbot-manage-your-bank-account/
1•mikelgan•4m ago•1 comments

Google Site

1•TACO_CODER•6m ago•0 comments

How the Smithsonian Lost America's Plot

https://www.wsj.com/opinion/how-the-smithsonian-lost-americas-plot-622709db
1•petethomas•6m ago•0 comments

NPM v12 Ships with Install Scripts Off by Default, Deprecating 2FA-Bypass Tokens

https://socket.dev/blog/npm-12
1•nreece•6m ago•0 comments

Independent Labs Crack Google's Cryptography Work

https://spectrum.ieee.org/google-quantum-cryptography-zero-knowledge
2•pseudolus•14m ago•0 comments

Meta to build its first $13B data centre in Canada

https://www.ctvnews.ca/business/article/meta-to-build-its-first-13-billion-data-centre-in-canada/
2•dj_rock•18m ago•0 comments

Rewriting Bun in Rust

https://simonwillison.net/2026/Jul/8/rewriting-bun-in-rust/
8•doppp•19m ago•3 comments

Google Discontinues Google Earth Pro for Desktop

https://pxlnv.com/linklog/google-earth-pro-sunset/
2•HotGarbage•20m ago•1 comments

Public LLM benchmarks are mostly garbage

https://grandpacad.com/en/blog/public-benchmarks-misled-me-opus-4-7
1•nateb2022•22m ago•0 comments

Show HN: OpenScreenShot: open-source full-page screenshot and annotation tool

https://openscreenshot.app
1•pghqdev•22m ago•0 comments

GitLab on FreeBSD

https://vermaden.wordpress.com/2026/07/09/gitlab-on-freebsd/
2•vermaden•22m ago•0 comments

Decentralized, encrypted (E2EE), censorship-resistant messenger

https://github.com/harpiabrasil/hydra
1•harpia•26m ago•0 comments

Show HN: I built 38-0, a Premier League draft game with a Poisson match engine

https://www.38-0.pro
2•rankinzheng•27m ago•0 comments

Abnormal Response to Anthropic Lawsuit

https://abnormal.ai/blog/abnormal-response-to-anthropic-lawsuit
3•tjek•30m ago•1 comments

StoryScope: Investigating Idiosyncrasies in AI Fiction

https://arxiv.org/abs/2604.03136
1•cratermoon•31m ago•0 comments

The AI factory: the rewiring of India's tech industry [video]

https://www.ft.com/video/5a5733ea-f8fa-488f-906d-418584b8bc36
1•petethomas•31m ago•0 comments

Space Lasers Show How Venezuela's Earthquakes Reshaped the Earth's Crust

https://www.wired.com/story/space-lasers-show-venezuela-earthquakes-reshaped-earth-crust/
1•bookmtn•32m ago•0 comments

Banks, card networks, fintechs partner on 'low-cost' stablecoin

https://www.bankingdive.com/news/stablecoin-open-standard-bridge-abrams-bny-stripe-mastercard-vis...
1•petethomas•33m ago•0 comments

How to Meet Word Count for School Assignments

https://fastwordcount.com/blog/how-to-meet-word-count-for-school-assignments/
2•rajkverma123•37m ago•0 comments

Bull Bitcoin challenges EU's DAC8 crypto surveillance rules in French court

https://thecoinheadlines.com/crypto/bull-bitcoin-challenges-eus-dac8-crypto-surveillance-rules-in...
2•Alan_Writer•39m ago•1 comments

Search engine that donates 51% profits to charity

https://1.org/
2•adityamwagh•41m ago•1 comments

Show HN: Cyrinx (36kbps Acoustic Transport)

https://cyrinx.org/
2•dweekly•42m ago•0 comments

Accessibility in Gnome

https://blogs.gnome.org/sophieh/2026/07/07/accessibility-in-gnome/
2•birdculture•44m ago•1 comments

Felons, Fraudsters Flog Offensive Cybersecurity Startup

https://krebsonsecurity.com/2026/07/felons-fraudsters-flog-offensive-cybersecurity-startup/
2•tortilla•44m ago•0 comments

Ghost – real-time AI that tells you what to say during job interviews

https://ghostinterview.dev
1•ABO_Studios•49m ago•0 comments

Gated Frontier Model = the Fall of Capitalism

https://www.elevair.org/letter
1•campbellhendee•50m ago•0 comments

1 down, 1 to go: Aptera clears first federal hurdle

https://aptera.us/epa-release/
1•TeaVMFan•54m ago•1 comments

Tinfoil Pigeons – see the aircraft overhead

https://tinfoilpigeons.com/
1•gnabgib•1h ago•0 comments

Compiler for LLMs, world models, and AGI

https://arxiv.org/abs/2607.04542
1•OsamaJaber•1h ago•0 comments