Well, this was sort of a milestone, so I have to put it here.
I'm learning the programming language Python. A lot of what I plan to do has to do with composition and musical set theory. However, for now, I'm just doing small projects that interest me.
One of these "small projects" expanded . . . exponentially?
Last night, I ran one of my simple, beginner-level Python scripts and managed to find the first 23 Mersenne primes. The final one was a 3,376-digit monster. Computing all of them took 7 hours and 31 minutes as a background task on my computer.
I've got the full story on my Wordpress blog, along with version 5 of the mersenne.py script that produced this result.
However, get a load of this -- even running so intense a calculation, the Python interpreter never went above 1% memory usage. Compare that to Java -- just turning on the Java Virtual Machine (which I usually have on, to run Azureus) takes up 12-14% of my memory.
I'm learning the programming language Python. A lot of what I plan to do has to do with composition and musical set theory. However, for now, I'm just doing small projects that interest me.
One of these "small projects" expanded . . . exponentially?
Last night, I ran one of my simple, beginner-level Python scripts and managed to find the first 23 Mersenne primes. The final one was a 3,376-digit monster. Computing all of them took 7 hours and 31 minutes as a background task on my computer.
I've got the full story on my Wordpress blog, along with version 5 of the mersenne.py script that produced this result.
However, get a load of this -- even running so intense a calculation, the Python interpreter never went above 1% memory usage. Compare that to Java -- just turning on the Java Virtual Machine (which I usually have on, to run Azureus) takes up 12-14% of my memory.














Comments:
kga245 (May 23, 2007. 12:25am)
You had me at "milestone"
bmccosar (May 23, 2007. 02:09am)
Thanks -- did you try out the script? I'm interested in other people's results.
CrystallineTulip (May 23, 2007. 05:20am)
LOL at kga245! I'm happy for you, Bruce...at least, I think so.
kga245 (May 24, 2007. 03:39pm)
Nope I didn't try it out. But I would if I knew how. :-)
bmccosar (May 24, 2007. 04:36pm)
Ah, I misunderstood. Since this site is so spiffy, I thought you might be using some sort of scripting language, and Python's not a bad guess. If you have Python installed, just copy the script into a file and run the file via the interpreter. If not, no worries. I just posted it because in my day, an integer was something that went up to 32,768. Later it went up to the 32 byte limit. And here I find this language that doesn't bother you with limits -- it works just as well on 1354 x 729 as it does (1,354 digit number) x (729 digit number).
kga245 (May 24, 2007. 04:58pm)
Ruby on Rails. Close, but not identical. And I promised my developers I would touch nothing. So I haven't learned RoR...yet. I'm an old ColdFusion hack. Now I'm pretty much out of the coding scene and working on running the show instead. It's a fun life - as you might have witnessed - but it pains me that my coding skills are so far out of reach now. It would be nice to tinker more, but, alas, there are only so many hours in the day.