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?

Show HN: N8n community node for Shotium – screenshot and OG image API

https://github.com/shotium/n8n-nodes-shotium
1•foodpad•27s ago•0 comments

X Window System at 40

https://blog.dshr.org/2024/07/x-window-system-at-40.html
1•mariuz•1m ago•0 comments

Selling Out

https://www.seangoedecke.com/selling-out/
2•johnny313•6m ago•0 comments

PLCBench: Can Autonomous LLM Agents Turn PLC Access into Sustained Physical

https://arxiv.org/abs/2608.26882
1•sbulaev•10m ago•0 comments

Mac extension (panel/pill/nub) to show LLM usage

https://github.com/abhayKashyap03/usage-notch
1•abhaykashyap03•11m ago•0 comments

Breaking Claude Code Opus 5 Auto Mode

https://embracethered.com/blog/posts/2026/breaking-claude-code-opus-5-and-automode/
2•jaksa•13m ago•1 comments

Show HN: A comic/webtoon reader with CSS scroll-snap, vanilla JavaScript

https://jazzy-torrone-fd91d9.netlify.app/
1•EditArteSoy•13m ago•0 comments

Psychedelics align brain activity with context

https://www.nature.com/articles/s41586-026-10910-z
1•jbotz•13m ago•0 comments

The Internet Archive's Vintage AI Collection

https://archive.org/details/vintageai
2•OuterVale•16m ago•0 comments

There are no more moats anymore

https://twitter.com/auren/status/2093826482384589218
1•tosh•17m ago•0 comments

Title: Show HN: I turned my homelab GPU into a paid API on Base mainnet

https://github.com/Runuk/argo-x402-reference
1•ru_nuk_01•22m ago•0 comments

ECMAScript spec proposal for ShadowRealm API

https://github.com/tc39/proposal-shadowrealm
1•tosh•22m ago•0 comments

Open source dataset cleaner for JSONL outputs

https://pypi.org/project/dataset-cleaner-cli/
1•Galvatar•26m ago•0 comments

A local-first workspace for documents, tasks and meetings on macOS

https://github.com/bitwize-ai/Logue
2•westerosweb•27m ago•0 comments

Show HN: Offline music practice apps – no account,no subscription,no analytics

https://music-buddha.com/
1•gabelopez•30m ago•0 comments

Guide to Rock Licking

https://geoscopy.com/the-rock-licking-guide-why-geologists-really-do-it-and-when-you-shouldnt/
2•Eridanus2•31m ago•0 comments

The viral leftist teens of Campaign 2020 work for OpenAI now

https://www.cnn.com/2026/08/29/us/gravel-teens-openai-cec
2•1659447091•36m ago•1 comments

Show HN: Claypot – a block-based studio for kids to inspect AI systems

https://claypot.app/
1•arvindm1991•39m ago•0 comments

See a Scam? Report It

https://150proc.pl/en/scamwatch
1•dara5•39m ago•0 comments

Curiosity Vault – an open-source library of practical guides, built with Astro

https://github.com/RomelAnte/curiosity-vault
1•romelantedev•40m ago•0 comments

Test

1•YasuoTanaka•41m ago•0 comments

Accidentally Hacked Three Family Members

https://blog.nathanlangley.dev/posts/accidentally-hacked-family.html
1•ninjahawk1•43m ago•0 comments

The hidden health cost of dollar store groceries

https://news.ucr.edu/articles/2026/08/18/hidden-health-cost-dollar-store-groceries
1•hhs•44m ago•0 comments

Australia usually hosts the biggest cuttlefish mating event – not this year

https://www.bbc.com/news/articles/c75gyw0nkzno
1•blondie9x•45m ago•0 comments

Online reviews risk cyberattacks

https://news.mccombs.utexas.edu/research/online-reviews-risk-cyberattacks/
1•hhs•46m ago•0 comments

Microsoft Admits AI Training in New User Privacy Statment

https://slashdot.org/submission/17350256/microsoft-admits-ai-training-in-new-user-privacy-statment
2•MilnerRoute•46m ago•0 comments

Light-powered soft robots can keep jumping forever

https://news.ncsu.edu/2026/08/soft-robots-jumping-forever/
1•hhs•47m ago•0 comments

Percent on ARC-AGI-3

https://monotykamary.com/posts/100-percent-on-arc-agi-3/
1•freediver•48m ago•0 comments

New Bimodal Design Could Supercharge Nuclear Spacecraft

https://spectrum.ieee.org/bimodal-nuclear-spacecraft
1•rbanffy•49m ago•0 comments

Reconstructing lattice point enumeration using Asian counting rods

https://oborona.zip/post/polygon-partitioning-and-piled-pile-sequences-on-an-equilateral-triangul...
1•gg582•52m ago•0 comments