Live data from Hacker News

Tcl 9.0

tcl-lang.org

161–170 of 247 posts

Re: Tcl 9.0

#161

Earlier quoted context omitted.

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 recursi…

If the expectation is not met then it rolls back and fails. I implemented a slipshod version of it years ago for a previous employer (it got the job done with a lousier syntax)

Here's a list of 1,000 postgres extensions, it's not a big deal: https://gist.github.com/joelonsql/e5aa27f8cc9bd22b8999b7de8a...

Things are way more modular than they used to be.

I can probably do it again and just try to get attention for it.

Re: Tcl 9.0

#162

Earlier quoted context omitted.

Can you explain what zip filesystem is?

A handler for treating .zip (and .jar and .tar ...) files as if they were a volume mounted at /home/user/foo.zip - e.g. https://github.com/openjdk/jdk/blob/jdk-21-ga/src/java.base/... It may be easier to reason about when thinking of the way $(mount -o loop) works with .iso files -- a file that is a container for other files that one can mount as if it were a filesystem I was expecting pathlib in Python https://docs.…

they should do the same but for git repositories too

Re: Tcl 9.0

#163

Language snobs and 1990s OO snobs really love to hate on tcl - yeah everything is a string or a command, and the OO extensions were kind of kludgy - but there's a design ethos to the ecosystem that is really special. Ditch tkinter, which is basically writing python to write tcl, and try doing a GUI in straight tcl/tk. Try the sqlite interface. Write a modest C extension or wrap a library. So much of it just works.

It made our startup possible, and the experience and learnings we got out of it, were in the genesis of OutSystems.

One of those learnings, was that I never wanted to again use a dynamic language without any kind of JIT compiler for full blown web servers.

The language is great, rewriting Tcl libraries into C on regular basis due to performance issues not so much.

Re: Tcl 9.0

#164
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

Back in the late 90's we used it on our startup, several of companies at the time were trying the luck on Tcl based application servers, AOLServer being the most well known.

There was Vignette, and we at Intervento had our Safelayer product, loosely based on AOLServer.

Apache and IIS plugins for hosting Tcl interpreter, running on Aix, HP-UX, Solaris, Red-Hat Linux, Windows 2000/NT, with support for Oracle, Informix, DB2, Sybase SQL Server, Microsoft SQL Server, Access (only for test purposes).

Development environment was based on Emacs, eventually there was one written in Visual Basic specifically for the product, with project templates and other kinds of goodies.

However we eventually hit the limits of using Tcl, and having to rewrite parts of the platform in C.

As it was, being a gold MSFT partner gave us access to .NET before it was announced to the world, and a plan to rewrite our product into C# took place.

With the learnings of these experiences, and customisations done at client sites, the founders eventually moved on and created one of the best products for no code development still going strong nowadays, OutSystems.

Never used Tcl again since those days.

Re: Tcl 9.0

#165

Earlier quoted context omitted.

One example from the document: > Consider the naive attempt to clean out the /tmp directory. > cd /tmp > foreach f [glob *] {file delete -force $f} > A file ~ or ~user maliciously placed in /tmp will have rather unfortunate consequences.

I once created a file named *. Sweats were sweated that day.

I've heard that one of the Unix founding fathers had a directory with 125 files that all had single-byte names: one for each ASCII symbol except slash, dot and null. He would then test any new utility against this directory and chew the careless programmer out if it couldn't correctly handle every one of these names.

Re: Tcl 9.0

#166

Earlier quoted context omitted.

> most things you’d need Say you wanted to write a CAD app like https://www.onshape.com . There’s no way you could do it Tcl/Tk, is there?

Most of what I'd call the UI - all the toolbars and pseudo-floating-windows - is basic bread-and-butter Tk stuff. The 3D context and CAD kernel would be the tricky bits. There are extensions floating around to work with OpenGL (or whatever), but I don't see doing the heavy CAD-kernel lifting in Tcl - that would likely have to be in C, or whatever. (Just as it presumably is for Onshape.)

You are correct. Having written such a thing, you do all your basic UI in Tcl/Tk and have a custom widget doing all OpenGL/whatever rendering. The rest of the code treats it as a canvas-like widget.

Re: Tcl 9.0

#167
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

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…

This is a great list.

> * Safe interpreters let you do very fun things like config files in Tcl with limited access to the machine and master interpreter.

I keep looking for similar functionality in Python (the scripting language of choice for many, nowadays) but I am always disappointed.

Re: Tcl 9.0

#168
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

It has expect[1], a nice tool to automate terminal applications.

Two examples:

- Adding convenience features to the Cisco IOS CLI (e.g., ^D to exit).

- Implementing the back end of a native WPF Windows GUI application that downloads spooled print jobs from a third-party system that only provides remote spooler access through a full-screen interactive terminal application running over ssh. This application also makes use of another nice Tcl feature, its trivially-implemented remote protocol[2].

[1] https://core.tcl-lang.org/expect/index

[2] http://corex.tcl-lang.org/tcllib/doc/tcllib-1-18/embedded/ww...

Post reply on HN