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?

Show HN: Cse-bridge, a drop-in for Google's Custom Search API (off Jan 2027)

https://github.com/Booyaka101/cse-bridge
1•Booyaka101•1m ago•0 comments

The university degree is losing its lustre

https://www.ft.com/content/54cf40cd-149f-40db-b603-21aecd5f66ec
1•Anon84•4m ago•1 comments

Andrey Vyshedskiy about the evolution of language and brain development [video]

https://www.youtube.com/watch?v=3OYrFiUEuSs
1•binyu•6m ago•0 comments

Over 5,800 arrests, USD 293M intercepted in global fraud bust

https://www.interpol.int/en/News-and-Events/News/2026/Over-5-800-arrests-USD-293-million-intercep...
1•pvaldes•6m ago•0 comments

The Question That Kills Bad Decisions Before They Kill You

https://comuniq.xyz/Wealth/post?t=1666
1•01-_-•9m ago•0 comments

Switching from GPT-5.5 to GPT-5.6 Made Me Less Productive

https://www.vincentschmalbach.com/gpt-5-6-made-me-less-productive/
2•Bluestein•10m ago•0 comments

Using AlphaGenome to Investigate My Own Genetic Mutation

https://kay-wong.github.io/blog/investigating-my-genetic-mutation-with-ai/
1•sicklyscientist•11m ago•0 comments

Fermi Explorer Bets on Today's Tech for an 80k Year Journey

https://spectrum.ieee.org/alpha-centauri-fermi-explorer-mission
1•pseudolus•14m ago•0 comments

One Lock to Rule Them All

https://flakm.com/posts/sqlx_migration_wrapper_til/
1•flakm•15m ago•1 comments

Nvidia dismisses "circular financing", says every $1 it invests brings back $100

https://invezz.com/news/2026/09/11/nvidia-says-every-1-it-invests-brings-back-100-so-why-does-the...
3•mgh2•18m ago•0 comments

Looking for vulnerabilities is the last thing I do

https://neilmadden.blog/2026/02/20/looking-for-vulnerabilities-is-the-last-thing-i-do/
1•hnacobsxph•20m ago•0 comments

10-Year-Old Children Predict the Future

https://www.nytimes.com/2026/09/13/style/10-year-old-children-predict-the-future.html
1•pseudolus•20m ago•1 comments

What's Left of the Back-to-the-Landers

https://www.newyorker.com/culture/photo-booth/whats-left-of-the-back-to-the-landers
1•rdmuser•24m ago•0 comments

Show HN: As-an-engineer – A skill to make AI treat you like an engineer

https://github.com/mayooot/as-an-engineer
1•mayooot-go•24m ago•0 comments

Malicious/tracking 40 Chrome Extensions, 22M Users

https://www.hermandaniel.com/blog/20260705-40-chrome-extensions/
4•kekqqq•28m ago•0 comments

Show HN: ToolVerve – 75 client-side web tools running 100% in browser RAM

1•Abdullah_Sattar•30m ago•0 comments

UK to have strongest online child safety laws

https://www.gov.uk/government/news/uk-to-have-worlds-strongest-online-child-safety-laws-as-govern...
1•ironyman•30m ago•0 comments

Show HN: AlertiGate – Kubernetes alerts in, evidence-backed root cause out

https://alertigate.com/
1•dafi247•32m ago•0 comments

Cilfi: Automatic Function Identification in .NET Binaries

https://blog.washi.dev/posts/cilfi/
1•syumei•36m ago•0 comments

TuneWorks: Conversational AI analysis for Haltech ECU datalogs

https://tuneworks.ai/
1•Sharanxxxx•38m ago•0 comments

Do You Report Litter?

https://pmz1.substack.com/p/do-you-report-litter-will-it-work
1•gieksosz•39m ago•3 comments

The $2T Interest Bill

https://www.ft.com/content/4f28ef6c-f727-4d36-88a3-bbdbd13ddfbf
2•latentframe•39m ago•0 comments

The $440M Collapse of Guidepost Montessori

https://www.nytimes.com/2026/09/13/business/guidepost-montessori-higher-ground-education-ray-girn...
3•sbulaev•40m ago•0 comments

GitHub is currently experiencing an active service outage

https://www.githubstatus.com/incidents/0rn90wk115q9
3•matada_•41m ago•0 comments

Show HN: Lifetrajectory with calculation, action plans

https://lifetrajectory.live/calculator/
1•Lifetrajectory•41m ago•1 comments

Revolut confirms customer data breach through fake government requests

https://techcrunch.com/2026/09/12/revolut-confirms-customer-data-breach-through-fake-government-r...
5•tdrz•47m ago•0 comments

Race-Switching the Dukes of Hazzard

https://shitpost.plover.com/d/dukes.html
1•jjgreen•51m ago•0 comments

Our Eukaryotic Moment

https://contraptions.venkateshrao.com/p/our-eukaryotic-moment
1•jger15•52m ago•0 comments

Give to AI Formulas from Charts

https://github.com/BorisYamp/plotparse
2•borisyamp•55m ago•1 comments

How to Check Traffic Fines in UAE?

1•jimmyyy•57m ago•0 comments