frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Dlg – Zero-cost printf-style debugging for Go

https://github.com/vvvvv/dlg
3•0xFEE1DEAD•2h ago
Hey HN,

I tend to use printf-style debugging as my primary troubleshooting method and only resort to gdb as a last resort.

While I like its ease of use printf debugging isn't without its annoyances, namely removing the print statements once you're done.

I used to use trace-level logging from proper logging libraries but adding trace calls in every corner quickly gets out of control and results in an overwhelming amount of output.

To scratch my own itch I created dlg - a minimal debugging library that disappears completely from production builds. Its API exposes just a single function, Printf [1].

dlg is optimized for performance in debug builds and, most importantly, when compiled without the dlg build tag, all calls are eliminated by the Go linker as if dlg was never imported.

For debug builds it adds optional stack trace generation configurable via environment variables or linker flags.

GitHub: https://github.com/vvvvv/dlg

Any feedback is much appreciated.

[1]: Actually two functions - there's also SetOutput.

Ask HN: Engineers deserve better recognition. Can a protocol change that?

1•mzk_pi•4m ago•0 comments

Microsoft investigates outage affecting Microsoft 365 admin center

https://www.bleepingcomputer.com/news/microsoft/microsoft-investigates-outage-affecting-microsoft-365-admin-center/
1•kPwn•8m ago•0 comments

Orchids Just Raised $2M

https://justraised.xyz
1•chiswanjo•17m ago•1 comments

Compact Representations for Arrays in Lua

https://sol.sbc.org.br/index.php/sblp/article/view/30252
1•fanf2•17m ago•0 comments

New Math by Tom Lehrer

https://tomlehrersongs.com/new-math/
1•TheFreim•19m ago•0 comments

Tear It Down, They Said. He Just Kept Building

https://www.nytimes.com/2025/07/19/world/asia/china-demolition-house.html
2•bookofjoe•20m ago•1 comments

The Bootstrap Load

http://www.intel4004.com/btstrp.htm
5•gone35•22m ago•0 comments

Germany: Several Killed in Train Accident

https://www.dw.com/en/germany-several-killed-in-train-accident/a-73431046
2•perihelions•22m ago•0 comments

The early career scientists planning to leave the United States

https://www.nature.com/articles/d41586-025-01900-8
2•rntn•23m ago•0 comments

Building a custom GUI app for my Hugo blog with Tauri

https://blog.notmyhostna.me/posts/building-a-custom-gui-app-for-my-hugo-blog-with-tauri
1•dewey•25m ago•0 comments

IPng Networks – Certificate Transparency – Part 1

https://ipng.ch/s/articles/2025/07/26/certificate-transparency-part-1/
5•jandeboevrie•26m ago•0 comments

The Elements by Tom Lehrer (Aristotle's Version)

https://tomlehrersongs.com/wp-content/uploads/2019/12/Elements-Aristotle.jpeg
1•lisper•26m ago•0 comments

IBM Keyboard Patents

https://sharktastica.co.uk/topics/patents
2•tart-lemonade•29m ago•0 comments

How to operate on a shark in 10 minutes or less

https://www.popsci.com/environment/shark-operation/
1•Bluestein•29m ago•0 comments

Python source code analyzer based on distrust

https://github.com/nocomplexity/codeaudit
2•runningmike•30m ago•0 comments

The Evilization of Google–and What to Do About It

https://billdembski.substack.com/p/the-evilization-of-googleand-what
5•huijzer•34m ago•0 comments

GPT might be an information virus (2023)

https://nonint.com/2023/03/09/gpt-might-be-an-information-virus/
2•3willows•36m ago•0 comments

Why Are Beach Holes So Deadly? [video]

https://www.youtube.com/watch?v=0kQXOTcEB_E
1•weinzierl•38m ago•1 comments

Electrified dry reforming of methane on Ni-La2O3–loaded activated carbon

https://www.science.org/doi/10.1126/sciadv.adv1585
3•PaulHoule•43m ago•0 comments

Formal Specs as Sets of Behaviors

https://surfingcomplexity.blog/2025/07/26/formal-specs-as-sets-of-behaviors/
2•Bogdanp•45m ago•0 comments

1952 Washington, D.C. UFO incident

https://en.wikipedia.org/wiki/1952_Washington,_D.C._UFO_incident
3•handfuloflight•46m ago•2 comments

Teletext Art

https://mode7.club/
2•smartmic•48m ago•0 comments

I hacked my washing machine

https://nexy.blog/2025/07/27/how-i-hacked-my-washing-machine/
6•JadedBlueEyes•50m ago•1 comments

Trump, EU chief strike trade deal in transatlantic standoff

https://www.channelnewsasia.com/world/trump-eu-chief-strike-trade-deal-in-transatlantic-standoff-5261376
1•eagleislandsong•51m ago•0 comments

info.cern.ch – home of the first website

https://info.cern.ch/
3•smartmic•53m ago•0 comments

A Retrospective on Paradigms of AI Programming (2002)

https://norvig.com/Lisp-retro.html
2•swatson741•56m ago•0 comments

EU, US Reach Deal to Avoid Trump Tariff Hike Before Deadline

https://www.bloomberg.com/news/articles/2025-07-27/eu-us-clinch-deal-to-avoid-trump-tariff-hike-ahead-of-deadline
3•lossolo•56m ago•1 comments

Show HN: Hacker News SPA Mode

https://resig-js.vercel.app/
2•revskill•59m ago•1 comments

Version 2 of Higgs Audio Generation

https://www.boson.ai/blog/higgs-audio-v2
1•slacka•59m ago•1 comments

Where did all the Las Vegas tippers go?

https://www.wsj.com/business/hospitality/where-did-all-the-las-vegas-tippers-go-4c385684
3•mathattack•1h ago•1 comments