>In February 2019, the company raised DKK 23 million (approximately US$3.5 million) in seed funding from Swedish venture capital firm Creandum.[4] Early versions required cloud registration to deploy code to devices.[5]
> The commercial cloud offering was later discontinued. Development of fleet-management tooling continued through an open-source project called Artemis, built on Supabase and PostgreSQL, which users self-host.[8]
> According to Denmark's Central Business Register, Toitware ApS ceased operating in 2024.[9] Development of the language continues as a community project on GitHub.
Seems unlikely to be a bait and switch at this point
There are systems programming languages since JOVIAL in 1958, enough of them to chose from if C had never existed, and what syntaxes would be favoured instead.
It's an interesting thought experiment, but honestly for all its flaws, C did have one large advantage regarding syntax: braces. Even if C had never been invented, at some point people would have noticed that Fortran/Pascal/Whatever style BEGIN ... END blocks are annoying and just a waste of tokens.
Toit is a language for writing scripts on your computer and applications on your ESP32. A readable syntax, an efficient runtime, and tools that work together.
Free and open source. Maintained by volunteers.
Think of it as a runtime + scheduler that you deploy programs to ESP32 devices. It gives you the ability to run multiple programs simultaneously (with isolation) and remote updates. The language compiles to bytecode; the developers have lots of experience writing VMs for constrained devices; see https://www.theregister.com/software/2004/07/27/forgotten-la... for something that predates V8 and Dart.
They should write this prominently on their website. It doesn’t radiate trustworthiness/substance/reputation. Also performance and resource requirements should be prominent when targets are MCUs.
I rather like WebAssembly for this use-case. You don't necessarily need a new language, you need a Wasm runtime targeted at embedded devices, like WAMR [1], which even has a AOT compiled mode.
This seems very interesting. It almost looks/feels like Pythonic Go.
There's already another syntax example in the thread, but I want to point out the weirdest syntax I've seen yet: positional arguments look like posix command arguments:
greet name/string="World" --greeting/string="Hello" -> string:
return "$greeting $name"
main:
print (greet) // Prints Hello World.
print (greet "Ada" --greeting="Hi") // Prints Hi Ada.
Feedback for the doc writers on this then, the phrase in my head of "the name of the named argument is greeting, name is not named" is a little awkward.
I have used toit in a lot of my projects. It is a really nice language and so much cleaner than all the alternatives I have tried (Arduino, Python, Lua).
The tools just work and I got used to the language really quickly.
I did hate that it was bytecode. It just felt wrong to run bytecode on an ESP32. OTOH it just works, and I have never noticed any performance problems.
My latest project is a controller for a slave-clock: https://gitlab.com/close2/nebenuhr-toit
(There is also a Garmin repository that allows me to control the clock using my Garmin watch.)
Full disclosure: I had to use toit (floitsch is my brother), but it really is a nice language and development environment.
Even I (as a sort of grudging cynic) now find myself thinking in these terms:
Is this a language that an LLM can write well?
Especially a small LLM, given the scripting and friendly IoT focus, where it might be useful for a smaller model in a home assistant to be able to write in it.
A packageable scripting language with fewer footguns that has LLM-friendly features feels like it probably has a place in the world.
But my own experience so far suggests that smaller LLMs in particular do better with simpler languages with obvious flow of control and less cleverness like metaprogramming.
LLMs have not been trained on Toit code as much as they have on Python or JS. No question about that. Without the Toit skills (https://github.com/toitlang/ai-instructions) LLMs used to be really bad. (They might be better now, but I never bothered to remove the skill files). From that point of view, Toit isn't a good choice.
On the other hand, Toit provides containers and a fast refresh-cycle. Both are godsends for AI agents: the containers make it so that the agent doesn't accidentally bring down the whole system when there is a bug, and the refresh cycle makes iterating on programs much faster. (Something I find agents to be really good at).
Fwiw, there isn't any clever metaprogramming in Toit.
Thank you for your reply — I think it sounds like you're in a good place here.
I still definitely wish this wasn't something we had to care about still, but for a while at least I suspect it is.
I am a small/open-weights LLM proponent, really, so at some point I will test this a bit more, because I tend to use LLMs close to bare-metal where prompts and skills are concerned, due to limited context. (In general I think post-training of smaller coding-oriented models like Muse Glimmer and Qwen has made long system prompts and extensive skill files far less significantly important)
Muse Glimmer seems to have some knowledge of Toit without searching the web.
e.g. I asked it: "Could you write an embedded webserver that blinks the LED the number of times specified in a GET query string parameter?"
And what it wrote without access to documentation appears to be plausible (from what its human overlord can see from the documentation at least).
After Dart, where we "had to" use familiar syntax (JavaScript), we experimented with less-noisy syntax for Toit. We removed everything that wasn't necessary first. Over time we added some parts (like `extends`, `implements`, ...) back, but we got used to the non-parens calls (similar to shell or Caml) and like it now. To me, every other language feels cluttered and noisy.
Wrt performance: depending on the program/benchmark Toit is sometimes 10x faster than MicroPython. For small loops that just do some arithmetic it's less noticeable, but real programs with method-calls benefit a lot from the static class definitions.
As a Dutch guy... I'll allow it, but only if y'all admit that the Danish language is at least as silly as Dutch is (must be something about being a flat country next to the North Sea)
Is there some kind of an advertising blurb for why you’d want to use Toit, especially for scripting? I think the only thing I saw was “a readable language”, but I’d probably consider Python more readable than it judging from the examples.
A few more bullet points to encourage readers to have a look at Toit:
- Faster than Python. Depending on the benchmark up to x10.
- Can be compiled to executables. Currently `-o` just takes an interpreter and attaches the bytecodes, but Kasper also started experimenting with native output.
- Cleaner base. Objects aren't just hashtables. This can be seen as a downside as well (making the language less flexible), but in my book it's a win.
I think "toy language" isn't really fair. Toit has been developed for 7 years, some of which with multiple engineers working on it full time. (The blog post says 4 years, but that's just for the v2.0.0 development).
Toit doesn't have a lot of users, but it is used in production (for example by Consibio) and is definitely developed for production environments.
The wikipedia page https://en.wikipedia.org/wiki/Toit is short but still gives a lot of context.
Just a joking side note: switch n to t in the URL and you get article for food in Estonian: https://et.wikipedia.org/wiki/Toit
>In February 2019, the company raised DKK 23 million (approximately US$3.5 million) in seed funding from Swedish venture capital firm Creandum.[4] Early versions required cloud registration to deploy code to devices.[5]
DNS blackhole the domain and run.
> The commercial cloud offering was later discontinued. Development of fleet-management tooling continued through an open-source project called Artemis, built on Supabase and PostgreSQL, which users self-host.[8]
> According to Denmark's Central Business Register, Toitware ApS ceased operating in 2024.[9] Development of the language continues as a community project on GitHub.
Seems unlikely to be a bait and switch at this point
1 reply →
Here's a beginner tutorial for the language: https://docs.toit.io/language/toitversus
Nice syntax. It looks like how we'd design programming if C had never existed.
There are systems programming languages since JOVIAL in 1958, enough of them to chose from if C had never existed, and what syntaxes would be favoured instead.
It's an interesting thought experiment, but honestly for all its flaws, C did have one large advantage regarding syntax: braces. Even if C had never been invented, at some point people would have noticed that Fortran/Pascal/Whatever style BEGIN ... END blocks are annoying and just a waste of tokens.
1 reply →
Even after reading that (and more of the homepage) I have no idea what this is.
Think of it as a runtime + scheduler that you deploy programs to ESP32 devices. It gives you the ability to run multiple programs simultaneously (with isolation) and remote updates. The language compiles to bytecode; the developers have lots of experience writing VMs for constrained devices; see https://www.theregister.com/software/2004/07/27/forgotten-la... for something that predates V8 and Dart.
5 replies →
[flagged]
The people behind Toit are the original people behind the V8 VM in Chrome. They know their stuff.
They should write this prominently on their website. It doesn’t radiate trustworthiness/substance/reputation. Also performance and resource requirements should be prominent when targets are MCUs.
Those were it's creators, are they still involved after the company folded?
Because if not, that might explain the lack of marketing around it.
Kasper and I are still working on it.
1 reply →
Also co-founding Dart. They definitely know their stuff.
Dart should have enjoyed the popularity that TypeScript received. Tough to compete with Hejlsberg though.
7 replies →
Dart v1.0, they had nothing to do with Dart v2.0, and the change in language semantics was the main reason folks like Gilad Bracha left the team.
3 replies →
I rather like WebAssembly for this use-case. You don't necessarily need a new language, you need a Wasm runtime targeted at embedded devices, like WAMR [1], which even has a AOT compiled mode.
[1]: https://github.com/wasm-micro-runtime/wasm-micro-runtime
This seems very interesting. It almost looks/feels like Pythonic Go.
There's already another syntax example in the thread, but I want to point out the weirdest syntax I've seen yet: positional arguments look like posix command arguments:
Arguments like --greeting are the named arguments:
https://docs.toit.io/language/beginner/lists-and-functions/#...
The name argument is positional here.
Feedback for the doc writers on this then, the phrase in my head of "the name of the named argument is greeting, name is not named" is a little awkward.
1 reply →
Named, sorry, I misspoke!
It’s probably fine once you’re used to it, but I’m not sure that embedded development is the place to innovate on function call syntax.
Then again, nowadays, it’s not like you have to write code yourself.
I have used toit in a lot of my projects. It is a really nice language and so much cleaner than all the alternatives I have tried (Arduino, Python, Lua).
The tools just work and I got used to the language really quickly.
I did hate that it was bytecode. It just felt wrong to run bytecode on an ESP32. OTOH it just works, and I have never noticed any performance problems.
My latest project is a controller for a slave-clock: https://gitlab.com/close2/nebenuhr-toit (There is also a Garmin repository that allows me to control the clock using my Garmin watch.)
Full disclosure: I had to use toit (floitsch is my brother), but it really is a nice language and development environment.
[Edit: typos..]
I just started working on a compile-to-native approach you might appreciate :)
So (obvious question) how hard was it working using one hand as your brother was forcing your other one?
You get surprisingly good at typing with one hand after a while. ;)
I imagine high school boys saying "tight" in the style of Key and Peele saying "nice" [0]
[0] https://youtu.be/SAfq55aiqPc?is=b8MzZgaT7Yy9qNNR
I wish any product new release announcement include a brief introduction about the product itself...
Even I (as a sort of grudging cynic) now find myself thinking in these terms:
Is this a language that an LLM can write well?
Especially a small LLM, given the scripting and friendly IoT focus, where it might be useful for a smaller model in a home assistant to be able to write in it.
A packageable scripting language with fewer footguns that has LLM-friendly features feels like it probably has a place in the world.
But my own experience so far suggests that smaller LLMs in particular do better with simpler languages with obvious flow of control and less cleverness like metaprogramming.
It's a good point.
LLMs have not been trained on Toit code as much as they have on Python or JS. No question about that. Without the Toit skills (https://github.com/toitlang/ai-instructions) LLMs used to be really bad. (They might be better now, but I never bothered to remove the skill files). From that point of view, Toit isn't a good choice.
On the other hand, Toit provides containers and a fast refresh-cycle. Both are godsends for AI agents: the containers make it so that the agent doesn't accidentally bring down the whole system when there is a bug, and the refresh cycle makes iterating on programs much faster. (Something I find agents to be really good at).
Fwiw, there isn't any clever metaprogramming in Toit.
Thank you for your reply — I think it sounds like you're in a good place here.
I still definitely wish this wasn't something we had to care about still, but for a while at least I suspect it is.
I am a small/open-weights LLM proponent, really, so at some point I will test this a bit more, because I tend to use LLMs close to bare-metal where prompts and skills are concerned, due to limited context. (In general I think post-training of smaller coding-oriented models like Muse Glimmer and Qwen has made long system prompts and extensive skill files far less significantly important)
Muse Glimmer seems to have some knowledge of Toit without searching the web.
e.g. I asked it: "Could you write an embedded webserver that blinks the LED the number of times specified in a GET query string parameter?"
And what it wrote without access to documentation appears to be plausible (from what its human overlord can see from the documentation at least).
How did you came up with this strange syntax? Why not use a Python like one which is already known?
How about performance compared to compiled MicroPython (viper)?
After Dart, where we "had to" use familiar syntax (JavaScript), we experimented with less-noisy syntax for Toit. We removed everything that wasn't necessary first. Over time we added some parts (like `extends`, `implements`, ...) back, but we got used to the non-parens calls (similar to shell or Caml) and like it now. To me, every other language feels cluttered and noisy.
Wrt performance: depending on the program/benchmark Toit is sometimes 10x faster than MicroPython. For small loops that just do some arithmetic it's less noticeable, but real programs with method-calls benefit a lot from the static class definitions.
Looks interesting! I can't tell really from the docs the untended use case though. It says "scripts", but also " applications".
Most importantly though (/s), is this toit as in "roof" in French, toit as in "to it", or otherwise?
It's from Austin Powers.
"toit like a tiger"
https://youtu.be/gu31VyXlTzo
Ahaha! I'd been thinking it was pronounced as in French (a bit like "twah") when I should be saying it in Mike Myer's super authentic Dutch accent!
2 replies →
As a Dutch guy... I'll allow it, but only if y'all admit that the Danish language is at least as silly as Dutch is (must be something about being a flat country next to the North Sea)
now we're talking.
Is there some kind of an advertising blurb for why you’d want to use Toit, especially for scripting? I think the only thing I saw was “a readable language”, but I’d probably consider Python more readable than it judging from the examples.
A few more bullet points to encourage readers to have a look at Toit:
- Faster than Python. Depending on the benchmark up to x10.
- Can be compiled to executables. Currently `-o` just takes an interpreter and attaches the bytecodes, but Kasper also started experimenting with native output.
- Cleaner base. Objects aren't just hashtables. This can be seen as a downside as well (making the language less flexible), but in my book it's a win.
- The `--named=value` syntax is just a winner :)
> The `--named=value` syntax is just a winner
The "--" seems so unnecessary though. Wouldn't "name=" be sufficient to signal a named parameter? Or maybe Toit has expressions that use "=".
1 reply →
Good luck running (micro)python on an ESP32.
Lua exists :)
Who is using this? The company originally behind it has shut down
No one, it's just a toy language
I think "toy language" isn't really fair. Toit has been developed for 7 years, some of which with multiple engineers working on it full time. (The blog post says 4 years, but that's just for the v2.0.0 development).
Toit doesn't have a lot of users, but it is used in production (for example by Consibio) and is definitely developed for production environments.
Looks quite nice
Oh, good—I've been looking for a Round one for years.
The last thing this planet needs a new programming language