<commit_before><!doctype html>
<html lang="en">

  <head>
    <meta charset="utf-8">

    <title>The Rust Programming Language</title>

    <meta name="description" content="A short intro to Rust for C++ programmers">
    <meta name="author" content="<NAME>">
    <meta name="author" content="<NAME>">

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

    <link rel="stylesheet" href="css/reveal.css">
    <link rel="stylesheet" href="css/theme/black.css" id="theme">

    <!-- Code syntax highlighting -->
    <link rel="stylesheet" href="lib/css/zenburn.css">

    <!-- Printing and PDF exports -->
    <script>
      var link = document.createElement( 'link' );
      link.rel = 'stylesheet';
      link.type = 'text/css';
      link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
      document.getElementsByTagName( 'head' )[0].appendChild( link );
    </script>

    <!--[if lt IE 9]>
    <script src="lib/js/html5shiv.js"></script>
    <![endif]-->
  </head>

  <body>

    <div class="reveal">

      <!-- Any section element inside of this container is displayed as a slide -->
      <div class="slides">
        <section>
          <h1>Rust</h1>
          <h3>Intro for C++ programmers</h3>
          <img src="http://www.rust-lang.org/logos/rust-logo-256x256.png" alt="Rust logo">
          <p>
            <small>Created by <a href="https://github.com/flanfly">Kai</a> / <a href="http://twitter.com/_cibo_">@_cibo_</a></small>
            <small>and <a href="https://github.com/bkircher">Ben</a> / <a href="http://twitter.com/predatorhat">@predatorhat</a></small>
          </p>
        </section>

        <section>
          <h2>Hello, there!</h2>
          <p>
            reveal.js enables you to create beautiful interactive slide decks using HTML. This presentation will show you examples of what it can do.
          </p>
          <pre><code data-trim contenteditable>
fn main() {
    println!("Hello, there!");
}
          </code></pre>
        </section>

        <section>
          <h2>Slides</h2>
          <p>
            Not a coder? Not a problem. There's a fully-featured visual editor for authoring these, try it out at <a href="http://slides.com" target="_blank">http://slides.com</a>.
          </p>
        </section>

        <section>
          <h2>Who is using Rust?</h2>
          <ul>
            <li>rustc</li>
            <li>Mozilla Servo browser engine</li>
            <li>Skylight, a profiler for Rails apps</li>
          </ul>
        </section>

        <section>
          <h2>Libraries?</h2>
          <p>
            <a href="https://crates.io/">https://crates.io/</a>
          </p>
          <img src="static/crates.png" alt="crates.io site screenshot">
        </section>

        <section>
          <h2>FFI?</h2>
        </section>

        <section>
          <section data-background="#dddddd">
            <h2>Slide Backgrounds</h2>
            <p>
              Set <code>data-background="#dddddd"</code> on a slide to change the background color. All CSS color formats are supported.
            </p>
            <a href="#" class="navigate-down">
              <img width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Down arrow">
            </a>
          </section>
          <section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png">
            <h2>Image Backgrounds</h2>
            <pre><code>&lt;section data-background="image.png"&gt;</code></pre>
          </section>
          <section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png" data-background-repeat="repeat" data-background-size="100px">
            <h2>Tiled Backgrounds</h2>
            <pre><code style="word-wrap: break-word;">&lt;section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"&gt;</code></pre>
          </section>
          <section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm" data-background-color="#000000">
            <div style="background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;">
              <h2>Video Backgrounds</h2>
              <pre><code style="word-wrap: break-word;">&lt;section data-background-video="video.mp4,video.webm"&gt;</code></pre>
            </div>
          </section>
        </section>

        <section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
          <h2>Background Transitions</h2>
          <p>
            Different background transitions are available via the backgroundTransition option. This one's called "zoom".
          </p>
          <pre><code>Reveal.configure({ backgroundTransition: 'zoom' })</code></pre>
        </section>

        <section data-transition="slide" data-background="#b5533c" data-background-transition="zoom">
          <h2>Background Transitions</h2>
          <p>
            You can override background transitions per-slide.
          </p>
          <pre><code style="word-wrap: break-word;">&lt;section data-background-transition="zoom"&gt;</code></pre>
        </section>

        <section>
          <h2>Pretty Code</h2>
          <pre><code data-trim contenteditable>
function linkify( selector ) {
  if( supports3DTransforms ) {

    var nodes = document.querySelectorAll( selector );

    for( var i = 0, len = nodes.length; i &lt; len; i++ ) {
      var node = nodes[i];

      if( !node.className ) {
        node.className += ' roll';
      }
    }
  }
}
          </code></pre>
          <p>Code syntax highlighting courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p>
        </section>

        <section>
          <h2>Fantastic Ordered List</h2>
          <ol>
            <li>One is smaller than...</li>
            <li>Two is smaller than...</li>
            <li>Three!</li>
          </ol>
        </section>

        <section>
          <h2>Tabular Tables</h2>
          <table>
            <thead>
              <tr>
                <th>Item</th>
                <th>Value</th>
                <th>Quantity</th>
              </tr><commit_msg>Some slides on error handling<commit_after><!doctype html>
<html lang="en">

  <head>
    <meta charset="utf-8">

    <title>The Rust Programming Language</title>

    <meta name="description" content="A short intro to Rust for C++ programmers">
    <meta name="author" content="<NAME>">
    <meta name="author" content="<NAME>">

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

    <link rel="stylesheet" href="css/reveal.css">
    <link rel="stylesheet" href="css/theme/black.css" id="theme">

    <!-- Code syntax highlighting -->
    <link rel="stylesheet" href="lib/css/zenburn.css">

    <!-- Printing and PDF exports -->
    <script>
      var link = document.createElement( 'link' );
      link.rel = 'stylesheet';
      link.type = 'text/css';
      link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
      document.getElementsByTagName( 'head' )[0].appendChild( link );
    </script>

    <!--[if lt IE 9]>
    <script src="lib/js/html5shiv.js"></script>
    <![endif]-->
  </head>

  <body>

    <div class="reveal">

      <!-- Any section element inside of this container is displayed as a slide -->
      <div class="slides">
        <section>
          <h1>Rust</h1>
          <h3>Intro for C++ programmers</h3>
          <img src="http://www.rust-lang.org/logos/rust-logo-256x256.png" alt="Rust logo">
          <p>
            <small>Created by <a href="https://github.com/flanfly">Kai</a> / <a href="http://twitter.com/_cibo_">@_cibo_</a></small>
            <small>and <a href="https://github.com/bkircher">Ben</a> / <a href="http://twitter.com/predatorhat">@predatorhat</a></small>
          </p>
        </section>

        <section>
          <h2>Hello, there!</h2>
          <p>
            reveal.js enables you to create beautiful interactive slide decks using HTML. This presentation will show you examples of what it can do.
          </p>
          <pre><code data-trim contenteditable>
fn main() {
    println!("Hello, there!");
}
          </code></pre>
        </section>

        <section>
          <h2>Slides</h2>
          <p>
            Not a coder? Not a problem. There's a fully-featured visual editor for authoring these, try it out at <a href="http://slides.com" target="_blank">http://slides.com</a>.
          </p>
        </section>

        <section>
          <h2>Who is using Rust?</h2>
          <ul>
            <li>rustc</li>
            <li>Mozilla Servo browser engine</li>
            <li>Skylight, a profiler for Rails apps</li>
          </ul>
        </section>

        <section>
          <h2>Libraries?</h2>
          <p>
            <a href="https://crates.io/">https://crates.io/</a>
          </p>
          <img src="static/crates.png" alt="crates.io site screenshot">
        </section>

        <section>
          <h2>FFI?</h2>
        </section>

        <section>
          <section data-background="#dddddd">
            <h2>Slide Backgrounds</h2>
            <p>
              Set <code>data-background="#dddddd"</code> on a slide to change the background color. All CSS color formats are supported.
            </p>
            <a href="#" class="navigate-down">
              <img width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Down arrow">
            </a>
          </section>
          <section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png">
            <h2>Image Backgrounds</h2>
            <pre><code>&lt;section data-background="image.png"&gt;</code></pre>
          </section>
          <section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png" data-background-repeat="repeat" data-background-size="100px">
            <h2>Tiled Backgrounds</h2>
            <pre><code style="word-wrap: break-word;">&lt;section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"&gt;</code></pre>
          </section>
          <section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm" data-background-color="#000000">
            <div style="background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;">
              <h2>Video Backgrounds</h2>
              <pre><code style="word-wrap: break-word;">&lt;section data-background-video="video.mp4,video.webm"&gt;</code></pre>
            </div>
          </section>
        </section>

        <section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
          <h2>Background Transitions</h2>
          <p>
            Different background transitions are available via the backgroundTransition option. This one's called "zoom".
          </p>
          <pre><code>Reveal.configure({ backgroundTransition: 'zoom' })</code></pre>
        </section>

        <section data-transition="slide" data-background="#b5533c" data-background-transition="zoom">
          <h2>Background Transitions</h2>
          <p>
            You can override background transitions per-slide.
          </p>
          <pre><code style="word-wrap: break-word;">&lt;section data-background-transition="zoom"&gt;</code></pre>
        </section>

        <section>
          <h2>Small Peek Into Error Handling</h2>
        </section>

        <section>
          <p><a href="http://doc.rust-lang.org/1.0.0-beta.5/std/macro.panic!.html">panic!</a> unwinds the thread</p>
          <pre><code class="rust" data-trim contenteditable>
fn guess(n: i32) -&gt; bool {
    if n < 1 || n > 10 {
        panic!("Invalid number: {}", n);
    }
    n == 5
}

fn main() {
    guess(11);
}
          </code></pre>
        </section>

        <section>
          <p>
            <a href="http://doc.rust-lang.org/1.0.0-beta.5/std/option/enum.Option.html">std::option::Option</a>
          </p>
          <pre><code class="rust" data-trim contenteditable>
enum Option&lt;T&gt; {
    None,
    Some(T),
}
          </code></pre>
        </section>

        <section>
          <p>Option&lt;T&gt;</p>
          <pre><code class="rust" data-trim contenteditable>
fn find(haystack: &amp;str, needle: char) -&gt; Option&lt;usize&gt; {
    for (offset, c) in haystack.char_indices() {
        if c == needle {
            return Some(offset);
        }
    }
    None
}

fn main() {
    let filename = "foobar.txt";
    match find(filename, '.') {
        Some(i) =&gt; println!("Filename extension: {}", &amp;filename[i+1..]),
        None =&gt; println!("No extension found!"),
    }
}
          </code></pre>
        </section>

        <section>
          <h2>Thoughts on Error Handling in Rust</h2>
          <p>Somewhat mixed...</p>
          <ol>
            <li>Way better than arbitrary return values</li>
            <li>Seems harder to use than exceptions</li>
            <li>Anyone?</li>
          </ol>
        </section>

        <section>
          <h2>Tabular Tables</h2>
          <table>
            <thead>
              <tr>
                <th>Item</th>
                <th>Value</th>
                <th>Quantity</th>
              </tr>
{'fraction_non_alphanumeric': 0.16896993873771193, 'fraction_numerical': 0.01389086764496367, 'mean_word_length': 2.182003626473255, 'pattern_counts': {'":': 0, '<': 406, '<?xml version=': 0, '>': 406, 'https://': 18, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '163112', 'n_tokens_mistral': 4586, 'n_tokens_neox': 4414, 'n_words': 884}