A short exercise to introduce people to the Rust programming language

Overview

Searching primes by brute force

This code is ment to be an exercice to teach rust and give a first impression on how to work with the language during the training in Club Robot INSA Toulouse.

The objective is to make a bigger problem that the proposed exercices and teach a lot of the basic "wired" concepts of rust:

  • non mutable variables
  • what are macros (not how to use them)
  • type inference
  • variable shadowing
  • borrow-checker
  • modules
  • private modules by default
  • u32 vs i32
  • Option and Result
  • match
  • turbo-fish operator (parse::<u32>) (https://turbo.fish/)
  • iterators
  • terminal user input

This exercise lacks mostly async rust, multithreading and most importantly rust all powerful enums.

It is the continuation of the conference given as an introduction to the Rust language. You can find the presentation in my website: Presentation;

Contributing

If you have any more ideas of good exercises to practice basic rust concepts, or you find any way of making the code better just create an Issue se we can talk about it! Thanks šŸ˜Š .

Licence

Even if it's under MIT licence if yo ever use this code as exercice every mention will be apreciated.

Issues
Owner
JoelImgu
JoelImgu
Nixt is an interpreted programming language written in Rust

Nixt Nixt is an interpreted lisp inspired programming language written in Rust Index About Examples Installation Build About Nixt goal is to provide a

Wafelack 16 Sep 4, 2021
a function programming language for real world applications made in rust

a function programming language for real world applications made in rust

Tanay Pingalkar 6 Nov 12, 2021
Rust implementation of ĀµKanren, a featherweight relational programming language.

ĀµKanren-rs This is a Rust implementation of ĀµKanren, a featherweight relational programming language. See the original Scheme implementation here for

Eric Zhang 91 Nov 28, 2021
This repository contains the source of "The Rust Programming Language" book.

The Rust Programming Language This repository contains the source of "The Rust Programming Language" book. The book is available in dead-tree form fro

The Rust Programming Language 8.2k Nov 30, 2021
A programming language somewhat resembling cellular processes.

cytosol An embeddable programming language somewhat resembling cellular processes. State of the implementation tokenising parsing semantic analysis an

null 32 Oct 18, 2021
Orion lang is a lispy programming language that is strongly and statically typed.

Orion Orion is a lisp inspired statically typed programming language written in Rust Install To install orion you can either: Download binary from the

Wafelack 211 Nov 19, 2021
Mote is a systems-programming language designed to be practical, performant, and simple.

Mote NOTE: this following lists the goals for what Mote is supposed to be. It does not promise that any of the features here will be accomplished or a

The Mote Programming Language 14 Jul 28, 2021
A stack based interpreted programming language.

Nightmare Nightmare is a dynamically-typed, procedural programming language that aims to be fast & simple. let user = input() as Int; print("You were

&potato 4 Nov 12, 2021
lints and suggestions for the nix programming language

statix Lints and suggestions for the Nix programming language. statix highlights antipatterns in Nix code. statix --fix can fix several such occurrenc

Akshay 146 Nov 28, 2021
Gecko is a high-level, general-purpose programming language built on top of the LLVM project.

Gecko is a high-level, general-purpose programming language built on top of the LLVM project. Gecko Technology & principles Gecko is a general-purpose

Gecko 10 Nov 20, 2021
Aspect-oriented programming in Rust

Aspect Oriented Programming (AOP) for Rust The needs of AOP Aspect-oriented programming (AOP) is a programming paradigm that aims to increase modulari

null 6 Nov 11, 2021
Simple autoclicker written in Rust, to learn the Rust language.

RClicker is an autoclicker written in Rust, written to learn more about the Rust programming language. RClicker was was written by me to learn more ab

null 7 Nov 23, 2021
The Computer Language Benchmarks Game: Rust implementations

The Computer Language Benchmarks Game: Rust implementations This is the version I propose to the The Computer Language Benchmarks Game. For regex-dna,

Guillaume P. 62 Feb 4, 2021
A community curated list of Rust Language streamers

Awesome Rust Streaming This is a community curated list of livestreams about the programming language Rust. Don't see a stream that you like? Feel fre

James Munns 488 Nov 27, 2021
Rust Language Learning material

RustMaterial Rust Language Learning material Rust Rust is blazingly fast systems programming language that prevents segfaults and guarantees thread sa

Udhay Prakash Pethakamsetty 1 Nov 15, 2021
Core Temporal SDK that can be used as a base for language specific Temporal SDKs

Core SDK that can be used as a base for all other Temporal SDKs. Getting started See the Architecture doc for some high-level information. This repo u

temporal.io 51 Nov 20, 2021
Toy language that output pseudocode, pascal and graphviz dot

pseudoc pseudoc is a project I made for school because we needed to write our programs in three different formats: Pascal, pseudocode (similar in stru

JoĆ£o Capucho 3 Oct 18, 2021
Leetcode Solutions in Rust, Advent of Code Solutions in Rust and more

RUST GYM Rust Solutions Leetcode Solutions in Rust AdventOfCode Solutions in Rust This project demostrates how to create Data Structures and to implem

Larry Fantasy 224 Nov 22, 2021
Rust programs written entirely in Rust

mustang Programs written entirely in Rust Mustang is a system for building programs built entirely in Rust, meaning they do not depend on any part of

Dan Gohman 373 Nov 21, 2021