summaryrefslogtreecommitdiffhomepage
path: root/web/layouts/home.html
blob: 957fe8a4cae1c4eaf7784993eef7142f5a8af395 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{{ define "main" }}
{{ $install := "/docs/install/" | relURL }}
<section class="hero">
  <p class="kicker">POSIX shell &middot; z/OS UNIX System Services</p>
  <h1><span class="chev">&gt;</span><span class="word">zash</span><span class="cursor" aria-hidden="true"></span></h1>
  <p class="lede">
    A small, fast shell in the Almquist tradition, written from scratch in C23.
    Scripts are plain POSIX <code>sh</code>; the shell stays quick on a machine
    that bills CPU time and copies an address space on every <code>fork()</code>.
  </p>
  <div class="actions">
    <a class="btn primary" href="{{ $install }}">Build it</a>
    <a class="btn" href="{{ site.Params.repo }}">Source on GitHub</a>
  </div>
</section>

<div class="showcase">
  <div class="term">
    <div class="term-bar">
      <span class="dot"></span><span class="dot"></span><span class="dot"></span>
      <span class="title">zos: ~/src/zash &mdash; 10 000 command substitutions</span>
    </div>
    <pre><code><span class="cmd">time bash -c 'i=0; while [ $i -lt 10000 ]; do x=$(echo hi); i=$((i+1)); done'</span>
<span class="out">real</span>    0m37.12s
<span class="out">user</span>    0m20.32s
<span class="out">sys</span>     0m6.77s

<span class="cmd">time /bin/sh -c 'i=0; while [ $i -lt 10000 ]; do x=$(echo hi); i=$((i+1)); done'</span>
<span class="out">real</span>    0m12.54s
<span class="out">user</span>    0m3.67s
<span class="out">sys</span>     0m1.22s

<span class="cmd">time ./zash -c 'i=0; while [ $i -lt 10000 ]; do x=$(echo hi); i=$((i+1)); done'</span>
<span class="out">real</span>    <span class="ok">0m0.01s</span>
<span class="out">user</span>    <span class="ok">0m0.01s</span>
<span class="out">sys</span>     <span class="ok">0m0.01s</span><span class="cursor"></span></code></pre>
  </div>
  <p class="caption">
    Every <code>$( )</code> starts a process in bash and <code>/bin/sh</code>,
    and none in zash. One run on z/OS; <code>make bench</code> repeats each
    case and checks the answers.
  </p>
  <div class="spec-strip">
    <span>C23</span>
    <span>Clang &amp; IBM Open XL</span>
    <span>ASCII or EBCDIC</span>
    <span>Linux &amp; z/OS</span>
  </div>
</div>

<article class="home-content">
  {{ .Content }}
</article>
{{ end }}