Welcome to the Lounge
The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.



If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.





Little Bobby Tables got himself a driver's license...





Was it in a computer class in high school or college? Did you implement an algorithm?
Sieve of Eratosthenes  Wikipedia
I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.





School I think, certainly well before I met my first computer, or even programmable calculator!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!





Ditto. IIRC, this was not long after we learnt division.
Ad astra  both ways!





I learned about the Sieve of Eratosthenes shortly after I was asked to drain the Pasta of Eratosthenes.
This space for rent





I never saw it in high school or college. Of course, that was back before Eratosthenes was even born. We did computing on punch cards made from antelope skin where we punched the holes using an awl made from the jawbone of a yak.
You don't even want to know what it was like when the reader jammed...
Software Zen: delete this;





Gary Wheeler wrote: You don't even want to know what it was like when the reader jammed...
Where did you get the jam? Surely this was BS (Before Supermarkets)
Ad astra  both ways!





The reader was a wooly mammoth in a perpetually bad mood.
Software Zen: delete this;





Found it on my own reading as I learned about the necessity of prime number use in public/private key cryptography.





In my case it was a book  Algorithms in C++ (Bryan Flamig) ... around 1995 ...





I just had to google it.
That means something, no ?
I'd rather be phishing!





It means that your knowledge of the Classics could be better...
Ad astra  both ways!





Yes.
And how many learned the process (if not the name) from Stephen King?
For me, it was due to a Pascal class (circa 1985?), but I had to go to the library to find a book that understood it better than the teacher.
modified 9May18 19:18pm.





Hmmm,
I don't know but for many years from around ~19972004 I had about a dozen workstations running the distributed GIMPS client[^].
Best Wishes,
David Delaune





Ages ago in school. I remember it was among the first algorithm we implemented when the new Commodore Plus/4 computers arrived at school... After the VIC 20 it was a huge improvement, so we did a lot of graphical presentations of anything in math and physics...
But then I got my personal C64...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942 2018





Eratosthenes told me when I was a little child. However I didn't pay attention to him, playing with marbles was far more fun.





And now you've lost your marbles as well?






About 4 of years back while solving Project Euler problems. I ended up writing this:
public class NthPrimeNumber
{
public string GetNumber()
{
long number = 0;
// All prime numbers are denoted by 6n+1 or 6n1 format. So, assumming for
// 10001st number, n is 100000 (in fact it will be lesser than this)
bool[] isComposite = new bool[1000002];
// Since this method will find more than 10001 prime numbers, track how many have been
// found already and once we have 10001 as the count, stop
int primeNumberCount = 0;
int upperBoundRoot = (int)Math.Sqrt(1000001);
for (int i = 2; i <= upperBoundRoot; i++)
{
if (!isComposite[i])
{
primeNumberCount++;
if (primeNumberCount == 10001)
{
number = i;
break;
}
for (int k = i * i; k <= 1000001; k += i)
isComposite[k] = true;
}
}
// if the count is not 10001 yet, there are more numbers to find
for (int i = upperBoundRoot; i < 1000001; i++)
{
if (!isComposite[i])
{
primeNumberCount++;
if (primeNumberCount == 10001)
{
number = i;
break;
}
}
}
return number.ToString();
}
}
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]





Learned it in Math class. I'm way too old to remember when exactly.
The world is going to laugh at you anyway, might as well crack the 1st joke!
My code has no bugs, it runs exactly as it was written.





5th grade math class (1964) what's a computer class? I liked it so much that I would do it to 100 on a blank sheet during idle moments. My other numbers game was doubling from 1 to get powers of 2. That would have been a couple of years earlier.
In theory, theory agrees perfectly with practice.
In practice, this is virtually never the case.
"*the {VOiCE} says: The truth is analog  not digital."  jonathan HICKMAN





I learned about the Sieve of Eratosthenes in my naive past after i thought i had come up with a novel approach at finding primes since you could use part of this sieve approach to compute primes in parallel (don't get me started). When i found out it was just a modified version of his sieve I fell into depression and never tried to do anything novel again. J/K...but seriously.





From Carl Sagan's Cosmos (original version)






General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.