Live data from Hacker News

DeviceScript – TypeScript for Tiny IoT Devices

github.com

21–30 of 160 posts

Re: DeviceScript – TypeScript for Tiny IoT Devices

#21

Is really hard for me to understand how running an VM on a resource constrained device has any benefit. There is a reason why those devices run using very lightweight "OS"s like FreeRTOS and Embedded C. Why the constant obsession to apply a technology designed for a specific purpose everywhere else, even when it doesn't make sense?

Java was originally intended for embedded devices...

Re: DeviceScript – TypeScript for Tiny IoT Devices

#22

Is really hard for me to understand how running an VM on a resource constrained device has any benefit. There is a reason why those devices run using very lightweight "OS"s like FreeRTOS and Embedded C. Why the constant obsession to apply a technology designed for a specific purpose everywhere else, even when it doesn't make sense?

Making it easy for hobbyists who already know that technology to have access. Micropython has been successful, and this is an alternative to that.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#23
One of the biggest challenges will be drivers for the actual hardware - at the moment it looks like they have support for SPI and for built in LEDs. But it's a big challenge to expose all the different peripherals that come with MCUs in a consistent way.

Actually, looks like they've got quite a lot of stuff done already:

https://microsoft.github.io/devicescript/api/clients https://microsoft.github.io/devicescript/api/servers

Re: DeviceScript – TypeScript for Tiny IoT Devices

#25
Microsoft has a long history of fracturing programming language markets. It's not so much that it is a bad idea, more that it divides an already healthy market. There is MicroPython, Arduino, and Node-RED not to mention all of the C/C++ based systems out there: mBed, Zephyr, and RIOT OS. Another addition is not helpful.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#26

One of the biggest challenges will be drivers for the actual hardware - at the moment it looks like they have support for SPI and for built in LEDs. But it's a big challenge to expose all the different peripherals that come with MCUs in a consistent way. Actually, looks like they've got quite a lot of stuff done already: https://microsoft.github.io/devicescript/api/clients https://microsoft.github.io/devicescript/api…

They should integrate with Zephyr OS, as they have a good generic sensor API, with tons of device drivers and platform support.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#27

Is really hard for me to understand how running an VM on a resource constrained device has any benefit. There is a reason why those devices run using very lightweight "OS"s like FreeRTOS and Embedded C. Why the constant obsession to apply a technology designed for a specific purpose everywhere else, even when it doesn't make sense?

It's not a bad decision for scripting provided the VM is lightweight enough. Things like "FORTH interpreter" or the old "BASIC stamp" microcontrollers. And it provides a degree of robustness vs running arbitrary binaries.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#28

> == and != operators (other than == null/undefined); please use === and !=== That's a whole lot of equals signs. Typos aside, this all looks really amazing! Although by no means sound, the ergonomics of TypeScript's type system are phenomenal. Really glad to see additional use cases beyond traditional JS runtimes.

Typescript has to inherit this typing madness because it’s strictly a Javascript superset. As a decade long JS developer, I avoid == and != like plague because of type castings and funny results that I don’t bother to remember.

https://eslint.org/docs/latest/rules/eqeqeq !!

Re: DeviceScript – TypeScript for Tiny IoT Devices

#29

Is really hard for me to understand how running an VM on a resource constrained device has any benefit. There is a reason why those devices run using very lightweight "OS"s like FreeRTOS and Embedded C. Why the constant obsession to apply a technology designed for a specific purpose everywhere else, even when it doesn't make sense?

Making it easy for hobbyists who already know that technology to have access. Micropython has been successful, and this is an alternative to that.

The github project indicates "DeviceScript brings a professional TypeScript developer experience to low-resource microcontroller-based devices."

If you tell me is a toy, and somebody's pet project: fine. Is all about having fun.

But then don't mention "professional" in the project description.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#30

Is really hard for me to understand how running an VM on a resource constrained device has any benefit. There is a reason why those devices run using very lightweight "OS"s like FreeRTOS and Embedded C. Why the constant obsession to apply a technology designed for a specific purpose everywhere else, even when it doesn't make sense?

A VM can make all the gaping security holes portable between IOT devices.
Post reply on HN