Live data from Hacker News

DeviceScript – TypeScript for Tiny IoT Devices

github.com

11–20 of 160 posts

Re: DeviceScript – TypeScript for Tiny IoT Devices

#12
No ESP32-S3?

This looks great but needs a non-frictiony way to bolt together with some C or assembly code where needed. Not sure about JADAC, and wondering how hard it would be to write libraries / servers / whatever for sensors, DMA, ADC, etc.

Also note docs say "Serial, SPI, PWM are not supported yet at the DeviceScript level."

Re: DeviceScript – TypeScript for Tiny IoT Devices

#13

> == 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.

!=== is a typo and should probably be !==

Re: DeviceScript – TypeScript for Tiny IoT Devices

#14

> == 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.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#15
I really want to be able to compile typescript to not javascript. Ideally to native but if it’s bytecode or whatever that’s fine I don’t care.

It’s a nightmare trying to deal with bundling and compiling and targets and different import schemes ugh.

I wish I could compile my programs it compiles all the stuff in node modules and gives me some working code.

Desperate to get away from nodejs I tried deno and bun …. neither of them are anything close to a drop in replacement for nodejs.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#16
post #11
post #8

Earlier quoted context omitted.

Because: weird language?

Love Lua, but damn I hate the 1-based index so much, it is such a pain to adapt to it and a source of bug when implementing algorithms…

I know nothing about lua but I could never touch a 1 based language.

Lua - an entire language that’s an off by one error.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#17
Is the only reason for this to make it possible for web developers or people who know TypeScript to write code for IoT Devices? To fill the lack of experienced low level programmers? Because as language alone, I don't see a reason why I should I ever use this if I am not familiar with TypeScript already.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#18
post #17

Is the only reason for this to make it possible for web developers or people who know TypeScript to write code for IoT Devices? To fill the lack of experienced low level programmers? Because as language alone, I don't see a reason why I should I ever use this if I am not familiar with TypeScript already.

The same could be said for MicroPython or CircuiyPython.

I suspect the target audience is more on the hobbyist/non embedded programmer side of things.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#19
There's a lot more information on the marketing site:

* TypeScript for IoT: The familiar syntax and tooling, all at your fingertips.

* Small Runtime: Bytecode interpreter for low power/flash/memory.

* Hardware as Services: Client/server architecture for sensors and actuators.

* Debugging: In Visual Studio Code, for embedded hardware or simulated devices.

* Simulation and Testing: Develop and test your firmware using hardware/mock sensors. CI friendly.

* Development Gateway: Prototype cloud service with device management, firmware deployment and message queues.

https://microsoft.github.io/devicescript/

Re: DeviceScript – TypeScript for Tiny IoT Devices

#20
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?

Post reply on HN