News for hackers. Stuff that matters.
Re:Show HN: Every Day Is Pi Day by oneeyedpigeon on Tuesday March 14, 2017 @12:17PM (#13868813)
Wow, not even an efficient data structure, just an almighty string! On one hand, that's pretty disgusting. On another, it's an impressive demonstration of just how fast everything is nowadays; I wonder if the javascript interpreter in my browser does any kind of optimisation on that string in order to perform such gargantuan indexOfs.
Re:Show HN: Every Day Is Pi Day by theandrewbailey on Tuesday March 14, 2017 @12:31PM (#13868961)
I think a 6MB string is preferable to calculating pi to 6+ million digits in JS on each load.
Re:Show HN: Every Day Is Pi Day by oneeyedpigeon on Tuesday March 14, 2017 @12:42PM (#13869071)
I certainly wasn't suggesting that! Surely there's a superior data structure than a string, though.
Re:Show HN: Every Day Is Pi Day by Xophmeister on Tuesday March 14, 2017 @01:06PM (#13869347)