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?

Controlling the Wizzard

https://www.leadedsolder.com/2026/01/20/creativision-clone-snes-controller-board-prototype.html
1•zdw•36s ago•0 comments

Self-healing nuclear fuel could improve safety, reduce waste in reactors

https://techxplore.com/news/2025-12-nuclear-fuel-safety-reactors.html
1•PaulHoule•1m ago•0 comments

Ask HN: How do you keep system context from rotting over time?

1•kennethops•2m ago•0 comments

Show HN: ChartGPU – WebGPU charting library, 1M+ points at 60fps

https://github.com/ChartGPU/ChartGPU
1•huntergemmer•2m ago•0 comments

Attention Media ≠ Social Media

https://susam.net/attention-media-is-not-social-media.html
1•speckx•3m ago•0 comments

What to do about students using ChatGPT to do their homework?

https://blog.computationalcomplexity.org/2026/01/what-to-do-about-students-using-chatgpt.html
2•zdw•3m ago•0 comments

Show HN: Mastra 1.0, open-source JavaScript agent framework from the Gatsby devs

https://github.com/mastra-ai/mastra
4•calcsam•3m ago•0 comments

Go-Native Durable Execution

https://www.dbos.dev/blog/how-we-built-golang-native-durable-execution
1•hmaxdml•4m ago•0 comments

Google Magic Cue runs on your device or in the cloud

https://support.google.com/pixelphone/answer/16508057?hl=en
1•caminanteblanco•5m ago•1 comments

Show HN: SolScript – Write Solidity, compile to Solana programs

https://github.com/cryptuon/solscript
1•ticktockten•5m ago•0 comments

The Hunt for Midori

https://take.surf/2026/01/06/the-hunt-for-midori
1•goranmoomin•6m ago•0 comments

External AI Representations and Evidentiary Reconstructability

https://zenodo.org/records/18316122
1•businessmate•6m ago•1 comments

One of the first alternative app stores in the EU is shutting down

https://techcrunch.com/2026/01/20/one-of-the-first-alternative-app-stores-in-the-eu-is-shutting-d...
1•speckx•9m ago•0 comments

Send your name around the Moon with the Artemis astronauts

https://www3.nasa.gov/send-your-name-with-artemis/
1•ck2•9m ago•0 comments

You've Got Luddites All Wrong (2014)

https://www.vice.com/en/article/luddites-definition-wrong-labor-technophobe/
3•iccananea•10m ago•0 comments

The Startup Graveyard

https://www.loot-drop.io/
3•skogstokig•11m ago•0 comments

Primes: Prime number projects in 100 programming languages

https://github.com/PlummersSoftwareLLC/Primes
1•FigurativeVoid•12m ago•0 comments

Weave.js: an open-source library to build whiteboards, canvas, and design apps

https://medium.com/@InditexTech/meet-weave-js-an-open-source-library-to-build-whiteboards-canvas-...
3•jorgeteixe•13m ago•0 comments

Codex Overtakes GitHub Copilot in Usage Share

https://ai-coding.info/en
1•kotauchisunsun•13m ago•1 comments

Treating anxiety as a bug in legacy code (engineering approach)

3•bitkin_dev•13m ago•0 comments

Danish Pension Fund AkademikerPension to Exit US Treasuries

https://www.bloomberg.com/news/articles/2026-01-20/danish-pension-fund-akademikerpension-to-exit-...
4•mraniki•13m ago•1 comments

Anthropic's Pricing Is Stupid

https://solmaz.io/log/2026/01/10/anthropics-pricing-is-stupid/
2•speckx•13m ago•0 comments

Gluetun – Lightweight VPN Client in Docker for Secure Connections

https://gluetun.com/
2•eustoria•14m ago•0 comments

Ubuntu for AI Engineering

https://jnsgr.uk/2026/01/ubuntu-for-ai-engineering/
1•jnsgruk•15m ago•0 comments

Lumo: Privacy-first AI assistant where chats stay confidential

https://lumo.proton.me/
1•eustoria•15m ago•0 comments

Daily Warship Guessing Game

https://keel-fawn.vercel.app/
1•vinnyglennon•16m ago•0 comments

Cloudflare Zero-Day: Accessing Any Host Globally

https://fearsoff.org/research/cloudflare-acme
1•2bluesc•17m ago•0 comments

Better-Docker-ps: Because `Docker ps` is annoying and does not fit my terminal

https://github.com/Mikescher/better-docker-ps
1•thunderbong•19m ago•0 comments

ScentWillow AI

https://scentwillow.com/
1•OddSnippet•20m ago•0 comments

Pharos: The Lighthouse at Alexandria

https://penelope.uchicago.edu/encyclopaedia_romana/greece/paganism/pharos.html
1•teleforce•20m ago•0 comments