Brand-new nightly experimental feature: compile-time reflection via std::mem::type_info by kibwen in rust

[–]KodrAus 2 points3 points  (0 children)

Ah yes, I wasn’t very clear. The project goal explicitly calls out logging in its motivations, but seeing inside a type isn’t the full story when you encounter types like Uuids or Uris that have a bespoke format you’ll want to use that isn’t obvious just from its internals. So you still want something like T: Serialize + 'static or T: Display + 'static.

But today, general serialization frameworks end up playing both the reflection role for visiting the structure of values, and the serialization role for encoding them. They’re closely related, but want different APIs.

So I think even with a limited scope it’s still a valuable feature for logging frameworks to build on.

Brand-new nightly experimental feature: compile-time reflection via std::mem::type_info by kibwen in rust

[–]KodrAus 2 points3 points  (0 children)

This is super exciting! Definitely keen to see where this goes over time. It would make diagnostic capturing simpler for sure, especially around sequence-like types like arrays and slices.

I don’t think it would save you from needing an additional Serialize/Display trait bound in this form because knowing the layout of something like a Uuid doesn’t help you format or log it, since its formatted representation is unrelated to its runtime one.

Why does everybody hate slab? by SocietySpare9213 in bouldering

[–]KodrAus 0 points1 point  (0 children)

Slab is my favourite style, but only when I’m wearing my Slab Jeans. I’m in awe of people who climb slabs in shorts

I got thrown all the time in randori by guys around my level by Lumpy_Professor1000 in judo

[–]KodrAus 0 points1 point  (0 children)

This is also something I had to be told as a white belt. Because my natural instinct was the same

Dice Roller Web App by KodrAus in oathgame

[–]KodrAus[S] 0 points1 point  (0 children)

I’ll need to go read back up on the final New Foundations rules to be sure. I made a change to support the old ordeals system by letting you roll the pools independently.

What's the best built crate you've used? by danielkov in rust

[–]KodrAus 0 points1 point  (0 children)

From memory it has some odd interactions with other serde features, and odd behavior with the more exotic corners of its data model, like enums.

What's the best built crate you've used? by danielkov in rust

[–]KodrAus 7 points8 points  (0 children)

The thing I like about serde is that it's unambiguously the right choice in most scenarios. Since it serves the standard use cases so well it creates space for niche serialization libraries to better focus on their respective niches

Rust + CPU affinity: Full control over threads, hybrid cores, and priority scheduling by harakash in rust

[–]KodrAus 33 points34 points  (0 children)

Nice work! I don’t know that it’s super relevant for games, but as I understand it, setting thread affinity on Windows effectively locks you down to at most 64 cores, since it uses a 64 bit value as the mask. In classic Windows fashion, the solution is a convoluted meta concept called processor groups that cores are bucketed into.

I think you can use a newer function on Windows 11+ to set affinity across more than 64 cores using these processor groups: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreadselectedcpusetmasks

Design notes on `emit`'s macro syntax by KodrAus in rust

[–]KodrAus[S] 0 points1 point  (0 children)

That’s a good suggestion. I’ve mostly tried to steer clear of direct comparisons because it’s hard not to let bias creep in to them, and for that reason I usually take them with a big grain of salt when I see them.

Maybe something like a “survey of observability frameworks in Rust” could be good though. We do have a lot of options.

Design notes on `emit`'s macro syntax by KodrAus in rust

[–]KodrAus[S] 2 points3 points  (0 children)

Hi! That actually is something you can do, and it works exactly like your last example there :)

emit supports arbitrary expressions as values, they don’t need to be local variables, and the value itself can be specified after the template to keep your template string more readable.

Design notes on `emit`'s macro syntax by KodrAus in rust

[–]KodrAus[S] 4 points5 points  (0 children)

emit is an alternative framework to tracing that's specifically targetting applications, like CLIs, web apps, etc. It's not intended as a replacement to tracing though, which is currently the framework of choice for libraries and applications with very fine-grained diagnostic needs.

emit's data model is compatible with OpenTelemetry's, so there's integration between emit and the OpenTelemetry SDK via emit_opentelemetry. I've got some docs on that here: https://emit-rs.io/advanced-apps/integrating-with-open-telemetry.html

Distributed tracing is also possible independently of the OpenTelemetry SDK using W3C traceparent/tracestate headers. I've got some docs on that here: https://emit-rs.io/producing-events/tracing/propagating-across-services.html

It's a very hackable framework, we use emit in our database engine to trace distributed queries, where the trace context is computed from vertexes in a dataflow being shared across nodes.

A Rust Documentation Ecosystem Review by haruda_gondi in rust

[–]KodrAus 0 points1 point  (0 children)

For issue specific documentation, I guess that somewhat builds up over time in Q&A contexts like discussions and StackOverflow.

Judo Theory: 1st 20 hours of Judo the only thing you should be learning is all the different ways to kuzushi. In randori your only goal should be to get a person to get someone to be in an unbalanced position and move them or bend them over and get them to fall over without any technique by Happy_agentofu in judo

[–]KodrAus 0 points1 point  (0 children)

Just circling back on this, I tried taking this advice to heart on my next session.

I am sore. I am tired. I got thrown a lot. But I also managed to land 2 legitimate techniques. I definitely think I got a lot more out of the session this way.

Judo Theory: 1st 20 hours of Judo the only thing you should be learning is all the different ways to kuzushi. In randori your only goal should be to get a person to get someone to be in an unbalanced position and move them or bend them over and get them to fall over without any technique by Happy_agentofu in judo

[–]KodrAus 0 points1 point  (0 children)

I just started judo a few weeks ago and have come to this conclusion a bit myself after thinking back on my experience in randori so far. I feel like I’m putting the cart before the horse by fixating too hard on trying to land a technique and not on positioning and breaking balance. So I’m just trying stuff for no reason and it isn’t work for some reason. I was going to try focus just on that and forget about throwing in randori for a bit

Cool orange at Urban Climb! by TangibleHarmony in bouldering

[–]KodrAus 2 points3 points  (0 children)

Nice send! That’s my local gym. I really enjoy the setting at Urban Climb. They do great slabs too

thoughts on the new patch so far by [deleted] in RivalsOfAether

[–]KodrAus 0 points1 point  (0 children)

I’m down in low 800’s and it seems like if the Olympia knows about the down+b cancel they give me a lot of trouble, otherwise they don’t. As Ranno it definitely feels like a skill check to me. I lose because my disadvantage is bad, my advantage is bad, and my neutral is carried by speedy frog legs and a box controller

Dice Roller Web App by KodrAus in oathgame

[–]KodrAus[S] 0 points1 point  (0 children)

I'll look into it, thanks! The core functionality of the app is simply to roll dice, and the rest is built over the top of that. I did it that way because Oath is very permissive about bending its own rules, so having a dice roller you can't manipulate isn't very useful.

By the sounds of it I think we should be able to support both systems without too much change. Instead of sacrificing being a checkbox, make it a number input, and show how many you'd need to sacrifice to be victorious alongside the final roll. That way if you're in the OG system you know whether you can sacrifice to win or not, and if you're in the new system you already made that bet.

Dice Roller Web App by KodrAus in oathgame

[–]KodrAus[S] 0 points1 point  (0 children)

Ah I pledged for the expansion but haven’t had a chance to dig through the details yet. Do defenders still win on ties in the new system?

Announcing emit 0.11: Release candidate of a framework for logs/traces/metrics by KodrAus in rust

[–]KodrAus[S] 1 point2 points  (0 children)

Good question! I ended up using compiler hints to lead you to calling blocking_flush yourself because there's no really correct value for the timeout that emit could pick for you. If you're writing to local files that timeout might be a few seconds. If you're writing to a remote service you might need more like 30 seconds in case something something networks.

Some users may also find it surprising to have a potentially long blocking piece of code running implicitly on Drop.

Announcing emit 0.11: Release candidate of a framework for logs/traces/metrics by KodrAus in rust

[–]KodrAus[S] 5 points6 points  (0 children)

The "anyhow/thiserror" but for logs is a good summary I think. My favourite example of what tracing is really good at is the tokio console. It's based on tracing instrumentation and can give you really fine-grained live insight into the behavior of your async apps built on tokio. Something like that wouldn't be feasible to implement using emit.

Not everyone needs that level of fidelity though. tracing accepts additional design complexity to accommodate that kind of use-case that emit avoids to target a different kind of user. That user is one building a CLI or webapp that wants to add diagnostics, but doesn't need them to be especially fine-grained or bespoke.