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?

Patrick Stewart's First TV Appearance

https://www.youtube.com/watch?v=FUwYwJ2DT_I
1•nephihaha•49s ago•0 comments

A step-by-step guide for how to kill the line-by-line code review

https://thenewstack.io/ai-code-review-invariants/
1•tonkkatonka•2m ago•0 comments

Show HN: Trail Commons – A new open map of mountain bike trails

https://trailcommons.app/posts/announcing-trail-commons
1•kennethtransier•3m ago•0 comments

Show HN: HN Atlas – Discover useful tools built around HN

https://hn-atlas.bensontech.dev/
1•informal007•5m ago•0 comments

SLAC researchers find proof of altermagnetism, a new magnetic phase

https://www6.slac.stanford.edu/news/2026-10-29-slac-researchers-find-proof-altermagnetism-new-mag...
1•gmays•6m ago•0 comments

Can't fish Ethernet? Use "invisible" fiber instead

https://momandpop.network/2026/11/02/cant-fish-ethernet-use-invisible-fiber-instead/
2•_mpn_•6m ago•0 comments

How to configure programming language detection and summary statistics for Forge

https://forgejo.org/docs/latest/user/repository/language-detection/
1•fanf2•7m ago•0 comments

BYD sold more EVs last month than the US did all quarter, topping 300,000

https://electrek.co/2026/11/02/byd-sold-more-evs-last-month-than-the-us-did-all-quarter/
10•cisc•10m ago•0 comments

The Ford Privacy Promise: You're in Control of Your Data

https://www.fromtheroad.ford.com/us/en/articles/2026/introducing-the-ford-privacy-promise
3•KoftaBob•12m ago•1 comments

Tender bond between male donkey and bull baffles scientists

https://www.theguardian.com/science/2026/nov/02/tender-bond-male-donkey-bull-baffles-scientists
1•sandebert•13m ago•0 comments

AI × Hiring

https://worklabs.sh
1•vzhou842•14m ago•0 comments

DGX Model Manager

https://github.com/nikghodki/dgxmodelmanager
1•nikghodki•14m ago•0 comments

Lyngvi – A Hardened Sandbox for AI

https://lyngvi.skaperiet.no
1•joachimhs•17m ago•0 comments

Show HN: ChatGPT sees something else in this image

https://gavin.wtf/blog/chat-gpt-cant-see-this/
2•gavino•18m ago•0 comments

Ask HN: Does anyone enjoy work anymore?

1•jackmalpo•18m ago•1 comments

Fossilised red blood cells found in 115M-year-old dinosaur's bone

https://www.theguardian.com/science/2026/nov/02/fossilised-red-blood-cells-aratasaurus-dinosaurs-...
2•Archelaos•22m ago•0 comments

Show HN: SignalScoop – turn customer messages into product insights

https://www.signalscoop.app/
1•brightvegetable•23m ago•0 comments

Measuring Taste – Reinforcement Learning with Neural Feedback

https://sabi.com/blog/measuring-taste
1•pedalpete•25m ago•0 comments

Oracle taps investors for $20B to finance AI expansion

https://www.reuters.com/business/oracle-offer-10-billion-bonds-2026-11-02/
5•rurp•25m ago•3 comments

A Decade of Kill Bugs

https://alangrow.com/blog/a-decade-of-kill-bugs
1•sigil•27m ago•0 comments

Show HN: I Built an HVAC Load Calculator Manual J

https://apps.apple.com/us/app/hvac-load-calculator-manual-j/id6824263129
1•yassinerajallah•28m ago•0 comments

Repobs – A local dashboard to manage agent worktrees and branches

https://chengxuan-li.github.io/repobs/
1•lcx•28m ago•1 comments

Rust Playground but it compiles locally in the Browser

https://ryancbuckley.github.io/rust-playground-inbrowser-site/
2•nasso_dev•29m ago•1 comments

I built a live election dashboard using Conformalized Quantile Regression

https://www.midtermslive.com/
2•eufelipemorenob•30m ago•0 comments

Which Chinese movies can you understand? 117 films ranked by HSK level

https://mandarinthewild.com/chinese-movies-by-level
1•MandarinTheWild•30m ago•0 comments

Leaflet 2.0 Beta

https://github.com/Leaflet/Leaflet/releases/tag/v2.0.0-beta.1
3•yurivish•31m ago•0 comments

100% accurate next token prediction model

https://huggingface.co/xendoo/sorted-tiny-llama
1•xendo•31m ago•1 comments

Ask HN: Executor Project Manager

1•samdalton•34m ago•0 comments

Show HN: A 20-line kernel that fixes float32 variance under XLA

https://github.com/tatopenn-cell/Dense-Armor
1•tatopenn•35m ago•0 comments

Salary Transparency

https://matthewsanabria.com/salary/
1•hbcdbff•39m ago•0 comments