‹Priscilla› is my primary name, ‹Laila› and ‹Sandra› are my second names. I like them all but ‹Priscilla› is my favourite. Both ‹Laila› and ‹Layla› are fine.
The badge icons were taken from m3 Markdown Badges, Skill Icons, Markdown Badges or generated using shields.io
https://github.com/an-Iceberg/num_py
The enum
in Rust is a proper algebraic datatype, meaning that enum variants can be simple variants,
contain datafields or even other types, which allows for awesome stuff like this:
enum WebEvent
{
PageLoad,
PageUnload,
KeyPress(char),
Paste(String),
Click { x: i64, y: i64 },
}
The match
is similar to a switch in other languages but more powerful:
match event
{
WebEvent::PageLoad => println!("page loaded"),
WebEvent::PageUnload => println!("page unloaded"),
WebEvent::KeyPress(c) => println!("pressed '{c}'"),
WebEvent::Paste(string) => println!("pasted \"{string}\""),
WebEvent::Click{x, y} => println!("clicked at x={x}, y={y}"),
}
It can also take in a tuple and do proper pattern matching:
match (a, b, c)
{
(1, 'c', 3) => todo!(),
(2, 'a', 3) => todo!(),
(3, 'f', 1) => todo!(),
(5, 'b', 1) => todo!(),
(_, _, _) => todo!(),
}
Tuples also allow for multiple return values and destructuring:
fn f(x: f64) -> (f64, f64) { (x.sin(), x.cos()) }
let (x, y) = f(1.2345);
println!("x={x:.2}, y={y:.2}");
There's no null
in Rust‼ 🥳 🎊 🎉 Instead, there's the Option
type:
enum Option<T>
{
None,
Some(T),
}
Similarly, there are no exceptions, no try
, catch
and finally
, only Result
s:
enum Result<T, E>
{
Ok(T),
Err(E),
}
// Todo: improve this
- Use any unicode character as variable name
- No need for multiplication operator when multiplying with numbers
- Optional function parameters
- Default function parameters
- Multiple dispatch
- Function piping
i oftentimes wonder if Rust is overkill for my purposes and if i should just write everything in TypeScript instead b/c i technically don't need the performance gains that come with Rust. i am also unsure if i'll truly be able to leverage the strength of the type system, considering i'm not that deeply familiar with Rust's type system that i could write a whole framework all by myself 😓.
// Todo: there's a prettier image we have for this
It is so weird to call programming/software engineering an interest of mine considering i'm studying to get a bacchelor to get a job in that field. Having a job in a field automatically makes that field a chore for me but i am genuinely interestd in computer science.
Currently running Arch Linux on everything with KDE because it offers the most up to date and the widest selection of software among all linux distros. I want to try out an experiment with Alipe Linux together with homebrew (or Nix) and KDE. It might just be to my liking but am not sure yet, which is why i'd want to try it out. Maybe Debian with brew would also be worth trying out.
Interested in numerical analysis, data science & physics simulations.
Likes to speak & learn languages.
Fluent in: [en], [de], [hu]
Ok in: [fr]
Currently learning: [ru], [es]
Currently studying computer science.
Occasional hobbies include ❯❯❯
- 🪢 Knots
- 🖋️ Calligraphy
- 📷 Photography
- 🪢 Macramé
- 🌸 Anime 💮
- 🎮 Video games