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?

Ask HN: OpenSEO inspiration for other tools, asking for opinion

1•yash_salesup•22s ago•0 comments

Efficient Image Steganography Method

https://www.nature.com/articles/s41598-026-41168-0
1•bryanrasmussen•35s ago•1 comments

Anthropic's $518B AI buildout hinges largely on deals that cannot be canceled

https://www.reuters.com/business/anthropics-518-billion-ai-buildout-hinges-largely-deals-that-can...
1•usernomdeguerre•39s ago•0 comments

Spencer Pratt on X: most political advisors are so bafflingly incompetent

https://twitter.com/spencerpratt/status/2104944747806695496
1•bilsbie•1m ago•0 comments

Spaghetti Celesti – Devour the Heavens

https://punkcake.itch.io/spaghetti-celesti
1•ano-ther•1m ago•0 comments

OpenAI Agent Bypasses Internet Restrictions Through DNS

https://circleid.com/posts/openai-agent-bypasses-internet-restrictions-through-dns
1•speckx•2m ago•0 comments

Annalist – required GitHub check for what a coding agent wrote

https://github.com/GregDixonMXN/annalist
1•shikobastudios•2m ago•0 comments

Why has Shopify dropped React Native?

https://newsletter.pragmaticengineer.com/p/shopify-native-mobile
2•theanonymousone•3m ago•0 comments

The AI margin collapse is gathering pace

https://martinalderson.com/posts/ai-margin-collapse-gathering-pace/
2•martinald•4m ago•0 comments

An LLM Workflow That Reproduces, Improves, Extends Published Economics Research

https://www.nber.org/papers/w35782
1•ano-ther•4m ago•0 comments

Show HN: Relay – a harness for AI coding agents that recover and verify

https://relayevals.com
2•rsathwik07•4m ago•0 comments

Show HN: Mluva – Dictation and editable rewrites for Omarchy

https://github.com/1vecera/Mluva
2•1vecera•5m ago•0 comments

You Said No MCP

https://earendil.com/posts/you-said-no-mcp/
2•tosh•5m ago•0 comments

Car Is Sharing Data with Big Tech

https://www.consumerreports.org/electronics/personal-information/your-car-is-sharing-data-with-bi...
2•speckx•5m ago•0 comments

Agentic Hacks, Real Proofs: Inside Google's PageBreak Project

https://blog.google/security/agentic-hacks-real-proofs-inside-googles-pagebreak-project/
1•porridgeraisin•6m ago•0 comments

GPT-6.1 Sol (Max): Intelligence, Performance and Price Analysis

https://artificialanalysis.ai/models/gpt-6-1-sol
2•theanonymousone•6m ago•0 comments

Codex Security Cloud

https://learn.chatgpt.com/docs/security/setup
1•acossta•7m ago•0 comments

Attack your own AI agent in under 10 minutes – then secure it before deploying

https://www.humanbound.ai/blog/attack-your-own-ai-agent-in-under-10-minutes-then-secure-it-before...
1•Sofia_HB•7m ago•0 comments

Password-protecting an Nginx proxied site

https://aweirdimagination.net/2026/09/27/password-protecting-an-nginx-proxied-site/
1•speckx•9m ago•0 comments

Automating eval design and hillclimbing with Claude

https://claude.dev/blog/automating-eval-design-and-hillclimbing/
1•gmays•9m ago•0 comments

The Life and Death of Microsoft Clippy, the Paper Clip the World Loved to Hate

https://www.artsy.net/article/artsy-editorial-life-death-microsoft-clippy-paper-clip-loved-hate
2•cs702•11m ago•0 comments

Electrification efficiency: The world will need less energy after the transition

https://hannahritchie.substack.com/p/electrification-energy-efficiency
2•thelastgallon•11m ago•0 comments

GPT6.1 Sol

1•BIOcanse•12m ago•0 comments

Sonnet 5.5 has the heaviest token use we've measured; pricing matches GPT-6 Sol

https://artificialanalysis.ai/articles/claude-sonnet-5-5
1•ilamont•13m ago•0 comments

Wrong, Not Broken

https://aws.amazon.com/blogs/aws-insights/wrong-not-broken/
1•ibobev•13m ago•0 comments

A Brief Perspective on Deep Learning Using Common Lisp [video]

https://www.youtube.com/watch?v=Yo4eqoRC1o0
1•ibobev•13m ago•0 comments

Unix File and Directory Permissions and Modes

https://wpollock.com/AUnix1/FilePermissions.htm
1•ibobev•15m ago•0 comments

Show HN: Dialedin.bio – Upload lab PDFs, log how you feel, see what lines up

https://dialedin.bio/
1•redigaffi•16m ago•0 comments

OpenAI officially allows using ChatGPT subscriptions with 3rd party apps

https://help.openai.com/en/articles/20001542-using-your-chatgpt-plan-in-other-apps-and-sites
2•apitman•16m ago•0 comments

Plugin Extensions

https://developers.openai.com/plugins/build/extensions
1•acossta•18m ago•0 comments