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?

Scientists Spotted a Giant New Species in the Background of an Instagram Selfie

https://gizmodo.com/someone-posted-an-instagram-selfie-scientists-spotted-a-giant-new-species-in-...
1•gumby•1m ago•0 comments

2026 State of PQC on the Web

https://www.f5.com/labs/articles/2026-state-of-pqc-on-the-web
1•msgchainhq•5m ago•0 comments

AI model can reconstruct images from your brain

https://petapixel.com/2026/10/07/fastest-ever-mind-reading-ai-model-can-reconstruct-images-from-y...
2•antman•6m ago•0 comments

Build live dashboards and animate explainers with Claude

https://claude.com/resources/articles/dashboards-and-motion
2•matheussampaio•12m ago•0 comments

Cybernetics of AI Companies

https://ai-cybernetics.grok.me
2•measurablefunc•12m ago•0 comments

Show HN: Woodpecker – a browser agent built with Pi and user scripts

3•tyr034•14m ago•0 comments

Per-task model routing for native Codex

https://github.com/cybrking/modelrudder
1•tfelder•14m ago•0 comments

WebTorrent Broadcasting / ebubbl / web 3.1

https://ebubbl.com/neighborhoods/bubbles/neighborhood-gallery?neighborhoodId=6ac2b8618881aa4e5deb...
1•bc3mc2•15m ago•1 comments

Every Plaform is Hitler: mourning friendships lost

https://aria.dog/barks/every-platform-is-hitler/
2•xeonmc•15m ago•0 comments

Has software development become less fun?

https://ankit-m.github.io/blog/has-software-dev-become-less-fun/
1•ankit_m•26m ago•1 comments

What Ails Nike

https://finshots.in/archive/what-ails-nike/
1•vismit2000•27m ago•0 comments

AI Film Submmitted for Best Animated Feature Oscar

https://twitter.com/fableshowrunner/status/2107522071647731768
2•soltanov•29m ago•1 comments

Anthropic launching 'presidential engagement' effort ahead of 2028 election

https://fortune.com/2026/10/08/anthropic-presidential-engagement-program-hiring-political-lead-20...
1•ilreb•29m ago•0 comments

OuroWorld: Animated 3D worlds that loop forever, explorable in the browser

https://ouroworld.userwei.com/
1•ilreb•33m ago•0 comments

Metal Driver for Nvidia GeForce RTX Cards on macOS 15 Sequoia on Intel Macs

https://github.com/nullmoth/nvidia-macos-driver
3•rvz•37m ago•0 comments

Parable of the Broken Window

https://en.wikipedia.org/wiki/Parable_of_the_broken_window
1•suopspaces•39m ago•0 comments

Public will be able to watch Fort Hood shooter's execution, Hegseth says

https://www.usatoday.com/story/news/crime/2026/10/08/nidal-hasan-execution-public-firing-squad/92...
5•mraniki•39m ago•0 comments

OpenAI used AI to write email warning Australian government AI had hacked

https://www.theguardian.com/australia-news/2026/oct/08/openai-used-ai-to-help-write-email-warning...
1•sbulaev•48m ago•0 comments

Show HN: MindMesh – An AI workspace that prioritizes your work

https://www.mindmesh.global/
1•mindmesh•49m ago•0 comments

Collecting Favours

https://sunilpai.dev/posts/collecting-favours/
1•shraddhaag•50m ago•0 comments

Show HN: Excali-mode

https://github.com/yibie/excali-mode
3•oliverchan2024•53m ago•0 comments

Show HN: Happy Hangul Day! An RNN for Generating Korean Handwriting Strokes

https://hangul.ink/blog/hangul-day
3•jbaudanza•57m ago•0 comments

3D FPS game demo with photorealistic rendering, by Opus 5.5

https://github.com/cktang88/3d-fps
1•383toast•59m ago•1 comments

Open Source Drone Simulator

https://github.com/vishwagw/Sky-Sim-drone-simulator-3.0
2•vishwagw98•1h ago•2 comments

Candy Box

https://candybox2.github.io/candybox/
2•OsrsNeedsf2P•1h ago•0 comments

Rogue Pilots Are a Growing Safety Threat–and No One Knows How to Stop Them

https://www.wsj.com/business/airlines/rogue-pilots-have-become-one-of-the-biggest-threats-to-airl...
2•littlexsparkee•1h ago•0 comments

Mastodon-compatible ActivityPub server in Python/Django

https://github.com/avaraline/incarnator
3•henrid•1h ago•0 comments

Beyond n log n: Integer multiplication

https://beyond-n-log-n.netlify.app
1•at1as•1h ago•0 comments

"A Node.js project template that will not install Node with curl – sh

https://github.com/fulldecent/node.js-template
1•fulldecent2•1h ago•0 comments

AI Economist, an installable agent skill for macro nowcasting

https://github.com/garroshub/ai-economist-skill
2•garrosgong•1h ago•0 comments