summaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAgeFilesLines
* docs: humanize the markdown docsdocs/startup-probeSean Kurtz6 days4-215/+219
| | | | | | | | | Plain sentences where the prose had decorative bold lead-ins, em dashes and one-line closers. Claims, numbers and commands are unchanged, except two corrections that the startup probe settled: README said the remaining z/OS gap was the price of the address mode, and DESIGN's open question on `a | b &` said the gain depended on the address mode. Both are the 64-bit C run-time, not the address mode.
* docs: keep the probe write-up in notes/investigation.mdSean Kurtz6 days3-27/+114
| | | | | | The assembler-vs-C experiment, its method and the questions it leaves open get a tracked home outside the generated docs/ tree; bench/README keeps the result table and points there.
* docs: the 64-bit start-up cost is LE, not the address modeSean Kurtz6 days2-18/+75
| | | | | | | | | An AMODE 64 HLASM program that returns 0 without any C run-time starts in 0.8 ms, the same as the AMODE 31 copy, while the same empty program in C costs 29.4 ms at -m64 and 2.0 ms at -m32. So the 28 ms is Language Environment's 64-bit initialization, not the address space, and the 31-bit LE start is about 1 ms. Records the probe and corrects the claims in bench/README.md and DESIGN.md.
* Merge pull request #11 from skurtz97/feat/zopen-portSean Kurtz7 days3-6/+59
|\ | | | | build: add zopen build configuration
| * fix: make the zopen build use GNU make and install without rebuildingSean Kurtz7 days2-1/+8
| |
| * feat: add zopen build configurationSean Kurtz7 days2-5/+51
|/
* Merge pull request #10 from skurtz97/fix/zos-make-posixSean Kurtz7 days3-17/+24
|\ | | | | Fix IBM make parse failure on z/OS
| * fix: keep the Makefile readable by IBM makeSean Kurtz7 days3-17/+24
|/ | | | Remove ?= and $(shell) from the docs browser lookup, use $(MAKE) for recursion, and make the z/OS default naming explicit.
* Merge pull request #9 from skurtz97/docs/no-ksh88Sean Kurtz7 days3-26/+28
|\ | | | | README: the z/OS comparison column is IBM's /bin/sh
| * README: the z/OS comparison column is IBM's /bin/shSean Kurtz7 days1-3/+2
| | | | | | | | | | Drops the ksh88 lineage claim; the shell is /bin/sh, and the ksh93 contrast stays where it explains the n/a row.
| * bench: name the baseline shell /bin/sh, not ksh88, in prosedocs/readme-currentSean Kurtz7 days1-3/+3
| |
| * bench: keep a label with a space in one columnSean Kurtz7 days1-5/+6
| |
| * bench: label the z/OS baseline column "z/OS sh"Sean Kurtz7 days3-6/+6
| |
| * docs: label the z/OS bench column "z/OS sh"Sean Kurtz7 days1-13/+13
| |
| * docs: say why (( )) is n/a on IBM shSean Kurtz7 days1-3/+4
| |
| * docs: name the z/OS baseline shell as IBM's sh, not ksh88Sean Kurtz7 days1-14/+15
| | | | | | | | | | | | The column is /bin/sh on z/OS. Calling it ksh88 in the table implies a shell release z/OS does not ship; the prose now says what it is, notes the lineage, and says that run.sh prints the label ksh88.
* | Merge pull request #7 from skurtz97/docs/readme-currentSean Kurtz7 days1-15/+23
|\| | | | | docs: bring README up to date with the Makefile
| * docs: bring README up to date with the MakefileSean Kurtz7 days1-15/+23
| | | | | | | | | | | | | | | | Clang only on Linux (GCC reports -Wclobbered, so "builds it cleanly" was not true any more), drop the claim that make is never invoked recursively (all, check and doc re-enter it), note the targets the list was missing (install, spec, other-docs, zos-lint, mvs-asan) and the typst dependency, and stop calling [[ ]] planned — it is implemented, tested and benchmarked.
* | Merge pull request #6 from skurtz97/chore/editor-and-lint-hintsSean Kurtz7 days3-47/+182
|\ \ | |/ |/| chore: clangd sysroot note, shellcheck header, typst formatting
| * chore: clangd sysroot note, shellcheck header, typst formattingchore/editor-and-lint-hintsSean Kurtz7 days3-47/+182
|/
* Merge pull request #5 from skurtz97/license/triple-licenseSean Kurtz7 days3-21/+122
|\ | | | | license: MIT OR Apache-2.0 OR BSD-2-Clause
| * license: MIT OR Apache-2.0 OR BSD-2-Clauselicense/triple-licenseSean Kurtz7 days3-21/+122
|/
* Merge pull request #4 from skurtz97/docs/logo-and-cleanSean Kurtz7 days9-2605/+2815
|\ | | | | docs: one centred logo, and clean removes what the makefile builds
| * Merge origin/main into docs/logo-and-cleandocs/logo-and-cleanSean Kurtz7 days28-327/+1427
| |\ | |/ |/| | | | | | | | | Resolutions: README.md and DESIGN.md keep the new colour logo (packaging/zash-logo.svg) at width 220; the Makefile keeps main's newer shellcheck header, lists `make docs` in the usage block, and `clean` removes docs, cov and $(ZTOOLS) along with the branch's new tools.
* | Merge pull request #3 from skurtz97/fix/zos-spawn-fdmapSean Kurtz7 days28-329/+1441
|\ \ | | | | | | z/OS: keep a close-on-exec pipe out of the child's fd map
| * | z/OS: keep a close-on-exec pipe out of the child's fd mapSean Kurtz7 days3-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys_pipe() duplicates the shell's pipe ends above SYS_NFD and marks them FD_CLOEXEC, so that other children do not inherit them. spawn()'s fd_map hands the child the parent's descriptor as it is, without clearing the flag the way dup2() would, so a mapping onto the child's 0..2 carried FD_CLOEXEC into the child. The child could still write, but the next exec inside it lost stdout: ps printed FSUM6004 write error on standard output: EDC5113I Bad file descriptor and a #!/bin/sh shim lost the pipe it was given. Pass a plain duplicate, which fcntl F_DUPFD makes above SYS_NFD without the flag, for every map entry that names a different descriptor, and close the duplicates once spawn() has made the child. Entries that map a descriptor onto itself are untouched. tests/zos/fdmap.sh records the case: a pipe the shell made, read by a child that execs. Reported in #1.
| * | z/OS: run 31-bit and load IGGCSI00 through the C librarySean Kurtz7 days26-324/+1401
|/ / | | | | | | | | | | | | | | | | | | | | | | | | zash was AMODE 64, so calling the AMODE 31 IGGCSI00 needed assembler glue (zos_csi.s) that switched addressing mode around the branch. Built with -m32 the program is 31-bit itself: the call goes through a plain function pointer, the work area and the saved registers live in one 31-bit block in C, and the glue is gone. The rest of the tree follows the change: the build, the off-z/OS lint shim, DESIGN.md and README.md, the benches, the Lean spec of the pattern matcher, and the tests that recorded what the extra address bits had changed.
| * make: add other-docs, and bring the usage comment up to dateSean Kurtz7 days1-5/+25
| | | | | | | | | | | | | | | | | | | | | | make other-docs runs the documentation that needs a tool z/OS does not have: the specification through typst, the source reference through Doxygen. The comment at the top listed fourteen of the targets and missed the rest; it lists them all now, grouped the way the file is, with the argument each one takes where it takes one. Doxygen's output is doc/, not docs/, which the comment had wrong.
| * formal: typeset the spec from a script, and with the new coverSean Kurtz7 days3-2577/+2755
| | | | | | | | | | | | | | | | | | | | formal/zash-spec.pdf could not be rebuilt from anything in the tree. scripts/spec-pdf.sh does it: the typst CLI when present, the Python package otherwise, with the repository root as typst's root so the cover can reach ../packaging/zash-logo.svg. `make spec` runs it. The PDF is rebuilt from the same source, so the cover carries the new logo; the page count is unchanged at 27.
| * packaging: new logo, theme glyphs and iconSean Kurtz7 days4-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mark is a 512px glowing screen with the `>z` prompt; the two small glyphs are 16px marks for light and dark backgrounds, and the .ico is now a six-size Windows icon. EOF2 formal: typeset the spec from a script, and with the new cover formal/zash-spec.pdf could not be rebuilt from anything in the tree. scripts/spec-pdf.sh does it: typst CLI when present, the Python package otherwise, with the repository root as typst's root so the cover can reach ../packaging/zash-logo.svg. `make spec` runs it. The PDF is rebuilt from the same source, so the cover carries the new logo; page count is unchanged at 27.
| * docs: one centred logo, and clean removes what this makefile buildsSean Kurtz7 days3-8/+12
|/ | | | | | | | | | | README and DESIGN.md showed a light/dark <picture> pair, copied from a layout that had no centring; both now use packaging/zash-logo.svg inside a centred paragraph, the same header the typst spec already uses. make clean listed neither zash-debug nor fuzz-mvsfmt, so both survived a clean. The shellcheck directive at the top of the makefile now also covers the $(OBJS)-style expansions and the recipe `if` it reads as shell syntax.
* typst: fix some issues with formatting around code blocks.Sean Kurtz10 days5-27260/+5059
|
* formal: moved all spec docs inside new formal directory for working on ↵Sean Kurtz10 days4-0/+1
| | | | verification.
* added new benches, the logo, and a formal spec for possible verification.Sean Kurtz10 days12-1/+13704
|
* docs: say 31-bit, not below the barSean Kurtz11 days3-21/+42
| | | | | | "Below the bar" means below 16 MB, the 24-bit range. IGGCSI00 needs 31-bit addresses, so the block has to stay below 2 GB -- two very different limits. Corrected where the two had been confused.
* z/OS: load IGGCSI00 once and keep the block for the shellSean Kurtz11 days3-72/+120
| | | | | | | | | | | | | | | | | | | | The search interface was reached through LINK, which asked the system to find and attach the module on every call -- and completion issues a call per Tab. The glue now LOADs the module on the first call, writes its entry point into the block, and branches to it directly afterwards, and the block itself is taken from 31-bit storage on the first search and kept, because IGGCSI00 is AMODE 31 and all three of its addresses have to stay below 2 GB. The block is declared packed, so the compiler cannot add padding the assembler's offsets do not know about, and aligned(8), so the save area starts on a doubleword. Its name field is spelled in IBM-1047 bytes rather than as a C string, so the module is named the same way whatever character mode this build runs in. Verified on the machine: SYS1.MA* returns SYS1.MACLIB, SYS1.* returns 135 names, and Tab in an interactive shell completes //'SYS1.MA to //'SYS1.MACLIB' and lists the members of that PDS.
* README: the subshell row, from the run against ksh88Sean Kurtz11 days1-3/+3
|
* docs: the subshell row, and why a subshell can now skip its processSean Kurtz11 days2-1/+9
|
* README: the subshell row, after running it in the shellSean Kurtz11 days1-12/+11
|
* docs: keep the source ASCII, which the z/OS working tree needsSean Kurtz11 days1-1/+1
|
* exec: run a subshell in process when its body cannot change anythingSean Kurtz11 days4-1/+57
| | | | | | | | | | | | | | A `fork()` copies the address space on z/OS, where a `spawn()` can share it. The subshell row measured 4.7 ms a turn there against 0.3 ms for an external command, and ksh88 does not fork for `( : )` at all. The pipeline stage check already answered the safety question with is_pure(), so a subshell whose body is one output-only builtin with no redirections and no assignments reuses the answer and runs in the shell. Expansion of the arguments is wrapped in the same capture scope a pipeline stage uses, so ${x=1} no longer escapes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* README: the whole benchmark set, on both platformsSean Kurtz11 days1-40/+63
|
* bench: 200 background jobs, which is what z/OS lets a shell forkSean Kurtz11 days1-1/+1
|
* clangd: keep its clang-tidy view in step with .clang-tidySean Kurtz11 days1-0/+7
| | | | | | | | Two checks disagree with how this tree is written: if (ptr) is the house style for a null test, and _Static_assert, _Noreturn and _Alignas are C11 keywords whose spelling the standard fixes. .clang-tidy already allows the first and switches off the second, but clangd applies those options unevenly between clang-tidy versions, so it named both anyway.
* Revert the pi-lens config out of the treeSean Kurtz11 days1-7/+0
| | | | | Editor and linter policy belongs in the user's own configuration, not in this repository.
* bench: more of what a script actually doesSean Kurtz11 days13-0/+20135
| | | | | | | | | | | | | Eleven more benchmarks, each one a subsystem rather than a syntax form: here-documents, getopts, redirections, subshells, background jobs, printf, parameter expansion, IFS field splitting, case dispatch, recursion, and bash-style ${v/a/b} substitution. They print one line that every shell must agree on, so they are tests too, and the harness reports n/a where the shell lacks the feature. .pi-lens.json turns off its reserved-identifier rule: every match in this tree is a C11 keyword (_Static_assert, _Noreturn, _Alignas) or a runtime name (_exit, __malloc31, _CVSCSID) that has to be spelled that way.
* tests/zos/ebcdic: drop the external sort from the collation testSean Kurtz12 days2-4/+2
| | | | | | | /bin/sort collates by the environment's collation, not by EBCDIC byte order, so on z/OS it put the digits first and the test failed the first time it ran in the EBCDIC build. The shell's own ordering, which is what the test is for, is checked above it.
* bench: the numbers, measured against ksh88 by nameSean Kurtz12 days1-19/+40
| | | | | | | The z/OS column was headed /bin/sh, which read as any old sh and hid that it is IBM's ksh88 port. Both tables are re-measured with the new report and deploy scripts, and the [[ ]] and (( )) rows are split apart, since ksh88 has the first and not the second.
* bench: a probe must fail when the feature is missingSean Kurtz12 days1-1/+3
| | | | | | An if with no else clause answers 0 even when its condition failed, so dbracket's probe reported success on dash and the row said differs instead of n/a. The probe now says so itself.
* bench: keep the arithmetic totals inside 32 bitsSean Kurtz12 days14-2/+17
| | | | | | | ksh88 works in 32-bit integers, so summing i*2 over 200000 iterations overflowed and the benchmark reported "differs" instead of a time: the same script, two answers. Summing (i % 100) * 2 does the same work and fits in 31 bits.