←back to thread

135 points ingve | 3 comments | | HN request time: 0.809s | source
1. steveklabnik ◴[] No.44007532[source]
This reminds me of http://brson.github.io/archaea/, which is a really fantastic project by Brian Anderson. It shows iterations of Rust's test files over the years, so you can see what older Rust syntax looked like.

Regardless, very cool!

replies(1): >>44007808 #
2. whytevuhuni ◴[] No.44007808[source]
Wow, you're right. Apparently this was Rust in 2010-06-23:

    io fn starve_main(chan[int] alive) {
      log "signalling main";
      alive <| 1;
      log "starving main";
      let int i = 0;
      while (true) {
        i += 1;
      }
    }
replies(1): >>44008284 #
3. steveklabnik ◴[] No.44008284[source]
Yep! Some interesting things in here:

`io fn`, there were three effects: io, state, and unsafe. There was also pure, for functions with no effect.

chan for channels. <| was a "semi-synchronous message send," it blocked if the queue was full.

square brackets for generics

int was two's compliment signed integer with machine dependent size

log for printing to the screen