<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/bench, branch editor/vi-v-dot</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=editor%2Fvi-v-dot</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=editor%2Fvi-v-dot'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-26T03:54:08Z</updated>
<entry>
<title>interactive: one editor, no library</title>
<updated>2026-11-26T03:54:08Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=87c6a0f8f822c57b4f63bc8bb099a33307871414'/>
<id>urn:sha1:87c6a0f8f822c57b4f63bc8bb099a33307871414</id>
<content type='text'>
libedit was a compile-time alternative (`make EDIT=libedit`).  It goes:
FreeBSD and NetBSD `sh` use it because it is in their base system, which
is not the case on z/OS, and it cost about a third of a millisecond to
reach the prompt -- three more shared libraries, `el_init()`, an
`~/.editrc` read and a copy of the history -- for the same cost per key.
What it bought was `~/.editrc` bindings and a kill ring; `bind` and the
built-in editor's own bindings cover the keys, and a second editor meant
a second build mode and a second set of interactive expectations, with
seven tests skipping under it.

Everything that existed only to serve two editors goes with it: the
`EDIT` switch and the two `edit_$(EDIT)` paths in the makefile, the
`$ZASH_EDITOR` variable the tests used to skip, the skip guards in
`tests/linux/`, the NUL stripping in `ptydrive.py` that libedit's redraw
needed, and the parallel paragraphs in README.md, DESIGN.md,
bench/README.md and the two website pages.  `bench/README.md` keeps the
measurement, since that is why the decision is written in DESIGN.md.

Checked on Linux (97 passed, 1 skipped, the one known local failure in
linux/i-dscomplete) and on z/OS (64 passed, 3 skipped, 0 failed, plus the
EBCDIC build).
</content>
</entry>
<entry>
<title>bench: make the start-up number a minimum of interleaved rounds</title>
<updated>2026-11-26T03:25:47Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=ab003863f9a3eaf6099d560af64022b7bd7c2f2a'/>
<id>urn:sha1:ab003863f9a3eaf6099d560af64022b7bd7c2f2a</id>
<content type='text'>
startup.sh ran BENCH_N starts once, and on the shared z/OS machine the
same binary measured anywhere between 5 and 14 ms depending on the hour.

Now each cell is the fastest of BENCH_R rounds (default 5) of BENCH_N
starts, and a row's two columns are measured one after the other inside
each round, so `-c :` and `script` see the same load instead of one
following five rounds of the other. A minimum is the right summary
because contention only adds time.

Measured that way on cbt today, zash is 1.34 ms for `-c :` and 1.36 ms
for a script, and the z/OS sh 2.16 and 2.18 — the same two numbers
bench/README.md already claimed from a quieter machine, which is the
point: the method now reproduces them.

Also records the rule the ksh88 constraint implies: where zash and the
z/OS sh disagree, zash keeps the better behaviour unless a ksh88 script
could observe it, and the one such case — a failed redirection,
assignment or read being 2 rather than 1 — is accepted because POSIX
does not pin it and the shells disagree among themselves.
</content>
</entry>
<entry>
<title>bench: read the 28 differences from the host's sh</title>
<updated>2026-11-26T03:22:07Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:22:07Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=d9ea106455acb97d06607e74d5ec0bafb7ad3f6b'/>
<id>urn:sha1:d9ea106455acb97d06607e74d5ec0bafb7ad3f6b</id>
<content type='text'>
Every script that zash and the IBM sh disagree on has now been read. None
is a zash bug: zash matches dash on all 38 (that is what the suite says),
and the differences are the IBM shell's — it cannot do `[ a \&lt; b ]`, `fc`,
or arithmetic across a newline; it exits where `command eval` should only
set a status; it keeps literal quotes inside `${y:-"q r"}` and empty
fields from unquoted `$@`; its exit status is 1 for every failure.

The one row that is our choice is the status one: the ash family's 2 for
a failed redirection, which DESIGN.md already lists and this now records
in the table, so that a ksh script on z/OS testing `$?` against 1 is not
a surprise.
</content>
</entry>
<entry>
<title>bench: measure zash against the sh this host has</title>
<updated>2026-11-26T03:04:44Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=aa1a6d2179d4c1c139847aba0bb7675ce2e0b20f'/>
<id>urn:sha1:aa1a6d2179d4c1c139847aba0bb7675ce2e0b20f</id>
<content type='text'>
`compat.sh` runs every tests/posix script under zash and under another
shell, each in an empty directory, and prints the ones whose output or
status differ.  It is not a test: the .exp files are a reference shell's
output, and on z/OS /bin/sh is IBM's ksh-lineage shell with wording and
statuses of its own.  The count is how close a script naming #!/bin/sh
gets to its meaning here; the diffs say which differences to read.

On cbt, 10 of the 38 scripts agree and 28 differ, most of them on
diagnostics.
</content>
</entry>
<entry>
<title>interactive: a prompt's width counts columns, not bytes</title>
<updated>2026-11-26T02:30:22Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T02:30:22Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=deb0ed011fe2cfc7058facb3f63b7feaeb8d4a8e'/>
<id>urn:sha1:deb0ed011fe2cfc7058facb3f63b7feaeb8d4a8e</id>
<content type='text'>
The built-in editor skipped `ESC [ ...` sequences when working out where
the prompt ends.  Colour and titles are not all CSI: an OSC title or
hyperlink runs to BEL or `ESC \`, DCS runs the same way, and `tput sgr0`
is the three-byte `ESC ( B` before `ESC [ m`.  A prompt built with
`$(tput ...)` was measured wrong, which costs the cursor position and
with it the wrapped-line arithmetic.

`esc_seq_len()` in interact.c now walks what a terminal understands, and
edit_builtin.c uses it.  The libedit build shares the walk: it brackets
control runs for `EL_PROMPT_ESC`, and adds the space libedit needs when
a prompt ends in one, since libedit attaches a literal run to the
character after it.

bench/editor.py measures the two costs run.sh cannot see, start to first
prompt and per-key echo, on a pty; bench/README.md has the table.  The
release, z/OS and fuzz builds move to -O3 while the sanitizer and
coverage builds stay low: inlined frames make their reports harder to
read than the few percent they would gain.
</content>
</entry>
<entry>
<title>docs: the z/OS tables and prose at 64-bit, C23 and the LPA</title>
<updated>2026-11-25T19:19:07Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T19:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=e85914ec27f202a277a5a3e2a41a5f5328ab70cf'/>
<id>urn:sha1:e85914ec27f202a277a5a3e2a41a5f5328ab70cf</id>
<content type='text'>
README's benchmark table is the 64-bit run with the run-time in the LPA
and zsh installed (it was the 2.1-era table, and its zsh column was the
31 ms start-up, not zsh). bench/README.md keeps the 2.1 numbers as the
history of what the LPA fixed, and gains the start-up table it now has a
measurement for. investigation.md's §2 recommendation was still "build
31-bit"; it now says what happened instead.
</content>
</entry>
<entry>
<title>C23: nullptr for null pointers, constexpr for typed constants</title>
<updated>2026-11-25T06:31:26Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T06:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c7f23b8a5fb86f8df51809aca64415bcadcaa9f6'/>
<id>urn:sha1:c7f23b8a5fb86f8df51809aca64415bcadcaa9f6</id>
<content type='text'>
nullptr in every place a null pointer constant was meant; NULL is gone
from src/.

constexpr where it improves on #define without costing anything: the
IGGCSI00 work-area offsets and sizes, and the scalar sizes MVS_DSN_MAX,
CSI_FIELD_LEN, CSI_WORK_MIN, PDS_DIRBLK, CSI_WORK, CSI_MAX_CALLS.  A
constexpr in C is a constant expression, so it still bounds the arrays
that use it, and it now carries a type and can be checked with
static_assert.  Feature switches (#if), the CSIETYPE/EBCDIC byte
constants read as octets, and the related-constant enum sets stay as
they were.
</content>
</entry>
<entry>
<title>build: make the 64-bit z/OS build the default</title>
<updated>2026-11-25T06:06:46Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T06:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=b786aac5c1578a5e87c42db8273e13af09ab5ef7'/>
<id>urn:sha1:b786aac5c1578a5e87c42db8273e13af09ab5ef7</id>
<content type='text'>
zash is built 64-bit on z/OS now: -m64 for the ASCII and the EBCDIC
build and for the debug build, and `make` as well as `make zash` land
on zos-ascii there. The 31-bit build existed for the 64-bit start and
fork costs, which were the C run-time being loaded out of the linklist;
with CELQ* in the LPA the widths measure the same and the shell is
built at the width IBM builds for.

The catalog and dynamic-allocation modules are AMODE 31 and OS_UPSTACK
does not exist at -m64, so both are declared with plain OS linkage,
which is the 64-bit glue for an AMODE 31 callee. Neither module is
installed on the test system, so that path is unverified there;
csi_call() still catches a program check and retires the catalog.
IGGCSI00's VL bit comes from the width of a pointer, not 0x80000000.

Documentation follows: README gains a Recommendations section for the
LPA change and loses the 31-bit rationale; DESIGN.md's cost model,
catalog linkage and open questions match the measurements; bench/README
states the current width and the rerun numbers; investigation.md
records the decision.
</content>
</entry>
<entry>
<title>docs: name the system by release, not by its hostname</title>
<updated>2026-11-25T05:14:17Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T05:14:17Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=44252281ec0044cc816f0b3c384e35cfe5dd8469'/>
<id>urn:sha1:44252281ec0044cc816f0b3c384e35cfe5dd8469</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bench: the 64-bit start-up cost was the runtime not being in the LPA (#20)</title>
<updated>2026-11-25T04:29:48Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T04:29:48Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=98f0bc024df92868d04fc42313dd034f3968c511'/>
<id>urn:sha1:98f0bc024df92868d04fc42313dd034f3968c511</id>
<content type='text'>
Adding the CELQ members of CEE.SCEERUN2 to the dynamic LPA takes a
trivial 64-bit start from 5.83 ms to 1.63 ms, the fork() cost from
4.20 ms to 0.10 ms, and /bin/zsh from 31.4 ms to 3.6 ms.  The 27x
ratio this repo has been explaining since PR #15 was a system not
following IBM's own advice for the 64-bit runtime.</content>
</entry>
</feed>
