swapped two main pages around
This commit is contained in:
parent
898a66d3be
commit
210827fe5c
@ -12,8 +12,8 @@ layout: site
|
|||||||
<div class="span2">
|
<div class="span2">
|
||||||
<div>
|
<div>
|
||||||
<ul class="nav nav-list">
|
<ul class="nav nav-list">
|
||||||
<li><a href="/index.html"> Effective programming </a> </li>
|
<li><a href="/index.html"> Ideas whence it started </a> </li>
|
||||||
<li><a href="/ideas.html"> Ideas whence it started </a> </li>
|
<li><a href="/ideas.html"> Effective programming </a> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
142
ideas.html
142
ideas.html
@ -1,102 +1,88 @@
|
|||||||
---
|
---
|
||||||
layout: main
|
layout: main
|
||||||
title: Ruby in Ruby
|
title: Effectiveness, not efficiency
|
||||||
sub-title: Salama hopes make the the mysterious more accessible, shed light in the farthest (ruby) corners, and above all, <b>empower you</b>
|
sub-title: By way of a new look at programming.
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="row vspace20">
|
<div class="row vspace20">
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h2 class="center"> A better tool, a better job</h2>
|
<h2 class="center"> Where to go</h2>
|
||||||
<p>
|
<p>
|
||||||
Ruby is the better tool to do the job. Any software job that is. We who use ruby daily do so because it is
|
When making the distinction between effectiveness and efficiency i like to think of transport.
|
||||||
more productive, better in almost every way. The only downside is speed and we argue that with cheap resources.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Why it has taken this long to even seriously attempt a ruby implementation in ruby is due to the overwhelming
|
Efficiency is going fast, like an airplane is much more efficient than a car and that is more so than walking.
|
||||||
influence of C (folks).
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Just a short and subjective list of why ruby is the better tool:
|
Effectiveness on the other hand is how straight your route is. Say you're in Hamburg and want to go to Berlin, then
|
||||||
<ul>
|
it is not effective to go to Rome first.
|
||||||
<li>More fun. Ask anyone :-) </li>
|
</p>
|
||||||
<li>Lets you focuss on the task</li>
|
<p>
|
||||||
<li>Elegant, both in syntax and solution</li>
|
Ruby, like python and mother smalltalk, let us be more effective at programming. We accept that they are not efficient,
|
||||||
<li>Understandable</li>
|
but i think that can be changed.
|
||||||
<li>Much faster to code</li>
|
</p>
|
||||||
</ul>
|
<p>
|
||||||
|
But even while ruby has blossomed we have seen noticeable increase in effectiveness with so called dsl's and
|
||||||
|
what is generally called meta-programming.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
But meta-programming is just a way to say that we manipulate the program just as we manipulate data. Off course! But
|
||||||
|
to do that effectively we need a better model of what an object oriented program actually is.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span4">
|
||||||
|
<h2 class="center">Understandability</h2>
|
||||||
|
<p>
|
||||||
|
The way i see it is that it is the understandibility that makes ruby or python more effective. As we read much more
|
||||||
|
code than write (even it's our own), focusing on descriptive programs helps.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
But you only have to look at even rubies basic blocks, to see how misleadingly language is used.
|
||||||
|
We use Strings to represent words and text, while we store data in Arrays or Hashes.
|
||||||
|
If you look these up in a dictionary you may find: a thread used for tying,
|
||||||
|
a military force, or a dish of diced meat and vegetables. So we have a way to go there.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
But even more disconcerting is that we have no model of how an object oriented system actually works. We know what it
|
||||||
|
does off course, as we programm using it all the time. But how it does it is not clear.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
At least not clear in the sense that i could go and read it's code. Ruby like python are written in c and that just
|
||||||
|
is not easily understandable code.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h2 class="center">Boys and toys</h2>
|
<h2 class="center">Playing computer</h2>
|
||||||
<p>
|
<p>
|
||||||
Rails has evolved tremendously from what was already a good start. All the development <em>around</em> it has nurtured
|
When programming, we fly blind. We have no visual idea of what the system that we write will do and the only way
|
||||||
ruby developement in all areas. Rails and all those parts make up a most mature and advanced software system.
|
to get feedback is to have the final version run. Bret Victor has put this
|
||||||
|
<a href="http://vimeo.com/36579366"> into words well</a>.
|
||||||
</p>
|
</p>
|
||||||
<p> The "rails effect" is due to the accessibility of the system, imho. Ie it is written in ruby.</p>
|
<p>
|
||||||
<p> Ruby itself has not enjoyed this rails effect, and that is because it is written in C (or c++) </p>
|
So when we program, it's actually mostly in our head. By playing computer, ie simulating in the head what the computer
|
||||||
<p> It is my firm belief that given a vm in ruby, ruby development will "take off" too. In other words, given an
|
will do when it runs the programm.
|
||||||
easy way to improve his tools, a developer will do so. Easy means understandable and that means ruby for a
|
</p>
|
||||||
ruby developer
|
<p>
|
||||||
|
And so what we consider good programmers, are people who are good at playing computer in their head.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
But off course we have the computer right there before us. Really the computr should do it rather than
|
||||||
|
us having to simulate it.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
What will come out of that line when we actually manage to put it into practise is unclear, though it is certain it
|
||||||
|
will be easier to do and result in hugely more powerful programs
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Yet to get there we need better tools. Better tools that let us understand what we are doing better. Better models of
|
||||||
|
what we call programming, and by better i mean easier to understand by normal people (not the computer simluators).
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span4">
|
|
||||||
<h2 class="center">Step to Indepencance</h2>
|
|
||||||
<p>
|
|
||||||
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.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
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.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
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.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
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.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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>
|
|
||||||
<li> New language features, ie real dsl's that extand the parser on the fly </li>
|
|
||||||
<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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
142
index.html
142
index.html
@ -1,88 +1,102 @@
|
|||||||
---
|
---
|
||||||
layout: main
|
layout: main
|
||||||
title: Effectiveness, not efficiency
|
title: Ruby in Ruby
|
||||||
sub-title: By way of a new look at programming.
|
sub-title: Salama hopes make the the mysterious more accessible, shed light in the farthest (ruby) corners, and above all, <b>empower you</b>
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="row vspace20">
|
<div class="row vspace20">
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h2 class="center"> Where to go</h2>
|
<h2 class="center"> A better tool, a better job</h2>
|
||||||
<p>
|
<p>
|
||||||
When making the distinction between effectiveness and efficiency i like to think of transport.
|
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.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Efficiency is going fast, like an airplane is much more efficient than a car and that is more so than walking.
|
Why it has taken this long to even seriously attempt a ruby implementation in ruby is due to the overwhelming
|
||||||
|
influence of C (folks).
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Effectiveness on the other hand is how straight your route is. Say you're in Hamburg and want to go to Berlin, then
|
Just a short and subjective list of why ruby is the better tool:
|
||||||
it is not effective to go to Rome first.
|
<ul>
|
||||||
</p>
|
<li>More fun. Ask anyone :-) </li>
|
||||||
<p>
|
<li>Lets you focuss on the task</li>
|
||||||
Ruby, like python and mother smalltalk, let us be more effective at programming. We accept that they are not efficient,
|
<li>Elegant, both in syntax and solution</li>
|
||||||
but i think that can be changed.
|
<li>Understandable</li>
|
||||||
</p>
|
<li>Much faster to code</li>
|
||||||
<p>
|
</ul>
|
||||||
But even while ruby has blossomed we have seen noticeable increase in effectiveness with so called dsl's and
|
|
||||||
what is generally called meta-programming.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
But meta-programming is just a way to say that we manipulate the program just as we manipulate data. Off course! But
|
|
||||||
to do that effectively we need a better model of what an object oriented program actually is.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span4">
|
|
||||||
<h2 class="center">Understandability</h2>
|
|
||||||
<p>
|
|
||||||
The way i see it is that it is the understandibility that makes ruby or python more effective. As we read much more
|
|
||||||
code than write (even it's our own), focusing on descriptive programs helps.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
But you only have to look at even rubies basic blocks, to see how misleadingly language is used.
|
|
||||||
We use Strings to represent words and text, while we store data in Arrays or Hashes.
|
|
||||||
If you look these up in a dictionary you may find: a thread used for tying,
|
|
||||||
a military force, or a dish of diced meat and vegetables. So we have a way to go there.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
But even more disconcerting is that we have no model of how an object oriented system actually works. We know what it
|
|
||||||
does off course, as we programm using it all the time. But how it does it is not clear.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
At least not clear in the sense that i could go and read it's code. Ruby like python are written in c and that just
|
|
||||||
is not easily understandable code.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h2 class="center">Playing computer</h2>
|
<h2 class="center">Boys and toys</h2>
|
||||||
<p>
|
<p>
|
||||||
When programming, we fly blind. We have no visual idea of what the system that we write will do and the only way
|
Rails has evolved tremendously from what was already a good start. All the development <em>around</em> it has nurtured
|
||||||
to get feedback is to have the final version run. Bret Victor has put this
|
ruby developement in all areas. Rails and all those parts make up a most mature and advanced software system.
|
||||||
<a href="http://vimeo.com/36579366"> into words well</a>.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p> The "rails effect" is due to the accessibility of the system, imho. Ie it is written in ruby.</p>
|
||||||
So when we program, it's actually mostly in our head. By playing computer, ie simulating in the head what the computer
|
<p> Ruby itself has not enjoyed this rails effect, and that is because it is written in C (or c++) </p>
|
||||||
will do when it runs the programm.
|
<p> It is my firm belief that given a vm in ruby, ruby development will "take off" too. In other words, given an
|
||||||
</p>
|
easy way to improve his tools, a developer will do so. Easy means understandable and that means ruby for a
|
||||||
<p>
|
ruby developer
|
||||||
And so what we consider good programmers, are people who are good at playing computer in their head.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
But off course we have the computer right there before us. Really the computr should do it rather than
|
|
||||||
us having to simulate it.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
What will come out of that line when we actually manage to put it into practise is unclear, though it is certain it
|
|
||||||
will be easier to do and result in hugely more powerful programs
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Yet to get there we need better tools. Better tools that let us understand what we are doing better. Better models of
|
|
||||||
what we call programming, and by better i mean easier to understand by normal people (not the computer simluators).
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="span4">
|
||||||
|
<h2 class="center">Step to Indepencance</h2>
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
<li> New language features, ie real dsl's that extand the parser on the fly </li>
|
||||||
|
<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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user