And Gerald Sussman went on to write, with Julie Sussman and Harold
Abelson, "The Structure and Interpretation of Computer Programs" which
should be an eye-opener to anyone who has thought of C as the
prototypical programming language.
Thanks to MIT's open course ware program, 21 hours of video of Sussman and Abelson teaching a course of the same name are available here:
And Gerald Sussman went on to write, with Julie Sussman and Harold
Abelson, "The Structure and Interpretation of Computer Programs" which
should be an eye-opener to anyone who has thought of C as the
prototypical programming language.
Thanks to MIT's open course ware program, 21 hours of video of Sussman
and Abelson teaching a course of the same name are available here:
What level of programmer is this stuff aimed at? I want a Ruby compiler (see previous message) but am interested generally and would like to know more but I am a biologist and not really a serious low-level coder . .
Thanks,
Phil.
--
Philip Rhoades
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
And Gerald Sussman went on to write, with Julie Sussman and Harold
Abelson, "The Structure and Interpretation of Computer Programs" which
should be an eye-opener to anyone who has thought of C as the
prototypical programming language.
Thanks to MIT's open course ware program, 21 hours of video of Sussman
and Abelson teaching a course of the same name are available here:
What level of programmer is this stuff aimed at? I want a Ruby compiler (see previous message) but am interested generally and would like to know more but I am a biologist and not really a serious low-level coder . .
Thanks,
Phil.
The book was the text for the introductory programming course at MIT. The preface, describing the teaching of the material over several years to 600-700 students, says:
Most of these students have had little or no prior formal training in computation, although many have played with computers a bit and a few have had extensive programming or hardware-design experience.
MIT, of course, is not a trade-school and this book is not really about the Scheme language. Its about computation and programming itself. Perhaps it will help to think of it as being like an introduction to cell biology as opposed to a cook book for a sushi chef. (Ignore the metaphor if it doesn't resonate.)
You can download the book at the cost of a little bandwidth. I suggest you do so and read the forward, preface, table of contents, then skim the first chapter and flip thru the rest of the book. Note that it ends with a compiler and garbage collector. Then you can make an informed decision about how much time to devote to it.
As for a Ruby compiler, a useful one is very unlikely for many reasons. Now a compiler for a different language that has a distant family resemblance to Ruby may be possible but likely of not much practical use.
Lisp, Scheme, Forth and Smalltalk are all compilable so in principle Ruby should be as well. It's just not clear that there's any real gain by doing so outside of very particular applications (i.e. dominated by maths or interpretation performance bottlenecks). Moreover multicore is teasing us towards a world where all processing will be a negligible cost compared to I/O latencies and throughput, much as was the case fifty years ago.
As for a Ruby compiler, a useful one is very unlikely for many reasons. Now a compiler for a different language that has a distant family resemblance to Ruby may be possible but likely of not much practical use.
As for a Ruby compiler, a useful one is very unlikely for many reasons. Now a compiler for a different language that has a distant family resemblance to Ruby may be possible but likely of not much practical use.
Lisp, Scheme, Forth and Smalltalk are all compilable so in principle Ruby should be as well. It's just not clear that there's any real gain by doing so outside of very particular applications (i.e. dominated by maths or interpretation performance bottlenecks). Moreover multicore is teasing us towards a world where all processing will be a negligible cost compared to I/O latencies and throughput, much as was the case fifty years ago.
I have just reread all the messages in this thread and decided not to finish a draft reply that was already too long. In summary, I argued that possible language implementations lie on a continuum with "pure" compilers and interpreters at the extremes, and most implementations for real languages somewhere in the middle. Therefore, it is not very productive to discuss whether a Ruby compiler is possible, but instead focus on solutions to the specific problems that cause people to ask about compilers for Ruby.
In this thread, only Philip Rhoades has mentioned a real application that he would like to be able to reprogram in Ruby and still have run times comparable to C. Perhaps he can expand, preferably in a new thread, on his program and the benefits he hopes to achieve by moving the work to Ruby.
In this thread, only Philip Rhoades has mentioned a real application that he
would like to be able to reprogram in Ruby and still have run times
comparable to C. Perhaps he can expand, preferably in a new thread, on his
program and the benefits he hopes to achieve by moving the work to Ruby.
Just to clarify, here's what he originally wrote:
I have an actual existing application (C/C++) for population genetics simulations
which I would dearly love to convert to Ruby.
It was originally all in C and, as a learning exercise, I converted parts of it to C++ - but it was such a pain .
. it would have been so pleasant to re-write in Ruby.
However I would have to get resulting code converted back to C or compiled somehow to
get the performance back to something usable.
It's not clear from this whether he has actually tried to recode the
program in Ruby or this is still a gedanken experiment.
The first step would be to try to re-code in Ruby and see where the
performance bottlenecks resulting from the conversion, if any, were.
Then optimizing these steps either by rewriting the Ruby or converting
selective code to C extensions might get him to the performance he
seeks, or at least acceptable performance.
···
On Wed, Oct 6, 2010 at 9:11 AM, William Rutiser <wruyahoo05@comcast.net> wrote:
--
Rick DeNatale