Modules - Loading in WebIDE and Testing

Posted on
Page
of 2
Prev
/ 2
  • @mgg1010 cool, I'm looking forward to using your module.

  • @graf

    If you wanted to try it out, I uploaded the files to a previous message - I'd welcome any feedback.

    I'm going to try to push them via Git next... OK, I pushed. I guess Gordon has to process my pull request....

    Martin

  • @mgg1010 Thanks! If it was up to me I would get rid of all the print statements, personally I find them a bit annoying (and cryptic) and it takes up memory too :)

  • They're only there because I've been debugging the module issue :)

  • I require a module in RHS from website. webIDE downloads it. Does it check inside the downloaded text for a new require?

    Yes, it does...

    Does the webIDE have some way to tell the device "this is a module, insert it into your cache". What name does it give it? I mean, if I use require("http://....date.js") is it added to the cache with the full path or just the filename? (Just curious)

    Again, yes - in both cases... You can actually use uparrow on the left-hand side to see what commands the Web IDE has sent over.

    The throttle bug is probably more in the USB implementation on Espruino. Espruino does throttle the USB, but it does so using NACK responses. This works great as flow control doesn't explicitly have to be enabled, but if Espruino NACKs for too long then the PC just throws away the data sent to it.

    I think the issue is that with larger modules, Espruino takes so long to parse the module that the PC has given up sending the next packet by the time it's finished.

  • Gordon - thanks.

    So... is there any solution, short-term or long-term?

    Martin

  • I guess the easiest solution would be to modify the Web IDE so that it asked and then waited for a response after sending each addModule command...

    The best option is probably to implement flow control over USB (and then to turn it on in the Web IDE) - it should be possible but I'll have to do a lot of delving around in the USB libs to see how.

  • OK, but I guess you have plenty of other priorities :)

  • Afraid so - at least for this week... For now, you could just minify the modules when you store them on your server? That would probably work pretty well.

    I've got this on my todo list as well - which would auto-minify modules. That's probably one of the easiest as it's mostly plumbing - everything that's needed is already in the Web IDE.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Modules - Loading in WebIDE and Testing

Posted by Avatar for mgg1010 @mgg1010

Actions