From: Philip Rhoades Date: 2010-10-09T02:24:07+09:00 Subject: Re: A Real World example for Ruby to "compiled" version discussion Phillip, On 2010-10-09 02:57, Phillip Gawlowski wrote: > On Fri, Oct 8, 2010 at 3:37 PM, Philip Rhoades wrote: >> People, >> >> I have accumulated the questions from different people into this response: > [snip /] >> For this particular discussion: >> >> for k in 1..K # generations >> for x in 1..X # array width >> for y in 1..Y # array height >> destroy parent ordered list >> destroy tmp ordered list >> offspring list becomes parent list >> for i in 1..I # organism in parent ordered list >> asexually reproduce offspring with possible mutation >> possibly migrate offspring to neighbouring array cell >> end >> end >> end >> end >> > > [snip /] > >> The code doesn't change - a configuration file and the starting (initial) >> generation can be changed. > > [snip /] > >> There are a couple of particular issues we wanted to investigate and my >> supervisor thought that the existing stuff that was around then (about nine >> years ago now) didn't conveniently allow us to do what we wanted - maybe it >> is has changed now but I haven't had much exposure to other programs. Also, >> a lot of them then were written in some sort of graphical environment for >> Windows or Macs and I wanted to have a CLI interface on Linux and have more >> direct control over what was happening . . > > This sounds like something JRuby would be good at it, since it can JIT > the loops, and the Java VM reaches nearly-native speeds these days. Native to what? Ruby, Java, C++ ? > So, yes, improved technology could make this faster these days. I would prefer to be able to produce stand-alone executables if possible . . Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: phil@pricom.com.au