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?

Free Gpt.im

https://freegpt.im
1•Evan23345•35s ago•0 comments

International cyber attack disrupts swathe of universities and schools

https://www.bbc.com/news/articles/ce3pq0136eqo
1•1vuio0pswjnm7•1m ago•0 comments

A Man Who Almost Never Succeeded (2012)

https://www.lensrentals.com/blog/2012/10/the-man-who-almost-never-succeeded/
1•downbad_•3m ago•1 comments

Help Needed Seeking Contributors for a Pure C Compiler and Runtime

https://github.com/heikowagner/nela-lang/issues/1
1•heikowag•4m ago•0 comments

Simplifying camera trap image analysis with AI

https://addaxdatascience.com/addaxai/
1•bryanrasmussen•6m ago•1 comments

Yesterday I had some news that has left me feeling

https://mylightstillshines.wordpress.com/2026/05/09/yesterday-i-had-some-news-that-has-left-me-fe...
1•jaygirl•7m ago•0 comments

Show HN: I Built a Retro Survival RPG in Vanilla JavaScript

1•jasonkester•10m ago•0 comments

Astroberry – OS for controlling astronomy equipment

https://astroberry.io/
1•NKosmatos•13m ago•0 comments

Show HN: Digits – Encrypted calls from gutted vintage desk phones

https://digits.family
1•justinlindh•19m ago•1 comments

IPO: Lime (SEC S-1 Form, Neutron Holdings)

https://www.sec.gov/Archives/edgar/data/1699963/000162828026032523/neutronholdingsinc-sx1.htm
2•wuschel•24m ago•0 comments

Hondurasgate: US, Israeli Plot to Destabilize Mexico, Latin America

https://english.elpais.com/international/2026-05-07/hondurasgate-the-alleged-us-and-israeli-inter...
4•vrganj•26m ago•0 comments

Everything you need to know about recently released UFO files by Dow

https://sourceryintel.com/reports/dow-ufo-files-may-2026
1•freakynit•32m ago•0 comments

Is Opus 4.7 a Downgrade?

https://www.vincentschmalbach.com/is-opus-4-7-a-downgrade/
3•vincent_s•32m ago•1 comments

Instagram DMs Lose End-to-End Encryption Starting Today

https://www.macrumors.com/2026/05/08/instagram-end-to-end-encryption/
2•7777777phil•36m ago•0 comments

A JSON parser in 2k standard cells: a Tiny Tapeout design walkthrough

https://www.plawanrath.com/articles/grammartile-tinytapeout-walkthrough/
3•plawanrath•36m ago•0 comments

ABA Games (1D Pac-Man, etc) Agentic Gamedev Skills

https://github.com/abagames/agentic-gamedev-skills
2•helloplanets•40m ago•0 comments

An experimental Rust-to-CUDA compiler from Nvidia

https://nvlabs.github.io/cuda-oxide/index.html
2•chenzhekl•41m ago•0 comments

La Suite Docs v5.0.0 released

https://github.com/suitenumerique/docs/releases/v5.0.0
1•PhilippGille•43m ago•0 comments

Dirty Frag: Ongoing Linux Kernel Privilege Escalation Vulnerability Since 2017

https://www.wiz.io/blog/dirty-frag-linux-kernel-local-privilege-escalation-via-esp-and-rxrpc
2•birdculture•44m ago•0 comments

Caligra c100 Developer Terminal – Industrial design of computer hardware

https://www.pentagram.com/work/caligra-c100-developer-terminal
1•kaizenb•48m ago•0 comments

iDF soldiers are putting cigarettes in Virgin Mary statues in occupied Lebanon

https://twitter.com/jvnior/status/2052734478632521895
2•proshno•50m ago•1 comments

NREL best research cell (photovoltaic) efficiency chart [pdf]

https://nrel.gov/media/docs/libraries/pv/cell-pv-eff.pdf
3•walrus01•51m ago•1 comments

Lunar Impact Flashes NASA Artemis

https://nbsla.ca/lunar-impact-flashes-nasa-artemis/
1•01-_-•51m ago•0 comments

Intel shares soar on Apple chip deal report

https://www.cnbc.com/2026/05/08/intel-stock-apple-chip-deal.html
4•01-_-•53m ago•0 comments

Rakudo – Raku on MoarVM, JVM, and JavaScript

https://github.com/rakudo/rakudo
2•tosh•1h ago•0 comments

All my clients wanted a carousel, now it's an AI chatbot

https://adele.pages.casa/md/blog/all-my-clients-wanted-a-carousel-now-it-s-an-ai-chatbot.md
41•edent•1h ago•8 comments

What Color Is a Tennis Ball?

https://www.theatlantic.com/science/archive/2018/02/what-color-tennis-ball-green-yellow/523521/
2•thunderbong•1h ago•1 comments

Databricks Apps Tutorial: Scalable Streamlit Modular Template for Production

https://medium.com/towards-data-engineering/databricks-apps-tutorial-scalable-streamlit-modular-t...
1•protmaks•1h ago•0 comments

Chaos erupts as cyberattack disrupts learning platform Canvas amid finals

https://arstechnica.com/security/2026/05/chaos-erupts-as-cyberattack-disrupts-learning-platform-c...
3•joozio•1h ago•0 comments

Hobonichi Digital Planner

https://techoapp.1101.com/
1•skogstokig•1h ago•0 comments