frontpage.
newsnewestaskshowjobs

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?

Psion Emulator – classic Psion palmtops in your browser

https://joehaines.com/psion/
1•randkyp•6m ago•0 comments

The most official water costs $120k a gallon

https://signoregalilei.com/2026/07/26/the-most-official-water-costs-120000-a-gallon/
3•srijan4•9m ago•0 comments

AI Workspace for Your PC

https://stuard.ai
1•Ifesol•13m ago•1 comments

Verisign Cooperative Agreement

https://www.ntia.gov/program/verisign-cooperative-agreement
2•themaxdavitt•14m ago•0 comments

Nvidia in Talks with OpenAI to Guarantee $250B Financing for Data Center

https://www.wsj.com/tech/ai/nvidia-in-talks-with-openai-to-guarantee-250-billion-financing-for-da...
4•taurath•23m ago•1 comments

Show HN: 3D music visualization on Apple Vision Pro

https://old.reddit.com/r/VisionPro/comments/1v5llv9/3d_music_visualization_on_apple_vision_pro/
1•linxy97•23m ago•0 comments

Show HN: Watch random code typed out on an MS-DOS IDE

https://hackerman.specr.net/
2•vunderba•27m ago•0 comments

Sand battery: Finland's answer to a renewable energy headache

https://www.cnbc.com/2026/07/25/finland-sand-battery-renewable-energy-storage.html
2•coderintherye•28m ago•0 comments

Why AI Doesn't Replace Software Architecture – It Makes It More Valuable

https://wilburhimself.github.io/blog/65-why-ai-doesnt-replace-software-architecture/
1•wilburhimself•28m ago•1 comments

Malicious sites use JavaScript to build malware in browser memory

https://www.bleepingcomputer.com/news/security/malicious-sites-use-javascript-to-build-malware-in...
3•justworks•28m ago•1 comments

Show HN: CarbonSheets – Host your own customizable cheatsheet portal In GitHub

https://carbonsheets.vercel.app/
2•elnoxvie•32m ago•0 comments

Physicists build a computer from 400 particles orbiting in liquid

https://www.tomshardware.com/tech-industry/physicists-build-a-computer-from-400-particles-orbitin...
2•sbulaev•38m ago•0 comments

Sticky notes on a storyboard became my savior productivity app

https://www.taskloco.com/
1•taskloco_nyc•38m ago•0 comments

The Optimization Theory of Everything

https://12gramsofcarbon.com/p/the-optimization-theory-of-everything
1•theahura•44m ago•1 comments

Show HN: Quintile – keyboard-only window grids for Mac

https://github.com/stefanopineda/quintile
1•stefanopineda•48m ago•0 comments

Foxconn drops VMware, adopts hyperconverged upstart Arcrfra

https://www.theregister.com/virtualization/2026/07/27/foxconn-drops-vmware-adopts-hyperconverged-...
1•NordStreamYacht•50m ago•0 comments

Show HN: ASL V6 – Open-source AST red-teaming engine for Python AI agents

https://github.com/sivaadityacoder/asl-v6
2•sivaaditya•54m ago•0 comments

Show HN: Injectable time and timers with custom Date types for TypeScript

https://github.com/jaenyf/time-provider
1•jaenyf•56m ago•0 comments

Multimodal foundation model for image and video understanding from Microsoft

https://huggingface.co/microsoft/Mage-VL
1•MehrdadKhnzd•56m ago•0 comments

Bullwhip Effect

https://en.wikipedia.org/wiki/Bullwhip_effect
3•vismit2000•57m ago•0 comments

It is empowering to hand off execution

https://www.charbzg.com/blog/ai-empowerment
1•charbz•59m ago•1 comments

Palette Vault – Color Palettes and Hex Codes

https://palettevault.github.io/
4•javatuts•1h ago•0 comments

Porffor: An ahead-of-time JavaScript-to-native/WASM compiler

https://porffor.dev/
2•goranmoomin•1h ago•0 comments

Newpipe Extractor in WASM

https://github.com/thegrims/newpipe-extractor-wasm
1•aidangrimshaw•1h ago•1 comments

Paywall-free News Aggregator

https://freepress.today/
1•niraj-agarwal•1h ago•1 comments

Show HN: a Rust, Wayland, Vulkan 3D CRT, screencast application, retroarch cores

https://github.com/andrewfader/crtulum
1•androsynth89•1h ago•0 comments

India cuts internet, then demands removal of bitchat's code

https://korben.info/en/india-cuts-internet-demands-removal-bitchat-code.html
4•sakumen•1h ago•2 comments

Improving Terminal Ergonomics

https://aiex7.github.io/blog/articles/improving-terminal-ergonomics/
1•harr01•1h ago•0 comments

Why Lean is faster than Rust

https://kim-em.github.io/blog/2026-7-24-why-lean-is-faster-than-rust/
1•replatformradar•1h ago•1 comments

Renaissance Man: imago ex machina

https://github.com/willswire/renaissance-man
1•willswire•1h ago•0 comments