frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

WrathBench − an Agent Workbench for World of Warcraft

https://wrathbench.shard.page/
2•stymaar•2m ago•0 comments

Big Tech uses guarantees to keep $300B AI exposure off balance sheets

https://www.ft.com/content/7f11afae-c4e3-4054-a65b-873f3647f563
4•sbulaev•8m ago•0 comments

Densha de Go

https://en.wikipedia.org/wiki/Densha_de_Go!
4•tosh•8m ago•0 comments

The First Nolan Movie: The Odyssey and the world after men change it

https://www.firstrand.co.za/perspectives/article.html?article=the-first-nolan-movie
3•theDillinger•12m ago•0 comments

The Shaky Evidence That Flock Cameras Reduce Crime Rates

https://reason.com/2026/09/18/the-shaky-evidence-that-flock-cameras-reduce-crime-rates/
3•pseudolus•17m ago•0 comments

Claude Code is getting native AGENTS.md support

https://github.com/anthropics/claude-code/tree/main/mods/agents-md
3•thisisfatih•17m ago•0 comments

Open-source AI PR reviewer that helps you ship

https://nitpicker.dev/
2•Bluestein•19m ago•0 comments

An Agent's Breath. The Heart Beats by Itself, Breathing Is a Choice

https://piotrzientara.pl/agent-breath/
3•piotrzientara•22m ago•0 comments

If you are browsing in Chrome / Firefox in desktop you should try this extension

https://chromewebstore.google.com/detail/digital-shield-tab-suspen/pkonihncnkmbejhhjadaognganhinnhc
2•digitaShida•23m ago•1 comments

The Cornetto Ice Cream Cone Framework for Prompting

https://hazn.com/cornetto
2•hazn•26m ago•0 comments

Ternary-Bonsai-8B-Gguf

https://huggingface.co/prism-ml/Ternary-Bonsai-8B-gguf
2•Bluestein•26m ago•0 comments

How Efficient Is Each Type of EV Charger? (2024)

https://insideevs.com/features/711659/ev-charger-efficiency-losses/
2•cisc•26m ago•0 comments

Show Your Work

https://jagasantagostino.com/blog/show-your-work
2•andsoitis•28m ago•0 comments

Tactile controls in a digital world (2024)

https://jenson.org/airpod/
2•andsoitis•33m ago•0 comments

Ask HN: What to focus on in this age of AI

2•yernarak•38m ago•1 comments

If AI coding is lowering your code quality, you're not managing quality right

https://www.i-kh.net/p/if-ai-coding-is-lowering-your-code
19•bucket2015•38m ago•11 comments

Humans Are the Only Real Agents

https://aboard.com/humans-are-the-only-real-agents/
2•k1m•39m ago•0 comments

velocity content marketing

https://www.briefiq.io/blog/what-is-content-velocity-in-seo-and-why-it-matters/
2•infofusioninnov•40m ago•0 comments

The Ma of a New Machine

https://jenson.org/ma/
2•andsoitis•46m ago•0 comments

Germany's green developers hit a wall: Insolvencies, tighter credit

https://www.briefs.co/news/germany-s-green-developers-hit-a-wall-insolvencies-tighter-c/
2•leonidasrup•49m ago•0 comments

Apache Cassandra 6 Accord transactions: What you need to know

https://www.instaclustr.com/blog/apache-cassandra-6-accord-transactions-what-you-need-to-know/
3•lewisl9029•50m ago•0 comments

Underclass: An OpenAI-compatible pooling proxy that pins sessions to one account

https://github.com/ghuntley/underclass
2•ghuntley•50m ago•0 comments

Romanian Crime Rings Are Draining U.S. Welfare Accounts

https://www.wsj.com/us-news/how-romanian-crime-rings-are-draining-u-s-welfare-accounts-c9750d32
3•impish9208•51m ago•1 comments

Scott Jenson: Are we going to use the same Desktop UX forever? [video]

https://www.youtube.com/watch?v=V7AfAcQwLW0
3•Topfi•51m ago•1 comments

Post Messages via Get

https://swarmmemo.com/
4•montenegrohugo•52m ago•1 comments

Doomsday: Friday, 13 November, A.D. 2026 (1960)

https://www.science.org/doi/10.1126/science.132.3436.1291
5•Metacelsus•53m ago•1 comments

DQuic: Extending QUIC for P2P and Multipath Transport

https://docs.dhttp.net/en/docs/protocol/dquic
2•Arya_xiaofan•53m ago•1 comments

Ask HN: If frontier models were free, would we produce better or worse software?

2•kandros•55m ago•0 comments

I'm Tired of the AI Tone

https://sagivo.com/blog/im-tired-of-the-ai-tone
22•sagivo•56m ago•18 comments

The Many Faces of Information Geometry [2023]

https://chinougea.medium.com/the-many-faces-of-information-geometry-89f6654c1cb4
3•the-mitr•1h ago•0 comments
Open in hackernews

Show HN: Stack Error – ergonomic error handling for Rust

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