Browse Source

Trying to reduce the Rust presentation size

master
Julio Biason 5 years ago
parent
commit
03b6f4456d
  1. 160
      porque-rust.html

160
porque-rust.html

@ -132,24 +132,11 @@
</h2> </h2>
<p> <p>
<span class="fragment">Basic</span> Basic (com números e estruturado), dBase III Plus,
<span class="fragment"> (com números e estruturado)</span> Clipper, Pascal, Cobol, Delphi (ObjectPascal),
<span class="fragment">, dBase III Plus</span> C, C++, ActionScript (Flash), PHP, JavaScript,
<span class="fragment">, Clipper</span> Python, Objective-C, Clojure, Java, Scala
<span class="fragment">, Pascal</span> <strong>, Rust.</strong>
<span class="fragment">, Cobol</span>
<span class="fragment">, Delphi (ObjectPascal)</span>
<span class="fragment">, C</span>
<span class="fragment">, C++</span>
<span class="fragment">, ActionScript (Flash)</span>
<span class="fragment">, PHP</span>
<span class="fragment">, JavaScript</span>
<span class="fragment">, Python</span>
<span class="fragment">, Objective-C</span>
<span class="fragment">, Clojure</span>
<span class="fragment">, Java</span>
<span class="fragment">, Scala</span>
<span class="fragment"><strong>, Rust.</strong></span>
</p> </p>
<aside class="notes"> <aside class="notes">
@ -162,6 +149,7 @@
- Perl - Perl
- Ruby - Ruby
- Haskell - Haskell
- Swift
</aside> </aside>
</section> </section>
@ -257,25 +245,13 @@
pra cima e pra baixo, Rust tem todas as abstrações pra cima e pra baixo, Rust tem todas as abstrações
de alto nível que estamos acostumados com outras de alto nível que estamos acostumados com outras
linguagens. linguagens.
</aside>
</section>
<section>
<img src="_images/nope.gif" alt="" class="stretch">
<aside class="notes">
Honestamente, se surgir uma nova linguagem que Honestamente, se surgir uma nova linguagem que
tenha mais proteções de memória, com performance tenha mais proteções de memória, com performance
ainda melhor que C mas eu tiver que escrever uma ainda melhor que C mas eu tiver que escrever uma
lista encadeada mais uma vez, eu destruo todas as lista encadeada mais uma vez, eu destruo todas as
coisas tecnológicas ao meu redor... coisas tecnológicas ao meu redor...
</aside>
</section>
<section>
<img src="_images/potato-farming-300x225.jpg" alt="" class="stretch">
<aside class="notes">
E vou plantar batata. E vou plantar batata.
... porque aprendemos absolutamente NADA sobre ... porque aprendemos absolutamente NADA sobre
@ -291,10 +267,11 @@
<section> <section>
<pre><code class="hljs rust" data-trim> <pre><code class="hljs rust" data-trim>
fn main() { fn main() -&lt; int{
let a = 2; let a = 2;
a = 3; a = 3;
println!("{}", a); println!("{}", a);
0
} }
</code></pre> </code></pre>
@ -569,10 +546,6 @@ fn main() {
</aside> </aside>
</section> </section>
<section>
<img class="stretch" src="_images/builds-character.png" alt="">
</section>
<section data-transition="fade"> <section data-transition="fade">
<pre><code class="hljs go" data-trim>presente := Presente { ... } <pre><code class="hljs go" data-trim>presente := Presente { ... }
canal &lt;- presente canal &lt;- presente
@ -623,12 +596,9 @@ presente.abrir()</code></pre>
<h2>Hora da anedota!</h2> <h2>Hora da anedota!</h2>
<img class="stretch" src="_images/senta-que-la-vem-historia.gif" alt=""> <img class="stretch" src="_images/senta-que-la-vem-historia.gif" alt="">
</section>
<section>
<p>localtime</p>
<p class="fragment">SimpleDateFormatter</p> <p class="fragment"><code>localtime</code></p>
<p class="fragment"><code>SimpleDateFormatter</code></p>
<aside class="notes"> <aside class="notes">
A muito tempo atrás, eu estava ajudando uma colega A muito tempo atrás, eu estava ajudando uma colega
@ -703,7 +673,7 @@ enum IpAddr {
<section> <section>
<pre><code class="hljs rust" data-trim> <pre><code class="hljs rust" data-trim>
let home = IpAddr::V4(String::from("127.0.0.1"); let home = IpAddr::V4(String::from("127.0.0.1"));
match home { match home {
V4(address) =&gt; println!("IPv4 addr: {}", address), V4(address) =&gt; println!("IPv4 addr: {}", address),
@ -806,14 +776,6 @@ OK(())
</section> </section>
</section> </section>
<section>
<section>
<h2>Macros</h2>
<small class="fragment">?</small>
</section>
</section>
<section> <section>
<section> <section>
<h2>Structs</h2> <h2>Structs</h2>
@ -834,7 +796,7 @@ struct Gift {
<h2>Structs</h2> <h2>Structs</h2>
<pre><code class="hljs rust" data-trim> <pre><code class="hljs rust" data-trim>
let presente = Gift { "red", "A GIFT!" }; let presente = Gift { package_color: "red", content: "A GIFT!" };
</code></pre> </code></pre>
</section> </section>
</section> </section>
@ -863,11 +825,11 @@ trait Summary {
<section> <section>
<pre><code class="hljs rust" data-trim> <pre><code class="hljs rust" data-trim>
struct Super { struct Phrase {
phrase: String phrase: String
} }
impl Summary for Super { impl Summary for Phrase {
fn summarize(&amp;self) -&gt; String { fn summarize(&amp;self) -&gt; String {
self.phrase self.phrase
.split_whitespace() .split_whitespace()
@ -880,7 +842,7 @@ impl Summary for Super {
<section> <section>
<pre><code class="hljs rust" data-trim> <pre><code class="hljs rust" data-trim>
fn get_summary(summarizable: T) -&gt; String fn get_summary&lt;T&gt;(summarizable: T) -&gt; String
where T: Summary where T: Summary
{ {
... ...
@ -900,6 +862,29 @@ struct Point&lt;T&gt; {
</section> </section>
</section> </section>
<section>
<section>
<h2>Macros</h2>
<small class="fragment">?</small>
</section>
<section>
<h3>Log-Derive</h3>
<pre><code>
#[logfn(ok = "TRACE", err = "ERROR")]
fn call_isan(num: &amp;str) -&gt; Result&lt;Success, Error&gt; {
if num.len() &gt;= 10 &amp;&amp; num.len() &lt;= 15 {
Ok(Success)
} else {
Err(Error)
}
}
</code></pre>
</section>
</section>
<section> <section>
<section> <section>
<h2> <h2>
@ -966,10 +951,6 @@ test tests::testing ... ok
<section> <section>
<a href="https://rustup.rs/">rustup</a> <a href="https://rustup.rs/">rustup</a>
<div class="fragment">
<small>stable-x86_64-pc-windows-msvc</small>
</div>
<div class="fragment"> <div class="fragment">
<small>armv7-unknown-linux-gnueabihf</small> <small>armv7-unknown-linux-gnueabihf</small>
</div> </div>
@ -980,71 +961,6 @@ test tests::testing ... ok
</section> </section>
</section> </section>
<!--
<section>
<section>
<h2>Falando em WASM...</h2>
</section>
<section>
<h2>WASM</h2>
<p><a href="https://rustwasm.github.io/wasm-pack/installer/">wasm-pack</a></p>
</section>
<section>
<h2><a href="https://wasi.dev/">WASI</a></h2>
<p>The WebAssembly System Interface</p>
</section>
</section>
-->
<section>
<section>
<h2>Bibliotecas</h2>
</section>
<section>
<h3>Rayon</h3>
<pre><code>
fn sum_of_squares(input: &amp;[i32]) -&gt; i32 {
input.iter()
.map(|&amp;i| i * i)
.sum()
}
</code></pre>
</section>
<section>
<h3>Rayon</h3>
<pre><code>
fn sum_of_squares(input: &amp;[i32]) -&gt; i32 {
input.par_iter()
.map(|&amp;i| i * i)
.sum()
}
</code></pre>
</section>
<section>
<h3>Log-Derive</h3>
<pre><code>
#[logfn(ok = "TRACE", err = "ERROR")]
fn call_isan(num: &amp;str) -&gt; Result&lt;Success, Error&gt; {
if num.len() &gt;= 10 &amp;&amp; num.len() &lt;= 15 {
Ok(Success)
} else {
Err(Error)
}
}
</code></pre>
</section>
</section>
<section> <section>
<h2>E agora?</h2> <h2>E agora?</h2>

Loading…
Cancel
Save