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?

CMU Introduction To Deep Learning 11-785, Fall 2026: Lecture 1 [video]

https://www.youtube.com/watch?v=40Ql7hdaJfU
1•mdp2021•27s ago•0 comments

Oldinsurancemaps.net is now a Charter Project

https://openstreetmap.us/news/2026/08/oim-charter-project/
1•altilunium•1m ago•0 comments

Rare polyamorous bird of prey's location has been kept a mystery

https://www.cnn.com/2026/08/24/uk/montagus-harrier-chicks-bird-of-prey-mystery-scli-intl
1•Tomte•2m ago•0 comments

A privacy-focused PDF toolkit that runs in the browser

https://ofcpdf.com/
1•artificiaI•5m ago•0 comments

Open Source Is Good Marketing

https://victoriametrics.com/blog/open-source-is-good-marketing/index.html
2•valyala•7m ago•0 comments

We're 15-year-olds tired of switching study apps, so we built our own

https://reviscio.com
3•Luka_Takki•11m ago•2 comments

My Anti-AI Manifesto

http://alessandrorosa.altervista.org/pages/my.anti.ai.manifesto.html
2•alesrosa•11m ago•0 comments

Ubisoft forgot the actual game in Steam release of Heroes of Might and Magic 3

https://www.pcgamer.com/games/strategy/ubisoft-forgot-to-make-sure-the-steam-release-of-heroes-of...
1•HelloUsername•13m ago•0 comments

It's the People, Stupid (Human Art in a Company World)

https://nappertime.com/its-the-people-stupid-human-art-in-a-company-world/
1•andsoitis•14m ago•0 comments

What if AI were in charge of public policy and politics?

https://inevolin.github.io/blog/2026/08/25/should-we-let-ai-govern-us/
1•iljanevo•14m ago•1 comments

Open source in-browser log sanitizer, feedback required

1•andriimb•17m ago•2 comments

RAG Is Simpler Than You Think

https://www.lighthousenewsletter.com/p/rag-is-simpler-than-you-think
2•j0selit0•19m ago•0 comments

The End of Programming

https://pauldix.com/the-end-of-programming
5•kosyooo•21m ago•0 comments

How to Build a McKinsey-Style PowerPoint with AI: 8 Rules for Consulting Slides

https://medium.com/@2315610426/how-to-build-a-mckinsey-style-powerpoint-with-ai-8-simple-rules-fo...
2•chenxi030826•22m ago•0 comments

Ask HN: Is what Open Commonplace legal?

1•VishnuShayeq01•25m ago•0 comments

Hister: A private, self-hosted search engine for the browser history and files

https://github.com/asciimoo/hister
1•mpfect•25m ago•0 comments

The Flood Came Without Warning: What Happened in Northern Nepal?

https://moztako.me/northern-nepal-flash-flood-rasuwa-timure-syabrubesi/
1•vadinho•26m ago•0 comments

Bill Gates says we've passed AI's danger thresholds. Now what?

https://www.technologyreview.com/2026/08/26/1142946/bill-gates-ai-danger-threshold/
1•mdp2021•26m ago•0 comments

Gh omens: will GitHub go down?

https://github.com/sandermvanvliet-stack/gh-omens/
1•sandermvanvliet•28m ago•1 comments

More than 18000 questionable images found in antibody catalogues of 15 companies

https://www.nature.com/articles/d41586-026-02635-w
1•matsemann•29m ago•0 comments

Revolut Joins Global Stablecoin Race with Euro-Backed Token

https://www.bloomberg.com/news/articles/2026-08-26/revolut-joins-global-stablecoin-race-with-euro...
2•thm•33m ago•0 comments

Multilayer Network Backboning

https://www.michelecoscia.com/?p=2583
1•mikk14•34m ago•0 comments

SleepJEPA: Learning the latent world of sleep to estimate disease risk

https://pmc.ncbi.nlm.nih.gov/articles/PMC13042106/
1•brandonb•35m ago•0 comments

'This is crazy. This is insane': Bill Gates has changed his mind about AI,jobs

https://www.semafor.com/article/08/25/2026/this-is-crazy-this-is-insane-bill-gates-has-changed-hi...
2•thm•35m ago•1 comments

A Drone Killed Three Ukrainians. It Was Guided by A.I

https://www.nytimes.com/2026/08/24/world/europe/russia-drones-autonomous-ai-kill-ukraine-war.html
2•YeGoblynQueenne•39m ago•1 comments

Drive-By Agent Hijacking: One Website Visit, Persistent Model Poisoning

https://www.cyera.com/research/nemoclaw-one-website-visit-to-hijack-your-ai-agent
1•shimi12•41m ago•0 comments

Veryfront Code, the first full-stack AI framework

https://github.com/veryfront/veryfront-code
4•kojiwakayama•47m ago•1 comments

One sentence owns this page until you pay $1 more

https://takethethrone.fun
1•letapnahsor•51m ago•0 comments

Is this the civilization we really want? (2017)

https://dynamicland.org/archive/2017/Is_this_the_civilization_we_really_want
2•panic•52m ago•0 comments

WICG/Local-Peer-to-Peer

https://github.com/WICG/local-peer-to-peer
1•eternityforest•54m ago•0 comments