[HN Gopher] An error message if you put more than 2^24 items in ... ___________________________________________________________________ An error message if you put more than 2^24 items in a JS Map object Author : norescue Score : 37 points Date : 2021-08-27 21:05 UTC (1 hours ago) (HTM) web link (searchvoidstar.tumblr.com) (TXT) w3m dump (searchvoidstar.tumblr.com) | retbull wrote: | I feel like if you are working with genome levels of data maybe | you shouldn't be using JS to do the work. JS is a great tool in | some cases but not really a scientific one. I guess you use | whatever you know. | albertgoeswoof wrote: | This person is using tumblr as their blogging platform- I don't | think they are making great life choices overall | H8crilA wrote: | (Not being sarcastic at all) I remember the times when bringing | JavaScript anywhere near data analysis would be considered a | cute joke. | roberttod wrote: | TIL You can write javascript numbers with underscore separators | https://v8.dev/features/numeric-separators | codetrotter wrote: | Same in Python 3 and Rust too. | | https://www.python.org/dev/peps/pep-0515/ | | https://doc.rust-lang.org/rust-by-example/primitives/literal... | omegalulw wrote: | Interestingly, why do they specify base 10 integers as: | nonzerodigit (["_"] digit)* | "0" (["_"] "0")* | | Isn't digit (["_"] "0")* simpler? | Jasper_ wrote: | 012345 is the old way of doing octal notation in Python, | which has its roots in C. I'm guessing they want to prevent | ambiguity by making it so that it's an error for "012345" | to be a decimal literal. | dr_zoidberg wrote: | Yes, it gives an error -- if you want decimals, you can't | use leading 0's: Python 3.6.3 | (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 | bit (AMD64)] Type 'copyright', 'credits' or | 'license' for more information IPython 7.2.0 -- | An enhanced Interactive Python. Type '?' for help. | In [1]: 01 File "<ipython- | input-1-3351d58b1d3b>", line 1 01 | ^ SyntaxError: invalid token In | [2]: 0o1 Out[2]: 1 In [3]: 0o10 | Out[3]: 8 | de6u99er wrote: | And Java since Java7 which was released in 2011. | nayuki wrote: | Note that different languages have slightly different | syntax rules. | | 0_0: Legal in Java, legal in Python, illegal in JavaScript. | | 0__0: Legal in Java, illegal in Python, illegal in | JavaScript. | | 0x_0: Illegal in Java, legal in Python, illegal in | JavaScript. | | 0_, 0_.0, 0._0: Illegal in all three. | | It wouldn't surprise me if C# and C++(14) have differing | edge cases too. | banana_giraffe wrote: | And C# since 7.0 | | https://github.com/dotnet/csharplang/blob/main/proposals/csh. | .. | | First time I saw it was in C#, I love it personally | [deleted] | rbanffy wrote: | 16,777,216 keys ought to be enough for anyone. | fridif wrote: | What if I'm trying to model every atom in a multi-cellular | being? | l-lousy wrote: | Don't use JS | munk-a wrote: | Indeed - you'll want to upgrade to Basic. | Someone wrote: | That question doesn't show understanding of the relative | sizes of atoms and cells. | | https://www.thoughtco.com/how-many-atoms-in-human- | cell-60388...: | | _"According to an estimate made by engineers at Washington | University, there are around 1014 atoms in a typical human | cell"_ | | = it isn't necessary to use "multi-cellular" there by a wide, | wide margin. | kook_throwaway wrote: | PHP is webscale. | peanut_worm wrote: | I think you'd have a hard time modeling a single celled | organism | H8crilA wrote: | The difference between multi cell and single cell is not | the hard part. | CyberRabbi wrote: | If the user has the memory there should be no hard limit. Oh | wait... there's the pesky issue of memory overcommit... | xsmasher wrote: | It COULD be written to be infinitely scalable in size (up to | allowed memory) but that comes with a speed cost. | | I remember something about NSArray switching its layout (and | speed characteristics) after adding certain number of items, | but I can't find a reference now. | [deleted] | Mountain_Skies wrote: | Ran into something similar years ago on the Blackberry where if | you created more than 2^15 objects, performance could drop by | something like 90%. There was no error but the performance hit | was bad enough to make the app unusable. | sillysaurusx wrote: | A year or two ago, I helped the Cloud TPU team fix an obscure | error when creating more than 200 TPUs. | | Apparently no one had ever tried to create more than 200 TPUs | before (https://battle.shawwn.com/swarm-training-v01a.pdf). I was | pretty proud of that. | | (As a bonus, I actually wanted to use all 200 TPUs. It wasn't | merely a stress test. Big data indeed!) | ZeroCool2u wrote: | Here I was having fun with my p3.16xlarge at work today, that's | awesome! | sillysaurusx wrote: | If you like playing with ridiculous amounts of hardware, | definitely try out TPU VMs with TFRC: | https://blog.gpt4.org/jaxtpu | | You can create up to 5 TPU v3-8's in europe-west4-a. Each | core is _roughly_ equivalent to a V100, so it 's sort of like | having 5 p3.16xlarge's. (The TPU has 96 CPUs and 330GB of | system RAM, whereas a p3.16xlarge has 64 CPUs and 488GB of | system RAM according to https://aws.amazon.com/ec2/instance- | types/p3/). | | The best part IMO is that you don't have to figure out how to | link the cores together. JAX does that for you automatically. | You get 100GigE from TPU to TPU too, which you can also | leverage: | https://twitter.com/theshawwn/status/1406171487988498433 | CamperBob2 wrote: | Wow, that docdroid site is toxic waste. Don't click on anything | but the back button if you follow that link. | sillysaurusx wrote: | Sorry. As an AI outsider, I wasn't sure how to publish to | arxiv, so I used the first PDF hosting site I could find. | I've mirrored it to https://battle.shawwn.com/swarm- | training-v01a.pdf and edited my original comment with that | instead. Thanks for pointing that out. | mastrsushi wrote: | I always read these with my arms crossed like "pffffff yeah | obviously" | H8crilA wrote: | There's no limit for array size in C++, or for any core | structure. Other than int/size types, which naturally scale up | as we get newer architectures (2^64 for most people at the | moment). | jdeaton wrote: | The actual mistake here was trying to do bioinformatics in | javascript. ___________________________________________________________________ (page generated 2021-08-27 23:00 UTC)