Language snobs and 1990s OO snobs really love to hate on tcl - yeah everything is a string or a command, and the OO extensions were kind of kludgy - but there's a design ethos to the ecosystem that is really special. Ditch tkinter, which is basically writing python to write tcl, and try doing a GUI in straight tcl/tk. Try the sqlite interface. Write a modest C extension or wrap a library. So much of it just works.
Tcl 9.0
181–190 of 247 posts
Re: Tcl 9.0
#182Earlier quoted context omitted.
i once managed to create a directory named ~ using the mirror tool written in perl. then i naively tried to remove it using "rm -r ~" and started wondering why removing an empty directory would take so long, until it dawned on me... i learned a few new habits since then. i almost never use rm -r and i avoid "*" as a glob by itself. instead i always try to qualify "*" with a path, remove files first: "rm dir/*"; and t…
Very cool of you to post this. Too many people won't post stories like this, but I've done very similar multiple times. I think it definitely helps reinforce proper habits, and is the best way to cut your teeth on technology. It's also great for anyone new to read something like this, and be able to avoid something so devastating, and maybe make lesser mistakes, but still learn from both!
like the one from my colleague who once fat fingered fsck into mkfs and i lost my personal homepage because of it. what makes me uncomfortable about that story is that it was not my fault. if it were it would have been easier to tell. but at the time i was quite frustrated and my colleague felt that despite me trying to not get angry at him. i still feel really bad about my reaction then, adding to his predicament, since he had to live with the guilt about losing our website and everyone's personal home directory. it's bad when a mistake causes you to loose something personal, but so much worse when you loose someone elses stuff.
talking about mistakes is how we learn from them. the important part is not to get embarrassed about them. however that requires an environment where we are not blaming each other when something goes wrong.
i could have made that mistake myself. and i applied this lesson to my own learning as if i had.
blessed be the pessimist, for he hath made backups...
Re: Tcl 9.0
#183Earlier quoted context omitted.
Can you explain what zip filesystem is?
A handler for treating .zip (and .jar and .tar ...) files as if they were a volume mounted at /home/user/foo.zip - e.g. https://github.com/openjdk/jdk/blob/jdk-21-ga/src/java.base/... It may be easier to reason about when thinking of the way $(mount -o loop) works with .iso files -- a file that is a container for other files that one can mount as if it were a filesystem I was expecting pathlib in Python https://docs.…
It looks like https://github.com/cybernoid/archivemount provides a similar experience in the shell, although one would have to mount the file first.
Re: Tcl 9.0
#184Language snobs and 1990s OO snobs really love to hate on tcl - yeah everything is a string or a command, and the OO extensions were kind of kludgy - but there's a design ethos to the ecosystem that is really special. Ditch tkinter, which is basically writing python to write tcl, and try doing a GUI in straight tcl/tk. Try the sqlite interface. Write a modest C extension or wrap a library. So much of it just works.
It made our startup possible, and the experience and learnings we got out of it, were in the genesis of OutSystems. One of those learnings, was that I never wanted to again use a dynamic language without any kind of JIT compiler for full blown web servers. The language is great, rewriting Tcl libraries into C on regular basis due to performance issues not so much.
What about a dynamic language with an AOT compiler? E.g. SBCL implements Common Lisp by compiling everything ahead of time.
Re: Tcl 9.0
#185Earlier quoted context omitted.
Can you explain what zip filesystem is?
A handler for treating .zip (and .jar and .tar ...) files as if they were a volume mounted at /home/user/foo.zip - e.g. https://github.com/openjdk/jdk/blob/jdk-21-ga/src/java.base/... It may be easier to reason about when thinking of the way $(mount -o loop) works with .iso files -- a file that is a container for other files that one can mount as if it were a filesystem I was expecting pathlib in Python https://docs.…
Re: Tcl 9.0
#186Earlier quoted context omitted.
Yeah, they added that a long time ago, but it's not at all the same as built-in support. My experience was trying out fragile third-party projects with little or no documentation. The whole point of using Tcl/Tk for writing a GUI was the convenience. Things may have changed over time. I no longer pay attention. Maybe I'll give it another try.
The theming engine is absolutely "built-in", as are a handful of themes; in particular aqua and the winnative/xpnative/vistanative family (which integrate with the Mac/Windows windowing system such that the application will look "native" by default on those systems).
That's my point. You can make an app that looks okay on those OSes, but all of the built-in options for Linux look ridiculous, and then you're back to the third-party stuff.
Re: Tcl 9.0
#187Re: Tcl 9.0
#188Earlier quoted context omitted.
One example from the document: > Consider the naive attempt to clean out the /tmp directory. > cd /tmp > foreach f [glob *] {file delete -force $f} > A file ~ or ~user maliciously placed in /tmp will have rather unfortunate consequences.
i once managed to create a directory named ~ using the mirror tool written in perl. then i naively tried to remove it using "rm -r ~" and started wondering why removing an empty directory would take so long, until it dawned on me... i learned a few new habits since then. i almost never use rm -r and i avoid "*" as a glob by itself. instead i always try to qualify "*" with a path, remove files first: "rm dir/*"; and t…
Re: Tcl 9.0
#189Earlier quoted context omitted.
The venn diagram of query support between SQL vendors is much closer to a flower than you think. Just implement it for one and if it works, the others will add it
I have upvoted you for each comment you've made, but I feel like it's not that simple. Even just getting a single vendor to implement it is a huge undertaking. I know that you and I see the value in it, but I don't feel like we're the first to see that. There's a reason behind not implementing this feature, and it's the complexity that lies behind such a feature, like most things. This seems like one of those recursi…
Or... "DRYRUN UPDATE ...", which is more like "EXPLAIN UPDATE..."
Thoughts?