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

Comments

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

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

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

Tiny Coder – AI coding agent in ~300 LOC writing itself

https://github.com/xrip/tinycode
1•xrip•34s ago•0 comments

Will LLMs Help or Hurt New Programming Languages?

https://blog.flix.dev/blog/will-llms-help-or-hurt-new-programming-languages/
1•appliku•1m ago•0 comments

BasiliskII Macintosh 68k Emulator Ported to ESP32-P4 / M5Stack Tab5

https://github.com/amcchord/M5Tab-Macintosh
1•rcarmo•2m ago•0 comments

Show HN: Meshii – Open-source AI tool to generate 3D meshes for game development

https://github.com/sciences44/meshii
1•sciences44•5m ago•1 comments

The Ralph Wiggum Loop from first principles (by the creator of Ralph)

https://www.youtube.com/watch?v=4Nna09dG_c0
1•ghuntley•7m ago•0 comments

Matrix.envs.net Is Shutting Down

https://envs.net/
1•Sami_Lehtinen•8m ago•0 comments

Lava Lamps Protect Your Data [video]

https://www.youtube.com/shorts/oW6YwSUyfzw
2•doener•10m ago•0 comments

Matrix.envs.net Is Shutting Down

https://matrix.to/#/!dDZYx7e4nzZjqR2tnC6v1pDbZX52HJVfQRuuBpinG9U/$QUY4XtMR2WS56N-VN9na768Fd37_N7Y...
1•Sami_Lehtinen•10m ago•2 comments

The Permanent Emergency

https://www.astralcodexten.com/p/the-permanent-emergency
1•ipnon•11m ago•0 comments

Ask HN: Are we overthinking maintainability of LLM written code?

1•grainier•12m ago•0 comments

Show HN: Ultralight iOS apps (~1 MB), no tracking, on-device only

https://mindbebop.com/
1•kentaroyamauchi•15m ago•0 comments

YouTube Playlist Length Calculator

https://ytplaylistlength.one/
1•wangxin199•16m ago•0 comments

MCP Server with X402

https://twitter.com/fveiras_/status/2010083092502069348
1•fveiras•18m ago•0 comments

Why Selling WhatsApp to Facebook Would Be the Biggest Mistake (2012)

https://www.forbes.com/sites/ericjackson/2012/12/03/why-selling-whatsapp-to-facebook-would-be-the...
2•chistev•19m ago•1 comments

I Build an Idea I Love. I Need You to Tear It Apart

1•indigoeagle•19m ago•2 comments

Wong Kar-wai on technology and AI

https://twitter.com/RadiantFilm/status/2010104914274341236
1•keepamovin•24m ago•1 comments

AI memory is sold out, causing an unprecedented surge in prices

https://www.cnbc.com/2026/01/10/micron-ai-memory-shortage-hbm-nvidia-samsung.html
2•jonbaer•24m ago•0 comments

AI "cheating", anti-intellectualism and the carceral

https://overland.org.au/2025/10/ai-cheating-anti-intellectualism-and-the-carceral/
1•Pamar•26m ago•0 comments

Gentoo Linux 2025 Review

https://www.gentoo.org/news/2026/01/05/new-year.html
1•akhuettel•26m ago•0 comments

Show HN: Typical is TypeScript with type-safety at runtime

https://typical.elliots.dev/
1•elliotshep•27m ago•0 comments

When AI Meeting Notes Become Legal Evidence

https://www.aivojournal.org/when-ai-meeting-notes-become-legal-evidence/
1•businessmate•33m ago•1 comments

I dumped Windows 11 for Linux, and you should too

https://www.notebookcheck.net/I-dumped-Windows-11-for-Linux-and-you-should-too.1190961.0.html
24•smurda•34m ago•11 comments

Nature-inspired computers are shockingly good at math

https://phys.org/news/2026-01-nature-good-math.html
2•pseudolus•34m ago•0 comments

Putting the "You" in CPU

https://cpu.land/
2•napolux•35m ago•0 comments

Show HN: Authentic AI CV optimizer – real keywords only, 90%+ ATS scores

https://www.cvora.net/
1•jaumapv•39m ago•0 comments

HTML-only conditional lazy loading (via preload and media)

https://orga.cat/blog/html-conditional-lazy-loading/
2•netol•41m ago•1 comments

The Hobbyist Maintainer Economic Gravity Well

https://www.softwaremaxims.com/blog/hobbyist-gravity-well
1•todsacerdoti•43m ago•0 comments

Self-driving cars aren't nearly a solved problem

https://strangecosmos.substack.com/p/self-driving-cars-arent-nearly-a
2•lordgrenville•44m ago•0 comments

Show HN: SSL Radar – Real-time CT logs with probabilistic data structures

https://demo.limite.dev
1•lopezb•46m ago•0 comments

Lean Dine – Scan restaurant menus for calories, macros, and allergens

https://leandine.app
1•albertnahas•46m ago•1 comments