kimwalisch / primesieve

🚀 Fast prime number generator
BSD 2-Clause "Simplified" License
942 stars 123 forks source link

printing large numbers of primes #127

Closed Zarathustrared closed 2 years ago

Zarathustrared commented 2 years ago

So I ran into a limit set by windows terminal: it only allows the printing of ~9000 lines of code. Since I was looking for more than 500,000 primes - this limit was problematic. This program however, is excellent at generating primes quickly.

The workaround is to install PuTTy, set up an ssh server on the windows machine, very easy, it is part of optional features, turn it on in powershell, ssh in using PuTTy to the windows ip address, set the putty scrollbuffer to 2 million, generate primes, copy and paste - you're done.

kimwalisch commented 2 years ago

There is nothing I can do about this, this is an issue of your particular terminal. However I added an example of how to store primes in a text file using primesieve since this has already been asked multiple times and you could also use this as a workaround: https://github.com/kimwalisch/primesieve/commit/316b9de3735e5097b87284548c0fb2ca8550abac

Zarathustrared commented 2 years ago

Awesome, cheers - the comment was for educational purposes only, since I ran into the terminal issue I assumed others maybe less savvy would too. Your workaround is an excellent hidden feature! Maybe add the example to the Command-line options as well, since many people look there when sorting things out.

If I win the field medal, I'll send you some cash.