Using Rust for climate action


#1

Are there Rust programmers out there who are frustrated by Trump’s withdrawal from the Paris agreement? This is not the correct forum to discuss the matter itself, but I’d like to discuss with others ways in which Rust could be utilized for open-source projects to contribute to climate action.


#2

Hi! At Coturnix, we’re not open source yet, mostly because our business model is different, but we do machine learning and real-time optimisation to try and reduce building energy consumption. Our market is responsible for about 20% of global greenhous gas emissions.

All our codebase is in Rust (with some existing C libraries, obviously)!


#3

I’m not a supporter of Trump, nor of this pull out of Paris either, but this question could have easily been asked without involving the stress of today’s politics. These forums, and Elixirs forums, have so far been my sanctuary for learning and discovery from other developers without having to wade through the crap politics of late.

Now on to your question:
I don’t know about Rust specifically, but here is an article you might find interesting:
http://worrydream.com/ClimateChange/

Edit: Removed that conference link as it didn’t have any talks pertaining to the subject as I thought it did.


#4

This reminds me of a quote from Bjarne Stroustrup himself, suggesting that programming in C++ would result in tasks being resolved in less CPU cycles, thus saving energy. As Rust holds similar proximity to the hardware and zero-cost abstractions, the same could be said about Rust in this regard.

However, we can’t blame inefficient code for climate changes taking place. As @pmeunier mentioned, hardware can be put to a good use here by solving optimisation problems through machine learning. Often though, this doesn’t depend so much on the programming language backing the process. We can just make model training a bit faster without extra hardware, but that’s mainly it.


#5

I agree 100%. Our main reasons for using Rust are:

  1. You never have to rewrite any part of your code in a different language for speed. Development is incremental: debug once, run every time :laughing:

  2. It sets a reasonably high bar for candidates who want to work with us. If they’re not able to step out of their comfort zone (by fighting the borrow checker, for instance), they’re probably not open-minded enough (technically speaking, at least). If they’re not able to recognise common issues in programming that Rust solves, they’re probably not experienced enough.

  3. Invest in the future. A Rust-based company might be a strong asset in the future.

Our ML code runs over quite a long time, but once the learning is done, the routine thing that saves energy could be written in any language, the Rust version runs in almost no time. We just get a slightly better optimisation by being able to pack more cycles in the same time.


#8

Moderator note: This forum is for discussion about Rust. It is not for general discussion about climate change or the politics associated with it. Please stay on topic.