fixed typos, small corrections

This commit is contained in:
Torsten Ruger 2014-05-28 20:52:26 +03:00
parent f799c701dc
commit 7c501654ec
7 changed files with 19 additions and 21 deletions

View File

@ -81,7 +81,7 @@
<div class="row center"> <div class="row center">
<div class="span12"> <div class="span12">
<div class="vspace10"> <div class="vspace10">
<p>&copy; Copyright 2013/14.</p> <p>&copy; Copyright 2014.</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -59,11 +59,11 @@ title: Crystal, where it started
<h2 class="center">Smalltalk</h2> <h2 class="center">Smalltalk</h2>
<p> <p>
Smalltalk is the mother of OO for me. Adele Goldberg has written down the details of early implementations in the Smalltalk is the mother of OO for me. Adele Goldberg has written down the details of early implementations in the
Blue Book, which made a great impression on me. Having read it mri code is quite easy to understand. <br/> Blue Book, which made a great impression on me. Having read it, mri code is quite easy to understand. <br/>
Unfortunately Smalltalk was too far ahead of it's time and used the image, the implications of which are still Unfortunately Smalltalk was too far ahead of it's time and used the image, the implications of which are still
not understood imho.<br/> not understood imho.<br/>
Additional bad luck struck when, in Steven Jobs great heist of the PARC UI, he did not recognise the value of it's Additional bad luck struck when, in Steven Jobs great heist of the PARC UI, he did not recognise the value of it's
implementation language and so Smalltalk did not get the same boost as the gui. implementation language and so pure OO did not get the same boost as the gui. Instead we got difficult c dialects.
</p> </p>
</div> </div>
@ -75,7 +75,7 @@ title: Crystal, where it started
</p> </p>
<p> <p>
Rails has sort of given Ruby it's purpose and made it grow from a perl like scripting language to a server programming Rails has sort of given Ruby it's purpose and made it grow from a perl like scripting language to a server programming
environment with all the whistle and bells. Rails maturity and code quality make it not only a joy to use, environment with all the whistles and bells. Rails maturity and code quality make it not only a joy to use,
but an excellent source for good ruby practises. but an excellent source for good ruby practises.
</p> </p>
<p> <p>
@ -114,9 +114,9 @@ title: Crystal, where it started
</p> </p>
<p> <p>
<b><a href="http://metasm.cr0.org/">Metasm</a></b> finally confirmed what i had suspected for a while. <b><a href="http://metasm.cr0.org/">Metasm</a></b> finally confirmed what i had suspected for a while.
Namely that you don't need C to generate (machine) code. Metasm has be been assmbling, deassembling and Namely that you don't need C to generate machine code. Metasm has be been assmbling, deassembling and
compiling for several cpu's since 2007, in 100% ruby. compiling for several cpu's since 2007, in 100% ruby.
A great feat, and the only reason i don't use it is because it is too big (for now). A great feat, and the only reason i don't use it is because it is too big (for me to understand).
</p> </p>
<p> <p>
<b><a href="https://github.com/cyndis/as">As</a></b> ended up being the starting point for the assembly layer. <b><a href="https://github.com/cyndis/as">As</a></b> ended up being the starting point for the assembly layer.

View File

@ -39,8 +39,10 @@ title: Crystal, a simple and minimal oo machine
If only. Ruby is full of niceties that actually make parsing it quite difficult. But at the moment that story hasn't If only. Ruby is full of niceties that actually make parsing it quite difficult. But at the moment that story hasn't
even started. even started.
<br/> <br/>
Parslet lets us use modules for parts of the parser, so those files are pretty self explanitory. Not all is done, but Parslet lets us use modules for parts of the parser, so those files are pretty self-explanitory. Not all is done, but
a good start. Parslet also has a seperate Transformation pass, and that creates the AST. Those class names are also a good start.
<br/>
Parslet also has a seperate Transformation pass, and that creates the AST. Those class names are also
easy, so you can guess what an IfExpression represents. easy, so you can guess what an IfExpression represents.
<br/> <br/>
</p> </p>
@ -53,11 +55,12 @@ title: Crystal, a simple and minimal oo machine
<p> <p>
The Virtual machine layer (vm) is where it gets interesting, but also more fuzzy. The Virtual machine layer (vm) is where it gets interesting, but also more fuzzy.
<br/> <br/>
Currently still quite simple, we have Classes for things we know, like program and function. Also hings we need Currently still quite simple, we have Classes for things we know, like program and function. Also things we need
to create the code, like Blocks and Instructions. to create the code, like Blocks and Instructions.
<br/> <br/>
The most interesting thing is maybe the idea of a Value, which are a bit like Variables, just constant. And so to The most interesting thing is maybe the idea of a Value. If you think of Variables, Values are what a variable may
change value of what we think of as a variable, we create a new Value (of possibly different basic type). Thus be assigned, but it may carry a storage place (register). Values are constant, and so to
change a value, we have to create a new Value (of possibly different basic type). Thus
all machine instructions are the trasformation of values into new ones. all machine instructions are the trasformation of values into new ones.
<br/> <br/>
Also interesting is the slightly unripe Basic Type system. We have a set of machine-word size types and do not Also interesting is the slightly unripe Basic Type system. We have a set of machine-word size types and do not

View File

@ -5,10 +5,6 @@ body {
/*background: #FCFCFC url(../img/pattern.png) top left repeat;*/ /*background: #FCFCFC url(../img/pattern.png) top left repeat;*/
} }
a {
color: #666666;
}
a:hover { a:hover {
color: #000000; color: #000000;
} }

View File

@ -72,7 +72,7 @@ title: Ruby in Ruby is 100% ruby
everyone is fooled into believing only c is fast. Whereas what is true is that <em>static</em> code is fast. everyone is fooled into believing only c is fast. Whereas what is true is that <em>static</em> code is fast.
</p> </p>
<p> <p>
On a very similar note there we are lead to believe that os features must be used from c. Whereas system calls 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. are software interrupts and only the c std library makes them look like c functions. But they are not.
</p> </p>
<p> <p>

View File

@ -19,11 +19,11 @@ Even if you have a Pi, [this explains](/remote_pi.html) a nice way to develop wi
Written April 2014: as of writing the latest and greatest llvm based gcc (5.1) on Maverick (10.9) has a bug that makes qemu hang. Written April 2014: as of writing the latest and greatest llvm based gcc (5.1) on Maverick (10.9) has a bug that makes qemu hang.
So type gcc -v and if the output contains "LLVM version 5.1", you must install gcc4.2. Easily donw with homebrew: So type gcc -v and if the output contains "LLVM version 5.1", you must install gcc4.2. Easily done with homebrew:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
This will not interfere with the systems compiler as the gcc4.3 has postfixed executables (ie gcc-4.2) This will not interfere with the systems compiler as the gcc4.2 has postfixed executables (ie gcc-4.2)
###Qemu ###Qemu

View File

@ -21,7 +21,7 @@ title: Crystal and Ruby, Ruby and Crystal
<div class="span4"> <div class="span4">
<h4>Syntax</h4> <h4>Syntax</h4>
<h5>and meaning</h5> <h5>and meaning</h5>
<blockquote><p> Pure OO, blocks, closures, often no need for braces, simple but consistant, open classes<br/></p></blockquote> <blockquote><p> Pure OO, blocks, closures,clean syntax, simple but consistant, open classes<br/></p></blockquote>
<p> Just to name a few of the great features of the ruby syntax and it's programming model. <br/> <p> Just to name a few of the great features of the ruby syntax and it's programming model. <br/>
Syntax is an abstract thing, as far as i know there is no ebnf or similar definition of it. Syntax is an abstract thing, as far as i know there is no ebnf or similar definition of it.
Also as far as i know there is only the mri which is considered the only source of how ruby works. <br/> Also as far as i know there is only the mri which is considered the only source of how ruby works. <br/>
@ -36,8 +36,7 @@ title: Crystal and Ruby, Ruby and Crystal
<blockquote><p> The heart of the ruby-in-ruby project is crystal, the virtual machine <br /></p></blockquote> <blockquote><p> The heart of the ruby-in-ruby project is crystal, the virtual machine <br /></p></blockquote>
<p>Crystal is written in 100% ruby</p> <p>Crystal is written in 100% ruby</p>
<p>Crystal uses an existing ruby to bootstrap itself</p> <p>Crystal uses an existing ruby to bootstrap itself</p>
<p>Crystal generates native code, and ( with 1+2) creates a native ruby (virtual) machine that is able to <p>Crystal generates native code, and ( with 1+2) creates a native ruby virtual machine. </p>
generate code on the fly and thus alter itself.</p>
<p>Crystal does not interpret, it parses and compiles (just making sure that's clear)</p> <p>Crystal does not interpret, it parses and compiles (just making sure that's clear)</p>
<p>Crystal uses a statically typed value based core with rtti and oo syntax to achieve this <p>Crystal uses a statically typed value based core with rtti and oo syntax to achieve this
(think c++ with ruby syntax)</p> (think c++ with ruby syntax)</p>