frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

America's New Surveillance Dragnet

https://www.wsj.com/politics/policy/immigration-ice-arrests-surveillance-6f1cef64
2•julienchastang•12m ago•1 comments

Interactive physics moving block structures in Minecraft

https://github.com/ryanhcode/sable
2•LelouBil•17m ago•1 comments

Create Aeronautics

https://modrinth.com/mod/create-aeronautics
2•LelouBil•18m ago•0 comments

Find and fix any Windows error

https://errorcodereference.com/
1•megamike•19m ago•1 comments

Metro Hits 1.0.0 – Compile-Time Dependency Injection Framework for Kotlin

https://github.com/ZacSweers/metro/releases/tag/1.0.0
2•TheWiggles•22m ago•0 comments

Where the Money Is Coming From

https://www.warman.life/blog/2026-04-30-where-the-money-is-coming-from/
2•shaunistyping•22m ago•0 comments

OpenAI to use third-party cookies to advertise products

https://openai.com/policies/us-privacy-policy/
2•shpat•23m ago•0 comments

I made a weird AI kids app (Little Chicken)

https://apps.apple.com/us/app/kids-games-fun-little-chicken/id6759822036
1•mrWONDERFULguy•24m ago•0 comments

Cursor's 'Rogue' AI agent goes haywire, deletes company's database [video]

https://www.youtube.com/watch?v=XBVoLSXaAHA
1•mgh2•25m ago•2 comments

Ask HN: Any good ways to extend Codex sessions?

1•tabmate•36m ago•2 comments

AI Value Capture – The Shift to Model Labs

https://newsletter.semianalysis.com/p/ai-value-capture-the-shift-to-model
1•nsoonhui•42m ago•0 comments

Show HN: Vibe, a single-header C networking library for Linux

https://github.com/xtellect/vibe
3•enduku•46m ago•0 comments

Ask HN: Does Claude use 'prior' in a Bayesian sense more than English?

1•slake•47m ago•0 comments

Ruby Gems and Go Modules Impersonate Dev Tools to Steal Secrets and Poison CI

https://socket.dev/blog/malicious-ruby-gems-and-go-modules-steal-secrets-poison-ci
3•ilreb•49m ago•0 comments

A Three Horizons Framework for Government Reform

https://www.eatingpolicy.com/p/a-three-horizons-framework-for-government
2•brandonb•52m ago•0 comments

Health care costs reach a breaking point

https://newsroom.heart.org/news/health-care-costs-reach-a-breaking-point
4•geox•52m ago•0 comments

10-day training cycle that Sabastian Sawe used to run a sub-2 marathon

https://www.runnersworld.com/uk/training/marathon/a71027488/sebastian-sawe-training-cycle/
2•canucker2016•52m ago•2 comments

The Fick equation and your heart

https://www.empirical.health/blog/fick-equation-vo2max-heart/
1•brandonb•53m ago•0 comments

Show HN: Winpodx – run Windows apps on Linux as native windows

https://github.com/kernalix7/winpodx
10•kernalix7•56m ago•2 comments

Claude Code is going to fail you eventually, and you need to be ready

https://claudefolio.com/blog/claude-code-is-going-to-fail-you-eventually-and-you-need-to-be-ready
2•VaderMaster•57m ago•0 comments

US-Indian Spacecraft Captures Mexico City Subsidence

https://science.nasa.gov/photojournal/us-indian-spacecraft-captures-mexico-city-subsidence/
2•hsuresh•1h ago•0 comments

Codex subscription in an Electron app and Chromium Browser

https://github.com/chillysbabybackribs/Goldenboy-YouTube-Reddit-Extractor
1•goldenboychrome•1h ago•1 comments

Termshot: Create screenshots based on terminal command output

https://github.com/homeport/termshot
1•sea-gold•1h ago•0 comments

KDE at 30

https://kde.org/anniversaries/30/
2•kristianp•1h ago•0 comments

Letter from van Gogh: "No, [ ], learn how to dance, or fall in love"

https://www.webexhibits.org/vangogh/letter/17/W01.htm
1•jdcampolargo•1h ago•0 comments

KDE Frameworks

https://invent.kde.org/frameworks
1•kristianp•1h ago•0 comments

OpenWarp

https://openwarp.zerx.dev
38•zero-lab•1h ago•32 comments

KV Cache Locality: The Hidden Variable in Your LLM Serving Cost

https://ranvier.systems/2026/04/30/kv-cache-locality-the-hidden-variable-in-your-llm-serving-cost...
2•mindsaspire•1h ago•0 comments

Brain scans reveal 3 ADHD subtypes

https://www.washingtonpost.com/health/2026/04/30/adhd-subtype-extreme-brain-scans/
4•brandonb•1h ago•0 comments

The Hearts of the Super Nintendo

https://fabiensanglard.net/snes_hearts/
7•droppedasbaby•1h ago•2 comments
Open in hackernews

Show HN: Stack Error – ergonomic error handling for Rust

https://github.com/gmcgoldr/stackerror
27•garrinm•11mo ago
Stack Error reduces the up-front cost of designing an error handling solution for your project, so that you focus on writing great libraries and applications.

Stack Error has three goals:

1. Provide ergonomics similar to anyhow.

2. Create informative error messages that facilitate debugging.

3. Provide typed data that facilitates runtime error handling.

Comments

tevon•11mo ago
This is awesome! Will give it a try in my next project.

How does it keep track of filename and line number in a compiled binary? I'm fairly new to rust libraries and this doesn't quite make sense to me. I know in JS you need a source-map for minification, how does this work for a compiled language?

fpoling•11mo ago
Rust provides file!, line! and column! macros that expands into a compile-time constants that the compiler embeds then into the executable. This way no source map at runtime is necessary as the relevant errors are constructed from those constants.

Presumably StackError just uses those macros.

But for debugging a source map is still necessary and is a part of various debug formats.

rhabarba•11mo ago
I still prefer the Anyhow solution, but I like the approach here.
IshKebab•11mo ago
Isn't this strictly superior to Anyhow? What do you like more about Anyhow?
rhabarba•11mo ago
I prefer Anyhow's non-intrusiveness: "Result" is still "Result" and all I need is a "?". I agree with Stack Error's documentation that Anyhow can't help with debugging that well, but it's "good enough" in my opinion.
IshKebab•11mo ago
Result in `anyhow::Result` though. It's still a different type. Or do you literally mean you like that it is still spelt the same?

And I think you can still use `?` with this if you don't want to add any context... Not 100% sure on that though.

rhabarba•11mo ago
Might as well be my limited understanding from what I can read behind the link, to be fair.
garrinm•11mo ago
Anyhow still makes things easier for application development. The main drawback is that the resulting error type doesn't implement std::error::Error, so it's not suitable for library development (as pointed out in the anyhow documentation). Stack Error is a bit less ergonomic, but suitable for library development.
shepmaster•11mo ago
I hope to read through your crate and examples later, but if you have a chance, I’d be curious to hear your take on how Stack Error differs from my library, SNAFU [1]!

[1]: https://docs.rs/snafu/latest/snafu/index.html

garrinm•11mo ago
I played around a bit with SNAFU a couple of years ago, but I'm haven't worked deeply with the library so there might well be some features I'm not aware of.

I think SNAFU is more like a combination of anyhow and thiserror into a single crate, rather than Stack Error which leans more heavily into the "turnkey" error struct. Using the Whatever struct, you get some overlap with Stack Error features:

- Error message are co-located.

- Error type implement std::error::Error (suitable for library development).

- External errors can be wrapped and context can easily be added.

Where Stack Error differs:

- Error codes (and URIs) offer ability for runtime error handling without having to compare strings.

- Provides pseudo-stack by stacking messages.

Underlying this is an opinion I baked into Stack Error: error messages are for debugging, not for runtime error handling. Otherwise all your error strings effectively become part of your public interface since a downstream library can rely on them for error handling.

lilyball•11mo ago
If the macros only exist to get file and line information, you could do the same thing by using `#[track_caller]` functions combined with `std::panic::Location` to get that same info. For example, `stack_err!` could be replaced with

  impl StackError {
      #[track_caller]
      fn new_location(msg: impl Display) -> Self {
          let loc = std::panic::Location::caller();
          Self::new(format!("{}:{} {msg}", loc.file(), loc.line()))
      }
  }
such that you call `.map_err(StackError::new_location("data is not a list of strings"))`. A macro is nice if you need to process format strings with arguments (though someone can call `StackError::new_location(format_args!(…))` if they want), but all of your examples show static strings so it's nice to avoid the error in that case.

The use of `std::panic::Location` also means instead of baking that into a format string you could also just have that be an extra field on the error, which would let you expose accessors for it, and you can then print them in your Debug/Display impls.

Speaking of, the Display impl really should not include its source. Standard handling for errors expects that an error prints just itself with Display because it's very common to recurse through sources and print those, so if Display prints the source too then you're duplicating output. Go ahead and print it on Debug though, that's nice for errors returned from `main()`.

garrinm•11mo ago
Thanks for the insight, I wasn't aware of `track_caller`. I'll definitely be looking into this. I was scratching my head trying to figure out how to make file and line number usage consistent and customizable, this looks like the answer!

You're also right that this will pretty much eliminate the need for macros.

That's also a very key insight about Display vs. Debug printing. I'll be looking into that as well.

Thank you for the thoughtful reply.

DavidWilkinson•11mo ago
Dei here, from the team behind Error Stack [1] (a similarly named existing, context-aware error-handling library for Rust that supports arbitrary attachments). How does Stack Error, here, compare?

[1]: https://crates.io/crates/error-stack