Skip to content

Latest commit

 

History

History
203 lines (121 loc) · 7.2 KB

rustgraz_talk_00.md

File metadata and controls

203 lines (121 loc) · 7.2 KB
author title date
Lukas Prokop
Rust Graz – 00 Intro
July 25, 2019

Data types and Trait std::iter::Iterator; 25th of July 2019 Rust Graz, lab10


Welcome back!

After one year w/o a talk, we are going to reboot RustGraz.

  1. Regular talks each month.
  2. Starting with introductory topics in summer 2019.
  3. English as preferred language to include internationals.

About the meetup


Organization via meetup

RustGraz on meetup


Which date?

survey via framadate.org/TeSBAMxfWoUijdEI

RustGraz poll for future dates


Annoucements also via twitter

RustGraz on twitter


Resources on github

github.com/rust-user-group-graz

Today:
…-graz/00-intro, …-graz/01-getting-started,
…-graz/02-datatypes-and-iterator

RustGraz on github


About rust

Why a meetup about rust? We have a bunch of other meetups going in Graz.

Tech meetups in Graz


About the state of rust

rust is a multi-paradigm system programming language focused on safety, especially safe concurrency (via Wikipedia) and a rich type system and ownership model guaranteeing memory-safety and thread-safety (via rust-lang.org).

Ok. But does it work?


Current state of Rust: some projects


Current state of Rust: some projects

  • pairity.io develops the “fastest and most advanced Etherum client“ (Pairity Etherum), “a framework for building blockchains and spawning decentralised innovation“ (Parity Substrate), “the next-generation platform for connecting independent blockchains together“ (Polkadot) and others.

Current state of Rust: some projects


Current state of Rust: some projects

  • Redox (redox-os.org) is a Unix-like Operating System written in Rust, aiming to bring the innovations of Rust to a modern microkernel and full set of applications
  • “Writing an OS in Rust” (os.phil-opp.com)

Redox is a Unix-like Operating System


Current state of Rust: some projects


Current state of Rust

  • For the fourth year in a row, Rust is the most loved¹ programming language among our respondents, followed close behind by Python, the fastest-growing major language today
    (stackoverflow Developer Survey Results 2019)
    ¹ most loved means “high percentage of developers who are currently using rust express high interest in continuing to do so“

Criticism of rust


Criticism of rust

So rust is great and saves the world?

  • We saw some positive sides
  • Let's talk about some negative sides

Literature:


Criticizing the Rust Language, and Why C/C++ Will Never Die

  • Since unsafe exists, Rust is no better than C++ for safety.
  • Safe Rust is not as fast as C++, so you need to write in unsafe, thus there's no point.
  • C++ has fuzzers and static checkers, and you can write tests.

Criticizing the Rust Language, and Why C/C++ Will Never Die

  • Rust has five incompatible kinds of pointers (example is that you can't go from having pointers to the heap to pointers to the stack without changing types).
  • Vec<Rc<RefCell<Box<Trait>>>>
  • Rust doesn't insert the necessary Rcs and Boxes for you.

Criticizing the Rust Language, and Why C/C++ Will Never Die

  • Macros are a crutch and will prevent any good IDEs from existing.
  • “cargo actively encourages downloading packages directly from git repositories”
  • “C++ doesn't restrict programmers regarding what they can or cannot use.”
  • Smart pointers aren't perfect.

Criticizing the Rust Language, and Why C/C++ Will Never Die

  • No strict description of Rust's semantics.
  • “the source of troubles is usually in humans”
  • There are no Rust jobs.

Rust is not a good C replacement

  • “kitchen sink” programming language: language solves problems by adding more language features. New features per year:
    C → 0.73, Go → 2, C++ → 11.3, Rust → 15
  • C is the most portable programming language
  • C has a spec
  • C has many implementations
  • C has a consistent & stable ABI

Rust is not a good C replacement

  • Cargo is mandatory
  • Concurrency is generally a bad thing
  • Safety

“Go is the result of C programmers designing a new programming language, and Rust is the result of C++ programmers designing a new programming language”


About me

Dec 2017–end 2019
self-employed software developer (python, Go)
Oct 2019+
IAIK PhD student in infosec (interest in RISC-V)
Others
  • bachelor's degree math student
  • co-organizer of PyGraz and Grazer Linuxtage
  • I didn't have time to program rust for too long. Let's get serious in the next months [together]!

Disclaimer

I don't think rust should be your first programming language. Thus, I assume familiarity with fundamental programming concepts.