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?

AI code analysis is getting good

https://hachyderm.io/@mitchellh/115810614410324976
1•sashk•59s ago•0 comments

Stop Chatting with AI. Start Loops (Ralph Driven Development)

https://lukeparker.dev/stop-chatting-with-ai-start-loops-ralph-driven-development
1•ghuntley•11m ago•0 comments

Logarithmic Scales of Pleasure and Pain (2019)

https://forum.effectivealtruism.org/posts/gtGe8WkeFvqucYLAF/logarithmic-scales-of-pleasure-and-pa...
1•eatitraw•12m ago•0 comments

LLMs for Medical Practice: Look Out

https://www.science.org/content/blog-post/llms-medical-practice-look-out
3•xigoi•12m ago•0 comments

TidesDB – A Modern RocksDB Replacement [video]

https://www.youtube.com/watch?v=gkxTqd_LaCQ
1•alexpadula•13m ago•0 comments

Porting Graph:Easy to TypeScript with GPT-5.2 and Azad

https://tomisin.space/projects/graph-easy-ts/
1•AntiRush•14m ago•0 comments

Ask HN: How does an indy website integrate with cookie vendors to make money?

2•ricksunny•15m ago•0 comments

Alan Kay – 75 Years of Graphical User Interfaces [video]

https://www.youtube.com/watch?v=qS20Z0RXr28
1•spiralganglion•16m ago•0 comments

Capital in the 22nd Century

https://philiptrammell.substack.com/p/capital-in-the-22nd-century
2•coloneltcb•18m ago•0 comments

The First Video Game Came Long Before Pong

https://www.iflscience.com/the-first-video-game-came-long-before-pong-and-was-invented-by-a-manha...
2•geox•20m ago•0 comments

Cross-site Scripting-benchmark of Python sanitizers against real browsers

https://github.com/EmilStenstrom/justhtml-xss-bench
2•EmilStenstrom•22m ago•1 comments

Growing Up in "404 Not Found" (Part II): The Vanishing Nuclear City

https://vincent404.substack.com/p/growing-up-in-404-not-found-part
1•bookstore-romeo•23m ago•1 comments

Be aware when opening "take home challenges" from untrusted recruiters

https://bitbucket.org/brain0xlab/challenge/src/master/
3•birdculture•26m ago•0 comments

Show HN: FuseCells – 2,500 handcrafted levels logic puzzle game with leaderboard

https://igodia.dev/fusecells
2•keini•26m ago•3 comments

Quality of drinking water varies significantly by airline

https://foodmedcenter.org/2026-center-for-food-as-medicine-longevity-airline-water-study/
3•azinman2•26m ago•0 comments

I used Claude to revive an NPM package with 760K downloads/wk last updated 2019

https://github.com/greenstevester/license-checker-evergreen
2•greenstevester•30m ago•1 comments

obsera – a real-time intelligence platform

https://www.obsera.xyz
1•obsera•32m ago•0 comments

Francesca Albanese and the Lonely Road of Defiance

https://chrishedges.substack.com/p/francesca-albanese-and-the-lonely
4•chmaynard•34m ago•0 comments

All of you are about as trustworthy as the peepers in the hood

1•trusttrusttrust•34m ago•0 comments

Dittytoy – Generative Music Playground

https://dittytoy.net/
1•harel•36m ago•0 comments

The NPC to MC Spectrum

https://nonzerosum.games/npc.html
1•NonZeroSumJames•37m ago•0 comments

Stable-Pretraining-v1: Foundation Model Research Made Simple

https://arxiv.org/abs/2511.19484
2•PaulHoule•39m ago•0 comments

Anti-Addiction iPhone Setup

https://www.aadillpickle.com/blog/iphone-setup
2•aadillpickle•39m ago•1 comments

From what longer video is this short?

https://www.youtube.com/shorts/kcr02CrY_Ik
1•gjvc•39m ago•0 comments

Show HN: I built my own Metronome Desktop App

https://shredono.me/
1•danmol•42m ago•0 comments

The most expensive education system

https://skandergarroum.substack.com/p/the-most-expensive-education-program
1•JoiDegn•47m ago•0 comments

Show HN: Request sensitive user input from system services

https://github.com/LightAndLight/asker
1•lightandlight•48m ago•0 comments

Brazil's Amazon rainforest at risk as key protection under threat

https://www.bbc.co.uk/news/articles/cwypzdgwg1yo
1•zeristor•55m ago•0 comments

Show HN: RAMBnB.xyz P2P marketplace for RAM rentals

https://www.rambnb.xyz
2•olivierroy•58m ago•0 comments

Firebase, Antigravity, & TypeScript FTW

https://daywards.com/media/the-case-for-firebase/firebase-antigravity-and-typescript-ftw
2•daywards•58m ago•0 comments