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?

High-temperature memristors enabled by interfacial engineering

https://www.science.org/doi/10.1126/science.aeb9934
2•joak•1m ago•1 comments

Amazon to Acquire Globalstar and Expand Amazon Leo Satellite Network

https://www.businesswire.com/news/home/20260414237496/en/Amazon-to-Acquire-Globalstar-and-Expand-...
1•homarp•2m ago•0 comments

Qwen OAuth Free tier will be discontinued on 2026-04-15

https://github.com/QwenLM/qwen-code/pull/3207
2•angst•4m ago•0 comments

Roy Fielding's Misappropriated REST Dissertation (2020)

https://twobithistory.org/2020/06/28/rest.html
1•locknitpicker•7m ago•0 comments

REST APIs must be hypertext-driven (2008)

https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
1•locknitpicker•8m ago•1 comments

The 'Annoyance Economy' Is More Than Just Annoying

https://www.nytimes.com/2026/04/12/business/annoyance-economy-costs.html
1•vinni2•9m ago•0 comments

Unidentified deep sea creature encountered off the coast of Japan

https://phys.org/news/2026-04-rich-biodiversity-japan-deepest-ocean.html
2•lfaw•10m ago•1 comments

Chris Taylor on AI (2005)

https://main.kanoogi.com/updates?updates=kanoogi_updates&topic=0013#blogstart
1•fho•11m ago•0 comments

ASML raises 2026 sales outlook to €36B–€40B

https://www.asml.com/en/news/press-releases/2026/q1-2026-financial-results
2•felipevb•14m ago•0 comments

Acid-Free Paper

https://en.wikipedia.org/wiki/Acid-free_paper
1•tosh•16m ago•0 comments

Burn Peak Health for Healthy Weight Management [pdf]

https://storage.prod.researchhub.com/uploads/papers/users/187827/aceef47a-9ba6-48db-b4f1-eebb0107...
1•Zacspencet•17m ago•0 comments

LazyVim for Ambitious Developers: Second Edition

https://www.patreon.com/posts/lazyvim-for-155631128
1•DavideNL•20m ago•0 comments

People are pretending to be AI chatbots – for fun

https://www.npr.org/2026/04/14/nx-s1-5776842/ai-chatbot-comedy-ben-palmer-chatgpt
3•geox•21m ago•0 comments

Show HN: My favorite local-feeling remotely accessible Claude Code setup

https://gist.github.com/Reebz/99db98ad4d3c45ebed84989a13710788
2•Reebz•25m ago•0 comments

Capture the Narrative: Wargaming Social Media Manipulation

https://capturethenarrative.com/
2•jruohonen•28m ago•0 comments

Popular Flutter GetX repo disappeared briefly

https://github.com/jonataslaw/getx
1•nativeforks•28m ago•0 comments

Make AI say your name correctly

https://hamanlp.org/research/names/
1•boodleboodle•28m ago•0 comments

Interpretability cracked? Flexoelectric gradient field structures language

https://geoclaritylabs-production-a664.up.railway.app/
1•wwes369•28m ago•0 comments

I built a travel tool with 0% friction: No login, just RAG-powered inspiration

https://www.lupath.ai/
1•LUpath•30m ago•0 comments

Can I file for a patent for my own if I am working for an MNC

1•biswajitkar01•31m ago•0 comments

Constitutional Security: What Enterprise Infra Taught Me About AI Agent Safety

https://blog.ekelhaft.tools/constitutional-security-what-enterprise-infrastructure-taught-me-abou...
2•ttyyzz•31m ago•0 comments

Hazardous States and Accidents

https://entropicthoughts.com/hazardous-states-and-accidents
1•fagnerbrack•33m ago•0 comments

America's hiking culture is built on ego

https://www.theguardian.com/environment/2026/apr/14/americas-hiking-culture-is-built-on-ego
1•mykowebhn•34m ago•0 comments

Iran used Chinese spy satellite to target US bases

https://www.ft.com/content/1fddd2cd-1294-4e9c-a17d-5ea06b399355
3•cwwc•36m ago•0 comments

Google Gemma 4 Runs Natively on iPhone with Full Offline AI Inference

https://www.gizmoweek.com/gemma-4-runs-iphone/
2•takumi123•37m ago•0 comments

NPM retires audit endpoint; breaks pnpm audit

https://github.com/pnpm/pnpm/issues/11265
1•troad•38m ago•1 comments

Show HN: FlipAEO – Get your SaaS cited by Perplexity and AI search

1•harvansh•39m ago•0 comments

US forces kill 4 people in latest strike on vessels in eastern Pacific

https://www.aljazeera.com/news/2026/4/15/us-forces-kill-4-people-in-latest-strike-on-vessels-in-e...
1•frasermarlow•39m ago•0 comments

Arm Comes to the Framework 13

https://www.youtube.com/watch?v=CIb87SJ4xwo
1•brainless•42m ago•1 comments

Finny – describe a trading strategy in plain English, get backtested algo code

https://www.finnyai.tech
1•jaimin67•43m ago•1 comments