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?

The Arena

https://thearena.rip
1•DynamicCreation•32s ago•0 comments

Dobium: $0 commission prediction exchange

https://dobium.com/waitlist
1•nrb23•5m ago•1 comments

The World as a Hologram

https://arxiv.org/html/hep-th/9409089v2
1•qnleigh•8m ago•1 comments

The millionth.bid: the last bidder's quest

https://millionth.bid/
1•bdthombre•9m ago•0 comments

US lawmakers aim to keep China's tech out of sensitive government systems

https://www.rnz.co.nz/news/world/1591943/us-lawmakers-aim-to-keep-china-s-tech-out-of-sensitive-g...
3•billybuckwheat•9m ago•0 comments

Planetary Gear (Code Art)

https://code.chuanqisun.com/planetary-gear/
2•low_tech_punk•10m ago•0 comments

Show HN: Jevlang. delegate every if/while to Jev

https://github.com/RoyWiggins/jevlang
1•roywiggins•30m ago•0 comments

Cognition Crosses $1B in Annualized Revenue Run Rate

https://cognition.com/blog/1b-run-rate
1•doppp•32m ago•0 comments

Distributed Quantum Compiler (DQC / XDQC) by MemQ open-source now

https://www.hpcwire.com/off-the-wire/memq-releases-open-sourced-distributed-quantum-compiler/
1•noobplus•33m ago•0 comments

Great News from Saturn's Moon Enceladus in the Search for Life in Space

https://www.fu-berlin.de/en/presse/informationen/fup/2026/fup_26_116-enceladus-cassini-mikroben-s...
2•geox•33m ago•1 comments

Make an animated pelican on unicycle jugging fish while explaining bash command

https://twitter.com/goodside/status/2103149526244618682
1•forgingahead•34m ago•1 comments

Lecture: Blowup for the Euler Equations with Smooth Forcing – Tristan Buckmaster [video]

https://www.youtube.com/watch?v=tn45ZOp3lXM
1•yurimo•38m ago•1 comments

Ask HN: Is multi-model redundancy now a compliance requirement for small teams?

1•weiqi554177834•44m ago•1 comments

Show HN: A dashboard for tracking usage limits across Claude, Codex, and Cursor

https://www.usagebuddy.com/
2•bhavyshekhaliya•45m ago•1 comments

Walgit: A Git server that is one binary in front of an object store

https://github.com/rgodha24/walgithub
1•handfuloflight•46m ago•1 comments

Show HN: CoordMap – free browser tools for coordinates, elevation, and distance

https://www.coordmap.com/
1•luoluoecho•50m ago•0 comments

Trading a Cloud Identity for Your Own: Workload Attestation on Managed Compute

https://netflixtechblog.com/trading-a-cloud-identity-for-your-own-workload-attestation-on-managed...
2•mfrw•56m ago•0 comments

Were 1970s Korean Orphanages a Great Place to Raise Kids?

https://www.richardhanania.com/p/were-1970s-korean-orphanages-a-great
2•barry-cotter•1h ago•1 comments

A thesis isn't enough for a PhD

https://lemire.me/blog/2026/09/26/a-thesis-isnt-enough-for-a-phd/
2•smilelamp•1h ago•0 comments

Revelations of dozens more platforms hit by OpenAI agents

https://www.abc.net.au/news/2026-09-26/openai-review-rogue-agents-australia-medicare-hack/107199074
4•soundworlds•1h ago•1 comments

The Universe Rendered in ASCII

https://gcdatlas.vercel.app/
1•chaosmachine•1h ago•1 comments

We're gonna need a lot more mathematicians

https://terrytao.wordpress.com/2026/09/24/were-gonna-need-a-lot-more-mathematicians/
8•srcreigh•1h ago•0 comments

Show HN: Safe-fetch – a Python URL fetcher with per-redirect address checks

https://github.com/Rehanfaisal/ssrf-safe-fetch
1•rehandevv•1h ago•0 comments

Eremina Desertorum

https://en.wikipedia.org/wiki/Eremina_desertorum
1•thunderbong•1h ago•0 comments

Lix: Version control system for files and tables

https://lix.dev
2•handfuloflight•1h ago•1 comments

Guitar amp and effects pedal built on the Waveshare ESP32-S3-Touch-AMOLED-2.06

https://github.com/dashersw/coyopedal
1•arbayi•1h ago•0 comments

ShinyHunters Renewed Mass Exploitation Campaign Targeting Oracle PeopleSoft

https://cloud.google.com/blog/topics/threat-intelligence/shinyhunters-renewed-mass-exploitation-c...
3•882542F3884314B•1h ago•0 comments

Faster Transport on Cloud Infra

https://quasiben.github.io/blog/efa-aws/
3•quasiben•1h ago•0 comments

Yamtam.nyc – yet another mass-transit all-in-one map

https://yamtam.nyc
2•tolidano•1h ago•3 comments

Deep Scattering Layer

https://en.wikipedia.org/wiki/Deep_scattering_layer
1•gradus_ad•1h ago•0 comments