2026/03/24

From Woozle Writes Code
< 2026‎ | 03
Jump to navigation Jump to search
Tuesday, March 24, 2026 (#83)
Monday Tuesday Wednesday posts:prev <this> next

References

  • 08:16 Aha #3: Instead of setting things up so that the I/O loop will exit reliably, I think what might be needed is a callback to an outside function whenever data is received. That way, the detection of "have we got what we were looking for" can be task-specific, which seems likely to be what's needed. It doesn't entirely make sense to expect that there will be some general way of detecting end-of-data when the format of the data can change depending on what is sent, and when there's no general way (that I know of) for an executable to signal "I'm done processing your latest request" in interactive mode.
    • ...and that callback can then update the Stream's state to indicate EoF when/if appropriate.
    • Maybe this is something that fits in with the Updater's mission in life?
  • 14:28 I've created an Engine-specific Updater podling which is constructed with a pointer to the Engine, and calls Engine->CheckStream() when it receives OnIterate().
    • I'm still working out what CheckStream() needs to do when called -- or, more specifically, how best to assess what has been received from the Stream (to which it also has a pointer) so far.
      • Actually, not sure if it's the input Stream; simplicity would suggest we want that so we can tell it when to flag EoF, but it's possible that the updater is looking at the output stream in order to more reliably indicate what has been received. Need to research. Need to de-fog brain.
        • Findings:
          • Schema::ExportToStream() initializes an Updater with the output Stream (data file)
          • Schema::ImportFromStream() initializes an Updater with the input Stream (data file).
          • Client::NewSchemaList() does not currently use an Updater because the operation is too quick to need a visual progress indicator -- so I can give it whichever Stream is most task-appropriate.
  • 17:34 Yay, I've broken everything now.
    • ...meaning the Schema listing, which has to happen before either imports or exports, which is everything I'm currently evaluating or working on.
  • 18:57 Ok, I've un-broken the Schema listings, yay.
  • 20:51 Setting the Stream object's Updater object in one place, but when we get to the loop it's a different Stream object (although the same class). Guhhh.
    • It's times like this when step-through debugging (with variable/expression monitoring in a side-window) would be very useful because I find there are so many moving parts to keep track of that my memory-capacity is quickly overwhelmed.
  • 22:35 I wonder if there's some way I could do a diagram of what is supposed to be connected to what... or if that would just take a week to work out and then step through the relevant code to find out where the disconnect is...