Skip to content

Instantly share code, notes, and snippets.

View jmiven's full-sized avatar

Vivien Moreau jmiven

  • France
  • 03:07 (UTC +02:00)
View GitHub Profile
@jmiven
jmiven / main.pony
Created April 25, 2018 02:05
Concurrent prime number sieve
// Finds prime numbers up to the value of the first argument or 100.
// Terribly inefficient but fun.
// Source: http://www.cs.dartmouth.edu/~doug/sieve/sieve.pdf
actor Main
let max: I32
let sink: Prime
new create(env: Env) =>
max = try env.args(1)?.i32()? else 100 end