Mostly, this works out well enough: dyn compatibility pretty much just insists your methods can in fact work with just a reference to an unknown variant of the type.
5,132 karma · joined April 5, 2019
Mostly, this works out well enough: dyn compatibility pretty much just insists your methods can in fact work with just a reference to an unknown variant of the type.
FWIW I write primarily rust, and I do not agree with the advice given in your second point, so I’d take it with a grain of salt were I you.
It’s my favorite language to write, and it gets much easier over time. As a first approximation, if you’re doing something and it feels insanely difficult like the GP is talking about, try to think of a different way to do it rather than fighting it. There’s usually a way to do almost anything, but it’s more pleasant to lean into the grooves the language pushes you towards.
The docs for the function to interpret trailers even says this explicitly: https://git-scm.com/docs/git-interpret-trailers
> Add or parse structured information in commit messages
As a corollary, I also want to know if a project posted here is predominantly vibe-coded, since that to me is a signal that it may be of lower quality, have fewer edge cases worked out, and is more likely to be abandoned in the near future.
Means that my CI pipeline can be ~instantly moved to any provider, or a box that I own, or whatever.
Even if it is only translation, I am not interested in reading LLM output in the context of a book, and I would feel betrayed if I learned that the translation was machine-generated if I had purchased a copy.
For the amount you’re charging, you could have hired a human translator. Either way, just like with a book translated by a human, you should disclose that the actual words in the book were not written by you. “Author: Vivian Voss, Translated By: Claude Opus” or whatever.
I’m sure others feel differently, and you may find success among that crowd.
Send/Sync/static is not needed on tokio’s local runtime, which doesn’t require any adjustments to your libraries.
Passing data between threads requires Send/Sync/static, except for certain cases like scoped threads, so making OS threads faster doesn’t seem to solve that issue like using a local runtime would.
Many async libraries (though certainly not all) are runtime-independent. If your library doesn’t have to spawn, it is easy to write runtime-independent code. I would like to see some spawn traits brought into std to make it easier to write libraries that have to spawn, though.
I’ll always try new ways of doing things, but you are making the assumption that the way you feel is the way everyone feels, and totally dismissing the opinions of those who don’t. It puts me off of whatever solution you might be proposing, since you clearly don’t have the empathy to understand the full range of positions of the people whose problems you’re ostensibly trying to solve.
I’m not trying to convince you the way you feel is wrong, but you are wrong that everyone thinks writing async code is miserable. There are times where it’s hard, or where the compiler emits confusing messages about async closures being not generic enough, but on the whole I enjoy writing async rust, so shoot me.
You also don’t need to spawn() futures to await them. Spawn enables parallelism on the multithreaded runtime, holding join handles, etc. If all you need is to execute concurrent code, though, the various combinators and functions in the futures crate lets you do so without having hard requirements on Send/Sync. The large majority of the concurrent code I write uses nothing specific from the tokio crate, including spawn.
As is often the case in rust, the compiler is also telling you the correct thing. If you’re using the multithreaded runtime and spawning, your code may execute in another thread, so it has to be Send/Sync, and since the ownership of the future is transferred to the executor, it must also be ‘static.
I don’t know a single non-tech person who has positive feelings about AI in that sphere.
More than once, we have wanted to improve the performance of some path and been able to lift the sequential model into a stream, evaluated concurrently with some max buffer size. From there, converting to true parallel execution is just a matter of wrapping the looped futures in Tasks.
Obviously just sprinkling an async on it isn’t going to make anything faster (it just converts your function into a state-machine generator that then needs to be driven to completion). But being able to easily and progressively move code from sequential to concurrent to parallel execution makes for significant performance gains.
There are a few discussions around this, so I'm hopeful to see it implemented at some point:
- https://github.com/niri-wm/niri/discussions/1318
One thing I learned in the process was that the custom wayland desktop world has the concept of a "desktop shell," which provides most or all of the additional components you might want on top of your compositor, rather than having to separately install a top bar, manage suspend/hibernate, figure out notifications, etc. You can of course still do all of that, but you can also just install niri and something like the "dank material shell"[0] and be off to the races. I first discovered this via awesome-niri[1].
The combination of niri and the shell means that the extent of my custom NixOS configuration for the two is entirely limited to keybindings and some custom window rules for zoom.
And if you want AI integration at your choice and control, agent-shell (and chatgpt-shell, which is LLM-agnostic despite the name) are great packages. They’re totally hackable with elisp like you’d expect, which I personally haven’t done a ton with, because I use AI pretty sparingly, but I imagine the crowd here could come up with plenty of ideas for how to program your editor and your agent interface together.