Live data from Hacker News

DeviceScript – TypeScript for Tiny IoT Devices

github.com

31–40 of 160 posts

Re: DeviceScript – TypeScript for Tiny IoT Devices

#31

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 …. neit…

So you want structural typing, but for native?

Funny, the fact that typescript is "only" structurally typed is one of my main pain points with the language. (Of course it's tons better than vanilla JS)

Re: DeviceScript – TypeScript for Tiny IoT Devices

#32

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?

Easy: because TypeScript or Python are way easier to learn than C. Learning C is a long, arduous, uphill battle against arcane error messages and undefined behaviour.

Unless you have a background in C/C++ already, most people can probably get up and running with something like this way, way faster.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#33
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.

The thing is, if you want to poke at a device interactively, your options are either Forth or (if the system is beefy enough) one of these scripting language ports; tethered C interpreters are not precisely commonplace. And while I love Forth to bits, most people will probably go the scripting-language route.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#34
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.

it's not C, so that's a great step towards making programming IoT more accessible.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#35

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.

I appreciate the tongue-in-cheek, but I think there‘s really the chance for better IoT security when using a VM. Those things are connected to the internet (duh) and sandboxing is probably a good idea. You obviously don’t need a VM for that, but maybe the tradeoffs are favorable.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#36

Earlier quoted context omitted.

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.

The thing is, if you want to poke at a device interactively, your options are either Forth or (if the system is beefy enough) one of these scripting language ports; tethered C interpreters are not precisely commonplace. And while I love Forth to bits, most people will probably go the scripting-language route.

A whole 8 bit computing generation was able to jump into computing thanks to scripting.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#37

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?

8 and 16 bit home computing says hello.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#38
post #2

Finally, I've been waiting for this for years now! Now it's just a matter of continuing to expand the integrations. Will have to look at what the process looks like for creating custom integrations for existing libraries when non exist.

Why the wait?

Microsoft's MakeCode project already provides something similar, via compilation to C++, for quite some time now.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#39

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.

There are tons more out there, Microsoft hardly makes a difference being one more.

Re: DeviceScript – TypeScript for Tiny IoT Devices

#40
post #8

Why not just use LUA?

Because: weird language?

The thing is that LUA is here for quite some time and will be here when Microsoft will ends support for this experiment and it will get slowly depreciated and forgotten.
Post reply on HN