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?

Where U.S. Salary Ranges Help Job Seekers

https://corvi.careers/blog/salary-range-clarity-role-state-metro-rankings/
1•sp1982•1m ago•0 comments

Show HN: A leaderboard of most popular open-weight LLMs

https://osolmaz-leaderboard.hf.space/
1•hosolmaz•4m ago•0 comments

Catbath – a tiny text editor in Rust with edit over SSH and web editor in 456KB

https://github.com/skorotkiewicz/catbath
2•modinfo•7m ago•0 comments

AI was supposed to make smarter decisions. Iit may be making leaders dangerous

https://www.youtube.com/watch?v=NTeF1NmmZWA
4•orionblastar•9m ago•1 comments

Lianda and the Long March

https://blog.georeactor.com/books-06-26b
2•mapmeld•11m ago•0 comments

LineShine Debuts at No. 1 as the TOP500 Enters a New Global Exascale Era

https://top500.org/news/lineshine-debuts-no-1-top500-enters-new-global-exascale-era/
3•jonbaer•16m ago•0 comments

US AI stock sell-off shakes markets from Wall Street to Asia

https://www.theguardian.com/business/2026/jun/23/ai-stocks-sell-off-us-markets
5•colinprince•21m ago•0 comments

Want to feel happier at work? Take a five-minute walk

https://www.bbc.com/news/articles/c78yzz936evo
4•tagawa•25m ago•2 comments

Sakana Fugu: a multi-agent system delivered as one model

https://github.com/SakanaAI/fugu
5•aurenvale•26m ago•1 comments

US presses Meta to agree to AI reviews as security fears rise

https://www.nytimes.com/2026/06/23/business/meta-ai-government-reviews-security.html
2•anigbrowl•26m ago•0 comments

Can a $1,500 Battery Replace a Powerwall? [video]

https://www.youtube.com/watch?v=jl-rwZjdD3Y
3•nikodunk•30m ago•1 comments

BenchPress: Predict any LLM's score on any benchmark

https://microsoft.github.io/benchpress/
3•berlianta•35m ago•0 comments

Legibility of Effort

https://eieio.games/blog/legibility-of-effort/
2•bobbiechen•38m ago•0 comments

Raspberry Pi Pico W as USB Wi-Fi Adapter

https://gitlab.com/baiyibai/pico-usb-wifi
5•byb•40m ago•2 comments

Ions, a distributed reasoning graph built from evidence backed claims

https://github.com/nomad505050/ions-genesis
5•nomad55•51m ago•0 comments

I built an open source VAD that beats Silero, Pyannote, and WebRTC

https://github.com/monishmal3375/nova-vad
4•hellothisismm•51m ago•0 comments

Technology-Driven Moral Panics

https://techlashed.org/
4•gjvc•55m ago•0 comments

Mythos model found vulnerabilities in classified US Government systems

https://apnews.com/article/anthropic-mythos-ai-classified-systems-vulnerabilities-testing-3e8762c...
3•josephwegner•55m ago•0 comments

Ten years on, Brexit's economic impact is becoming clearer

https://www.bbc.co.uk/news/articles/cyv0m164m84o
9•mellosouls•56m ago•1 comments

RRB-Trees: Efficient Immutable Vectors

https://infoscience.epfl.ch/server/api/core/bitstreams/e5d662ea-1e8d-4dda-b917-8cbb8bb40bf9/content
3•azhenley•1h ago•0 comments

2026: The year of the node based editor

https://medium.com/@fadimantium/2026-the-year-of-the-node-based-editor-941f0f15d467
4•soupspaces•1h ago•3 comments

Congress Clears Housing Bill, Cementing a Rare Bipartisan Feat

https://www.nytimes.com/2026/06/23/us/politics/congress-housing-bill.html
11•mikhael•1h ago•5 comments

"Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

https://gist.github.com/retroplasma/ec21767d0a8380c7ea9c2fbee1c7d6bf
4•retroplasma•1h ago•0 comments

InSight: Self-Guided Skill Acquisition via Steerable VLAs

https://insight-vla.github.io/
2•ilreb•1h ago•0 comments

Kevin Warsh's Press Conference Collides into 30 Years of Michael Woodford

https://newsletter.mikekonczal.com/p/kevin-warshs-press-conference-collides
4•NomNew•1h ago•2 comments

The Teensy Executable Revisited

https://www.muppetlabs.com/~breadbox/software/tiny/revisit.html
4•ankitg12•1h ago•0 comments

How Quake Ruined Id Software

https://twitter.com/SandyofCthulhu/status/2069592209645785294
5•boredemployee•1h ago•0 comments

Bash Line Editor: a command line editor written in pure Bash

https://github.com/akinomyoga/ble.sh
4•thunderbong•1h ago•0 comments

The war on terror primed America for autocracy

https://www.economist.com/by-invitation/2026/06/02/how-the-war-on-terror-primed-america-for-autoc...
77•andsoitis•1h ago•40 comments

Show HN: Procman, a TUI for run Procfile based app locally

https://github.com/a-chacon/procman
2•achayala•1h ago•0 comments