frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Growing up in “404 Not Found”: China's nuclear city in the Gobi Desert

https://substack.com/inbox/post/182743659
242•Vincent_Yan404•7h ago•88 comments

Calendar

https://neatnik.net/calendar/?year=2026
578•twapi•9h ago•76 comments

Replacing JavaScript with Just HTML

https://www.htmhell.dev/adventcalendar/2025/27/
486•soheilpro•13h ago•173 comments

Ask HN: Anti-AI Open Source License?

9•W-Stool•12m ago•2 comments

How we lost communication to entertainment

https://ploum.net/2025-12-15-communication-entertainment.html
521•8organicbits•18h ago•269 comments

Floor796

https://floor796.com/
815•krtkush•1d ago•103 comments

One year of keeping a tada list

https://www.ducktyped.org/p/one-year-of-keeping-a-tada-list
39•egonschiele•6d ago•14 comments

Rex is a safe kernel extension framework that allows Rust in the place of eBPF

https://github.com/rex-rs/rex
82•zdw•5d ago•43 comments

C++ says “We have try. . . finally at home”

https://devblogs.microsoft.com/oldnewthing/20251222-00/?p=111890
75•ibobev•7h ago•62 comments

Langfuse (YC W23) Is Hiring in Berlin, Germany

https://langfuse.com/careers
1•clemo_ra•2h ago

Fathers’ choices may be packaged and passed down in sperm RNA

https://www.quantamagazine.org/how-dads-fitness-may-be-packaged-and-passed-down-in-sperm-rna-2025...
223•vismit2000•13h ago•140 comments

Gpg.fail

https://gpg.fail
384•todsacerdoti•21h ago•220 comments

Rainbow Six Siege hacked as players get billions of credits and random bans

https://www.shanethegamer.com/esports-news/rainbow-six-siege-hacked-global-server-outage/
224•erhuve•18h ago•78 comments

Functional programming and reliability: ADTs, safety, critical infrastructure

https://blog.rastrian.dev/post/why-reliability-demands-functional-programming-adts-safety-and-cri...
107•rastrian•14h ago•97 comments

Dialtone – AOL 3.0 Server

https://dialtone.live/
66•rickcarlino•10h ago•30 comments

The Origins of APL (1974) [video]

https://www.youtube.com/watch?v=8kUQWuK1L4w
34•ofalkaed•6d ago•5 comments

Project Vend: Phase Two

https://www.anthropic.com/research/project-vend-2
150•kubami•6d ago•51 comments

Hungry Fat Cells Could Someday Starve Cancer to Death

https://www.ucsf.edu/news/2025/01/429411/how-hungry-fat-cells-could-someday-starve-cancer-death
8•mrtnmrtn•4h ago•0 comments

Text rendering hates you (2019)

https://faultlore.com/blah/text-hates-you/
159•andsoitis•6d ago•60 comments

Windows 2 for the Apricot PC/Xi

https://www.ninakalinina.com/notes/win2apri/
140•todsacerdoti•20h ago•31 comments

Immer – A library of persistent and immutable data structures written in C++

https://github.com/arximboldi/immer
95•smartmic•6d ago•11 comments

Show HN: Ez FFmpeg – Video editing in plain English

http://npmjs.com/package/ezff
379•josharsh•1d ago•188 comments

Liberating Bluetooth on the ESP32

https://exquisite.tube/w/mEzF442Q4hUXnhQ8HmfZuq
89•todsacerdoti•15h ago•13 comments

'PromptQuest' is the worst game of 2025 (trying to make chatbots work)

https://www.theregister.com/2025/12/26/ai_is_like_adventure_games/
4•dijksterhuis•54m ago•1 comments

An experiment in separating identity, memory, and tools

https://RCRDBL.com
12•promptfluid•1d ago•11 comments

Nvidia's $20B antitrust loophole

https://ossa-ma.github.io/blog/groq
491•ossa-ma•20h ago•156 comments

Say No to Palantir in the NHS

https://notopalantir.goodlawproject.org/email-to-target/stop-palantir-in-the-nhs/
416•_____k•17h ago•134 comments

Plugins case study: mdBook preprocessors

https://eli.thegreenplace.net/2025/plugins-case-study-mdbook-preprocessors/
14•ingve•6d ago•3 comments

Clock synchronization is a nightmare

https://arpitbhayani.me/blogs/clock-sync-nightmare/
199•grep_it•4d ago•133 comments

OrangePi 6 Plus Review

https://boilingsteam.com/orange-pi-6-plus-review/
181•ekianjo•1d ago•154 comments
Open in hackernews

Show HN: Stack Error – ergonomic error handling for Rust

https://github.com/gmcgoldr/stackerror
27•garrinm•7mo 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•7mo 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•7mo 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•7mo ago
I still prefer the Anyhow solution, but I like the approach here.
IshKebab•7mo ago
Isn't this strictly superior to Anyhow? What do you like more about Anyhow?
rhabarba•7mo 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•7mo 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•7mo ago
Might as well be my limited understanding from what I can read behind the link, to be fair.
garrinm•7mo 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•7mo 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•7mo 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•7mo 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•7mo 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•7mo 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