<commit_before>def table prime_list:int[] max
	count = max - 2
	for i = 0, i < max, i = i + 1
		prime_list[i] = 0
	end
	for i = 2, i * i < max, i = i + 1
		if prime_list[i] == 0
			for k = i * 2, k < max, k = k + i
				if prime_list[k] == 0
					prime_list[k] = 1
					count = count - 1
				end
			end
		end
	end
	count
end

N = 10000000
prime_list = new N int
GC
puts "found " table(prime_list N) " primes between 2 and " N
# for i = 2, i < N, i = i + 1
# 	if prime_list[i] == 0
# 		puts(i, " is prime")
# 	end
# end<commit_msg>edit example<commit_after>def table prime_list:int[] max
	count = max - 2
	for i in 0..max-1
		prime_list[i] = 0
	end
	for i = 2, i * i < max, i += 1
		if prime_list[i] == 0
			for k = i * 2, k < max, k += i
				if prime_list[k] == 0
					prime_list[k] = 1
					count = count - 1
				end
			end
		end
	end
	count
end

N = 10000000
prime_list = new N int
puts "found " table(prime_list N) " primes between 2 and " N
{'fraction_non_alphanumeric': 0.1283138918345705, 'fraction_numerical': 0.04559915164369035, 'mean_word_length': 2.2439862542955327, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3705167', 'n_tokens_mistral': 487, 'n_tokens_neox': 401, 'n_words': 147}