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?

Show HN: AI Security Leaderboard – comparing cyber and CBRN safeguards

https://leaderboard.far.ai/
1•AdamGleave•3m ago•0 comments

Engineers have stopped reviewing PRs

https://aq.dev/guides/how-to-review-an-ai-coding-session/
1•knighthacker•5m ago•1 comments

Husk – a desktop workspace for terminal AI agents

https://github.com/DorShaer/Husk
1•DorShaer•8m ago•0 comments

Show HN: Play ROMs inline in your terminal

https://github.com/jhickner/rom
1•jhickner•8m ago•0 comments

NanoClaw and Echo launch agent runtime that secures browsers, tools and libs

https://thenewstack.io/nanoclaw-echo-agent-runtime/
1•four_fifths•9m ago•0 comments

AI's top startups are barely publishing their research

https://www.science.org/content/article/ai-s-top-startups-are-barely-publishing-their-research
6•YeGoblynQueenne•11m ago•0 comments

A Terrarium iPhone Case That Houses Actual Growing Plants and Moss

https://www.designboom.com/technology/transparent-phone-case-moss-plants-inside-terrarium-daniel-...
1•karakoram•11m ago•0 comments

Casio Moflin

https://www.casio.com/uk/moflin/
3•austinallegro•14m ago•0 comments

Models and theories of lambda calculus (2009)

http://inria.hal.science/inria-00380183v1/document
3•sargstuff•15m ago•0 comments

There is no way to know if an LLM API is manipulating you

https://twitter.com/lafalcemateo/status/2082250304330809738
1•lafalce•17m ago•0 comments

Dr. Dobb's Journal (articles from 1988 – 2009)

https://jacobfilipp.com/thedoctor/
2•slu•19m ago•1 comments

Expansion of Flock Camera Systems Is Leading to More False Positives

https://www.techdirt.com/2026/07/29/expansion-of-flock-camera-systems-is-leading-to-even-more-fal...
3•cdrnsf•21m ago•0 comments

Show HN: Dev-like – turn public engineering practice into agent skills

https://mrbro.dev/dev-like/
1•MarcusRBrown•21m ago•0 comments

AI in Education: Using ChatGPT Without Losing Critical Thinking

https://www.notion4teachers.com/blog/the-ai-learning-divide-when-technology-supports-thinking-and...
1•behindai•22m ago•0 comments

Modest Advice

https://stearnslab.yale.edu/modest-advice
1•geneticdrifts•22m ago•0 comments

Sequence Is Not Structure: Getting Lost in Long LLM Conversations

https://msg.samsonov.io/2026-07-28-sequence-is-not-structure/
3•kryzhovnik•25m ago•0 comments

Ask HN: What do you use for privacy focused analytics?

1•garyhbutton•27m ago•1 comments

Claude Outage – Mac Menu Bar Item

https://github.com/titojankowski/claude-status
3•tito•28m ago•1 comments

Sun Path and PPFD Simulator – Calculate Natural Sunlight and DLI for Plants

https://specled.com/en/w/sun-path-ppfd-dli-simulator/
1•Specled•29m ago•0 comments

The Cold Email

https://zachholman.com/posts/cold-email
1•holman•30m ago•0 comments

PyCuTe: Reference implementation and examples of the CuTe Layout

https://github.com/NVlabs/CuTe
1•matt_d•30m ago•0 comments

Word worm crawls into Copilot, spreads chaos

https://www.theregister.com/security/2026/07/29/word-worm-crawls-into-copilot-spreads-chaos/5280588
1•Bender•31m ago•0 comments

Are Yelp Reviews Harsher in Your City? (2019)

https://web.archive.org/web/20201127091203/https://nycdatascience.com/blog/student-works/are-yelp...
1•jerlam•31m ago•1 comments

Moscow slaps Telegram founder on wanted list, Durov responds one-finger salute

https://www.theregister.com/applications/2026/07/29/moscow-slaps-telegram-founder-on-wanted-list-...
2•Bender•31m ago•0 comments

When the Agent Shouldn't Run on Your Laptop

https://jasonrobert.dev/blog/2026-07-29-when-the-agent-shouldnt-run-on-your-laptop/
1•cebert•31m ago•0 comments

Who wins and who loses after US bans foreign robots?

https://arstechnica.com/ai/2026/07/who-wins-and-who-loses-after-us-bans-foreign-robots/
1•Bender•32m ago•0 comments

Show HN: Email domain health check with shareable reports

https://shipmail.to/tools/email-health
1•jcoulaud•32m ago•0 comments

Show HN: Rebuilding ARKit 3D Reconstruction

https://twitter.com/pablovelagomez1/status/2082256328966422542
3•pablovelagomez•32m ago•1 comments

Anthropic's Lonely Island

https://www.axios.com/2026/07/29/anthropic-claude-open-models-ban-china
1•theanonymousone•32m ago•0 comments

RCade: The Arcade Cabinet with CI/CD Deployment, Custom Graphics Card for CRT [video]

https://www.youtube.com/watch?v=W-OpIbLUOU0
1•evakhoury•33m ago•0 comments