<h1 id="Talking-Points">Talking Points</h1>
<ul>
<li>What is Rust?
<ul>
<li>" Garbage Collection " - Resource Acquisition Is Initialization (RAII)</li>
<li>Strict Typing with Type Inference</li>
<li>Reference pointers</li>
<li>Immutable by default</li>
<li>Unsafe Mode</li>
</ul></li>
<li>Why use Rust over Python?
<ul>
<li>Speed</li>
<li>Compiled
<ol>
<li>Help from compiler</li>
<li>Smaller binary size</li>
<li>Useful in high throughput/embedded applications</li>
</ol></li>
<li>Logically consistent</li>
</ul></li>
<li>Why use Rust over C?
<ul>
<li>Safe by default</li>
<li>Easier to read</li>
<li>Forces you to write good code</li>
<li>Arrays without stupidity++ and built in vectors</li>
<li>Option&lt;T&gt; and Result&lt;T&gt; or a match {} made in heaven</li>
</ul></li>
</ul>
<hr />
<h1 id="Show-Notes">Show Notes</h1>
<h2 id="Strict-Typing">Strict Typing</h2>
<pre><code>fn main() {

    // Type declared with var: &lt;T&gt; syntax
    let penguin_one: &amp;str = &quot;gentoo&quot;;
    
    // Type &amp;str is inherited from &quot;gentoo&quot;
    let penguin_two = &quot;gentoo&quot;;
    
    // Will not panic if they are the same
    assert_eq!(penguin_one, penguin_two);
}</code></pre>
<h2 id="Reference-Pointers">Reference Pointers</h2>
<p><span id="Wrong-Way:"></span><strong>Wrong Way:</strong></p>
<pre><code>fn print_u8_vector(vec: Vec&lt;u8&gt;) {
    println!(&quot;{:?}&quot;, vec);
}

fn main() {
    let penguin_ages: Vec&lt;u8&gt; = vec!(2, 4, 6);
    print_u8_vector(penguin_ages);
    
    // This line will throw an error
    println!(&quot;{}&quot;, penguin_ages[0]);
}</code></pre>
<p><span id="Correct-Way:"></span><strong>Correct Way:</strong></p>
<pre><code>fn print_u8_vector(vec: &amp;Vec&lt;u8&gt;) {
    println!(&quot;{:?}&quot;, vec);
}

fn main() {
    let penguin_ages: Vec&lt;u8&gt; = vec!(2, 4, 6);
    print_u8_vector(&amp;penguin_ages);
    
    // This line will print &#39;2&#39;
    println!(&quot;{}&quot;, penguin_ages[0]);
}</code></pre>
<h2 id="Immutable-By-Default">Immutable By Default</h2>
<p><span id="Wrong-Way:"></span><strong>Wrong Way:</strong></p>
<pre><code>fn main() {
    let my_num = 2;
    
    // This line will throw an error
    my_num = my_num + 1;
    println!(&quot;{}&quot;, my_num);
}</code></pre>
<p><span id="Correct-Way:"></span><strong>Correct Way:</strong></p>
<pre><code>fn main() {
    let mut my_num = 2;
    my_num = my_num + 1;
    
    // This line will print &#39;3&#39;
    println!(&quot;{}&quot;, my_num);
}</code></pre>
<h2 id="Unsafe-Code">Unsafe Code</h2>
<p><span id="Hello-World-Program-in-C-in-Rust:"></span><strong>Hello World Program in C in Rust:</strong></p>
<pre><code>extern &quot;C&quot; {
    fn printf(input: &amp;str);
}

fn main() {
    unsafe {
        printf(&quot;Hello, World!&quot;);
    }
}</code></pre>
<ul>
<li><span id="Important-Links"></span><strong>Important Links</strong>:
<ul>
<li><a href="https://www.rust-lang.org">Rust Programming Language Homepage</a></li>
<li><a href="https://play.rust-lang.org/">Rust Playground</a></li>
<li><a href="https://invidious.snopyta.org/watch?v=yOyaJXpAYZQ">Ben Eater: Comparing C to machine language</a> &lt;WARNING: YouTube Hosted&gt;</li>
</ul></li>
</ul>
<ul>
<li><span id="Wikipedia-Pages"></span><strong>Wikipedia Pages</strong>:
<ul>
<li><a href="https://en.wikipedia.org/wiki/Rust_(programming_language)">Rust Programming Language Wikipedia article</a></li>
<li><a href="https://en.wikipedia.org/wiki/Resource_acquisition_is_initialization">Resource Acquisition Is Initialization (RAII)</a></li>
</ul></li>
</ul>
<hr />
<h4 id="Contact-Me">Contact Me</h4>
<p><span id="Email:"></span><strong>Email:</strong> <a href="mailto:izzyleibowitz@pm.me">izzyleibowitz at pm dot me</a></p>
<p><span id="Mastodon:"></span><strong>Mastodon:</strong> <a href="https://nixnet.social/BlacKernel">at blackernel at nixnet dot social</a></p>