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?

Steam Machine Game Testing

https://www.lttlabs.com/articles/2026/06/22/the-newell-nucleus-steam-machine-ltt-companion-article
1•LabsLucas•1m ago•0 comments

Iris – A portable runtime for durable AI agents

https://github.com/xoai/iris
1•xoai•1m ago•0 comments

Show HN: Block/buzz: a workspace built for teams of humans and agents

https://github.com/block/buzz
2•ThomPete•1m ago•1 comments

Geometry of causal set theory with physics implications

https://docs.google.com/document/d/1yYXSX_XssHXV5msGj2eC74fs6P2PG_sL/edit
1•Darktidemage•2m ago•1 comments

Angeldust – a solo-built voxel world that runs on everything [video]

https://www.youtube.com/watch?v=zssnlbRibFM
1•coolwulf•3m ago•0 comments

Does AI have a UI/UX problem?

https://twitter.com/PereraBinoy/status/2068432457234513955
1•adisingh13•3m ago•0 comments

Daybreak: Tools for securing every organization in the world

https://openai.com/index/daybreak-securing-the-world/
1•tabletcorry•4m ago•0 comments

A Glimpse into the "Search Your Target" Market for Stolen Credentials

https://www.bleepingcomputer.com/news/security/a-glimpse-into-the-search-your-target-market-for-s...
1•Brajeshwar•5m ago•0 comments

A 10-person team cut median cycle time from 72 to 27 hours in 30 days

https://www.poggle.ai/blog/engineering-productivity-case-study
1•Ghostcrawl3r•6m ago•0 comments

Meta's Crawler Ate My 2TB Bandwidth

https://www.rodneyosodo.com/blogs/2026-06-22_metas_crawler_ate_my_2TB_bandwidth
1•rodneyosodo•7m ago•1 comments

Steam Machine 512GB

https://store.steampowered.com/sub/1629447/
9•Philpax•7m ago•0 comments

A viral doomsday scenario aims to shake Europe out of its AI complacency

https://www.theguardian.com/technology/2026/jun/20/europe-sleepwalking-ai-disaster-us-china
2•gmays•8m ago•0 comments

Steam Machine

https://store.steampowered.com/hardware/steammachine
12•theschwa•8m ago•3 comments

Blogger Defeats Photographer's Copyright Claim-Sokolskyfilm vs. Messiah

https://blog.ericgoldman.org/archives/2026/06/blogger-defeats-photographers-copyright-claim-sokol...
4•speckx•12m ago•0 comments

Unit Tests for a Novel

https://worldfall.ink/blog/
4•isobelvane•12m ago•0 comments

My journey of making my first-ever circuit

https://medium.com/@khwajamaazahmedsiddiqi/my-journey-of-making-my-first-ever-circuit-4f1de935fecd
2•pknerd•12m ago•0 comments

The Download: record-breaking subsea tunnels and flexible data centers

https://www.technologyreview.com/2026/06/22/1139385/the-download-rogfast-subsea-tunnel-flexible-d...
2•joozio•14m ago•0 comments

Europe faces rising competition for energy from Asia

https://www.politico.eu/article/every-man-for-himself-europe-warned-of-rising-competition-for-ene...
3•alephnerd•14m ago•0 comments

Tata Electronics cyber breach claiming to expose Apple, Tesla trade secrets

https://www.yahoo.com/news/world/articles/indias-tata-electronics-hit-cyber-153155513.html
5•Hypathia•15m ago•1 comments

Show HN: Loqi, a "local-first" translation tool using Ollama/llama.cpp

https://github.com/danterolle/loqi
2•danterolle•16m ago•0 comments

Show HN: React Native Boost – swaps RN's Text/View wrappers for native ones

https://github.com/kuatsu/react-native-boost
3•mfkrause•17m ago•1 comments

It Was Always Email

https://www.primitive.dev/blog/it-was-always-email
5•mymx•18m ago•0 comments

Plans for battery swapping Electric trucks in UK

https://www.independent.co.uk/cars/electric-vehicles/battery-swap-for-electric-trucks-octopus-cat...
4•lonelyasacloud•19m ago•1 comments

The Probability Index: Passive exposure to the market portfolio of probabilities

https://predmarketindex.com/
2•JV00•23m ago•0 comments

The Optimal Amount of Slop Is Non-Zero

https://www.slater.dev/2026/06/the-optimal-amount-of-slop-is-non-zero/
5•sltr•23m ago•0 comments

AMD releases FSR 4.1 upscaling for older graphics cards

https://www.theverge.com/news/953664/amd-fsr-4-1-upscaling-rx-7000-series-gpus-rdna-3
3•saghm•24m ago•0 comments

Absolute State of Unreal 2026

https://www.joewintergreen.com/absolute-state-of-unreal-2026/
3•gafferongames•26m ago•0 comments

Show HN: Vivijure – Self-hosted AI film studio on your own GPU (AGPL)

https://github.com/skyphusion-labs/vivijure
2•skyphusion•27m ago•0 comments

Mexico Just Showed Off a New Cheap, Government-Backed EV

https://gizmodo.com/mexico-just-showed-off-a-new-extremely-cheap-government-backed-ev-2000769080
8•speckx•29m ago•0 comments

Stop Slopping Your Skills

https://rahulbaboota.substack.com/p/stop-slopping-your-skills
2•RahulBaboota•30m ago•0 comments