zlacker

[return to "Tell HN: Launch HN Test"]
1. mothso+j1[view] [source] 2020-04-03 08:24:35
>>gruseo+(OP)
Hi dang

This was a good test but it failed some key characteristics to make it an excellent test message.

You didn't put foo or bar anywhere in the test message.

There was no Cthulhu phrases.

Plus there was no pi or the numerical answer to the universe and everything.

I trust you will take this onboard for the next test.

◧◩
2. batter+Y1[view] [source] 2020-04-03 08:31:02
>>mothso+j1
Also, how does he know that number-containing strings will work if the title isn't "Test123"??
◧◩◪
3. _-____+p2[view] [source] 2020-04-03 08:35:09
>>batter+Y1
"0123Test" is a better number-containing string for testing, to catch out things that try to interpret the string as a number first and then as a string if that fails. For example, JS's insane parseInt function will give you 123 for "0123Test".
◧◩◪◨
4. yread+b5[view] [source] 2020-04-03 09:11:42
>>_-____+p2

   > parseInt("0123Test")
   123
   > 0123
   83
parseInt is actually the adult in the room
◧◩◪◨⬒
5. TeMPOr+f5[view] [source] 2020-04-03 09:12:57
>>yread+b5
In a way. The convention is that 0123 is "123" in octal.
◧◩◪◨⬒⬓
6. yread+D9[view] [source] 2020-04-03 10:10:01
>>TeMPOr+f5
Yes, I know that's why I even tried it in console as I was a bit surprised that parseInt doesn't do octal.

Why does js even support octal? I never found octal particularly useful. Speak hexadecimal or die

◧◩◪◨⬒⬓⬔
7. sweene+ec[view] [source] 2020-04-03 10:45:34
>>yread+D9
Because C does.
[go to top]