Show newer

@blackle one of mastodon's strengths is that it is very hard to be famous on mastodon

@LottieVixen@dev.glitch.social I'm proud of you.

You persevered in the face of a difficult challenge, and didn't give up ♥

@catoutofbed@octodon.social sleep well, lovely cute jess ♥

@LottieVixen@dev.glitch.social oh right
you can't modify a list while iterating through it, because you could break the iteration

sorry

@LottieVixen@dev.glitch.social *realises she remembers even less rust than she thought*

oops

Whispher to me those three beautiful words 

@lucidiot@tiny.tilde.website yes let's!!

Whisper to me those three beautiful words 

Carly Rae Jepsen

@LottieVixen@dev.glitch.social afaik you can't make variables without assigning some value to them

@LottieVixen@dev.glitch.social yeah, but now you can't get an element

imagine sorting the list [3,2,1]

you're gonna look through for the lowest one, so after one iteration you have

result = [1]
list = [3,2,1]

but now you're ignoring the first element, so your second iteration will only see

list = [2,1]

and you'll select 1 again

and so after all 3 iterations, you'll get a result of [1,1,1]

@LottieVixen@dev.glitch.social then why are you only looking from iterator onwards in the list?

@LottieVixen@dev.glitch.social it looks like you're trying to do both the "in place" and "out of place" version at the same time

Show older
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!