Avatar for Joakim

Joakim

Member since Aug 2014 • Last active May 2018
  • 3 conversations
  • 72 comments

Most recent activity

  • in News
    Avatar for Joakim

    Actually, Map is something I've missed several times lately when both Object and Array have fallen short. Set would also be useful. Having become used to the two in NodeJS, it's hard to live without them in Espruino :)

    Arguments for adding Map:
    Until Map arrived, JavaScript lacked a "pure" associative array. Instead, Object is often used/misused, leading to complicated code and weird issues, mainly due to its prototype nature and its limitation of only strings as keys.
    With Map, keys can be of any type, they're easily iterated (in insertion order), and it's easy to get a map's size or check if it has a certain key. It performs better, and it just works! After years of trying to make Object behave like an associative array, it's like a breath of fresh air.

    Shouldn't be too hard to implement, should it? :)

  • in News
    Avatar for Joakim

    These would be nice to have:

    Although I manage just fine without. I think Espruino's ES6 support is actually pretty good :)

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Joakim

    I just had this issue in a 1v91 flashed puck (not the Uncaught Syntax error, but disconnections on save() and E.setBootCode()). I can reset() just fine, but it still crashes on save(). Can't remember what exactly I did to trigger this, but I was messing with NRF and listening for button presses to sleep/wake BLE. And I did have "save on send" enabled by accident. I also did a lot of hardware reset, reset(), save() and E.setBootCode() (roughly in that order) to try to fix things, but apparently I broke things even more :/

    The peek functions return the same as the others here, and the erasePage calls solved it.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Joakim

    Couldn't there be false positives caused by a fluctuating magnetic field that the magnetometer picks up (or something like that, I'm not educated on magnetism)? It could appear as if the wearer was active, even though the person was immobile.

    Also, isn't this a field many are trying to get into ("e-Health")? There could be accelerometers out there that specialise at detecting falls.

  • in JavaScript
    Avatar for Joakim

    I made a noob mistake when publishing the package to NPM, it probably didn't work for anyone else but me :/ It should be fixed now, hopefully it works for everyone. It does require Node v6 or greater.

  • in News
    Avatar for Joakim

    Hope it reaches a lot of people :)

    Just a suggestion… To promote Puck.js on espruino.com, you could move it to the front of the slider. It feels like yesterday's news when it's the last side, while it's actually today's news.

  • in News
    Avatar for Joakim

    Add E.setLowPowerConnection(bool) to allow low power continuous connections to Puck.js

    Nice!! That didn't take long.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Joakim

    This may be overkill, but I had an idea for something like Chrome Experiments meets JSFiddle for Puck.js. Where you can browse interesting projects and examples, try them out on your puck right away, and then edit the code. And easily add your own experiments/projects to the collection.

    But that sounds like a lot of work :)

    What I'd want to see on puck-js.com/go is an initial example that's super easy but immediately demonstrates how fun it can be. For example, after connecting, simply hit the button and something magical happens on the page. Maybe not unicorns and rainbows, but something crazy would be fun.

    Then, being mightily impressed, I'd like to be able to write some code myself, and see what other people are making. So there has to be links to the Web IDE and some good examples.

    But rather than just linking to examples, maybe having a short presentation of each? That way it's easier to get an impression of what they actually do, and what's possible to make with Puck.js.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Joakim

    Nice, @daphtdazz! I was wondering how long till I'd be able to program pucks from my iPad :)
    Purchased.

Actions