From: Phlip Date: 2009-05-14T00:25:06+09:00 Subject: Re: what could be improved in Ruby for Science? Charles Johnson wrote: > With the advent of ruby 1.9.1, the only advantage here at ACCRE of > fortran, c and c++ is speed. The multi-threaded, multi-processor, > multi-node jobs that we see could just as easily be done in ruby with > the appropriate library support. However, the fortran libs that do > FFT, say, have been honed over the last 40 years to provide speeds > only slightly slower than code done in assembler. Ruby, java, python > simply do not offer that. That does not mean that ruby could not be > used to *drive* such code. As more and more people in our science > departments discover the advantages of using ruby to access pre-built, > pre-optimized libs the move to using ruby will continue. That is exactly how videogames work. The lowest layer is custom display hardware. Above that are drivers that manage huge strings of raw instructions. Above that is tuned C++ to manipulate the huge strings. And above that is a soft scripting language - typically Lua - to assemble the C++ primitives into programmable actors who interact in scenarios. When something is slow, you move it down one layer in the stack. So most new programming should happen in Lua, per the rule "premature optimization is the root of all evil". -- Phlip