count primes up to 100000

as a common benchmarkable task
nicer Ruby version

instead of making an array of all numbers, then scratching them out,
just keep an array of primes, as in other solution. Also it looks more
rubyish now.
lua

this was harder than I expected…