Re: A subst-antial question




Neil Madden wrote:
An alternative, in Tcl 8.5 (or 8.4 with the dict package), would be to
not perform the substitutions locally, but instead to snapshot the
environment of the script as a dict, and then send that along with the
code (as a kind of closure) to be evaluated remotely using [dict with]:

Thanks, Neil. [dict] is something I'm not very familiar with, and now
I have motivation to look into it.

.



Relevant Pages

  • Re: is cool
    ... if {[dict exists $stuff yadda binga]} { ... But even with my emulation script, I still keep falling back to a ... and the basic command was simply a wrapper that "listified" ... Having all the keys and data's in separate lists makes ...
    (comp.lang.tcl)
  • Re: A subst-antial question
    ... Suppose I have a script: ... I know I have to substitute variables locally before I can set them ... stuff with $foo in it ... An alternative, in Tcl 8.5 (or 8.4 with the dict package), would be to not perform the substitutions locally, but instead to snapshot the environment of the script as a dict, and then send that along with the code to be evaluated remotely using: ...
    (comp.lang.tcl)
  • Re: Piping within for-loops
    ... >>I want to write a script, that selects words from a wordlist, ... > it looks to me like your script will only loop once anyway. ... then cat "$DICT" ...
    (comp.unix.shell)
  • Floats as keys in dict
    ... I am making a script to optimiza by dynamic programming. ... store the nodes I have in play as keys in a dict. ... the dict keys are then floats and I have to round the values ...
    (comp.lang.python)
  • Re: How to use the Google SOAP API
    ... all but the very last script. ... missing value to go with key ... You'll get that error if you $item is not a well-formed dict. ...
    (comp.lang.tcl)