Rain 🚱 is a user on cybre.space. You can follow them or interact with them if you have an account anywhere in the fediverse.

> foreach i { 1 2 3 4 5 6 7 8 }

:oh_no:

this is worse than bash

Rain 🚱 @grainloom

what were the people making thinking? "let's build a language like sh, but remove every useful feature"?

Ā· brutaldon Ā· 0 Ā· 2

or am I only finding unidiomatic code and it's actually a beautiful language?

@grainloom It's eval model is really simple but the different levels of quoting will drive you nuts:

antirez.com/articoli/tclmisund

@ckeen
oooh, hopefully now i'll get the "zen of Tcl" or whatever

I've been reading the BRL-CAD tutorials but they don't seem to really go into the language

@ckeen @grainloom I finally understand tcl. Well, a little bit.Incredible.

@grainloom I know it was popular in scripts for some IRC client. I forget which.

@Riley @grainloom It got popular for much the same reason Lua got popular: It's easily embedded

@elomatreb @Riley
at least Lua is fun to program in, but Tcl so far is. ugh.

ok, so here is an example based on the MGED manual:
> set glob_compat_mode 0
> foreach i $search_results {attr set $i color [expr {int(rand()*225)+30}]/[expr {int(rand()*225)+30}]/[expr {int(rand()*225)+30}]}

without glob_compat_mode, it doesn't even run, but it doesn't just give any error, it gives a syntax error

global vars affecting basic syntax.....

i cri

@grainloom "What if we took perl and added more special characters"

@grainloom plot twist: TCL is actually an abbreviation for "totally catastrophic language"

@grainloom I am wondering, why do people look at tcl? I have myself, but part of that was ignorance, part of that was, saves me writing an entire irc bot... Painful as it was.

@webmind @grainloom

Soooo, there's this whole ancient thread about how RMS disses on TCL in favor of guile.

I find it an illuminating basis for comparing RMS getting riled up about a tech thing almost totally outside the context of user freedom, almost completely about what we might call "code smell" programming aesthetics.

Don't know if you've seen it, and I don't know that I'd recommend it if you haven't. These sort of online brawls are a kind of acquired taste.

@grainloom with tcl? Interesting. Didn't know it was still used.

@kara hmm, didn't do much in python, but it's array/list construction and escaping for one seemed more sane.

Tk I've always done without tcl.

grumpy about Tcl Show more

grumpy about Tcl Show more

@webmind @grainloom it's big in EDA. we (have to) use it for building FPGA bitstreams and automating other HDL stuff.