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?

Toad Venom Nose Spray Quickly Eases Depression for Weeks in Clinical Trial

https://www.sciencealert.com/scientists-tested-a-toad-venom-psychedelic-on-treatment-resistant-de...
1•gmays•56s ago•0 comments

New Agentic security tool detects shuts down hackers on autopilot

https://argusone.website
4•wearehumxn•2m ago•0 comments

Ukraine is arming war robots with grenade launchers to hit the Russians

https://www.businessinsider.com/ukraine-robots-use-grenade-launchers-to-fire-without-risking-sold...
2•beansovertoast•2m ago•0 comments

'Forced out': HOA fees to rise to $2,500 a month

https://www.wsoctv.com/news/local/forced-out-hoa-fees-rise-7500-month/XCW2HIHUKNBMTNWVQSYXQZJCY4/
1•hippich•7m ago•0 comments

Agent Harness for Learning Things [video]

https://www.youtube.com/watch?v=nfTDljFG2g0
1•rice7th•10m ago•0 comments

Capturing and replaying real database workloads at Airbnb

https://medium.com/airbnb-engineering/beyond-synthetic-testing-capturing-and-replaying-real-datab...
1•shcallaway•11m ago•0 comments

Create your own Jev using Voyage models

https://blog.voyageai.com/2026/10/27/how-to-create-your-own-jev-using-voyage-models/
1•fzliu•13m ago•1 comments

Redirect Audit – Check how HTTP/HTTPS/www variants and bots get redirected

https://redirectaudit.com/
1•zamilist•15m ago•0 comments

Rubin Observatory reveals its first dwarf planet candidate in our solar system

https://www6.slac.stanford.edu/news/2026-10-27-nsf-doe-vera-c-rubin-observatory-reveals-its-first...
1•consumer451•15m ago•0 comments

Nice Little Satellite You Got Here. Shame If Anything Were to Happen to It

https://streetwiseprofessor.com/nice-little-satellite-you-got-here-shame-if-anything-were-to-happ...
3•jacquesm•18m ago•0 comments

Ferring to acquire ovary-in-a-dish startup Gameto for up to $1.38B

https://endpoints.news/ferring-to-acquire-ovary-in-a-dish-startup-gameto-for-up-to-1-38b/
1•wslh•19m ago•0 comments

Show HN: VelaTrace KiCad plugin: Catch PCB mistakes before you order the board

https://forum.kicad.info/t/velatrace-plugin-a-linter-for-kicad-boards-that-catches-mistakes-befor...
1•a2-_•19m ago•1 comments

Cloudflare Computer helps agents recover from interruption and wait for approval

https://developers.cloudflare.com/changelog/post/2026-10-26-computer-durable-javascript/
1•gmays•21m ago•0 comments

Show HN: Better Backlog: Filter GitHub issues with decision models

https://github.com/BerriAI/better-backlog
1•mfkhalil•22m ago•2 comments

OEIS sequence A400000: The city-building sequence

https://oeis.org/A400000
1•rahidz•30m ago•1 comments

Show HN: Guess what frontier LLMs do in a repeated prisoner's dilemma

https://thenunchiproject.com/game/ai-decides
4•masterofarbs•34m ago•0 comments

Harley-Davidson Wanted an Electric Revolution. That Dream Is in Trouble

https://www.wsj.com/business/autos/harley-davidson-wanted-an-electric-revolution-that-dream-is-in...
1•bookofjoe•36m ago•1 comments

Egres: A Postgres-compatible database for heavy, multi-tenant workloads

https://egresql.io/
1•random42•39m ago•0 comments

Show HN: WordClash Daily – A daily crossword game, solo or multiplayer

https://wordclash.io/daily
1•pandaman28•41m ago•0 comments

Gender Reveal App

https://www.revealsky.com/
1•umoizeonesi•43m ago•0 comments

Bureau – BUREAU – an agent skill that designs like a studio

https://acf1210.github.io/bureau/
1•acf1210•44m ago•0 comments

Moxnox 1.0: NT-Like, POSIX-Compatible OS Running Atop Btrfs

https://github.com/maharmstone/moxnox
3•SockThief•49m ago•0 comments

LibreOMR

https://github.com/foxzyt/LibreOMR
3•bernardodealbuq•52m ago•0 comments

Free daily JSON feed of Shanghai government subsidy notices

https://github.com/ZhongGheart/china-policy-data
9•subsidyradar•56m ago•0 comments

Claude finds TikTok, Instagram bypassing microphone permissions to listen to you

https://twitter.com/starmexxx/status/2114841068839526865
13•thunderbong•58m ago•4 comments

Broccoli2Shell: The One Decoder We All Depend On

https://semgrep.dev/blog/2026/broccoli2shell-brotli-cve-2026-111497/
1•j12y•1h ago•2 comments

3B1B and Steven Strogatz on the Humanity of Math [video]

https://www.youtube.com/watch?v=xUSznTR2cwc
1•marvinborner•1h ago•0 comments

We measured Opus 5.5 for 30 days. Here's what we found

https://blog.nathanlangley.dev/posts/livenerf-30-days.html
3•ninjahawk1•1h ago•1 comments

Redbird Reef

https://en.wikipedia.org/wiki/Redbird_Reef
1•whicks•1h ago•0 comments

Why are Quantum Computers faster? [video]

https://www.youtube.com/watch?v=irTRmgq6a0A
1•bdilpreet66•1h ago•1 comments