News for hackers. Stuff that matters.
Re:Every possible pun of the form ‘You put the X in Y’ by Xevi on Friday November 06, 2020 @04:26PM (#25011337)
What the...

Is that a function with a 560000+ lines long comment inside of it, that gets turned into a string, then sliced, and split on newlines, then assigned to a global variable that gets used in another global function?

It took a minute just to open the source code in my browser. Chrome used 5.2GB of RAM while viewing the source code, just for that tab.

Re:Every possible pun of the form ‘You put the X in Y’ by Gene_Parmesan on Friday November 06, 2020 @06:13PM (#25012026)
This is one of those things I would have just assumed was impossible, so never would have tried. Not that I should try something like this, mind, but it is a good reminder not to underestimate these machines we have.
Re:Every possible pun of the form ‘You put the X in Y’ by umvi on Friday November 06, 2020 @04:43PM (#25011472)
Yeah! Just goes to show you can make a cool thing that is really quick and dirty under the hood.

You could make this page load instantly by making the random selection happen in the backend instead of in the browser, but then I guess it would no longer just be a static file.

You could also just have a compact array of pairs and then generate the sentences in the browser instead of having half a million pre-generated strings.