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

Comments

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

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

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

Show HN: I built an open-source analytics platform for Claude Code sessions

https://github.com/ConfabulousDev/confab-web
1•jjak82•29s ago•0 comments

People living in UK's poorest areas have less diverse gut bacteria, study finds

https://www.theguardian.com/society/2026/feb/24/people-living-in-uks-poorest-areas-have-less-dive...
1•beardyw•1m ago•0 comments

Housing: Rent vs. Buy Calculator Spreadsheet

https://longviewy.com/rent-vs-buy-spreadsheet-using-five-key-inputs/
1•josephcs•1m ago•0 comments

I built a 151k-node GraphRAG swarm that autonomously invents SDG solutions

1•wisdomagi•1m ago•0 comments

Regex is dead. We replaced it

https://matchlang.com
2•hollowsolve•4m ago•2 comments

OpenaAI: Disrupting malicious uses of our models [pdf]

https://cdn.openai.com/pdf/df438d70-e3fe-4a6c-a403-ff632def8f79/disrupting-malicious-uses-of-ai.pdf
1•defly•5m ago•0 comments

The age of flat pack code

https://ilearnt.com/blog/flatpackcode/
1•speckx•5m ago•0 comments

Ralph Wiggum Explained: Stop Telling AI What You Want – Tell It What Blocks You

https://platform.uno/blog/ralph-wiggum-explained-stop-telling-ai-what-you-want-tell-it-what-block...
1•e12e•5m ago•0 comments

Show HN: Relay – SMS API for developers (send your first text in 2 min)

1•danielkdewar•6m ago•0 comments

Adonisjs v7 released (Next.js alternative)

https://adonisjs.com/blog/v7
1•danfritz•6m ago•0 comments

You Just Need Postgres

https://youjustneedpostgres.com/
1•olucasandrade•6m ago•1 comments

Show HN: A minimal Claude Code clone written in Rust

https://github.com/keon/mini-claude-code
1•kwk236•9m ago•0 comments

Typing Fun Game

https://kwerty.site
1•soexya•9m ago•0 comments

Smartphones, Online Music Streaming, and Traffic Fatalities

https://www.nber.org/papers/w34866
1•speckx•9m ago•0 comments

Secria Mobile – Post-quantum encrypted email, now on iOS and Android

https://secria.me
1•adrianmav•10m ago•1 comments

Show HN: 20x – Open-source agent orchestrator for Linear/HubSpot tasks

https://github.com/peakflo/20x
2•dmitryv•11m ago•0 comments

Nobody Trusts Anybody Anymore

https://yourbrainonmoney.substack.com/p/low-trust-society-cost
1•lemonberry•12m ago•0 comments

Tell HN: YouTube Subscription page is being deprecated

1•csours•13m ago•1 comments

Any Open Source Contributors?

https://github.com/Shantanugupta43/SuggestPilot
1•shaanuknow•15m ago•1 comments

Show HN: Ask a graph database questions in plain English (runs in the browser)

https://cogdb.io/playground
1•am3141•16m ago•0 comments

Half of the side projects from HN make less than $1000 a month (2024-2025)

https://indielaunches.com/indie-maker-analytics-2024-2025-projects/
1•s-stude•16m ago•2 comments

Palo Alto's $400M scanner labels 91% of confirmed OpenClaw threats safe

https://oathe.ai/engineering/we-audited-1620-ai-agent-skills/
5•riyadaftary•17m ago•2 comments

Show HN: OnGarde – Runtime content security proxy for self-hosted AI agents

1•antimaterial•17m ago•0 comments

Show HN: SAIA – SCUMM for AI Agents

https://github.com/serendip-ml/llm-saia/blob/main/docs/INTRO.md
1•serendip-ml•19m ago•1 comments

SF Vibe House

https://www.sfvibehouse.com/
2•sahin•20m ago•0 comments

Palm OS User Interface Guidelines [pdf, 2003]

https://cs.uml.edu/~fredm/courses/91.308-spr05/files/palmdocs/uiguidelines.pdf
6•spiffytech•20m ago•1 comments

Show HN: SkillFortify, a formal verification for AI agent skills

https://github.com/varun369/skillfortify
1•varunpratap369•20m ago•2 comments

Microbial system to convert CO₂ into eco-friendly butanol

https://phys.org/news/2026-02-microbial-eco-friendly-butanol.html
1•PaulHoule•21m ago•0 comments

How to Close a Diamond Mine in the Northwest Territories

https://thewalrus.ca/how-to-close-a-diamond-mine-in-the-northwest-territories/
2•pseudolus•21m ago•0 comments

Anthropic is both too dangerous to allow and essential to national security

https://www.theargumentmag.com/p/anthropic-is-somehow-both-too-dangerous
1•ctoth•22m ago•0 comments