frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Canvas hack: company pays criminals to delete students' stolen data

https://www.bbc.co.uk/news/articles/cdepzg83x87o
1•GaryBluto•53s ago•0 comments

Making cross-platform SIMD code pleasant

https://bkaradzic.github.io/posts/typeless-simd/
1•fanf2•7m ago•0 comments

FMS – A Groovebox for the Nintendo Game Boy Advance

https://lo-bit.club/fms
1•natebc•8m ago•0 comments

Subvert.fm – a co-op music platform – launched today

https://www.subvert.fm
2•MK2k•9m ago•0 comments

Show HN: Agent Harness with Prolog and WASM core incl. 90s Borland-style TUI

https://www.deepclause.ai/
1•schmuhblaster•9m ago•0 comments

I/O Multiplexing: select(), poll(), and epoll() Explaination Extended

https://0xkiire.com/io-multiplexing-guide/
1•kiirecodes•11m ago•0 comments

Building a GUI Library from Scratch

https://0xkiire.com/gui_guide/
2•kiirecodes•13m ago•0 comments

The Geometry of Reasoning and Learning in the Age of AI [video]

https://www.youtube.com/watch?v=82eqQ6oEDi4
1•chrsw•14m ago•0 comments

Refunds are a proxy for regret your marketing should measure

https://zencapital.substack.com/p/refunds-are-a-proxy-for-regret-your
3•zenincognito•14m ago•0 comments

How driving test booking is changing for learner drivers

https://www.bbc.co.uk/news/articles/ckgpl9zdw3po
1•YeGoblynQueenne•14m ago•0 comments

CNCF TOC votes in favor of OTel Graduation

https://github.com/cncf/toc/pull/2134
1•hyzyla•14m ago•0 comments

PEP 661 – Sentinel Values, accepted 5 years later

https://peps.python.org/pep-0661/
2•PaulHoule•18m ago•0 comments

ESA and JAXA team up on planetary defence, Ramses mission to asteroid Apophis

https://www.esa.int/Space_Safety/Planetary_Defence/ESA_and_JAXA_team_up_on_planetary_defence_Rams...
1•rustoo•23m ago•0 comments

Apple's iOS 26.5 Update Patches More Than 50 Security Flaws

https://www.macrumors.com/2026/05/11/ios-26-5-security-fixes/
1•akyuu•25m ago•0 comments

Show HN: I mage GhosttyFX, a JavaFX terminal view that uses libghostty

https://github.com/vlaaad/ghosttyfx/
1•vlaaad•26m ago•1 comments

Building a devcontainer: workspace mounts, DNS wildcards and /etc./resolv.conf

https://topaz.thecloudtheory.com/blog/devcontainer-topaz/
1•kamilmrzyglod•27m ago•0 comments

The Download: the hantavirus outbreak and Musk vs. Altman week 2

https://www.technologyreview.com/2026/05/11/1137031/the-download-hantavirus-outbreak-musk-altman-...
1•joozio•28m ago•0 comments

Allowlisting Config Capabilities by Embedding Rye in Go

https://ryelang.org/blog/posts/whitelist-config-with-rye/
1•middayc•29m ago•0 comments

Houses are for living, not for speculation

https://en.wikipedia.org/wiki/Houses_are_for_living,_not_for_speculation
3•robtherobber•29m ago•0 comments

LUKSbox – Store sensitive files in the cloud

https://luksbox.penthertz.com/
1•campuscodi•31m ago•0 comments

Show HN: I made a weird language and if you no think it dumb, I want your help

https://github.com/DO-SAY-GO/freelang
2•keepamovin•32m ago•2 comments

Elsevier vs. Meta: first science publisher sues over scraped research papers

https://www.nature.com/articles/d41586-026-01481-0
5•_____k•33m ago•0 comments

Robots We Saw at Kazakhstan's AI Conference

https://www.siliconimist.com/p/robots-of-gitex-kazakhstans-ai-conference
1•johncole•36m ago•0 comments

CERN KiCad Libraries

https://gitlab.com/ohwr/cern-kicad-libs
1•_____k•41m ago•0 comments

Ask HN: Books you wish you had read earlier?

7•chistev•41m ago•2 comments

Why Optimistic Merging Works Better (2015)

http://hintjens.com/blog:106
1•mpweiher•42m ago•0 comments

SQLite is the best home for AI agents

https://su3.io/posts/willow
1•losfair•44m ago•0 comments

Local Agent Memory with 98% Recall-5 on LongMemEval-S, no LLMs, no API Key

https://github.com/sachinsharma9780/memweave
2•r2d2_•45m ago•0 comments

Got tired of paying for 6 Shopify tools that didn't talk to each other

https://www.indiehackers.com/post/i-got-tired-of-paying-for-6-shopify-tools-that-didnt-talk-to-ea...
1•codefreex•46m ago•0 comments

Implementing advanced AI technologies in finance

https://www.technologyreview.com/2026/05/11/1136786/implementing-advanced-ai-technologies-in-fina...
1•joozio•48m ago•0 comments