• 2 posts
  • 0 comments
Joined 6 years ago
Cake day: May 31st, 2020

Always had the problem that if I wanted to just log an error, rather than bubble it all the way up to main(), that you wouldn’t get a stacktrace. You could iterate the source chain and plug the stacktrace together yourself, but it’s rather complex code.

Now I realized, you can do this to get a stacktrace:

let error = todo!("Get an error somehow...");
let error = anyhow::anyhow!(error); //converts to an `anyhow::Error`
eprintln!("Error with stacktrace: {error:?}");

For converting to an anyhow::Error, it often also makes sense to use anyhow::Context like so:

use anyhow::Context;
let error = error.context("Deleting file failed.");

In various point-and-click adventure games, you could enter natural language instructions, way before LLMs were a thing.

And for FMV-style titles, real actors got photographed and filmed to create much more photorealistic games than you could ever hope for with motion capturing, raytracing or by using two GPUs to implant creepy photograph snippets onto rendered gameplay.

So, clearly, we weren’t ready yet for point-and-click games. 💩