I just wrote my first non-trivial program in Io. It felt very comfortable, and I felt productive. I didn't struggle over every square inch like I do in languages like Ocaml. It felt like a weird mix of Lisp and JavaScript. Anyway, the program I wrote is a prime finder--yes, how geeky. Here it is: #!/usr/local/bin/io /* * Find prime numbers. See usage for more information. * * Author: JJ Behrens * Date: Sat Nov 5 19:50:21 PST 2005 * Copyright: (c) JJ Behrens * Description: * * The algorithm used to determine if a given number, n, is prime is to keep a * list of pairs (p, mc) where each p is a prime less than n and each mc is n * % p. If n is prime, then no mc is 0. The effeciency of this algorithm is * wholly determined by how efficiently one can maintain this list. mc does * not need to be recalculated using a full % operation when moving from n to n * + 1 (increment and then reset to 0 if mc = p). Furthermore, another * performance enhancement is to u
This is a purely technical blog concerning topics such as Python, Ruby, Scala, Go, JavaScript, Linux, open source software, the Web, and lesser-known programming languages.
Ad maiorem Dei gloriam inque hominum salutem.