Tcl/Tk 釋出了一個 9.0 的維護版本,9.0.2。
Tcl/Tk 9.0.2 的主要改變可以參考 tcl-release-notes-9.0.2.md, tk-release-notes-9.0.2.md。
關於各種 Tcl/Tk 的資訊,以及 Tcl/Tk 各種使用上的記錄分享
Tcl/Tk 釋出了一個 9.0 的維護版本,9.0.2。
Tcl/Tk 9.0.2 的主要改變可以參考 tcl-release-notes-9.0.2.md, tk-release-notes-9.0.2.md。
GCC15 C 編譯器如果沒有使用 -std 選項指定,編譯時使用的標準為 C23,bool 在 C23 成為關鍵字,所以自定義 bool 的做法在 GCC15 會編譯失敗。目前上遊還沒有確定解法,我只是選一個比較簡單的改法先讓程式能夠編譯成功,然後再看上遊會怎麼修改再進行修正。
#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L
typedef unsigned int bool;
#endif
也就是使用 __STDC_VERSION__ 進行判斷。
在更新 thiredis 之後,需要測試 thiredis 的關係,所以需要一個 Redis 協定相容的資料庫,openSUSE 目前採用的是 Valkey,所以筆記一下他的安裝部份。
Valkey is an open-source in-memory storage, used as a distributed, in-memory key–value database, cache and message broker, with optional durability.
在 openSUSE 安裝的指令:
sudo zypper in valkey
而下面是 README.SUSE 的簡要內容。需要使用 root 的權限進行設定。
cp -a /etc/valkey/default.conf.example /etc/valkey/instancename.conf
使用 -a 是因為要保留檔案的 permissions 設定,如果沒有使用,也可以使用下列的指令設定:
chown root:valkey /etc/valkey/sentinel-instancename.conf
chmod u=rw,g=rw,o= /etc/valkey/sentinel-instancename.conf
change at least pidfile, logfile and dir setting
pidfile /run/valkey/instancename.pid
logfile /var/log/valkey/instancename.log
dir /var/lib/valkey/instancename/
create the database dir:
install -d -o valkey -g valkey -m 0750 /var/lib/valkey/instancename/
systemctl enable valkey@instancename
(optional: 設定開機會啟動 valkey)
To stop/restart all instances at the same time use:
systemctl restart valkey.target
systemctl stop valkey.target
如果要查看目前的狀態,使用:
sudo systemctl status valkey@instancename
Tcl/Tk 釋出了一個 9.0 的維護版本,9.0.1。
Tcl/Tk 9.0.1 的主要改變可以參考 tcl-release-notes-9.0.1.md, tk-release-notes-9.0.1.md。
Tcl/Tk 釋出了 8.6 系列的新版本,8.6.16。
這個版本的主要更新內容可以參考 tcltk-release-notes-8.6.16.txt。
下面就是更新的簡述:
* Regression in [clock] timezones due to revised tzdata format
* Improper startup if [pwd] contains a file named init.tcl
* Fix crashes or hangs in...
- TclOO + coroutine, oo-1.25
- lifecycle management of the attributes of a menu entry
- [grid] and [pack] handling of half-dead argument
- Tk_DeleteErrorHandler()
- overwrite of thread data by Tk initialization in second interp
* Prevent negative zlib stream checksums, zlib-15.1
* Filesystem path efficiency from skipping unnecessary normalization
* Revised [clock scan] consistent with leap second timestamp validation
* Updated bundled packages, libraries, standards, data
- Itcl 4.3.2
- sqlite3 3.47.2
- Thread 2.8.11
- TDBC* 1.1.10
- tcltest 2.5.9
- tzdata 2024b, corrected
注意這個變化:
binary
to iso8859-1
在 Tcl 9 之前的寫法是 -encoding binary。但是在 Tcl 9 之後如果使用 -encoding binary,會出現一個警告,如果要與之前的語義相同,要將 binary 改為 iso8859-1。下面是一個使用的例子:
fconfigure $fd -blocking 1 -encoding iso8859-1 -translation binary
Tcl 9.0 的其中一個改變,就是移除了 --disable-threads 編譯選項,所以從 9.0.0 開始都會是 thread-enabled。不過也因為如此,如果你使用下列的方式檢查:
expr {[info exists ::tcl_platform(threaded)] && $::tcl_platform(threaded)}
在 Tcl 9 會得到答案為 0,因為 ::tcl_platform(threaded) 在 Tcl 9 中並不存在。
所以我改寫如下:
#
# Check support thread or not
#
proc is_threaded {} {
# Tcl 9 always thread-enabled
if {[package vcompare [info patchlevel] "9.0"] < 0} {
return [expr {[info exists ::tcl_platform(threaded)] && $::tcl_platform(threaded)}]
} else {
return 1
}
}
目前暫時先這樣,如果有更好的寫法我再更改寫法。
2024/11/16 更新寫法,嘗試使用 package vcompare 來比對版本號。
Tcl/Tk 釋出了一個新的主要版本,9.0.0。
Tcl/Tk 9.0 的主要改變可以參考官網的網頁,以及 tcl-release-notes-9.0.0.md, tk-release-notes-9.0.0.md。