frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•1y ago

Comments

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

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

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

PRINTABLE.MD

https://printable.md/
2•drorwolmer•3m ago•0 comments

The Five Stages of Being Replaced by Your Autocomplete

https://www.vincentschmalbach.com/five-stages-of-being-replaced-by-your-autocomplete/
1•vincent_s•4m ago•0 comments

PIZD, a Rust compressor exploring structural deduplication

https://pizd.spedo.dev/
1•torxx666•7m ago•0 comments

How to Start a Defence Tech Startup in the UK: Part 1

https://foxandlion.pub/analysis/how-to-start-a-defence-tech-startup-in-the-uk-part-1
3•fascinnn•7m ago•0 comments

A React component for building Web forms from JSON Schema

https://github.com/rjsf-team/react-jsonschema-form
1•saikatsg•10m ago•0 comments

Show HN: Continue Your Google AI Mode Chats in Gemini/Claude

https://chromewebstore.google.com/detail/relay-continue-google-sea/fjjfadgooapnegipjocinojjhaajghag
1•mahami•13m ago•0 comments

Probably NOT use the Linux eBPF/Rust XDR I built alone

https://github.com/visiongaiatechnology/gedefense
1•visiongaiatech•13m ago•0 comments

Nvidia Eyes Software Revenue with a $2k per GPU Yearly Figure from Huang

https://www.techpowerup.com/354113/nvidia-eyes-software-revenue-with-a-usd-2-000-per-gpu-yearly-f...
1•theanonymousone•18m ago•0 comments

RTX 4000 Pro Blackwell SFF performance hacks

https://piszczek.pl/blog/rtx-pro-4000-blackwell-sff-120w-qwen-benchmark
1•jacquesm•19m ago•0 comments

A tiny app for C# dotnet design Window Form

https://github.com/macauhome/winform-designer
1•macauhome•20m ago•0 comments

Thiel's leaked lectures on the end of the world

https://www.theverge.com/tech/1014252/peter-thiel-antichrist-lectures-analysis
1•izhak•20m ago•0 comments

Show HN: pw-repl – A Playwright-powered REPL for you and your agents to share

https://github.com/arcanemachine/pw-repl
1•arcanemachiner•20m ago•0 comments

Notes on loneliness (Tommy Dixon)

https://www.tommydixon.ca/p/notes-on-loneliness
1•xen_relay•23m ago•0 comments

I translated North Korean pop into American [video]

https://www.youtube.com/watch?v=nlSSyPXQ2i4
1•nxobject•23m ago•0 comments

HackDigest: Daily three-sentence news summaries in Korean or English

https://minjungsung.github.io/hackdigest/
1•minjungsung1994•24m ago•0 comments

China's tech giants are paying 1M yuan for a new kind of AI engineer

https://www.scmp.com/tech/tech-trends/article/3371925/chinas-tech-giants-are-paying-1-million-yua...
2•01-_-•30m ago•0 comments

Peter Thiel says Apple has done 'nothing new' after Steve Jobs

https://www.businessinsider.com/peter-thiel-apple-steve-jobs-tim-cook-innovation-iphone-duo-2026-10
1•01-_-•31m ago•0 comments

MustardOS is custom firmware (CFW) for handheld gaming devices

https://muos.dev/
1•fork-bomber•34m ago•0 comments

PyMagic a tiny DSL to write models/specs in Python

https://pypi.org/project/pymagic-models/
1•caotic123•37m ago•1 comments

Slavoj ŽIžek: Only Desperation Can Save Us from Ecology, AI, and War [video]

https://www.youtube.com/watch?v=_0LSqRzpxhU
1•asilis•40m ago•0 comments

Blackwell Brings NUMA Back, Inside One GPU

https://vincentzed.com/writing/blackwell-numa
1•frostbyte7•40m ago•0 comments

Show HN: Hazzel – A terminal coding harness that stays small on purpose

https://github.com/mukundzha/hazzel
1•mukundjha1•41m ago•0 comments

Show HN: Tabverse – a free, open-source, with self-hostable server Workona clone

1•liyu1981au•44m ago•0 comments

Ask HN: Did crates.io stop processing new crate publishes?

1•davvid•45m ago•1 comments

Aw1-breaker – Sub-millisecond AST circuit breaker for AI agent tool calls

1•MvikVela•46m ago•0 comments

Data-Oriented Design in Yuku's Parser

https://www.arshad.fyi/writings/data-oriented-design-in-yukus-parser
1•fagnerbrack•48m ago•0 comments

Raspberry Pi Pico W Irrigation – Telegram and Google Calendar All on Pico

https://github.com/AdrianCX/picohive-irrigation
2•AdrianCX•51m ago•0 comments

Rosettes and Other Hidden Traces of Hamburg's Tram

https://alsterrunde.com/rosettes-and-other-hidden-traces-of-hamburgs-tram/
1•mertbio•54m ago•0 comments

A cool 3D interactive demo of neuroevolution with supermario

https://github.com/vahmoh/NeuroMario
2•gbays3•57m ago•0 comments

Science could lift Italy's sinking cities back up

https://www.repubblica.it/en/europe/news/2026/10/26/news/subsidence_in_italy_venice_and_ravenna_a...
2•simonebrunozzi•1h ago•0 comments