You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I've just released Espruino 1v95, with a whole bunch of extra changes:

    Regular Expressions

    They're here - finally! On all official Espruino boards (and many others, if there's enough memory).

    While it's not 100% full support, it's enough for the majority of things, with String.indexOf, String.split, RegExp.exec and crucially String.replace - even with the ability to specify a function as the replacement.

    >"Hello world".replace(/l/g, function(match,idx) { return "[L"+idx+"]"; })
    ="He[L2][L6]o wor[L15]d"

    Fast File IO

    • Added E.setFlags({unsyncFiles:1} which doesn't sync the file to the SD card after each write - it's much faster
    • Filesystem API now uses flat strings (avoiding the 512 byte copy for each call)
    • Increase default internal SD card bitrate to 4MHz (from 100k) - eg the Original Espruino

    Other Additions

    • Added ES6 Object.assign
    • Puck.js gets a bump in variables from 2000 to 2500
    • NRF.setScan automatically decodes service and manufacturer data packets now
    • NRF.findDevices aggregates multiple advertising packets from the same device if they contain different information.
    • Add E.errorFlag event to allow JS to respond to internal errors
    • ESP8266 can now use GPIO16
    • ESP8266 and ESP32 now support UDP with dgram thanks to @opichals awesome work, and official Espruino boards will be able to support it for AT command devices (eg ESP8266/Espruino WiFi) when the libraries are updates
    • The REPL now outputs non-numeric elements in arrays
    • digitalWrite/Read will now call .read on an object if it is passed in. This means you can now use port expanders with most Espruino libraries!
    • Added E.getAddressOffor super low-level work - you can get the actual address of the variable's data in RAM for things like DMA
    • Manufacturer Data can now be specified with setAdvertising in Puck.js (and we have an official Puck.js manufacturer code - 0x0590)
    • You can now overwrite Puck.js's memory protection with E.setFlags so you can write wherever you want
    • E.HSBtoRGB can now output as [R,G,B] for neopixels.


    • nRF5x boards like Puck.js can now run UART reliably at 115200 baud, and will work connected to ESP8266 or GSM/GPRS
    • Exception/error reporting is a bit tidier now
    • We not use the Esc[J VT100 code when cycling through command history (much faster REPL on low bandwidth connections)
    • JSON.stringify for arrays is faster
    • Added support for negating pins in software (eg. buttons/LEDs), for boards like NRF52832DK
    • Bluetooth LE events (specifically promise completions) now use the event queue - removing the dreaded MEMORY_BUSY message


    • Fix a memory leak in tab completion
    • Commands that previously didn't work correctly with sparse arrays now do
    • Fix a memory leak when allocating DataViews, which fixed a memory leak on BLE notifications
    • net/http .listen now return the server instance (like node.js)
    • Fixed lexing of '/*/' as a complete block comment
    • E.HSBtoRGB to wraps 'hue' value properly
    • Remove spikes when changing pin state using digitalWrite
    • E.setBootCode() (without an empty string) now works
    • Thanks to @JumJum and @Wilberforce ESP32 setWatch now works correctly


Avatar for Gordon @Gordon started