News for hackers. Stuff that matters.
Re:picol: A Tcl interpreter in 500 lines of code by IshKebab on Monday February 16, 2026 @04:25AM (#47032827)
> best thing about TCL is easy syntax and that everything is a string :)

What? That's the worst thing about TCL.

Re:picol: A Tcl interpreter in 500 lines of code by antirez on Monday February 16, 2026 @06:19AM (#47033709)
It depends on the use case. For instance you open a socket, write there any value you have without serialization, read it in the other side, data transfer done.
Re:picol: A Tcl interpreter in 500 lines of code by petcat on Monday February 16, 2026 @07:00AM (#47033975)
The convenience of not having to marshal data over a network is certainly a use case. But I'll admit that two of the worst programs I ever saw were written in Perl and TCL. Somehow just a big jumble of inscrutable regexes.

When "everything is a string" then you have no choice but to literally treat everything as a string. Painful. Very cool project though.

Re:picol: A Tcl interpreter in 500 lines of code by graemep on Monday February 16, 2026 @08:02AM (#47034474)
That sounds more like someone who over-uses regexes - the developer is the problem, not the language

TCL has a lot of options for manipulating strings - take a look at just the built in string command for a start: https://www.tcl-lang.org/man/tcl8.4/TclCmd/string.htm

I have seen terrible code in Python, C, and more.

Re:picol: A Tcl interpreter in 500 lines of code by Treblemaker on Tuesday February 17, 2026 @12:14AM (#47043937)
The objections to tcl I see most often seem to reflect an outdated or incomplete understanding of the language and its capabilities.

As with many interpreted languages, maybe it's just too easy to iterate interactively with code until it "just works", rather than taking the time to design the code before writing it, leading to perception that it is a "write-only" language.

However, despite its reputation, even Perl can be written in a way that is human-readable. I agree with you that it is more a reflection of the programmer or the work environment than of the language itself.

Re:picol: A Tcl interpreter in 500 lines of code by Treblemaker on Tuesday February 17, 2026 @12:06AM (#47043893)
> When "everything is a string" then you have no choice but to literally treat everything as a string.

As someone who has been developing tcl almost daily for more than 30 years, both object oriented and imperative code, I have not found it necessary to think this way.

Can you explain what leads you to this conclusion?

Re:picol: A Tcl interpreter in 500 lines of code by bmacho on Monday February 16, 2026 @05:35AM (#47033412)
It's only the interface that is of a string. An array is a list of strings with space between, but only for the programmer. The runtime is free to use an actual array.
Re:picol: A Tcl interpreter in 500 lines of code by IshKebab on Monday February 16, 2026 @07:36AM (#47034258)
I'm aware. It's awful because of the implications for the programmer, not the runtime.
Re:picol: A Tcl interpreter in 500 lines of code by iberator on Monday February 16, 2026 @04:49AM (#47033025)
I love it. Living proof that languages doesn't need forced types.

Data is Data. It's kinda object programming as visioned in the 70".

So easy and trivial language.

Re:picol: A Tcl interpreter in 500 lines of code by IshKebab on Monday February 16, 2026 @07:40AM (#47034285)
> Living proof that languages doesn't need forced types.

The opposite surely? TCL is practically dead, and only lingers on in the EDA industry (which has zero taste). Virtually every successful language today has at least a few different basic types for numbers, arrays, strings, maps and so on.

Re:picol: A Tcl interpreter in 500 lines of code by bmacho on Monday February 16, 2026 @07:48AM (#47034344)
Tcl has these types as well. They are special strings.

Number: string of digits. List: strings separated by space. Dictionary: key value pairs in a list.

Re:picol: A Tcl interpreter in 500 lines of code by IshKebab on Monday February 16, 2026 @03:40PM (#47040051)
No they aren't. Everything is a string. The runtime does some optimisation where it actually does use different types under the hood but they don't change the semantics.

If you try to pass a list into a function expecting a string it will just treat the list as a string. No type error or anything, not even at runtime.

CMake is the same. Terrible design. Real types are useful.

Re:picol: A Tcl interpreter in 500 lines of code by ux266478 on Monday February 16, 2026 @10:49AM (#47036508)
TCL's typicing discipline comes from shell languages and awk, which are decidedly not dead. The overwhelming majority of programmers have less than no taste, so language usage rates in general don't really mean much.
Re:picol: A Tcl interpreter in 500 lines of code by isr on Monday February 16, 2026 @05:01PM (#47040924)
Well, if you use flightaware to track flights, you're using tcl. The vast majority of their codebase is in tcl.
Re:picol: A Tcl interpreter in 500 lines of code by zwischenzug on Tuesday February 17, 2026 @09:20AM (#47047747)
If you place a sports bet online, odds (!) are that it will run through tcl in its business logic. I may even have written some of it.