HNHacker News
TopNewBestAskShowJobs

cmacleod4

383 karma · joined September 8, 2015

Retired programmer, blog at https://colin-macleod.blogspot.com
submissionscomments
cmacleod4··on Abstracts for 26th Annual Tcl/Tk Conference (Nov 5-8)
I notice a couple of the talks are repeats from the European meeting that I attended in June :-) http://www.eurotcl.eu/program.html
cmacleod4··on Wapp – A Web-Application Framework for Tcl
Richard Hipp presented this at the recent EuroTcl meeting - https://ssl.webpack.de/www.eurotcl.eu/program.html#Hipp
cmacleod4··on I can't believe I'm praising Tcl (2008)
Good article, but it has collected an incredible amount of spam in the comments over the years since it was written.
cmacleod4··on Espresso Machine Powered by Tcl/Tk
I think the issue is that what Tcl people think of as simplicity is for most people an uncomfortably-radical minimalism.
cmacleod4··on Has the Python GIL Been Slain? Subinterpreters in Python 3.8
Actually Tcl has been successfully using the model of one or more interpreters per thread since Tcl 8.1, released in 1999, a full TWO decades now.
cmacleod4··on Why I Am Switching to Secure ProtonMail
I looked at protonmail about 6 months ago but decided its free service was too limited (no imap/pop3 access) and the paid service was too expensive. I ended up going for https://mailbox.org/en/ which is not free but much cheaper, and seems to offer a reasonable level of security, privacy and functionality.
cmacleod4··on Live Tcl 2018 Conference
Thanks for posting this.
cmacleod4··on [dead]
Appears to be spam.
cmacleod4··on Experience with Tcl/Tk - Brian W. Kernighan
Interesting, but only as a piece of pretty ancient history :-)
cmacleod4··on Tcl Static Prime: Tcl compiler that outputs C or Java (2015)
Interesting but doesn't look like it's going anywhere. The TclQuadcode project looks more likely to actually deliver serious speedups for Tcl code - see http://wiki.tcl.tk/40985 and https://www.tcl.tk/community/tcl2015/assets/talk14/TheTclQua...
cmacleod4··on Why you should not use Tcl (1994)
It's not dead yet :-) - Tcl/Tk 8.6.7 was just released - https://sourceforge.net/projects/tcl/files/Tcl/8.6.7/tcltk-r...
cmacleod4··on Why you should not use Tcl (1994)
Well Tcl expects you to use an interpreter for each thread and pass messages between them, which is fairly easy. In Tcl 8.6 you also have the option to use multiple coroutines within one interpreter.

This avoids the Global Interpreter Lock problem that plagues Python. How does Guile handle that?

cmacleod4··on Why you should not use Tcl (1994)
Paul_S prefers a language which is "immediately understandable to a c coder" - I think this gets to the heart of the disagreement here. Tcl is different. Anyone who expects it look like and work like C-family languages will always be frustrated and disappointed.

But people who are willing to take a less conventional approach may find that it opens up cleaner and more elegant ways of doing things. For example, upvar is not just a workaround - it can support meta-programming techniques which are not even possible in e.g. Python.

The "Tcl way" is to have a minimal core which just supports running commands and connecting them together. Everything else is implemented as commands, including the control constructs, and any command can be redefined. This flexibility does of course allow things to go wrong in ways that could not happen in a more restrictive language. But it also provides an adaptability that is hard to give up once you get used to it.

cmacleod4··on Why you should not use Tcl (1994)
I have reluctantly accepted that my colleagues are unlikely to ever "grok" Tcl. So they they wont accept me using Tcl for production code that someone else might need to maintain in future. However they are happy to use various development utilities that I can hack together in Tcl much more productively than with anything else :-)
cmacleod4··on Why you should not use Tcl (1994)
Actually the "everything is (virtually) a string" approach has some beneficial effects. Keeping the underlying data structures compatible with this leads to using immutable values with copy-on-write, giving a very clean predictable semantics. I remember being shocked to discover that this did not apply in Python, where a value (not a variable) being used in one place can be modified by code elsewhere.
cmacleod4··on Why you should not use Tcl (1994)
Tcl has also fully supported this use case since about 1998.
cmacleod4··on Where Tcl and Tk Went Wrong (2010)
They're not dead yet :-) and a new book on Tcl just came out - https://news.ycombinator.com/item?id=14730316
cmacleod4··on New Book: The Tcl Programming Language, a Comprehensive Guide
The print version is now available - see http://wiki.tcl.tk/48868 for details.
cmacleod4··on Tclquadcode (Tcl compiler) dev status update
Note that this is one of the presentations from the 2017 European Tcl/Tk User Meeting, others are available at http://www.eurotcl.tcl3d.org/program.html
cmacleod4··on ParTcl – a micro Tcl implementation
Note that even Tcl had a recent proposal to support optional type annotations, but for run-time efficiency reasons rather than compile-time checking - http://code.activestate.com/lists/tcl-core/17707/
cmacleod4··on Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
Expect questions do get answered on Stackoverflow though - http://stackoverflow.com/questions/tagged/expect
cmacleod4··on Stubs – a cross-platform dynamic linking mechanism used by Tcl
My mistake, when I tried the original link it was blocked by firewall rules at my place of work and I assumed it didn't work at all.
cmacleod4··on Stubs – a cross-platform dynamic linking mechanism used by Tcl
Unfortunately the link posted here is wrong, it should be http://wiki.tcl.tk/285
cmacleod4··on Performance Improvements Using Micro-Optimizations
That is seriously impressive.
cmacleod4··on Black Screen: A modern terminal emulator based on Electron
Hi shockone,

A new terminal/shell is a very hard sell, as I know from my own experience. Six years ago I wrote my own terminal/shell combination ( http://wiki.tcl.tk/23446 ). It works well enough that I've been using it myself full-time at work ever since, but although a few other people have tried it, no-one else ever adopted it. My own attempt is implemented in Tcl/Tk, an older but much lighter-weight framework (it has no problem with cat-ing a 50MB file).

I combined the functions of shell and terminal because I found the shell/terminal split made some of the functionality I wanted difficult or impossible. One example is that I colour text written to stderr in red - standard shells mix stderr and stdout together before the terminal even sees them.

I decided early on that I would not support terminal escape sequences. I set the TERM environment variable to "dumb" which tells well-behaved programs not to use escape sequences. So you can't run vi/vim in one of my windows, but I always use gvim so I don't find this a problem.

Similarly after some experimentation I decided not to use ptys as they created as many problems as they solved. So programs which change behaviour based on whether they are connected to a terminal behave as if running from a script. Eg. running "man command" lists the whole man page rather than trying to page it - but this is what I want since one can page up/down in the shell anyway.

However it seems that people who use a terminal get very attached to its idiosyncracies and will reject anything even slightly different. Since it's very difficult to make any real improvements without introducing incompatibilies, attempts at improving the terminal/shell user experience rarely catch on. In contrast, a few other tools I have implemented using the same technology have been adopted by a worthwhile user community at work. I think the difference is that they are used for more specialised tasks and don't require the user to change their everyday workflow.

Anyway, good luck with your endeavour!

← PreviousPage 7 of 7