From 03b6f4456de62133e9a38b29396541edbeeaedaf Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 23 Sep 2019 13:25:03 -0300 Subject: [PATCH] Trying to reduce the Rust presentation size --- porque-rust.html | 160 +++++++++++------------------------------------ 1 file changed, 38 insertions(+), 122 deletions(-) diff --git a/porque-rust.html b/porque-rust.html index 8a327d8..9b9239c 100644 --- a/porque-rust.html +++ b/porque-rust.html @@ -132,24 +132,11 @@

- Basic - (com números e estruturado) - , dBase III Plus - , Clipper - , Pascal - , Cobol - , Delphi (ObjectPascal) - , C - , C++ - , ActionScript (Flash) - , PHP - , JavaScript - , Python - , Objective-C - , Clojure - , Java - , Scala - , Rust. + Basic (com números e estruturado), dBase III Plus, + Clipper, Pascal, Cobol, Delphi (ObjectPascal), + C, C++, ActionScript (Flash), PHP, JavaScript, + Python, Objective-C, Clojure, Java, Scala + , Rust.

@@ -257,25 +245,13 @@ pra cima e pra baixo, Rust tem todas as abstrações de alto nível que estamos acostumados com outras linguagens. - - - -
- - -
-
- - -
-
- -
-
presente := Presente { ... }
 canal <- presente
@@ -623,12 +596,9 @@ presente.abrir()

Hora da anedota!

-
- -
-

localtime

-

SimpleDateFormatter

+

localtime

+

SimpleDateFormatter

-
-
-

Macros

- - ? -
-
-

Structs

@@ -834,7 +796,7 @@ struct Gift {

Structs


-let presente = Gift { "red", "A GIFT!" };
+let presente = Gift { package_color: "red", content: "A GIFT!" };
 						
@@ -863,11 +825,11 @@ trait Summary {

-struct Super {
+struct Phrase {
     phrase: String
 }
 
-impl Summary for Super {
+impl Summary for Phrase {
     fn summarize(&self) -> String {
         self.phrase
             .split_whitespace()
@@ -880,7 +842,7 @@ impl Summary for Super {
                     
                     

-fn get_summary(summarizable: T) -> String
+fn get_summary<T>(summarizable: T) -> String
     where T: Summary
 {
     ...
@@ -900,6 +862,29 @@ struct Point<T> {
                     
+
+
+

Macros

+ + ? +
+ +
+

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)
+    }
+}
+                        
+
+
+

@@ -966,10 +951,6 @@ test tests::testing ... ok
rustup -
- stable-x86_64-pc-windows-msvc -
-
armv7-unknown-linux-gnueabihf
@@ -980,71 +961,6 @@ test tests::testing ... ok

- - -
-
-

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 agora?