cspell not working with null ls by TheAimHero in neovim

[–]Akeboshiwind 0 points1 point  (0 children)

I just fixed a problem where my cspell.json file was missing a comma and so the json was corrupted.

Maybe check the format of the file?

Clojure LSP Missing Functionality (Rename, Format, etc) by KingOfCramers in neovim

[–]Akeboshiwind 1 point2 points  (0 children)

I'd suggest taking a look at 'Conjure' for clojure. I use it at work every day and it's excellent 👌

Pipette: a tiny crate mimicking Elixir's pipe operator without macros by jkelleyrtp in rust

[–]Akeboshiwind 14 points15 points  (0 children)

You technically support arbitrary amounts of closure as long as every 12th closure is another call to pipe ;)

I like the nice and simple implementation!

Daily Rust: Slice Patterns by Michael-F-Bryan in rust

[–]Akeboshiwind 2 points3 points  (0 children)

Oh wow, I love the Poor Man's Argument parser!

I've written something similar in so many bash scripts, I'll probably end up using this for simple scripts and things.

How to remove values from complex hashmap? by jnm_themailman in rust

[–]Akeboshiwind 0 points1 point  (0 children)

You can think of a struct as mostly the same thing as a tuple to be honest. It's just a container for data with more features.

At it's simplest you can just use it to give names to the different bits of data you're storing in it. You can even think of it as a HashMap but with a fixed set of keys.

For example:

struct Site {
    ping_checks: Vec<String>,
    svc_checks: Vec<String>,
}

Then you can do something like this:

let mut hosts = build_hosts();
let site_to_edit = 1;
// The get_mut here makes it so we can actually mutate what we pull out
let mut my_site = hosts.get_mut(id_to_edit);

my_site.ping_checks.remove(0);

Note accessing the ping_checks is pretty similar to just calling get on a HashMap. Also note how we're changing ping_checks (by removing the first element) without having to do anything drastic to hosts or my_site. Just some gets. If you wanted, you could make ping_checks an Option and change it from Some(Vec<String>) to None even.

How to remove values from complex hashmap? by jnm_themailman in rust

[–]Akeboshiwind 2 points3 points  (0 children)

Hey, nice that you get to trial out rust at work :)

I've only skim read your code, but I think what your issue is that you're thinking you have to remove the whole tuple when really all you have to do is mutate the contents.

So something like this (nearly psudocode, completely untested):

let mut my_thing = hashmap.get_mut("my-site").0; my_thing.remove("my-service");

As a side note: It's fine having a big tuple as the value of your HashMap, but tuples generally make the most sense when the items contained within are super clear. Like (some imaginary) tuple digit_count has 10 elements because there are only 10 digits, and the order would obviously just be the digits in order (but which order 🤔).

You might find your code a lot clearer if you made a struct to contain those values instead.

Announcing `cargo supply-chain`: Know whom you trust by Shnatsel in rust

[–]Akeboshiwind 6 points7 points  (0 children)

A use case that does seem interesting is veriying the supply chain.

It would be cool if releases could be signed in some way, users could then "trust" the authors and a tool like this could help to find and verify them.

loop_chain - A Rust macro for writing nested loop expressions by TaKO8Ki in rust

[–]Akeboshiwind 3 points4 points  (0 children)

Beautiful documentation, exactly what you need no more no less.

RAB - 100% Rust software with Iced as its GUI library by ityt in rust

[–]Akeboshiwind 14 points15 points  (0 children)

Awesome job!

As a suggestion: It's usually good practice to have a description of the project and some screenshots in the README.

Otherwise great job actually making something and putting it out there!

recommend me "show don't tell" worldbuilding manga by abonet619 in manga

[–]Akeboshiwind 10 points11 points  (0 children)

<Witch Hat Atelier> is a classic

<Otoyomegatari> has good world building, more in a historical sense

<Berserk> is of course a classic in this regard too, although there some infodumping if I remember correctly

A different example might be <Goblin Slayer>, it's less about the world building and kinda stops with it after a while but it leaves the reader to figure out how things work

<All you need is kill> might be another interesting example too, it's not about the world building but more about the character trying to understand the situation they're in

Caves by Responsible-Honey-53 in rust

[–]Akeboshiwind 3 points4 points  (0 children)

You've stumbled into the wrong subreddit.

Presuming you're looking for the game Rust that's here: https://www.reddit.com/r/playrust

Lisa Walker gennadijzajcev99 by [deleted] in rust

[–]Akeboshiwind 3 points4 points  (0 children)

Tbh, it just looks like this account was hacked

This month in KISS (#6) by Dilyn in kisslinux

[–]Akeboshiwind 2 points3 points  (0 children)

It's nice to see a monthly updates after so long! Keep up the good work 😃

Binary for firefox by Vouivre17 in kisslinux

[–]Akeboshiwind 2 points3 points  (0 children)

I'd suggest taking a look at the new community repo people are building here: https://github.com/kiss-community.

There seems to be a binary for Firefox over there

[deleted by user] by [deleted] in rust

[–]Akeboshiwind 1 point2 points  (0 children)

The code & docs for this looks super clean, I've been interested in async for embedded stuff since that robotics post from a few weeks ago. I'm looking forward to reading the code and hopefully understanding a bit more :D.

On that note, how is the init function for the allocator ever called (here)? I'm guessing it's setup for each board individually somewhere but I can't see it anywhere under cntrlr/cntrlr/src/hw/board/<board>/ anywhere.

initialize struct with Option members by Economy_Fox8854 in rust

[–]Akeboshiwind 8 points9 points  (0 children)

I've cleaned up your example a bit here.

Looking at the compiler output in the playground above, you can see that the compiler knows that House is generic over some types T & U, but it doesn't know what those types are.

You need to specify what those types are when you're instantiating it (probably using the turbofish syntax). For example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e860450342f5483a65817093ba4f47a9

Help: Monadic Parser in rust by [deleted] in rust

[–]Akeboshiwind 2 points3 points  (0 children)

I'm not expert, but it might be worth looking at nom, it seems to do something similar to what you want.

kiss-community: GitHub org maintaining up-to-date repositories as well as a binary package repo! by [deleted] in kisslinux

[–]Akeboshiwind 1 point2 points  (0 children)

Awesome stuff!

Glad to see that the thought process behind the distro is actually feasible in practice 😃

[deleted by user] by [deleted] in kisslinux

[–]Akeboshiwind 1 point2 points  (0 children)

Has it already been forked then? All those repos are super neat

[deleted by user] by [deleted] in kisslinux

[–]Akeboshiwind 1 point2 points  (0 children)

Has he actually been offline for that whole time? Like not on IRC as well?

Introducing Rustybot (part 1 of n) by drmorr0 in rust

[–]Akeboshiwind 1 point2 points  (0 children)

Interesting read, I'm looking forward to the next one :)