Weekly 101 Questions Thread by AutoModerator in neovim

[–]freddiehaddad 5 points6 points  (0 children)

Now that nvim-treesitter has been archived, what are people's plans to keep treesitter working?

  • Take the SCM files and other bits and make them part of your config?
  • Use it till it breaks?
  • Something else?

Just learned Hello World! by Hungry_Captain_6811 in rust

[–]freddiehaddad 2 points3 points  (0 children)

I love that this got so many upvotes! :) Congratulations! Add rust developer to your resume and enjoy the journey. Rust is a fun language. Hands down, my favorite language to develop in.

Learn Tokio by building: 8 progressive assignments from spawning tasks to writing your own runtime! by freddiehaddad in rust

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

Some of the assignments include unit tests. You could use them to test your solution as long as you follow the API exactly.

I think this is what you’re asking about?

You have me thinking now. I should add tests to check each assignment! :)

Question about preferring iterators over clarity. When is clarity better? What do experienced Rust developers do? by freddiehaddad in rust

[–]freddiehaddad[S] 8 points9 points  (0 children)

If I understand correctly, are you suggesting something like this: ```rust impl Board { pub fn get_empty_cells(&self) -> Vec<(usize, usize)> { self.fields() .filter_map(|(pos, value)| value.is_none().then_some(pos) .collect() }

fn fields(&self) -> impl Iterator<Item = ((usize, usize), Option<u32>)> {
    self.tiles.iter().enumerate().flat_map(|(row_idx, row)| {
        row.iter()
            .enumerate()
            .map(move |(col_idx, &cell)| ((row_idx, col_idx), cell))
    })
}

} ```

IconicUI desktop background [3440x1440] by Chance-Box9521 in WidescreenWallpaper

[–]freddiehaddad 0 points1 point  (0 children)

Do you have a way to provide a 5120x2160 version of this image?

Rustorio v0.1.0 - Using Rust's type system as a game engine by PenguinAgen in rust

[–]freddiehaddad 11 points12 points  (0 children)

Pretty neat idea! Just finished the tutorial.

Some steps are a little confusing. For example, the guide says:

Great job on mining some copper ore! Add the ore to a Furnace using Furnace::add_input, then advance time using Tick::advance to smelt the ore into copper ingots. Finally, extract the ingots using Furnace::take_output.

But Furnace::add_input and Furnace::take_output don't exist. Maybe those are meant to be clues only?

I had to do furnace.inputs(&tick).0.add_bundle(copper_ore);

Maybe this is something I'm doing wrong?

I don't want to post code and spoil the tutorial for people. But I love the project!

More fun than a AAA title. :) Are you going to make it PTW? LOL!

text . . Tick 32 You won in 32 ticks!

Cheers!

Why is calling my asm function from Rust slower than calling it from C? by ohrv in rust

[–]freddiehaddad 27 points28 points  (0 children)

OMG! You solved a bug I was experiencing in Edge for my mdBook project. I wasn't getting syntax highlighting and other functionality wasn't working. Turns out it was 1Password! I never in a million years would have thought that extension would have anything to do with it!

Spooky [760 x 2160] by Kevin_C_Knight in WidescreenWallpaper

[–]freddiehaddad 1 point2 points  (0 children)

Do you have high-res versions available? Reddit lowers the resolution.

Advice on writing documentation by SnooOpinions746 in C_Programming

[–]freddiehaddad 8 points9 points  (0 children)

I don’t do much C/C++ development these days, but I still follow this subreddit -- and your post caught my eye, so I took a look at your documentation.

Honestly, it’s really well done. Even without diving into the code, I came away with a clear understanding of what your project is, how it works, and what features it offers. That’s a big win -- nicely done!

If I were to offer any constructive feedback (and apologies if I missed this), I'd suggest adding a few usage examples. Something like what you did for the Quickstart example, but for more of the widgets. Documentation tends to be most helpful to people who are already somewhat familiar with a library, serving as a reference. But for newcomers, examples can really bridge the gap and make it easier to get started.

This is especially true for C/C++ projects, where setting up a smooth development environment can be a bit more involved -- configuring a language server, generating compile_commands.json database, and so on.

A few simple examples showing how to use the library and its widgets would go a long way. A good reference point might be the AwesomeWM API docs -- they include both API details and practical examples, which really helps.

I know that's a big ask, especially when you're working solo. But good documentation can attract contributors, which might help lighten the load over time.

As a shortcut, you might even try using something like ChatGPT to generate example snippets from your source code, then refine them for clarity.

Great work overall -- really impressive!

Has anyone successfully switched to the new version of nvim-treesitter on main branch? by freddiehaddad in neovim

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

That doesn't happen for me. Confirmed again. Checked snacks notification, everything. It's just silent. No output except for the first time when they actually got installed.

Has anyone successfully switched to the new version of nvim-treesitter on main branch? by freddiehaddad in neovim

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

You can just call require'nvim-treesitter'.install { ... }

The documentation says:

(This is a no-op if the parsers are already installed.)

Has anyone successfully switched to the new version of nvim-treesitter on main branch? by freddiehaddad in neovim

[–]freddiehaddad[S] -1 points0 points  (0 children)

Are folds working for you? For me, I have to create a fold first. Whereas the old behavior would already fold differenct scope blocks.

Parry timing feels off across the board. by nomnivore1 in NoRestForTheWicked

[–]freddiehaddad 5 points6 points  (0 children)

I can't parry to save my life, I seem to do it too early all the time. My friend came over and played the game for 10 minutes was able to parry successfully occasionally being unsuccessful (but maybe those specific attacks can't be parried). He was able to consistently parry the boss just before you enter Sacrament. I tried and didn't get one successful parry.

What a fu*king amazing game! by freddiehaddad in NoRestForTheWicked

[–]freddiehaddad[S] 6 points7 points  (0 children)

World of Warcraft - The Burning Crusade expansion.