2019-12-30

BAWT 1.1.0 supporting Tcl 8.6.10

Announce: BAWT 1.1.0 supporting Tcl 8.6.10


所以 BAWT 加入了 Tcl 8.6.10 的支援。

BAWT ( Build Automation With Tcl ) is a Tcl based configurable framework for automatically building C/C++ based software libraries from source code.

Its main usage is for the Windows operating system, where different build environments (ex. configure/make via MSYS/MinGW, nmake, CMake, Visual Studio Solutions) and compiler (MSYS/MinGW gcc, different Visual Studio versions) are needed to build these libraries.

2019-12-07

Tcllib 1.20

Tcl Library Source Code


可以看 README 檢查有改動了什麼。 下面是節錄文件上的說明:





8 new packages in 7 modules
47 changed packages in 30 modules
389 unchanged packages in 115 modules
446 packages, total in 131 modules, total

New in Tcllib 1.20

Module Package Version Comments
clay clay 0.8.6
fileutil fileutil::paths 1 Replaces: doctools::paths, (pt) paths.
lazyset lazyset 1




math math::quasirandom 1.0

math::trig 1.0




practcl practcl 0.16.3
struct struct::map 1 Replaces: doctools::config, (pt) configuration.
textutil textutil::patch 0.1

textutil::wcswidth 35.1

Deprecations in Tcllib 1.20

Four packages are stage 1 deprecated in favor of two replacements. All internal users of the deprecated packages have been rewritten to use their replacements.
Module Package Replacement Deprecation stage
doctools doctools::paths fileutil::paths (D1) Redirected to replacements
doctools doctools::config struct::map (D1) Redirected to replacements
pt paths fileutil::paths (D1) Redirected to replacements
pt configuration struct::map (D1) Redirected to replacements

Changes from Tcllib 1.19 to 1.20

Module Package From 1.19 To 1.20 Comments
blowfish blowfish 1.0.4 1.0.5 B, D, T
cache cache::async 0.3 0.3.1 B, D, T
dns dns 1.4 1.4.1 B, D, T





doctools doctools 1.4.21 1.5.6 B

doctools::idx 1.0.7 1.1 EF, D, T

doctools::toc 1.1.6 1.2 EF, B, D, T





doctools2idx doctools::idx::export 0.2 0.2.1 I, D, T

doctools::idx::import 0.2 0.2.1 I, D, T





doctools2toc doctools::toc::export 0.2 0.2.1 I, D, T

doctools::toc::import 0.2 0.2.1 I, D, T





dtplite dtplite 1.3 1.3.1 B, D
html html 1.4.4 1.4.5 EF, B, D, T
http autoproxy (1) 1.6 1.7 EF, B, D, T
httpd httpd 4.1.0 4.3.4 I, B, D, T





log log 1.3 1.4 EF, D, T

logger::utils 1.3 1.3.1 B, D, T





markdown Markdown 1.1 1.1.1 B, T





math math::calculus 0.8.2 0.8.2 D

math::interpolate 1.1.1 1.1.2 B

math::special (1) 0.3 0.4 EF, D, T

math::geometry 1.2.3 1.3.1 EF, D, T

math::numtheory 1.1 1.1.1 EF, D, T

math::statistics (1) 1.1.1 1.5 EF, D, T





mime mime 1.6 1.6.2 B, D, T

smtp 1.4.5 1.5 EF, D, T





namespacex namespacex 0.1 0.2 EF, I, B, D, T
ncgi ncgi 1.4.3 1.4.4 B, D, T
oauth oauth 1.0.1 1.0.3 B, D
png png 0.2 0.3 EF, D, T
practcl practcl (2) 0.11 0.16.3 EF, I, D
profiler profiler 0.3 0.5 B, D, T





pt pt::peg::export 1 1.0.1 I, D, T

pt::peg::import 1 1.0.1 I, D, T

pt::peg::op 1.0.1 1.1.0 B, I, D





sha1 sha1 2.0.3 2.0.4 B, D

sha256 1.0.3 1.0.4 B, D





simulation simulation::random 0.3.1 0.4.0 EF, D, T





struct struct::disjointset (2) 1.0 1.1 EF, I, D, T

struct::graph 2.4.1 2.4.3 B, D, T

struct::list 1.8.3 1.8.4 B, D, T

struct::matrix 2.0.3 2.0.4 B, D, T

struct::record 1.2.1 1.2.2 B, D ,T





textutil textutil 0.8 0.9 EF, D, T
uuid uuid 1.0.5 1.0.7 B, D, T





virtchannel_base tcl::chan::cat 1.0.2 1.0.3 B, D

tcl::chan::halfpipe 1 1.0.1 B, T





zip zipfile::mkzip 1.2 1.2.1 B, D





Notes
  1. Now requires Tcl 8.5+
  2. Now requires Tcl 8.6+

2019-11-28

Tcl: Two Fer

Create a sentence of the form "One for X, one for me.".

#!/usr/bin/env tclsh

if {$argc >= 1} {
    set name [lindex $argv 0]
} elseif {$argc == 0} {
    set name "you"
}

puts "One for $name, one for me."

2019-11-22

Tcl/Tk 8.6.10 RELEASED

Tcl/Tk 8.6.10 RELEASED


Tcl/Tk 8.6.x 發行了一個新版,下面就是這個版本的變動:

Summary of Changes since Tcl/Tk 8.6.9:
--------------------------------------

This is a patch release, so it primarily includes bug fixes and corrections
to erratic behavior.  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.

        http://core.tcl-lang.org/tcl/
        http://core.tcl-lang.org/tk/

    * Tk improvements on Mac OSX (including Catalina) / Aqua
       - [tk::unsupported::MacWindowStyle isdark] for Dark Mode,
         Dark Mode drawing procedures for many ttk widgets were added
       - internationalized text entry with IME
       - implementation of non-global [grab]
       - [TIP 536] more commands for IPC, matching [tk::mac::*]
       - support for Tabbed Windows
       - color names consistent with NSColor, Tk & Ttk default bg color agreement,
         semantic and simulated semantic colors, enables Dark Mode
         *** POTENTIAL INCOMPATIBILITY ***
       - revised combobox to use native ttk scrollbar
         *** POTENTIAL INCOMPATIBILITY ***
       - [tk_getOpenFile] causes off-screen toplevels
       - make full-screen and split screen windows work correctly
       - notebook pane redraws
       - better handling of resolution changes
       - performance gains by more nearly limiting redraws to areas of damage

    * OSX: Stop default seeking packages under /System; those are now
deprecated
         *** POTENTIAL INCOMPATIBILITY ***

    * [TIP 532] Tk event loop rewrite prevents event ring overflow
         *** POTENTIAL INCOMPATIBILITY ***

    * Tk improvements on Windows
       - horizontal scrolling support
       - support for buttons 4 and 5
       - embedded widget destruction cancels window resize
       - position of toplevel windows with highlightthickness > 0
       - new keycodes Mail, AudioMedia, Launch0, Launch1

    * [TIP 527] New command [tcl::unsupported::timerate] for performance
testing.

    * New command [tcl::unsupported::corotype]
    * Partial support for emoji in Tk text displays (see Tk demo).
    * Refactored all MouseWheel bindings
         *** POTENTIAL INCOMPATIBILITY ***

    * [TIP 535] Revised precision of ::scale widget tick mark values
         *** POTENTIAL INCOMPATIBILITY ***

    * [TIP 541] [combobox current] supports "end" index
    * [TIP 533] New index argument in [$menubutton post x y index]
    * Fix crashes or hangs in...
       - [file normalize ~/~foo]
       - [ttk::style element create]
       - multi-argument write-traced [lappend]
       - Tcl_Exit() call before completed initialization
       - bytcode compiling deeply nested scripts (C stack overflow)
       - test text-11a.22
       - activating "Alt" theme
       - call to [NSMenu size]
       - drawing 1x1 rounded rectangles
       - deactivating menu during menu deletion
       - transient window cycles (now disallowed)
       - [event generate]d
       - [next] after destroy
       - [wm iconphoto] on empty image

    * Fix memory leak when namespace deletion kills linked var
    * Repair regressions in...
       - [list [list {*}[set a " "]]]
       - [package require] memory validity
       - [info level 0] paired with ensembles
       - use of non-ASCII characters in proc parameters
       - [treeview tag configure]
       - [wm manage] on Aqua

    * Incomplete read of multi-image GIF
    * Prevent cross-manager loops of geom management
    * Stop app switching exposing withdrawn windows as zombies
    * Cross-platform rework of label options -highlight*
    * <> trigger on item delete
    * Repeated up arrow key in [text] takes cursor to index 1.0
    * Unicode 12.0 (including Japanese Reiwa era)
    * tzdata updated to Olson's tzdata2019c
    * libtommath updated to release 1.2.0
    * Updated bundled packages
       - Itcl 4.2.0 - memory performance, [$o info variable -scope]
       - sqlite3 3.30.1
       - Thread 2.8.5
       - TDBC* 1.1.1
       - http 2.9.1
       - tcltest 2.5.1
       - registry 1.3.4 - no -DUNICODE required
       - dde 1.4.2 - no -DUNICODE required

2019-11-17

Tcl: Group the strings to concatenate together

set s "Hello "
set t "Tcl"
set u "!"
puts $s$t$u

也可以先設到某個變數,再印出來:
set s "Hello "
set t "Tcl"
set u "!"
set str $s$t$u

puts $str


感覺還蠻有趣的。

2019-11-13

Twitter feed for news and Tcl

@TclLang - Twitter feed for news about happenings in the Tcl world.


我之前沒注意到,這是 Tclers's wiki 的官方帳號嗎?不是很確定。

2019-10-29

tablelist 6.7

ANNOUNCE: Multi-column listbox and tree widget package Tablelist 6.7


Tablelist 釋出了一個新版 6.7,所以我也更新了自己的 RPM spec 測試。

2019-09-19

RabbitMQ/MQTT

RabbitMQ 是實現進階訊息佇列協議 AMQP (Advanced Message Queuing Protocol) 的中間件軟體, 支援的協議版本為 0.9.1,也有 plugin 可以支援 1.0。

官網上有提供安裝檔案可以使用,如果在 openSUSE 15.1,可以使用下列的指令安裝:
sudo zypper in rabbitmq-server rabbitmq-server-plugins

如果要啟動服務,可以使用下列的指令:
sudo service rabbitmq-server start

如果要重啟服務,可以使用下列的指令:
sudo service rabbitmq-server restart

如果知道服務的狀態,可以使用下列的指令:
sudo service rabbitmq-server status

如果要停止服務,可以使用下列的指令:
sudo service rabbitmq-server stop


RabbitMQ 有支援 MQTT 3.1 的 plugin。下面是啟用的方式(啟用後需要重開 server 才會生效):
sudo rabbitmq-plugins enable rabbitmq_mqtt

設定檔案在 /etc/rabbitmq/rabbitmq.conf,因為只是要測試,所以我把 port 改為 1883,啟用預設的 username/password, 並且關閉允許匿名連線:
## ----------------------------------------------------------------------------
## RabbitMQ MQTT Adapter
##
## See https://github.com/rabbitmq/rabbitmq-mqtt/blob/stable/README.md
## for details
## ----------------------------------------------------------------------------

# =======================================
# MQTT section
# =======================================

## TCP listener settings.
##
mqtt.listeners.tcp.1 = 127.0.0.1:1883
mqtt.listeners.tcp.2 = ::1:1883

## TCP listener options (as per the broker configuration).
##
# mqtt.tcp_listen_options.backlog = 4096
# mqtt.tcp_listen_options.recbuf  = 131072
# mqtt.tcp_listen_options.sndbuf  = 131072
#
# mqtt.tcp_listen_options.keepalive = true
# mqtt.tcp_listen_options.nodelay   = true
#
# mqtt.tcp_listen_options.exit_on_close = true
# mqtt.tcp_listen_options.send_timeout  = 120

## TLS listener settings
## ## See https://rabbitmq.com/mqtt.html and https://rabbitmq.com/ssl.html for details.
#
# mqtt.listeners.ssl.default = 8883
#
# ssl_options.cacertfile = /path/to/tls/ca_certificate_bundle.pem
# ssl_options.certfile   = /path/to/tls/server_certificate.pem
# ssl_options.keyfile    = /path/to/tls/server_key.pem
# ssl_options.verify     = verify_peer
# ssl_options.fail_if_no_peer_cert  = true
#


## Number of Erlang processes that will accept connections for the TCP
## and TLS listeners.
##
# mqtt.num_acceptors.tcp = 10
# mqtt.num_acceptors.ssl = 10

## Whether or not to enable proxy protocol support.
## Once enabled, clients cannot directly connect to the broker
## anymore. They must connect through a load balancer that sends the
## proxy protocol header to the broker at connection time.
## This setting applies only to STOMP clients, other protocols
## like STOMP or AMQP have their own setting to enable proxy protocol.
## See the plugins or broker documentation for more information.
##
# mqtt.proxy_protocol = false

## Set the default user name and password used for anonymous connections (when client
## provides no credentials). Anonymous connections are highly discouraged!
##
mqtt.default_user = guest
mqtt.default_pass = guest

## Enable anonymous connections. If this is set to false, clients MUST provide
## credentials in order to connect. See also the mqtt.default_user/mqtt.default_pass
## keys. Anonymous connections are highly discouraged!
##
mqtt.allow_anonymous = false

## If you have multiple vhosts, specify the one to which the
## adapter connects.
##
mqtt.vhost = /

## Specify the exchange to which messages from MQTT clients are published.
##
mqtt.exchange = amq.topic

## Specify TTL (time to live) to control the lifetime of non-clean sessions.
##
mqtt.subscription_ttl = 1800000

## Set the prefetch count (governing the maximum number of unacknowledged
## messages that will be delivered).
##
mqtt.prefetch = 10

下面是使用 tcl.mqttc 測試 Subscribe 與 Publish 功能的測試程式:
package require Thread
package require mqttc
catch {console show}

set ::gThread [thread::create {thread::wait} ]
set result 0

proc subscribe { } {
    thread::send -async $::gThread {
        package require mqttc

        mqttc client "tcp://localhost:1883" "USERTest1" 1 -cleansession 1 \
                     -username guest -password guest
        client subscribe  "MQTT Examples" 1
        while 1 {
            if {[catch {set result [client  receive]}]} {
                puts "Receive error!!!"
                break
            }
            if {[llength $result] > 0} {
                puts "[lindex $result 0] - [lindex $result 1]"
                if {![string compare -nocase [lindex $result 1] "Exit"]} {
                    break
                }
            }
        }
        client unsubscribe  "MQTT Examples"
        client close
    } ::result
}

subscribe
puts "started test..."

after 250

mqttc client "tcp://localhost:1883" "USERTest2" 1 -timeout 1000 \
             -username guest -password guest
client publishMessage "MQTT Examples" "Hello MQTT!" 1 0
client publishMessage "MQTT Examples" "Exit" 1 0
client close

vwait ::result

2019-09-10

tcl.mqttc v0.6

因為 paho.mqtt.c 有一個新的版本 1.3.1,所以我做了 tcl.mqttc 相關的更新,同時將版本設成 v0.6。

不過我只有測試 tcp 部份,使用 ActiveMQ 測試 MQTT 3.1,以及使用 EMQX 測試 MQTT 3.1 以及 5 的部份。

我忘記是不是有在這個部落格貼過了,下面是 MQTT 3.1 測試 Subscribe 與 Publish 功能的測試程式:
package require Thread
package require mqttc
catch {console show}

set ::gThread [thread::create {thread::wait} ]
set result 0

proc subscribe { } {
    thread::send -async $::gThread {
        package require mqttc

        mqttc client "tcp://localhost:1883" "USERTest1" 1 -cleansession 1
        client subscribe  "MQTT Examples" 1
        while 1 {
            if {[catch {set result [client  receive]}]} {
                puts "Receive error!!!"
                break
            }
            if {[llength $result] > 0} {
                puts "[lindex $result 0] - [lindex $result 1]"
                if {![string compare -nocase [lindex $result 1] "Exit"]} {
                    break
                }
            }
        }
        client unsubscribe  "MQTT Examples"
        client close
    } ::result
}

subscribe
puts "started test..."

after 250

mqttc client "tcp://localhost:1883" "USERTest2" 1 -timeout 1000
client publishMessage "MQTT Examples" "Hello MQTT!" 1 0
client publishMessage "MQTT Examples" "Exit" 1 0
client close

vwait ::result

2019-08-19

casstcl 2.13.2

我發現有新的版本,所以更新了我自己的 openSUSE RPM spec

casstcl  需要 cassandra cpp driver,我也有寫一個 openSUSE RPM spec,在安裝 casstcl 前需要先安裝 cassandra cpp driver。

2019-08-05

MAWT (Movie Automation With Tcl) 0.2.0

MAWT - Movie Automation With Tcl 已經在 2019/06/20 釋出了 0.2.0。

0.2.0 更新的資訊:
Improved video generation functionality.


所以我也更新了我自己的 openSUSE 套件

2019-06-08

Tclsh and Here document

Here document

之前我只有在 bash 使用過,今天突然間想試看看 tclsh。我發現…… 對,可以使用同樣的手法。下面就是一個測試的例子:
tclsh - << "EOF"
puts "HELLO World"
EOF

再來是另外一個簡單的測試:
tclsh - << "EOF"
puts [expr 99 + 1]
EOF

這樣就可以在命令列執行簡單的 tclsh 命令。

2019-06-02

Functional Programming

Functional Programming (Tcler's Wiki)


Tcl 是個很奇妙的語言,就如同下面說的:

As with many things, Tcl is rather unique in this area. Commands themselves can not be passed as arguments to other commands, but their names can, which provides something very similar to first-class functions. Additionally, apply can be used to interpret a value as a function and evaluate it, providing the equivalent of lambda functions.


Tcl 的表達方式與波蘭表示法 (Polish notation) 一樣,和 Lisp 的 S-expression 的精神十分相像,特點是操作符置於操作數的前面(就是如果是一連串資料所組合成的述句,Tcl 述句的第一個是一個 command,後面是 command 要處理的資料)。

Tcl 也跟 Lisp 一樣,並不是純粹的 Functional Language,而是支援多重典範的語言。

2019-05-24

Tcl: 奇數和偶數

#!/usr/bin/env tclsh

puts -nonewline "Please input a number: "
flush stdout
gets stdin var
 
if { [ regexp {^[0-9]+$} $var ] == 0} {
    puts "It is not a number!!!"
    exit
}

if { [expr $var % 2] == 0} {
    puts "It is even!!!"
} else {
    puts "It is odd!!!"
}

也是一個很簡單的練習,只是使用正規表示式判斷是否為數字。

2019-05-21

Tcl:九九乘法表

這只是一個簡單的 Tcl 練習。

所以第一個是 for loop 的版本。
#!/usr/bin/env tclsh

for {set nx 0} {$nx < 10} {incr nx} {
    for {set ny 0} {$ny < 10} {incr ny} {
        puts "[format "%d x %d = %2d" $nx $ny [expr $nx  * $ny]]"
    }
} 

第二個版本是我在寫同樣的東西(也是九九乘法表),因為 Erlang 沒有 for 和 while 迴圈,所以我先建立一個 list,然後再使用 Erlang 提供的 lists:foreach 印出結果。我用同樣的精神寫 Tcl 九九乘法表的第二個版本(同時測試 mathop)。
#!/usr/bin/env tclsh

set x [list 1 2 3 4 5 6 7 8 9]
set y [list 1 2 3 4 5 6 7 8 9]

foreach nx $x {
    foreach ny $y {
        set z [::tcl::mathop::* $nx $ny]
        puts "[format "%d x %d = %2d" $nx $ny $z]"
    }
}

最後是遞迴的版本:
#!/usr/bin/env tclsh

namespace path {::tcl::mathop ::tcl::mathfunc}

proc mul {x y} {
    puts [format "%d x %d = %2d" $x $y [* $x $y]]
    if {$y < 9} {
        mul $x [+ $y 1]
    } else {
        if {$x < 9} {
            mul [+ $x 1] 1
        } else {
            return
        }
    }
}

mul 1 1

2019-05-13

Next Scripting Framework 2.3.0

ANNOUNCE: Next Scripting Framework 2.3.0 is available


NSF 釋出了 2.3.0,所以我更新了我自己的 openSUSE RPM spec, 這可以比較方便進行測試。我在下載的時候 SourceForge 似乎出現問題,所以無法順利下載,我把下載檔案的地址切到 NSF 在 Github 的 mirror

2019-05-09

Update tklib spec

tklib-spec


因為 tablelist 釋出了新版 v6.5,為了反應 tklib 最近的變化,所以更新了我自己的 openSUSE RPM spec,更新到目前的 code base。

2019-04-16

使用 QEMU 執行 openSUSE/AARCH64 image

因為 tclBlend 我接到一個 issue,在 AARCH64 下編譯失敗,所以需要一個 AARCH64 模擬器來除錯。


首先要安裝 QEMU-ARM:
sudo zypper install qemu-arm

要下載一個 openSUSE AARCH64 image 來進行測試(我使用 unxz 解壓縮)。
wget https://download.opensuse.org/ports/aarch64/factory/images/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-Current.raw.xz
unxz openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-Current.raw.xz

如果使用 efi image,需要有 Unified EFI BIOS 模擬器正確的載入 boot loader 才行(不然無法正確執行)。我從 Linaro 下載一個來使用。
wget https://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.img.gz
gzip -d QEMU_EFI.img.gz 

然後就可以這樣執行:
qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios QEMU_EFI.img -serial stdio -device virtio-net-device,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37 -netdev user,id=hostnet0  -drive if=none,format=raw,file=openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-Current.raw,id=hd0  -device virtio-blk-device,drive=hd0

(使用者帳號為 root,密碼為 linux)

參考文章:
openSUSE:AArch64
Documentation/Platforms/ARM
Linux on AArch64 ARM 64-bit Architecture
Building ARM Servers With UEFI And ACPI


就 ARM 來說,有二種描述 hardware scheme 的方式,一種是 UEFI/ACPI,一種是 Device Tree。Linux kernel 可以編譯為二種都支援。文件中有提到:

ACPI support in drivers and subsystems for ARMv8 should never be mutually exclusive with DT support at compile time.

At boot time the kernel will only use one description method depending on parameters passed from the boot loader (including kernel bootargs).

Regardless of whether DT or ACPI is used, the kernel must always be capableof booting with either scheme (in kernels with both schemes enabled at compile time).

2019-04-10

Difference between 2 dates in XQuery

package require xqilla

xqilla db
set exprs [db prepare {days-from-duration(xs:dateTime('2019-06-14T00:00:00') - current-dateTime())}]
set result [$exprs execute]
set diff 0

while {[$result next]} {
    set diff [$result string_value]
}

puts "The answer is $diff."

$result close
$exprs close
db close

使用 XQuery 的日期函式計算出二個日期間的差距,這裡使用 XQilla 測試。

Difference between 2 dates in SQLite3

package require tdbc::sqlite3

tdbc::sqlite3::connection create db :memory:
set statement [db prepare {SELECT CAST ((JulianDay('2019-06-14') - JulianDay('now')) as Integer) as d}]    

set diff 0
$statement foreach row {
    if {[catch {set diff [dict get $row d]}]} {
        set diff 0
    }
}

puts "The answer is $diff."

$statement close
db close

使用 SQLite3 的日期函式計算出二個日期間的差距,這裡使用 tdbc::sqlite3 測試。

2019-03-19

Magicsplat Tcl/Tk 8.6.9-1.9.1 for Windows

ANNOUNCE: Magicsplat Tcl/Tk 8.6.9-1.9.1 for Windows


The following new packages have been added in this release:
- Next Scripting Framework nsf (2.2.0) with nx and XOTcl
- Ffidl 0.7
- Critcl 3.17
- Tix widget library 8.4.3


所以 Magicsplat Tcl/Tk 釋出一個新版。

2019-03-04

tkimg 1.4.9

tkImg


tkImg 釋出了一個新的版本,1.4.9。


下面是節錄的說明:

This file contains a collection of format handlers for the Tk photo image type, and a new image type, pixmaps. It can be used in combination with Tcl/Tk 8.3 or later but 8.6 or newer are highly recommended.

Included in this distribution are the most recent versions (as of March 2019) of the libz, libpng, libjpeg, and libtiff libraries. These are not required, unless you need support for the PNG, JPEG, or TIFF format. Note that you have to build these libraries to support the named formats, even if your system already has shared libraries for these formats. This is because the libraries here are built such that they can be loaded as packages by the Tcl/Tk core, making the handling of the various dependencies much easier. An earlier version, 1.2.4, used a modified copy of Tcl's functions for loading of shared libraries to load the support libraries at runtime. These have been abandoned in favor of the new approach.

2019-02-25

NaviServer 4.99.18

NaviServer 4.99.18 檔案已經被放上去 SourceForge,所以可以下載了。


這次的更新內容可以看這裡

New Features:
-------------

 - Added ability to provide memory sizes via memory units (kB, MB, GB,
   KiB, MiB, GiB) in the configuration files and commands. We follow
   the approach taken by e.g. PostgreSQL and use 1024 as
   multiplicator, which is e.g. useful for buffer sizes. All memory
   sizes in the config files can be specified in memory
   units. Currently, the only commands supporting memory units are
   ns_cache_create, ns_cache_configure and ns_http. The configuration
   based on integers without memory units continues to work.


 - Portable config files (windows compatibility)

   Rationale: unixoid platforms use traditionally ".so" as extension
   of binary modules, no matter what "info sharedlibextension" is. On
   macOS, the sharedlibextension returns ".dylib", while the module is
   named ".so". Under windows, it seems that the extension of the module
   has to be ".dll", so we can't write portable config
   files without extra effort.

   The new code tries now first to load the library as specified for
   backward compatibility (maybe containing a file extension). When
   this fails, it tries to append either ".so" in unixoid platforms or
   ".dll" under windows.

 
 - new API call: ns_db currenthandles

   Return information about handles currently allocated to the thread
   performing this call. The result contains a dict with the pools,
   from which handles were allocated, the names of the handles and
   their "active" state (a handle is active between a "ns_db select"
   and the last "ns_db getrow" statement). If no handles are allocated
   by this thread, empty is returned.

   For example, a possible result is "main {nsdb0 1} subquery {nsdb1
   0}" indicating that the current thread has allocated handles from
   pool "main" and "subquery", but the handle from pool "main" (i.e.
   "nsdb0") is currently active (during a select).

   This feature requires Tcl 8.5 or newer.


 - More security features: SameSite support for cookies

   The command ns_setcookie supports now the flag "-samesite" with
   permissible values "strict|lax|none". When the flag is set it
   prevents the browser from sending this cookie along with cross-site
   requests to mitigate cross site scripting attacks. Permissible
   values are [term strict], [term lax], or [term none]
   (default). While the value [term strict] prevents sending the
   cookie to the target site in all cross-site browsing context, the
   value of [term lax] allows sending the cookie when the user clicks
   on regular links. For details, see
   https://www.owasp.org/index.php/SameSite

   The "SameSite" cookie flag is not yet part of an RFC, but most major
   browsers support it. Browsers that do not support it, ignore the flag
   silently (see https://caniuse.com/#search=samesite).

   Although most cookies should probably use the flags, in order to
   provide backward compatibility, the flag can't be activated by
   default on all cookies.


 - Better entries in server log for scheduled procedures.

   With this change, one can determine exactly, which scheduled thread
   was executing an instance of which scheduled procedure. Similarly
   as for connection threads, one can now distinguish, whether two
   log-entries are from the same instance of a scheduled proc or from
   different ones.

 - nsdb stats: Return as well number of currently connected DB connections.


目前還沒有編譯和測試,晚上我會試著升級我目前使用的版本。

2019-02-14

Update tcl-cmark

tcl-cmark


tcl-cmark 最近更新,修正了 cmark-gfm 最近幾個版本的不相容修改結果 tcl-cmark 會編譯失敗的問題。我自己的 RPM spec 也跟著更新,移掉我自己之前的修正,使用 tcl-cmark 更新的部份就可以了。

2019-02-11

Update tclreadline

tclreadline


tclreadline 釋出了一個新的版本,所以我也更新了我自己的 RPM spec

2019-01-23

otpcl

otpcl - Open Telecom Platform Command Language a.k.a. Tcl-Flavored Erlang


這是一個很有趣的案子,在 Erlang VM 寫一個類似 Tcl 的語言,但是目前只是在極早期開發的階段,看起來是有一些東西可以用但是離真的能實際使用仍然有一大段的距離。

Erlang 最近幾年似乎聲勢有掉下來的情況(我是指本來就有點小眾的情況變成真的小眾,然而 WhatsApp 又再次證明 Erlang 在網路程式上真的有其優越之處),但是分散式系統或者是 concurrent solution (也就是 Actor model) 方面仍然是眾多解決方案「致敬」的對象。

2019-01-10

Apache Rivet 3.1.1 released

下面是 Apache Rivet 3.1.1 主要的更新

  • Rivet 3.1.1 attempts to solve various problems with the CMake scripts needed to build mod_rivet on Windows
  • Several broken links in the manual were fixed

主要修正了在 Windows 平台使用 CMake 編譯的問題。

2019-01-04

Magicsplat Tcl/Tk for Windows 1.9.0

Magicsplat Tcl/Tk for Windows


Updated packages: Tcl 8.6.9, Tk 8.6.9, TDBC 1.1, sqlite 3.26.0, thread 2.8.4, Itcl 4.1.2, tclcsv 2.3, twapi 4.3.5, promise 1.1, BWidget 1.9.13, tklib 2019-01-01, CAWT 2.4.3, TclCurl 7.63.0, DiffUtil 0.4.1, TclWS 2.6.2.

所以 Magicsplat Tcl/Tk for Windows 也更新到 Tcl/Tk 8.6.9。

2019-01-02

BAWT 0.9.0

BAWT 釋出了 0.9.0,將 Tcl/Tk 的版本更新到 8.6.9,同時也更新了一些 Tcl 套件(例如 tDOM, tcl3d)。可以看 Release History 更新的部份。

所以我也安裝這個版本進行測試。

PS. BAWT 也提供了 Visual C++ 連結的部份,但是根據在 0.8.0 測試的結果,一樣可能會遇到不同的 Visual C++ 版本的相容性問題("fatal error C1047" issue),不過如果是同版本應該就可以正確連結。

2019-01-01

promise 1.1.0

ANNOUNCE: promise 1.1.0 released
tcl-promise-spec


Promises are concurrency primitives that let you write asynchronous code in a sequential style. This Tcl based implementation is mostly modeled on the Javascript/ECMAScript 7 standard. 

因為作者釋出新版,所以我也更新了我自己的 openSUSE RPM spec.