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: Multi person realtime location tracking

https://tracktour.ir
1•misano•4m ago•0 comments

Perforce and Unreal Lore's alternative, another way to use Git

https://github.com/zhuzhonghua/blackgit
1•zhonghua•4m ago•0 comments

How dementia is being defeated

https://www.economist.com/briefing/2026/07/09/how-dementia-is-being-defeated
2•pingou•5m ago•1 comments

Wlctl – a Rust TUI for Managing Wi-Fi/ETH/VPN Using NetworkManager

https://github.com/aashish-thapa/wlctl
2•iamaashishthapa•11m ago•0 comments

Noisia: Harmful Workload Generator for PostgreSQL

https://github.com/lesovsky/noisia
1•handfuloflight•29m ago•0 comments

The Four-Color Problem and Its Philosophical Significance (1979) [pdf]

http://www.thatmarcusfamily.org/philosophy/Course_Websites/Math_S08/Readings/tymoczko.pdf
2•rfv6723•33m ago•0 comments

Curious case, comparing output from multiple LLMs

https://github.com/vseryakov/backendjs/tree/master/examples/prompts
1•vlad1719•36m ago•1 comments

How Do You Steal $1,500M in 3 Minutes? [video]

https://www.youtube.com/watch?v=E2Onvy1tWY8
1•mgh2•37m ago•0 comments

Meta removes AI feature on Instagram after global backlash

https://www.rnz.co.nz/news/science-and-technology/700735/missed-the-mark-meta-removes-ai-feature-...
4•billybuckwheat•43m ago•1 comments

Managing a small local AI budget (Mac M2 16gb)

https://millfolio.com/blog/local-ai-infra-tags/
2•winding•45m ago•0 comments

Microgrants!

https://merge.club/guide
1•audreyfei•50m ago•0 comments

The Prover, the Skeptic, and the Judge

https://insertchaos.bearblog.dev/prover-skeptic-and-judge/
1•snorbleck•52m ago•0 comments

Web Scraper Bright Data Sets $1M 'Bug Bounty' as Industry Scrutinized

https://www.bloomberg.com/news/articles/2026-07-10/web-scraper-sets-1-million-bug-bounty-as-indus...
1•1vuio0pswjnm7•1h ago•1 comments

Marble - (Education) Skill Taxonomy

https://github.com/withmarbleapp/os-taxonomy
1•soupspaces•1h ago•0 comments

No Assembler, No Linker

https://freelang.dev/no-assembler-no-linker/
2•keepamovin•1h ago•0 comments

Omegele for Weed

https://omeweed.com/
1•mmorga71•1h ago•1 comments

SpaceX's near-term AI payoff seen tethered to Earth, not outer space

https://www.reuters.com/science/spacexs-near-term-ai-payoff-seen-tethered-earth-not-outer-space-2...
1•adithyaharish•1h ago•0 comments

The crypto billionaires building a world where money buys you a vote

https://www.bbc.co.uk/news/articles/cly8eqyj8e2o
4•mindracer•1h ago•0 comments

Dither Kit

https://www.tripwire.sh/dither-kit
1•handfuloflight•1h ago•0 comments

Revving up Microsoft's 10x faster TypeScript 7

https://www.infoworld.com/article/4194567/revving-up-microsofts-10x-faster-typescript-7.html
2•baranul•1h ago•0 comments

Big Tech Doubles Debt Load to $350B in AI Spending Spree

https://www.bloomberg.com/news/articles/2026-07-10/big-tech-doubles-debt-load-to-350-billion-in-a...
7•1vuio0pswjnm7•1h ago•2 comments

Skillburst: Sync Skills with Team

https://skillburst.ai/
1•handfuloflight•1h ago•0 comments

I tried NetBSD as a desktop,it felt like stepping into the 90s in a good way

https://www.howtogeek.com/i-tried-netbsd-as-a-desktop-and-it-felt-like-stepping-into-the-90s-in-a...
3•jaypatelani•1h ago•0 comments

Young Indonesians fear for future after startup founder jailed

https://www.abc.net.au/news/2026-07-11/indonesian-fears-after-gojek-startup-founder-makarim-jaile...
1•defrost•1h ago•0 comments

The Origins of Heikki's Garden of Flowers

https://garden-of-flowers.heikkilotvonen.com/?essay
1•panic•1h ago•0 comments

Engineer

https://aicon.solutions/#about
1•laomos•1h ago•0 comments

Local open-source system design tool

https://github.com/Derssa/Torollo
1•derssa•1h ago•0 comments

Apple sues OpenAI, its employees claiming theft of trade secrets

https://www.bbc.com/news/articles/cy8w379e091o
2•vinni2•1h ago•0 comments

OpenAI Safety Head Heidecke to Leave Firm After Reshuffle: Wired

https://www.bloomberg.com/news/articles/2026-07-11/openai-safety-head-heidecke-to-leave-firm-afte...
3•1vuio0pswjnm7•1h ago•0 comments

Show HN: Warmbly, open-source cold email outreach

https://warmbly.com/
1•meszmate•1h ago•0 comments