commit 05ef02b225d55c670bc179afa114e99147e49520
parent f07ebd80cef0cca41b6f5bca56cd6ad1f2d7f5e9
Author: Nuño Sempere <nuno.semperelh@protonmail.com>
Date: Fri, 5 Apr 2024 22:38:19 +0000
start rust version
Diffstat:
6 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1 +1,2 @@
**/samples-gpt
+rust/target/
diff --git a/rust/.notes.md.swp b/rust/.notes.md.swp
Binary files differ.
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "srust"
+version = "0.1.0"
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "srust"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/rust/notes.md b/rust/notes.md
@@ -0,0 +1,19 @@
+Rust seems like it has a) great documentation, b) a better randomness generator than the one I was previously using.
+
+
+The specific library I'll be using:
+
+- https://crates.io/crates/rand_distr
+- https://docs.rs/rand_distr/latest/rand_distr/index.html
+- https://github.com/rust-random/rand/
+- https://docs.rs/rand_distr/latest/rand_distr/index.html
+- https://docs.rs/rand/latest/rand/
+
+An underlying normal distribution algorithm that might be better than the Bo-Muller method.
+
+- https://docs.rs/rand_distr/latest/src/rand_distr/normal.rs.html#238-307
+- https://www.doornik.com/research/ziggurat.pdf
+- https://en.wikipedia.org/wiki/Ziggurat_algorithm
+
+A book produced as documentation (! <3%): https://rust-random.github.io/book/intro.html
+
diff --git a/rust/src/main.rs b/rust/src/main.rs
@@ -0,0 +1,3 @@
+fn main() {
+ println!("Hello, world!");
+}