I learnt it for websites too - I wanted to do animations with it...
There is actually Python for Microcontrollers called PyMite (I'm not sure it has the interactive console though).
I just really don't 'get' Python though. I love the huge amount of libraries it has (and I do use it because of that), but I don't understand why it has a completely different syntax to every other modern language.
I learned it for the web, mostly when mucking around with forms.
I had an idea back in 1999 that I could make a search engine that didn't require a search engine. It was for football videos, and the form had a load of SELECT lists that I wanted to filter each other, such that you searched by choosing things: "This team, in that season, against this other team, at that venue, show me the goals and fouls.".
I kinda knew it was possible, but at the time that meant writing my own cross-browser library to figure out the differences between Netscape Navigator and Internet Explorer.
Then I went mad on this new-found knowledge and decided that what the world really needed were IFRAMEs. Except they didn't really exist at the time, and so I used a frameset to hide a 1 pixel high frame in the bottom of the window.
It took a few days to write, and more than a little smashing of my head against the wall as I quickly discovered the quirks between Netscape and Internet Explorer, but to my total shock it worked.
Not only did it work, but it worked well. When the site was eventually launched across 300 football club sites, this one part of the site was heavily promoted and had hundreds of thousands of concurrent users in the first weekend. Because it was all just static files, nothing broke at all.
Ever since the beginning of JS I had never even considered learning it. My world was "real" languages like C and C++ on embedded systems. Why on earth would I be concerned about some stupid, slow, scripting language in a browser?
Until a year or so ago then...
My saviours were: HTML5 with WebGL and the Three.js and IvanK libraries. Data streamed to the browser via Web Sockets. But how to feed those web sockets? Easy write a little HTTP server in Node.js. BINGO JS everywhere up and running in a few weeks learning everything from scratch.
The other big surprise is that we now have server side components rewritten in JS and running under node.js that perform almost as well as their previous C++ incarnations but are a thousand times easier to develop and maintain.
JS on those embedded systems? Yep, I already have communication centric work being done in Node.js out in the field on small ARM boards. All be it a lot less small and cheap than the Espruino.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem