For a while, the WATCH dialect wasn't working in the ReplPad. Fixing it actually turned out to be rather difficult, because ReplPad was changed to use FUNC and LET exclusively (no FUNCTION). So this was really the first complex dialect whose implementation depended fully on virtual LET-binding. Debugging in the browser is significantly harder, so that made it pretty mean.
But now that it's working, I have the headless browser test running the dialect.
It's a fun thing, so why not go ahead and load up the ReplPad and try it?
Interestingly, it loads the watch extension the first time you invoke WATCH.
>> watch x ; (slot 1): ~unset~
This should show ~unset~
in watch slot 1. If you change the value of x
, then you should see the slot update.
>> x: 304
== 304 ; (slot 1): 304
The way the updating works right now is by hooking the console's PRINT-RESULT function. After the result has been printed, it updates the slots. So you won't see the values change during the evaluation, only each time you get a console prompt.
If you want you can ask the watchlist to give you the value stored in a slot, by passing an integer.
>> watch 1
== 304
You can hide the watchlist
>> watch /off
And you can show the watchlist
>> watch /on
If you want to delete a watch, you can use a negative number
>> watch -1
It would be helpful if @rgchris could look over the splitter and see how sane the strategy is. What I would like is a way to make panels generically, so they can work in something like Golden Layouts. I don't want to require something that heavy to run a replpad instance...I'd actually like it to be possible to just kind of load a console on-demand and have it pop up for debugging an app that was using Ren-C as a library. But it would be great to be able to use Golden Layout (or similar).