summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-01-22 23:08:39 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-01-22 23:08:39 +0000
commitb9364b79b0e939bd3e4c4949f0d9b32d19b03858 (patch)
tree2992dc96e40346ac77db4c853f1ded139347c93c
parent6d1ff7cc76f36ae10eb26dc29c5d2b7101192012 (diff)
downloadrust-talk-b9364b79b0e939bd3e4c4949f0d9b32d19b03858.tar.bz2
Various fixups, particularly for presentation notes
-rw-r--r--presentation.md168
1 files changed, 152 insertions, 16 deletions
diff --git a/presentation.md b/presentation.md
index ca353da..ea7f4e9 100644
--- a/presentation.md
+++ b/presentation.md
@@ -8,6 +8,22 @@ layout: true
---
+count: false
+
+# Leader slide
+
+- Press 'b' to toggle 'blackout mode'
+- Press 'p' to toggle 'presenter mode'
+- Press 'c' to create a clone of this window which will keep up
+- Press left/right to move around slides
+- The next slide is where the presentation begins
+
+???
+
+This is where presenter notes appear
+
+---
+
class: impact
# {{title}}
@@ -88,7 +104,17 @@ title: A systems programming language?
- Rust is an effective language for writing command line tooling in with a
rich ecosystem of libraries to help with this.
---
+---
+
+count: false
+
+## A 'systems programming' language?
+
+- Web
+
+- Servers
+
+- Command line tools
- Plumbing / Low level
@@ -153,7 +179,15 @@ title: Fast, Safe, Easy - Pick Three
- Safe languages tend to be things like Java, Go, JavaScript
basically anything with GC.
---
+---
+
+title: Fast, Safe, Easy - Pick Three
+
+## Traditional tensions in systems languages
+
+- Fast
+
+- Safe
- Easy
@@ -176,7 +210,17 @@ title: Fast, Safe, Easy - Pick Three
expense of performance; or C++ where you get fast easy-to-write code but you
have to spend considerable cognitive effort to remain safe.
---
+---
+
+## Traditional tensions in systems languages
+
+- Fast
+
+- Safe
+
+- Easy
+
+- **Pick three**
- How?
@@ -226,7 +270,15 @@ title: Fast, Safe, Easy - Pick Three
- Every value has exactly one type
- Types include more information than just the data they might contain
---
+---
+
+count: false
+
+## Some useful things to know about Rust
+
+- Rust is a compiled language
+
+- Static typing
- Type inference
@@ -502,6 +554,11 @@ What happens here?
<b>For more information about this error, try `rustc --explain E0382`.</b>
</pre>
+???
+
+- Urgh, yet again it explodes, this time because the vector is moved into the `take`
+ function and then destroyed at the end of it.
+
---
## Borrowing mutably
@@ -550,7 +607,15 @@ it to do, and it wasn't crazy.
the code.
- Or to hand out immutable borrows
---
+---
+
+count: false
+
+## Further thinking on this topic
+
+- Ownership
+
+- Mutable borrow
- Immutable borrow (or simply borrow)
@@ -564,7 +629,17 @@ it to do, and it wasn't crazy.
- Destruction is a kind of mutation, so immutable borrows cannot outlive the
lifetime of a value.
---
+---
+
+count: false
+
+## Further thinking on this topic
+
+- Ownership
+
+- Mutable borrow
+
+- Immutable borrow (or simply borrow)
- Lifetimes
@@ -619,7 +694,17 @@ it to do, and it wasn't crazy.
of a slice of `u8` with the added constraint that they represent valid utf8
data.
---
+---
+
+count: false
+
+## Data types in Rust
+
+- Primitives - `bool`, `char`, `u8`, `i32`, `usize`
+
+- Arrays and Slices - `[u8; 16]`, `[usize]`
+
+- String slices - `str`
- Tuples - `(T1, T2)`, `(T1, T2, T3)`, ...
@@ -651,9 +736,11 @@ it to do, and it wasn't crazy.
- Enums are arithmetic data types, which corresponds somewhat more closely to
a C/C++ struct containing a discriminant and a union of other types.
---
+---
+
+class: impact
-- Unions
+## Did you say unions?
???
@@ -1412,7 +1499,11 @@ _Talk through the code_
- Programs need formatting, they need documenting, they need checking
- The Rust ecosystem attempts to standardise as much as possible of all this
---
+---
+
+count: false
+
+## The Rust software ecosystem
- `rustc` and `cargo`
@@ -1429,8 +1520,13 @@ _Talk through the code_
along with tooling to acquire your dependencies, and to build everything and
rebuild when needed.
---
+---
+
+count: false
+## The Rust software ecosystem
+
+- `rustc` and `cargo`
- `crates.io`
???
@@ -1441,8 +1537,14 @@ _Talk through the code_
- Cargo talks to crates.io to acquire "known good" copies of the crate sources
which your crate or your dependencies need in order to build
---
+---
+count: false
+
+## The Rust software ecosystem
+
+- `rustc` and `cargo`
+- `crates.io`
- `clippy`
???
@@ -1455,8 +1557,15 @@ _Talk through the code_
in some cases simply correctly.
- For example, it'll encourage you to use `.is_empty()` instead of `.len() == 0`
---
+---
+
+count: false
+
+## The Rust software ecosystem
+- `rustc` and `cargo`
+- `crates.io`
+- `clippy`
- `rustfmt` (and `cargo fmt`)
???
@@ -1466,8 +1575,16 @@ _Talk through the code_
- Tooling exists to help you enforce that style
- Editors often support format-on-save to help you keep to the style
---
+---
+
+count: false
+## The Rust software ecosystem
+
+- `rustc` and `cargo`
+- `crates.io`
+- `clippy`
+- `rustfmt` (and `cargo fmt`)
- `rustdoc` (and `cargo doc`)
???
@@ -1478,8 +1595,17 @@ _Talk through the code_
- the `rustdoc` format is basically markdown and in fact, similarly to Python,
code documentation is syntactically part of the language.
---
+---
+
+count: false
+## The Rust software ecosystem
+
+- `rustc` and `cargo`
+- `crates.io`
+- `clippy`
+- `rustfmt` (and `cargo fmt`)
+- `rustdoc` (and `cargo doc`)
- ... culminating in `https://docs.rs/`
???
@@ -1488,8 +1614,18 @@ _Talk through the code_
existence of `docs.rs` which is a site which automatically builds and publishes
the documentation for every crate on `crates.io`
---
+---
+count: false
+
+## The Rust software ecosystem
+
+- `rustc` and `cargo`
+- `crates.io`
+- `clippy`
+- `rustfmt` (and `cargo fmt`)
+- `rustdoc` (and `cargo doc`)
+- ... culminating in `https://docs.rs/`
- `#[cfg(test)]`, `#[test]`, `tests/*.rs`, and `cargo test`
???