Skip to main content

Tag: Mojo

Mojo 🔥 Test-Drive

Test-driving the new Mojo programming language. It’s a systems programming language with Python syntax, so we can now use our Python skills for systems programming with a minimal learning hill to climb. Random Password Generator # Usage: $ mojo build -march native randpass.mojo # $ ./randpass from random import seed, random_ui64 fn generate_random_password() -> String: """Generate 21 character random password.""" let selection: String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#$%&@" var rand_pass: String = "" var password_length = 21 seed() while password_length > 0: rand_pass += selection[random_ui64(0, selection.