tcljsonnet v0.2


將 Jsonnet code base 版本升到 v0.8.7 版。


Add https support to HBaseClient-Tcl



首先是產生 keystore:
keytool -genkey -alias hbase -keyalg RSA -keysize 1024 -keystore hbase.jks

再來是 conf/hbase-site.xml,加入下列的設定:



    <value>keystore password</value>

    <value>key password</value>

第一項就是開啟 ssl 的支援,第二項就是設定  hbase.jks 的位置,例如如果我是在 /home/danilo/Programs/hbase-1.1.3 中,那麼就要填 /home/danilo/Programs/hbase-1.1.3/hbase.jks。


如果設定成功,就可以使用 https 連線。

使用 https 來連線,所以我就需要改寫  HBaseClient-Tcl 來測試,基本上就是從上一篇 DrillREST  的實作來的:

        if {$ssl_enabled} {
            if {[catch {package require tls}]==0} {
                http::register https 443 [list ::tls::socket -ssl3 0 -ssl2 0 -tls1 1]
            } else {
                error "SSL_ENABLED needs package tls..."



Add https support to DrillREST

Configuring Web Console and REST API Security 中有提到,

Drill 1.2 uses code-level support for transport layer security (TLS) to secure the Web Console and REST API. By default, the Web Console and REST API support the HTTP protocol. You set the following start-up option to TRUE to enable HTTPS support:


By default this start-up option is set to FALSE.

Drill generates a self-signed certificate that works with SSL for HTTPS access to the Web Console.

如果使用瀏覽器去連 Web Console,是會有警告的。

我不太確定我是不是有完全做對,但是 Apache Drill 的 SSL_ENABLED 在設定打開以後,使用 tls 套件去連線是可以正確連線的。

    constructor {{SERVER http://localhost:8047} {SSL_ENABLED 0}} {
         set server $SERVER
        set ssl_enabled $SSL_ENABLED

        if {$ssl_enabled} {
            if {[catch {package require tls}]==0} {
                http::register https 443 [list ::tls::socket -ssl3 0 -ssl2 0 -tls1 1]
            } else {
                error "SSL_ENABLED needs package tls..."

重點是 package require tls 和下面一行的設定,就完成了。


DrillREST v0.1

DrillREST:Apache Drill REST Client Library for Tcl

Apache Drill 是一個查詢引擎(可以是分散式系統,或者是跑 embedded mode 單機執行),可以用來查詢有 storage plugin 的資料源(包含 Hadoo/HBase, MongoDB, csv 檔案,JSON 檔案和 Parquet 格式的檔案)。

這是一層 SQL layer,讓你用 SQL-2003 語法(Apache Drill 官網還特別強調自己是標準的 SQL,不是 SQL-like)查詢有支援的資料源。

目前還有一個小缺陷,就是沒有正式支援 Apache Cassandra,但是網路上已經有人可以 patch 以後使用 Apache Drill 查詢 Cassandra,所以我想如果真的有需要,會有人做出來的。

Apache Drill 友善的地方是有 JDBC/ODBC 介面,所以如果要使用 ODBC 來連,可以使用 Tcl 的 TDBC-ODBC 或者是使用其它的 ODBC extension,就可以使用 Apache Drill來查詢各式各樣的資料源(只要 Apache Drill 有支援)。

然後 DrillREST 就如同套件的名稱,使用 Apache Drill REST interface 進行查詢的工作。

如果以查詢資料然後進行分析來講,Apache Drill 是一個強力工具,但是不知道對比 Apache Spark 的戰力如何。


HBaseClient-Tcl v0.1

HBaseClient-Tcl: HBase REST Client Library for Tcl

要連接 HBase 目前有三個方式(我所知道的):
  • Java API
  • Thrift interface
  • REST interface
這個是閱讀相關的 REST interface 文件以後寫出來的套件,只是確定 Apache HBase REST interface 可以使用,並且我知道該怎麼寫的寫出來記錄而已。

一開始我本來打算用 Thrift + C++ + Tcl sample extension 實作一個 prototype,但是我很快就發現 Thrift 的難度比一開始想像的還要高,嗯…… 然後接下來我就發現 HBase 有提供 REST 介面,所以就實驗看看這個介面能不能使用,至於 Thrift 就跟他說再見吧。


Tclunqlite v0.2.7




This is the UnQLite extension for Tcl using the Tcl Extension Architecture (TEA).

UnQLite is a in-process software library which implements a self-contained, serverless, zero-configuration, transactional NoSQL (Key/Value store and Document-store) database engine. This extension provides an easy to use interface for accessing UnQLite database files from Tcl.

Maing Change

  1. Fix CURSOR getkey potential issue
  2. Add related test cases
  3. Add Tcl_GetIntFromObj() error check


這是一個小更新的版本,加入更多的 option 檢查。


tcl.snappy v0.1


Snappy is a compression/decompression library. It does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression.

This extension is a Tcl extension for snappy library.

我很快樂的寫完以後,才發現在很久很久以前就有人寫好了類似的套件(雖然我是用更霸道的方式,直接放 Snappy library 的 source code 一起編譯)。不過畢竟花了時間,所以還是放上去我的網站跟 Github 了。


eXist-db SOAP and Web Services for Tcl

使用 Web Services for Tcl 來連線 eXist-db 和斷線。eXist-db 有支援 REST 和 SOAP,這裡嘗試使用 eXist-db 提供的 SOAP介面

package require WS::Client
# package require dict

::WS::Client::GetAndParseWsdl "http://localhost:8080/exist/services/Query?WSDL"

# Connect to eXist-db
dict set args userId "guest"
dict set args password "guest"

set result [::WS::Client::DoCall QueryService connect $args]
set sessionId [dict get $result connectReturn]

# Disconnect
dict set args sessionId $sessionId
set result [::WS::Client::DoCall QueryService disconnect $args]

http://localhost:8080/exist/services/Query?WSDL 就是所有提供的 function。

PS. eXist-db 3.0 RC1 移除了 SOAP 的支援,不過 2.2 的還可以用。

Tcl/Tk 8.6.5 RELEASED

Tcl/Tk 8.6.5 RELEASED


Tcl/Tk 8.6.5 Release Announcement
February 29, 2016

The Tcl Core Team is pleased to announce the 8.6.5 releases of the Tcl dynamic language and the Tk toolkit. This is the fifth patch release of Tcl/Tk 8.6. More details can be found below. We would like to express our gratitude to all those who submit bug reports and patches. This information is invaluable in enabling us to identify and eliminate problems in the core.

Where to get the new releases:

Tcl/Tk 8.6.5 sources are freely available as open source from the Tcl Developer Xchange web site at:


This web page also contains additional information about the releases, including new features and notes about installing and compiling the releases. Sources are always available from the Tcl SourceForge project's file distribution area:


Binaries for most major platforms are available from:


For additional information:

Please visit the Tcl Developer Xchange web site:


This site contains a variety of information about Tcl/Tk in general, thecore Tcl and Tk distributions, Tcl development tools, and much more.

Summary of Changes since Tcl/Tk 8.6.4:

This is a patch release, so it primarily includes bug fixes and correctionsto erratic behavior. All relevant bug fixes (and some more) up to and including 8.5.19 changes are included in 8.6.5. Highlighted changes are noted below. The changes file at the root of the source tree contains a more complete list. The Timelines of all changes are online.


* [TIP 436] [info object isa] favors 'false' over error.
* [TIP 441] New option [listbox ... -justify].
* New Tk icons have clear free license.
* Stopped use of deprecated Cocoa API calls that trigger warnings in clang.
* Cocoa: Smoother window resizing; eliminated redraw/flicker on El Capitan.
* Cocoa: Elimination of zombie windows when windows are closed.
* Fixed crashes or hangs in...
- traced [expr].
- OO teardown.
- [$text delete].
- asynchronous socket connection on Windows.
- large-scale multi-threading with forks.
- overflows and memory errors in image handling.
* Repaired memory leaks in
- compiled [unset a($i)].
- zlib compresion errors.
- [file] operations on Windows.
- Cocoa event loop processing.
* Fix: [tailcall] combinations with [next] or ensembles.
* Fix: compiled [lreplace] handling of end.
* Fix: Ctrl-C/Ctrl-Break in Window console not treated as EOF.
* Fix: [tk_getOpenFile] -initialdir on Windows.
* Fix: streaming [zlib deflate] failure on empty input.
* Fix: non-empty [self] in destructor after failed constructor.
* Updated bundled packages
- msgcat 1.6.0: [TIP 412] dynamic and per-package locale.
- http 2.8.9: Default gzip transfer encoding; per-connection -accept
- registry 1.3.1: Unicode SendMessageTimeout().
- Itcl 4.0.4
- Thread 2.7.3
- sqlite 3.11.0
- TDBC* 1.0.4