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•11mo ago

Comments

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

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

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

Why We're Removing Our Programmatic Ads

https://prospect.org/2026/04/06/why-were-removing-our-programmatic-ads/
1•colinprince•5m ago•0 comments

Show HN: Portable offline LLM knowledge system that runs in browser

1•muthuishere•8m ago•0 comments

China Orders Bitchat Pulled from Apple App Store

https://decrypt.co/363367/china-orders-jack-dorseys-bitchat-pulled-from-apple-app-store
1•giuliomagnifico•8m ago•0 comments

DevTerm – Portable Terminal

https://www.clockworkpi.com/home-devterm
2•kristianpaul•12m ago•0 comments

Clockworkpi

https://www.clockworkpi.com
3•kristianpaul•14m ago•1 comments

Why the majority of vibe coded projects fail

https://www.reddit.com/r/ClaudeAI/s/Vkkzi4lUW0
5•juniormpakou•19m ago•0 comments

One Softie's View of the Evolution of Windows APIs

https://twitter.com/stevesi/status/2036921223150440542
2•jnord•20m ago•0 comments

Free Early Learning Content for Kids – Feedback Welcome

https://www.youtube.com/channel/UCuC2pezENaY3BTsDnACzY-w
1•fatbrother•22m ago•0 comments

My Real-Life Account as a Federally Cleared US Government Whistleblower

https://drive.proton.me/urls/TVQBZBVQK0#g50TCYlBdeeb
2•kernel_haathi•23m ago•1 comments

I'm building a local-first CLI "knowledge foundry" for LLM workflows

https://twitter.com/theopuslabs/status/2041316189515723028
2•opuslabs•25m ago•0 comments

Lab Gloves May Be Skewing Microplastics Data

https://hackaday.com/2026/04/06/lab-gloves-may-be-skewing-microplastics-data/
2•lxm•33m ago•0 comments

Robots Eat Cars

https://telemetry.endeff.com/p/robots-eat-cars
1•JMill•33m ago•0 comments

A.I. Is on Its Way to Upending Cybersecurity

https://www.nytimes.com/2026/04/06/technology/ai-cybersecurity-hackers.html
1•lxm•36m ago•0 comments

Anthropic's refusal to drop AI safeguards for The Pentagon

https://claude.ai/public/artifacts/f1c3dd80-a3eb-49eb-9d92-867705526437
2•skmadd•38m ago•0 comments

We Don't Know: A Case for Mars

https://dave.autonoma.ca/blog/2026/04/06/case-for-mars/
1•thangalin•38m ago•1 comments

"Do you think AI will ever be able to write a good song?"

https://www.theredhandfiles.com/considering-human-imagination-the-last-piece-of-wilderness-do-you...
1•Nition•42m ago•1 comments

Badclaude – whip Claude to make it go faster

https://github.com/GitFrog1111/badclaude
1•beatthatflight•42m ago•1 comments

What Next for the Compute Crunch?

https://martinalderson.com/posts/what-next-for-the-compute-crunch/
2•jnord•43m ago•0 comments

Guns and Butter: The Oldest Trade-Off in Economics Is Back

https://www.mondayeconomist.com/p/guns-and-butter
3•NomNew•46m ago•0 comments

MyChart an online patient portal for access to your medical record

https://www.mychart.org/
1•megamike•47m ago•2 comments

Codexia: OSS Agent Workstation for Codex and Claude

https://github.com/milisp/codexia/
1•lostmsu•47m ago•1 comments

From folding boxes to fixing vacuums, GEN-1 robotics model hits 99% reliability

https://arstechnica.com/ai/2026/04/generalists-new-physical-robotics-ai-brings-production-level-s...
2•jnord•51m ago•0 comments

Show HN: I built my knowledge OS from ingesting to next step action

https://github.com/menggg22/personal_knowlege_os
1•menggg•51m ago•0 comments

Gave my Claude a subconscious memory system

https://github.com/justnau1020/claude-os
2•justnau1020•1h ago•1 comments

Benchmarked 37 LLMs on MacBook Air M5 32GB

https://old.reddit.com/r/LocalLLaMA/comments/1se81a5/i_benchmarked_37_llms_on_macbook_air_m5_32gb...
2•rguiscard•1h ago•0 comments

Browser Agents That Learn

https://browser-use.com/posts/web-agents-that-actually-learn
3•gregpr07•1h ago•0 comments

Interpreting Polygenic Prediction of Cognitive Ability

https://icajournal.scholasticahq.com/article/158459-interpreting-polygenic-prediction-of-cognitiv...
2•Anon84•1h ago•0 comments

Claude Agent SDK vs. Messages API for a Production AI Assistant?

2•makeavish•1h ago•0 comments

What "elastic compute" means in 2026

https://opencomputer.dev/blog/what-elastic-compute-means
2•iacguy•1h ago•0 comments

Show HN: Real time purchasing power of $1 USD since 2000

https://onedollar.today/
4•traviswingo•1h ago•0 comments