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?

Dissecting Spring petclinic (Part 1)

https://hannomalie.github.io/posts/dissecting-spring-petclinic-blackbox-tests.html
1•ejboy•1m ago•0 comments

For Tesla owners – a whole bunch of stats from your vehicle's own telemetry

https://teslameter.teramips.com/v/demo-model-3
1•bugpower•2m ago•1 comments

Show HN: RedHands – MCP for multi-stage offensive security tools

https://github.com/yasindce1998/redhands
1•yasindce1998•2m ago•0 comments

Beating the Frontier on NetHack

https://antithesis.com/blog/2026/nethack/
1•n_u•3m ago•0 comments

RISC-V assembly course – ASM Editor

https://asm-editor.specy.app/learn/courses/risc-v
1•gurjeet•3m ago•0 comments

Building an Agentic Loop in Temporal

https://cadenya.com/handwritten/agentic-loop-in-temporal
2•btables•8m ago•0 comments

Blindsight

https://en.wikipedia.org/wiki/Blindsight
2•bryanrasmussen•10m ago•1 comments

I built an arcade within ChatGPT

https://chatgpt.com/plugins/plugin_asdk_app_6ae4d461a6d081919bef5e8d8c6516ff
1•Waseemkhalo•16m ago•1 comments

Herdr for iPhone, iPad and Android

https://herdr.dev/mobile/
1•Fabricio20•17m ago•0 comments

We tested eight new decision models. None got more right than the one we use

https://plainlamp.com/blog/new-decision-models
1•ch0I9daAiO•18m ago•0 comments

df-script – 43kB zero-dependency DataFrame engine for TypeScript and JavaScript

https://df-script.js.org/
1•trentmorristx•18m ago•0 comments

Tensor Seeks Layout: Formalizing Layout Selection for ML Compilers

https://arxiv.org/abs/2608.21555
1•matt_d•19m ago•0 comments

AI Company Employees Should Unionize

https://www.astralcodexten.com/p/ai-company-employees-should-unionize
3•JimmyBuckets•20m ago•0 comments

Building a Ethernet Switch ASIC chip

https://essenceia.github.io/projects/expresso/
1•random__duck•23m ago•1 comments

San Francisco weighs limits on self-checkout stations

https://abc7news.com/post/san-francisco-weighs-limits-checkout-stations/19990668/
2•mikhael•23m ago•0 comments

Show HN: Loft – offline Q&A over your local files, with citations (llama.cpp)

https://github.com/nwaoga/loft
1•nwaoga•25m ago•0 comments

WhatWeRun, a database of real production AI agent stacks

https://whatwerun.dev
1•jackjackstudios•25m ago•0 comments

Films, shows, and games to grow up with

https://www.satmornings.com
1•vldx•27m ago•0 comments

Wojak-Bench 3D: Which AI is best at 3D printing?

https://wojak-bench.dev.pion.dev/
1•lukaspetersson•34m ago•0 comments

Rows vs. Columns: How different are they, really?

https://spiraldb.com/blog/rows-vs-columns
2•skadamat•36m ago•0 comments

Show HN: Radiotherapy Delivery Demo Written in Rust and WebAssembly

https://tps.neuralrad.com
2•coolwulf•37m ago•1 comments

October Outage: Technical Overview

https://www.revolut.com/blog/post/20octoutagetechnicaloverview/
2•un_montagnard•38m ago•0 comments

MergeAtlas: Turn PRs into a Map of Cards

https://github.com/ismayilkarimli/MergeAtlas
1•ismayilkarimli•39m ago•1 comments

My agent org speedran a company

https://perfloop.ai/blog/my-agent-org-speedran-a-company
3•tsenart•40m ago•0 comments

Tuberculosis rapid test allows in-the-field results

https://news.northwestern.edu/stories/2026/11/tuberculosis-rapid-test-allows-in-the-field-results
2•gmays•43m ago•0 comments

Dartmouth (Guarini) will not admit math PhD cohort this year

https://www.thedartmouth.com/article/2026/11/gandhi-fagell-guarini-will-not-admit-math-ph-d-cohor...
2•sebg•44m ago•0 comments

Customer success job postings: adoption in 78%, churn in 14%

https://resumefitting.com/customer-success-job-description-keywords
2•dailyworkaholic•44m ago•0 comments

Proof of Corn (2026)

https://proofofcorn.com/dashboard
1•StilesCrisis•47m ago•2 comments

Lego ZX Spectrum

https://ideas.lego.com/product-ideas/1113841c-596d-4f28-be4a-367cc83e8ed1
2•maverick74•48m ago•0 comments

Show HN: Smart Node, a self-hosted crew of AI agents for a small business

https://github.com/dklymentiev/smart-node
1•klmdev•49m ago•0 comments