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?

RepRap (Replicating Rapid prototyper) [self-printing 3D Printer]

https://en.wikipedia.org/wiki/RepRap
1•peter_d_sherman•3m ago•0 comments

Show HN: A 1999 site that is only ads

https://www.ihateads.fun/
1•ilreb•3m ago•0 comments

US Global Entry revoked for importing $12 of ESP32 boards

https://www.reddit.com/r/esp32/comments/1x3bmjh/ordering_esp32_from_overseas_watch_out_global/
1•z2•4m ago•0 comments

MapQuest lets you track Flock cameras

https://mashable.com/tech/mapquest-fusers-can-find-nearby-flock-cameras
1•Yctg•7m ago•1 comments

Botline, a mailbox for AI agents from different vendors

https://github.com/sabotage-dev/botline
1•sabotage-dev•11m ago•0 comments

Superlite: A Faster Alternatie to Superpowers

https://contextfirst.blog/superlite-hand-an-agent-a-spec/
2•iheatuchriswogu•19m ago•0 comments

Anthropic commits 5% of shares to 'public benefit' fund

https://www.ft.com/content/3beab58d-4269-4722-b299-8fa5a93f5a52
2•JumpCrisscross•22m ago•1 comments

Chicago O'Hare Digs Up 50-Ton Boulder Under Airfield, Asks Public for Name Ideas

https://simpleflying.com/chicago-ohare-digs-up-50-ton-boulder-public-names/
3•Stratoscope•24m ago•1 comments

Architecting for HW Diversity: Meta's E2E Co-Design for AI Training on AMD GPUs

https://arxiv.org/abs/2610.22230
2•matt_d•25m ago•0 comments

Introduction to Tensor Core Arithmetic

https://simonveitner.substack.com/p/introduction-to-tensor-core-arithmetic
2•matt_d•26m ago•0 comments

Footage of the Flock search that a judge ruled was uncosntitutional

https://www.404media.co/watch-footage-of-the-flock-search-a-judge-ruled-unconstitutional/
5•anigbrowl•26m ago•0 comments

The Vermilion Experiment: Implementing a Lean Back End for Verus

https://proofsandintuitions.net/2026/10/18/vermilion-experiment-lean-backend-verus/
2•matt_d•26m ago•0 comments

The Effects of MBAs on Wages and the Labor Share in the US and Denmark

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4059303
2•thelastgallon•29m ago•0 comments

Nexus-Q Core PQC Open Source 4.1.0

https://nexus-q.link/
2•lecodev•32m ago•0 comments

Notify me about this coding session, not all coding sessions

https://docs.cmd-ctrl.ai/blog/notifications-per-session
2•mrwoof•33m ago•0 comments

AI Agents Trading Stocks While You Sleep? Charles Schwab's CEO Is Skeptical

https://www.wsj.com/tech/ai/ai-agents-trading-stocks-while-you-sleep-charles-schwabs-ceo-is-skept...
3•bcaulfield•43m ago•0 comments

Important Programming Concepts, Even on Embedded Systems: Idempotence (2014)

https://www.embeddedrelated.com/showarticle/629.php
2•jstrieb•45m ago•0 comments

Fractal Recursion, Bounded Infinity, and Adapted Systems

https://pub.towardsai.net/fractal-recursion-bounded-infinity-and-adapted-systems-b11046c9e1e1?sk=...
1•attractor26•48m ago•0 comments

The Non-Tech AI

https://thenontechai.com/
1•lindaclark•51m ago•0 comments

Operation Raven: Browser based Call of Duty like game

https://semperplay.com/games/operation-raven/
1•semperMade•53m ago•0 comments

Will major-party U.S. presidential candidate deploy AI clone to talk to voters?

https://manifold.markets/BrunoClawfeld/will-a-majorparty-us-presidential-c
3•bcaulfield•59m ago•3 comments

How Hurricanes Form: A Visual Explainer

https://simstorm.net/basics/how-do-hurricanes-form
1•1659447091•59m ago•1 comments

Nuclear Fission Fuels is Inexhaustible (2022)

https://scanalyst.fourmilab.ch/t/nuclear-fission-fuel-is-inexhaustible/1257
1•andsoitis•1h ago•1 comments

Starcraft: Ashfall

https://starcraft-shooter-2026.pages.dev/
2•debo_•1h ago•1 comments

Creation/Evolution - Creationist Software Development (1993)

https://www.fourmilab.ch/autofile/www/chapter2_108.html
1•andsoitis•1h ago•0 comments

Dogs seem to agree with humans that 'kiki' is round and 'bouba' is spiky

1•johnnyApplePRNG•1h ago•0 comments

Through the Looking Glass

https://www.fourmilab.ch/autofile/www/chapter2_69.html
1•andsoitis•1h ago•0 comments

Anthropic's Own Staff Can't Use Claude Code's 'Bypass Permissions' Mode

https://runtimewire.com/article/anthropic-s-own-staff-can-t-use-claude-code-s-bypass-permissions-...
3•runtimewire•1h ago•2 comments

The San Andreas Fault is tearing this winery apart

https://geotripper.blogspot.com/2011/11/hey-its-not-my-fault-its-san-andreas.html
2•pastureofplenty•1h ago•1 comments

A Whole-Cortex Encoding Model of Vision, and Language for In-Silico Neuroscience

https://huggingface.co/ffh92r32rm0/Cajal-1
2•hamiltonf•1h ago•1 comments