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•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?

Addressing GitHub's recent availability issues

https://github.blog/news-insights/company-news/addressing-githubs-recent-availability-issues-2/
2•mvdtnz•4m ago•0 comments

Plenty of Hours in the Day

https://www.wsj.com/arts-culture/books/big-time-review-plenty-of-hours-in-the-day-d3744c1a
1•lxm•4m ago•0 comments

Show HN: Kheeper, a registry designed for bootable images

https://kheeper.com/
1•areed•8m ago•0 comments

Trump's Border Spending Spurs Boom in AI-Infused Surveillance

https://www.wsj.com/tech/trumps-border-spending-spurs-boom-in-ai-infused-surveillance-4714521b
1•lxm•14m ago•0 comments

America the Undammed

https://www.nytimes.com/2026/05/07/climate/america-the-undammed.html
1•lxm•15m ago•0 comments

University student arrested in Taiwan for radio hack that halted high speed rail

https://www.rtl-sdr.com/student-arrested-in-taiwan-for-using-sdr-and-handheld-radios-to-halt-four...
1•bsgamble•23m ago•0 comments

SmartScreen warnings triggered after migration from EOC. EV certs affected too

https://github.com/Azure/artifact-signing-action/issues/128
1•polywickstudio•25m ago•1 comments

Open Source Volunteer Opportunities

https://ossvolunteers.com/
1•pabs3•27m ago•0 comments

SVG Frame-by-Frame Animation Generator

https://github.com/Emasoft/svg2fbf
1•beepill•27m ago•1 comments

The Bottom-Up Building of a Language for Subleq with Text Macros

https://coe.psu.ac.th/ad/subleq/
1•ADavison2560•30m ago•0 comments

The Greatest Shot in Television: James Burke Had One Chance to Nail This Scene

https://www.openculture.com/2024/10/the-greatest-shot-in-television.html
11•susam•32m ago•2 comments

Copilot Builder enables welding with AI

https://www.millerwelds.com/products/copilot-builder-with-blue-iq-powered-by-novai
1•DarkContinent•34m ago•0 comments

University Claims Withholding Water from Data Center 'Unlawfully Discriminatory'

https://www.404media.co/university-claims-withholding-water-from-nuclear-weapons-data-center-is-u...
1•adrienne•36m ago•0 comments

I Got Tired of Rewriting Prompts So I Built This

https://github.com/Ademking/SkillPrompts
1•ademking•38m ago•0 comments

Trusted Computing Frequently Asked Questions (2003)

https://www.cl.cam.ac.uk/archive/rja14/tcpa-faq-1.0.html
1•userbinator•39m ago•0 comments

SzPredict – open seizure prediction benchmark (all 6 baselines fail)

https://github.com/hyperreal-ai/SzPredict
1•hyperreal-ai•42m ago•0 comments

Remove/replace links pointing to GNOME Calendar, and update branding

https://gitlab.com/linuxmint/pins/mint/gnome-calendar/-/work_items/1
1•prathamtharwani•44m ago•0 comments

Singapore Foreign Minister to Keynote AI Engineer Singapore

https://old.reddit.com/r/singapore/comments/1t97tnx/vivian_balakrishnan_vibe_coded_an_ai_second_b...
1•doppp•48m ago•0 comments

Making cross-platform SIMD code pleasant

https://bkaradzic.github.io/posts/typeless-simd/
1•RUI-0517•55m ago•0 comments

Today Is World Password Day

https://itnerd.blog/2026/05/07/today-is-world-password-day-2/
2•mooreds•57m ago•0 comments

BSides Austin Is on Hold

https://bsidesaustin.com/
1•bean-weevil•57m ago•0 comments

Recursive Multi-Agent Systems

https://recursivemas.github.io/
1•jonbaer•1h ago•0 comments

What can singing mice say about human speech?

https://phys.org/news/2026-05-mice-human-speech.html
1•gmays•1h ago•0 comments

Ask HN: How have you spent time outside work for the past couple of weeks?

2•alex77456•1h ago•0 comments

Up in Smoke

https://thebaffler.com/odds-and-ends/the-profession-that-does-not-exist-symposium
2•NaOH•1h ago•0 comments

Apple's privacy invading tech is likely going mainstream

https://quickthoughts.ca/posts/self-owning-ai-tech/
5•quickthoughts•1h ago•3 comments

Robot Dogs Are a Security Nightmare [video]

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

A Job at OpenAI Became the Greatest Lottery Ticket of the AI Boom

https://www.wsj.com/tech/openai-employee-stock-sales-71ed10bd
3•JumpCrisscross•1h ago•0 comments

Brain motion is driven by mechanical coupling with the abdomen

https://www.nature.com/articles/s41593-026-02279-z
1•refibrillator•1h ago•0 comments

Stack of 500: 500 Production-Tested AI Prompts

https://stackkit.gumroad.com/l/lhxxik
1•ghostreg•1h ago•0 comments