Live data from Hacker News

Tcl 9.0

tcl-lang.org

201–210 of 247 posts

Re: Tcl 9.0

#201
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

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…

Sold. I know what I'm doing this weekend.

Re: Tcl 9.0

#202

I know of Tcl but I don’t know anything about its structure. The number one thing I ask of a language is consistency: the minimal amount of magic and most of the language implemented in itself. Ruby almost got there and then, for me, slipped up on class . How does Tcl fare under these criteria?

The Tcl language is made up of commands ; a command has a name and takes an argument list, with which it can do literally anything. The standard commands are written in C; Tcl `procs` are commands that are written in Tcl. The control structures, like `if` and `foreach` and `while` is just a Tcl command. The `proc` command that defines a proc is just a Tcl command. I think of it as Lisp for C programmers. So: is the l…

> The Tcl language is made up of commands

As someone that is stubbornly trying to design a Smalltalk-Forth hybrid syntax, where everything is words, nay, messages in a declarative/concatenative pipeline, without success, reading this makes me inappropriately giddy.

I need to learn Tcl.

Re: Tcl 9.0

#204

Earlier quoted context omitted.

Sourceforge still works, and is (now) reliable. The awful DevShare malware stuff that Sourceforge started (under new ownership) in 2012 was stopped (under different new ownership) in 2016.

The site is ugly and difficult to navigate. Go there and enter TCL in the search box and see how many clicks you have to do to actually find the project. Then when you click the download button a timer has to run out before the download will start. Maybe it technically works, but it's a terrible UX.

"Ugly and difficult to navigate" and "terrible UX" are a completely different thing than "scammy download sites that installs spyware".

Re: Tcl 9.0

#205
post #41

Earlier quoted context omitted.

Indeed, SQLite started life as simply a Tcl extension[0] that “escaped into the wild”. Redis was initially prototyped in Tcl too, and ‘antirez has nice things[1] to say about Tcl. [0] https://sqlite.org/tclsqlite.html [1] http://antirez.com/articoli/tclmisunderstood.html

I think he also wrote an implementation of a tcl-like language called Jim.

No, that was by Steve Bennett.

Re: Tcl 9.0

#206
post #88
post #41

Earlier quoted context omitted.

Indeed, SQLite started life as simply a Tcl extension[0] that “escaped into the wild”. Redis was initially prototyped in Tcl too, and ‘antirez has nice things[1] to say about Tcl. [0] https://sqlite.org/tclsqlite.html [1] http://antirez.com/articoli/tclmisunderstood.html

I'm curious about why they chose Tcl, particularly over languages like Python or Perl. Were there specific aspects of Tcl that made it appealing for SQLite and Redis, or was the choice more about familiarity with Tcl? Either way, I'd love to understand what they found interesting or advantageous about Tcl in these projects. BTW, I chose Tcl/Tk in the past because it was the easier way I found to quickly built an UI o…

Both Richard Hipp and Salvatore Sanfillipo came out of the Tcl community. SQLite was originally just a Tcl extension (and may I say, SQLite's Tcl binding is a dream to use). In a nutshell, they were already using Tcl because they found it useful.

Re: Tcl 9.0

#207

Earlier quoted context omitted.

The Tcl language is made up of commands ; a command has a name and takes an argument list, with which it can do literally anything. The standard commands are written in C; Tcl `procs` are commands that are written in Tcl. The control structures, like `if` and `foreach` and `while` is just a Tcl command. The `proc` command that defines a proc is just a Tcl command. I think of it as Lisp for C programmers. So: is the l…

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...

Re: Tcl 9.0

#208
post #144

Earlier quoted context omitted.

I'm not a TCL user, but from the description of wduquette is sounds similar to Python's zipapp https://docs.python.org/3/library/zipapp.html

The definition of "standalone application" is a bit stronger - what's always been possible with "Tclkits" has been to embed the application code in an interpreter binary and distribute that , and the new core zipfs supports that as well.

Yes, exactly. You can package up your entire scripted application, plus all resources, into a single executable, and distribute that single file.

Re: Tcl 9.0

#209
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

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…

>refcounting does the job since no cycles are possible by design

So double-linked list is impossible to define?

Re: Tcl 9.0

#210

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…

>refcounting does the job since no cycles are possible by design So double-linked list is impossible to define?

You can't define new data structures as such in pure Tcl, as you don't have pointers. And as for cycles, you can't modify an object to add a reference to itself, since the copy-on-write will just create a new object.
Post reply on HN