Live data from Hacker News

The Birth of Tcl

tcl.tk

41–50 of 105 posts

Re: The Birth of Tcl

#41
post #10
post #2

I like Tcl a lot. The design is simple, extremely easy to learn, and yet the code is still maintainable (((looking at you LISP))). Among the scripting languages I've used, I probably liked Tcl the most. I wish it didn't fall out of favor.

Off-topic, but you should be aware that the (((triple parentheses))) are apparently an anti-semitic thing. Just so you know it can be misinterpreted in some contexts x)

[deleted]

Re: The Birth of Tcl

#42
post #37

Tcl and Rebol are great. The code is compact, very easy to understand and quick to write, especially Rebol. You can do GUI in both Tcl/Tk and Rebol as well. You might want to check Rebol out as well: http://www.rebol.com/docs/expert-intro.html (or http://www.rebol.com/docs/design-objectives.html ).

You probably already are aware of it but there's an effort to create an open source successor to Rebol. See the Red Programming Language site [0]. I've played around with Red and it's pretty interesting. Though rather different from Tcl. Red compiles to native code out of the box which is an advantage. Currently Red is limited to 32-bit output. When they get 64-bit working along with self-hosting compiler I think the…

I know about Red. Unfortunately it requires 32-bit libraries, whereas Rebol 3 does not. I could not get Red to work as easily and nicely as I did get Rebol 3. :/

> When they get 64-bit working along with self-hosting compiler I think the language could become a major success.

I agree. I will most likely switch to it (though I have not dig'd deeper, hopefully it follows the philosophy of Rebol). I will check if my Rebol 3 programs work with it, or without much modification. I suppose as long as it supports 64-bit, has libraries for SHA512 (`system/catalog/checksums/sha512` in Rebol 3), along with `random/secure` and `random/seed now/precise`, I suppose it should be fine.

In any case, it is a deal-breaker for me. I really want them to get 64-bit working and have a self-hosted compiler. I wish them the best.

For the people who are interested: when I say Rebol 3, I am referring to https://github.com/Oldes/Rebol3. There is a decent and detailed post on SO about these implementations and their differences. I found Oldes' one to be the most ideal.

Re: The Birth of Tcl

#43
post #12
post #9

Earlier quoted context omitted.

What drives you the most nuts about the syntax?

1) I realize that Tcl isn't technically stringly typed on the inside anymore, but extensionally it still appears so. 2) Attempting to understand how variable scoping works in Tcl is like attempting to stare into the maw of some eldritch horror, deeper than the earth itself by some trick of other-space, and lined with infinite rows of writhing, fang-tipped cilia. The central tenet of lexical scoping -- that bindings v…

I just guess there are two kinds of people in the world. I think scope leakage across logical boundaries is dangerous and really hurts maintainability and code readability, and I think Tcl's tight restriction of variable scope by default is one of its most valuable properties.

I'm so old I remember many conversations among perl and JavaScript programmers talking about the bug that drove them craziest, and it always seemed to come down to unexpected scope leakage and variable name collisions. Then there would be a lot of laughing and back-slapping and calls of 'been there bro!' I just can't wrap my head around that viewpoint. Better IMO to allow scope to cross function point boundaries only at well-defined points.

I've been programming in Tcl for over 20 years and the times when use of upvar was called for have been very few. Meanwhile, how much of your code that you wrote 20 years ago still runs just fine on the latest tool stack?

Re: The Birth of Tcl

#44

Tcl and Rebol are great. The code is compact, very easy to understand and quick to write, especially Rebol. You can do GUI in both Tcl/Tk and Rebol as well. You might want to check Rebol out as well: http://www.rebol.com/docs/expert-intro.html (or http://www.rebol.com/docs/design-objectives.html ).

Rebol is seriously cool and criminally overlooked on HN. Unlike TCL, it didn't survive to the same extent. There is the whole Red effort (very cool), but I'm not sure if they'll get there. I wish them the best of luck though.

Re: The Birth of Tcl

#45
post #17

Earlier quoted context omitted.

I was thinking exactly in the eldritch horror direction. Thanks for writing that, you have saved me the unpleasantness of finding out exactly what it was that made me loathe Tcl.

What's not to love about `upvar`? /s

Upvar has it's place, especially when writing your own control structures. Outside of that, tread lightly.

Re: The Birth of Tcl

#46

Tcl and Rebol are great. The code is compact, very easy to understand and quick to write, especially Rebol. You can do GUI in both Tcl/Tk and Rebol as well. You might want to check Rebol out as well: http://www.rebol.com/docs/expert-intro.html (or http://www.rebol.com/docs/design-objectives.html ).

Rebol is seriously cool and criminally overlooked on HN. Unlike TCL, it didn't survive to the same extent. There is the whole Red effort (very cool), but I'm not sure if they'll get there. I wish them the best of luck though.

Yeah, so do I. I mentioned in my other comment that I do not use it because of lack of 64-bit support and whatnot. If they do get there, and I could replace my Rebol 3 programs with Red, then I will switch to it. As for Rebol 3, I use https://github.com/Oldes/Rebol3.

For what it is worth, people ought to check out the Rebol cookbook. It is full of amazing stuff. So easy to implement somewhat complicated things. I am seriously wondering why it is not more popular. I would say a lot has to do with the fact that it has been open sourced too late (should have been open to begin with, IMO), and that there are too many different, but somewhat alike implementations[1]. It is confusing to a newcomer. They do not know what to use, why, and if it actually is under active development and will continue to be.

[1] https://stackoverflow.com/questions/31510930/rebol3-what-is-...

Re: The Birth of Tcl

#47
post #12
post #9

Earlier quoted context omitted.

What drives you the most nuts about the syntax?

1) I realize that Tcl isn't technically stringly typed on the inside anymore, but extensionally it still appears so. 2) Attempting to understand how variable scoping works in Tcl is like attempting to stare into the maw of some eldritch horror, deeper than the earth itself by some trick of other-space, and lined with infinite rows of writhing, fang-tipped cilia. The central tenet of lexical scoping -- that bindings v…

Having used Tcl extensively I think scoping rules aren't really too complicated, but there are some apparent inconsistencies. A main one is global variables aren't visible inside procedures unless declared as "global", whereas procedures are global no matter where created (in the global namespace). However referring to variables and procedures using fully qualified namespaces is always correct and unambiguous.

The thing with upvar (and uplevel) is that by default upvar refers to variables in the caller of the current proc. But when a proc is called indirectly (e.g., a callback proc) then the variable upvar is intended to reference may be 2 or more frames above. Using something like "upvar #2 refvar var" works as expected. It's analogous to deferencing pointers in C when there are >1 levels of indirection.

Is there any programming language that doesn't have some confusing rules? If a language is going to be useful the answer is bound to be "no". It's a curious how we get used to a particular (or even peculiar) syntax. When used long enough it begins to feel "natural" and obvious, and find it amazing how anyone would have difficulty understanding how it works.

Re: The Birth of Tcl

#48
post #10
post #2

I like Tcl a lot. The design is simple, extremely easy to learn, and yet the code is still maintainable (((looking at you LISP))). Among the scripting languages I've used, I probably liked Tcl the most. I wish it didn't fall out of favor.

Off-topic, but you should be aware that the (((triple parentheses))) are apparently an anti-semitic thing. Just so you know it can be misinterpreted in some contexts x)

Context is everything. I am pretty sure LISP is not Jewish so (((looking at your LISP))) is perfectly fine.

Re: The Birth of Tcl

#49
I really like Tcl the language and some of the tooling, but certainly not all of it.

I kind of wish there was a single reputable website that I could go to for all versions. I don't want something from Source Forge or ActiveState or some random person's website. I'm sure they're all fine, but I'm a lot less sketched out with running Anaconda Python or Java than Tcl. Funny enough, some Python systems include Tcl for the Tk GUI, but I haven't been able to get some of the libraries I'm interested in to work with that version.

Re: The Birth of Tcl

#50
post #20

If I remember correctly, Tcl was the first language I coded in. That was in late 90s, I asked my dad to pay some hosting company so I could have IRC bots. I don't think I ever understood how thinhs really worked, but I remember I was able to type "commands" in IRC channels and my bots would do stuff, like send private messages, join channels, etc.

Eggdrop!
Post reply on HN