-
• #2
Tab complete now works for Pins
Cooool! (1)
STM32: Fix occasional RTC jumps (wrong month when setting RTC)
Cooool! (2)
getting closer and closer to release 2.0 !!:-)
-
• #3
...greatly appreciated! Espruino is always moving forward!
-
• #4
Expansion - seeed's Wio Tracker - LTE CAT1... the references of Espruino on their site though are practically absent... I noticed that @opichals has contributed... I hope that the expansion is not just a distraction on multiple levels...
-
• #5
About items in this release:
Avoid printing interpreter error messages during execution, and report to console on idle when if errors were flagged
I understand why, but it makes problem determination a bit more difficult, because sequence between user logging and system logging falls apart; does it?
Stop
require
dumping filesystem errors as well as 'module not found'What is the notice now?
Fix length calculation for types arrays with an offset
...I assume typed arrays...
Stop
require
creating an undefined Module entry in the modules list if no module exists...great... this threw me some curve balls in the past (now gona-go fix the fix in my code), but the workaround was not that bad... What I'm looking for in this area is an option in
require
to remove the module from theModules
cache when on (first and only) require invocation. I have situations where after 'consummation' of modules there is no value anymore to keep it in theModules
cache.Modules
cache is only used to move the code onto the board and survive the first stretch untilsave()
.I understand why hiding makes things more fluent... but at the same time also more fluid..., such as:
Don't warn the user when we had to run a GC pass during execution
How is this information now passed on to monitoring applications? Is there an option to put watches on such events / flags? I'm thinking also about
Added Error flag to show if a UART overflow has occurred
It is helpful to get this information. Option of adding
setWatch()
-like constructs would be of great help... -
• #6
To be fair, the same as with Ruuvitag, Seeed are actually paying me a monthly fee to keep their board in the repo and produce builds for them. It's not a lot, but it covers my time making sure the builds always stay working - and is less than it'd cost them to pay an engineer to do the same.
There are only two companies doing it at the moment, but it's a big win for everyone. People get up to date builds for their boards, and we don't end up with what happened with RedBear where they came up with a firmware for the KickStarter and then never made any new builds.
We'll see - if more people do it, it could really help to increase Espruino's reach in a more sustainable way :)
Realistically I think Seeed will update their documentation soon, but if they choose not to mention Espruino much on their site it's really only them that loses out :)
-
• #7
@Gordon, thanks for this clarifying - transparent - post. In deed, I notice more an more makers exploring Espruino from all kinds of corners, because moving up for coding in a much more application oriented language/IDE/context increases fun. Most projects aren't anyway of the the sort where timing / bit-banging does decide over life and dead. And even if a project includes such things for some areas, Espruino does handle it under the cover... I need only to mention the hardware/software event queue...
-
• #8
Avoid printing interpreter error messages
I understand why, but it makes problem determination a bit more difficult
The errors that get reported are those from
E.getErrorFlags()
- generally they don't have much to do with the code that's running... For instance the 'out of memory' error is probably because something's being appended to an array - but it will rarely happen where the append itself is (more likely it'll be some other area of completely useless code).If it is an issue, you can still track it down by adding
E.getErrorFlags()
in your code, or even calling it from the debugger.require
... What is the notice now?It's the same error as before. It just doesn't also tell you that there was a filesystem error (which is a bit of a red herring if you have no SD card!).
I have situations where after 'consummation' of modules there is no value anymore to keep it in the Modules cache.
Just do
Modules.removeAllCached
orModules.removeCached
once you haverequire
d what you need?However in many cases that may not save you much memory at all, since in JS a function has to have access to the scope it was defined in - so if you've kept any function at all, it'll stop that whole module from being freed.
Don't warn the user when we had to run a GC pass during execution... How is this information now passed on to monitoring applications?
Check out the
E.getErrorFlags
docs: http://www.espruino.com/Reference#l_E_getErrorFlagsYou get
'LOW_MEMORY'
- it's just that it isn't reported to the user, as in nearly all cases it doesn't matter.It is helpful to get this information. Option of adding setWatch()-like constructs would be of great help...
Potentially there could be an
E.on
event fired when the error state changes? I just wonder whether anyone would use it... You're the first person to ever request something like that as far as I know. -
• #9
may not save you much memory at all (with removing a module from
Modules
cacheIn my case it was a lot of human readable data and thus quite verbose that gets binary-ized and stored in vars on execution of
require()
and beforesave()
- transformation from source data into runtime data - and the source is not needed anymore, nor the transformation function (and with the removal from theModules
cache I would expect the garbage collect collecting all, because nothing in runtime references anymore anything of this data in source format and it's related transformation function code.You're the first person to ever request something like that as far as I know.
In the spirit of Espruio's event driven-ness, I'm surprised... I would like to have something like that... because I do not want to put try/catches around the code or ask for error flag after execution/call of code that could set any of these flags, but it would be nice to be able to hold on / get notice of the even. It is good for monitoring that status / health of an app.
E.on(...,
is most likely the right place to hook in, because it is Espruino specific but not a hw pin / signal thing. -
• #10
In my case it was a lot of human readable data and thus quite verbose
It is automatically executed when you run
Modules.addCached
- so your original verbose text version will no longer exist in memory. I'd checkprocess.memory().usage
and make sure you're actually freeing yourself a lot of memory and not just making your life difficult:This is done on a linux-based Espruino so the memory usages might be different, but you get the idea.
>Modules.addCached("foo","/* lots and lots of text here */exports.hello = function() {};") =undefined >process.memory().usage =32 >foo = require("foo") ={ "hello": function () {} } >process.memory().usage =33 >Modules.removeAllCached() =undefined >process.memory().usage =32
Removing the module from the cache saves just one memory block - the one with the module's name in.
-
• #11
I hear what you are saying... Perception is not always 'Reception' - last but not least because you made Espruino much more memory efficient. - I'll go back and provide feedback comes time to touch on that subject again.
Espruino 1v94 has just been released! It features a whole bunch of changes that should improve speed and reliability, on all boards:
Improvements
E.enableWatchdog
E.on('init',...)
now executed beforeonInit
(allowing modules to init before they can be called by the user)require
dumping filesystem errors as well as 'module not found'process.memory()
now reports time taken for GC and vars GC'dreset
.reset(true)
will now cause all Flash memory to be cleared as well.Fixes
require
creating an undefined Module entry in the modules list if no module existsFor a full list of changes with their bug numbers, check out https://github.com/espruino/Espruino/blob/RELEASE_1V94/ChangeLog