Re:what are you guys smoking?
on
Beyond Java
·
· Score: 0
But you might want to use Ruby (or something like it) for the main part of your code, and use C for the small part of the code that really needs to be really fast. For example, there is a project by Piet Hut and Jun Makino to develope a model of dense stellar systems as an example of modelling complex physical phenomena.
Ruby combines the flexibility of a scripting language with the power of a fully object-oriented programming language. For a large-scale software project, such as the development of the Kali code, it is essential to use data encapsulation, such as offered by C++. However, when developing new code, it is impossible to know beforehand what the best data structures will look like. Rapid prototyping, all but impossible in C++, is equally essential for developing code that is well-thought-out and easy to read, not stuck in a legacy of historical data design decisions.
Is Ruby Fast Enough?
No, Ruby by itself is too slow for serious scientific simulations. However, it is straightforward to replace a few time-critical lines of Ruby code with C code, thereby speeding up the original Ruby code to a speed that can approximate that of C code without much trouble. See Vol. 14: Speedup for detailed examples.
In one issue of the (alas) long defunct 1960s and 1970s undergraduates' mathematics magazine "Manifold" http://www.jaworski.co.uk/index.html there was a story (not in the issues so far put online) of a mathematician coming across two people counting - one by one - the lights in the ceiling of a newly built large room at a new university. He helped them, saying something like "there are 18 rows of lights with 12 lights in each row, so that's 216 lights", only to be met by the response: "No, we need the exact number of lights."
In World War 2 tins of Spam were sent to the Soviet Union to assist their war effort (as food, in case anyone wonders), and were known as 'second fronts'.
Cue Soviet joke from about 1943: Q. What is an 'old believer'? A. Someone who still believes in a second front. (The Soviet Union was trying very hard to persuade the other Allies to open a land based second front to relieve the pressure.)
There's a very good book, 'Russia's War' by Richard Overy, which is even better than Stalingrad by Anthony Beevors.
On spam (as opposed to Spam), I've wondered for some time why we don't just call it 'ejunk', sent by 'eejots' (an attempt to reproduce the rather attractive Irish pronounciation of 'idiots').
But you might want to use Ruby (or something like it) for the main part of your code, and use C for the small part of the code that really needs to be really fast. For example, there is a project by Piet Hut and Jun Makino to develope a model of dense stellar systems as an example of modelling complex physical phenomena.
...
The Art of Computer Science: FAQshttp://www.artcompsci.org/rel/faq.html
Why Use Ruby?
Ruby combines the flexibility of a scripting language with the power of a fully object-oriented programming language. For a large-scale software project, such as the development of the Kali code, it is essential to use data encapsulation, such as offered by C++. However, when developing new code, it is impossible to know beforehand what the best data structures will look like. Rapid prototyping, all but impossible in C++, is equally essential for developing code that is well-thought-out and easy to read, not stuck in a legacy of historical data design decisions.
Is Ruby Fast Enough?
No, Ruby by itself is too slow for serious scientific simulations. However, it is straightforward to replace a few time-critical lines of Ruby code with C code, thereby speeding up the original Ruby code to a speed that can approximate that of C code without much trouble. See Vol. 14: Speedup for detailed examples.
In one issue of the (alas) long defunct 1960s and 1970s undergraduates' mathematics magazine "Manifold" http://www.jaworski.co.uk/index.html there was a story (not in the issues so far put online) of a mathematician coming across two people counting - one by one - the lights in the ceiling of a newly built large room at a new university. He helped them, saying something like "there are 18 rows of lights with 12 lights in each row, so that's 216 lights", only to be met by the response: "No, we need the exact number of lights."
In World War 2 tins of Spam were sent to the Soviet Union to assist their war effort (as food, in case anyone wonders), and were known as 'second fronts'.
Cue Soviet joke from about 1943:
Q. What is an 'old believer'?
A. Someone who still believes in a second front.
(The Soviet Union was trying very hard to persuade the other Allies to open a land based second front to relieve the pressure.)
There's a very good book, 'Russia's War' by Richard Overy, which is even better than Stalingrad by Anthony Beevors.
On spam (as opposed to Spam), I've wondered for some time why we don't just call it 'ejunk', sent by 'eejots' (an attempt to reproduce the rather attractive Irish pronounciation of 'idiots').