You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6:30PM - We'll try to get the Skillsmatter AV team to do setup their laptop. It's the one they use specially for hangouts. One important thing I learnt from last time, is to have the webcam pointing at at the audience. Should help Niko get some audience feedback. We might be buggered if they need us to turn off the lights though. We'll also try to do a quick hangout test with Niko if possible.
6:50PM - Intro - We need volunteers to help with Rust workshops for the Mozilla Festival Oct 27th-29th (there will be a paper to stick your email address on if interested). https://www.mozillafestival.org/
Niko Matsakis (Rust Core Team) - Compiler internals
Intro (if you want something to read off here's the bios (from skillsmatter and meetup pages))
Niko does his talk
5-10 mins Q & A
5 mins break
Amanieu d'Antras (member of Brussels Rust group) - Intrusive collections for Rust
Intro
Amanieu does his talk
5-10 mins Q & A
David Harvey-Macaulay - three-rs: High-level 3D in Rust
Intro
David does his talk
5-10 mins Q & A
Thank everyone, get them to go get drinks and return here to chat.
Speaker bios:
Nicholas (Niko) Matsakis is a senior researcher at Mozilla research and a member of the Rust core team. He has been working on Rust for nearly six years and did much of the initial work on its type system and other core features. Prior to working on Rust, he did his undergraduate studies at MIT and completed a PhD at ETH Zurich in 2011. He also spent several years at DataPower Technology, a startup since acquired by IBM, working on the JIT compiler and networking runtime.
Amanieu d'Antras obtained his PhD at the University of Manchester for this thesis titled "Low Overhead Binary Translation for ARM". He specializes in binary translation, which allows programs compiled for one architecture to be run on a different architecture. He maintains a few Rust libraries (intrusive-collections, parking_lot, thread_local) and has made several contributions to the Rust compiler and standard library.
Introduction - Community related team. First port of call. Local meetup organiser. Tonight I’ll give you an intro and the tools, efficient.
What is Rust? - Graydon Hoare. 2010. Apple. But what is Rust?
rust-lang.org definition (4) - elevator pitch from site. Break it down.
Systems programming - application programming is biz/user requirements. websites and app store. sys is next tier down. expect to write device drivers/os/crypto.
Blazingly fast - how fast? translation service analogy. also fast because of memory management rather than gc. fast is subjective, so benchmarks
benchmarks (7) - 5 toy programs from the benchmark game. pinch of salt. no sub for your own experiment. pidigits is 10,000 digits of pi.
Prevents segfaults - Or segmentation faults are where a program crashes with no error handling. C, mismanagement of memory access. Segfaults Borrow checker, memory allocation and it’s life time, if not happy won’t compile.
Guarantees thread safety - thread programming is tough in systems programming. two risks: dead locks and data race condition. Rayon.
Example code (10) - code fragments.
Iterators - partition boolean expression. tuple of true and false vector values. More on vectors later.
I/O - RW a file. Buffered read. ? unwrap an Optional value (don’t do nulls. Some or None). If we get None bubble error to stack. Lines method turns input into an iterator so we can loop.
Serialization - Let deserialise a string containing JSON data. Serde crate. Create type called Point. Our string contain JSON. from_str method and reference to string. Unwrap the optional. If there’s no value crash out.
Who’s using Rust in Production? - features that make Rust attractive to companies. Let’s see a list of co’s using Rust in Production.
Who’s using Rust in Production? GIF (12) - start gif, notable companies Mozilla, Chef, Dropbox
The Rust toolset - avoid “toolchain”. Tool set list (4 + debuggers)
rustup (14) - toolchain manager. version manager. switch between versions, channels and targets. cpu-manufacturer-os/binformat triple.
rustc - compiler, write simple code.
documentation - doc is key, even code in your libraries are compiled as part of the build.
cargo - not just the package manager. recall rustc can compile simple programs. build your api documentation. sub commands: cargo-edit and cargo-deb.
debugging - llvm and gnu compiler debugger. haven’t needed to use this, because i rely on unit tests. do appreciate this is not always possible in systems programming which is why you need a debugger.
Time check: 10mins
Demo Time!
prerecoded, not fast enough type and talk.
Used Docker so can see what demo looks like in Ubuntu 16:04 (Xenial) with dev tools.
GitHub Repo.
Demo: Install Rust (2 mins)
Reminder, this a base build with just the build tools.
As you can see no rustup.
Install via curl shell. Feel free to check the shell script before you run it manually, like you do with other installer where you elevate right?
The installer, if you pick the default you get the stable toolchain.
Download begins. Note: compiler, standard library, cargo and documentation.
Note toolchain and the target triple.
Since we’re going to use Rust now, let’s add it to the path (don’t normally need to do this).
Version check.
let’s give Rust a go by creating a binary project. We can do this using the bin switch. If you omit this you get a library project instead. Both give you a small bit of boiler plate.
And we’re done
Demo: Toolchain management
Stable (default) toolchain.
Install the latest version of nightly.
As before, we get the compiler, standard library, cargo and documentation.
Now have two toolchains.
How to switch between toolchains
Create project that only uses stable features.
Run.
Note the range is not inclusive in for loops. There’s a nightly feature to address this.
Incidentally this is how you enable features, they’re gated i.e. now enabled by default in nightly so you can use it to test your stable code against it.
Rustup - note stable is still default. So what do you think is going to happen when we run this code?
Let’s override the default for this project.
Tada!
Time check: 10mins
Wrap up (5 mins left)
Rust london user group (24) - meet monthly. two events. two startups. trivia.
Exercism and Rustlings
URLO - this is a common abbreviation. ask questions, help, talk till cows come home.
TWIR - news letter, changes to Rust, meet ups, calls for participation.
community.rs - even more.
Summary - give rust a go, lots of people in the industry. rustup to install and manage versions. cargo. RLS best code editing experiencing. URLO. TWIR. community website.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters