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?

How to Build an AI Chat Endpoint in Node.js with the Telnyx AI Assistants API

https://old.reddit.com/r/Telnyx/comments/1ukn7n3/how_to_build_an_ai_chat_endpoint_in_nodejs_with/
1•harpreetseehra•35s ago•1 comments

We Built a New Editor. Want to Try It?

https://simplenote.com/2026/07/03/we-built-a-new-editor-want-to-try-it/
1•ingve•2m ago•0 comments

Library Song

https://authorscalendar.info/
1•jruohonen•4m ago•0 comments

Rare copy of US Declaration of Independence found by volunteer in UK archives

https://www.bbc.co.uk/news/articles/cgrkl104ly5o
3•iam-TJ•5m ago•0 comments

The AI Superforecasters Are Here

https://www.astralcodexten.com/p/the-ai-superforecasters-are-here
1•Michelangelo11•6m ago•0 comments

Show HN: Scopewalker, an MCP server for codebase complexity metrics

https://github.com/timohaa/scopewalker-mcp
1•thaanpaa•7m ago•0 comments

Wordgard: The new in-browser rich-text editor from the creator of ProseMirror

https://wordgard.net/
1•indy•7m ago•0 comments

Show HN: Numbword – a daily word game where letters add up to a target

https://numbword.com/
1•celltalk•9m ago•0 comments

30-Second Cherry Trick Sleep Formula Explained

https://gamma.app/embed/30-Second-Cherry-Trick-For-Sleep-Yu-Sleep-Review-2026-tsv4bcfbd4syqwf?mod...
1•prepostseo•9m ago•0 comments

Check any website up/down Status?

https://urlwatch.io/
1•rajkverma123•11m ago•0 comments

The mathematical secrets of Barcelona's Sagrada Familia

https://mappingignorance.org/2026/06/30/sagrada-familia/
1•Gedxx•14m ago•0 comments

EU Parliament temporarily defies Chat Control

https://www.heise.de/en/news/Partial-victory-with-a-catch-EU-Parliament-temporarily-defies-chat-c...
3•donpott•15m ago•0 comments

SmrtLnks – Cheaper Bitly link shortener that routes by GEO, dynamic QR included

https://smrtlink.link/
1•ExcellentNobody•15m ago•0 comments

India asks WhatsApp to pause username feature rollout over fraud concerns

https://www.bbc.com/news/articles/ckg8e0n9l41o
2•Markoff•17m ago•0 comments

JPEG-XL Libjxl 0.12 Brings More Performance Optimizations

https://www.phoronix.com/news/JPEG-XL-libjxl-0.12
2•blurred•20m ago•0 comments

Multiple Linux tarballs return 404 on kernel.org

https://kernel.org/
1•Lwrless•25m ago•1 comments

Alibaba to ban Claude Code in workplace over alleged backdoor risks, source says

https://www.reuters.com/world/china/alibaba-ban-claude-code-workplace-over-alleged-backdoor-risks...
8•nsoonhui•26m ago•1 comments

Half-Baked Product

https://weli.dev/blog/half-baked-product/
2•weli•34m ago•1 comments

How eveRy webSite is tRacking you 24/7. SiTe STaMpS

https://medium.com/@thesuperrepemail/how-every-website-is-tracking-you-24-7-site-stamps-333e8026eaba
1•mssblogs•34m ago•0 comments

Giotto.ai: "A Swiss lab with European heart"

https://www.giotto.ai/#about
1•theanonymousone•35m ago•0 comments

ECTC 2026 Roundup, Intel, TSMC, SK Hynix, Samsung, Micron, Marvell, Lightmatter

https://newsletter.semianalysis.com/p/ectc2026
1•felixdoerp•37m ago•0 comments

Nobody Reads the SQL Anymore

https://tabularis.dev/blog/nobody-reads-the-sql-anymore
1•debba•37m ago•1 comments

'guix substitute' and 'guix pull' Vulnerabilities

https://guix.gnu.org/en/blog/2026/guix-substitute-pull-vulnerabilities/
2•elephant-ocean•37m ago•0 comments

I replaced my GitHub runners with Lambda MicroVMs, and maybe you should too

https://lucvandonkersgoed.com/2026/07/01/i-replaced-my-github-runners-with-lambda-microvms-and-ma...
1•touristtam•39m ago•1 comments

NVCF: Deploy and Route GPU-Accelerated AI Workloads at Scale

https://github.com/NVIDIA/nvcf
1•mastabadtomm•40m ago•0 comments

Amazon's Mechanical Turk to stop accepting new customers

https://www.theregister.com/off-prem/2026/07/03/amazons-mechanical-turk-to-stop-accepting-new-cus...
8•50kIters•45m ago•0 comments

Action Preflight: consequence-aware admission for LLM agent actions

https://github.com/gfernandf/agent-skills/blob/main/docs/ACTION_PREFLIGHT_FORECAST_QUICKSTART.md
1•gfernandf1•46m ago•2 comments

Exploring Nix for Enterprise Teams

https://medium.com/ekino-france/exploring-nix-for-enterprise-teams-2e61d755e473
1•tduyng•47m ago•0 comments

Global gridded population datasets underrepresent rural population (2025)

https://www.nature.com/articles/s41467-025-56906-7
2•bryanrasmussen•52m ago•1 comments

The Law of Leaky Abstractions (2002)

https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/
1•SmartHypercube•53m ago•0 comments