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

Comments

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

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

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

South Korea's LG Energy was using US visa workarounds before Trump, docs show

https://www.reuters.com/sustainability/society-equity/south-koreas-lg-energy-was-using-us-visa-wo...
1•toomuchtodo•2m ago•0 comments

High-Performance Branch-Free Algorithms for Extended-Precision Floating-Point [pdf]

https://theory.stanford.edu/~aiken/publications/papers/sc25.pdf
1•luu•9m ago•0 comments

Researchers almost double perovskite cell efficiency with graphene layer

https://reneweconomy.com.au/australian-researchers-almost-double-perovskite-cell-efficiency-with-...
1•thelastgallon•12m ago•0 comments

Show HN: AgentSea – private AI chat for sensitive work

https://agentsea.com/ai-chat
3•miletus•19m ago•0 comments

Write a Letter to Hogwarts

https://newsletter.antoniokov.com/archive/write-a-letter-to-hogwarts/
2•antoniokov•20m ago•0 comments

Split Linux – optimized for safely navigating hostile environments

https://splitlinux.org/
3•bilegeek•23m ago•0 comments

Simple Dependent Types in Python

https://sobolevn.me/2019/01/simple-dependent-types-in-python
1•Fudgel•23m ago•0 comments

A Billionaire's Plan to Reach Another Star Fell Apart

https://www.scientificamerican.com/article/the-quiet-demise-of-breakthrough-starshot-a-billionair...
2•cryptoz•26m ago•0 comments

Jeffrey Epstein Household Manual

https://www.documentcloud.org/documents/21128538-gx-606/
1•mhb•29m ago•0 comments

Show HN: Signboard Detection Algorithm Using Only Point Cloud Data

https://github.com/Yutarop/sign_detection
2•ponta17•30m ago•0 comments

Neosqlite: NoSQL for SQLite with PyMongo-Like API

https://github.com/cwt/neosqlite
1•thunderbong•33m ago•0 comments

Free Software

https://www.fsf.org/
2•Conectar•34m ago•0 comments

Lake Erie's Glass Giant

https://www.beachcombingmagazine.com/blogs/news/lake-erie-s-glass-giant
1•bryanrasmussen•37m ago•0 comments

Show HN: Go-Pugleaf – Usenet NNTP to Web Gateway – Written in Go

https://github.com/go-while/go-pugleaf
1•newhuser•41m ago•1 comments

The health benefits of sunlight may outweigh the risk of skin cancer

https://www.economist.com/science-and-technology/2025/09/17/the-health-benefits-of-sunlight-may-o...
14•petethomas•42m ago•1 comments

Whenever you open a new tab, you see your GitHub stats

https://chromewebstore.google.com/detail/gitstats-new-tab/dgfgblmnoegfkiamligbkmmikjomhpcj
1•artistaiden•43m ago•0 comments

Iran to start growing legal opium after Taliban crackdown

https://www.ft.com/content/ada1569c-19a7-4f6d-a50e-c7af0499ed17
3•petethomas•48m ago•0 comments

Gitlab 18.4 Released

https://about.gitlab.com/releases/2025/09/18/gitlab-18-4-released/
1•bjoko•48m ago•0 comments

The Rise of Vibe Coding: Empowering a World of Solopreneurs

https://100tinytools.medium.com/the-rise-of-vibe-coding-empowering-a-world-of-solopreneurs-54b756...
1•remotemonk•49m ago•0 comments

Getting Yelled at by Dumbasses

https://www.hamiltonnolan.com/p/getting-yelled-at-by-dumbasses
2•colinprince•50m ago•0 comments

Interns Are Making Up to $14,000 a Month at Indian Trading Firms

https://www.bloomberg.com/news/articles/2025-09-19/interns-are-offered-14-000-a-month-pay-by-quan...
2•petethomas•50m ago•0 comments

The Sad World of Tech Blogging During an Era of Technological Stagnation

https://freddiedeboer.substack.com/p/the-sad-sad-world-of-tech-blogging
2•blueridge•51m ago•0 comments

Connect and secure any private or public app by hostname, not IP

https://blog.cloudflare.com/tunnel-hostname-routing/
1•chmaynard•51m ago•0 comments

I'm gonna write 1 email every day for 365 days to teach myself discipline

https://www.mattmerrick.com/
1•mattmerrick•53m ago•0 comments

Saudi Arabia Seeks New Security Alliances as Trust in U.S. Erodes

https://www.wsj.com/world/middle-east/saudi-arabia-seeks-new-security-alliances-as-trust-in-u-s-e...
2•JumpCrisscross•54m ago•0 comments

Show HN: Luma Ray3 – Generate Cinematic AI Videos in 16-Bit HDR

https://fc3d8ae693a4.ngrok-free.app
1•combineimages•54m ago•0 comments

Google Chrome Is Becoming an AI Browser – Starting Today

https://www.omgubuntu.co.uk/2025/09/google-chrome-ai-browser-announcement
3•rolph•59m ago•0 comments

DeepSeek says its hit AI model cost just $294k to train

https://www.reuters.com/world/china/chinas-deepseek-says-its-hit-ai-model-cost-just-294000-train-...
8•jonbaer•1h ago•1 comments

A compact cassette tape for DNA-based data storage

https://www.science.org/doi/10.1126/sciadv.ady3406
3•mfld•1h ago•0 comments

alpine-service-mode: Scriptable runtime-writable livecd / hardware wrangler

https://github.com/9001/asm
1•xk3•1h ago•0 comments