
Toit [video, DK] - self
https://universe.ida.dk/on-demand/it/danske-google-stjerner-sikrer-iot-enheder-gennem-virtualisering/
======
self
__Note: __The slides are in English, but the talk is in Danish. Click through
to get to the video, then register to download the slides in PDF.

Toit is Lars Bak and Kasper Lund's brand new programming language and software
platform for small IoT devices. There's very little else I can find about it
online; it was publicly unveiled in this session:
[https://di.ku.dk/english/event-calendar-2018/dsfd-talk-
lars-...](https://di.ku.dk/english/event-calendar-2018/dsfd-talk-lars-bak/)

I can't find an online recording of that, if there is one.

Other links I've found:

* toit like a tiger: [https://www.toitware.com/](https://www.toitware.com/) (check out that font!)

* news article: original danish: [https://www.version2.dk/artikel/aarhus-eksperter-chromes-jav...](https://www.version2.dk/artikel/aarhus-eksperter-chromes-javascript-motor-skaber-iot-sprog-virtuel-maskine-1085544)

* translated to english: [https://translate.google.com/translate?sl=auto&tl=en&js=y&pr...](https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fwww.version2.dk%2Fartikel%2Faarhus-eksperter-chromes-javascript-motor-skaber-iot-sprog-virtuel-maskine-1085544&edit-text=&act=url)

* github organization: [https://github.com/toitware](https://github.com/toitware) (no repos or public accounts)

* twitter account: [https://twitter.com/toitware](https://twitter.com/toitware) (no tweets)

Toit's features:

* object-oriented

* indentation-based syntax

* looks a bit like self/smalltalk (not surprising)

* virtual machine and compiler written in C++

* lightweight processes/tasks, not async

* will use raft

* IoT target platform right now: ESP32: [http://www.m5stack.com/](http://www.m5stack.com/)

* garbage-collected

* project started in February 2018

* will open source the vm, language, core library

Example, seen in the news article and in the slides:

    
    
        class TreeNode:
          left := null
          right := null
    
          TreeNode
    
          TreeNode left right
    
          size
            result := 1
            if left: result += left.size
            if right: result += right.size
            ^result
    
          build_tree depth
            if depth == 0: ^TreeNode
            ^TreeNode
              build_tree depth - 1
              build_tree depth - 1
    
        main
          tree := build_tree 5
          assert tree.size == 63
    

_TreeNode_ and _TreeNode left right_ appear to be constructors.

 _i know what you 're thinking: "nulls?! in a language in 2018?!"_

