Vote for Espruino features! #155
Replies: 26 comments
-
Posted at 2018-02-19 by PaddeK I miss destructuring and rest + spread in the list. Or are they implemented already and i missed it? Thanks for giving the community this much influence it is really appreciated! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-02-20 by @gfwilliams Just added to the list - they're not in there at the moment :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-02-20 by PaddeK Great thanks! I am so exited about this.. i am used to ES6 and it allows for so much cleaner and shorter code :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-11 by jugglingcats Just for info I am using Typescript (target: es5) along with webpack to transpile and minify code before sending to Espruino, and this gives me most of the features I'm used to. Obviously doesn't work for features that the Typescript folks haven't done es5 polyfills for... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-13 by user86418 ESP-NOW for esp8266 and esp32. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-14 by @gfwilliams The GitHub link is for more general JavaScript language features. ESP32 specific additions are basically not going to happen unless the community is going to do them (they've done a good job so far!). Maybe you could do add the functionality yourself or talk to Espressif and ask them if they would add support to Espruino. I tried to talk to Espressif at embedded world - maybe I talked to the wrong people, but they honestly couldn't care less about Espruino - which obviously doesn't motivate me to spend much time supporting their products :( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-14 by Ollie
Shortsighted of them Gordon. They are missing a trick. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-14 by @yerpj
How did you convice STMicro to support Espruino? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-16 by @gfwilliams
I've been talking to ST for a long time - probably 4 years now, and they even originally supported the first batch of Picos with free chips. There are some people there that really like the idea of it, but we started talking when I didn't have a clear 'support package' to offer and we never managed to come to any kind of agreement that would have worked out. However having this £150/month option for supporting a board is cheap enough and limited enough in scope that it can be justified pretty easily, and it coincides with them launching a discovery kit for cellular access (http://www.espruino.com/STM32L496GDISCOVERY will be filled in with more info as time goes on) - where offering an option to use JavaScript for talking to various IoT services makes a lot of sense. Let's just hope they get a lot of good feedback and want to roll it out across more of their discovery/nucleo boards :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-09 by @joakim These would be nice to have: Although I manage just fine without. I think Espruino's ES6 support is actually pretty good :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-14 by @joakim Actually, Arguments for adding Shouldn't be too hard to implement, should it? :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-15 by @gfwilliams
Here you go https://github.com/espruino/Espruino :) Would it not be possible to write |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-16 by PaddeK There should be polyfills for them.. but i guess they are always not optimal memory and/or speed wise |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-16 by opichals @gordon If considered then I think it would require native support to match the spec behavior Proper |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-17 by @gfwilliams Yes - however actually that's what Espruino does internally for maps anyway (an If you're wondering it's on the issue tracker as something to look at - obviously it's more of an issue the more RAM you have available :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-18 by PaddeK I guess you are right @gordon in terms of performance impact. But RAM is still an issue i guess because its very precious :) I have a sweet little example for the Map vs. Object point @opichals made before.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-18 by @gfwilliams
Honestly, I'm not finding it that easy to see what's going on there :) So you've got promises as map keys? Here's a bodged up
It's actually pretty quick because it uses I've added it to the ES6 wishlist linked above, but looking at the API I wonder if it makes much sense without Iterator support? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-18 by Wilberforce
Man I'm struggling to see what's going on here! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-18 by PaddeK Well sorry.. its a quick hack. Its a function to run promise chains in sequence with optional mapper functions for the resolves. And the resulting resolve returns the changed map (key: original promise, value: resolve result of that promise) so you can reference results by promises you did feed the function. I guess it doesnt help that code with 120 chars per line (pretty common standard) is getting wrapped in posts here. --- Little warning --- |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-22 by @joakim
Now I regret saying that :) It came off wrong, sorry if it sounded like writing features for Espruino is easy! I'm sure it would take many hours to implement this, and I know you're not getting paid by the hour to work on Espruino. Instead I should thank you for making and continuously improving Espruino for free, and for providing such great support! I looked around for JS polyfills for https://github.com/WebReflection/es6-collections As far as I can tell, it actually does roughly what your bodged up implementation does :) I tested it on a Pico (had to move the exported functions to the bottom) and it seems to work fine, except for two issues:
https://gist.github.com/joakim/e70a8c1bb82b3cce32092cccfb99701d Despite those issues, I'll give it a try on a project I'm working on later and see how it goes. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-22 by @gfwilliams
No, not at all - I was only joking :) That's great news about the Polyfill.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-22 by @allObjects @gordon, a non-pressing question about line 14 I'm sure it is much more light weight than using the Promise machinery to get to the result... since in the code I see no asynchronous needs... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-22 by @gfwilliams How does The map code will be slower because it's executing more JS, but both will take I'd definitely say use |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-22 by @joakim
Even still, I felt like an ungrateful kid begging for icecream after having been served a delicious cake :) I actually have checked whether |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-22 by PaddeK Here is a semi complete map poly of a older project of mine.
Amazingly close to what @gordon already had :D |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-25 by @gfwilliams
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-02-19 by @gfwilliams
I've opened an issue on GitHub where you can vote on ES6 features that you'd like me to implement inside Espruino: espruino/Espruino#1302
If you're interested, please use the reaction icon just below to each post you're interested in and I'll see what I can do!
Beta Was this translation helpful? Give feedback.
All reactions