You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi,

    Thanks! This looks really interesting. I love the underlining and code completion.

    Chrome does seem to have some issues with CPU load for Serial ports (but only when connected). Even if this can't be sorted, the Web IDE could be modified to connect, write code, then disconnect, all in one go.

    The Web IDE already uses CodeMirror - rather than making your own Web IDE so that we have two competing ones, do you think you might be able to improve the existing one? https://github.com/espruino/EspruinoWebI­DE

    I think it could be modified quite easily so that it would work inside a normal web browser too (without needing to be a Chrome Web App).

    • console.log takes logs one parameter only: This should be fixed in 'nightly' builds: https://espruino-nightly.noda.se/
    • arguments keyword is not supported: again, fixed already :)
    • lint finds a lot of minor problems like missing ";": Finding problems where? in the 'code' folder, or elsewhere? The 'code' folder was really just a dumping ground for random bits of JavaScript (mainly for me) so it's very likely there are huge issues in it
    • binary format is often unknown in the big world of javascript: Yes - this was added because it's just really handy for embedded software. I wonder if jslint could be modified to accept it as valid?
    • minify my snippet for stepper with SIMPLE_OPTGIMIZATION does not work on Espruino. Syntax looks very strange to me, but all browsers took it. Just looked at this and there are at least two issues that I have filed bugs for
    • example for stepper does not work with Microstepping, I had to use a different port. Espruino gave helpful error message. Somewhere in the background Espruino seems to have helpful information about ports. Yes, it knows what pins can do what. If you look at scripts/build_board_docs.py (which builds http://www.espruino.com/ReferenceSTM32F4­DISCOVERY) you can get an idea of the data that is available. You could even add print(json.dumps(pins)) to dump everything to JSON

    Potentially I could dump that information to JSON files on the Espruino site. Note that for code competion/documentation there is already: http://www.espruino.com/js/keywords.js

    I notice you link to the files on EspruinoDocs. Did you know that these are used to generate pages on the Espruino site? For instance https://github.com/espruino/EspruinoDocs­/blob/master/devices/Stepper%20Motors.md­ -> http://www.espruino.com/Stepper+Motors

    As well as build_board_docs.py, there's also build_docs.py which builds the whole Reference document up. This could export to JSON quite easily as well - and I wonder if the code completion could be extended with all the built-in functionality.

About

Avatar for Gordon @Gordon started