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

Comments

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

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

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

I Turned an ESP32 into a Thermal USB Webcam

https://www.youtube.com/watch?v=jyhVxC0ipE8
1•iamflimflam1•1m ago•0 comments

ByteDance Seed 2.0

https://seed.bytedance.com/en/seed2
1•tosh•1m ago•0 comments

Gemini's mobile app inherits Google's location permissions

https://support.google.com/gemini/answer/14554984?hl=en&co=GENIE.Platform%3DAndroid
1•leogout•5m ago•0 comments

Solve Everything

https://solveeverything.org/
1•o4c•10m ago•0 comments

Jailbreaking Google Translate

https://twitter.com/elder_plinius/status/2020933759533465658
1•helsinkiandrew•11m ago•0 comments

Show HN: GPACalc – Free GPA and CGPA Calculator (4.0/5.0/10.0 scales)

https://gpacalc.app/
1•YidaDev•14m ago•1 comments

Project Oberon: A Late Appraisal (2025)

https://www.youtube.com/watch?v=hZyNFaojbew
1•pjmlp•15m ago•0 comments

Marching Morons; a Year in Books; AI Character Names

https://bernoff.com/blog/marching-morons-a-year-in-books-ai-character-names-newsletter-4-february...
1•jruohonen•15m ago•0 comments

AI Shifts Concern from Technical Debt to Cognitive Debt

https://margaretstorey.com/blog/2026/02/09/cognitive-debt/
3•reasonableklout•15m ago•0 comments

Need Help, the Softraid and Lvm

1•areslee•17m ago•0 comments

Engineers are becoming sorcerers – Future of software dev with OpenAI Sherwin Wu

https://www.lennysnewsletter.com/p/engineers-are-becoming-sorcerers
1•rocho•18m ago•0 comments

Show HN: Ktrack – A simple, offline workout tracker

https://play.google.com/store/apps/details?id=com.companyname.ktrack&hl=en
1•KhashayarCodes•19m ago•0 comments

Are productivity gains due to AI hard-sell where you work?

1•newsicanuse•25m ago•0 comments

Show HN: LanceCalc – Open-source freelance platform fee calculator

https://github.com/asmahdi08/LanceCalc
1•ASMahdi•30m ago•0 comments

Show HN: Agent Lens – Code assistant observability in VSCode

https://github.com/23min/agent-lens
2•pjettter•38m ago•0 comments

Apple Rankings by the Appleist Brian Frange

https://applerankings.com/
2•Rant423•39m ago•1 comments

Saving the SpaceOrb360 with open source hardware and software (2024) [video]

https://www.youtube.com/watch?v=5K_E0J65uUg
3•starkparker•40m ago•0 comments

There's a Reason American Kids Are Such Picky Eaters

https://www.nytimes.com/2026/02/15/opinion/junk-food-picky-eaters.html
4•metadat•43m ago•1 comments

Watching Code Fly By

https://www.natemeyvis.com/on-watching-code-fly-by/
2•ingve•44m ago•0 comments

Show HN: DepGuard – Local dependency audit and license compliance (10 pkg mgrs)

https://github.com/suhteevah/depguard
2•suhteevah•50m ago•0 comments

Hamming Distance for Hybrid Search in SQLite

https://notnotp.com/notes/hamming-distance-for-hybrid-search-in-sqlite/
2•enz•50m ago•0 comments

Show HN: DocSync – Git hooks that block commits with stale documentation

https://github.com/suhteevah/docsync
3•suhteevah•51m ago•0 comments

ChatGPT "Physics Result" Reality Check: What It Did [video]

https://www.youtube.com/watch?v=3_2NvGVl554
1•smukherjee19•53m ago•0 comments

Zero Dependency Markdown Editor

https://overtype.dev/
2•l1am0•53m ago•0 comments

A Wave of Unexplained Bot Traffic Is Sweeping the Web

https://www.wired.com/story/made-in-china-niche-websites-are-seeing-a-surge-of-mysterious-traffic...
1•saikatsg•56m ago•0 comments

Show HN: AI-optimized x86-64 assembly vs. GCC -O3 on three production kernels

https://github.com/cleonard2341/ai-kernel-optimizer/blob/main/blog/ai-assembly-vs-gcc-o3.md
1•cod-e•1h ago•1 comments

Which past applications you built can be migrated to Agentic architecture?

1•sanatku•1h ago•0 comments

Over a million people rally worldwide in solidarity with Iran protests

https://www.iranintl.com/en/202602146821
1•ukblewis•1h ago•0 comments

Cynthia's Valentine (Sci-Fi)

https://stackdiver.com/posts/cynthias-valentine/
1•osmoscraft•1h ago•0 comments

How Investigators Find the Source of a Fire [video]

https://www.youtube.com/watch?v=1pPoB8be1G0
3•dataflow•1h ago•1 comments