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?

Mother Earth Mother Board

https://efdn.notion.site/Mother-Earth-Mother-Board-WIRED-a8ff97e460bc4ac1b4a7b87f3503a55c
1•thunderbong•50s ago•0 comments

US recession probabilities implied by the yield curve

https://www.stlouisfed.org/on-the-economy/2023/sep/what-probability-recession-message-yield-spreads
1•latentframe•5m ago•1 comments

Show HN: AnyHabit – A minimalist habit tracker for Raspberry Pi and Docker

https://github.com/Sparths/AnyHabit
1•bebedi•7m ago•0 comments

Highlights from Git 2.54

https://github.blog/open-source/git/highlights-from-git-2-54/
1•tux3•10m ago•0 comments

Enhancing Sporting Organisation Efficiency with Generative AI

https://sinankprn.com/posts/enhancing-sporting-organisation-efficiency-with-generative-ai/
1•sminchev•10m ago•0 comments

Reconstructing a Vue and Three.js app from a single Webpack bundle

1•YufanZhang•11m ago•0 comments

Show HN: Tiltbump – another game in a single HTML file

https://tiagosimoes.github.io/tiltbump/
1•eropatori•13m ago•0 comments

WebP to PNG Converter – Convert WebP to PNG Online Free

https://www.wps.com/tools/webp-to-png/
2•morganglow•19m ago•0 comments

AI agents are a security nightmare. Moving the dev workflow to QEMU

https://hozan23.com/posts/ai-security-nightmare/
1•hozan23•20m ago•0 comments

Kiss Principle

https://en.wikipedia.org/wiki/KISS_principle
1•edu•23m ago•0 comments

Pagetok – an all-in-one AI assistant on your Mac

https://pagetok.web.app/
1•loopstring•25m ago•0 comments

Strongest Phentermine for Women: What to Expect Before You Start

https://finance.yahoo.com/sectors/healthcare/articles/strongest-phentermine-alternatives-weight-l...
1•JoniThani•27m ago•0 comments

Show HN: TapFi – Join any WiFi just by scanning the details with your camera

https://tapfi.uno/
1•jmkni•33m ago•2 comments

Help Me with Multiverse OS

https://chatgpt.com/gg/v/69e7247e7e408196817bdce7534163a8?token=4gu4Y6NwS3xz3phbYpOpeA
1•liljoe•34m ago•0 comments

CC: A P2P Network for Reproducible Autoresearch Code Experiments

https://community.computer/
4•aiw1nt3rs•34m ago•0 comments

All your agents are going async

https://zknill.io/posts/all-your-agents-are-going-async/
2•zknill•34m ago•0 comments

The Anatomy of Tool Calling in LLMs: A Deep Dive

https://martinuke0.github.io/posts/2026-01-07-the-anatomy-of-tool-calling-in-llms-a-deep-dive/
1•tonyl•35m ago•0 comments

Xonsh shell 0.23 REFORGED – not just a release

https://github.com/xonsh/xonsh/releases/tag/0.23.0
1•combisearch•37m ago•1 comments

Show HN: DSS, a new human-readable and plain format for XLS and spreadsheets

https://github.com/Datastripes/DataSheetStandard/
1•vinserello•38m ago•0 comments

Show HN: OpenBridge – turn web chat access into an OpenAI-compatible endpoint

2•linuz•39m ago•0 comments

The Pirate Bay's Oldest Torrent Turned 22

https://torrentfreak.com/the-pirate-bays-oldest-torrent-turned-22/
4•franczesko•45m ago•0 comments

Heatwaves in the Indo-Gangetic Plains: Why Local Conditions Matter

https://www.iitb.ac.in/research-highlight/heatwaves-indo-gangetic-plains-why-local-land-and-atmos...
1•akbarnama•49m ago•0 comments

A Hot-Air Balloon Landed in a California Backyard. The Owner Says It's A '

https://www.wired.com/story/a-brief-interview-with-the-owner-of-the-hot-air-balloon-that-landed-i...
1•joozio•51m ago•0 comments

Less human AI agents, please

https://nial.se/blog/less-human-ai-agents-please/
17•nialse•56m ago•8 comments

Show HN: Alignear – Client communication layer for Linear teams

https://alignear.com/
4•madatbay•57m ago•1 comments

The Fencing Visualization System

https://bsky.app/profile/kcimc.bsky.social/post/3mjxchuwkzs2v
7•mariuz•1h ago•0 comments

Berea college makes tuition free with its endowment

https://www.theatlantic.com/education/archive/2018/10/how-berea-college-makes-tuition-free-with-i...
4•KnuthIsGod•1h ago•0 comments

Iran claims US backdoors knocked out networking equipment

https://www.theregister.com/2026/04/21/iran_claims_us_used_backdoors/
5•defrost•1h ago•1 comments

Writing Node.js Addons with .NET Native AOT

https://devblogs.microsoft.com/dotnet/writing-nodejs-addons-with-dotnet-native-aot/
3•soheilpro•1h ago•0 comments

Using Changesets in a polyglot monorepo

https://luke.hsiao.dev/blog/changesets-polyglot-monorepo/
5•lwhsiao•1h ago•3 comments