Something went wrong. Try again.
Slides used by the Rust Peru community for their talk to the Tecsup community
Something went wrong. Try again.
tecsup-slides main.typ
11 kB · 435 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436#import "./template.typ": *
#set math.mat(delim: "[")#set text(font: "IoskeleyMonoTerm Nerd Font")#show math.equation: set text(font: "Fira Math")
#import "@preview/codly:1.3.0": *#import "@preview/codly-languages:0.1.1": *#import "@preview/cetz:0.5.2"#show: codly-init.with()#codly(languages: codly-languages)
#show: slides.with( title: "Rust Perú", subtitle: "Descubre Rust", date: "En colaboración con la IEEE ComSoc Tecsup, 30/07/2026", corner-logo: image("./figures/rust-peru-logo.png"), authors: "Germán M. Heim", affiliations: [ Grover Córdova #v(0.15em) Max Jacinto ],
ratio: 16 / 9, layout: "medium", count: "number", title-color: rgb("#f0742c"), toc: false, theme: "full",)
= ¡Bienvenidos a la comunidad!
== Un poco de nosotros
#columns(2, gutter: -5%)[ #image("/figures/comunidad.jpeg", width: 90%, fit: "contain")
#colbreak()
#image("/figures/rust_peru_qr.svg")]
= El origen del lenguaje
== Trauma compartido
#columns(2, gutter: -5%)[ #image("/figures/spongebob_office.jpg", width: 90%, fit: "contain") #colbreak() #image("/figures/java_error_logs.png")]
== La decisión que cambió todo
#columns(2, gutter: -5%)[ #image("/figures/elevator.jpg", width: 90%, fit: "contain") #colbreak() #image("/figures/graydon.jpg")]
== De inicios humildes a recibir apoyo de gigantes
#let concept-box(body) = box( width: 5cm, height: 2.25cm, inset: (x: 1em, y: 0.35em), radius: 0.45em, fill: gray.lighten(95%), stroke: 1pt + rgb("#f0742c"),)[#align(center + horizon)[#text(1.25em, weight: "bold")[#body]]]
#v(2.6cm)#align(center)[ #grid( columns: (auto, auto, auto), gutter: 1em, align: horizon, concept-box([#image("/figures/mozilla_logo.svg")]), box(height: 1.75cm)[#align(center + horizon)[#text( 2em, weight: "bold", fill: rgb("#f0742c"), )[$arrow.r.long$]]], concept-box([#image("/figures/rf-logo-primary-black.png")]), )]
= ¿Cómo logró Rust diferenciarse del resto?
== Comparación con lenguajes "industry-standard"
#table( columns: (2fr, 2fr, 2fr, 4fr), align: (left + horizon, center + horizon, center + horizon, left + horizon), stroke: 0.5pt + luma(180), fill: (x, y) => if y == 0 { rgb("f0f0f0") } else { none },
[*Lenguaje*], [*Velocidad*], [*Seguridad de memoria*], [*¿Cómo lo logra?*],
[C / C++], [#text(fill: green.darken(20%), weight: "bold", "Ultrarrápido")], [#text(fill: red, weight: "bold", "Inseguro")], [Gestión manual de memoria (`malloc`/`free`, punteros).],
[Java / Python / Go], [#text(fill: orange, weight: "bold", "Moderado / Lento")], [#text(fill: green.darken(20%), weight: "bold", "Seguro")], [Un *Garbage Collector (GC)* escanea la RAM en tiempo de ejecución para liberar memoria.],
[Rust], [#text(fill: green.darken(20%), weight: "bold", "Ultrarrápido")], [#text(fill: green.darken(20%), weight: "bold", "Seguro")], [*Ownership* y *Borrow Checker* en tiempo de compilación. ¡Libre de GC!],)
== Dejando atrás el GC
#image("/figures/rust_ownership_3.png", width: 90%)
== Ownership & Borrow Checking
//#columns(2, gutter: 18pt)[== Ownership (Propiedad)
- *Un único dueño:* Cada valor en memoria pertenece a una sola variable propietaria a la vez.- *Liberación automática:* Cuando el dueño sale de su ámbito (_scope_), la memoria se libera inmediatamente.- *Semántica de transferencia (_Move_):* Asignar un valor a otra variable transfiere su propiedad e inhabilita la variable original, evitando la doble liberación de memoria (_double free_).- *Cero costo en ejecución:* Toda la gestión se resuelve en tiempo de compilación.
== Borrow Checker (Préstamos)
- *Referencias siempre válidas:* Garantiza antes de ejecutar el programa que ningún puntero apunte a memoria que ya fue liberada.- *Exclusión mutua de acceso:* Permite infinitas referencias de lectura (`&T`) *_o_* una sola referencia de escritura (`&mut T`), pero nunca ambas al mismo tiempo.- *Sin carreras de datos (_Data Races_):* Al prohibir la mutabilidad concurrente no controlada, elimina por completo errores de hilos en tiempo de compilación.- *Verificación de ciclos de vida (_Lifetimes_):* Rastrea cuánto tiempo vive cada dato para asegurar que una referencia jamás sobreviva al valor que referencia.//]
= Pero, ¿en qué puede usarse Rust?
#let logo-card(path, label, note: none, highlight: false) = box( width: 100%, height: 2.5cm, inset: 0.35em, radius: 0.45em, fill: if highlight { rgb("#f0742c").lighten(88%) } else { gray.lighten(95%) }, stroke: if highlight { 1.2pt + rgb("#f0742c") } else { 0.6pt + gray.lighten(70%) },)[ #align(center + horizon)[ #image(path, height: 1.15cm, fit: "contain") #if label != none [ #v(0.15em) #text(weight: if highlight { "bold" } else { "regular" })[#label] ] #if note != none [ #v(0.15em) #text(size: 0.65em, fill: gray.darken(35%))[#note] ] ]]
== ¡Un poco de todo!
#grid( columns: (1fr, 1fr), gutter: 1em, [ #align(center)[*Infraestructura - ¡Open source!*] #v(0.2em) #grid( columns: (1fr, 1fr), gutter: 0.5em, logo-card( "./figures/firecracker.png", none, note: [Firecracker - AWS], highlight: true, ), logo-card( "./figures/botlerocket-logo.png", none, note: [Bottlerocket - AWS], highlight: true, ),
logo-card( "./figures/relay-logo.png", none, note: [Relay - Sentry], highlight: true, ), logo-card( "./figures/pingora_banner.png", none, note: [Pingora - Cloudflare], highlight: true, ), ) ], [ #align(center)[*Parte de nuestro día a día*] #v(0.2em) #grid( columns: (1fr, 1fr), gutter: 0.5em, logo-card( "./figures/Microsoft-Logo.png", none, note: [Parte del kernel de Windows], ), logo-card( "./figures/LinuxKernel.png", none, note: [Parte del kernel de Linux], ),
logo-card( "./figures/android-logo.png", none, note: [Gran parte del kernel de Android], ), logo-card( "./figures/macos.png", none, note: [Parte del Private Cloud Compute], ), ) ],)
== ¡Y un poco más!
#grid( columns: (1fr, 1fr), gutter: 1em, [ #align(center)[*Herramientas para desarrolladores*] #v(0.2em) #grid( columns: (1fr, 1fr), gutter: 0.5em, logo-card( "./figures/astral.png", none, note: [Astral, creadores de `uv` y `ruff`], ), logo-card( "./figures/biome.svg", none, note: [Biome apoya en gran medida al ecosistema web], ), /* grid.cell(colspan: 2)[#logo-card( "./figures/pingora_banner.png", none, note: [Pingora - Cloudflare], highlight: true, )], */ logo-card( "./figures/deno-light.svg", none, note: [El runtime de Deno está hecho con Rust], ), logo-card( "./figures/zed.png", none, note: [Zed Industries creó Zed 100% con Rust], ), ) ], [ #align(center)[*Gran rol en la IA y Data Science*] #v(0.2em) #grid( columns: (1fr, 1fr), gutter: 0.5em, logo-card( "./figures/hf.png", none, highlight: true, note: [Hugging Face usa Rust para sus frameworks], ), logo-card( "./figures/openai.png", none, highlight: true, note: [OpenAI lo utiliza en su infraestructura], ),
logo-card( "./figures/polars.png", none, highlight: true, note: [Polars filtra terabytes de data de entrenamiento], ), logo-card( "./figures/lancedb.png", none, highlight: true, note: [Base de datos vectorial], ), ) ],)
== Empresas y organizaciones que utilizan Rust
#grid( columns: (1fr, 1fr), gutter: 0.5em, [ #v(1.2em) #grid( columns: (1fr, 1fr), gutter: 0.5em, logo-card( "./figures/0xide.svg", none, note: [Oxide Computer Company], ), logo-card( "./figures/dropbox.png", none, note: [Dropbox], highlight: true, ),
logo-card( "./figures/matic.png", none, note: [Matic Robots], highlight: true, ), logo-card( "./figures/nasa.png", none, note: [National Aeronautics and Space Administration], ), ) ], [ #v(1.2em) #grid( columns: (1fr, 1fr), gutter: 0.5em, logo-card( "./figures/huawei.webp", none, note: [Huawei], ), logo-card( "./figures/sentry.png", none, highlight: true, note: [Sentry (sentry.io)], ),
logo-card( "./figures/samsung.png", none, highlight: true, note: [Samsung], ), logo-card( "./figures/Meta-Logo.png", none, note: [Meta], ), ) ],)#v(1.2em)#align(center)[¡Y muchas, muchas, _muchísimas_ más!]
= Probando el lenguaje
= ¡Anuncios parroquiales!
== Taller presencial
#v(3em)#columns(2, gutter: 2pt)[
#image("/figures/tecsup.jpg", width: 90%) #colbreak()
- *Taller de Rust presencial:* Exploraremos más a fondo usos de Rust en un taller presencial en las instalaciones del Tecsup. - *¡Los escuchamos!:* Avisen con tiempo qué día sábado se les facilita para que no se les cruce con exámenes/clases. - De preferencia traigan su propio equipo para que puedan seguir la clase.]
== Masterclass de Ratatui
#columns(2, gutter: 2pt)[
#image("/figures/orhun.webp", width: 90%) #colbreak()
- *Orhun Parmaksiz:* Creador de `ratatui`, librería utilizada para crear aplicaciones de terminal (TUI); de las más famosas en la comunidad y de las más usadas por empresas. - *Masterclass de `ratatui`:* Una clase introductoria de `ratatui` donde se explorarán los principales usos de la librería - ¡Díganos la hora/día que más se les facilitaría! - Tener en cuenta que será en inglés]
== La VERDADERA Velada del Año
#columns(2, gutter: 2pt)[
#image("/figures/msg.jpg", width: 90%) #colbreak() - Coding Challenge/Hackathon a fines de septiembre. - Orhun tratará de estar presente de manera virtual para asistir con cualquier duda/consulta. - Sin miedo a parecer disco rayado: *¡confirmen con tiempo su disponibilidad!* - Se tendrán en cuenta las carreras de los participantes para evaluar los temas que se verán. ¡Todas las carreras son bienvenidas!
]
= Agradecimientos
== ¡Gracias por ser tan chéveres!
#grid( columns: (1fr, 1fr), align: horizon + center, text(size: 22pt, fill: rgb("#f74c00"))[ *¡Muchas gracias a todos! Esperamos verlos pronto 🦀* ], image("/figures/rust_peru_qr.svg", width: 90%),)