| 1 | <!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>More Raz</title> |
| 7 | <meta name="description" content="raz: a small systems language in Wirth's tradition, for x86-64 Linux."> |
| 8 | <meta name="theme-color" content="#E07A5F"> |
| 9 | <meta property="og:title" content="More Raz"> |
| 10 | <meta property="og:description" content="A small systems language for x86-64 Linux. No run time, no GC, one report."> |
| 11 | <meta property="og:image" content="https://raz.lucela.org/social.png"> |
| 12 | <meta name="twitter:card" content="summary_large_image"> |
| 13 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> |
| 14 | <link rel="icon" href="../favicon-32.png" type="image/png" sizes="32x32"> |
| 15 | <link rel="apple-touch-icon" href="../apple-touch-icon.png"> |
| 16 | <link rel="stylesheet" href="../style.css"> |
| 17 | </head> |
| 18 | <body> |
| 19 | <header><nav><a class="mark" href="../index.html"><img src="../logo.svg" width="26" height="26" alt="">raz</a><a href="../tour/index.html">Raz, Set, Go</a><a href="../advanced/index.html" aria-current="page">More Raz</a><a href="../spec.html">Report</a><a href="../source/index.html">Source</a><a href="../index.html#download">Download</a></nav></header> |
| 20 | <main> |
| 21 | <div class="contents"><h1>More Raz</h1> |
| 22 | <p>The second tour, for the part of raz that sits close to the machine. It |
| 23 | assumes you have taken <a href="../tour/index.html">Raz, Set, Go</a> or know |
| 24 | Pascal or C well enough not to need it.</p> |
| 25 | <p>It has four parts: <strong>The library</strong>, the modules every program |
| 26 | reaches for; <strong>Standing alone</strong>, programs that need no C and no |
| 27 | run time; <strong>The machine</strong>, procedures written in assembly and |
| 28 | direct system calls; and <strong>Shared memory</strong>, volatile accesses, |
| 29 | atomics and threads. Every program is compiled and run when this page is |
| 30 | made, as before.</p> |
| 31 | <h2>The library</h2><ol start='1'> |
| 32 | <li><a href="fmt.html">Output and formatting</a> <span>Out's buffer, Fmt's arguments, formatting into a Buf, and laying out columns.</span></li> |
| 33 | <li><a href="bytes.html">Strings and bytes</a> <span>Copying, hashing and ordering strings, searching bytes many at a time, and reading and writing binary formats.</span></li> |
| 34 | <li><a href="collections.html">Lists, arrays, maps and sorting</a> <span>List(T), Vec(T), Map(K, V) and Sort(T), put together in a word-frequency program.</span></li> |
| 35 | <li><a href="files.html">Files and the command line</a> <span>Whole files with Files, descriptors and directories with Sys, and options with Opt.</span></li> |
| 36 | <li><a href="processes.html">Time, randomness and other programs</a> <span>Clocks, sleeping, random bytes, running a program with its output piped back, and signals.</span></li> |
| 37 | <li><a href="allocators.html">Writing an allocator</a> <span>Mem.Allocator is two procedures; make one over a fixed array, and one that counts.</span></li> |
| 38 | </ol> |
| 39 | <h2>Standing alone</h2><ol start='7'> |
| 40 | <li><a href="static.html">A program with no run time</a> <span>What is in an executable, what isn't, and how to see it.</span></li> |
| 41 | <li><a href="linkstatic.html">Threads without C, and keeping the two apart</a> <span>link static, what a module that makes its own system calls promises, and the error when it breaks.</span></li> |
| 42 | <li><a href="lifecycle.html">Starting, ending, and signals</a> <span>What runs before main, what runs after, and how to wait for a signal.</span></li> |
| 43 | <li><a href="targets.html">One module, one file per target</a> <span>Portable programs, the code that isn't, and how the compiler keeps them in step.</span></li> |
| 44 | </ol> |
| 45 | <h2>The machine</h2><ol start='11'> |
| 46 | <li><a href="asm.html">Procedures in assembly</a> <span>code procedures: the convention, registers, labels, db for what the assembler doesn't know.</span></li> |
| 47 | <li><a href="syscalls.html">System calls</a> <span>SYSCALL directly: the numbers, the arguments, negative errno, and a cat without a library.</span></li> |
| 48 | <li><a href="listing.html">What the compiler makes</a> <span>raz -S, reading a listing, what a check costs and what check off removes.</span></li> |
| 49 | </ol> |
| 50 | <h2>Shared memory</h2><ol start='14'> |
| 51 | <li><a href="volatile.html">Volatile</a> <span>^VOLATILE T: memory that something else may change, laid over with a record.</span></li> |
| 52 | <li><a href="atomics.html">Atomics</a> <span>XADD, XCHG and CAS; a compare-and-swap loop; a lock built from them.</span></li> |
| 53 | <li><a href="ordering.html">Ordering and publication</a> <span>Why a flag isn't enough, what FENCE and the atomics order, and the pattern that works.</span></li> |
| 54 | <li><a href="lockfree.html">A lock-free stack</a> <span>CAS on pointers, a push loop that never blocks, and the ABA problem that makes pop harder.</span></li> |
| 55 | <li><a href="ring.html">A ring buffer between threads</a> <span>A single-producer, single-consumer queue, put together from what the tour has covered.</span></li> |
| 56 | </ol></div> |
| 57 | </main> |
| 58 | <footer>raz is under the ISC license. <a href="../source/index.html">Source</a></footer> |
| 59 | </body> |
| 60 | </html> |