Coder Social home page Coder Social logo

hello-rust / show Goto Github PK

View Code? Open in Web Editor NEW
303.0 23.0 20.0 10.82 MB

๐Ÿฟ Show notes, code, and future topic ideas for "Hello Rust!", a YouTube channel about the Rust programming language.

Home Page: https://hello-rust.show

Rust 58.42% Makefile 1.70% Jupyter Notebook 8.45% Python 3.48% Go 26.76% Dockerfile 1.20%
rust youtube live-coding live-streaming awesome show

show's Introduction

Hello Rust Show logo

๐Ÿ  Homepage | โ–ถ๏ธ YouTube | โค๏ธ Sponsor | ๐Ÿฆ Twitter

This is the main repository of Hello Rust, a coding show by Matthias Endler about the Rust programming language (https://www.youtube.com/hellorust).
It is targeted towards intermediate Rust programmers, who have already read the book and want to learn advanced patterns and tricks as well as how to write ergonomic code in Rust.

In this repository, you find the list of previous episodes, the planned shows and the show notes.

How to support me

As you know, producing content takes a lot of time and effort. On top of that, running a YouTube channel requires getting a lot of expensive hardware (like recording and editing equipment) to achieve somewhat acceptable quality. This show is free for everybody to watch. If you want it to stay this way, consider donating.
Sponsor on Github and earn a special place in my heart โ€” forever. โค๏ธ

List of episodes

Season 1 - 2018

Season 2 ๐Ÿ˜™

If you have an idea for a future show, don't hesitate to create a new issue or upvote an existing one.

Inspiration

The following YouTube creators greatly inspired me. I appreciate the work that went into these channels.

FAQ

Q: What development environment do you use?ย ย 
A: Right now, I use VSCode and the Rust plugin plus Rust analyzer.
I've heard good things about the IntelliJ Rust plugin, though.
Therefore, I might try this setup in the future.

Q: What audio/video equipment do you use? A: Video: Canon 700D. Audio: Rhode NT USB, Takstar SGC 598.

Q: What is your post-processing routine?ย ย 
A: Quite simple. I solely use iMovie Davinci Resolve Final Cut right now.
I'm mostly annoyed by the long rendering times on my MacBook. (5 hours for 30 minutes of video.)

Q: What is the name of your color theme?
A: Usually I use 1337 and the Github Theme, but that can vary per show.
I will try to mention it in the show notes, if it's something else.

Q: What font are you using?
A: Operator Sans Mono Cascadia Code as a Nerd Font variant

Q: How long does it take to create one episode?
A: Around 30 hours. Here's a breakdown of the process:

  • ๐Ÿ’ช Preparation time: 5 hours
  • ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Creating a prototype for the code I'd like to show: 2-5 hours
  • ๐ŸŒบ Prepare office for recording: 30min
  • ๐Ÿ–ฅ Recording: 2-4 hours
  • ๐ŸŽž Editing: 12-16 hours
  • ๐Ÿฟ Publication: 2 hours

My hope is to get faster over time. Especially the editing is still painful, although I've gotten much better already. Publication could also mostly be done automatically and I wrote some tooling to help me with that (see ci folder).

Credits

show's People

Contributors

alexanderthaller avatar barskern avatar chapeupreto avatar dependabot[bot] avatar euantorano avatar killercup avatar la10736 avatar mre avatar tgotwig avatar vikrrrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

show's Issues

How to publish a Rust crate

What?

Write a simple Rust crate and publish it on crates.io

Why?

The goal is to show how simple it is to create a new crate, explain some best-practices
and why it's a good thing to create a crate in the first place.

How?

The crate doesn't need to be particularly useful, as long as the publishing part and the ecosystem is well explained.

Recursive data structures

What?

Describe how to implement recursive data structures such as:

  • linked lists (stacks, queues)
  • trees
  • graphs

Show ready to use std and crates:

Why?

It is different from other languages. When I moved from c++ to rust I was quite confused how to implement this things due to rust's rustrictions on mutable references.
it is also a good way to deepen your understanding of the concept of borrowing.

How?

Some solutions:

Depends on:

Port showboost to Rust

What?

Port showboost to Rust.

Why?

Learn a little about CPU stats on Linux. Talk about parsing these files and ergonomic output.

How?

Step-by-step, test-driven port.

Refactoring Workshop

What?

Do a workshop about refactoring Rust code.

Why?

A thing that every developer does on a regular basis, is refactoring.
In Rust, this is particularly pleasant - entertaining even - as the compiler supports us with many hints.
To some extent, it's what makes Rust so magical to me.

How?

Start off with a working, but pretty rudimentary codebase. Ideally a small crate, whose functionality can be grasped quickly. Gradually improve it, by first showing the limitations of the old system, and then building a more idiomatic, robust version.
After that, run clippy to get even more tips for improvement.

80s VHS recording effect

What?

Create a classical video effect: the VHS cassette.

Why?

I always enjoyed video effects and it's about time to figure out how they work and to create my own.

How?

Create a sample image with some text on it and write a filter, which transforms it into an 80s VHS cassette look.

Port glibc's strstr to Rust

What?

https://sourceware.org/git/?p=glibc.git;a=blob;f=string/strstr.c;hb=9d13fb2413921c713f83efe331e8e4d219c62c6b#l21

Why?

My assumption is, that there is a lot of undefined behavior in this code.
We could talk about fuzzing, porting C code, performance benchmarks and more.

How?

  • Create a naive implementation of strstr in Rust.
  • Benchmark it against the existing C version.
  • Port the C strstr version verbatim to Rust.
  • Run afl (fuzzing) against it to check for edge-cases.

Thanks for the inspiration @jorgelbg.

Worker pool

What?

Implement a worker pool

Why?

Show how to use channels similar to the go implementation. Maybe there's a way to use custom derives to create a worker pool from a "pool" struct

How?

Start with the go implementation, port it to Rust and then make it more idiomatic.

Markdown formatter for commandline

What?

Tool like mdv, that pretty-prints markdown files on the commandline

Why?

Show how to use serialization and how to write simple cli tools

How?

Maybe using serde + some shell color highlighting crate

Traffic Light Simulator

What?

Write a traffic light simulator.
The player can script the on and off times of each traffic light to regulate the traffic flow.

Why?

Learn some things about Graphical User-Interfaces and scripting in Rust.

How?

Use a Game Engine like Piston and add scripting support (maybe using dyon?) .

Explain zero-copy functions

What?

Show an example for zero-copy functions. Those are mostly architecture-specific, so that might be a good fit to talk about syscalls and kernel vs userspace.

Why?

Zero-copy is so wonderfully fast. Also, it's a good fit for the zero-overhead mantra of Rust.

How?

Maybe use cat + splice as an example.

Vscode Setup

I've seen episode one and I like the setup you have for the IDE.
Can you please share details?

I've tried different setups and got no where.
the most useful was rust-analyzer with VScode/neovim but it was eating up my memory.

A simple `ps` clone

What?

The Unix tool ps lists the status of processes. We could write one in Rust.

Why?

Implementing Unix tools is a good learning experience.
ps in particular makes use of the /proc virtual filesystem to get information
straight from the Linux kernel. (I have no idea how it works on other systems.)
This directory contains a wealth of data that is interesting to explore.

How?

Read /proc/<pid>/status and parse it using serde/nom or something else.

Create an async htop

What?

Rewrite htop in Rust using async/await.

Why?

Would be a lot of fun to learn how to create a "lazy" version of htop and find out about the limitations of the Rust crate ecosystem around cross-platform process monitoring.

How?

Find some crates for process monitoring and put them behind async/await to update each process status regularly and independently from other processes.

Custom Allocator

What?

Write a simple allocator

Why?

Shows that Rust is a pretty versatile and hackable language.
Also teaches a lot about compiler internals.

How?

mmalloc and allocators-rs might be good starting points.

#2: Rust and Gears - Python List Comprehensions

What?

Show how to port list comprehensions to Python

Why?

List comprehensions have been one thing that I was missing the most when learning Rust.
It took a while to understand that iter(), map(), filter() and collect() were a better fit for Rust.
I want to give a few common examples to make it easier for other people with the same background.

How?

Show commont list comprehensions in Python and port them to Rust one by one.
Present an alternative to defaultdict called the entry API and how to use it.

This show was inspired by #20 by @Dowwie.

Hi there, can we have this show back?

Hello, I'm a new rust enthusiast. Today I have found your channel and fall in love with your content / dedication to the community. So I'm wondering with have any chance to you go back to produce that content, and I will be so gratefull to become a patreon.

Create a custom controller for a drone

What?

This is super-far-fetched, but I still wanted to note it down somewhere:
It would be awesome to write a custom Rust controller for a quadrocopter/drone!

Why?

To learn more about electronics + Rust, microcontrollers, the Rust embedded development environment, and more.

How?

Take a ready-made tutorial such as this one or that one and buy all parts.
I guess, I would go with an arduino-based system for now (simple runtime, shows off Rusts C-FFI and cross-compiling functionality).

Rust frontpage

What?

  • frontpage.rs
  • liked.rs
  • starred.rs
  • rust.today
  • rustlang.live
  • rustlang.news

Why?

Because I want to have my own Rust frontpage

How?

Yew?

Commandline tool for package building

What?

Show how to write a tool for building (Debian) packages.

Why?

Might teach a few things about how package management works internally and
different tradeoffs on how to model that with Rust.

How?

Look at other package managers, e.g. fpm.
Would be fun to port some Ruby code to Rust. E.g. this tar utility.

Write a lolcode parser

What?

Write a parser that can read lolcode files and create an AST out of it.

Why?

Parsing stuff is fun and educational. Also lolcode.

How?

Probably use nom for that.

Sweet Macro Music Joint Venture

What?

During a conversation on Twitter, @killercup created a nice proof of concept for a simple macro-based audio engine.
Right now it looks like this:

#[macro_use] extern crate macromusic;

sick_beat!(
    340 4, 200 1,
    380 4, 200 1,
    400 2, 200 1,
    440 2, 200 1,
    200 1, 133 1, 133 1,
    300 2, 200 1,
    340 2, 200 1,
    550 2, 590 3, 550 3, 500 2
);

He suggested to spice that up with multi-track support. I think that's a great idea!

Why?

I love chiptune and beepy audio.

How?

Invite @killercup, get some beers, start cracking.

kafkacat

What?

Write a clone of kafkacat in Rust (https://github.com/edenhill/kafkacat)

Why?

Show how to write CLI apps that follow best-practices.
Would also be a fun tool to have and I need such a tool on a regular basis.

How?

Probably something around structopt, Rust 2018 edition.

Touch typing tool using real text

What?

Write a tool to learn touch typing.
Start the app with any text file. On the left side, there would be an empty screen. On the right side, there would be the given text. The task is, to type each character on the right side into the field on the right. Here's the catch: there is a counter, which counts the number of typo-free words somewhere. Whenever the user makes a mistake, this counter will be reset to 0. There is no back-button to correct a word. Instead, the program will store all miss-typed words in a file for later practice.

Why?

It always bugged me that I'm a slow typist. Right now, I do around 70wpm. This could be much improved with some training. Therefore I was thinking of some type-learning application.

How?

This app could either be curses-based or using some kind of GUI. The text to type could be rendered with Markdown maybe. Maybe not.

#1: Hello Universe!

What?

Write a tool which prints "hello world" in as many languages as possible.

Why?

This can serve as an intro to the Rust development environment and to Rust in general.

How?

Could be done in combination with #6.

Debugging tutorial

What?

Show how to debug Rust code.

Why?

Debugging code is one of the core skills for software engineers.
Because Rust's current debugging story is not very mature yet, it might make sense to make an episode about the current debugging options and how to properly configure the environment.

How?

Start with some pre-existing but buggy code and set-up a new debugger from scratch (most likely in VSCode or Intellij Rust). Show the current limitations of the system (e.g. variables don't show up or they get displayed as C/low-level structures without proper Rust introspection).


Requested by user Hitlife80 on Reddit

Results and Iterator patterns

What?

Describe some useful patterns when iterating over Result types.

Why?

Working with an iterator of Results (i.e. Iterator<Item = Result<O, E>>) can be a bit of a hassle for beginner and intermediate Rust programmers.
When collecting the result of the iteration into a variable, the main question is, what shall be the resulting datatype?

  • All Oks?
  • All Errors?
  • The first Error?
  • The first Ok?
  • Something else?

How?

Show some patterns from Iteration patterns for Result & Option.
Show usage of a library for that, e.g. resiter

Detect CPU features

What?

Implement a crate to detect CPU features

Why?

To learn more about Rust FFI and CPU headers

How?

By porting Google's cpu_features to Rust

Crates I love

What?

Introduce some helpful crates.

Why?

Because it's tricky to stay up-to-date with new, helpful crates nowadays. Also to raise awareness for the work of some talented Rust developers.

How?

Just show five crates or so and give an example for their usage (maybe a before and after code comparison might work best.

Concurrency

What?

Concurrently calling an API and collecting results.

Why?

Concurrency is a large part of programming. Coming from a background in Go, it'd be nice to see how it's different in Rust.

How?

Use httpbin to send post requests, collecting results and displaying them somehow. Up to you :-D

Code review

What?

Do a Rust code-review.

Why?

It's fun to watch and contribute.

How?

Pick a small-ish Rust Github repo and explain the inner workings.
After that, fix an issue and create a PR.

Docker cleanup tool

What?

docker cleanup tool

Why?

Spotify's docker-gc, but it's a shell script

How?

Could be written as a docker plugin, maybe. If not, we could call it limbo.

#0: Introduction

What?

Just a friendly introduction to the show and its goals.

Why?

People might be interested in what to expect from this show.

How?

General topics:

  • Who is Matthias?
  • What is Rust and why use it?
  • What this show is not: a beginner's learning course
  • Why this show?
  • Show topics
    • Beginner and intermediate topics
    • General Rust tips and tricks
  • Mention links to Github/Twitter/Website
  • Mention channel subscription
  • Add links in the show notes to the Rust docs

Analyze audio snippets in realtime

What?

Build a Rust tool, that will take an audio recording and run a Fast Fourier Analysis on it to get the frequencies of the sample.

Why?

I always wanted a tool to analyze the sound spectrum in front of my apartment door. In particular, I'm interested in the number of car honks throughout the day and its distribution.

How?

Take some crate that can read wave files, split it into small chunks, and run a fourier analysis on it. (Maybe wrap it all up as a commandline tool?)

Messing with emulators

What?

Spin up a ROM in sprocketnes or pinky and mess with it by modifying the bytes in memory or changing the meaning of the opcodes.

Why?

Just for fun.

How?

I guess we should go with a popular game like Super Mario.
We add a keyboard shortcut or so which inserts random glitches into the ROM. My assumption is, that the game will crash at some point. Also, when changing the opcodes, funny things could happen.

Date parser

Write a parser for the following human-readable date format:

15th of May 2015
1st of June 2018
2nd of July 1983 

The output should be a date object, which provides convenience methods for retrieving the year, month, and day from the parsed date.
The parser can be a simple function or something more complicated.

Parsing dates is a tricky endeavor. I leave it up to you to decide if you like to account for time zones and different calendars or not.

I will present my answer in the next episode of Hello Rust.
The show will mostly focus on testing code in general, so you might want to come up with an answer for that.

You can post your answers below if you like, preferably as a link to a gist.
Looking forward to your solutions. ๐Ÿ˜‰

Mention software and Hardware

What?

Describe the hardware and software I use for the show.

Why?

To enable my viewers to follow along with the show.

How?

  • Show what is required to follow along
    • Rust installation (rustup.rs)
    • IDE/Editor. I'll be using VisualStudio Code and IntelliJ Rust.
    • Devdocs.io

Conditional compilation (Windows, Mac, Linux)

What?

The original plan was to write a command line tool, that opens a file with the default program on the given operating system, but that already exists. Therefore I'll need to find something else, where I can show conditional compilation on.
Maybe a tool I can port from Golang?

Why?

Show how to structure commands in separate modules.
Build platform-dependent code using cargo.
Show how to use dependency injection or a simple plugin system in Rust?
Explain different idioms in Golang and Rust.

How?

Port open-golang.
I don't know yet.

chars

What?

Write a program that prints only unique letters in a string

Why?

The existing solutions are awful. Also, how can we make that as fast as possible?

How?

Be creative.

Python v Rust : Types and Patterns

What?

Pick your favorite patterns / types from Python and show how to use them, or not, in Rust

Why?

Adopters of Rust have prior background in other programming languages, including Python. Comparing Python techniques with those in Rust facilitates learning

How?

Examples:

  • list comprehensions vs function combinators (see #26)
  • itertools.partial vs closure
  • dict dispatch vs match
  • try/except vs the Rust variety
  • pypi vs cargo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.