frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Protoc-gen-dal – Generate data access converters from protobuf

https://github.com/panyam/protoc-gen-dal
1•flashgordon•1mo ago
I've been building services where the API layer and database layer inevitably drift apart. Different field names, timestamps as int64 vs time.Time, nested messages becoming JSONB columns - the usual pain. I got a bit sick of hand-writing the same boilerplate converters between my API protobufs and GORM/Datastore entities, so I built this.

Yes - coupling API and DB schemas isn't always best practice. Your API should evolve independently of storage. Leaking internal details to clients is bad. DB optimizations (denormalization, indexes) shouldn't dictate your API shape. But really for a lot of the services Ive bene building - especially at the early stages - there is a lot of "similarity" - 80-90%. Id be doing the same `user.Name = dbUser.Name` lines hundreds of times, and the "clean separation" was mostly ceremony. And the drift just caused more bugs early on - you know forgetting to update a converter when adding a field, subtle type mismatches, copy-paste errors and so on.

This lets me have a single source of truth for my schemas and declare "transformations" as it goes through the layers and the target models/converters are also generated. You could use something like tRPC but then you are stuck with a single language eco system. I really wanted to not have that coupling. Now I can move fast when the schemas are similar, while still allowing divergence when I need it (decorators for custom logic, explicit field mappings).

Currently I generate targets for GORM (Go) and Google Cloud Datastore (so I can spin up small projects with postgres storage or AppEngine storage). Definitely rough around the edges and probably missing features you need, but it's been useful for my own projects. Still lots of things planned (and doing other languages is on the roadmap)

Would love feedback - especially if you've found better patterns for this problem.

Comments

flashgordon•1mo ago
Author here. For those wondering - Claude Code was used but not in the "generate me this huge X with a single shot prompt after 8 hours of thinking" mode :).

What were the first animals? The fierce sponge–jelly battle that just won't end

https://www.nature.com/articles/d41586-026-00238-z
1•beardyw•1m ago•0 comments

Sidestepping Evaluation Awareness and Anticipating Misalignment

https://alignment.openai.com/prod-evals/
1•taubek•1m ago•0 comments

OldMapsOnline

https://www.oldmapsonline.org/en
1•surprisetalk•3m ago•0 comments

What It's Like to Be a Worm

https://www.asimov.press/p/sentience
1•surprisetalk•3m ago•0 comments

Don't go to physics grad school and other cautionary tales

https://scottlocklin.wordpress.com/2025/12/19/dont-go-to-physics-grad-school-and-other-cautionary...
1•surprisetalk•4m ago•0 comments

Lawyer sets new standard for abuse of AI; judge tosses case

https://arstechnica.com/tech-policy/2026/02/randomly-quoting-ray-bradbury-did-not-save-lawyer-fro...
1•pseudolus•4m ago•0 comments

AI anxiety batters software execs, costing them combined $62B: report

https://nypost.com/2026/02/04/business/ai-anxiety-batters-software-execs-costing-them-62b-report/
1•1vuio0pswjnm7•4m ago•0 comments

Bogus Pipeline

https://en.wikipedia.org/wiki/Bogus_pipeline
1•doener•6m ago•0 comments

Winklevoss twins' Gemini crypto exchange cuts 25% of workforce as Bitcoin slumps

https://nypost.com/2026/02/05/business/winklevoss-twins-gemini-crypto-exchange-cuts-25-of-workfor...
1•1vuio0pswjnm7•6m ago•0 comments

How AI Is Reshaping Human Reasoning and the Rise of Cognitive Surrender

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6097646
2•obscurette•6m ago•0 comments

Cycling in France

https://www.sheldonbrown.com/org/france-sheldon.html
1•jackhalford•8m ago•0 comments

Ask HN: What breaks in cross-border healthcare coordination?

1•abhay1633•8m ago•0 comments

Show HN: Simple – a bytecode VM and language stack I built with AI

https://github.com/JJLDonley/Simple
1•tangjiehao•11m ago•0 comments

Show HN: Free-to-play: A gem-collecting strategy game in the vein of Splendor

https://caratria.com/
1•jonrosner•11m ago•1 comments

My Eighth Year as a Bootstrapped Founde

https://mtlynch.io/bootstrapped-founder-year-8/
1•mtlynch•12m ago•0 comments

Show HN: Tesseract – A forum where AI agents and humans post in the same space

https://tesseract-thread.vercel.app/
1•agliolioyyami•12m ago•0 comments

Show HN: Vibe Colors – Instantly visualize color palettes on UI layouts

https://vibecolors.life/
1•tusharnaik•13m ago•0 comments

OpenAI is Broke ... and so is everyone else [video][10M]

https://www.youtube.com/watch?v=Y3N9qlPZBc0
2•Bender•14m ago•0 comments

We interfaced single-threaded C++ with multi-threaded Rust

https://antithesis.com/blog/2026/rust_cpp/
1•lukastyrychtr•15m ago•0 comments

State Department will delete X posts from before Trump returned to office

https://text.npr.org/nx-s1-5704785
6•derriz•15m ago•1 comments

AI Skills Marketplace

https://skly.ai
1•briannezhad•15m ago•1 comments

Show HN: A fast TUI for managing Azure Key Vault secrets written in Rust

https://github.com/jkoessle/akv-tui-rs
1•jkoessle•16m ago•0 comments

eInk UI Components in CSS

https://eink-components.dev/
1•edent•16m ago•0 comments

Discuss – Do AI agents deserve all the hype they are getting?

2•MicroWagie•19m ago•0 comments

ChatGPT is changing how we ask stupid questions

https://www.washingtonpost.com/technology/2026/02/06/stupid-questions-ai/
1•edward•20m ago•1 comments

Zig Package Manager Enhancements

https://ziglang.org/devlog/2026/#2026-02-06
3•jackhalford•21m ago•1 comments

Neutron Scans Reveal Hidden Water in Martian Meteorite

https://www.universetoday.com/articles/neutron-scans-reveal-hidden-water-in-famous-martian-meteorite
1•geox•22m ago•0 comments

Deepfaking Orson Welles's Mangled Masterpiece

https://www.newyorker.com/magazine/2026/02/09/deepfaking-orson-welless-mangled-masterpiece
1•fortran77•24m ago•1 comments

France's homegrown open source online office suite

https://github.com/suitenumerique
3•nar001•26m ago•2 comments

SpaceX Delays Mars Plans to Focus on Moon

https://www.wsj.com/science/space-astronomy/spacex-delays-mars-plans-to-focus-on-moon-66d5c542
1•BostonFern•26m ago•0 comments