Version 117 of Tcllib

Updated 2016-11-27 03:03:58 by APN

Summary

Tcllib is a distribution of several packages for Tcl, all written entirely in Tcl, useful in a broad variety of areas. Tcllib has an approximately yearly release schedule. Version 1.18 has been released February 3, 2016.

A tklib module also exists under the tcllib project, which contains modules that depend on Tk.

Description

Tcllib Location
Where to find and download Tcllib.
Tcllib Installation
How to install and then use Tcllib.
Tcllib Contribution & Feedback
How to contribute to Tcllib, report errors, etc.
Tcllib Contents
List of (all the) packages found in Tcllib.

Some modules of Tcllib includes variants written in C, with Critcl. The typical package require ... automatically makes use of the more performant variants if possible. To check whether these more performant variants are available:

package require tcllibc

Documentation

development version
the freshest version of the reference manual
documentation for ActiveTcl 8.5
Tcllib 1.13 (?)
documentation for ActiveTcl 8.6
Tcllib 1.14
documentation at sourceforge
out-of-date as of 2013-03-20 - Should redirect to the development version at core.tcl.tk above.
How to start with tcllib
a discussion

Contributors

Cameron Laird
mime, base64, smtp, ftp, pop3, ... If

Community

AK has in the past written occasional but welcome Tcllib Messages of the Day (TMotD) for the mailing list.

Bugs

report bugs via the fossil bug tracker

Be sure to include as many of the following as possible:

  • your name
  • your email address (so you can be contacted when the bug is fixed)
  • a description of the behavior you expected to see
  • a description of the behavior you actually saw
  • the version of Tcl you are using
  • the version of Tcllib you are using
  • the OS you are using, and the version of the OS
  • anything else you think might be relevant

A sample script demonstrating the problem is always very helpful.

Misc

2004-05-25: Has the tcllib team considered adding some form of Michael Cleverly's package, nstcl? While most functionality is duplicated in the current distribution of tcllib, the nsset datatype is a wonderful thing to have; an indexed array! [index - key - value]. His api has some commands to utilize it as well. As an aolserver tcl coder, I work with it extensively and for me it renders the array command obsolete. APN The 8.5+ dict built-in seems to be a superset of this.

set id [ns_set create]
%t2
ns_set put $id fname Michael
%0
ns_set put $id lname Cleverly
%1
ns_set get $id fname
%Michael

As documented above, it generally isn't a matter of some team determining whether some code is worthy to add. It is typically a matter of some interested party contacting the tcllib maintainers to work out the details of their adding a new module to the library. Why not contact Michael and ask if he would like to add his code to tcllib? Over the years, it has turned out to work better if the author is involved with this process, so that no misunderstandings, etc. occur.

History

When Tcllib was originally released, the following was written:

In response to popular demand, the Tcl core group is introducing tcllib, a Tcl standard library. This meta-package will contain many modules, each of which is itself a standalone Tcl package. The intention is to provide commonly-used functions and libraries, bundled together under a single license (BSD), and with no binary dependencies. This will encourage use and growth of the library. Once tcllib is downloaded and installed, users will be able to "package require tcllib" or "package require any_module_in_tcllib".

Releases of tcllib will be made mostly independently of releases of the Tcl/Tk core. This will allow a faster release cycle, which is important in the early stages of development. It is possible that future releases of the core will include a snapshot of the tcllib.

Initially, we have seeded the library with several modules, some written in-house at Scriptics and by the core group:

struct
Tcl implementations of common data structures
profiler
Function level Tcl profiler
cmdline
getopt style command-line parser
base64
base64 encoder/decoder
fileutil
Tcl implementations of file utilities (grep, find, ...)
pop3
pop3 client
math
math functions (min, max, ...)

A subsequent article said

From: Dan Kuchler <[email protected]>
Newsgroups: comp.lang.tcl
Subject: Re: Math extensions to TCLlib
Date: Sun, 05 Nov 2000 08:37:57 -0800
Organization: Ajuba Solutions
Message-ID: <[email protected]>
References: <[email protected]>
To: Morgan <[email protected]>

Morgan wrote:
>
> [interesting proposed changes snipped]
>
> Also, are there any specific procedures for contributing to the
> TCLlib?  Anyone I need to contact or specific software I need to use?
> Would this go better in a sub-package of the math portion of the TCLlib?
>

It's great to hear that you are interested in helping contribute
to tcllib.  I thought your proposed set of functionality sounded
interesting.

Some folks have shown interest in having access to the functionality
available through the NumPy package (a python package) in tcl.

This might give you ideas for things that people might want.

The NumPy package is at:

http://sourceforge.net/projects/numpy/

I think the process for volunteering to work on a project there is
to contact an admin for a project.  Currently [AK] has
been organizing tcllib development, so it might be worthwhile to
contact him

Currently the web page that talks about tcllib (a little out of
date) is at:

http://www.purl.org/tcl/home/software/tcllib/

As far as guidelines for contributing, I think the current
requirement is that things in tcllib must be able to be
run in a tcl-only mode (i.e. no binary package dependencies),
and the contributed code should have either tests or documents,
but preferably will have both.

There are good contribution guidelines (that also contain a
link to the Tcl Sytle Guidelines) at:

http://www.purl.org/tcl/home/software/tcltk/contributing.tml

(while that page is focused on contributing to tcl/tk, most
of it is relevant to tcllib as well).

I hope that helps get you started!

--Dan

Discussion

Targeted Tcl versions

AMG: What versions of Tcl does tcllib target?

Forward compatibility

AMG: If Tcllib is intended to support both 8.4 and 8.6, would it be appropriate to include 8.4-compatible pure-Tcl implementations of 8.6 commands? For example, I just finished writing a [dict] command that works in 8.4 yet passes most of the 8.6 test suite [L1 ]. That might be a good fit. There are many other possible commands to consider, for instance [lassign]. See Forward compatibility for more.