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?

U.S. National Park Finder

https://nikag-ai.github.io/national-parks/
1•bookofjoe•1m ago•0 comments

Open-source DIY radar that's 95% cheaper than $250k commercial offerings

https://www.tomshardware.com/maker-stem/open-source-radar-system-is-95-percent-cheaper-than-usd25...
1•anjel•1m ago•0 comments

Show HN: Claude Code Rust – a native Rust TUI that avoids the V8 heap OOM

https://github.com/srothgan/claude-code-rust
1•char8•6m ago•0 comments

Reconstructing a Dead USB Protocol: From Unknown Chip to Working Implementation

https://github.com/coremaze/ME2-Writeup/blob/master/README.md
1•birdculture•8m ago•0 comments

In the UK, EVs are cheaper than petrol cars, thanks to Chinese competition

https://electrek.co/2026/04/18/in-the-uk-evs-are-cheaper-than-petrol-cars-thanks-to-chinese-compe...
2•breve•11m ago•0 comments

Crypto Hack Worth $290M Triggers DeFi Contagion Shock

https://www.bloomberg.com/news/articles/2026-04-19/crypto-hack-worth-290-million-triggers-defi-co...
1•helsinkiandrew•15m ago•0 comments

The Work Runs on Different Maps

https://yusufaytas.com/the-work-runs-on-different-maps
8•yusufaytas•17m ago•0 comments

Memjar: Uncompromising, local-first second brain

https://github.com/m00dy/memjar
1•m00dy•21m ago•0 comments

Tim Davis – Probabilistic engineering and the 24-7 employee

https://www.timdavis.com/blog/probabilistic-engineering-and-the-24-7-employee
1•kiyanwang•24m ago•0 comments

2005 PS2 Game Returning with New Release on PS5, PS4

https://comicbook.com/gaming/news/ps2-playstation-2-games-ps5-ps4-release-2005/
1•01-_-•29m ago•0 comments

The framework built by a father in 2006 dominated the internet

https://comuniq.xyz/post?t=966
2•01-_-•31m ago•1 comments

An Amish Paradox: Diversity and Change in the Largest Amish Community

https://www.thepsmiths.com/p/review-an-amish-paradox-by-charles
1•barry-cotter•31m ago•0 comments

LlaMa.cpp Robot Wars

https://www.youtube.com/watch?v=bgZ3pmr0DIs
4•Pasyd•31m ago•1 comments

Performance • tldraw Docs

https://tldraw.dev/sdk-features/performance
2•aragonite•32m ago•0 comments

Ask HN: Is your Mac's menu bar throwing errors?

1•vsgherzi•32m ago•0 comments

SitTall – a macOS app that uses AirPods sensors to detect slouching

https://sittall.app/
1•anilatici•35m ago•1 comments

Anatomy of High-Performance Matrix Multiplication (2008) [pdf]

https://www.cs.utexas.edu/~flame/pubs/GotoTOMS_revision.pdf
2•tosh•36m ago•0 comments

Visual Studio Code Agents App (Preview)

https://code.visualstudio.com/updates/v1_115#_visual-studio-code-agents-preview
2•maxloh•46m ago•0 comments

Hero Engineering: In Defense of Unreasonable Optimizations

https://deancalver.substack.com/p/hero-engineering-in-defense-of-unreasonable
2•DeanoC•51m ago•0 comments

Edit store price tags using Flipper Zero

https://github.com/i12bp8/TagTinker
2•trueduke•1h ago•0 comments

Why Musicians Are Manufacturing Sold-Out Shows

https://www.bloomberg.com/news/articles/2026-04-17/how-bands-like-cameron-winter-s-geese-are-manu...
2•helsinkiandrew•1h ago•0 comments

A Private Recommendation System I Can Control

https://frankk.site/en/blog/controllable-recommendation-system/
1•langtang1996•1h ago•0 comments

Ask HN: How did you land your first projects as a solo engineer/consultant?

7•modelcroissant•1h ago•2 comments

Waterloo’s live AI-goose tracker. Never get ambushed by a cobra chicken again.

https://www.waddleloo.com/
1•consumer451•1h ago•0 comments

Public grocery stores are having a moment. Can they make food more affordable?

https://www.cbc.ca/radio/thecurrent/public-grocery-stores-9.7168321
3•Teever•1h ago•0 comments

Ask HN: Should I build *another* Markdown task manager?

1•simchri•1h ago•1 comments

Show HN: AI Primer – A Searchable AI Changelog for AI Engineers and Creatives

https://www.ai-primer.com
1•andyasprou•1h ago•0 comments

Deleteduser.com –A $15 PII Magnet

https://mike-sheward.medium.com/deleteduser-com-a-15-pii-magnet-c4396eb21061
3•birdculture•1h ago•0 comments

Shyell – a Rust shell with built-in benchmarking and project-aware prompts

https://github.com/sumant1122/shyell
2•paperplaneflyr•1h ago•0 comments

Resources for starting and growing an AI safety org

https://www.lesswrong.com/posts/fBDMCLTv8Cx28cJeJ/resources-for-starting-and-growing-an-ai-safety...
1•omer_k•1h ago•0 comments