Why Sponsor Oils? | blog | oilshell.org

Release of OSH 0.6.pre2

2018-08-19

This is the latest version of OSH, a bash-compatible shell:

Please try it on your shell scripts and report bugs! To build and run it, follow the instructions in INSTALL.txt.

If you're new to the project, see Why Create a New Shell?. OSH can run unmodified shell scripts that are thousands of lines long, as described in the announcement for OSH 0.4.

Table of Contents
Visible Changes
Under the Hood
Selected Metrics

Although I released version 0.6.pre1 just a few days ago, I'm making another release because Unicode support in basically done, and the binary is significantly smaller. I continue to chip away the problem of OSH being too big and too slow.

The release process involves an array of tests and benchmarks, which usually catch bugs. This release was no exception.

The following sections summarize the raw changelog.

Visible Changes

OSH now respects UTF-8 in two places:

  1. The string length operator ${#s} counts code points, not bytes.
  2. String slicing like ${s:1:3} also counts code points, not bytes.

In addition to implementing #2, I cleaned up related error conditions:

NOTE: The motivation for implementing UTF-8 ourselves was to remove Python's unicodeobject.c from the build, which is over 10K lines of code. This was done in OSH 0.5.

Under the Hood

Selected Metrics

The tests and metrics published with each release quantify the changes above:

Lines of native code went down because I removed more parts of CPython:

Lines of Python code also went down because I removed parts of CPython as described above:

This is reflected in the smaller binary, which is faster to build:

The bytecode size went down as well: