Live data from Hacker News

Tcl 9.0

tcl-lang.org

221–230 of 247 posts

Re: Tcl 9.0

#222

Earlier quoted context omitted.

Thanks for this explanation. It was very helpful. In terms of magic I meant it simply as how big is the set of unchangeable axioms, as opposed to how many things are derived in the language itself from a more minimal set of magical axioms. With Lisp being the language with the least magic lisp for C programmers was insightful!

Ah! Here's the set of axioms: the Tcl Dodekalogue. https://wiki.tcl-lang.org/page/Dodekalogue?R=0&O=Dodecalogue...

Brilliant. That wiki is quite something. Getting a real sense of the core of the language is within easy reach.

Re: Tcl 9.0

#223
post #167

Earlier quoted context omitted.

Copy-pasting a "hype" checklist I made some eons ago: * Extremely consistent and elegant syntax - whole syntax/grammar is described in 12 rules in a single man page (Tcl(n)) of 150 lines and there's no reserved keyword. Nearer to CL than Python on that point. * Homoiconic through strings (like almost every language with eval) but most importantly, through "list-like" strings. * Official man pages! No web-only and spe…

This is a great list. > * Safe interpreters let you do very fun things like config files in Tcl with limited access to the machine and master interpreter. I keep looking for similar functionality in Python (the scripting language of choice for many, nowadays) but I am always disappointed.

The python-esque sandboxed language is Starlark: https://github.com/google/starlark-go#documentation

Re: Tcl 9.0

#224

Anyone know if any new projects are using Tcl? Surprised they went with this

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 .

Courtesy of kicking the tires on your app, I discovered: https://github.com/apnadkarni/tcl9-migrate#migration-tool-fo... (via https://cmacleod.me.uk/ng/comp.lang.tcl/67166 )

and "EuroTcl 2024 - presentation videos and slides now online" https://openacs.org/conf2024/info/schedule (via https://cmacleod.me.uk/ng/comp.lang.tcl/67134 )

Re: Tcl 9.0

#225
post #152

Earlier quoted context omitted.

Tcl was 1988. Lua was 1993. Lua is quite a bit larger than Tcl. In addition, no two Lua installations can ever agree on which modules they require (which makes the actual Lua binary even bigger).

Larger? On my system libtcl8.6.so is 1.7 megabytes and liblua5.1.so is 192 kilobytes. It's not even close. Lua uses libraries / modules based on where you tell the interpreter they are located, so that's on you. Set package.path and package.cpath correctly.

You are comparing 2024 versions.

Go find the original tarball versions from 1990 (maybe you have to go to Usenet sources!). Tcl was small.

Re: Tcl 9.0

#226
post #225

Earlier quoted context omitted.

Larger? On my system libtcl8.6.so is 1.7 megabytes and liblua5.1.so is 192 kilobytes. It's not even close. Lua uses libraries / modules based on where you tell the interpreter they are located, so that's on you. Set package.path and package.cpath correctly.

You are comparing 2024 versions. Go find the original tarball versions from 1990 (maybe you have to go to Usenet sources!). Tcl was small .

Ah, you used "is" and not "was" in your original post.

I wonder if TCL 2.1 will compile with modern gcc?

Re: Tcl 9.0

#227
post #167

Earlier quoted context omitted.

Copy-pasting a "hype" checklist I made some eons ago: * Extremely consistent and elegant syntax - whole syntax/grammar is described in 12 rules in a single man page (Tcl(n)) of 150 lines and there's no reserved keyword. Nearer to CL than Python on that point. * Homoiconic through strings (like almost every language with eval) but most importantly, through "list-like" strings. * Official man pages! No web-only and spe…

This is a great list. > * Safe interpreters let you do very fun things like config files in Tcl with limited access to the machine and master interpreter. I keep looking for similar functionality in Python (the scripting language of choice for many, nowadays) but I am always disappointed.

Lua is another language that lets you do this!

Re: Tcl 9.0

#228
post #225

Earlier quoted context omitted.

You are comparing 2024 versions. Go find the original tarball versions from 1990 (maybe you have to go to Usenet sources!). Tcl was small .

Ah, you used "is" and not "was" in your original post. I wonder if TCL 2.1 will compile with modern gcc?

That would probably be painful. It's old-style C.

Better to start with Jim Tcl or Picol.

Even something like Tiny Tcl would be a better start (I think it fit in 64K).

Re: Tcl 9.0

#229
post #65

Earlier 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…

Why not learn to enjoy life knowing you get a second chance instead ?: https://github.com/rushsteve1/trash-d

because then i become to rely on stuff being in the trash and i'd be less careful when deleting, which means i have to double check when i clean the trash. that's extra work. . and since the trash is one single folder for the whole desktop, that means the trash is full of stuff from all over the place, making a review extra hard. in most cases i know something needs to be gone, so i'd rather delete it on the spot.

besides that, the primary reason for deleting stuff is to gain space. moving things to trash doesn't help with that.

what i sometimes do though, when mass deleting, is to move stuff to be deleted into a new folder (usually called "del" or "delete"). then verify the contents of the folder before removing it.

what would be more useful is a kind of trash implementation that does not take space, in that it keeps files around but reports them as unused space that can be overwritten when space is needed. kind of like undelete is possible on some filesystems. so that gone is gone because i can't control when deleted space gets used up, but in a panic situation i can revert the most recent deletes.

Re: Tcl 9.0

#230
post #174

Earlier quoted context omitted.

It's not a mistake

If it's not a mistake then why they took it off?

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.
Post reply on HN