site: v0.10.1
| @@ -1 +1 @@ | ||
| 1 | -/download/latest /download/raz-0.10.0-linux-x86_64.tar.gz 302 | |
| 1 | +/download/latest /download/raz-0.10.1-linux-x86_64.tar.gz 302 |
| @@ -65,7 +65,7 @@ | ||
| 65 | 65 | <span class="cmd">$ ldd Bare</span> |
| 66 | 66 | not a dynamic executable |
| 67 | 67 | <span class="cmd">$ ls -l Bare | awk '{print $5, "bytes"}'</span> |
| 68 | -26280 bytes</code></pre> | |
| 68 | +26288 bytes</code></pre> | |
| 69 | 69 | <p>It is statically linked: no interpreter, no shared libraries, no <code>libc</code>. <code>ldd</code> says so.</p> |
| 70 | 70 | <h2>What it does when it runs</h2> |
| 71 | 71 | <p><code>strace</code> lists every system call a program makes. This is the whole of it:</p> |
| @@ -135,14 +135,14 @@ | ||
| 135 | 135 | <span class="cmd">$ raz Heavy.raz</span> |
| 136 | 136 | <span class="cmd">$ ls -l Lean Heavy | awk '{print $9, $5}'</span> |
| 137 | 137 | Heavy 28496 |
| 138 | -Lean 28480</code></pre> | |
| 138 | +Lean 28488</code></pre> | |
| 139 | 139 | <p>The sizes differ by a few bytes, not by the hundreds of kilobytes that the table and the procedure would take: they are not in the executable at all. You can link in a library module without worrying what else it offers.</p> |
| 140 | 140 | <h2>Stripping</h2> |
| 141 | 141 | <p><code>-s</code> leaves out what is there for finding faults: the symbols and line numbers, the places a failure is told by, and the profiler. It is for the final build of a size-conscious program; the default keeps them so that gdb and failure messages work.</p> |
| 142 | 142 | <pre class="output term"><code><span class="cmd">$ raz -s -o Lean-stripped Lean.raz</span> |
| 143 | 143 | <span class="cmd">$ ls -l Lean Lean-stripped | awk '{print $9, $5}'</span> |
| 144 | -Lean 28480 | |
| 145 | -Lean-stripped 6848 | |
| 144 | +Lean 28488 | |
| 145 | +Lean-stripped 6880 | |
| 146 | 146 | <span class="cmd">$ ./Lean-stripped</span> |
| 147 | 147 | same program</code></pre> |
| 148 | 148 | <p><code>raz -S Lean.raz</code> is the other direction: it prints the machine code the compiler made, one source line at a time. The next two parts of the tour use it.</p><p class="tryit">Save a program under its module’s name and run it with <code>raz run Name.raz</code>.</p><div class="pager"><a href="allocators.html">← Writing an allocator</a><a href="index.html">Contents</a><a class="next" href="linkstatic.html">Threads without C, and keeping the two apart →</a></div></article></div> |
Binary file; the patch has it.
| @@ -0,0 +1 @@ | ||
| 1 | +d844589a05ba97f25413cbf5befe8f60f33857ecdbc12e049c18fe703ab23097 raz-0.10.1-linux-x86_64.tar.gz |
| @@ -35,13 +35,13 @@ | ||
| 35 | 35 | system calls and call C libraries. It has no garbage collector and no hidden |
| 36 | 36 | run time: what the program does is what its text says.</p> |
| 37 | 37 | |
| 38 | -<p>The compiler is written in raz, about 10,500 lines, and builds itself. It makes | |
| 38 | +<p>The compiler is written in raz, about 10,700 lines, and builds itself. It makes | |
| 39 | 39 | x86-64 machine code and the ELF file itself, with no assembler or linker, in |
| 40 | -one pass, at about 500,000 lines a second.</p> | |
| 40 | +one pass, at about 650,000 lines a second.</p> | |
| 41 | 41 | |
| 42 | 42 | <div class="facts"> |
| 43 | - <span><b>~10,500</b> lines of compiler</span> | |
| 44 | - <span><b>~500K</b> lines compiled a second</span> | |
| 43 | + <span><b>~10,700</b> lines of compiler</span> | |
| 44 | + <span><b>~650K</b> lines compiled a second</span> | |
| 45 | 45 | <span><b>static</b> executables, no run time to install</span> |
| 46 | 46 | <span><b>1</b> report, about <b>30</b> pages</span> |
| 47 | 47 | </div> |
| @@ -109,24 +109,24 @@ | ||
| 109 | 109 | short on purpose: whatever it doesn’t allow, raz doesn’t have.</p> |
| 110 | 110 | |
| 111 | 111 | <h2 id="download">Download</h2> |
| 112 | -<p>raz 0.10.0 is a tarball for x86-64 Linux with the compiler, <code>raz</code>, | |
| 112 | +<p>raz 0.10.1 is a tarball for x86-64 Linux with the compiler, <code>raz</code>, | |
| 113 | 113 | its library, <code>lib/</code>, which it finds beside itself, the formatter |
| 114 | 114 | and the documentation tool as sources in <code>tools/</code>, and the manual |
| 115 | 115 | pages. It needs nothing else installed.</p> |
| 116 | 116 | <div class="cta"> |
| 117 | - <a class="btn primary" href="download/raz-0.10.0-linux-x86_64.tar.gz">Download raz 0.10.0</a> | |
| 118 | - <a class="btn" href="download/raz-0.10.0-linux-x86_64.tar.gz.sha256">SHA-256</a> | |
| 117 | + <a class="btn primary" href="download/raz-0.10.1-linux-x86_64.tar.gz">Download raz 0.10.1</a> | |
| 118 | + <a class="btn" href="download/raz-0.10.1-linux-x86_64.tar.gz.sha256">SHA-256</a> | |
| 119 | 119 | </div> |
| 120 | -<pre class="code"><code>$ tar xzf raz-0.10.0-linux-x86_64.tar.gz | |
| 121 | -$ ln -s $PWD/raz-0.10.0-linux-x86_64/raz ~/.local/bin/raz | |
| 120 | +<pre class="code"><code>$ tar xzf raz-0.10.1-linux-x86_64.tar.gz | |
| 121 | +$ ln -s $PWD/raz-0.10.1-linux-x86_64/raz ~/.local/bin/raz | |
| 122 | 122 | $ raz run Hello.raz</code></pre> |
| 123 | 123 | <p>The link works since raz finds <code>lib/</code> beside its real path. The |
| 124 | 124 | manual pages are in <code>man/</code>: <code>man ./man/raz-tutorial.7</code>. |
| 125 | 125 | The address <code>download/latest</code> always leads to the newest release, |
| 126 | -and <code>download/raz-0.10.0-linux-x86_64.tar.gz</code> to this one, for | |
| 126 | +and <code>download/raz-0.10.1-linux-x86_64.tar.gz</code> to this one, for | |
| 127 | 127 | good. Earlier releases: <a href="download/raz-0.9.1-linux-x86_64.tar.gz">0.9.1</a>, <a href="download/raz-0.9.0-linux-x86_64.tar.gz">0.9.0</a>, <a href="download/raz-0.8.0-linux-x86_64.tar.gz">0.8.0</a>, <a href="download/raz-0.7.1-linux-x86_64.tar.gz">0.7.1</a>; each has its SHA-256 beside it, with |
| 128 | 128 | <code>.sha256</code> added to its name.</p> |
| 129 | -<p class="sha">SHA-256 <code>9ba56121485956986dd242259b9a1e797cd4949ec824e927b16d1f54f23c4a8f</code></p> | |
| 129 | +<p class="sha">SHA-256 <code>d844589a05ba97f25413cbf5befe8f60f33857ecdbc12e049c18fe703ab23097</code></p> | |
| 130 | 130 | |
| 131 | 131 | </main> |
| 132 | 132 | <footer>raz is under the ISC license.</footer> |
| @@ -70,7 +70,7 @@ | ||
| 70 | 70 | <span class="cmd">$ raz run Quiet.raz</span> |
| 71 | 71 | hello, again |
| 72 | 72 | <span class="cmd">$ ls -l Quiet | awk '{print $5, "bytes"}'</span> |
| 73 | -28488 bytes</code></pre> | |
| 73 | +28496 bytes</code></pre> | |
| 74 | 74 | <p>The program is a static executable with no run time besides the code it uses, so it is a few kilobytes, and runs without any library installed.</p> |
| 75 | 75 | <h2>What <code>Out</code> can write</h2> |
| 76 | 76 | <p><code>Out</code> is the library's buffered output. It writes strings, single characters, numbers in decimal or hexadecimal, and a line feed. A string is written as it is, with <code>\n</code> for a line feed, <code>\t</code> for a tab, <code>\"</code> and <code>\\</code>.</p> |