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

Comments

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

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

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

Unofficial CPython JIT performance dashboard

https://doesjitgobrrr.com/
1•lumpa•2m ago•0 comments

I deleted the database and rebuilt my portfolio tracker to be local-first

https://www.pocketportfolio.app/
1•pocketportfolio•2m ago•0 comments

FreeBSD 15.0-Release Release Notes

https://www.freebsd.org/releases/15.0R/relnotes/
2•ksec•4m ago•0 comments

Miki Eleta Clockmaker

https://www.thenakedwatchmaker.com/people-miki-eleta
1•ClaudeGustav2•12m ago•0 comments

How the 'Brussels Effect' Backfired

https://www.ft.com/content/abc3002e-a7be-48e2-8197-aeddf937afec
1•mohi-kalantari•14m ago•0 comments

The Depth Illusion

https://gm-dev.ch/surface-grafting
1•roko_•15m ago•0 comments

200k Tokens Is Plenty

https://ampcode.com/200k-tokens-is-plenty
2•handfuloflight•16m ago•0 comments

Chunked Transfer Encoding – when content length is not known

https://pinggy.io/blog/understanding_content_length_header_and_chunked_encoding/
1•ghoshbishakh•22m ago•0 comments

NotebookLM Tools – Tags, Backup/Restore Sources and Bulk Source Fixer

https://old.reddit.com/r/notebooklm/comments/1pn2yip/notebooklm_tools_tags_backuprestore_sources_...
1•trungpv1601•23m ago•0 comments

Grok Is Glitching and Spewing Misinformation About the Bondi Beach Shooting

https://gizmodo.com/grok-is-glitching-and-spewing-misinformation-about-the-bondi-beach-shooting-2...
3•tobr•28m ago•1 comments

Show HN: I built a simulator to teach PMs why they shouldn't interrupt migration

https://apmcommunication.com
1•pingananth•31m ago•0 comments

Show HN: Generate Passwords from Regex Constraints

https://gruhn.github.io/regex-utils/password-generator.html?constraints=%5E.%7B16%2C32%7D%24%0A%5...
2•ngruhn•33m ago•1 comments

2025 Open Models Year in Review

https://www.interconnects.ai/p/2025-open-models-year-in-review
1•Philpax•35m ago•0 comments

Show HN: StreamGate – A lock-free observability proxy in Go

https://github.com/sashu2310/streamgate
2•sandeepk235•37m ago•2 comments

Nth Country Experiment

https://en.wikipedia.org/wiki/Nth_Country_Experiment
1•hexhowells•38m ago•0 comments

Smooth Scrolling on the Sega Master System

https://bumbershootsoft.wordpress.com/2025/12/13/smooth-scrolling-on-the-sega-master-system/
1•rcarmo•41m ago•0 comments

Forget the far right. The kids want a 'United States of Europe.'

https://www.politico.eu/article/united-states-of-europe-online-propaganda-social-media-memes/
4•saubeidl•54m ago•1 comments

What's Wrong with Kubernetes Today

https://www.devzero.io/blog/whats-wrong-with-kubernetes-today
5•Liriel•55m ago•1 comments

Show HN: Find the Right Game Engine – Godot, Unity, Unreal, and More

https://gameenginehub.com
1•neotanp•56m ago•0 comments

The Graffiti Question

https://www.guernicamag.com/the-graffiti-question/
1•bryanrasmussen•56m ago•0 comments

Rust's v0 mangling scheme in a nutshell

https://purplesyringa.moe/blog/rusts-v0-mangling-scheme-in-a-nutshell/
1•todsacerdoti•58m ago•0 comments

Norton's dome – A paradox in Newtonian physics

https://en.wikipedia.org/wiki/Norton%27s_dome
1•ColinWright•59m ago•0 comments

Props for Web Components

https://old.reddit.com/r/javascript/comments/1pj4ros/props_for_web_components/
2•MzHN•1h ago•2 comments

Connect a U.2 Server SSD to Your PC's USB Port with This Adapter (2021)

https://www.tomshardware.com/news/connect-a-u2-ssd-to-your-pcs-usb-port-with-this-adapter
1•walterbell•1h ago•0 comments

CS 108: Using and Understanding AI

https://docs.google.com/document/d/1idtNbEqMq644sbaK8-6rWYGrNEicNZyCqwp9rMU8hEM/edit?tab=t.0
1•jdcampolargo•1h ago•0 comments

Font AI – AI Font Generator

https://www.font-ai.com/
1•maltsev•1h ago•0 comments

I designed the circuit board for tinyCore [video]

https://www.youtube.com/watch?v=3Nd6zynJclk
1•cassianoleal•1h ago•0 comments

How (not) to train your reader

https://rikverse2020.rikweb.org.uk/blog/how-not-to-train-your-reader/
1•rikroots•1h ago•0 comments

Show HN: Naiman.ai – AI Powered Feed

https://www.naiman.ai/
1•usernameis42•1h ago•0 comments

Tenex: Terminal multiplexer for AI coding agents

https://github.com/Mockapapella/tenex
1•handfuloflight•1h ago•0 comments