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?

Tracing a silent-corruption bug in differentially private LoRA fine-tuning

https://imranahamed.substack.com/p/the-dp-lora-silent-corruption-how
1•immu4989•35s ago•0 comments

Linux Foundation announces Akrites: coord/remediate/disclose OSS vulnerabilities

https://akrites.org/
1•dwheeler•2m ago•0 comments

Show HN: CodeCritic – Arduino code that compiles and simulates before you build

https://drive.google.com/file/d/1FyT0EQ4WPzOghOOzFeHyfLHUh_uIOg6J/view?usp=sharing
2•Abhro•2m ago•0 comments

The Doorman's Fallacy in Action

https://rozumem.xyz/posts/17
2•rozumem•6m ago•0 comments

Feds deny Polestar authorization to sell cars in US from model year 2027

https://arstechnica.com/cars/2026/06/feds-deny-polestar-authorization-to-sell-cars-in-us-from-mod...
2•Quinner•6m ago•0 comments

Why we're choosing stewardship over an exit – Thoughtbot

https://thoughtbot.com/blog/why-we-re-choosing-stewardship-over-an-exit
1•FrancoisBosun•6m ago•0 comments

"My dad is Li Gang" incident ("我爸是李刚"案)

https://en.wikipedia.org/wiki/Li_Gang_incident
1•firefax•7m ago•0 comments

Show HN: Omnigraph - object-storage native graph engine with git-style workflows

https://github.com/modernrelay/omnigraph
2•ragnor•7m ago•0 comments

Scaling Rails at Aura Frames: Splitting to 8 Primary DBs

https://andyatkinson.com/how-aura-frames-scales-for-peak-load-ruby-on-rails
1•chao-•7m ago•0 comments

Show HN: Polygraph – Let AI agents see cross repo and maintain session memory

https://trypolygraph.com/
3•jeffbcross•7m ago•0 comments

Cornell Recovered $100k in Unidentified Payments with AI

https://innovationhub.ai.cornell.edu/articles/how-cornell-recovered-100000-in-unidentified-paymen...
2•simonpure•8m ago•0 comments

Russia's plan to drill superdeep revives controversial theory of 'endless oil'

https://www.science.org/content/article/russia-s-plan-drill-superdeep-holes-arctic-revives-contro...
3•Kaibeezy•9m ago•0 comments

Show HN: I built an Ad-free Pinterest Alternative with AI content filtering

https://moodloom.xyz
1•akshat368•11m ago•1 comments

Trying to recover from thin content penalty from Google

2•anitroves•13m ago•2 comments

Idler Magazine

https://www.idler.co.uk/
1•tomjakubowski•13m ago•0 comments

AI Surveillance: Age Verification Meets Your Chat Logs

https://techtrenches.dev/p/the-cost-of-reading-everyone-just
2•pavel_lishin•13m ago•0 comments

Staying Awake (2008)

https://harpers.org/archive/2008/02/staying-awake/
1•NaOH•15m ago•0 comments

The easy way to build your own App and SaaS Analytics Dashboard, without SDKs

https://nerdsip.com/blog/how-to-build-your-own-app-analytics
1•wrangeliese•15m ago•0 comments

Indian Political Simulation web based game

https://political-sim-mu.vercel.app
1•Supratik090•15m ago•0 comments

Multi agent systems for complex tasks

https://lexifina.com/blog/multi-agent-systems-for-complex-tasks
1•alansaber•17m ago•0 comments

Structured Primary Keys

https://modern-sql.com/blog/2026-06/structured-primary-keys
1•chmaynard•18m ago•0 comments

Trailing Dots Are the Worst

https://daniel.haxx.se/blog/2026/06/25/trailing-dots-are-the-worst/
3•chmaynard•19m ago•0 comments

Scrutineer: Scanning open source without flooding maintainers

https://nesbitt.io/2026/06/25/scrutineer.html
1•chmaynard•20m ago•0 comments

Inaccurate diagnostic error displayed to all BMW i4 owners

https://www.i4talk.com/threads/replace-battery-error-today-june-24-common-issue.15861/
1•JojoFatsani•20m ago•0 comments

Applied AI Implementation Engineer Freelance

3•awongsem•22m ago•0 comments

Hours of Humanoid Teleop, Recorded in Real Homes

https://topicqueue.substack.com/p/500-hours-of-humanoid-teleop-recorded
3•DISCURSIVE•24m ago•0 comments

NewsOnScale

https://www.newsonscale.com/
2•AMILLI_AI_CORP•25m ago•0 comments

Achieving Host and MicroVM Density Using Erofs

https://spacescale.io/blog/achieving-host-and-microvm-density-using-erofs/
2•tobiogundiyan•25m ago•0 comments

AI Is Designing Radio Chips That Humans Couldn't Even Imagine

https://spectrum.ieee.org/ai-radio-chip-design
6•pseudolus•27m ago•0 comments

Show HN: OnBuzz – an open-source workspace for AI agent teams

https://github.com/Loxia-ai/onbuzz-community
2•Dantlv•28m ago•1 comments