-
Notifications
You must be signed in to change notification settings - Fork 219
Client side processing #35
Comments
woo! I did it and it works beautifully, zero delay. edit: see the edited code here https://github.com/Iftahh/regexper/ |
Could be somewhat related to #37 ?? |
Thank you for this patch (and for introducing me to canopy). After spending far too long deciding if I wanted to do the parsing client-side or do the rendering server-side (to move all the work to one side or another), I ultimately decided to move it all client-side...and to rewrite the whole project in the process. So, unfortunately I'm not merging this change, but it did point me in the direction I ended up going with the project. The new codebase is in http://github.com/javallone/regexper-static |
I'm glad you chose the client side - I think it provides much better user experience. Instant feedback makes a tool feel so much better. You can even show the diagram on the fly as the text is entered - no need for pressing "submit" or even hitting "enter". Did you check out the other modification I made? Hovering over the diagram highlights the relevant text in the regex - I think it can be useful for the users of this tool (ie. learners of regexps). |
Looking at the code it seems to me the bulk of the work is done by the the TreeTop - the ruby PEG parser.
There are a few PEG parsers for javascript, so it may be possible to do the entire processing in the client side (javascript) entirely.
This will allow instant feedback (ie. render every keyup event), and also some super cool plugin for IDEs which support javascript plugins.
The text was updated successfully, but these errors were encountered: