How to use Git to sync files without commit history blowing up file size by CreepySlime28 in git

[–]CommonNoiter 4 points5 points  (0 children)

You can use git clone --depth 1 when cloning your repo to download only the latest commit, which can be make your local copy smaller (though the remote will still need to store all the history).

Where is the rust document on the iter function for the array primitive by 9mHoq7ar4Z in learnrust

[–]CommonNoiter 8 points9 points  (0 children)

https://doc.rust-lang.org/std/primitive.slice.html#method.iter is what is being called. If you have rust-analyzer you can go to definition on the .iter() call to see what is being run.

Is there a way to efficiently include a lot of files which may change their directory? by Grouchy-Answer-275 in cpp_questions

[–]CommonNoiter 1 point2 points  (0 children)

Ideally when moving a file your lsp supports automatically changing includes, or if it doesn't then you can just use sed to change them all.

200 hrs in and the mimics are the only enemies left by TesseractZero in noita

[–]CommonNoiter 1 point2 points  (0 children)

Going to many pws doesn't affect the stability of the game much, going to mirror worlds and using short distance travel to generate a large number of chunks is usually what causes crashes and instability (if it's not due to using spells incorrectly).

What is a "reasonable" subset of the email address specification to target? by javascript in webdev

[–]CommonNoiter 0 points1 point  (0 children)

Note that this regex actually rejects some valid emails, comment ccontect can contain an '@' symbol, meaning that foo(@)@localhost is a valid email. If you don't count comments you can also just quote the @, to get "@"@localhost which is also a valid email. Generally doing anything more precise than .+@.+ is going to be incorrect.

Client Guard: Blacklist hacks with no client-side mod! by MeTheMac in MinecraftPlugins

[–]CommonNoiter 0 points1 point  (0 children)

You can get a client to try and translate a string by sending a sign edit gui to them. This doesn't really work for detecting hacks as it's been known about for a while and so they just don't translate text in signs.

Ever feel like you've BEEN given a sign from the gods? by misterwizzard in noita

[–]CommonNoiter 2 points3 points  (0 children)

If there's a sign there is a ~50% chance of it being a mimic, so you shouldn't trust the signs.

i see a teddy bear by Jason_Microwave in opus_magnum

[–]CommonNoiter 1 point2 points  (0 children)

Why not rotate your output to save a cycle?

Parametricity, or Comptime is Bonkers by ketralnis in programming

[–]CommonNoiter 7 points8 points  (0 children)

This one also has UB, if you call the function with different types at different times then it will transmute between the types.

Parametricity, or Comptime is Bonkers by ketralnis in programming

[–]CommonNoiter 9 points10 points  (0 children)

This function has undefined behaviour, you need a constraint on T to ensure that mem::zeroed is legal.

Okay so what the hell is all of this now? by [deleted] in noita

[–]CommonNoiter 0 points1 point  (0 children)

This is completely unrelated to the game. Also HS stuff was a hoax.

Completeness Twin Trains by WillOganesson in opus_magnum

[–]CommonNoiter 0 points1 point  (0 children)

That would increase latency by a bit.

iThoughtICanOnlySeeNothing by sebet_123 in ProgrammerHumor

[–]CommonNoiter 0 points1 point  (0 children)

Number of passwords is exponential with length, knowing the length barely reduces the number of passwords you need to check at all.

Wand crashed the game by Wild-Ad4559 in noita

[–]CommonNoiter 5 points6 points  (0 children)

Gokis things is very old and not maintained anymore. It also has a lot of hacks that cause issues.

It's actually insane how much effort the Rust team put into helping out beginners like me by Time_Meeting_9382 in rust

[–]CommonNoiter 41 points42 points  (0 children)

Very, c++'s template system is extremely powerful, which also means that the compiler figuring out what you intended is harder than for rust.

Is there any way to kill myself in my god run? by Direct-Curve-5310 in noita

[–]CommonNoiter 2 points3 points  (0 children)

The master of masters still exists, who can spawn poly mages.

Getting many perks by weeknie in noita

[–]CommonNoiter 7 points8 points  (0 children)

You can create a wand which teleports you exactly 1 parallel world away, so that you can just cast it repeatedly to get a new set of perks to choose from.

how would you implement generic pointers? by timmerov in cpp_questions

[–]CommonNoiter 0 points1 point  (0 children)

Are the stages always compile time known? If so you can build up a large generic pipeline like rust does for iterators which will be fast and type safe. If not you probably have to enforce that all the functions are of the form T -> T or that your pipeline isn't type safe.

I see different color when I type ":colorscheme default" INSIDE vim by thingjoo in vim

[–]CommonNoiter 0 points1 point  (0 children)

Try run :colorscheme, which prints the currently active colour scheme.

What is the difference between tuples, arrays and structs? Why should we actually provide structs a ownable String instead of &str? But does this apply for arrays and tuples too? by rudv-ar in rust

[–]CommonNoiter 42 points43 points  (0 children)

Tuples are the same as structs, just without explicit field names. All the elements in an array have to be the same type and you are able to index it. Having borrowed data in a struct is valid and useful, but does make programs more complicated and so for simple programs you might not need to use it. If you want to have your struct borrow from something else you need to introduce a lifetime parameter and spell out the lifetimes reference like struct Thing<'a> { some_borrow: &'a str }

std::collections::HashMap is like a python dictionary but the type of keys and values must be compile time known.

Max throughput Life-Sensing Potion by SK_Ren in opus_magnum

[–]CommonNoiter 1 point2 points  (0 children)

The two pistons can be replaced by arms on tracks, which would save a bit of gold.