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?

Flasta Cut – cabinet cutting lists and sheet nesting in seconds

https://flastacut.com
1•solaton•1m ago•0 comments

1776 or 2026, Spot the Difference

https://etc.usf.edu/lit2go/audio/mp3/historic-american-documents-002-the-declaration-of-independe...
1•trilogic•1m ago•0 comments

European Cities Deploy Nvidia-Powered AI Agents to Run Smarter Urban Operations

https://blogs.nvidia.com/blog/european-cities-agents-urban-operations/
1•pretext•3m ago•0 comments

Show HN: Recreating Gemini Argon 3D demo using ExtrudeAI and FreeCAD

https://chat.extrudeai.com/
1•talatuyarer•4m ago•0 comments

Global Smartphone Shipments Hit a New Low with 20% YoY Decline

https://counterpointresearch.com/en/insights/global-smartphone-shipments-hit-a-new-low-with-20-pe...
1•StrLght•6m ago•0 comments

Environmental Exploitattion and Deception

https://ipdefenseforum.com/
1•bryanrasmussen•8m ago•0 comments

Why Sweden is abandoning its cashless society

https://uk.news.yahoo.com/why-sweden-abandoning-cashless-society-070000442.html
1•nephihaha•9m ago•2 comments

Show HN: Ruleherd – audits agent instruction files for contradictions and drift

https://github.com/princejain756/ruleherd
1•princejain756•9m ago•0 comments

The End of the Era of Trust: An Essay on Voice Cloning

https://medium.com/@smoking2man/the-end-of-the-era-of-trust-an-essay-on-voice-cloning-the-illusio...
1•Aldus551•10m ago•0 comments

An agent reviewing other agent's work

https://unbeholden.dev/blog/a-reviewer-for-my-agents
1•unbeholden•11m ago•0 comments

DAVx⁵ – CalDAV / CardDAV / WebDAV for Android

https://www.davx5.com/
1•artpar•13m ago•0 comments

Transflective LCD

https://en.wikipedia.org/wiki/Transflective_liquid-crystal_display
1•robalni•14m ago•0 comments

The Septopert: A Provably minimal nopert

https://github.com/tom7/noperts
2•robinhouston•16m ago•0 comments

Wireless magnetic millirobots that deliver medicine inside the beating heart

https://hub.jhu.edu/2026/10/12/magnetic-millirobots-cardiac-treatment/
1•giuliomagnifico•19m ago•0 comments

Show HN: Agent Identity – Identity and communication infrastructure for AI agent

https://www.agent-identity.dev/
1•naolketema55•19m ago•0 comments

A perceptual color space for image processing (2020)

https://bottosson.github.io/posts/oklab/
1•xiaoyu2006•20m ago•0 comments

Open models have real benefits. Do they outweigh the risks?

https://www.technologyreview.com/2026/10/13/1146366/open-models-have-real-benefits-do-they-outwei...
1•joozio•22m ago•0 comments

Lotus Improv on the NeXT

https://stonetools.ghost.io/lotusimprov-next/
1•rcarmo•24m ago•0 comments

Show HN: Sgrep; fast, accurate code search for agents

https://github.com/context-dot-dev/sgrep
1•TheYahiaBakour•25m ago•0 comments

Microsoft Patches More Than 1,400 Security Flaws

https://krebsonsecurity.com/2026/10/microsoft-patches-more-than-1400-security-flaws/
1•ersinesen•31m ago•0 comments

Dataset provides blueprint to decode mysteries of the human immune system

https://med.stanford.edu/news/insights/2026/10/decoding-human-immune-system-with-massive-dataset....
1•frostbyte7•31m ago•0 comments

Ask HN: How to deal with just being a PR reviewer for LLMs nowadays

2•zuInnp•33m ago•1 comments

Man charged with planting 'sophisticated' recording device in OpenAI office

https://www.bbc.com/news/articles/cwg5jq4vlddzo
1•wood_spirit•34m ago•1 comments

Browsers are pretty good at loading pages, it turns out

https://carter.sande.duodecima.technology/javascript-page-navigation/
2•birdculture•34m ago•0 comments

Show HN: DearSQL – A native database client in C++ with Dear ImGui

https://github.com/dunkbing/dearsql
1•dunkbing•35m ago•0 comments

Reportedly Nvidia stops the production of 5090 GPU

https://www.ign.com/articles/nvidia-rtx-5090-reportedly-dead-but-its-so-expensive-that-it-doesnt-...
2•lapkaaaa•35m ago•0 comments

Tmux Hints Inside KRunner

https://github.com/ChristianHrs/tmux_hints
1•chris33871•35m ago•0 comments

TrellisWM the fractal windows manager for macOS

https://trelliswm.app/
1•puszczyk•36m ago•0 comments

Thunderbird Alternatives: 7 Best Email Clients to Try in 2026

https://blog.maildeskt.com/2026/10/08/thunderbird-alternatives-7-best-email-clients-to-try-in-2026/
2•jimmy_lee•38m ago•1 comments

How to be more ambitious when using AI

https://felixrieseberg.com/how-to-be-more-ambitious-a-tutorial-for-humans-with-models/
1•holofermes•39m ago•0 comments