You are reading a single comment by @Nickax and its replies. Click here to read the full conversation.
  • ...in deed, it is JS... and that got my excitement going a while ago... and still goes on, even though I just made - at work -a very deep plunge into python - still trying to swim and not to drown (I mean to code and not to err out) ...and there are (micro) pythons similar to espruinos out there... and if power and size is not an issue, raspberry pi is the perfect platform (have to confess - to @Gordon - that I just received my 1st ordered berry... connected it - 3 B+ to display and mouse, and was blown away by it: just works, and a nice Linux is there... had not connected keyboard yet, but still could play a game (reversi). The plan is to use id from now on... as possible Espruino IDE environment and BLE bridge to WiFi / LAN - either with node.js or python... after all, I got that also going on for me...).

    I'm just surprised and frustrated the upload mechanism is so fundamentally flawed.

    That's kind of an interesting comment... As @Gordon points out, RAM is not there to store and forward and do all the things... so this is what I see happening on upload:

    1. IDE switches echo is off with a (console) command - actually a JS function - that Espruino interpreter understands (built-in)
    2. JS expressions are sent (via/through console connection) to the interpreter line by line - expressions can span multiple lines - and as soon as a complete expression is detected, it is executed... after all, it is JS and the receiving end is the interpreter.
    3. This goes on and on until the all is sent from the IDE to the board, the board has worked trough all expressions and actually built the programs object model, so to speak... almost like html DOM.
    4. The IDE then waits for a prompt to come back from the board, upon which it turns echo on again. If that prompt is not coming back in time - controlled by a (generous) timeout, or instead the control some out put comes back and confuses the IDE, then upload sequence (and switching between command and upload mode and back) falls apart... (except you do the save on send as hinted by @Gordon. Regarding the time-flakiness, matter of fact if the band-width is used up (by nose or other communications - as I read in another forum post) there is nothing that can be done to get connections right away and throughput, no matter how fast frequency hopping happens. It's almost like not having enough access points and no ip is received and no connection setup happens... and the intendedly built-in timeouts let as (at least) know about.

    You can see that by using arrow up after an upload: echo on and sent program come 'up'... that's also why after an upload you cannot get easily back to your last console command... @Nickax, keep sharing the pit falls we so glaringly glance over... RTM - Read The Manual, and more timely - WTY - Watch The Youtube can not be skipped to get the best out of any situation...

    No doubt, I can say for me - and @Gordon as well? - that we enjoy your excitement... it is received as rewards... no kidding: it spars to get and do even better than already good.

  • I have an r-pi ... two in fact - and my experience with those has been equally, if not more frustrating - the plethora of languages and versions - and the sea of incompatible out out of date samples made it more or less impossible to work with.

    The elegance and simplicity of Espruino are what drew me to it - JS is NOT my favourite language but a year of writing TypeScript as a day job has softened my hatred slightly. What I can see is that for someone with no prior knowledge it is relatively easy to pick up as it is fairly compact. For someone from an OO background its a more difficult switch.

    I have limited spare time so I make the classic mistake of trying to skip the examples and videos - but I will try and avoid that temptation and get a better understanding of how it all works.

About

Avatar for Nickax @Nickax started