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?

Show HN: OdinForge – Breach simulation that chains vulns into attack paths

https://www.odinforgeai.com/demo/breach-chain
1•Doc_Dre•26s ago•0 comments

We built our startup infra on FreeBSD in 2026

https://old.reddit.com/r/freebsd/comments/1r7mp9n/we_built_our_entire_startup_infra_on_freebsd_in/
1•enz•4m ago•0 comments

pg_ash: Active Session History for PostgreSQL wait event sampling

https://github.com/NikolayS/pg_ash
1•tanelpoder•4m ago•0 comments

How persistent is the inference cost burden?

https://epochai.substack.com/p/how-persistent-is-the-inference-cost
1•gmays•5m ago•0 comments

Windows 99

https://win99.dev
1•keepamovin•6m ago•0 comments

Study: Respiration patterns during sleep crucial to memory consolidation

https://www.nature.com/articles/s41467-023-43450-5
2•heresie-dabord•6m ago•0 comments

Ten Candles

https://cavalrygames.com/ten-candles-info
1•LambdaComplex•9m ago•0 comments

AI Story Generator with Pictures

https://www.genstory.app/ai-story-generator
1•RyanMu•9m ago•0 comments

Pentagon might ask contractors to certify they don't use Anthropic's Claude

https://www.wsj.com/politics/national-security/woke-ai-spat-escalates-between-pentagon-and-anthro...
4•fortran77•10m ago•1 comments

RageDetector – detects aggressive typing and forces me to calm down

https://github.com/AI-Architechs/RageDetector
2•karan_dev•16m ago•1 comments

Lentando Private Habit Tracker

https://frankforce.com/lentando-%f0%9f%90%a2-private-habit-and-substance-tracker/
1•memalign•20m ago•0 comments

Why Europe doesn't have a Tesla

https://worksinprogress.co/issue/why-europe-doesnt-have-a-tesla/
1•trojanalert•20m ago•1 comments

SnkvDB – Single-header ACID KV store using SQLite's B-Tree engine

https://github.com/hash-anu/snkv
1•usefulcat•21m ago•0 comments

Software Engineering in 2026

https://twitter.com/Adityapandeydev/status/2023620303126229276
1•keepamovin•21m ago•1 comments

Ask HN: Is the definition of AI that it can fool people?

2•WhatsTheBigIdea•23m ago•1 comments

Choose Your Fictions Well (2010)

http://henryjenkins.org/blog/2010/04/choose_your_ficitons_well.html
1•1970-01-01•23m ago•0 comments

Tell HN: Google Allegedly Sent NSFW "Grok" Notification to People

1•surprisetalk•23m ago•0 comments

If AI Agents Do the Work, Who Pays for the Seat?

https://www.linkedin.com/pulse/ai-agents-do-work-who-pays-seat-c-max-magee-eygwe
2•wawayanda•34m ago•0 comments

Agent Skills Hub – Security first directory for AI agent skills and MCP

https://agentskillshub.dev/
1•cana2026•36m ago•0 comments

Show HN: TerminalRant – Mastodon for developers who live in the terminal

https://github.com/CrestNiraj12/TerminalRant
1•crestniraj•41m ago•0 comments

Show HN: QuickStaging – AI virtual staging tool built by a 19yo student

https://getquickstaging.com
1•kadiran•43m ago•1 comments

From Claude Code to Figma

https://www.figma.com/blog/introducing-claude-code-to-figma/
1•msolujic•47m ago•0 comments

Wi-Fi 7's Best Feature Doesn't Work (Yet) [video]

https://www.youtube.com/watch?v=-5o_Qu3XToQ
1•pss314•50m ago•0 comments

Show HN: StatusPing – Uptime monitoring for $9/mo

https://statusping.dev
1•pdtech_apps•52m ago•1 comments

Pidgin Plugins

https://pidgin.im/plugins/
1•xnx•53m ago•0 comments

How the Olympics Are Mixed Live 4k Miles Away [video]

https://www.youtube.com/watch?v=ZAJSaN8Z3Ik
1•geerlingguy•1h ago•0 comments

Meshcore IRC Bridge

https://github.com/daniel-j-h/meshcore-irc-bridge
1•rickcarlino•1h ago•0 comments

Copper-rs the deterministic OS for robotics gets full observability

https://www.copper-robotics.com/whats-new/unlock-full-observability-with-copper-rs-v013
2•gbin•1h ago•0 comments

Show HN: Verified 16.7M Mac chip architecture on $60 Android phone

2•jltackett•1h ago•0 comments

Multi-Language MCP Server Performance Benchmark

https://www.tmdevlab.com/mcp-server-performance-benchmark.html
1•oshanz•1h ago•1 comments