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 long before we stop reading the code?

https://thenewstack.io/future-of-code-reviews/
1•tonkkatonka•4m ago•0 comments

Ask HN: Bootstrap founders, how do you distribute what you build?

1•akashwadhwani35•4m ago•0 comments

Buckets – know which user caused your database bill

https://github.com/Crossdeckhq/buckets-oss
1•Crossdeck•7m ago•0 comments

We know the official GTA 6 price – it's expensive, but not too bad

https://www.techradar.com/gaming/we-finally-know-the-official-gta-6-price-its-expensive-but-not-t...
1•spectral_beel•9m ago•1 comments

Tech Company Ranker

https://tech.bingo/?f=JTdCJTIyeCUyMiUzQSUyMmVzdF92YWx1YXRpb25fdXNkX2IlMjIlMkMlMjJ5JTIyJTNBJTIyZm9...
2•thisismytest•16m ago•0 comments

Show HN: Execlave – AI Agent Management Platform for Governance and Enforcement

https://www.execlave.com
1•rishitmavani•16m ago•0 comments

Medicine: Country Surgeon (1932)

https://time.com/archive/6748492/medicine-country-surgeon/
1•EndXA•16m ago•0 comments

LastPass confirms data breach after hacker compromises supply chain

https://www.techradar.com/pro/security/lastpass-confirms-data-breach-after-hacker-compromises-sup...
3•mistic92•17m ago•1 comments

ChatGPT Exporter – Export Conversations to PDF, Word, Google Docs

https://chromewebstore.google.com/detail/chatgpt-exporter-save-cha/ploaaddkflkapjfbfapmkmkefigedefp
2•quysala12•18m ago•1 comments

The Emergence of a New Paedophile Panic

http://guerrillademocracy.blogspot.com/2026/06/the-emergence-of-new-paedophile-panic.html
1•GDNews503AD•18m ago•0 comments

Show HN: How Loud Is My Hotel?

https://noise.vantezzen.io/
1•bennett_dev•20m ago•0 comments

Fate – a joke horoscope generator utility for Linux pids

https://github.com/cjd8/fate
1•cjd8•20m ago•1 comments

Carspreading' could lead to extra 2,600 crash deaths a year by 2040, study finds

https://www.theguardian.com/environment/2026/jun/24/carspreading-vehicle-size-crash-deaths-study
3•mellosouls•21m ago•0 comments

When typing is better than talking

https://alearningaday.blog/2026/06/23/when-typing-is-better-than-talking/
1•herbertl•21m ago•0 comments

Show HN: Fillr – Save web form as a preset and autofill with data you control

https://chromewebstore.google.com/detail/fillr-form-filler-test-da/peppngdnnhjpchacodkdadojgnafepdd
1•amineinai•22m ago•0 comments

Confluence Server Backup Reader

https://confuencereader.netlify.app/
1•valentynt•23m ago•0 comments

Functional Geekery – Fogus (2014)

https://web.archive.org/web/20200814221428/https://www.functionalgeekery.com/episode-3-fogus/
1•tosh•23m ago•0 comments

SEO Schema Markup

https://github.com/bilalnaseer/seo-schema-markup
1•wspycnews•27m ago•0 comments

Ask HN: How to avoid LLMs struggling with Lisp parens?

2•chriswarbo•30m ago•1 comments

European Commission's Metsola Overrides MEPs to Force Through Chat Control

https://www.politico.eu/article/president-vs-parliament-roberta-metsola-overrides-meps-bid-force-...
25•miohtama•32m ago•11 comments

GL.iNet claims alleged GPLd code is propriety to Realtek, haven't released it

https://forum.gl-inet.com/t/gl-mt5000-brume-3-upstream-openwrt-support/67297?page=4
1•james_in_the_uk•32m ago•1 comments

Purism announces Librem 16 laptop designed to respect privacy, security, freedom

https://puri.sm/posts/librem-16-product-launch/
1•fsflover•33m ago•0 comments

Arma: Cold War Assault (2001) source code released

https://github.com/BohemiaInteractive/CWR
3•qweqwe14•34m ago•1 comments

Show HN: Flounder – an autonomous white-hat security auditor

https://github.com/adshao/flounder
2•adshao•34m ago•0 comments

100 Years Ago, Students Took the First SAT. Where Is It Headed?

https://www.smithsonianmag.com/innovation/100-years-ago-students-across-the-us-took-the-first-sat...
1•pseudolus•35m ago•0 comments

France confirms first Ebola case

https://www.bbc.com/news/articles/cj9gzr9rdjlo
1•lilytweed•35m ago•0 comments

New Locked Pi Install

https://rfc.earendil.com/0047/
2•tosh•36m ago•0 comments

Shooting and Crying

https://en.wikipedia.org/wiki/Shooting_and_crying
1•KoftaBob•37m ago•0 comments

Show HN: I made a PvP style multiplayer Minesweeper game

https://minesweeperpro.com/
1•AdamKib•38m ago•0 comments

Roles over Jobs

https://personalis.io/blog/roles-over-jobs
1•sylvanjsmit•39m ago•0 comments