Pre-compiled Cortcl, built against FreeBSD-CURRENT, is available for architectures supported by the Bisdi distribution.
Cortcl, a Bisd.ro project, has several primary goals.
- Provide a more capable scripting environment, without significant impact to overall size, for customizing the init process in FreeBSD.
- Help FreeBSD, TCL and Fossil reach mainstream adoption.
- Facilitate system-wide cascading configuration.
- Bundle basic software for collaboratively developing and distributing web applications, packaged as starkits and/or Fossil repositories, which work identically on the desktop and on the server.
AndroWish is a basekit, one of the few known to be actively developed, freely licensed and fully functional. While AndroWish itself targets the Android platform, it includes an alternate build called undroidwish for other platforms. With apologies to Roy Keene's kitcreator, undroidwish is hands down the smoothest path to a custom basekit for multiple platforms.
Cortcl is a stripped-down, tclsh-only version of vanilla undroidwish with a few additions. In contrast to the Batteries Included approach of Androwish, Cortcl is austere, weighing in at a mere ~5MB.
Cortcl uses the following components of AndroWish.
- statically linked - Although Cortcl itself depends on a tiny handful of base libraries, the software it contains has no external dependencies.
- zip - The Cortcl binary is a zip archive, so it is compatible with native tar(1).
- tclvfs - The Cortcl binary is a virtual file system containing TCL libraries and modules, as well as auxiliary software and other content.
- dicttool - Provides dictionary merge
- json - Translates between JSON and dictionary
- textutil - Splits string by multiple characters
- tls - Based on LibreSSL
- tdom - Translates between JSON and XML, provides XPath
Expect is a tool for automating software interactions. For instance, Expect can be used in a background script to log in to a remote computer without user intervention and without leaking the password in the command history or process list.
More trivially, Expect can mask the complexities of handling IO in TCL when user interaction is required.
The following software is obtained from Bisd.ro Depot.
Cor is a pure TCL library which simplifies application normalization across platforms.
Silki is a minimalist web application framework based on TCL.
- TCL templating
- Embedded web server for self hosting
- CGI mode for compatibility with other web servers
Silki uses Roy Keene software.
- rivetcgi - An implementation of Rivet without Apache dependency
- webapp - Member management
Fossil is a program for managing source code revisions made by multiple contributors from different places at different times.
Just as Cortcl is a single file containing a virtual file system with many files, a Fossil repository is a single file -- a SQLite database -- acting as a virtual file system containing many files.
This approach has its drawbacks.
- Requires extra storage since each file in a repository is duplicated in the checkout; the issue is mitigated by the use of compression in the repository.
- Storing large binary files in a repository is discouraged because they degrade performance and cannot be incrementally differentiated.
- SQLite cannot easily store files larger than 1GB.
However, the advantages heavily outweigh the drawbacks.
- Minimal dependence - Fossil can be statically linked for no external dependencies; otherwise any dependencies exist in the base system.
- Small footprint - The Fossil binary consumes only ~5MB.
- Cross-platform - Fossil runs on all desktop platforms: BSD, Linux, Mac, Windows
Fossil embeds a CGI-compatible web server capable of hosting any number of repositories simultaneously. This gives a web-based interface for managing repositories and accessing their contents.
The web server fulfills dual roles. Firstly, each contributor runs it locally (on the computer at which she sits) as she makes changes, using it to collect information which is related to the code , but not part of it, such as release notes and documentation, to be synchronized with the code. Secondly, it runs on the server hosting the primary copy of the repository for public consumption.
As a result of the first role, Fossil requires no permissions or file system access, other than to repositories, to run.
As a result of the second role, considerable resources are devoted by Fossil's authors toward keeping the web server performant, resilient and secure, even in hostile hosting environments.
Subject to limitations, Fossil is an ideal remote backup utility for a digital library.
For users with multiple devices, this means changes made on one are seamlessly synchronized with the others.
Combined with a cheap shared hosting subscription, Fossil makes the ultimate poor man's private cloud. Add another subscription with a different provider for redundancy.
The forum feature allows any number of users to participate in a chronological hypertext conversation authored in Markdown.
The unversioned feature stores files outside the blockchain, yet still subject to synchronization. This can be used to distribute derivative, temporary or otherwise volatile files, such as software installer images or finalized multimedia, without polluting or bloating a repository.
Content Management System
The wiki and technote features are indispensable for collecting, organizing and refining time-insensitive and time-sensitive (respectively) hypertext documents authored in Markdown.
When properly compiled, Fossil can be extended in significant ways.
The hooks mechanism enables adding custom actions to Fossil's web and/or command line interface.
Fossil contains an embedded scripting language called Test Harness 1 (TH1) with strictly limited capabilities which only runs in certain contexts; for instance, wiki pages cannot interpret TH1, nor can they be configured to do so.
TH1 is suitable for designing alternate views of repository content and controlling access based on membership.
When compiled with TCL support, as is fossilt, Fossil gives TH1 the ability to interpret raw TCL code, transforming it into a full-blown application development framework.
Bisdi is a minimalist FreeBSD distribution published as a collection of disk images, with each supported ABI combination stored in a separate Fossil repository. With Bisdi, upgrading FreeBSD is as simple as synchronizing the repository and using Cortcl to install the new images.
Aside from bundling Cortcl, Bisdi makes very few changes to the official base system, and even fewer of consequence. The main difference is that diskless(8) is patched to support locally stored classes, called sides, instead of those stored on a BOOTP server.
The sides concept combines the flexibility of a live distribution, the convenience of persistent storage and the power of cascading configuration into a concrete implementation equally suited to diskless clients, physical hosts, virtual guests and jails.
The implementation involves a suite of unofficial [rc(8)] services.
- system dependencies - Libraries required to run Cortcl
- /lib/libz.so.6 - Required by libtcl86.so
On platforms other than FreeBSD, Cortcl is replaced by AndroWish for Android and by undroidwish for others.
Downloads for the following platforms are available from AndroWish.
- Android - arm, 32-bit
- Windows - x86, 32-bit
- Windows - x86, 64-bit
- Linux - x86, 32-bit
- Linux - x86, 64-bit
- Linux - arm, 32-bit
- Mac - x86, 64-bit
For undroidwish, vanillatclsh must be extracted with the following command once download is complete.
prompt% <vanillawish> builtin:mktclsh
Cortcl is a command line application. How to obtain a prompt is platform-dependent. Thereafter, instructions are identical on all platforms.
The general form of a command follows.
<basekit> <starkit> <starkit-arguments>
Corlib is a build of Cortcl as a dynamically loadable library.
Cortcl bundles an alternately compiled fossil binary with TCL support which depends on Corlib.