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?

When 'if' slows you down, avoid it

https://easylang.online/blog/branchless
2•signa11•3m ago•0 comments

Agent memory that forgets and distorts on purpose

https://github.com/jbsalles/Selmem
1•Jibs79•4m ago•0 comments

IKEA Hacks and DIY Ideas – IKEA Hackers

https://ikeahackers.net
1•thunderbong•4m ago•0 comments

Forge: Go Library and CLI for Working with GitHub, GitLab, Forgejo

https://github.com/git-pkgs/forge
1•joooscha•6m ago•0 comments

Understanding Inference and the Economics of Enterprise AI

https://www.vistaequitypartners.com/insights/inference-economics-enterprise-ai/
1•nlpnerd•7m ago•1 comments

Show HN: Crew — Let Claude/Codex/OpenCode agents talk to each other

https://github.com/0xmmo/crew/
2•mmoustafa•10m ago•1 comments

Show HN: Mailward – Open Outlook PST/OST files in the browser, nothing uploaded

https://pst.aivismonitor.com
1•xsxs89757•10m ago•0 comments

A World Away from Family

https://www.ajarn.com/blogs/bangkok-phil/world-away-family
1•rzk•12m ago•0 comments

Should You Buy a ThinkPad?

https://www.rubenerd.au/should-you-buy-a-thinkpad/
2•Tomte•13m ago•0 comments

Outrageously Small Neural Networks: 6,616 tok/s on One Intel AMX Core [pdf]

https://huggingface.co/gdiamos/amx-reasoning-v1-instruct/blob/main/paper.pdf
2•gdiamos•17m ago•1 comments

AI economics. OpenAI financials leaked ahead of IPO

https://nixie.substack.com/p/ai-economics-openai-financials-leaked
1•u1hcw9nx•17m ago•0 comments

Show HN: DiskBuddy – Visualize Your Mac Storage in 8 Different Ways

https://www.diskbuddy.com
1•mohitvaswani•32m ago•0 comments

The purpose of DNS is to spread scams

https://shkspr.mobi/blog/2026/09/the-purpose-of-dns-is-to-spread-scams/
3•CoderLim110•34m ago•1 comments

Version Control Second Coming

https://psantosl.github.io/posts/version-control-second-coming/
1•sasham•39m ago•0 comments

Work hard – nobody cares how good you used to be

https://www.theguardian.com/fashion/2026/sep/07/work-hard-nobody-cares-how-good-you-used-to-be-pa...
2•teleforce•41m ago•0 comments

Show HN: Free Spotify Canvas Maker

https://www.neuralframes.com/tools/spotify-canvas-maker
1•nicollegah•44m ago•0 comments

Show HN: GPT-5.1 returned 0 bytes, שָׁרְט isn't Hebrew, AGI criterion defined

https://www.reddit.com/r/ArtificialInteligence/comments/1w9kgcl/gpt51_returned_0_bytes_gpt52_surf...
1•rayanpal_•44m ago•0 comments

Show HN: Free Song to Lyrics

https://www.neuralframes.com/tools/song-to-lyrics
1•nicollegah•44m ago•0 comments

NATO Is Losing the Information War. Here Is How to Win

https://foxandlion.pub/analysis/nato-is-losing-the-information-war.-here-is-how-to
5•agrantic•46m ago•1 comments

AI Escape Incident Tracker

https://ai-escape.watch/#registry
1•FinAck-Sec•49m ago•1 comments

Look, Mom, I pressed a button

https://galoisrepresentations.org/2026/09/05/look-mom-i-pressed-a-button/
2•robinhouston•51m ago•0 comments

The Evolution of Coding Agents

https://twitter.com/kushbhuwalka/status/2096856441063870969
1•kushbhuwalka•51m ago•0 comments

LG smart TVs caught logging audio with screen off and snooping on local devices

https://www.notebookcheck.net/LG-smart-TVs-caught-logging-audio-with-screen-off-and-snooping-on-l...
2•chris_overseas•51m ago•0 comments

Show HN: I wrote a guide to rendering video from plain HTML/CSS/GSAP

https://sidheart.gumroad.com/l/lyudd
2•SifatAhmed•51m ago•1 comments

Who Cares If AI Is Conscious–It's Basically Alive

https://www.wired.com/story/who-cares-if-ai-is-conscious-its-basically-alive/
1•joozio•52m ago•1 comments

ORM experience, Redis speed, PostgreSQL durability,functions without boundaries

https://github.com/orbsh/okm
1•orbsh•52m ago•0 comments

Show HN: Plethora, Social platform and SDK around games and interactive content

https://plethora.studio/
1•pratt3000•53m ago•2 comments

Show HN: Open-source agent memory layer, 96% on LongMemEval, local-first

https://github.com/everest-an/Awareness-Market
1•AwarenessAI•55m ago•0 comments

PC Tweaker – Windows settings with per-change restore, built in Rust

https://github.com/AurelioAvila/pc-tweaker-app
1•Aurelioavila•59m ago•0 comments

Necessist, a tool to identify broken tests

https://github.com/trailofbits/necessist
1•mkhq•1h ago•0 comments