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•9mo ago

Comments

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

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

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

Tim Cook Attended Melania's Movie Screening. Apple Customers Want a Boycott

https://wealthofgeeks.com/tim-cook-attended-melanias-movie-screening-apple-customers-are-calling-...
1•antfarm•1m ago•0 comments

Show HN: AI Compass:Daily AI Search Signals and Trends

https://theaidirection.com/
1•funcin•3m ago•0 comments

Scalable Machine Learning and Deep Learning

https://id2223kth.github.io/
1•teleforce•4m ago•0 comments

Writing a C Compiler in Clojure (2024)

https://shagunagrawal.me/writing-a-c-compiler-in-clojure/
1•alhazrod•7m ago•0 comments

Show HN: Resume Optimization Based on JDs

https://www.cvcomp.com
1•Prashasthajain•10m ago•0 comments

Who Uses LLMs?

https://neonvagabond.xyz/articles/who-uses-llms.html
1•shawndumas•12m ago•1 comments

Open-Source AI Audit Readiness Kit for Startups

https://github.com/GK-Edge/AI-Audit
1•Manos_Koulouris•12m ago•1 comments

When the Disclosure Committee Cannot Reconstruct the Record

https://www.aivojournal.org/when-the-disclosure-committee-cannot-reconstruct-the-record/
1•businessmate•14m ago•1 comments

Discover the Most Famous Landmarks

https://famous-landmarks.com/
1•songtianlun1•15m ago•0 comments

Show HN: Bytepiper – turn .txt files into live APIs

https://www.bytepiper.com
1•DhirajKadam27•17m ago•0 comments

The Holy Grail of Linux Binary Compatibility: Musl and Dlopen

https://github.com/quaadgras/graphics.gd/discussions/242
1•Splizard•21m ago•0 comments

Errors as Values in TypeScript

https://errore.org/
2•SouravInsights•22m ago•1 comments

Qualcomm CEO pockets 15% pay rise as profits fall 45%

https://www.theregister.com/2026/01/23/qualcomm_ceo_pay/
2•pjmlp•28m ago•0 comments

Trump Filter Chrome Extension

https://trumpfilter.com/
1•darktoto•29m ago•0 comments

Sorry

2•fainpul•30m ago•2 comments

Handling Long Branches

https://maskray.me/blog/2026-01-25-handling-long-branches
2•ingve•32m ago•0 comments

The end of the curl bug-bounty

https://daniel.haxx.se/blog/2026/01/26/the-end-of-the-curl-bug-bounty/
5•mmsc•34m ago•0 comments

Allowlist for .gitignore

https://blog.izissise.net/posts/gitignoreallowlist/
2•ingve•34m ago•0 comments

From zero traffic to launching my own independent news platform

1•ironspidex•34m ago•0 comments

'There's no other poem like it': Why this Robert Burns classic is a masterpiece

https://www.bbc.com/culture/article/20260122-why-this-robert-burns-poem-is-a-masterpiece
3•breve•35m ago•0 comments

Welcome to the "Email Expiration Date" Initiative

https://www.zerocarbon.email/
3•birdculture•36m ago•0 comments

Show HN: Image to 3D AI Generator – Instant 3D Models from Photos

https://heydream.im/image-to-3d/
2•HeyDream_AI•40m ago•0 comments

Ubuntu Pro subscription – should you pay to use Linux?

https://optimizedbyotto.com/post/ubuntu-pro-subscription-pay-for-linux/
3•ottoke•41m ago•3 comments

A Post-American, Enshittification-Resistant Internet [video]

https://www.youtube.com/watch?v=39jsstmmUUs
2•anhner•42m ago•0 comments

Show HN: Blockframe v1.0.3 Released

2•DeusCodex•46m ago•1 comments

A Comprehensive Guide for Backing Up Apple Notes on Your Mac

https://appledispatch.substack.com/p/comprehensive-guide-for-backing-up-apple-notes
2•simonebrunozzi•47m ago•0 comments

Ask HN: Which features are you searching in an AI assistant?

1•ProtosGalaxias•48m ago•1 comments

The ungentle joy of spider sex [2020]

https://knowablemagazine.org/content/article/living-world/2020/the-ungentle-joy-spider-sex
2•joebig•52m ago•0 comments

Library of Congress issues RFP for web harvesting services

https://sam.gov/workspace/contract/opp/a2c5551af2b74c3d84c775032c83a55e/view
1•mellosouls•56m ago•0 comments

Attempting to rebuild Ramp's background agent system in a weekend (on a Mac VM)

https://eliot.blog/p/attempting-to-rebuild-ramps-background
1•ea016•57m ago•0 comments