witheve / Eve

Better tools for thought
http://witheve.com
Apache License 2.0
7.16k stars 257 forks source link

Quickstart tutorial problems (possible websocket error) #876

Closed ianchanning closed 7 years ago

ianchanning commented 7 years ago

I've done perhaps two things with the Quickstart tutorial and they both seem to fail.

I'm using:

I went to this URL: http://play.witheve.com/#/examples/quickstart.eve

Initially the page displays the 'Hello World' text.

2017-08-05 11_56_12-store

  1. If I then click 'Run', the 'Hello World' text disappears, but I can get it to reappear with 'Reset' - this seems counterintuitive to me

2017-08-05 11_56_30-store

  1. (I now realise this is a duplicate of #871) If I then untick and retick the first block of code I then can't get the 'Hello World' text to appear by clicking either the 'Reset' or the 'Run' buttons.

2017-08-05 11_57_17-eve

I'm getting a websocket console error, but the code runs in spite of this, and clicking 'Run' doesn't cause any further errors:

2017-08-05 12_03_50-

timcombs commented 7 years ago

see: https://github.com/witheve/Eve/issues/871

ianchanning commented 7 years ago

@timcombs Thanks for your reply - this indeed explains part 2, but it didn't explain part 1:

If I then click 'Run', the 'Hello World' text disappears, but I can get it to reappear with 'Reset' - this seems counterintuitive to me

joshuafcole commented 7 years ago

Hey @ianchanning, #871, is indeed the root cause of both issues. Under the hood, enabling/disabling blocks adds a tag to the text of the document, which is then reparsed from scratch server side and recompiled. Unfortunately, this isn't marking the document dirty and optimizations that were made the month before last first check the document's dirty status to determine if a recompilation is needed. This is also gating the reset button.

We've elected to focus on getting the latest version of Eve (which has the same syntax and semantics, so no major changes) out rather than fixing the old one for a couple reasons:

1) The new version is several orders of magnitude faster than the old version in the worst case, more in better cases. 2) The editor for the old version was built expecting a complete separation of the editor and parser/compiler. This causes serious slowdowns on large documents and makes certain features we'd love to provide very difficult. Fixing that is tantamount to a rewrite of the editor, but given the performance of the latest Eve version if we're going to rewrite it we'd like to do so bootstrapped with Eve.

We'll be releasing more news about the latest version on the blog shortly. In the interim, I'd recommend using the editor primarily for debugging via the inspector and instead using the text editor of your choice, which won't have these issues.

ianchanning commented 7 years ago

@joshuafcole ok, thanks for letting me know. I'll close this then as it's purely a duplicate.

ianchanning commented 7 years ago

@joshuafcole Plus very excited to hear the progress :)