Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

A similar project: https://toitlang.org (or https://toit.io).

Currently it's only targeting the ESP32 family, but the code is pretty portable. By default, it probably also needs more resources due to OS-like abstractions, allowing for multiple containers to run on parallel, etc. Obviously that also brings some nice advantages. For example, installing or updating, a new container is just a few lines of code.

We have been working on it for more than 5 years now, and it's definitely at a stage where lots of projects would benefit from it.



Let me say that Florian and co are super helpful and responsive with code examples, fixing bugs, and have built a very dependable language in Toit.


What's the advantage over MicroPython?


Speed and reliability.

We found that Python isn't really designed for constrained environments. The object model, in particular, makes it hard to have fast method calls. The memory layout is also affected by the language, leading to bigger objects and a worse GC.

If you are just running a small hello world, or a number crunching loop, then both languages behave similarly. However, if you actually want to run something more consequential in production you will have an easier time with Toit.


Speed: maybe, sometimes. Of course, MicroPython makes it very easy to create modules written in C, accessible from MicroPython. So if you need extra perf you can always write a smattering of C.

Reliability: I don't see why Toit would be any better? FWIW we make medical devices using MicroPython and have tests that have run for many months with no failures. MicroPython, the language, is extremely reliable and thoroughly tested [1], though admittedly the port-specific code can be less so.

We've evaluated Toit and it has some nice features (the containerization is novel and powerful!)...but it's a quirky language with sparse peripheral support. Ultimately it's trivial for Python-familiar developers to switch across to MicroPython - a big benefit. Being constrained to the ESP32 is a limitation that many of our customers would not allow.

[1] See the py folder: https://micropython.org/resources/code-coverage/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: