▲ 545 ▼ Stringly typed (programming.dev) submitted 1 year ago by sus@programming.dev to c/programmer_humor@programming.dev 92 comments fedilink hide all child comments
[–] lime@feddit.nu 10 points 1 year ago (4 children) some of you have never programmed in tcl and it shows permalink fedilink source hideshow 4 child comments replies: [–] magic_lobster_party@fedia.io 20 points 1 year ago (1 child) I opened a TCL script once. It’s use of uplevel scared me. I’ve never dared to return since. For those who don’t know: uplevel is a command that goes up one level of the stack frame, and then executes code there. A function can therefore execute code in its callers stack frame. permalink fedilink source parent hideshow 1 child comment replies: [–] lime@feddit.nu 13 points 1 year ago* tcl is pretty fun actually, it's like bash on steroids. for a preview of the insanity: anything surrounded by "" is a string, with the variable expansion you'd expect. anything surrounded by {} is also a string, but with no expansion. the equivalent in bash is the backtick string. but you don't need to know that to write tcl. if you approach {} as "code blocks" like in other languages, it just works. reason being that tcl evals everything, constantly, attaching little tags to strings that tells the language how things are used, like "this string is an integer" or "this string is code and here is the result from last time it ran". it's madness and, weirdly, robust as hell. Xilinx writes all their tooling in tcl. SQLite started life as a tcl module, and it's still the only api that is not provided by a plugin. permalink fedilink source parent [–] frezik@lemmy.blahaj.zone 4 points 1 year ago (1 child) I have. I quickly learned not to. Tk is overlooked, though. It's not pretty, and its approach is archaic, but it's one of the few GUI toolkits that Just Works on every platform I tried it on with minimum fuss. permalink fedilink source parent hideshow 1 child comment replies: [–] lime@feddit.nu 3 points 1 year ago having used swing and modern js, i still prefer tk. permalink fedilink source parent
[–] magic_lobster_party@fedia.io 20 points 1 year ago (1 child) I opened a TCL script once. It’s use of uplevel scared me. I’ve never dared to return since. For those who don’t know: uplevel is a command that goes up one level of the stack frame, and then executes code there. A function can therefore execute code in its callers stack frame. permalink fedilink source parent hideshow 1 child comment replies: [–] lime@feddit.nu 13 points 1 year ago* tcl is pretty fun actually, it's like bash on steroids. for a preview of the insanity: anything surrounded by "" is a string, with the variable expansion you'd expect. anything surrounded by {} is also a string, but with no expansion. the equivalent in bash is the backtick string. but you don't need to know that to write tcl. if you approach {} as "code blocks" like in other languages, it just works. reason being that tcl evals everything, constantly, attaching little tags to strings that tells the language how things are used, like "this string is an integer" or "this string is code and here is the result from last time it ran". it's madness and, weirdly, robust as hell. Xilinx writes all their tooling in tcl. SQLite started life as a tcl module, and it's still the only api that is not provided by a plugin. permalink fedilink source parent
[–] lime@feddit.nu 13 points 1 year ago* tcl is pretty fun actually, it's like bash on steroids. for a preview of the insanity: anything surrounded by "" is a string, with the variable expansion you'd expect. anything surrounded by {} is also a string, but with no expansion. the equivalent in bash is the backtick string. but you don't need to know that to write tcl. if you approach {} as "code blocks" like in other languages, it just works. reason being that tcl evals everything, constantly, attaching little tags to strings that tells the language how things are used, like "this string is an integer" or "this string is code and here is the result from last time it ran". it's madness and, weirdly, robust as hell. Xilinx writes all their tooling in tcl. SQLite started life as a tcl module, and it's still the only api that is not provided by a plugin. permalink fedilink source parent
[–] frezik@lemmy.blahaj.zone 4 points 1 year ago (1 child) I have. I quickly learned not to. Tk is overlooked, though. It's not pretty, and its approach is archaic, but it's one of the few GUI toolkits that Just Works on every platform I tried it on with minimum fuss. permalink fedilink source parent hideshow 1 child comment replies: [–] lime@feddit.nu 3 points 1 year ago having used swing and modern js, i still prefer tk. permalink fedilink source parent
[–] lime@feddit.nu 3 points 1 year ago having used swing and modern js, i still prefer tk. permalink fedilink source parent