Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    \$\begingroup\$ Using apply doesn't seem to save anything. Nor can you use tcl::mathop::+ {*}[split $a .] as that's slightly longer. Nor can you shave anything from option names. But supporting IPv6 is pretty trivial to add, and only costs a few bytes of code more (and then a regsub-based approach is just as long). \$\endgroup\$ Commented Mar 30, 2016 at 23:06
  • \$\begingroup\$ ahhh, Tcl / Tcl-DP ... amazing bunch of tools. (in the '90s a professor showed us we could write a network-distributed Excel (with a grid, and including formulas evaluation!) shared among several persons with (iirc) 4 (short) lines for the server and 5 for the clients... \$\endgroup\$ Commented Mar 31, 2016 at 17:22
  • \$\begingroup\$ proc s {c a p} do you really need all that whitespace? \$\endgroup\$ Commented Apr 8, 2016 at 13:41
  • 1
    \$\begingroup\$ @cat yes, it is needed. It is by nature in Tcl. Between s and { it is like a comma for arguments of the proc procedure — For the better or the worse, in Tcl, everything is a string, so even the word proc to indicate a function, is not a keyword, but becomes a function itself. Spaces in c a p are like commas for the arguments of the s procedure. Amazing there's an high level language with only 12 syntax rules; it even led some people to write papers on building processors directly interpreting Tcl! Want more info? Search Scott Thibault Supporting Tcl in Hardware and Tcl on Board. \$\endgroup\$ Commented May 8 at 7:56