Description/Background
The main goal with this project is to develop the fnest
software using the Tcl language.
fnest
is a set of scripts, originally written in bash
, with the purpose to organize and group (but not directly modify) Fossil repositories.
Anyhow, after some development, the decision was taken to re-write fnest
in Tcl, for a number of reasons:
- Tcl is a more powerful programming language than
bash
when it comes to string processing,
data structures (arrays/dicts and lists), extending functionalities via packages, etc. - Tcl source code is easy to organize in a tcl package.
- Tcl comes with the
tcltest
framework included/integrated. - Tcl is useful for embedded environments and bootstrapping, thanks to tiny Tcl interpreters such as
jimsh0
(single C-code file, source code: ~614 kB, executable: ~341 kB).
Other reasons to use Tcl together with Fossil-related software:
- The Fossil test scripts are written in Tcl.
- The Fossil
th1
pages uses a Tcl-like syntax. - drh likes Tcl. :-)
Sections
This repository is divided into the following sections/subdirectories, more or less following the fnest
development steps:
- examples/ : A Tcl programming tutorial and examples.
- package/ : A Tcl package tutorial. Includes creating a "skeleton" for the
fnest
package. - ambiguous-command/ : Implement "ambiguous-command" detection for subcommands, in the same way as Fossil does.
- ensemble/ : Tutorial how to handle subcommands with
namespace ensemble
. - tcltest/ : A
tcltest
tutorial. Includes tests for eachproc
in thefnest
package. - nagelfar/ : A Tcl code coverage tutorial, using nagelfar.
- jimsh/ : Issues related to the
jimsh0
Tcl interpreter, with focus on bootstrapping. - bootstrap/ : How to bootstrap any installation from scratch from internet, with focus on using
jimsh0
to installfnest
. - bin/ : The "final result"; the directory with the Tcl scripts which will replace the existing
bash
scripts (and add some new) in the mainfnest
repository:fnest
,fsetup
,fgroup
, thefnest
package etc. - complete/ : Optionally, add auto-completion for
fnest
subcommands, using thebash
built-in commandcomplete
.