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
bashwhen 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
tcltestframework 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
th1pages 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
fnestpackage. - 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
tcltesttutorial. Includes tests for eachprocin thefnestpackage. - nagelfar/ : A Tcl code coverage tutorial, using nagelfar.
- jimsh/ : Issues related to the
jimsh0Tcl interpreter, with focus on bootstrapping. - bootstrap/ : How to bootstrap any installation from scratch from internet, with focus on using
jimsh0to installfnest. - bin/ : The "final result"; the directory with the Tcl scripts which will replace the existing
bashscripts (and add some new) in the mainfnestrepository:fnest,fsetup,fgroup, thefnestpackage etc. - auto-complete/ : Optionally, add auto-completion for
fnestsubcommands, using thebashbuilt-in commandcomplete. - gui/ : Optionally, add a client-server based GUI to the
fnestcommand.