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?

Building a Local AI Workspace Inside VS Code

https://jsdevspace.substack.com/p/building-a-fully-local-ai-workspace
1•javatuts•14s ago•0 comments

In-Kernel Broadcast Optimization: Co-Designing Kernels for RecSys Inference

https://pytorch.org/blog/in-kernel-broadcast-optimization-co-designing-kernels-for-recsys-inference/
1•gmays•58s ago•0 comments

ChatGPT adoption broadened in early 2026

https://openai.com/signals/research/2026q1-update/
1•Brajeshwar•59s ago•0 comments

Company behind GLiNER model released open source model for running LLM guardrail

https://pioneer.ai/blog/gliguard-16x-faster-safety-moderation-with-a-small-language-model
1•neon_share1•1m ago•0 comments

Dependencies Are Someone Else's Attack Surface

https://quodeq.ai/blog/supply-chain-attack-surface/
1•VictorPurMar•2m ago•0 comments

AI Is Starting to Build Better AI (Recursive self-improvement)

https://spectrum.ieee.org/recursive-self-improvement
1•marojejian•3m ago•0 comments

AI overlay that stays invisible to screen recorders

1•unviewable•3m ago•0 comments

Are LLM Useful for Solo Founders

1•sinsudo•5m ago•1 comments

US budget watchdog estimates Golden Dome will cost $1.2T

https://www.reuters.com/business/aerospace-defense/us-budget-watchdog-estimates-golden-dome-will-...
2•OutOfHere•5m ago•0 comments

What Is RTSP Streaming and Why It Is Still Relevant in 2026

https://www.red5.net/blog/4-reasons-rtsp-streaming-is-still-relevant/
1•mondainx•6m ago•0 comments

Show HN: Mealplannr – turn YouTube chef videos into weekly meal plans

https://mealplannr.io
1•nullandvoid•6m ago•0 comments

GitLab Outage

https://status.gitlab.com/
1•Sparkle-san•7m ago•1 comments

New Project

https://nebulad-studios.gt.tc
1•dom_kom•7m ago•1 comments

Show HN: Awesome Stars- render github awesome list with live star/fork badges

https://awesome-stars.github.io
1•arashbehmand•8m ago•0 comments

A code (reformatting) conundrum in Python, and heuristics

https://utcc.utoronto.ca/~cks/space/blog/python/CodeFormattingBlockHeuristics
1•speckx•8m ago•0 comments

Cook a Django project well, the agent-skill take on cookiecutter

https://github.com/RobustaRush/seedkit
2•kmmbvnr_•13m ago•0 comments

Elon Musk went to court. The judge wasn't amused

https://www.washingtonpost.com/technology/2026/05/02/musk-altman-openai-trial/
2•1vuio0pswjnm7•15m ago•0 comments

French Defenestration

https://darkomulej.substack.com/p/french-defenestration
3•Darius-BC•18m ago•0 comments

Learnings from Building an Ecommerce Chatbot for a Hardware Store

https://www.tommyjepsen.com/blog/building-an-ecommerce-chatbot-for-jemfix
2•tommyjepsen•19m ago•0 comments

Ask HN: Do people still pay for simple utility tools, or use ChatGPT/Claude now?

3•kamscruz•19m ago•0 comments

High-Quality Chaos

https://daniel.haxx.se/blog/2026/04/22/high-quality-chaos/
2•akyuu•19m ago•0 comments

After extensive work with agents, the non-technical sentence is the shape I see

https://sdocs.dev/s/qtIcZCIL#k=sHoAJ4Syfkv25404v5a3Ft4gJBPZwj7aAhquWmdzDPM
2•FailMore•19m ago•0 comments

How the World Became a Casino

https://www.404media.co/how-the-world-became-a-casino/
2•Brajeshwar•20m ago•0 comments

Show HN: Game evolves itself with your wishes

https://aion.quest/
2•xkoda•21m ago•0 comments

Notepad++ v8.9.5 Release

https://notepad-plus-plus.org/news/v895-released/
3•neustradamus•22m ago•0 comments

Studio Kylemcdonald.net

https://kylemcdonald.net/
2•rolph•22m ago•0 comments

Lies, damned lies, and Elastic's benchmarks

https://www.gouthamve.dev/lies-damned-lies-and-elastics-benchmarks/
2•valyala•23m ago•0 comments

E3 started 31 years ago and gaming was never the same

https://nichegamer.com/e3-started-31-years-ago-today-and-gaming-was-never-the-same/
2•HelloUsername•25m ago•0 comments

Unauthorized Anthropic stock sales and investment scams

https://support.claude.com/en/articles/13704655-unauthorized-anthropic-stock-sales-and-investment...
3•Nrbelex•26m ago•1 comments

The Problem with "Mathematically Proven" Claims About LLMs

https://webdirections.org/blog/the-problem-with-mathematically-proven-claims-about-llms/
2•gmays•26m ago•0 comments