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?

Beauty In My Backyard

https://worksinprogress.co/issue/beauty-in-my-backyard/
2•footest•3m ago•0 comments

Polynomial Trajectory Optimization for Quadrotors

https://www.staszewski.xyz/blog/collision-replanning/
1•kamilstaszewski•3m ago•0 comments

Show HN: ZenResume – Free, local-first ATS resume builder with AI import

https://www.zenresume.online/
1•jagadees21•3m ago•0 comments

YouTube Shorts Scraper and MCP Connector

https://apify.com/techforce.global/youtube-shorts-scraper
1•techforce_actor•5m ago•0 comments

Decode resistor color bands instantly

https://www.pockeng.com/tools/resistor.html
1•levario•6m ago•0 comments

AdaMAST: Adaptive Failure Taxonomies for Improving LLM Agents

https://multi-agent-systems-failure-taxonomy.github.io/AdaMAST/blogs/adamast_paper/
1•matt_d•6m ago•0 comments

Longtime Bay Area tech conference is leaving San Francisco after a 50-year run

https://www.sfchronicle.com/tech/article/semicon-west-moving-phoenix-22368164.php
1•iancmceachern•12m ago•0 comments

The Cities That Said Yes to Drugs

https://www.theatlantic.com/magazine/2026/09/city-drug-addiction-harm-reduction-policy/687967/
1•helsinkiandrew•12m ago•0 comments

Should Airbnb Add Ads?

1•Taikhoom2010•13m ago•0 comments

What does China's 15th '5-year plan' for renewables mean for climate change?

https://www.carbonbrief.org/qa-what-does-chinas-15th-five-year-plan-for-renewables-mean-for-clima...
1•xbmcuser•13m ago•0 comments

Tempered – AI-Powered PC optimizer that won't show a metric it can't measure

https://tempered.to/
1•AutomationGoat•15m ago•0 comments

Forgotten memories can leave silent traces in the brain

https://www.fmi.ch/news-events/articles/news.html?news=672
1•XzetaU8•18m ago•0 comments

Teen hackers tell BBC how police are helping them use their skills for good

https://www.bbc.co.uk/news/articles/cn0nqpy1rk4o
2•mmarian•19m ago•0 comments

DeepSeek-V4-Flash Update

https://api-docs.deepseek.com/updates/
10•dnhkng•20m ago•3 comments

SodaSlim Natural Weight Management Supplement for Wellness

https://finance.yahoo.com/healthcare/articles/sodaslim-releases-updated-2026-highlights-122400710...
1•Ikerphan•20m ago•0 comments

ChatGPT has been silently routing Pro to mini for several months

https://articles.fmt.kr/2026-07/oai
2•ilsubyeega•22m ago•1 comments

LinkedIn adds a button to report AI-generated 'slop'

https://techcrunch.com/2026/07/30/linkedin-adds-a-button-to-report-ai-generated-slop/
1•robin_reala•23m ago•0 comments

US Government map of Africa mislabels every country at global conference

https://www.reuters.com/world/africa/us-government-map-africa-mislabels-every-country-global-conf...
2•adg001•23m ago•0 comments

Remote

https://www.textclad.com/2026/07/30/remote/
1•kxrm•24m ago•0 comments

SAP's Big Push for Tabular AI. What It Means for Enterprises

https://pub.towardsai.net/saps-big-push-for-tabular-ai-what-it-means-for-enterprises-7dc3af2a1d8c...
1•justinvan•27m ago•0 comments

k-Coloring is Faster than Computing the Chromatic Number

https://arxiv.org/abs/2607.25973
1•matt_d•28m ago•0 comments

Show HN: Tileroot – save/restore tiling WM layouts (sway, Hyprland, i3)

https://github.com/Hinikaa/tileroot
2•hinikaa•31m ago•0 comments

Psychedelic images reveal what your weather app isn't telling you

https://grist.org/extreme-heat/these-psychedelic-images-reveal-what-your-weather-app-isnt-telling...
1•sizzle•36m ago•1 comments

x86 AMX/ACE with >8 tiles

https://lore.kernel.org/lkml/CAKSQd8WxM75DeZvovYXkt2c60ftHeEW_gpf0qTxaLF8i8kjm=w@mail.gmail.com/
2•matt_d•36m ago•0 comments

Show HN: QuizPaste – paste any text or doc, get an instant quiz

https://quizpaste.com/
1•jimliu01•36m ago•0 comments

Show HN: Gander, an Android file viewer that asks for no permissions at all

https://github.com/mokshablr/gander
2•mokshablr•44m ago•1 comments

Book Time: Automatic Page Turner from Japan [video]

https://www.youtube.com/watch?v=O3BJtUssbhQ
1•mushstory•45m ago•0 comments

U.S. FCC approves giant space mirror to deliver 'sunlight on demand'

https://www.cbc.ca/news/science/eflect-orbital-approval-FCC-9.7287535
3•LostMyLogin•47m ago•2 comments

It's Time to Give Up on the Nonstick Pan as We Know It

https://www.nytimes.com/wirecutter/reviews/give-up-on-ceramic-nonstick-pans/
1•jimnotgym•48m ago•0 comments

I built a website cost calculator with 9 engines

https://projectcostestimator.com
1•VrumVrum•52m ago•1 comments