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?

Show HN: SAFi, OS sandboxing and deterministic policy gating for local AI agents

https://github.com/jnamaya/SAFi
1•jnamaya•1m ago•0 comments

Show HN: Create a system prompt tailored for how your mind works

https://writtenfor.me
1•mox-1•3m ago•0 comments

Show HN: LLM API prices, each with the quote, page and date it was read from

https://aisignalhq.com/api-pricing/
1•alvarolucero•4m ago•0 comments

AI Is looking to hack you don't be the victim

https://repocheck.app/
1•PatsTools•4m ago•1 comments

RISC isn't about instruction set cleanness (size or redundancy)

https://wareya.wordpress.com/2026/04/05/opinion-rant-risc-isnt-about-instruction-set-size/
1•arvyy•5m ago•0 comments

Ofcom announces UK hit 90% Gigabit availability in July 2026

https://www.thinkbroadband.com/news/ofcom-announces-uk-hit-90-gigabit-availability-in-july-2026
2•ksec•5m ago•0 comments

I regret buying the Onyx BOOX Color 7 Gen 2

https://gardinerbryant.com/i-regret-buying-the-onyx-boox-color-7-gen-2/
1•surprisetalk•5m ago•0 comments

Naval Architecture (2021)

https://ciechanow.ski/naval-architecture/
2•AlenaSato•7m ago•0 comments

Show HN: MCP Inspector Web, the MCP inspector that is a link

https://github.com/JM-Lab/mcp-inspector-web
1•hjm1980•7m ago•0 comments

Interwebs Intermaps – an art-history-style map of web design, 1991–2026

https://interwebs-intermaps.com/
1•ceciliafurlan•8m ago•0 comments

Chrome patches 21 critical vulnerabilities, Claude found 10

https://www.techzine.eu/news/security/146229/chrome-patches-21-critical-vulnerabilities-claude-fo...
1•choult•8m ago•0 comments

Earth just spent a full week above 2° C of warming for the first time

https://insideclimatenews.org/news/30112026/november-warmest-global-temperatures/
1•Aryon111•9m ago•0 comments

Tilia: The little tree that grew

https://markkarpov.com/post/tilia-the-little-tree-that-grew.html
1•ibobev•9m ago•0 comments

Master of Magic – An AmigaOS 68k port of a classic Microprose Strategy game

https://www.indieretronews.com/2026/12/master-of-magic-amigaos-68k-port-of.html
2•ibobev•10m ago•0 comments

Windows 11 on Arm for Rockchip RK3576 boards: open UEFI, Mali GPU driver

https://github.com/gahingwoo/woa-rk3576
1•milali•10m ago•0 comments

Ops Needs Friction

https://www.jeffgeerling.com/blog/2026/ops-needs-friction/
1•TanZeng•13m ago•0 comments

Show HN: EvenThen – Yet Another Timer

https://eventhen.pages.dev/
1•zerocinante•13m ago•0 comments

Database Zoo: pre-populated Docker images of OpenStreetMap regions and US states

https://www.baseshift.com/dbzoo
1•habeanf•14m ago•0 comments

AutoCAD-CS: Counter-Strike 1.6 running inside AutoCAD

https://github.com/mihonder/AutoCAD-CS/blob/staging/README.en.md
1•Diraan•14m ago•0 comments

VBulletin2Shell

https://vbulletin2shell.com/
2•dduarte•16m ago•0 comments

Billion-Scale Molecule Search Without Fingerprints or Embeddings

https://www.unum.cloud/blog/search-billion-molecules-without-embeddings
1•ashvardanian•18m ago•1 comments

Erector Set Inventor Inspired Kids' Inner Engineers

https://spectrum.ieee.org/erector-set-inventor
1•rbanffy•19m ago•0 comments

Firefox OS

https://en.wikipedia.org/wiki/Firefox_OS
1•ksec•19m ago•0 comments

Asbestos in the air: Russian strikes spark fears of hidden health crisis

https://www.bbc.com/news/articles/cmedqgwegjzqo
2•osivertsson•19m ago•0 comments

AWS Greenlight Uses Formal Logic to Constrain AI Agents

https://spectrum.ieee.org/aws-greenlight-formal-logic-agents
1•rbanffy•20m ago•0 comments

Advent of Code 2026 Solutions in LLVM IR and AMD64 ASM

https://github.com/rfgplk/aoc26
1•rfgplk•20m ago•0 comments

Google prepares Gemini 4 Live for public release this week

https://cryptobriefing.com/google-gemini-4-live-public-release/
1•yackrru•20m ago•0 comments

Command-line JSON filtering at 20 GB/s

https://lemire.me/blog/2026/11/25/command-line-json-filtering-at-20-gb-s/
1•Letterui•20m ago•0 comments

A Correctness Approach for Modern Systems Software

https://brooker.co.za/blog/2026/11/30/correctness.html
2•gavide•21m ago•0 comments

Flux holds a garment's detail: announcing TEXTUR 1 with Graswald AI

https://bfl.ai/blog/textur1-graswald
1•leumon•22m ago•0 comments