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•11mo ago

Comments

nine_k•11mo 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•11mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•11mo ago
They mention this in the article.
spockz•11mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•11mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

AI and the Human Voice

https://gilest.org/notes/2026/human-ai/
1•avernet•4m ago•0 comments

Edalex Celebrates Double Recognition at 2026 EdTech Cool Tool Awards

https://www.edalex.com/news/edalex-rich-skill-descriptor-rsd-library-openrsd-integrated-new-muzzy...
1•edalex•6m ago•1 comments

Codex overtakes Claude Code to become #1 AI coding tool (April 2026)

https://ai-coding.info/en
2•kotauchisunsun•7m ago•0 comments

I wrote a WebAssembly plugin system for my Wayland compositor

https://www.youtube.com/watch?v=Kohl9wy3S7g
1•matthewkosarek•7m ago•0 comments

0x021 – Durable Workflows

https://unzip.dev/0x021-durable-workflows/
1•vismit2000•9m ago•0 comments

Ask HN: Deterministic codebase maps vs. LLM inferred knowledge graphs?

2•IxInfra•15m ago•1 comments

Ask HN: Why don't frontier AI model providers continuously improve their models?

1•jballanc•15m ago•1 comments

The brazen rightwing plan to conquer American schools

https://www.theguardian.com/education/ng-interactive/2026/apr/08/prageru-university-conservatism
5•jethronethro•19m ago•1 comments

Show HN: Ptoe.org

https://periodictableofelements.org/
1•nadermx•21m ago•0 comments

Giving LLMs a Formal Reasoning Engine for Code Analysis

https://yogthos.net/posts/2026-04-08-neurosymbolic-mcp.html
2•zdw•21m ago•0 comments

ServerCrate – Zero-knowledge Restic backup hosting, from $15/mo

https://servercrate.net/
1•rambooon•24m ago•0 comments

New PC Gaming Handheld Canceled Due to Soaring Storage Prices

https://kotaku.com/new-pc-gaming-handheld-would-have-to-cost-4000-because-of-storage-prices-so-it...
1•PaulHoule•24m ago•0 comments

Trump administration orders dismantling of the U.S. Forest Service

https://www.hatchmag.com/articles/trump-administration-orders-dismantling-us-forest-service/7716263
34•dxs•25m ago•3 comments

Show HN: A simple no bloat character checker

https://charchec.netlify.app/
1•xppexx•26m ago•0 comments

Bevy game development tutorials and in-depth resources

https://taintedcoders.com/
1•GenericCanadian•28m ago•0 comments

Newly created Polymarket accounts win big on well-timed Iran ceasefire bets

https://www.theguardian.com/business/2026/apr/08/polymarket-trump-us-iran-ceasefire
8•mitchbob•31m ago•0 comments

Japan lessens privacy laws to become "The easiest county to develop AI in"

https://www.theregister.com/2026/04/08/japan_privacy_law_changes_ai/
3•Muhammad523•32m ago•1 comments

You Can Just Print an Air Purifier

https://aftermath.site/3d-printing-air-purifier-corsi-rosenthal/
1•zdw•33m ago•0 comments

Show HN: BakaBags, a tsundere AI that roasts yours Solana wallets

https://bakabags.xyz
1•massanishi•33m ago•0 comments

Layoff Thinking

https://blogs.newardassociates.com/blog/2026/layoff-thinking.html
1•zdw•35m ago•0 comments

Interview: EmDash, a CMS built on Astro with sandboxed plugins

https://www.youtube.com/watch?v=K8QvgXe9z-A
1•emot•36m ago•0 comments

Show HN: LadderRank: Rank anything with ELO ratings

https://ladderrank.app/ladder/77DTlDNxd2dsbmAAMO7o8/vote
1•douglaswlance•40m ago•0 comments

Stanley Jordan's Two-Handed Technique [video]

https://www.youtube.com/watch?v=ldT6yTralvk
1•sbuttgereit•41m ago•0 comments

Account Verification for Windows Hardware Program Begins October 16, 2025

https://techcommunity.microsoft.com/blog/hardware-dev-center/action-required-account-verification...
2•TiredOfLife•43m ago•0 comments

Ask HN: Advice for college grads starting careers in the AI era?

1•LostMyLogin•45m ago•2 comments

Little Snitch for Linux – Because Nothing Else Came Close

https://obdev.at/blog/little-snitch-for-linux/
3•Cider9986•47m ago•1 comments

Store Your Taxes in Git

https://blog.foks.pub/posts/store-your-taxes-in-git/
2•todsacerdoti•55m ago•0 comments

Claude Glass (Or Black Mirror)

https://en.wikipedia.org/wiki/Claude_glass
3•sram1337•56m ago•0 comments

Building a JavaScript runtime in one month

https://themackabu.dev/blog/js-in-one-month
1•franciscop•57m ago•0 comments

LittleSnitch for Linux

https://obdev.at/products/littlesnitch-linux/index.html
65•pluc•1h ago•28 comments