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

Comments

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

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

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

Meditation and Unconscious: A Buddhist Monk and a Neuroscientist (2022)

https://thereader.mitpress.mit.edu/meditation-and-the-unconscious-buddhism-neuroscience-conversat...
1•arunc•2m ago•0 comments

Do not give up your brain

https://cassidoo.co/post/good-brain/
1•gpi•3m ago•0 comments

Reality Is Breaking the "AI Revolution"

https://www.planetearthandbeyond.co/p/reality-is-breaking-the-ai-revolution
1•handfuloflight•9m ago•0 comments

Teen Jailed After Exploiting Refund Policy for $570k

https://www.vice.com/en/article/teen-jailed-after-exploiting-refund-policy-for-570000/
2•lnguyen•13m ago•0 comments

RubyShell: Ruby way to create shell scripts

https://github.com/albertalef/rubyshell
1•thunderbong•16m ago•0 comments

Ask HN: Convince me on why AI matters

1•moh20•18m ago•2 comments

New York proposal requires 3D printer manufacturers to prevent printing guns

https://www.tomshardware.com/3d-printing/new-york-state-takes-steps-to-ban-3d-printed-guns-propos...
2•josephcsible•21m ago•1 comments

Anatomy of an Excellent OpenCode Skill: Lessons from Cloudflare-Skill

https://medium.com/@jpcaparas/anatomy-of-an-excellent-opencode-skill-lessons-from-cloudflare-skil...
1•zenoware•21m ago•0 comments

The missed opportunity of constrained decoding

https://michaelorenstein.com/blog/zero-entropy-tokens/
1•killcoder•22m ago•1 comments

Show HN: I've Built a Python Playground

https://playcode.io/python-compiler
1•ianberdin•23m ago•0 comments

Trump Sets Fraudster Free from Prison for a Second Time

https://www.nytimes.com/2026/01/16/us/politics/trump-fraudster-pardon.html
1•duxup•24m ago•1 comments

Show HN: AI video generator (React output)– now with script gen and voice select

https://ai.outscal.com/
1•mayankkgrover•28m ago•0 comments

Global sports face challenges from 'AI slop' misinformation

https://www.reuters.com/sports/global-sports-face-challenges-ai-slop-misinformation-2026-01-17/
1•1vuio0pswjnm7•29m ago•0 comments

Show HN: Use Claude CLI to analyze its own protocol

https://github.com/mzhaom/claude-cli-protocol
1•keytalker•30m ago•0 comments

Counterfactual evaluation for recommendation systems

https://eugeneyan.com/writing/counterfactual-evaluation/
2•kurinikku•31m ago•0 comments

Google asks US judge to defer order forcing it to share data while it appeals

https://www.reuters.com/sustainability/boards-policy-regulation/google-asks-us-judge-defer-order-...
2•1vuio0pswjnm7•31m ago•0 comments

Anthropic opens up its Claude Cowork feature to anyone with a $20 subscription

https://www.engadget.com/ai/anthropic-opens-up-its-claude-cowork-feature-to-anyone-with-a-20-subs...
2•swolpers•39m ago•0 comments

The Pink Park Ranger Takedown: CCC vs. White Supremacy

https://canada.diplo.de/ca-en/about-us/vancouver/2751436-2751436
2•DyslexicAtheist•39m ago•2 comments

My daughter's boyfriend gave me a custom keyboard? I don't like it. What now?

1•0xWTF•41m ago•1 comments

A Nazi theorist's vision of a world divided has found a new advocate?

https://www.theguardian.com/commentisfree/2026/jan/16/nazi-theorist-vision-great-spaces-new-advoc...
1•KnuthIsGod•45m ago•0 comments

Show HN: CodeSyncer – Store AI coding context in code comments

https://github.com/bitjaru/codesyncer
1•bitjaru0402•45m ago•1 comments

I trained a 90-day weather AI on a single GPU using 150 years of data

https://github.com/consigcody94/lilith
1•sentinelowl•45m ago•1 comments

Remove Video Watermark, Logo and Subtitle

https://www.removewatermarker.com
1•ace520•45m ago•0 comments

AWS Duvet: a bidirectional link between implementation and specification

https://awslabs.github.io/duvet/
2•forks•49m ago•0 comments

Buffer Overflow in Qualcomm Snapdragon X65 Baseband

https://github.com/0verdu/X65_BufferOverflow
3•ggm•50m ago•0 comments

Open Claude Cowork Compatible with Any LLM API on Win/Linux/macOS

https://github.com/cowork-studio/OpenCowork
1•agi-hub•51m ago•0 comments

Build a Digital Clock from the 1980's

https://eightiesclock.mit.edu/
2•barishnamazov•53m ago•0 comments

Show HN: Building the ClassPass for coworking spaces, would love your thoughts

https://lans.app/
2•n0ker•57m ago•0 comments

Pesticides may drastically shorten fish lifespans, study finds

https://www.theguardian.com/environment/2026/jan/15/pesticides-shorten-fish-lifespan-study
1•breve•1h ago•0 comments

Gnome 50 Alpha Released with the X11 Code Gutted

https://www.phoronix.com/news/GNOME-50-Alpha
2•breve•1h ago•0 comments