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?

You can't train in what the model knows

https://hftuniversity.com/post/your-ai-s-fast-c-wasn-t-faster-and-one-sentence-makes-it-safe
1•htk•1m ago•0 comments

Why isn't xAI as impactful compared to others?

1•manonginusa•6m ago•0 comments

Tree Transformers

https://astledsa.substack.com/p/tree-transformers
1•astledsa•8m ago•0 comments

LLMs Are Complicated Now

https://ianbarber.blog/2026/06/19/llms-are-complicated-now/
1•matt_d•11m ago•0 comments

A New Book on Plagiarism

https://www.commentary.org/articles/joseph-epstein/plagiarism-writing-politics-arts/
3•promulgate•17m ago•0 comments

Animaps: An open source travel map video maker

https://feralui.vercel.app/#/animaps
1•solutionB•18m ago•0 comments

Why has the pointe shoe been so resistant to change?

https://dancemagazine.com/pointe-shoe-innovation/
2•onemind•18m ago•0 comments

How to Feed a Dictator

https://www.theguardian.com/film/2026/jun/09/how-to-feed-a-dictator-film
15•Michelangelo11•19m ago•0 comments

'Digital Circus' Google easter egg

https://www.google.com/search?q=digital+circus
1•Lammy•28m ago•1 comments

Statement regarding GNU Savannah security reports

https://www.fsf.org/news/statement-regarding-gnu-savannah-security-reports
2•pentagrama•32m ago•0 comments

A record 242 US cities now have starter homes that cost $1M

https://investors.zillowgroup.com/news-and-events/news/news-details/2026/A-record-242-US-cities-n...
26•littlexsparkee•34m ago•4 comments

Blackwell Build Atlas

https://elliotbonneville.github.io/rtx6kpro-atlas/
1•elliotbnvl•45m ago•0 comments

I am dreading our LLM-written incident report future

https://surfingcomplexity.blog/2026/06/19/i-am-dreading-our-llm-written-incident-report-future/
3•azhenley•46m ago•0 comments

Build a full knowledge graph locally with any video

https://github.com/goodq02/goodq4all
2•joesdomingo•46m ago•0 comments

I Solved My Mystery Fatigue with AI

https://metalearn.substack.com/p/i-solved-my-mystery-fatigue-with-ai
1•staticshock•48m ago•0 comments

Why Algo Traders Club Is Moving from Hyperliquid to Kalshi

https://www.algotradersclub.com/blog/why-algo-traders-club-is-moving-from-hyperliquid-to-kalshi
1•fode•50m ago•0 comments

Telo confirms 400 kW sustained charging for its tiny electric truck

https://electrek.co/2026/06/19/telo-confirms-400-kw-sustained-charging-tiny-electric-truck/
1•breve•53m ago•0 comments

Efficient C++ Programming for Modern C++ CPUs, Chapter 4/part 2

https://6it.dev/blog/infographics-operation-costs-in-cpu-clock-cycles-take-2-80736
2•birdculture•54m ago•0 comments

Out of Stealth (Kinda)

https://github.com/Egoist-Machines/LodeDB
1•erinmeryl•55m ago•0 comments

Kahneman: Theory Induced Blindness

https://safetyinsights.org/2026/02/16/daniel-kahneman-theory-induced-blindness/
1•Jimmc414•56m ago•0 comments

Show HN: Agentcard – virtual cards for AI agents, now with DoorDash checkout

https://www.agentcard.sh
1•pipeabello•58m ago•0 comments

How to avoid street violence, by a professional kickboxer

https://www.youtube.com/watch?v=Q8Vk9KvLD3Q
1•nailer•59m ago•0 comments

Show HN: P34 – tabular profit prediction without the optimism bias

https://hyperc.com/preview/index.html
1•grandrew•59m ago•0 comments

Lump Sum vs. DCA comparison: LS wins or does it?

https://hduynam99.substack.com/p/lump-sum-vs-dca-comparison-ls-wins
1•hoangthuytrang•59m ago•0 comments

Cursor Is Now SpaceX: Enterprise Agentic Coding's New Lock-In Risk

https://superml.dev/spacex-cursor-enterprise-agentic-coding-lock-in-risk-2026
1•bps1418•1h ago•1 comments

Backstitch: Real-Time Version Control for Godot

https://backstitch.dev/
1•coinfused•1h ago•0 comments

Swedish VPN provider OVPN sold to US stock and asset company

https://www.ovpn.com/en/privacy-notice
3•hackedoffnews•1h ago•2 comments

We built a lab to evaluate data agents – Hex

https://hex.tech/blog/evaluate-data-agents/
2•haritha1313•1h ago•0 comments

Speculation Is All You Need

https://modal.com/blog/spec-is-all-u-need
5•charles_irl•1h ago•0 comments

Kernhelm: A Linux authority wall for untrusted agents

https://github.com/Deso-PK/make-trust-irrelevant/blob/main/Make-Trust-Irrelevant
1•DesoPK•1h ago•0 comments