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•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?

Map of every park in Salt Lake City

https://saltlake.citycast.fm/parks
1•bencornia•30s ago•0 comments

The Fall of the Theorem Economy

https://davidbessis.substack.com/p/the-fall-of-the-theorem-economy
1•magoghm•32s ago•0 comments

Do City Delivery Drones Make Sense? No One Knows, but They're Flying over NYC

https://www.wired.com/story/do-city-delivery-drones-make-sense-no-one-knows-but-theyre-flying-ove...
1•Brajeshwar•4m ago•0 comments

B-tree based collection types for Go

https://github.com/tidwall/btype
2•eatonphil•4m ago•0 comments

Chrome's AI features may be hogging 4GB of your computer storage

https://www.theverge.com/tech/924933/google-chrome-4gb-gemini-nano-ai-features
1•birdculture•5m ago•0 comments

Its the Age of Electricity and America Isn't Ready

https://www.nytimes.com/interactive/2026/04/27/opinion/electricity-power-grid-infrastructure.html
1•anjel•6m ago•1 comments

TikZlings – A collection of cute little animals and similar creatures

https://ctan.org/pkg/tikzlings?lang=en
1•Tomte•10m ago•0 comments

Why payment escrow for AI agents needed a different design

https://streetai.org/blog/escrow-for-ai-agents.html
2•degutemesgen•11m ago•0 comments

A super simple tool tells you who called the function and who implemented it

https://github.com/meloalright/who-ast
3•meloyc•12m ago•0 comments

Proposed Amendment to the Telephone Consumer Protection Act of 1991

https://www.karlbunch.com/random/website-protection-act/
2•kator•13m ago•0 comments

OSS Review Toolkit

http://oss-review-toolkit.org/ort/
2•Tomte•18m ago•0 comments

'WEALTH CONFISCATION': Blue states roll out taxes targeting homeowners [video]

https://www.youtube.com/watch?v=xXImiHrRpz8
2•SilverElfin•21m ago•3 comments

A man who blew up a nuclear power station and disappeared

https://www.theguardian.com/world/2026/may/05/the-man-who-blew-up-a-nuclear-power-station-koeberg...
2•gmays•22m ago•0 comments

Shunting-Yard Animation

https://somethingorotherwhatever.com/shunting-yard-animation/
3•s1291•27m ago•0 comments

They dug up Troy and lost the gold

https://storica.club/blog/troy-was-real/
2•aralsamuel•30m ago•0 comments

Rust-based ScanCode-compatible scanner for licenses and copyrights

https://github.com/mstykow/provenant
3•Tomte•30m ago•0 comments

Using AI to onboard to a new codebase

https://newsletter.eng-leadership.com/p/how-to-use-ai-to-onboard-into-a-codebase
3•wordsaboutcode•30m ago•0 comments

Cyclekart: How to build a soapbox with a motor [video]

https://www.youtube.com/watch?v=vATUDJyM5PQ
2•Teever•31m ago•0 comments

Technical Dimensions of Live Feedback in Programming Systems

https://joshuahhh.com/dims-of-feedback/
2•tobr•31m ago•0 comments

The Reality of an Employer's Market

https://yusufaytas.com/the-reality-of-an-employers-market
8•vibeloop•32m ago•0 comments

Disgraced US gov software contractor found guilty of database destruction

https://www.theregister.com/cyber-crime/2026/05/08/former-us-contractor-convicted-in-federal-data...
2•Bender•33m ago•0 comments

Akamai surges on big LLM deal as Cloudflare dims

https://www.theregister.com/networks/2026/05/09/akamai-surges-on-big-llm-deal-as-cloudflare-dims/...
2•Bender•34m ago•0 comments

WFY24 – A performance-first weather widget with 2km hyper-local AI forecasting

https://wordpress.org/plugins/wfy24-weather-widget/
3•weatherfun•34m ago•0 comments

'Dirty Frag' Linux flaw one-ups CopyFail with no patches and public root exploit

https://www.theregister.com/security/2026/05/08/dirty-frag-linux-flaw-one-ups-copyfail-with-no-pa...
3•Bender•36m ago•0 comments

The Blue Collar Delusion: Why the machines don't have to climb up to us

https://old.reddit.com/r/singularity/comments/1t5cx3y/the_blue_collar_delusion_why_the_machines_d...
2•wallflower•37m ago•0 comments

Paper Factory

https://www.nathanwilmers.com/paper_factory/
2•_tk_•39m ago•1 comments

Louis Rossmann tells 3D printer maker Bambu Lab to 'Go (Bleep) yourself'

https://www.tomshardware.com/3d-printing/louis-rossmann-tells-3d-printer-maker-bambu-lab-to-go-bl...
48•iancmceachern•40m ago•13 comments

AI Is Making Digital Fraud Easier, Faster and Harder to Stop

https://www.bloomberg.com/graphics/2026-ai-identity-theft-scams/
3•elsewhen•42m ago•1 comments

I made rust's cargo copy but for CPP

https://github.com/user-with-username/crow
2•anybodyy•43m ago•0 comments

Owl Alpha – A free model for agentic workloads (prompts logged / closed-source)

https://openrouter.ai/openrouter/owl-alpha
2•webninja•44m ago•0 comments