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

Comments

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

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

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

Two Belgian Cryptographers Changed the Way the World Keeps Secrets

https://mediaden.ca/blog/aes-256-gcm
1•ryanisnan•38s ago•1 comments

Use given/when/then Specs avoid Spaghetti Code

https://www.startdataengineering.com/post/using-llms-for-data-engineering/#step-1-define-requirem...
1•articsputnik•41s ago•0 comments

Pace of NIH Funding Slows Further in Trump's Second Year

https://www.nytimes.com/2026/04/22/science/trump-nih-funding-research.html
1•mikhael•48s ago•0 comments

Andon Cafe – A cafe in Stockholm run by AI

https://andon.cafe/
1•armcat•1m ago•0 comments

Claude Code is not making your product better

https://ethanding.substack.com/p/claude-code-is-not-making-your-product
1•bblcla•1m ago•0 comments

Show HN: MacYaps – Battery dying? WiFi gone? Your Mac talks back

https://macyaps.com/
1•joeyhachem•2m ago•0 comments

Lazarus: How North Korea uses AI to industrialize attacks on developers

https://expel.com:443/blog/inside-lazarus-how-north-korea-uses-ai-to-industrialize-attacks-on-dev...
1•MBCook•4m ago•0 comments

std::accumulate: Exploring an Algorithmic Empire (2016)

https://www.youtube.com/watch?v=B6twozNPUoA
1•tosh•5m ago•0 comments

Same AWS t3.medium, 27-point stability gap across regions under load

https://webbynode.com/articles/same-vps-different-behavior-aws-t3-medium-regional-gap
1•gsgreen•8m ago•0 comments

Keeping the Coding Agent on the Straight and Narrow

https://gfrm.in/posts/pkm-coding-agent-discipline/
1•slygent•8m ago•0 comments

Horribly Complicated Electric Guitar Keyboard (2013)

https://hackaday.com/2013/04/12/horribly-complicated-electric-guitar-keyboard/
1•miduil•8m ago•0 comments

The Code Agent Orchestra: what makes multi-agent coding work

https://addyosmani.com/blog/code-agent-orchestra/
1•wek•10m ago•0 comments

AIGregate: Automated Tech Newsletter with Hugo and Google Gemini API

https://filipemd.github.io/aigregate/
1•cjnenejeknenj•12m ago•0 comments

ReMarkable firing up to 40% of their workforce

https://e24.no/naeringsliv/i/ExboXl/remarkable-kutter-opptil-200-ansatte
3•davisr•12m ago•1 comments

Back end-for-Front end: The most secure architecture for browser-based apps

https://fusionauth.io/blog/backend-for-frontend-security-architecture
2•mooreds•13m ago•0 comments

Meta-Harness: End-to-End Optimization of Model Harnesses [pdf]

https://yoonholee.com/meta-harness/paper.pdf
2•marcofloriano•14m ago•0 comments

Show HN: Trainly – Free 72-hour audit of your AI agent's production traces

https://www.trainlyai.com/audit
2•kavin_key•14m ago•1 comments

Dynamics of genetic and somatic trade-offs in ageing and mortality

https://www.nature.com/articles/s41586-026-10407-9
1•robwwilliams•14m ago•1 comments

Show HN: XTrace – Encrypted vector DB (search embeddings without exposing them)

https://github.com/XTraceAI/xtrace-sdk
6•TristanX•15m ago•1 comments

AI-powered robot beats elite table tennis players

https://www.theguardian.com/science/2026/apr/22/ai-powered-robot-beats-elite-table-tennis-players...
1•robaato•15m ago•0 comments

Claude Dropped Max 5x and 20x plans

https://old.reddit.com/r/ClaudeCode/comments/1sspxge/secretly_dropped_max_5x_and_20x_plans/
5•rvnx•17m ago•2 comments

The Endless Cycle of Enshitification

https://www.christopherburg.com/blog/the-endless-cycle-of-enshitification/
3•speckx•18m ago•1 comments

Texas Populists Almost Destroyed the Two-Party System

https://jacobin.com/2026/03/texas-populism-socialism-race-terror/
1•PaulHoule•18m ago•0 comments

Show HN: Hold.aero – Fly and Learn IFR flying in the browser

https://app.hold.aero/fly
1•jcchrrr•20m ago•0 comments

OpenAI: Workspace Agents for Business

https://openai.com/business/workspace-agents/
6•tosh•20m ago•1 comments

Need advice: Back end engineer → infrastructure: how do you make the transition?

3•gokuljs•20m ago•0 comments

Website streamed live directly from a model

https://flipbook.page/
3•sethbannon•23m ago•0 comments

Is Starlink a Secret Radar Constellation?

https://www.youtube.com/watch?v=jbp3kdJZ1_A
2•vpmadd52huq•23m ago•0 comments

The AI-Native Interview

https://sierra.ai/blog/the-ai-native-interview
1•ej88•24m ago•0 comments

Pancreatic cancer mRNA vaccine shows lasting results in an early trial

https://www.nbcnews.com/health/cancer/pancreatic-cancer-mrna-vaccine-shows-lasting-results-early-...
5•bookofjoe•25m ago•0 comments