2014-05-26 21:13:49 +02:00
|
|
|
---
|
2014-07-01 19:58:39 +02:00
|
|
|
layout: main
|
2014-09-12 20:48:55 +02:00
|
|
|
title: Ruby in Ruby
|
|
|
|
sub-title: Salama hopes make the the mysterious more accessible, shed light in the farthest (ruby) corners, and above all, <b>empower you</b>
|
2014-05-26 21:13:49 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
<div class="row vspace20">
|
|
|
|
<div class="span4">
|
2014-09-12 20:48:55 +02:00
|
|
|
<h2 class="center"> A better tool, a better job</h2>
|
2014-05-26 21:13:49 +02:00
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
Ruby is the better tool to do the job. Any software job that is. We who use ruby daily do so because it is
|
|
|
|
more productive, better in almost every way. The only downside is speed and we argue that with cheap resources.
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
Why it has taken this long to even seriously attempt a ruby implementation in ruby is due to the overwhelming
|
|
|
|
influence of C (folks).
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
Just a short and subjective list of why ruby is the better tool:
|
|
|
|
<ul>
|
|
|
|
<li>More fun. Ask anyone :-) </li>
|
|
|
|
<li>Lets you focuss on the task</li>
|
|
|
|
<li>Elegant, both in syntax and solution</li>
|
|
|
|
<li>Understandable</li>
|
|
|
|
<li>Much faster to code</li>
|
|
|
|
</ul>
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="span4">
|
2014-09-12 20:48:55 +02:00
|
|
|
<h2 class="center">Boys and toys</h2>
|
2014-07-01 19:58:39 +02:00
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
Rails has evolved tremendously from what was already a good start. All the development <em>around</em> it has nurtured
|
|
|
|
ruby developement in all areas. Rails and all those parts make up a most mature and advanced software system.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
2014-09-12 20:48:55 +02:00
|
|
|
<p> The "rails effect" is due to the accessibility of the system, imho. Ie it is written in ruby.</p>
|
|
|
|
<p> Ruby itself has not enjoyed this rails effect, and that is because it is written in C (or c++) </p>
|
|
|
|
<p> It is my firm belief that given a vm in ruby, ruby development will "take off" too. In other words, given an
|
|
|
|
easy way to improve his tools, a developer will do so. Easy means understandable and that means ruby for a
|
|
|
|
ruby developer
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="span4">
|
2014-09-12 20:48:55 +02:00
|
|
|
<h2 class="center">Step to Indepencance</h2>
|
2014-05-26 21:13:49 +02:00
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
The first thing any decent compiler does, is compile itself. It is the maturity test of a language to implement
|
|
|
|
itself in itself, and the time has come for ruby. The mark of growing up is being independant, in ruby's case of C.
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
Having just learned Assembler, i can attest what a great improvement C is over Assembler.
|
|
|
|
But that was then and it is not just chance that developemnt has been slow in the last 50 years.
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
There is this attitude C believers elude and since they are the gatekeepers of the os,
|
|
|
|
everyone is fooled into believing only c is fast. Whereas what is true is that <em>static</em> code is fast.
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
On a very similar note we are lead to believe that os features must be used from c. Whereas system calls
|
|
|
|
are software interrupts and only the c std library makes them look like c functions. But they are not.
|
2014-05-26 21:13:49 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-09-12 20:48:55 +02:00
|
|
|
<div class="span12">
|
|
|
|
<p class="center"><span> So what does empowerment mean. </span></p>
|
|
|
|
<p>
|
|
|
|
For me it is means owning your tools.
|
|
|
|
For everyone to really be able to unfold their ideas and potential.
|
|
|
|
Not to be stuck, rather to be able to change anything one wishes.
|
|
|
|
We usually own the code we write, and we have seen amazing progress in opening up new ideas.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
So it is hard to even think of ruby holding us back, and it isn't off course, only current implementations of it are.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
So concretely what does this mean: Well i don't know do i! That's the whole point, that anyone can improve it beyond
|
|
|
|
the original creators horizon.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
But to mention a few things that have crossed my mind (and that i will most certainly not implement)
|
|
|
|
<ul>
|
|
|
|
<li> Efficient vector extensions that use cpu/gpu instructions not supported in the core</li>
|
|
|
|
<li> Efficient graphics extensions</li>
|
2014-09-19 21:19:38 +02:00
|
|
|
<li> New language features, ie real dsl's that extend the parser on the fly </li>
|
2014-09-12 20:48:55 +02:00
|
|
|
<li> Off course there is always new cpu's and os's</li>
|
|
|
|
<li> Better implementation of core datastructures. Did i hear digital trees being mentioned?</li>
|
|
|
|
<li> Better gc's, better memory management.</li>
|
|
|
|
<li> Superoptimization! (heard of that one?)</li>
|
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
And the fun thing is off course that all the above can be created as gems. No recompiling, no rvm/rbenv.
|
|
|
|
Anyone can choose how they want to pimp
|
|
|
|
their vm in the same way as you can decide what stack/tools you use in a rails project. And we have the essential
|
|
|
|
tool to do this: the bundler.
|
|
|
|
</p>
|
|
|
|
<p> And off course democracy decides what is good and what will stay. Natural extinction and all.</p>
|
|
|
|
</div>
|
2014-05-26 21:13:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|