Live data from Hacker News

Tcl 9.0

tcl-lang.org

151–160 of 247 posts

Re: Tcl 9.0

#151
In the realm of Electronic Design Automation (EDA), TCL is ubiquitous. Virtually every EDA tool offers a TCL interface or API, making it the predominant language for tool configuration. I've always wondered why TCL hasn't gained traction in other domains. It possesses the elegance of Lisp while maintaining practicality.

Re: Tcl 9.0

#152
post #86

Earlier quoted context omitted.

John Ousterhout realized that every single EDA tool at Berkeley wound up implementing a crappy extension language. So, he implemented a language so that there could be a single, not-so-crappy extension language for the Berkeley EDA tools. He made C integration particularly easy (something the lisps of the time didn't really do). As his students spread out, each company they hit had a shitty extension language and the…

> You need a language that is small yet still complete. Even today, the only languages that really fit that bill are Scheme/Lisp, Tcl, and Forth. Lua? It's used in (and used for?) a lot of embedding: * https://en.wikipedia.org/wiki/Lua_(programming_language)

Tcl was 1988. Lua was 1993.

Lua is quite a bit larger than Tcl. In addition, no two Lua installations can ever agree on which modules they require (which makes the actual Lua binary even bigger).

Re: Tcl 9.0

#153

Earlier quoted context omitted.

I know what you mean, I do the same. I agree, but at the same time, it's difficult to start building in protections for the user. Where do you start and where do you stop? I have been forced to do the extreme to protect the user, and then you are asked why things are so difficult to use. I think to make something for someone that concentrates in the technology, as well as a beginner, means you've got to give up so mu…

It's completely Optional safeguards. Add long as it's optional, I advocate for having as many of those as people can imagine

I understand, but with how much of a change to the language? Such a change would take an enormous amount of time to make it into the ANSI/ISO SQL standard, and what database would start to implement it first, and which would hold out as long as possible?

I don't disagree that it's impossible, but how do you get the syntax standardized at this point? Do you get various dialects, or an agreement between vendors? Look how slowly the standard moves, when do we get this where it's usable in most popular RDBMS?

Re: Tcl 9.0

#154
post #100
post #95

Earlier quoted context omitted.

My main safety habit is to avoid slashless paths. Bad: rm * Okay: rm ./* rm /tmp/d/* rm */deadmeat rm d/* Then again, I commonly use dangerous things like `mv somefile{,.away}` that are easy to get wrong, so maybe don't trust my advice too much.

rm -rf "$TSTDIR"/etc is pretty dangerous when you forget to set the env var

In bash, `set -u` or `"${TSTDIR:?Error: TSTSDIR is required.}/etc"` protects from such errors.

Re: Tcl 9.0

#155

Earlier quoted context omitted.

It's completely Optional safeguards. Add long as it's optional, I advocate for having as many of those as people can imagine

I understand, but with how much of a change to the language? Such a change would take an enormous amount of time to make it into the ANSI/ISO SQL standard, and what database would start to implement it first, and which would hold out as long as possible? I don't disagree that it's impossible, but how do you get the syntax standardized at this point? Do you get various dialects, or an agreement between vendors? Look h…

The venn diagram of query support between SQL vendors is much closer to a flower than you think.

Just implement it for one and if it works, the others will add it

Re: Tcl 9.0

#157

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…

Hey, you missed out coroutines :-)

Indeed the backing implementation /generalization, stackless non-recursive engine (NRE)[0], developed by Miguel Sofer (RIP).

[0] https://wiki.tcl-lang.org/page/NRE

Re: Tcl 9.0

#158

Earlier quoted context omitted.

A theming engine went in something like 15 years ago now; the default theme looks rather dated, but there are plenty of others. See https://wiki.tcl-lang.org/page/List+of+ttk+Themes (though the screenshots of core themes are from 8.5/8.6 - default in particular has changed a bit in Tk 9). The "catch" is that the theming engine has its own new widgets, and so to be themed an application has to use the new API. Code fr…

Yeah, they added that a long time ago, but it's not at all the same as built-in support. My experience was trying out fragile third-party projects with little or no documentation. The whole point of using Tcl/Tk for writing a GUI was the convenience. Things may have changed over time. I no longer pay attention. Maybe I'll give it another try.

The theming engine is absolutely "built-in", as are a handful of themes; in particular aqua and the winnative/xpnative/vistanative family (which integrate with the Mac/Windows windowing system such that the application will look "native" by default on those systems).

Re: Tcl 9.0

#159

Anyone know if any new projects are using Tcl? Surprised they went with this

Some people like Tcl and use it, some people don't. The Tcl Wiki sees a regular stream of updates - https://wiki.tcl-lang.org/recent . Personally I'm working on a Usenet/Web gateway which does web serving, NNTP, caching in Redis, user db in sqlite, all implemented in Tcl - https://cmacleod.me.uk/ng .

Re: Tcl 9.0

#160

Earlier quoted context omitted.

I understand, but with how much of a change to the language? Such a change would take an enormous amount of time to make it into the ANSI/ISO SQL standard, and what database would start to implement it first, and which would hold out as long as possible? I don't disagree that it's impossible, but how do you get the syntax standardized at this point? Do you get various dialects, or an agreement between vendors? Look h…

The venn diagram of query support between SQL vendors is much closer to a flower than you think. Just implement it for one and if it works, the others will add it

I have upvoted you for each comment you've made, but I feel like it's not that simple. Even just getting a single vendor to implement it is a huge undertaking. I know that you and I see the value in it, but I don't feel like we're the first to see that. There's a reason behind not implementing this feature, and it's the complexity that lies behind such a feature, like most things. This seems like one of those recursive and interactive features that don't fit into SQL. Does it present the rows that will be updated or deleted, and then ask if you wish to perform the operation? That doesn't work like anything SQL based, and I feel that's why we don't have it. I appreciate the back and forth on this, and am curious as to how you think it should be handled, if there's a way to fit in the way SQL works.
Post reply on HN