frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•7mo ago

Comments

nine_k•7mo 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•7mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•7mo ago
They mention this in the article.
spockz•7mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•7mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•7mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•7mo 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•7mo 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•7mo 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•7mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•7mo ago
This was very well written. Excellent article!
NetOpWibby•7mo ago
Is this like MessagePack for Haskell?

Italian ship stopped in France: had malware on board

https://en.ilsole24ore.com/art/italian-ship-detained-france-had-malware-on-board-detained-two-peo...
1•N19PEDL2•2m ago•0 comments

Humans are now the minority online

https://www.euractiv.com/opinion/humans-are-now-the-minority-online/
2•timeon•3m ago•0 comments

I wrote JustHTML using coding agents

https://friendlybit.com/python/writing-justhtml-with-coding-agents/
1•nkko•4m ago•0 comments

The effects of antidepressants on cardiometabolic and other parameters

https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(25)01293-0/fulltext
1•heisenbit•7m ago•0 comments

Bringing Visual Analogies to AI

https://www.unite.ai/bringing-visual-analogies-to-ai/
1•50kIters•7m ago•0 comments

The effects of antidepressants on cardiometabolic and other parameters

1•heisenbit•8m ago•0 comments

Nano Banana API

https://nanobananaapi.dev/
1•horatio_li•12m ago•1 comments

Show HN: SynapseMD AI scribe and document generation for healthcare

https://www.synapsemd.app/en-US
1•senti_sentient•16m ago•0 comments

AI and Gnome Shell Extensions

https://blogs.gnome.org/jrahmatzadeh/2025/12/06/ai-and-gnome-shell-extensions/
1•pauloxnet•16m ago•0 comments

High-Speed On-Chip Photonic Memory and Compute Systems

https://arxiv.org/abs/2503.19544
1•beardyw•16m ago•0 comments

SeL4 is a formally verified operating system

https://sel4.systems/
1•logicallee•18m ago•1 comments

TLA+ Modeling Tips

http://muratbuffalo.blogspot.com/2025/12/tla-modeling-tips.html
1•birdculture•19m ago•0 comments

US threatens EU digital services market access

https://twitter.com/ustraderep/status/2000990028835508258
5•heisenbit•21m ago•0 comments

Show HN: Motie – Replit for Web Scraping

https://app.motie.dev
1•jb_hn•22m ago•0 comments

The Budget Inflation Myth: A Timeline Debunking

https://rodgercuddington.substack.com/p/the-budget-inflation-myth-a-timeline
1•freespirt•22m ago•0 comments

My conversation with James Dyson [video]

https://www.youtube.com/watch?v=Se64B8TKfjA
1•simonebrunozzi•23m ago•0 comments

KDE Ni OS Is a Playful Take on Immutable Linux Built on NixOS

https://linuxiac.com/kde-ni-os-is-a-playful-take-on-immutable-linux-built-on-nixos/
1•todsacerdoti•24m ago•0 comments

(part 2) unsevering Claude to my codebase, attempting persistent memory

1•blas0•26m ago•0 comments

20k Issues on GitHub

https://daniel.haxx.se/blog/2025/12/16/20000-issues-on-github/
1•HieronymusBosch•29m ago•0 comments

Show HN: Shipped Wan 2.6 (Image-to-Video and Text-to-Video) on FreyaVideo

https://freyavideo.com/
1•howardV•30m ago•0 comments

U.S. Military Willing to Attack "Designated Terrorist Organizations" in America

https://theintercept.com/2025/12/16/trump-domestic-attack-dtos/
1•sipofwater•33m ago•1 comments

Extending ts-Wolfram: dropping OOP, kernel/userspace interop, better printing

https://www.spakhm.com/ts-wolfram-ext
1•lioeters•38m ago•0 comments

P: Formal Modeling and Analysis of Distributed (Event-Driven) Systems

https://github.com/p-org/P
1•Davidbrcz•43m ago•0 comments

Ask HN: Anyone else hitting Claude Code Pro limits after 1 or 2 prompts?

1•lobito25•47m ago•1 comments

The Farmers' Inheritance Tax Crisis

https://rodgercuddington.substack.com/p/the-farmers-inheritance-tax-crisis
1•freespirt•47m ago•0 comments

SWE Career Advice

1•analogwatcher•48m ago•0 comments

UG-3: A digital Petri dish Synthesizer. (WebGPU)

https://www.particlesynth.studio/
1•yamsasson•49m ago•1 comments

Ground Effect

https://en.wikipedia.org/wiki/Ground_effect_(cars)
1•simonebrunozzi•52m ago•0 comments

Qjp – turn any JSON file into a quick TUI menu

https://github.com/plainas/qjp
1•todsacerdoti•55m ago•0 comments

DailyBoard – With a Unique Queue Logic

https://dailyboard.xyz/
1•niyoseris•55m ago•1 comments