HNHacker News
TopNewBestAskShowJobs

cmacleod4

383 karma · joined September 8, 2015

Retired programmer, blog at https://colin-macleod.blogspot.com
submissionscomments
cmacleod4··on Tcl the Misunderstood (2006)
This is something to be aware of. It can be guarded against, see https://www.tcl-lang.org/man/tcl/TkCmd/send.htm#M9 .
cmacleod4··on Tcl the Misunderstood (2006)
I recommend https://wiki.tcl-lang.org/page/LUCK as a very easy way to build self-contained executables which bundle Tcl, a large choice of extensions, and your own code.

There is a tutorial on the Tcl wiki which should be reasonably up-to-date - https://wiki.tcl-lang.org/page/Tcl+Tutorial+Lesson+0 .

cmacleod4··on Tcl the Misunderstood (2006)
jimtcl was originally created by the same Antirez who wrote the linked article.
cmacleod4··on Tcl the Misunderstood (2006)
No more so than any other dynamic language. Of course if you execute untrusted input you are asking for trouble. But Tcl has very well-defined rules for how and when substitutions and evaluations will be performed - https://www.tcl-lang.org/man/tcl/TclCmd/Tcl.htm#M4 - so the programmer has full control.
cmacleod4··on Tcl the Misunderstood (2006)
TIP 401 proposed a fix for this but has not progressed so far - https://core.tcl-lang.org/tips/doc/trunk/tip/401.md .
cmacleod4··on Why I Like Tcl
Leading-zero-means-octal-number is one of the things which got fixed in Tcl 9.0, see https://www.tcl-lang.org/software/tcltk/9.0.html#tclchanges - the subsection headed "Numbers".
cmacleod4··on Why I Like Tcl
Modern Tcl already has a lot more stuff in it than the early resource-constrained versions, though the basic principles are the same. Still, there's no harm in reinventing a better wheel :-)
cmacleod4··on Please Don't Make Me Download Another App
Cut the App Crap! If it can't be done on the web it's probably not worth doing.
cmacleod4··on Is Tcl/Tk Dying Out?!
Only two or three of the people mentioned here are still active in the Tcl community, but others have come along and we still find plenty to argue about :-)
cmacleod4··on Tcl 9.0
I'm not familiar with JWT at all, but I found a description of how to generate an ES256 JWT from the command line: https://techdocs.akamai.com/iot-token-access-control/docs/ge... .

I don't know if this would meet your needs, but from Tcl you could use `exec` to run these commands and read the result.

cmacleod4··on Tcl 9.0
Take a look at http://www.ch-werner.de/LUCK.html . This site builds custom single-file Tcl executables for various architectures. It has a large selection of packages and you can choose which ones get included in the build. E.g if you select tclhttpd to be included in the build and name the output file tcluck, you can then start the web server by running: ./tcluck tcluck/tclhttpd3.5/bin/httpd.tcl

This is still using Tcl8.6 though, it will take time for all these packages to be updated to work with Tcl9.0. I am actually running tclhttpd with Tcl9.0 myself, after making a handful of tweaks for compatibility.

cmacleod4··on Tcl 9.0
This reminds me of something I wrote in Tcl at my previous employer - a little utility that could decode an in-house data format and display it in an understandable way. Quite a few other people found it useful for debugging issues.
cmacleod4··on Tcl 9.0
The original design decision was to behave like a shell, where ~ means your own home dir and ~fred means fred's home dir. With the benefit of experience, this is now seen to be unwise and a different decision has been made.
cmacleod4··on Tcl 9.0
Sorry no, antirez (Salvatore Sanfilippo) was the original author, Steve Bennett took over maintenance later - https://jim.tcl.tk/index.html/doc/www/www/about/ .
cmacleod4··on Tcl 9.0
Some people like Tcl and use it, some people don't. The Tcl Wiki sees a regular stream of updates - https://wiki.tcl-lang.org/recent . Personally I'm working on a Usenet/Web gateway which does web serving, NNTP, caching in Redis, user db in sqlite, all implemented in Tcl - https://cmacleod.me.uk/ng .
cmacleod4··on Tcl 9.0
Hey, you missed out coroutines :-)
cmacleod4··on Tcl 9.0
There is a redesign of the website in progress. In the meantime, take a look at https://wiki.tcl-lang.org/page/Showcase .
cmacleod4··on Tcl 9.0
It's unfortunate that people who dont "get" Tcl feel forced to use it because they are in EDA.

I used to have the opposite problem. My employer would not allow me to write anything mission-critical in Tcl because they thought other people would not be able to maintain it. But now that I'm retired I can write as much Tcl as I like, which is quite a lot :-)

cmacleod4··on Tcl 9.0
No, ~abc will be interpreted as the home directory of user abc in Tcl 8.*
cmacleod4··on Tcl 9.0
In the long run, special cases like that often turn out to be more trouble than they are worth. If an ordinary file happened to start with '~' it would not be handled correctly. So you either accept or ignore that potential problem, or you have to write extra code to work around it. It's safer to not have such special cases at all.
cmacleod4··on Tcl 9.0
The first major release in 27 years. 64-bit internal structures, so data can be huge. Full unicode with all the funky new emojis. Zip filesystems, etc., etc.

There's lots of new stuff, and some old cruft has been dumped, so some programs may need a few updates, but there's still a high level of compatibility. The page above links to release notes with details of what's in and what's out.

cmacleod4··on GraphicsMagick – a Swiss army knife of image processing
A while back I had some fun creating animated GIFs using GraphicsMagick via the Tcl binding - http://www.graphicsmagick.org/TclMagick/doc/ .

Here's an example that was topical back then: https://cmacleod.me.uk/tcl/magick/boris.gif .

cmacleod4··on Cloudflare has made it too easy to access your homelab on the internet
How the **** do you decline cookies on this site??!!!
cmacleod4··on Tcl/Tk logo – rebrand for 9.0 or stay consistent?
Tcl/Tk 9.0 is approaching release, so I think this could be a good opportunity to update the logo. My feeling is that the existing feather logo is obscure, and also too easily confused with the Apache project logo. However some people are very attached to it. So I'm trying to gather feedback on whether a rebrand would be helpful, or whether continuity is more valuable. If you have an opinion, please either vote in the poll I have created, linked above, or just leave feedback here.
cmacleod4··on Ask HN: Thoughts on Tcl as a Language in 2024?
Indeed, one point that's often missed about Tcl is that the ability to treat code as data makes it easy to use metaprogramming techniques that are awkward or impossible in most other languages.
cmacleod4··on Ask HN: Thoughts on Tcl as a Language in 2024?
Comp.lang.tcl is still alive. If you don't want the hassle of setting up an nntp client, you can use the web interface I operate at https://cmacleod.me.uk/ng/comp.lang.tcl .

There is also a fair amount of activity on the Tcl Wiki: https://wiki.tcl-lang.org .

cmacleod4··on Ask HN: How popular is Tcl in 2024?
These days Tcl has a small but enthusiastic following. This year's European Tcl conference just happened, see https://openacs.org/conf2024/info/ . The 9.0 release of Tcl and Tk is coming soon - https://www.tcl-lang.org/software/tcltk/9.0.html .

A while back I wrote a blog post about why I think Tcl is special - https://colin-macleod.blogspot.com/2020/10/why-im-tcl-ish.ht... .

cmacleod4··on Nearly 50% of people are considering leaving their jobs in 2024
I very much doubt that 50% of people even have jobs!
cmacleod4··on The race to replace Redis
Redis is a very useful tool. You shouldn't blame the tool if people can't be bothered to use it properly!
cmacleod4··on Tcl/Tk 9.0
Who is the "we" you refer to here?
← PreviousPage 3 of 7Next →