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?

Apple Caught Off Guard by AI Demand for Mac Mini and Mac Studio

https://www.macrumors.com/2026/08/30/apple-unexpected-mac-mini-and-studio-demand/
1•thm•25s ago•0 comments

Show HN: agix – addresses and messaging for agents working for their humans

https://agixlink.com/
1•populuxe•4m ago•1 comments

Trivium 30 aug 2026

https://leahneukirchen.org/trivium/2026-08-30
2•swah•5m ago•0 comments

The new Go JSON API: twice as fast, or 1.5x slower? – Daniel Lemire's blog

https://lemire.me/blog/2026/08/29/the-new-go-json-api-twice-as-fast-or-1-5x-slower/
1•ncruces•5m ago•0 comments

Dataloupe – turn any CSV, Parquet, or Excel file into an offline HTML explorer

https://github.com/aurelio-nakamura/dataloupe
1•aurelionakamura•5m ago•0 comments

Historical Discoveries That Reshaped Modern Historical Understanding

https://thehistoricalinsights.page/2026/08/historical-discoveries.html
1•thunderbong•6m ago•0 comments

Guido van Rossum on Parallel Python: "Personally I wish we'd stuck with the GIL"

https://discuss.python.org/t/pep-805-safe-parallel-python/108670?page=4
1•pansa2•8m ago•1 comments

Show HN: Astral – Astro.js, but in Elixir

https://github.com/elixir-volt/astral
1•dannote•9m ago•0 comments

Show HN: I built this social leaderboard game

https://king-of-the.world
2•nicojuhari•11m ago•1 comments

The corporate espionage firm exposing Chinese state actors

https://www.thetimes.com/business/companies-markets/article/london-firm-ai-global-espionage-d2533...
1•pir8life4me•11m ago•0 comments

The Supabase graph on GitMir could be a CS university course

https://gitmir.com/models/supabase
1•venediktov•11m ago•1 comments

ArkDisk – managed Nextcloud on hardware I own, in Belgium and Lithuania

https://arkdisk.com/
1•ChristopherArk•12m ago•0 comments

Linear models from least squares to quantiles

https://stochastic.blog/linear-models-from-least-squares-to-quantiles/
1•Anon84•12m ago•0 comments

AI is hurting US politics. Here’s how candidates could use it for good

https://www.theguardian.com/commentisfree/2026/aug/31/ai-politics-voters
1•mitchbob•13m ago•1 comments

Two Pixels Become One

https://roundtoe.com/blog/how-two-pixels-become-one
1•nkonstas•14m ago•0 comments

Show HN: Our GLM-5.3 Flash Switchless recipe is now out for 4x DGX Sparks

https://github.com/alexellis/glm-5.3-flash-4x-dgx-spark-switchless
2•alexellisuk•15m ago•1 comments

Google Maps switches to "Lake America" as Canada compares change to "SNL" skit

https://www.axios.com/2026/08/30/lake-america-lake-ontario-maps-trump
3•reconnecting•17m ago•0 comments

Ask HN: Claude vs. Codex – which one do you prefer, and why?

2•neverenderr•17m ago•0 comments

Catching logs trying to gaslight your security agents

https://github.com/nimishaaa/gaslit-aisoc
1•engnootnoot•17m ago•0 comments

It's not insider trading, it's offshore gambling

https://www.ft.com/content/5bb22de2-f4ca-4f04-b8c0-85cda99d8576
2•johnbarron•18m ago•0 comments

Consultants head for a showdown – with their own clients

https://www.ft.com/content/709d7e2d-0c2f-45bc-b559-e7328372cf9e
1•johnbarron•19m ago•0 comments

Nintendo's Exercise Bicycle and the Vagaries of Tech Innovation

https://arbesman.substack.com/p/nintendos-exercise-bicycle-and-the
1•surprisetalk•21m ago•0 comments

I Found the Performance–Cost–Speed Sweet Spot with LLMs

https://philippdubach.com/posts/llm-performance-cost-speed-sweet-spot/
2•7777777phil•23m ago•0 comments

Show HN: Three Slicer, I ported OrcaSlicer to run in the browser

https://slicer.kimgh06.com/
2•kimgh06•23m ago•0 comments

An AI coding agent silently erased 92% of AI nodes in n8n's most-cited dataset

https://sevenedge.pl/en/blog/an-ai-agent-erased-n8ns-ai-agent-nodes
1•ahunia•25m ago•0 comments

Show HN: SlideOps, slides from a repo that flag when they drift from the code

https://github.com/glukicov/slideops
2•lukicov•26m ago•0 comments

Show HN: Stickyboard – Kanban on real sticky notes, no account needed

https://stickyboard.dev
4•petritavd•27m ago•0 comments

The British state has lost the argument

https://jonathancook.substack.com/p/the-british-state-has-lost-the-argument
4•hackandthink•28m ago•0 comments

Show HN: The Economic Atlas: a data-first dashboard for comparing countries

https://theeconomicatlas.com/
1•economicatlas•29m ago•0 comments

Azriel Blackman, Airline Mechanic for 80 Years, Dies at 100

https://www.nytimes.com/2026/08/29/us/azriel-al-blackman-dead.html
1•cainxinth•30m ago•0 comments