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?

New sw dev tool for safe local AI usage

https://github.com/alexs60/safe-sde
1•alexfg93•39s ago•0 comments

Open AI announces two new models- GPT-transcribe and GPT-live-transcribe

https://developers.openai.com/api/docs/models/gpt-transcribe
1•rochansinha•2m ago•0 comments

LearnVector – Andrew Ng's AI company building one‑to‑one learning experiences

https://learnvector.ai/
2•ajhai•5m ago•0 comments

Autoclaw

https://autoclaw.z.ai/
1•qainsights•7m ago•1 comments

I Built a Free AI Pain Point Miner

https://github.com/joatsaint/pain-point-miner
1•movieman32•8m ago•0 comments

Ask HN: How many AI agents do you actively use?

1•rjpruitt16•11m ago•1 comments

Symbols That Speak Color

https://colorsym.com/
1•mooreds•15m ago•0 comments

LeanScreen: Lean Verification

https://www.millenniumresearch.ai/leanscreen.html
30•Hdjlaf•15m ago•3 comments

Show HN: MD Flow – native macOS/iOS app for browsing and reading Markdown files

https://www.markdownfinder.app/en
1•azambrano•15m ago•0 comments

Modern Software Registries Are a Trust Service

https://redmonk.com/kholterhoff/2026/07/28/modern-software-registries-trust-service/
1•mooreds•16m ago•1 comments

RuntimeWire launches a live dashboard with auditable readership metrics

https://runtimewire.com/article/runtimewire-launches-a-live-dashboard-with-auditable-readership-m...
1•ryanmerket•18m ago•0 comments

Qector v3: Exact parity quantum error correction on a 3GB dual-core edge CPU

https://zenodo.org/records/21501377
1•QECTOR•19m ago•0 comments

Show HN: OpenOTP – Autofill email verification codes on your Mac

https://openotp.app
1•jeninh•22m ago•0 comments

Show HN: DeskDock (Always on Dock) – A tool a treat for Windows productivity

https://sites.google.com/view/deskdock
1•doc-picks-apps•22m ago•1 comments

Building Galley House

https://eviltrout.com/blog/2026-07-28-building-galley-house/
1•galleywest200•24m ago•0 comments

Generate Nix binary caches without Nix copy

https://www.justus.pw/posts/2026-07-29-generate-nix-cache.html
1•justusw•30m ago•0 comments

Show HN: TrueDeck – open-source multi-agent terminal deck that abstracts memory

https://github.com/WutIsHummus/TrueDeck
1•Alpeeen•31m ago•0 comments

Show HN: Bocazasgames – Four multiplayer browser games with AI moderation

https://www.bocazasgames.com/
1•elmegapeluco•35m ago•1 comments

Trump's diversity crackdown reverberates through US boardrooms

https://www.reuters.com/legal/government/trumps-diversity-crackdown-reverberates-through-us-board...
6•petethomas•35m ago•1 comments

OpenAI's rogue models roamed the internet for 4 days and staged a second attack

https://www.politico.com/news/2026/07/28/openai-rogue-models-hugging-face-breach-01014572
2•nnoerdlinger•36m ago•1 comments

How do you rewrite C/C++ projects to Rust?

https://blog.jetbrains.com/rust/2026/07/27/cpp-to-rust-migration/
2•smokeeaasd•42m ago•0 comments

Samsung's Galaxy Ring Gets FDA-Cleared Sleep Apnea Detection This Fall

https://gizmodo.com/samsungs-galaxy-ring-gets-fda-cleared-sleep-apnea-detection-this-fall-2000791433
1•brandonb•44m ago•0 comments

Advice for New Managers (2025)

https://danbruder.com/blog/advice-for-new-managers
4•danbruder•45m ago•0 comments

GitHub Copilot app usage metrics now expand across report rollups

https://github.blog/changelog/2026-07-28-github-copilot-app-usage-metrics-now-expand-across-repor...
2•smokeeaasd•46m ago•0 comments

NPM publish-time malware scanning and dual-use metadata

https://github.blog/changelog/2026-07-28-npm-publish-time-malware-scanning-and-dual-use-metadata/
3•smokeeaasd•47m ago•0 comments

Show HN: Learning Rust by writing a Markdown to HTML compiler

https://andreadimatteo.com/md-to-html-compiler.html
5•deotman•49m ago•0 comments

My girlfriend broke up with me – This is my body's reaction to the news

https://reddit.com/r/dataisbeautiful/comments/1v874lz/my_girlfriend_broke_up_with_me/
4•refp•52m ago•0 comments

Multiple Mouse Cursors in Wayland

https://blinry.org/multi-seat-wayland/
7•marvinborner•54m ago•0 comments

An idea I had took me from chaos and stressed AF to insanely productive

https://www.taskloco.com/
3•taskloco_nyc•57m ago•1 comments

AI systems out-persuade expert humans

https://arxiv.org/abs/2606.16475
2•Gaishan•57m ago•2 comments