frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•9mo ago

Comments

nine_k•9mo 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•9mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•9mo ago
They mention this in the article.
spockz•9mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•9mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•9mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•9mo 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•9mo 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•9mo 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•9mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•9mo ago
This was very well written. Excellent article!
NetOpWibby•9mo ago
Is this like MessagePack for Haskell?

'Depths of Wikipedia' Creator Annie Rauwerda on 'Fragile' Internet Citations

https://blog.archive.org/2026/02/05/depths-of-wikipedia-creator-annie-rauwerda-on-fragile-interne...
1•abetusk•1m ago•0 comments

Integration Labs: Transforming Traumatizing into Trauma-Integrating Cultures

https://pocketproject.org/integration-labs-2026/
1•rendx•2m ago•0 comments

I Hacked My Feed to Find Undervalued Content

https://xrayfeed.deepwalker.xyz/blog/strategies
1•m00dy•4m ago•0 comments

What are tokens and how to count them?

https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them
1•teleforce•6m ago•0 comments

Web of Knowledge

https://dave.autonoma.ca/blog/2019/06/06/web-of-knowledge/
1•andsoitis•8m ago•0 comments

Alpine Linux is a security-oriented, lightweight Linux based on musl Libc

https://www.alpinelinux.org/
1•doener•9m ago•0 comments

Collapse OS on the ZX Spectrum

https://www.youtube.com/watch?v=q4Ra4NwMHBM
1•doener•11m ago•0 comments

RubyShell New Release

https://github.com/albertalef/rubyshell/releases/tag/v1.5.0
1•albertalef•12m ago•0 comments

Collapse OS – Why Forth?

https://collapseos.org/forth.html
4•doener•14m ago•0 comments

Horizons – OSS Agent Execution Engine

https://github.com/synth-laboratories/Horizons
4•JoshPurtell•19m ago•2 comments

A Very Small SAT Solver (From Haskell) Now in Dafny, Proved Correct with LLMs

https://github.com/namin/dafny-sandbox/blob/master/Sat.dfy
1•namin•21m ago•0 comments

Ask HN: Anyone Seeing YT ads related to chats on ChatGPT?

1•guhsnamih•21m ago•1 comments

Y Combinator Reverses Decision to Stop Investing in Canada Firms

https://www.bloomberg.com/news/articles/2026-02-05/y-combinator-reverses-decision-to-stop-investi...
3•toomuchtodo•28m ago•1 comments

Datacenter capex gravy train is over

2•zerosizedweasle•32m ago•4 comments

The limits of interview questions

https://orchidfiles.com/the-limits-of-interview-questions/
1•theorchid•35m ago•0 comments

Show HN: ImportKit – Embeddable CSV import widget for SaaS apps

1•gissurthor•35m ago•0 comments

Incarcerated activists from Oscar-nominated documentary sent to solitary

https://www.theguardian.com/us-news/2026/jan/30/alabama-solution-activist-solitary-confinement
4•konaraddi•38m ago•0 comments

What Happens When You Delete a File

https://www.youtube.com/watch?v=up9DoD2hs_E
1•artisandip7•39m ago•0 comments

Counter-Strike Bench: GPT 5.3 Codex vs. Claude Opus 4.6

https://www.instantdb.com/essays/codex_53_opus_46_cs_bench
2•stopachka•41m ago•0 comments

We Reverse-Engineered Docker Sandbox's Undocumented MicroVM API

https://www.rivet.dev/blog/2026-02-04-we-reverse-engineered-docker-sandbox-undocumented-microvm-api/
1•pploug•44m ago•0 comments

My name is Sensurround Q. Catgirl, and I microwave bacon

https://twitter.com/ShamashAran/status/2019442354524979502
1•delichon•44m ago•0 comments

'The EU runs on Microsoft' – and Uncle Sam could turn it off

https://www.theregister.com/2026/02/04/eu_foss_fears/
6•belter•47m ago•0 comments

Geometric Art in Ancient Greece

https://www.metmuseum.org/essays/geometric-art-in-ancient-greece
2•sebg•48m ago•0 comments

meepr

https://meepr.co/
1•bookofjoe•49m ago•0 comments

Show HN: Graph DB-backed game, like Dobble/Spot it to play with Projective Plane

https://github.com/jpadams/fastmatchgame
1•jpadamspdx•49m ago•0 comments

Show HN: Hacker News Topics that Span Multiple Discussions

https://hn-related.dosaygo.com/?sort=comments&p=1
2•keepamovin•51m ago•2 comments

A First Course in Causal Inference

https://arxiv.org/abs/2305.18793
1•Anon84•53m ago•0 comments

Commodore, IBM, OS/2, ARexx: Deal or No Deal?

https://datagubbe.se/os2/
6•rbanffy•55m ago•0 comments

Caught Trojan Malware in VSCode Extension with 1.3M Downloads

https://vscan.dev/?analysisId=74c4c949-862c-46c8-a8be-e469d4ff1f06
4•shadow-ninja•58m ago•2 comments

TrumpRx: Find the lowest prices on prescription drugs

https://trumprx.gov/
3•0xedb•58m ago•2 comments