Loading ...
Sorry, an error occurred while loading the content.

16049[Clip] Re: functional, but dysfunctional also onclipboardchange

Expand Messages
  • notetab_is_great
    Feb 3, 2007
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
      >
      >
      > notetab_is_great wrote:
      > >
      > > Below is a revised library that demonstrates up to 6 concurrent
      > > clips running: manually invoke, a few seconds apart, donothing1,
      > > donothing2, donothing3, and donothing4 in that order. Then invoke
      > > bar. Then put something on the clipboard. That is a total of 6
      > > clips running concurrently, and bar succeeds, providing that
      > > OnClipboardChange also succeeds. And watching the status bar long
      > > enough (90 seconds from when you started) will demonstrate that the
      > > other clips were still there, successfully.
      >
      > WordWeb's definition of concurrent.
      > concurrent = Occurring or operating at the same time
      >
      > Although you initialize these 'DoNothing?' clips they are not running
      > concurrently, they are running serially, in tandem, one after another.


      I understand that it is extremely likely that multiple operating
      system threads/CPUs are not used to cause true concurrency. And I
      understand the how multitasking on a single thread of control can be
      done. What I am trying to figure out is where the limits of
      multitasking are in the clip programming language.

      I understand that OnClipboardChange, ^!TimerPlay/^!TimerStart, and
      user invocation are the 3 asynchronous ways of initiating a clip. I
      understand that ^!Delay (and are there other such operations?) can
      suspend an unnested clip in such a manner that other clips can be
      invoked in a manner that appears like multitasking.


      > You can discover that by watching the NoteTab status line. The clips
      > will run 'last in, first out' order.
      >
      > The delays will time out in the last clip then the next most recent
      clip
      > will start timing.


      The delays seem to run concurrently. Check your watch from starting
      donothing1 until it completes, whether or not you invoke other
      donothingX clips in the meantime.


      > I believe if you tried this using language to do any actual work
      NoteTab
      > would 'Error' out. It isn't built for concurrent multi-tasking.


      I appreciate your response, and your experience with NoteTab, that has
      led you to your belief system about clips. I'm trying to get past
      belief systems, though, and understand exactly what capabilities are
      provided. It is documented that recursive clips are not supported.


      > > So it isn't the number of concurrent clips, but apparently
      > > something else, that causes the problems. My best guess so far is
      > > nested clips, but I suppose it could be something else. But why
      > > should nested clips cause more problem than concurrent clips?
      >
      > By 'nested' I suppose you mean clips that are started with a ^!Clip
      > command within the body of the currently running clip. If so, I use
      > nested clips all the time and have no trouble with them.


      Yes, that is what I mean by nested clips. And yes, they seem to work
      fine, when not also dealing with multitasking clips.

      But it seems that ^!Delay in a non-nested clip provides more ability
      to multitask clips than ^!Delay in a nested clip, which seems to block
      the ability to start another multitasking clip.


      > > Surprise! donothing4 won't invoke, it beeps. That is true even if
      > > OnClipboardChange is removed or renamed. So it seems that Delay
      > > only allows other clips to run if the Delay is invoked from an
      > > unrested Clip invocation :( That is a severe limitation on
      > > building modular code.
      >
      > I had no trouble with 'DoNothing4' beeping, it worked exactly like the
      > first 3 clips.


      I think you missed the difference in the two invocation sequences I
      was suggesting. Invoking donothing3 and then donothing4 works.
      Invoking donothing3invoker and then donothing4 beeps.


      > You may possibly be running into a dearth of resources, NoteTab
      requires
      > a lot of ram, some of the commands/functions are more ram intensive
      than
      > others.


      Only if NoteTab artificially limits the available resources. My
      machine is quite capable.


      > I thought I knew what you were striving for at one time, to use
      > 'OnClipBoardChange' and have an independent ^!StatusShow of an
      action to
      > be taken, but, I must admit I have no clue at this point.


      Yes, you did understand my goal. But my sample clips that have been
      posted are extremely limited, compared to my plans. When I discovered
      that nested clips and non-nested clips seem to differ in their ability
      to invoke ^!Delay and allow multitasking clips to be initiated, I
      created a sub-goal of attempting to understand the multitasking
      features of NoteTab in more depth, hopefully to discover if other such
      limits exist, before wasting a lot of time coding things that will not
      work.

      Presently, it appears that code must be structured so that ^!Delay
      operations are in non-nested clips, although nested clips can be
      called before or after the ^!Delay operation. This forces code to be
      designed differently than otherwise.

      Presently, it appears that OnClipboardChange, if it gets invoked at a
      time when all the multitasking clips are in non-nested ^!Delays, can
      successfully use as many nested clips of its own as it desires.

      Left to determine are whether there are other operations that wait for
      user input or timers (^!Delay waits for a timer, and if invoked from a
      nested clip, blocks multitasking clip initiation) that will block or
      otherwise confuse multitasking clips.

      >
      > ºvº SL-2-9
      > 2007.02.03 - 16.40.53
      >
      > Great Truth About Growing Old:
      > "Forget the health food. I need all the preservatives I can get."
      >
      > ¤ hrs ø hsavage@...
      >
    • Show all 19 messages in this topic