frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

How Mark Klein told the EFF about Room 641A [book excerpt]

https://thereader.mitpress.mit.edu/the-whistleblower-who-uncovered-the-nsas-big-brother-machine/
439•the-mitr•9h ago•136 comments

Opus 4.7 knows the real Kelsey

https://www.theargumentmag.com/p/i-can-never-talk-to-an-ai-anonymously
167•ilamont•1d ago•103 comments

CopyFail was not disclosed to distro developers?

https://www.openwall.com/lists/oss-security/2026/04/30/10
377•ori_b•9h ago•304 comments

Can I disable all data collection from my vehicle?

https://rivian.com/support/article/can-i-disable-all-data-collection-from-my-vehicle
515•Cider9986•5h ago•194 comments

Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

https://semgrep.dev/blog/2026/malicious-dependency-in-pytorch-lightning-used-for-ai-training/
331•j12y•10h ago•111 comments

The Internet Is Falling Down- CPanel/WHM Authentication Bypass CVE-2026-41940

https://labs.watchtowr.com/the-internet-is-falling-down-falling-down-falling-down-cpanel-whm-auth...
45•zikani_03•3h ago•15 comments

I built a Game Boy emulator in F#

https://nickkossolapov.github.io/fame-boy/building-a-game-boy-emulator-in-fsharp/
221•elvis70•9h ago•48 comments

Maladaptive Frugality

https://herbertlui.net/maladaptive-frugality/
20•herbertl•2d ago•3 comments

Claude Code refuses requests or charges extra if your commits mention "OpenClaw"

https://twitter.com/theo/status/2049645973350363168
970•elmean•11h ago•544 comments

The upsell game – Vercel upselling tactics revealed

https://theupsellgame.com/
104•bartoindahouse•6h ago•18 comments

How an oil refinery works

https://www.construction-physics.com/p/how-an-oil-refinery-works
332•chmaynard•12h ago•101 comments

New mechanical panoramic film camera from Jeff Bridges

https://wideluxx.com
83•armadsen•2d ago•33 comments

Reverse Engineering SimTower

https://phulin.me/blog/simtower
126•patrickhulin•2d ago•21 comments

Belgium stops decommissioning nuclear power plants

https://dpa-international.com/general-news/urn:newsml:dpa.com:20090101:260430-930-14717/
756•mpweiher•14h ago•709 comments

You can beat the binary search

https://lemire.me/blog/2026/04/27/you-can-beat-the-binary-search/
258•vok•3d ago•121 comments

Snowball Earth may hide a far stranger climate cycle than anyone expected

https://sciencex.com/news/2026-04-snowball-earth-stranger-climate.html
37•wglb•4h ago•4 comments

Durable queues, streams, pub/sub, and a cron scheduler – inside your SQLite file

https://honker.dev/
178•ferriswil•11h ago•51 comments

Full-Text Search with DuckDB

https://peterdohertys.website/blog-posts/full-text-search-w-duckdb.html
93•ethagnawl•8h ago•23 comments

10Gb/s Ethernet: what I did to get it working in my home

https://www.gilesthomas.com/2026/04/10g-ethernet-what-i-did
150•gpjt•1d ago•107 comments

I aggregated 28 US Government auction sites into one search

https://bidprowl.com
245•scarsam•13h ago•73 comments

The Church Rock Uranium Mill Spill

https://en.wikipedia.org/wiki/Church_Rock_uranium_mill_spill
63•Sir_Twist•2d ago•4 comments

Does Postgres Scale?

https://www.dbos.dev/blog/benchmarking-workflow-execution-scalability-on-postgres
86•KraftyOne•7h ago•40 comments

A Milestone in Formalization: The Sphere Packing Problem in Dimension 8

https://www.alphaxiv.org/abs/2604.23468
14•measurablefunc•2d ago•0 comments

Compositing and Blending – Exploring the math and intuition behind blend modes

https://nik.digital/posts/compositing-blending
17•OuterVale•1d ago•1 comments

The Accidental Ancestor – How Verifying Numbers Shaped Modern Hashing

https://0xkrt26.github.io/math_behind_security/2026/04/28/the-accidental-ancestor-Luhn-algorithm....
10•denismenace•2d ago•0 comments

SimpleX Channels, SimpleX Network Consortium and Community Crowdfunding

https://simplex.chat/blog/20260430-simplex-channels-v6-5-consortium-crowdfunding-freedom-of-speec...
19•pmw•5h ago•2 comments

Spain's parliament will act against massive IP blockages by LaLiga

https://www.democrata.es/en/politics/congress-and-senate/congress-will-act-against-massive-ip-blo...
418•akyuu•10h ago•174 comments

$500M for Virtual Biology Initiative, Funded by Zuckerbergs

https://biohub.org/news/virtual-biology-initiative/
22•warbaker•1h ago•10 comments

Follow-up to Carrot disclosure: Forgejo

https://dustri.org/b/follow-up-to-carrot-disclosure-forgejo.html
45•homebrewer•6h ago•7 comments

Recovering files from beyond the grave using PhotoRec

https://lost-number.bearblog.dev/recovering-files-from-beyond-the-grave-using-photorec/
54•speckx•8h ago•11 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