Josh,
Thanks much for your valuable feedback. See below.
On Tue, Jun 6, 2017 at 2:41 PM, Josh Cole <
joshu...@gmail.com> wrote:
[...]
> One thing I'd
> recommend is to guide users of Eve to tiddlywiki's documentation and users
> of tiddlywiki to Eve's documentation to help them get started with whichever
> aspect might be new to them.
Good idea.
[...]
> Any element with no parent (or that is already a child of the widget root)
> is parented to the widget root.
> ```search
> widget-root = [#tw-widget-root]
> elem = [#html/element]
> not(
> parent = [#html/element children: elem]
> parent != widget-root
> )
>
> bind
> widget-root.children += elem
> ```
Thanks. This gave me a head start and it worked for a very simple
top-level div. But if I have a structure like div1->div2, then div2
renders both as tw-widget-root->div1->div2 and tw-widget-root->div2.
IOW, any children of a div are somehow also getting assigned as
children of tw-widget-root. I'm still trying to think it through, but
so far I don't see how that is happening as the 'not' logic above
looks sound to me.
I also noticed the block you provided was adding [#tw-widget-root] as
a child of itself. I added a 'elem != widget-root' filter to fix that
issue.
[...]
>> Ability to pass in list of watchers to attach to the Eve program
>
> If there's anything on our side we can do to facilitate this, we'd be happy
> to hear your thoughts. As is, you should be able to repeatedly call
> `program.attach(name)` where name is passed in from the user.
Yes, I had planned to call attach for each watcher given by the user.
Currently I'm only importing a bare minimum of the watchers and will
also have to add the rest to the list of imports.
[...]
>> Error handling
>
> On the Eve side at least, this is next on my todo list. There was some
> trickiness here imposed by supporting the alternate JS DSL which hindered
> our error reporting. There's no reason why that needs to impact our syntax
> version though. If you run into any specific and frustrating errors, please
> don't hesitate to create an issue on GitHub with the block in question.
This one I haven't given much thought to. I just know if someone tries
to develop an eve program using tiddlywiki it will be difficult
without some nice error reporting.
>> Ability to save Eve state
>
> The current plan is to release a proper persistence story in version 0.4,
> though we may adjust that depending on how the chips fall. In the interim,
> there's the quick and dirty solution of exporting the essential state
> yourself using watchers, as Corey demonstrated here:
>
https://groups.google.com/d/msg/eve-talk/OaYaeJKJUiU/XrRn3HjfEwAJ .
> Unfortunately, this can't be completely transparent without the full
> persistence story. The program author will need to indicate to you in some
> way that a particular record should get persisted. That said, it doesn't
> have to be much more frustrating than just sticking a `#persisted` tag on
> the necessary records to pickle/unpickle your state.
Yes, I started playing with that approach of marking records to be
persisted. Actually I'm starting with the simpler case of trying to
explicitly persist the [#counter] structure from counter.eve. Once I
have that working, I will try generalizing it so it can with with
anything tagged with #persisted.
Brian