Chris Lowis by Chris Lowis

Show and Tell 45

At this weeks Show and Tell Ben and I were joined by Chris P and Tom S in our offices in Whitechapel.

Chris P

Chris showed us some code he’s been writing to generate web applications from Rust code.

Chris has been watching a series of old MIT lectures on computation theory that he found on YouTube. He was particularly taken with the series on Finite State Machines and wanted to build an interactive web application that allowed people to play with the machines in a similar way to the Turing Machine Simulator.

He wasn’t sure what to build the application with so decided to use it to explore some new technology. In particular he wanted to learn more about WebGL and Rust. Rust has a tool called Cargo Web that allows Rust programs to be compiled to WebAssembly using Rust’s new native compiler backend.

WebAssembly programmes have to call out to their containing browser environment using calls to the JavaScript API provided by browsers. For this to work from inside the Rust program there is a library called stdweb which provides some bindings.

Chris used these bindings to build an abstraction module that would handle adding HTML and CSS to a page and creating a Canvas element. This allowed him to keep his main functions free from non-Rust code.

He’s been working through the WebGL Fundamentals tutorials and porting some of the examples to Rust. He showed us some basic fragment and vertex shaders for drawing a simple triangle on the screen.

Along the way Chris has been playing around with Rust’s macro language and has developed an experimental library to make it easier to initialise structs.

We had an interesting chat at the end of Chris’s tour about his approach to learning and how he deliberately chooses new technologies and concepts when working on a problem that often take him away from his original goal. Chris said that while he plans to try and finish his tool for learning about Finite State Machines he’s also happy with how much he’s learnt about these new technologies.

Ben G

Ben talked about a side project he’s been working on at Go Free Range. He explained how GFR have been looking for ways to generate some revenue that isn’t as so closely tied to selling their time to clients. GFR have been building a small product to sell online as a means to generate some revenue but also to prove to themselves that they can talk an idea through to deployment as a team.

Ben mentioned how they looked for problems they could solve for an audience that they understood. In particular they focussed on technical leads in software development teams. Ben said that in previous work he’s noticed that teams don’t celebrate success as often as they could. GFR came up with an idea to help teams with this and have a bit of fun along the way.

Ben showed the small application he’s been working on and how it is built using the language Elm. We saw how an Elm application is architected and talked about some of the ways its type system helps you to avoid making mistakes.

If you have any feedback on this article, please get in touch!

Historical comments can be found here.