frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

What Color is Your Function? (2015)

https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
1•tosh•5m ago•0 comments

Using a Nintendo Switch to Speed Up a 3D Printer

https://hackaday.com/2026/05/15/using-a-nintendo-switch-to-speed-up-a-3d-printer/
2•speckx•5m ago•0 comments

Where Did All the Soul Go?

https://arpl.dev/blog/where-did-all-the-sould-go
1•mooreds•7m ago•0 comments

Psyllium husk is being touted as nature's Ozempic

https://www.theguardian.com/wellness/2025/jun/11/what-is-psyllium-husk
1•rzk•9m ago•0 comments

Microsoft/Wil: Windows Implementation Library

https://github.com/microsoft/wil
1•Tomte•9m ago•0 comments

Playing Atari music on Amiga for free

https://arnaud-carre.github.io/2026-05-15-ym-fast-emu/
2•nopakos•9m ago•0 comments

JOOQ: The easiest way to write SQL in Java

https://www.jooq.org/
1•Tomte•10m ago•0 comments

Travelers on Air Force One ordered to throw away gifts, phones after China trip

https://techcrunch.com/2026/05/15/us-orders-travelers-on-air-force-one-to-throw-away-gifts-pins-a...
4•leopoldj•12m ago•0 comments

Azure Container Apps Express

https://techcommunity.microsoft.com/blog/appsonazureblog/introducing-azure-container-apps-express...
1•vyrotek•13m ago•0 comments

Trump leaves China with no agreement but cites 'good' talks with Xi

https://www.nbcnews.com/politics/donald-trump/trump-leaves-china-no-agreement-thorny-issues-cites...
1•kaycebasques•14m ago•1 comments

I'm Not Sorry

https://www.lrb.co.uk/the-paper/v48/n09/thomas-nagel/i-m-not-sorry
1•lermontov•15m ago•0 comments

The shift towards pay to play

https://rosie.land/posts/the-shift-towards-pay-to-play/
2•mooreds•16m ago•0 comments

The Slowest SR-71 Blackbird Fly-By (2017)

https://theaviationgeekclub.com/story-behind-famed-sr-71-blackbird-super-low-knife-edge-pass/
3•_Microft•17m ago•1 comments

YA3 – Yet Another TB-303 clone, that runs in the browser and as a DAW plugin

https://ya3.surge.sh/
1•stagas•17m ago•0 comments

Przybylski's Star: Still After All These Years

https://www.centauri-dreams.org/2026/05/15/przybylskis-star-still-bizarre-after-all-these-years/
2•JPLeRouzic•17m ago•0 comments

Kairos: The ancient Greek art of knowing when to act

https://bigthink.com/mini-philosophy/kairos-the-ancient-greek-art-of-knowing-when-to-act/
2•lschueller•21m ago•0 comments

Waymo recalls 3,800 robotaxis after they drive into flood waters

https://www.cnbc.com/2026/05/12/waymo-recalls-3800-robotaxis-after-able-drive-into-standing-water...
4•drob518•22m ago•0 comments

Building a UMatrix Replacement

https://lock.cmpxchg8b.com/umatrix.html
2•taviso•23m ago•0 comments

Ghost of long-extinct ancestor lives on in people today

https://www.science.org/content/article/ghost-long-extinct-ancestor-lives-people-today
1•gmays•24m ago•0 comments

Build a Full-Featured Text Editor from Scratch (Rust)

https://0xkiire.com/build-text-editor-from-scratch/
3•jabits•27m ago•1 comments

Apple Sold Out of Mac Minis and Mac Studios

https://www.apple.com/shop/buy-mac/mac-mini
1•adgjlsfhk1•30m ago•1 comments

Git Is Not Fine

https://www.billjings.com/posts/title/git-is-not-fine/
2•steveklabnik•32m ago•0 comments

What Is Code?

https://martinfowler.com/articles/what-is-code.html
1•BerislavLopac•41m ago•2 comments

Bidirectional typechecking that does not stop

https://semantic-domain.blogspot.com/2026/05/bidirectional-typechecking-that-does.html
1•fanf2•41m ago•0 comments

Why Gemma-4 26B MoE works in HuggingFace but breaks in prod inference engines

https://github.com/maeddesg/vulkanforge/blob/main/docs/gemma4_26b_moe_solution.md
1•maeddesg•41m ago•0 comments

Ask HN: Can I take Meta to court for banning business Insta or FB account?

7•milanspeaks•47m ago•3 comments

Linus Torvalds declares AI-fueled code surges as the new normal

https://www.neowin.net/news/linus-torvalds-declares-massive-ai-fueled-code-surges-as-the-new-norm...
3•ell1e•49m ago•0 comments

Goodgallery: WebGL sprite engine that can load 100k thumbnails in 1 second

https://ggdemo.s80.me/demo-100000/#fit
3•thunderbong•49m ago•0 comments

OpenAI's KOSA Endorsement Is Regulatory Capture with a Smiley Face

https://www.techdirt.com/2026/05/14/openais-kosa-endorsement-is-regulatory-capture-with-a-smiley-...
5•repelsteeltje•49m ago•0 comments

Elephants Still Don't Play Chess

https://whattotelltherobot.com/p/elephants-still-dont-play-chess
2•stefie10•49m ago•1 comments
Open in hackernews

Show HN: Stack Error – ergonomic error handling for Rust

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