@vaporeon_ some people don't like the ++ shit because it leads people to make logical errors, which I will admit just happened to me in the recent holly for loop hellthread
@vaporeon_ += 1 more reason I prefer javascript to python
@vaporeon_ @aescling @monorail also this thread makes me certain that "I'm not sure I would give enough of a shit in a code review because either way would look Weird" was the right answer all along
@vaporeon_ @aescling @monorail yeah that's what i would do (actually I would do ++idx, ++i but it objectively doesn't matter)
@monorail anyway I was nice and comfy in my bed and this made me get up to use my computer so every one of my followers better favorite this
@monorail probably should be ++i. oh well!
@monorail here's my final answer:
let i = 0;
for (
let idx = currentSignal.length;
i < matches[0].length && matches[0][idx] === matches.at(-1)[idx];
idx += i++
);
@vaporeon_ I was not aware of this feature!
Apparently you can create "labelled statements" for anything considered a "statement", for which I believe include for, while, switch, and if/else if/else
@vaporeon_ it would be found here: https://web.archive.org/web/20160507105653/http://summerofgoto.com/js/goto.js
@vaporeon_ after a little searching someone in 2009 made a preprocessor for the language that adds goto but the library can only be found in an internet archive page and the internet archive is currently down
@vaporeon_ nope
@vaporeon_ @alas oh I wouldn't have thought to do it with a do while, this is neat
my evil code golfing brain wants the i++ snuck into the previous line but that kind of thing tends to get you in trouble
by the way you also need i<matches[0].length in the conditional
@aescling @vaporeon_ whenever I end up writing something like that I tend to convert it to a while loop but that's just a style thing
the clodvestigator
i answer to Caleb, Clodsire, Clodboy, Clod, and Bumby. very leftist.
videogame enjoyer. mathematics hobbyist and recovering physicist. recovering software engineer. professional wonk. prophet of The Truth. the walking embodiment of "not diagnosed, but somethings wrong". i like animals that wear cowboy hats.
number of fat cock awards received: 56
header is by @vaporeon_
"i regret ever allowing him here" ~aescling
"oh you're one of those weird movie likers" ~Ti
30+
he/him