4 ms·
>which drives coders away from C, which harms (a different type of) portability. I'd say writing as much code as possible in other languages (whether guile or
by lmm 14y ago
>which drives coders away from C, which harms (a different type of) portability.
I'd say writing as much code as possible in other languages (whether guile or perl/python/ruby/java/...) improves portability. C code tends to be less portable than that written in higher level languages.
- EliRivers 14y agoI disagree. C compilers are everywhere. A C compiler is the standard tool expected (and provided) with every embedded processor I've ever worked with. As a rule of thumb, if a microprocessor is meant to be user-programmable, you get a C compiler with it. It will be a long time before I get a Ruby interpreter for a blackfin processor.
- lmm 14y agoYou get a C compiler sure, but will a given C program work on it? Maybe not for ruby, but I'd certainly expect most new processors to run Java. A quick search suggests there are ruby interpreters for blackfin - and if you have a ruby interpreter you can be reasonably confident any given ruby program will behave correctly on it.
- tobiasu 14y agoThere is a bare-metal ruby cross-compiler? Or are you talking about the ruby interpreter written in C running on an OS written in C? Java is available? Again are we talking about a bare-metal Java compiler (possibly supported by hardware being able to execute a subset of Java natively), or the large collection of software written in C and C++ that is supplied by Oracle?
- lmm 14y agoRuby interpreter written in C running on an OS written in C. No this is not inconsistent; I said move as much code as possible away from C. That which is impossible to move has to stay in C (and will probably be responsible for 99% of the headaches when porting to a new architecture).
- EliRivers 14y ago"A quick search suggests there are ruby interpreters for blackfin" I disagree. A google search for blackfin ruby interpreter did not suggest that to me.
- kelnos 14y agoGood luck getting a JVM working reasonably well on a low-horsepower CPU. C is always your best bet for something usable.