Skip to content
Tcl Source Code History Of Ticket 2314561
Login

History Of Ticket 2314561

Artifacts Associated With Ticket 2314561

  1. Ticket change [7e3f5db0b5] (rid 97375) by dkf on 2008-11-19 10:50:15:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      want to enable the rewriting of tclhttpd's templating system using coroutines, but this in turn requires [subst] to be NRE-enabled
      
    4. foundin initialized to: "obsolete: 8.6a4"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dkf"
    10. subsystem initialized to: "18. Commands M-Z"
    11. title initialized to: "TODO: NRE-enable [subst]"
    12. type initialized to: "Bug"
  2. Ticket change [4b22dd0d1c] (rid 126646) by dkf on 2008-12-07 02:36:20:

    1. assignee changed to: "dgp"
    2. icomment:
      Argh! Tcl_SubstObj is now rather more complex than it used to be (well, on the surface anyway) so it isn't clear how to restructure it to be NRE enabled. Hence it's a job for either the master of parsing or the master of NRE...
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. priority changed to: "7 High"
    6. username: "dkf"
  3. Ticket change [b1c55fdf72] (rid 98213) by dkf on 2009-01-03 04:03:29:

    1. icomment:
      At a higher level, what I want is to be able to [yield] inside the processing of a command-substitution of a [subst] (assuming the outer code is in a coroutine). That would allow templates to suspend their processing to allow other events to be processed without having problems with reentrancy (classically, tclhttpd templates just use [vwait]!).
      
      One way to tackle this would be to take the parsed token sequence and to issue bytecode for it, just as if it was a "quote"-delimited word. Another would be to make some kind of NRE-enabled "accumulate the substitutions for these tokens" function (no, I don't know which).
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [c0b77a4a58] (rid 102465) by dgp on 2009-01-05 03:48:51:

    1. icomment:
      
      ok, I've been confused.
      
      NRE-enabling [subst] seems feasible.
      
      Doing so while having it continue
      to call Tcl_SubstObj() is, of course,
      impossible.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [e9afcb8a32] (rid 104853) by dkf on 2009-01-05 04:40:20:

    1. icomment:
      I've found that with many other things you have to add a parallel internal NRE-enabled version of a function. Doing so for Tcl_SubstObj is not surprising.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [745d651acc] (rid 105193) by dkf on 2009-07-14 17:25:59:

    1. icomment:
      Colin's been hitting this; upping the prio...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [1155874d90] (rid 95117) by dkf on 2009-07-14 17:26:00:

    1. priority changed to: "8"
  8. Ticket change [8e945092b6] (rid 120134) by dkf on 2009-07-14 17:27:17:

    1. icomment:
      Also noting that I'm specifically talking about doing [subst], and not Tcl_SubstObj
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [c1d5cbd21e] (rid 111388) by dkf on 2009-07-18 20:58:55:

    1. icomment:
      A bit deeper explanation about why this matters.
      
      Tclhttpd is used a fair bit to handle custom application-on-the-www scenarios, and the most common way of using it that way is to write the pages in TMML, which involves the use of [subst]. Something that's often desired is a way to stop the processing of a page for a while until some other processing (e.g., running a subprocess) is finished; right now, with tclhttpd they're doing this by using [vwait] recursively (inside another procedure call). If we could [yield] during [subst]-processing, then it would be possible to change the template processing library so that tclhttpd/tmml doesn't have this nasty recursive-vwait case without having to rewrite lots of existing pages that are already in production.
      
      I've thought a bit about what it would take to make [subst] more efficient in the past. Possibilities included directly bytecoding it, but almost all substantive (and interesting) cases use a non-constant template. Hence it's probably good enough to convert the template to something with an internal rep that has three sub-components: ordinary string, variable substitution, command substitution (all modulo the options). It would then be possible to just concatenate these bits appropriately (and quickly) to make the result, and doing so in an NRE-aware way would be straight-forward too (only affects command substitutions as var traces aren't NRE-aware).
      
      The parser is sufficiently complex that the conversion to the above-mentioned sequence form is beyond what I can do in a small amount of effort, hence dropping it on your lap, Don. :-)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  10. Ticket change [b3798fbebc] (rid 124868) by andreas_kupries on 2009-07-20 22:47:41:

    1. icomment:
      This does sound a bit like the template could be compiled to bytecode. Just a sequence of
        push literal
        push variable value
        run a command
      and a 'concat' of all the pieces. Either a big one at the end, or incrementally, i.e. interspersed with all the push ops.
      
      I.e. instead of bytecoding [subst] in itself have the subst implementation use the compiler to process the template (if needed), then just run it.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  11. Ticket change [950f41d21e] (rid 106096) by dgp on 2009-07-20 22:52:50:

    1. icomment:
      
      Yes, that's along the lines of what I am thinking.
      
      That's why I'm working on 2823282 first which
      has a similar nature.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Ticket change [96335b0f82] (rid 106285) by dgp on 2009-08-12 04:35:19:

    1. icomment:
      
      
      File Added - 338799: 2314561.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [2193f831ea] (rid 130610) by dgp on 2009-08-12 04:37:26:

    1. icomment:
      
      Attached patch implements a bytecode compiler
      for [subst], which solves this problem for the
      cases covered by it since bytecode execution
      is already NR-enabled.  This is a partial solution.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [a00a38b038] (rid 96736) by andreas_kupries on 2009-08-12 05:12:17:

    1. icomment:
      
      
      File Added - 338805: notes_2314561.patch.txt
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  15. Ticket change [d2c133ee0f] (rid 113588) by andreas_kupries on 2009-08-12 05:12:47:

    1. icomment:
      Attached some notes on the patch.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  16. Ticket change [df14fb87a8] (rid 114963) by dgp on 2009-08-12 20:50:37:

    1. icomment:
      
      Thanks for the tips on TIP 280 matters. Will
      look into them.
      
      If the additional instructions are a large problem,
      [subst] bytecode can be achieved using the existing
      INST_JUMP_TABLE instruction, I believe, but
      not nearly as well.  I also expect the new
      INST_RETURN_CODE_BRANCH instruction
      will be useful creating bytecode for the [try]
      command.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [f336144a1a] (rid 129664) by dgp on 2009-09-02 01:15:32:

    1. icomment:
      
      
      File Deleted - 338799: 
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  18. Ticket change [949fb8047e] (rid 106026) by dgp on 2009-09-02 01:16:12:

    1. icomment:
      
      
      File Added - 341382: 2314561.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  19. Ticket change [13cd8844ae] (rid 124281) by dgp on 2009-09-02 01:16:29:

    1. icomment:
      
      rebased patch to the HEAD.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  20. Ticket change [862aa3c183] (rid 131454) by dgp on 2009-09-05 00:21:09:

    1. icomment:
      
      
      File Deleted - 341382: 
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  21. Ticket change [9118ba4b26] (rid 120574) by dgp on 2009-09-05 00:21:10:

    1. icomment:
      
      
      File Deleted - 338805: 
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  22. Add attachment "2314561.patch" [6280fd7722] (rid 92412) by dgp on 2009-09-05 00:21:39.

  23. Ticket change [7dab47aadb] (rid 97281) by dgp on 2009-09-05 00:21:39:

    1. icomment:
      
      
      File Added - 341785: 2314561.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  24. Ticket change [dd950dfb08] (rid 114695) by dgp on 2009-09-05 00:22:07:

    1. icomment:
      
      New patch for HEAD includes tests and fixes
      for all the TIP 280 issues I could find.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  25. Ticket change [33f87d72ea] (rid 106685) by dgp on 2009-09-05 00:33:28:

    1. icomment:
      
      Patch committed.  Ticket still open since the patch
      is only a partial solution.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  26. Ticket change [a805c720db] (rid 98905) by dgp on 2009-09-05 06:19:06:

    1. icomment:
      
      committed a few additional fixes to the HEAD.
      Thanks to aku for the rapid testing.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  27. Ticket change [68828b53c9] (rid 103077) by dkf on 2009-09-07 16:44:58:

    1. icomment:
      Appears to work in informal testing; added a (very simple) test to coroutine.test but leaving open for more tests. Dropping prio, as we appear now to have enough to support the key templating use-case.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "6"
    5. username: "dkf"
  28. Ticket change [ea0f513804] (rid 104910) by dgp on 2009-09-07 21:22:13:

    1. icomment:
      
      Still in the pipeline is an NR-enabled version
      of Tcl_SubstObj().  Will TIP when ready.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  29. Ticket change [688c087d38] (rid 103086) by dgp on 2009-09-12 03:13:32:

    1. icomment:
      
      Fixed in the HEAD.
      
      There are still internals cleanup,
      and new interface exposure tasks
      to do, but in terms of the bug reported,
      it is now fixed.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  30. Ticket change [73b2ba74d8] (rid 105083) by dgp on 2009-09-12 03:13:36:

    1. closedate changed to: "2009-09-11T20:13:36"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"