You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • Hi,
    I'm software professional with very big experience. I know when my code is crap and I know how to learn new stuff. This is why I may appear stubborn, but I really know best how to approach new stuff.

    Uploading my messy experimental code without explaining my workflow would've wasted other ppl's time. You and the community missed nothing, I guarantee you that.

    I'm sorry but I don't really understand what's your request to me. As for my question re stability — It's fair question, in some respects the esp32 port is not complete so I had to know what to expect. I am also very suspicious of the heltec board.

    As a good citizen I always like to help when I can. This is why after asking a question I do my best to follow up, as you can see above.

    So, one more follow-up: the biggest challenge and source of grief for me was the combination of how save() works and how the web ide works. Let me elaborate:

    • Clojure is my favorite environment and espruino's REPL is the closest I've ever seen to clojure's REPL. As usual similarity can hide very subtle traps and this happened here
    • espruiono's save() and boot process is unlike anything I've ever used. It took me one evening of experimenting to finally grasp how the different pieces fit together. The "saving code..." page has it very well laid out, but I needed some practice to really grok it. This page must be front & central, it's extremely important information. The difference when code is evaluated and when global state is restored is key
    • I quickly ditched the web ide to use my emacs + espruino cli. This is, I beleive another trap — the very powerful save & boot capabilities gave me lots of rope to hang myself. Also, using the espruino cli requires you understand what you're doing (which I did not). The web ide has pretty straightforward flow, but "graduating" to espruino cli is deceivingly simple (and wrong in my case)






  • espruiono's save() and boot process is unlike anything I've ever used. It took me one evening of experimenting to finally grasp how the different pieces fit together. The "saving code..." page has it very well laid out, but I needed some practice to really grok it. This page must be front & central, it's extremely important information. The difference when code is evaluated and when global state is restored is key

    There can be different opinions about save(), mine would be - forget that it exists :-)
    It is magic that makes things simple in simple cases but may bite you later in unexpected ways so I'd go with plain boot script setting up everything at boot time with no save()d state at all. See also http://forum.espruino.com/conversations/329685/

  • +1
    Wanted to write something similar, but was too lazy :D

  • Thanks. I've been re-thinking how to structure the code I intend to do (modules included) and am moving in the direction where very little state will be persisted via save(), if any.

About

Avatar for fanoush @fanoush started