Tclers (@TclLang) profile picture
Joined July 2017
Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)Photo by Tclers (@TclLang)
Fun with lists, part 2 ('stu' again from the Chat): proc openfile {fn} {set c {}; set res [catch {readFile $fn} c]; return [list $c [expr {!$res}]]} You get back your status and either the data or the error. So you got all the info to decide what to do next.
1
68
Fun with lists, the Tcl way (from 'stu' on The Tcler's Chat): proc first_2_chars {s} {if {[string length $s] < 2} {return [list {} {} 0]} else {return [list [string index $s 0] [string index $s 1] 1]}} lassign [first_2_chars hello] a b
1
1
40
puts "The first two chars are '$a' and '$b'." #=> The first two chars are 'h' and 'e'.
15
Did you know that pikchr, the drawing language used for the SQLite syntax diagrams, can easily be compiled as a Tcl extension, adding a `pikchr` command to Tcl? Look here: 🔗 pikchr.org/home/doc/trunk/do…
2
63
tkribbon 0.3.1 – a set of C extensions for Tk on Windows and Linux: - Office-style ribbon - docking panes, custom-drawn widgets - Scintilla code editor - graphs based on BLT - HTML/CSS viewer based on litehtml
5
85
tclpdf version 1.8 was released. The release message is AI-generated and too verbose and confusing to shortly report. See yourself what has changed if you are interested: 🔗 newsgrouper.org/%3c11e711u$3…
1
1
119
New feature in #Tcl 9.1 – part 9: Case-insensitive filesystem paths on macOS What is there to say here? Paths are typically case-insensitive on macOS, so it is good that Tcl now also treats them as such!
1
36
The fossil frontend Tktaalik is not at version 0.0.5 New: - fossil push and sync - preview of pages as fossil would render them - use external programs to handle files - fossil xdiff and more 🔗 github.com/serhiy-storchaka/…
1
98
Random page from the Tcler's Wiki ... if you ever need to calculate the area of a polygon: 🔗 wiki.tcl-lang.org/page/Polyg…
41
They once were paid apps, now free and in a updated version: Manpower 9.0 - man page viewer for macOS and Linux: 🔗 codebykevin.com/manpower.htm… TextSweep 7.0 - text search-and-replace tool for macOS, Windows and Linux: 🔗 codebykevin.com/textsweep.ht…
2
51
New feature in #Tcl 9.1 – part 8: New math commands: frexp, modf, remquo The are not math functions, but commands of their own. Why? They return a list of values, not a single value, so can't be used inside `expr`!
3
62
New feature in #Tcl 9.1 – part 7: Many C99 math routines are now available as expr functions: acosh, asinh, atanh, cbrt, exp2, expm1, log1p, log2, logb, erf, erfc, gamma, lgamma, copysign, dim, fma, ldexp, nextafter, remainder, signbit Quite some new fun ahead, no?
1
4
117
New feature in #Tcl 9.1 – part 6: New `switch` option: -integer The existing pattern matching was not always good for numeric values. Now there is an efficient way. Example: set x 0o37 switch -integer -- $x 37 {puts "false match"} 0x1f {puts "match"}
1
2
107
New feature in #Tcl 9.1 – part 5: `subst` options: -backslashes, -commands, -variables The `subst` command only had `-no...something` options to suppress a specific substitution. You can now do the opposite, enforce a specific one, e.g. `-commands`.
1
2
111
You can't mix YES and NO in one statement, of course. Try it and the CPU will get a burnout. Or not.
2
32
The "calc" package is there, version 1.0.20, building on a pure-Tcl package but now as a C extension so it is much faster. What the package is for? For stuff like this: : { a=3; b=4; c=5; x = a*b + c; y = x > 10 ? x : -x; y++} 🔗 github.com/rocketship88/coli…
1
103
New feature in #Tcl 9.1 – part 4: interp set - variable access in child interpreter You could always set a variable in a child interpreter with `$child eval set ...` but that would only work when the `set` command was not redefined in the child ...
1
1
78
... and you had to be careful with the word boundaries. That's what the new command is for: safely set a variable in an interpreter without needing to think about these limitations!
31
A lot of effort has gone into bug fixing Tcl/Tk the last weeks. So now, all builds are green which and Tcl/Tk 9.0.5 will probably soon get out the door.
8
207