frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Let's Quit Open Source and go for Human Source (HSL 0.2)

https://github.com/xdgrulez/human-source-license
2•xdgrulez•2m ago•1 comments

The Pareto principle is how AI takes jobs

https://www.msn.com/en-us/money/smallbusiness/the-pareto-principle-is-how-ai-actually-takes-jobs/...
2•galaxyLogic•6m ago•0 comments

I Bought Friendster for $30k – Here's What I'm Doing with It

https://ca98am79.medium.com/i-bought-friendster-for-30k-heres-what-i-m-doing-with-it-d5e8ddb3991d
2•ca98am79•6m ago•0 comments

MoQ Boy

https://moq.dev/blog/moq-boy/
1•mmcclure•7m ago•0 comments

Neal Stephenson: The Real Threat Isn't AI, It's Us [video]

https://www.youtube.com/watch?v=pUSWa5hOCtU
2•mindcrime•7m ago•0 comments

In Kannauj, perfumers have been making monsoon-infused mitti attar for centuries

https://www.atlasobscura.com/articles/smell-of-rain-kannauj-perfume-mitti-attar-india
1•bcaulfield•10m ago•0 comments

Semantic segmentation reveals unexpected disk galaxies in the early universe

https://blogs.nvidia.com/blog/ai-gpu-early-universe-astronomy/
1•bcaulfield•11m ago•0 comments

Embedding a 3D scene in a React app, SSR-safe – Vectreal viewer walkthrough

https://vectreal.com/news-room/react-viewer-integration
1•Vectreal-Admin•12m ago•1 comments

Show HN: AgentSwarms – free hands-on playground to learn agentic AI, no setup

https://agentswarms.fyi/
2•rohan044•13m ago•0 comments

Principia Softwarica: Fundamental Literate System Programs

https://principia-softwarica.org/
1•pratikdeoghare•13m ago•0 comments

Kenya's Sebastian Sawe becomes first man to run sub two-hour marathon

https://www.cnn.com/2026/04/26/sport/sabastian-sawe-marathon-world-record
2•rappatic•15m ago•0 comments

Exponentially Smoothed FPS Counters

https://blog.wilsworld.net/posts/2026_04_25-Exponentially_Smoothed_FPS_Counters
1•mightyham•17m ago•0 comments

Town of 7000 planned so many data centers, it's like adding 51 Walmarts

https://www.washingtonpost.com/nation/2026/04/26/archbald-pennsylvania-data-centers/
2•tcp_handshaker•19m ago•0 comments

How the Preview App Solves iOS Document Signing

https://www.steaktek.com/mobile/how-the-preview-app-finally-solves-ios-document-signing/
1•Newspaperworld•21m ago•0 comments

Pyptx – A Python DSL to Write Nvidia PTX for Hopper and Blackwell

https://github.com/patrick-toulme/pyptx
1•jxmorris12•23m ago•0 comments

Don't fall for the rigged college game (2025)

https://www.nytimes.com/2025/09/22/opinion/college-admissions-seniors-stats.html
2•loughnane•26m ago•0 comments

Message Brokers Are Modern Grids

https://yusufaytas.com/message-brokers-are-modern-grids
3•mostlymike•27m ago•0 comments

Fast16: The Cyberweapon That Predates Stuxnet by Five Years

https://hackingpassion.com/fast16-pre-stuxnet-cyber-sabotage/
5•dd23•29m ago•0 comments

Is Product Design another casualty of AI?

https://twitter.com/gokulr/status/2048132579099062313
3•regera•35m ago•0 comments

Sergey Brin Confronted Gavin Newsom

https://www.bloomberg.com/news/articles/2026-04-26/how-google-s-sergey-brin-helped-fuel-a-politic...
6•arunsivadasan•35m ago•0 comments

CachyOS Introduces New Default GUI Package Manager, Kyber for NVMe I/O Scheduler

https://www.phoronix.com/news/CachyOS-April-2026
2•Bender•38m ago•0 comments

I built a hiring platform that watches engineers work in a real CAD tool

6•mind_uncapped•39m ago•0 comments

Thermoacoustic heat pumps on the verge of commercial breakthrough

https://www.pv-magazine.com/2026/04/23/thermoacoustic-heat-pumps-on-the-verge-of-commercial-break...
3•simonebrunozzi•40m ago•1 comments

White House Correspondents' Dinner gunman Cole Allen's full anti-Trump manifesto

https://nypost.com/2026/04/26/us-news/read-whcd-gunman-cole-allens-full-anti-trump-manifesto/
5•Bender•40m ago•2 comments

Near-instantly aborting the worst pain imaginable with psychedelics

https://psychotechnology.substack.com/p/near-instantly-aborting-the-worst
3•maxutility•41m ago•0 comments

How OpenAI Kills Oracle

https://www.wheresyoured.at/how-openai-kills-oracle/
6•napolux•42m ago•0 comments

Who's developing Golden Dome's orbital interceptors if theyre ever built

https://arstechnica.com/space/2026/04/this-is-whos-developing-golden-domes-orbital-interceptors-i...
3•Bender•43m ago•0 comments

Why do note-taking apps store everything but connect nothing?

https://dotreader.info
4•efecerre•44m ago•1 comments

A.I. is creating engineers who can't think without it

https://www.koshyjohn.com/blog/ai-should-elevate-your-thinking-not-replace-it/
80•koshyjohn•44m ago•77 comments

If you stop hiring juniors, your senior engineers own you

https://evalcode.com/posts/if-you-stop-hiring-juniors-your-seniors-own-you/
53•milkglass•46m ago•33 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