Tcl Modules
TIP #189: Tcl Modules
TIP #190: Implementation Choices for Tcl Modules
TIP #191: Managing Tcl Packages and Modules in a Multi-Version Environment
A Tcl module is a package in a single file that can be sourced. (DLLs
may still be embedded in that). There is no pkgIndex.tcl file, the
package name and version are expressed in the module filename itself, so
that version 3.14 of package foo must be named foo-3.14.tm.
"Tcl Modules" on the other hand is designed with less flexibility
in mind and to allow implementations to glean as much information as
possible without having to perform lots of accesses to the filesystem.
Additional benefits of the proposed design are a simplified deployment
of packages, akin to the way starkits made application deployment
simple, and from that an easier implementation and management of
repositories.
Tcl Modules (.tm) 檔案的文件。
2014-06-27
2014-06-18
Catenation and Operand Specialization for Tcl Virtual Machine Performand
Catenation and Operand Specialization for Tcl Virtual Machine Performand
A Masters thesis by Benjamin Vitale, 2004, from Parsing, Bytecodes and Execution
A Masters thesis by Benjamin Vitale, 2004, from Parsing, Bytecodes and Execution
2014-05-17
Img extension
在 Windows 平台下,使用 ActiveTcl,可以用 teacup 來安裝:
teacup install Img
在 openSUSE,則是安裝 tkimg 這個套件就可以了。可以使用下列的指令安裝:
sudo zypper in tkimg
套件說明 @ openSUSE RPM:
This package contains a collection of image format handlers for the Tk photo image type, and a new image type, pixmaps. The provided format handlers include bmp, gif, ico, jpeg, pcx, png, ppm, ps, sgi, sun, tga, tiff, xbm, and xpm.
teacup install Img
在 openSUSE,則是安裝 tkimg 這個套件就可以了。可以使用下列的指令安裝:
sudo zypper in tkimg
套件說明 @ openSUSE RPM:
This package contains a collection of image format handlers for the Tk photo image type, and a new image type, pixmaps. The provided format handlers include bmp, gif, ico, jpeg, pcx, png, ppm, ps, sgi, sun, tga, tiff, xbm, and xpm.
2014-05-14
Get Wub snapshot code
Wub snapshot tarball at https://code.google.com/p/wub/ link is "Oops, you've found a dead link." now.
所以後來只好使用 SVN 下載目前的 code base:
svn checkout http://wub.googlecode.com/svn/trunk/ wub
不知道 Wub 什麼時候會釋出新版本,不過如果要使用比 0.5 版更新的 code 來測試,之前是下載 snapshot tarball 就可以了,現在則需要使用 SVN 才行。
所以後來只好使用 SVN 下載目前的 code base:
svn checkout http://wub.googlecode.com/svn/trunk/ wub
不知道 Wub 什麼時候會釋出新版本,不過如果要使用比 0.5 版更新的 code 來測試,之前是下載 snapshot tarball 就可以了,現在則需要使用 SVN 才行。
2014-04-22
Tcl Extension Archive (teapot)
Tcl Extension Archive
From Tcler's Wiki 的解釋:
The Tcl Extension Archive is a repository of Tcl extensions hosted by ActiveState. Both pure-Tcl and compiled extensions are included, for Windows, Unix and MacOS X platforms. The URL of the archive is http://teapot.activestate.com/
如果使用 ActiveTcl,可以使用 Tcl Extension Archive (teapot) client - Teacup 來查詢與安裝 package,比較常用的應該都可以找到。
Teapot Repos
根據 Tcler's Wiki 的資料,有下列的 Repos 可以使用:
From Tcler's Wiki 的解釋:
The Tcl Extension Archive is a repository of Tcl extensions hosted by ActiveState. Both pure-Tcl and compiled extensions are included, for Windows, Unix and MacOS X platforms. The URL of the archive is http://teapot.activestate.com/
如果使用 ActiveTcl,可以使用 Tcl Extension Archive (teapot) client - Teacup 來查詢與安裝 package,比較常用的應該都可以找到。
Teapot Repos
根據 Tcler's Wiki 的資料,有下列的 Repos 可以使用:
- http://teapot.activestate.com/
- http://teapot.rkeene.org/
- 而網頁的列表,就是目前有收集的 packages。
2014-04-20
freeWrap 6.63
ANNOUNCE: freeWrap 6.63 released
Changes implemented in version 6.63
-----------------------------------
Tcl/Tk 的版本一樣是 8.6.1。
Changes implemented in version 6.63
-----------------------------------
- Wrapping across operating systems has been corrected: a) between 32-bit and 64-bit Linux
- Temporary file names used by freeWrap during the wrapping process have been modified to prevent possible collision with existing file names. This will prevent the possibility of overwriting of an existing file during wrapping.
- The ::freewrap::makeZIP command can now be used more than once. Previously, the first usage of the command worked while subsequent use failed with an error.
- Options have been added to the freeWrap command line that allow the user to control the amount of compression performed on the wrapped files. See the freeWrap documentation for details.
- The tcllib package included in freeWrap has been updated to version 1.16 and is located at the virtual directory of /tcllib1.16.
- The -i option can now be used to change the program icon when performing a cross-wrap with the -w option.
b) from Windows to Linux
Tcl/Tk 的版本一樣是 8.6.1。
2014-04-13
Tcl/Tk 的多國語言做法
Tcl/Tk 的多國語言做法是使用 msgcat 這個 command,他的使用概念是直接把一個字串當做是 index ,
再去根據系統目前設定的語系,找出翻譯好的字串替代。
source 功能和 BASH 的 source 類似,也和 C 的 include 類似。 我們可以利用這個函數去載入翻譯檔。簡單說,就是自己判斷語系,然後自行載入翻譯檔。
如果沒有該語系的翻譯檔,它就什麼都不翻譯,而是使用你程式所寫的字串。
source 功能和 BASH 的 source 類似,也和 C 的 include 類似。 我們可以利用這個函數去載入翻譯檔。簡單說,就是自己判斷語系,然後自行載入翻譯檔。
如果沒有該語系的翻譯檔,它就什麼都不翻譯,而是使用你程式所寫的字串。
2014-03-26
Build TclVfs on openSUSE 13.1
TclVfs
下載 tclvfs-20080503.tar.gz 來 build,結果 fail.
經過 Google 以及研究以後,要去 Source Forge 裡 CVS 目前的 code base (web-based CVS repository viewer) 去下載最新的 vfs.c,這樣就可以修正升到 Tcl 8.6 以後 build fail 的問題。
更新:
我發現我做了一件笨事情,其實按 Download GNU tarball 下載最新的 code 就好了。
下載 tclvfs-20080503.tar.gz 來 build,結果 fail.
經過 Google 以及研究以後,要去 Source Forge 裡 CVS 目前的 code base (web-based CVS repository viewer) 去下載最新的 vfs.c,這樣就可以修正升到 Tcl 8.6 以後 build fail 的問題。
更新:
我發現我做了一件笨事情,其實按 Download GNU tarball 下載最新的 code 就好了。
2014-03-22
Tclqrencode v0.1
連結網址:
Tclqrencode
使用 libqrencode 這個函式庫提供的功能,可以用來造出 QR code file.
下面是一個使用的例子:
結果:
2014/03/22更新:
qrspec.c and mqrspec.c 使用了 pthread,我改寫成 Tcl 所提供的 thread function.
Tclqrencode
使用 libqrencode 這個函式庫提供的功能,可以用來造出 QR code file.
下面是一個使用的例子:
#!/usr/bin/tclsh
package require tclqrencode
qrencode::setsize 5
qrencode::setforeground 000000
qrencode::setbackground ff8fff
qrencode::encode http://tcl-eval.blogspot.tw/ tcl-eval.png
結果:
2014/03/22更新:
qrspec.c and mqrspec.c 使用了 pthread,我改寫成 Tcl 所提供的 thread function.
2014-03-21
tcltest
Tcler's Wiki: tcltest
Getting started with tcltest
Getting Started with tcltest (Hai's Blog)
The tcltest package provides the user with utility tools for writing and running tests in the Tcl test suite. It can also be used to create a customized test harness for an extension.
所以一些 extension 下 tests 目錄裡的檔案,應該都是使用 tcltest 來進行測試的相關檔案。我記錄一下相關的連結。
Getting started with tcltest
Getting Started with tcltest (Hai's Blog)
The tcltest package provides the user with utility tools for writing and running tests in the Tcl test suite. It can also be used to create a customized test harness for an extension.
所以一些 extension 下 tests 目錄裡的檔案,應該都是使用 tcltest 來進行測試的相關檔案。我記錄一下相關的連結。
訂閱:
文章 (Atom)
