From 3b8d5d9f6046164a7a3d8df94f9f5b8bd0161d7b Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 11 Feb 2019 21:04:32 -0200 Subject: [PATCH 1/2] Cool things about rust --- _images/rust.png | Bin 0 -> 4585 bytes cargo-cult.html | 4 + rust-legal.html | 365 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 369 insertions(+) create mode 100644 _images/rust.png create mode 100644 rust-legal.html diff --git a/_images/rust.png b/_images/rust.png new file mode 100644 index 0000000000000000000000000000000000000000..95257d597a958e8f76dfe5bc0b087b563f852ec2 GIT binary patch literal 4585 zcmeHKc{tST9-pl-O=D=0b*_<3f4cW9_j&Gp?mf>r=ehr!d1jv9yzlq(`F`K`^Srtcm6a7Pm&@bvzI^$@=ktX^AuzDN zK7T3jXDh&!;gM(u%&+>4`w)kudGb zH{aaoB}|5=Y}yFQDP^yS(bF?EuYY6lJHC^92Ftn)T{I(Iwz>&2#%>wrHav5CfGnCV zzDJ)+AG>{bA^7}{M`YW0hK?7w%N20u`8y_OFv6hA&wfbN^do4r4Ma~I;x@uZ^Y4kq zGg38cMOnR`M_&s=mTD~t4lxzg1Otaj$4YzglQ8c{fDQH89W5nD1XR~ z{-}Hb8YHj%GH>_Y`8-jUsiQ2dPhm6WCuS8m46|l@Fn@n8@fk}cb*T-!GcnQMWvk># z7sw_aM`V4EZK>L3apM4N<+V2gNV5X}oh*`S6|BOMfj39j!YmMlibRCpcedQuI4pd0 zySXtILp65qekiyXK|U^7RGyi$9r}u>sasVMxxu__S5!+v5t!@yjRNf|L81J#(^p+s zhiR7y`jD7<`e|ueVue5y#Zs`otq@GWHI`}2@07igt-~7xbBE*P1qJvE!qw#{^O@O$ zYTzr`!zuH7Z_>eGc4pYk*HA3fKwY6QEDY(!eg3X}p?Bs|>cwAdD05~#C$Za`h49*T z9h^x8mrAXK2l7zTRLcWS2H4>h@|M`Bg3qx$J10Q&k&BJ#no-8XFJ`){S1jwq<{$5m ze4&DBZ_ez-3A5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(P4T1yzG z6IrgHCYP~*h;@(bogX3T0<>IDJXOpq-{eeU_XhVy)%QZBKg*(}9k}^zdSiy+W!1FC z9uD=AehZ(|{J9ACL2Njo2)7hElzUZ6xaYxzoot>-wZ~4&Rg7MVC$JQLZpcc3IKu&H z8zq9Cl3Ivbb93)!Hv>#fs~CReR($B28a!Q~^hh(Iv<@m#l_(B_LVjCgw};@a0=B7Q zcyV4ZB^qNo7AJ$_%}9R^%w*tZk3G}MX)5>Ady0RxQCUsJuqV1Ss1*_bHCf#~-y_NJDoc zJn?a){($pgz#E5yU1SN^R+vMQPcLdq$B=FFKKG6 zR7(I5_P*L`^nLZ|%&oyLM?ZBTx9C4qxuY{;8d;-0jc?dhV+?Broa$#FYqOoFdzh!Zy%Zh2w6 zykY;7#*DZuK}6`Uf$Piu1(+21{|DN0r_m2eoAw8LHm->VobeM~-)(g(ZJMzEhyrA$ z#AubByD##lXE>)uYZ&7M9QWeN6d$X^vL4c+>RC7v;{?pqzV)_(T}W(I*AHObkZNy#%X4wZ0Ut1c**&5fBDI>3O*M{7W8mIPlr4d7 z=@07cQK|)Y0b;M+)u)Wkmz3kH~pCp#mqP1pF$)tWS&$AJ^z{cQx z9fgSND=WXUYHu+6ytfakT}ig`M`(!8w=ZY9UP-jzXRrHvgfsVV0QQ@Sr-N>P21dRF z*f5b_LsQc!o8PKVJAx{Ikd|qxXl?npLI5hr;=VNj#A*v~y>Sifgk&srbV;RI>7IHn zGSxMZ&&extsV(gIlFYK#_2F= zYNozn-Qezl8m{;)JKQYBX)PnZ7N#M{w9Kc$he|Y|9|@TyRLG;HE{ARZ+=V&o`Zl8bN~PV literal 0 HcmV?d00001 diff --git a/cargo-cult.html b/cargo-cult.html index ff8a2c9..a172951 100644 --- a/cargo-cult.html +++ b/cargo-cult.html @@ -62,6 +62,10 @@ font-style: italic; font-weight: bold; } + + .semi-opaque { + background-color: rgba(0, 0, 0, 0.7); + } diff --git a/rust-legal.html b/rust-legal.html new file mode 100644 index 0000000..55054e4 --- /dev/null +++ b/rust-legal.html @@ -0,0 +1,365 @@ + + + + + + Rust + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+

O Que Rust Tem de Legal

+
+
+ +
+
+

Borrow Checker

+
+ +
+

+a = 2
+						
+
+ +
+ "Variável a tem o valor 2" +
+ +
+
+ "Posição de memória apontada por a tem o valor 2" +
+ +
+

+0x3f5cbf89 = 2
+							
+
+
+ +
+
+ A language that doesn't affect the way you think + about programming, is not worth knowing. +
+ +
+ -- Alan Perlis, "ALGOL" +
+
+ +
+

+fn main() {
+    let a = String::from("hello");
+    let _b = a;
+    println!("{}", a)
+}
+						
+
+ +
+

+error[E0382]: borrow of moved value: `a`
+ --> src/main.rs:5:20
+  |
+4 |     let _b = a;
+  |              - value moved here
+5 |     println!("{}", a)
+  |                    ^ value borrowed here after move
+  |
+  = note: move occurs because `a` has type `std::string::String`, which does not implement the `Copy` trait
+						
+
+ +
+

+fn main() {
+    let a = 2;
+    let b = a;
+    println!("{}", a);
+    println!("{}", b);
+}
+						
+
+ +
+

+2
+2
+						
+
+ +
+ Swift 5 Exclusivity Enforcement +
+
+ +
+
+

Imutabilidade por Default

+
+ +
+

+fn main() {
+    let a = 2;
+    a = 3;
+    println!("{}", a);
+}
+						
+
+ +
+

+3 |     let a = 2;
+  |         -
+  |         |
+  |         first assignment to `a`
+  |         help: make this binding mutable: `mut a`
+4 |     a = 3;
+  |     ^^^^^ cannot assign twice to immutable variable
+						
+
+ +
+

+fn main() {
+    let mut a = 2;
+    a = 3;
+    println!("{}", a);
+}
+						
+
+
+ +
+
+

Enums

+
+ +
+

+enum IpAddr {
+   V4,
+   V6
+}
+						
+
+ +
+

+enum IpAddr {
+    V4(String),
+    V6(String),
+}
+						
+
+ +
+

+let home = IpAddr::V4(String::from("127.0.0.1");
+
+match home {
+    V4(address) => println!("IPv4 addr: {}", address),
+    V6(address) => println!("Ipv6 addr: {}", address),
+}
+						
+
+ +
+

+enum Option<T> {
+    Some(T),
+    None
+}
+						
+
+
+ +
+
+

Error Control

+
+ +
+

+try:
+    something()
+except Exception:
+    pass
+						
+
+ +
+

+try {
+   something();
+} catch (Exception ex) {
+   System.out.println(ex);
+}
+						
+
+ +
+

+FILE* f = fopen("someting.txt", "wb");
+fprintf(f, "Done!");
+fclose(f);
+						
+
+ +
+
+ Onde o erro foi tratado nisso? +
+
+ +
+

+enum Result<T, E> {
+    Ok(T),
+    Err(E),
+}
+						
+
+ +
+

+File::create("something.txt") match {
+    Ok(fp) => fp.write_all(b"Hello world"),
+    Err(err) => println!("Failure! {}", err),
+}
+						
+
+ +
+

+File::create("something.txt") match {
+    Ok(fp) => fp.write_all(b"Hello world") match {
+        Ok(_) => (),
+        Err(err) => println!("Can't write! {}", err),
+    }
+    Err(err) => println!("Failure! {}", err),
+}
+						
+
+ +
+

+let mut file = File::create("something.txt).unwrap();
+file.write(b"Hello world").unwrap();
+                        
+
+ +
+

+let mut file = File::create("something.txt)?;
+file.write(b"Hello world")?;
+OK(())
+                        
+
+
+ +
+
+
+
+ + + + + + + + From 0cab003cad5f410164008a883d9336b2f50eaffc Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 13 Feb 2019 12:39:57 -0200 Subject: [PATCH 2/2] More rust --- _images/rust-issues.png | Bin 0 -> 18314 bytes rust-legal.html | 115 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 _images/rust-issues.png diff --git a/_images/rust-issues.png b/_images/rust-issues.png new file mode 100644 index 0000000000000000000000000000000000000000..8d2109f843acbf54f33495db75e8b77fab96992b GIT binary patch literal 18314 zcmcG$Wmp_b)c8q)1qlQQZpkG`aCZwH+}+)6a3?@;2=4Cg?(RCc4Q_)w0|QI${qH{e z>3#OYyYr#Dy5w}%Dd{@DJ~g58vf>|+36No6U_Sno5K)AId4KR0j{1P`c8oPD1iYQ# z075^NKfL|CJ{X6*UE@26syiv!nL4=|IGVti+1lBd&;g7bO-yV7=5|i!uwDExFkfJP ziu_P^OFvn6*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1(ZuA2K@S3R$9@<>QktDZ`!BNc$VF!VeV34s z0MeI)QSi!t#WCO7l7VB;-Me><@w-Ul4(2Af8NYKMt0Vinm_Fh;%dr#J2#tv%?7;=Y z!@=dV$hH)6v|wU?R@b%09n4LrU|i`w3a9qjFqDYMz|ee!$!o3<`}s?3>~zm>dFEaB za^%b%UUc}k+lT%(KWsV8B2y@hsl%Slw!{z&Hs^exJH@ulg)CgVpWhlic)iUu)a0?@ z5IAQ=^>=Zd@_L)8D|2(gHl5iq3g#jrB5;F}t>;OozDh&$ZEm#Q;+Og+RyIJ~B>(PT zZrHZO2#mE`%Rpy~r?B(_D{}Hks=l|t&>ZAo<{B5dMhw1ZDwsF3gx?8dM*ad~4OpUx zh{#hHFr12vRu;IMm{50bp{B)VA$k4_xExP--1BL+C5B*}X)XUZUJo9x4O@5n2lp!v zr%#-Nu~CdObe$q1BK@TGHZ83~7}4E)_h+pw={E}JA|fIpA_k$~LqtSGL_`ci;ao&S zL`1|O6wXCNL_|akLg8FQL_|cyAQa9;L_|bH3_{^tL_|bH#2^&TMMOkIL<~aVTtq}f cM8qKe1^2|4A$SqkCjbBd07*qoM6N<$f{9Oi1ONa4 literal 0 HcmV?d00001 diff --git a/rust-legal.html b/rust-legal.html index 55054e4..2579a4d 100644 --- a/rust-legal.html +++ b/rust-legal.html @@ -156,6 +156,8 @@ fn main() { 2 2 + +

"Copy trait"

@@ -329,6 +331,119 @@ OK(())
+
+
+

Crazy stuff

+
+ +
+ How Rust’s standard library was vulnerable for years and nobody noticed +
+ +
+ No, the problem isn’t “bad coders” +
+ +
+ 4.5k issues no Github +
+ +
+ rustup + +
+ stable-x86_64-pc-windows-msvc +
+ +
+ armv7-unknown-linux-gnueabihf +
+ +
+ wasm32-unknown-unknown (WebAssembly) +
+
+
+ +
+
+

Bibliotecas

+
+ +
+

Rayon

+ +

+fn sum_of_squares(input: &[i32]) -> i32 {
+    input.iter()
+         .map(|&i| i * i)
+         .sum()
+}
+						
+
+ +
+

Rayon

+ +

+fn sum_of_squares(input: &[i32]) -> i32 {
+    input.par_iter()
+         .map(|&i| i * i)
+         .sum()
+}
+						
+
+ +
+

Log-Derive

+ +

+#[logfn(ok = "TRACE", err = "ERROR")]
+fn call_isan(num: &str) -> Result<Success, Error> {
+    if num.len() >= 10 && num.len() <= 15 {
+        Ok(Success)
+    } else {
+        Err(Error)
+    }
+}
+                        
+
+
+ +
+
+

E quem usa?

+
+ +
+

Magic Pocket

+ +

Dropbox

+ +

Petabyte storage

+
+ +
+

Servo

+ +

Mozilla

+ +

Base do Firefox Quantum

+
+ +
+

Azure

+ +

Microsoft

+ +

Usado na parte de IoT do Azure

+
+ +
+

Tor

+
+
+