mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.6K
active users

#RustLanguage

0 posts0 participants0 posts today

Today's log for trying to get fiss (my Rust CLI for duplicating some of TaskWarrior's functionality using Forgejo issues) doing something useful. Tonight's goal is to get fiss list showing a list of issues to subscribe forge projects which no regards for filtering.

It's a weekday and I need to figure out how to assemble a weight machine, so hopefully this won't take wrong.

Narrator: Dylan was wrong, of course.

The rest will be unlisted.

Realized recently that you can get a decent approximation of lazy_static without any additional dependencies thanks to std's existing once stuff, something like this:

fn DB() -> &Connection {
   static CON: OnceCell = OnceCell::new();
   CON.get_or_init(|| { ... })
}
It's a pretty clean pattern that's easy to read I think, and doesn't require adding a dependency for the one or two lazy variables most projects need. It will be nice when stable gets actual Lazy/LazyCell though.

#rust #rustlanguage

I took a look at Rust lately and I'm totally confused about the lifetime of variables.

But I was able to write some small modules with some structures including some implementations. Maybe I will use it in the future for CLI applications if I want speed and security.

Right now I use spectre.cli and dotnet for the task.

Because I hate myself, I'm now working on rust bindings for the NXDK project. We'll see how much progress I can get done. Right now, I want to finish implementing the HAL.
Thanks to antangelo for making a lot of the boilerplate code and a couple of the HAL functions in the original. I couldn't have started this without forking.
github.com/the-pink-hacker/nxd
#NXDK #Xbox #OriginalXbox #OGXbox #Rust #RustLang #RustLanguage #OpenSource

GitHubGitHub - the-pink-hacker/nxdk-rs: Rust support for NXDKRust support for NXDK. Contribute to the-pink-hacker/nxdk-rs development by creating an account on GitHub.
rooftop[2] = Some(Cat {
color: Ginger,
position: Standing,
});
rooftop[6] = Some(Cat {
color: Black,
position: Lying,
});
rooftop[8] = Some(Cat {
color: Tortoiseshell,
position: Lying,
});
rooftop[10] = Some(Cat {
color: Ginger,
position: Lying,
});
rooftop[13] = Some(Cat {
color: Ginger,
position: Lying,
});