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?

Baraag.net Domain Seized by FBI

https://boards.4chan.org/g/thread/110372455/baraag-on-life-support
2•RA2lover•11m ago•0 comments

Two stealth models just appeared on the leaderboard, both ahead of Fable 5.2

https://contralabs.com/frontierdesign
3•cheptsov•12m ago•0 comments

Open Source Canva Alternative in Go

https://github.com/hyscaler/HyCanvas
1•pitabas106•12m ago•0 comments

Show HN: Topothesy – a daily online geography game

1•proy87•13m ago•0 comments

Rust Anything – Port apps to Rust and check them against the original

https://github.com/erkamyaman/rust-anything
1•bakigul•14m ago•0 comments

How the European Commission rolled out Matrix to more than 40k staff

https://element.io/blog/how-the-european-commission-rolled-out-matrix-to-more-than-40-000-staff/
1•liotier•17m ago•0 comments

Grok apps leak private data

https://labs.cloudsecurityalliance.org/research/csa-research-note-grok-build-apps-exposed-by-defa...
1•armcat•18m ago•0 comments

Sashiko: Lessons from building an agentic code review system for Linux

https://cloud.google.com/blog/products/application-development/lessons-from-building-sashiko-an-a...
1•DonAtimator•19m ago•0 comments

Huawei Watch Air

https://www.notebookcheck.net/Huawei-Watch-Air-with-ultra-thin-titanium-unibody-looks-like-the-Ap...
1•HatchedLake721•21m ago•0 comments

AI Overworks People

https://twitter.com/catalinmpit/status/2123061832781090948
3•cmpit•23m ago•0 comments

GitHub Deletes Camoufox Repo

https://twitter.com/d4ijro/status/2123332988276531566
2•elsombrero•23m ago•0 comments

Cloudflare releases weights of Clairic, its AI that reads invoices and receipts

https://maccus.fr/en/cloudflare-clairic-open-weights/
1•theanonymousone•25m ago•0 comments

A football API that publishes its own log loss, misses included

https://www.predictiqpro.com/accuracy
2•predictiq•25m ago•0 comments

I Hated Running a VPN on Android, So I Built My Own Zero Trust Infra Instead

https://difhel.dev/en/blog/zero-trust-beyond-vpn
1•difhel•28m ago•0 comments

DeepSeek Limits Free Service Usage via Chat

https://finance.biggo.com/news/3ddf7191-bd44-4073-b849-a2167ecb7b55
1•RockstarSprain•34m ago•1 comments

Ubuntu 26.10 Stonking Stingray

https://ubuntu.com/blog/canonical-releases-ubuntu-26-10-stonking-stingray
2•ankitg12•36m ago•0 comments

AI Questions (Benedict Evans' Bi-Annual, Nov 2026) [pdf]

https://static1.squarespace.com/static/50363cf324ac8e905e7df861/t/6afe293472e19d05894f58bb/179504...
1•daniel_iversen•38m ago•0 comments

Show HN: RISC-V emulator booting 256-hart SMP Linux/uClibc/BusyBox on RTX3060

https://github.com/gaidardzhiev/vertigo
1•mrelf•38m ago•0 comments

Sounds of the Adriatic – a sound map of the Croatian coast

https://sound.marespot.com/
2•yossarian_johnn•40m ago•0 comments

Show HN: Agent Bolt – a browser game that teaches Claude Code by doing

https://agentbolt.dev/#game
3•danlapteacru•52m ago•0 comments

Ask HN: How do you manage the curse of rabbit hole?

2•BOOSTERHIDROGEN•53m ago•1 comments

LumenDisk – read/write ext4 and NTFS on macOS without macFUSE or kexts

https://github.com/giuseppegambino92/LumenDisk
1•giuseppegambino•54m ago•0 comments

Backdoor attacks against Machine Learning IRL

https://phrack.org/issues/73/backdoor-attacks-against-machine-learning-irl_md
2•DonAtimator•54m ago•0 comments

Show HN: QR Anatomy, See what every square of a QR code is for

https://hrih.si/projects/qr-anatomy/
2•DonAtimator•56m ago•0 comments

I will build an LLM to actively defend cyber attacks

1•mastaanshaik•56m ago•0 comments

Ncurses Documentation

https://betsalel-williamson.github.io/ncurses/
1•rbanffy•56m ago•0 comments

De-fanging dangerous triggers in GitHub Actions across an organization

https://pyfound.blogspot.com/2026/11/de-fanging-dangerous-triggers-in-github.html
1•lumpa•1h ago•0 comments

Show HN: Kruftle – reclaim disk space with each toolchain's own clean command

https://kruftle.dizitart.com/
1•anidotnet•1h ago•0 comments

Air Force Maj. Jason Watson has been in solitary confinement for almost 100 days

https://www.stripes.com/branches/air_force/2026-11-17/jason-watson-pretrial-hearing-uscmj-charges...
4•o_-_o•1h ago•1 comments

Nvidia investigating Gentlemen ransomware breach claims

https://www.bleepingcomputer.com/news/security/nvidia-investigating-gentlemen-ransomware-breach-c...
2•saikatsg•1h ago•0 comments