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?

Transmute – a self-hosted file converter with a web UI and REST API

https://github.com/transmute-app/transmute
1•NeonVariant•6m ago•0 comments

Ask HN: Why hasn't someone built a decentralized compute network?

2•buffer_overlord•6m ago•1 comments

Google Scholar's citation exporter silently drops single-letter surnames

https://matthewearnest.dev/blog/google-scholar-single-letter-surname
1•mearnest•7m ago•0 comments

Show HN: My OSINT dashboard with 60 feeds now has a pseudonymous P2P testnet

https://github.com/BigBodyCobain/Shadowbroker/tree/main
1•vancecookcobxin•7m ago•0 comments

Emacs: Save any buffer as PDF (my new buffer-to-pdf package)

https://protesilaos.com/codelog/2026-05-02-emacs-buffer-to-pdf-new-package/
1•dalvrosa•14m ago•0 comments

GSoC2026: What to expect (image editing, animation, 3D, and engineering)

https://librearts.org/2026/04/gsoc2026-projects/
1•prokoudine•14m ago•0 comments

Have online worlds become the last free places for children?

https://psyche.co/ideas/have-online-worlds-become-the-last-free-places-for-children
2•paulpauper•16m ago•0 comments

Stop Begging Extension for LibreOffice

https://extensions.libreoffice.org/en/extensions/show/867
2•mmarian•16m ago•1 comments

Should we be scared of China's surpluses?

https://jzmazlish.substack.com/p/should-we-be-scared-of-chinas-surpluses
1•paulpauper•16m ago•0 comments

AI music is flooding streaming services – but who wants it?

https://www.theverge.com/column/921599/ai-music-is-flooding-streaming-services-but-who-wants-it
1•Brajeshwar•16m ago•0 comments

Five Banana Lessons

https://allensthoughts.com/2026/05/03/five-banana-lessons/
2•herbertl•17m ago•0 comments

Lilly, AI biotech Profluent ink $2.25B pact in search of genetic 'holy grail'

https://www.biospace.com/deals/lilly-ai-biotech-profluent-ink-2-25b-pact-in-search-of-genetic-med...
1•gmays•18m ago•0 comments

Porsche will contest Laguna Seca in historic colors of the Apple Computer livery

https://newsroom.porsche.com/en_US/2026/motorsport/porsche-will-contest-laguna-seca-in-historic-c...
1•Amorymeltzer•18m ago•0 comments

Some Important Numbers for Developers (2018)

http://russolsen.com/articles/2018/04/25/some-important-numbers-for-developers.html
2•chalmovsky•19m ago•0 comments

The world's longest railway tunnel is being built under the Alps

https://www.euronews.com/my-europe/2026/05/01/world-record-made-in-europe-the-worlds-longest-rail...
1•vrganj•25m ago•0 comments

Ask HN: Tips for Longevity, as a Software Engineer

1•2bird3•29m ago•0 comments

Modern jet engine turbines: each blade a single crystal (2015)

https://www.americanscientist.org/article/each-blade-a-single-crystal
1•whycome•29m ago•0 comments

Ask HN: Please, I need your help to try out an iOS app I work on

1•erosa01•29m ago•2 comments

Alert-Driven Monitoring

https://simpleobservability.com/docs/alert-driven-monitoring
1•khazit•29m ago•0 comments

ImagePrint 1.52 Released

https://www.imageprint.io/blog/whats-new-in-imageprint-1-52/
1•coragi•31m ago•0 comments

CPU Work and GPU Work

https://www.talhoffman.com/2026/05/03/cpu-work-and-gpu-work/
2•talhof8•34m ago•0 comments

Fisheries and Aquaculture

https://www.oecd.org/en/topics/fisheries-and-aquaculture.html
1•mooreds•35m ago•0 comments

Show HN: Hello, World in many different languages

https://languages.jdunn.dev/
2•jdironman•38m ago•2 comments

NOAA forecaster on how this year's El Niño could shatter records

https://www.livescience.com/planet-earth/weather/one-of-the-most-rapid-transitions-that-ive-seen-...
2•ukz•38m ago•0 comments

I Have Lived in Your Camp

https://green.spacedino.net/i-have-lived-in-your-camp/
1•mooreds•40m ago•0 comments

The Petroleum System Is Entering Its Volatile Decline Phase

https://cleantechnica.com/2026/04/29/the-petroleum-system-is-entering-its-volatile-decline-phase/
1•xbmcuser•41m ago•0 comments

Company said I could move and then changed their mind

https://www.askamanager.org/2026/04/company-said-i-could-move-and-then-changed-their-mind-how-do-...
3•mooreds•45m ago•0 comments

Show HN: I made a simulator for personal finance (5 year update)

https://projectionlab.com/
1•scubakid•46m ago•0 comments

Custom Voices and Voice Library

https://x.ai/news/grok-custom-voices
1•tjek•48m ago•0 comments

I'm a late arrival to short-form video – its effect on my life has shocked me

https://www.theguardian.com/commentisfree/2026/may/03/algorithm-short-form-video-overload
3•andsoitis•49m ago•0 comments