diff --git a/guessing_game/target/.rustc_info.json b/guessing_game/target/.rustc_info.json
index 5de487d..98b80bc 100644
--- a/guessing_game/target/.rustc_info.json
+++ b/guessing_game/target/.rustc_info.json
@@ -1 +1 @@
-{"rustc_fingerprint":953660965870803700,"outputs":{"13331785392996375709":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/brock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.85.1 (4eb161250 2025-03-15)\nbinary: rustc\ncommit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181\ncommit-date: 2025-03-15\nhost: x86_64-unknown-linux-gnu\nrelease: 1.85.1\nLLVM version: 19.1.7\n","stderr":""},"2063776225603076451":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/brock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
\ No newline at end of file
+{"rustc_fingerprint":517133967738620428,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.86.0 (05f9846f8 2025-03-31)\nbinary: rustc\ncommit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb\ncommit-date: 2025-03-31\nhost: x86_64-pc-windows-msvc\nrelease: 1.86.0\nLLVM version: 19.1.7\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\Brock\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}
\ No newline at end of file
diff --git a/hello/404.html b/hello/404.html
new file mode 100644
index 0000000..9ed2018
--- /dev/null
+++ b/hello/404.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Hello!
+
+
+ Oops!
+ Sorry, I don't know what you're asking for.
+
+
diff --git a/hello/Cargo.lock b/hello/Cargo.lock
new file mode 100644
index 0000000..bdfea16
--- /dev/null
+++ b/hello/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "hello"
+version = "0.1.0"
diff --git a/hello/Cargo.toml b/hello/Cargo.toml
new file mode 100644
index 0000000..f6f3649
--- /dev/null
+++ b/hello/Cargo.toml
@@ -0,0 +1,6 @@
+[package]
+name = "hello"
+version = "0.1.0"
+edition = "2024"
+
+[dependencies]
diff --git a/hello/hello.html b/hello/hello.html
new file mode 100644
index 0000000..3b3a0ec
--- /dev/null
+++ b/hello/hello.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Hello!
+
+
+ Hello!
+ Hi from Rust
+
+
diff --git a/hello/src/lib.rs b/hello/src/lib.rs
new file mode 100644
index 0000000..70a8108
--- /dev/null
+++ b/hello/src/lib.rs
@@ -0,0 +1,82 @@
+use std::{ sync::{ mpsc, Mutex, Arc }, thread };
+
+pub struct ThreadPool {
+ workers: Vec,
+ sender: Option>,
+}
+
+impl ThreadPool {
+ /// Create a new ThreadPool.
+ ///
+ /// The size is the number of threads in the pool.
+ ///
+ /// # Panics
+ ///
+ /// The `new` function will panic if the size is zero.
+ pub fn new(size: usize) -> ThreadPool {
+ assert!(size > 0);
+
+ let (sender, receiver) = mpsc::channel();
+
+ let receiver = Arc::new(Mutex::new(receiver));
+
+ let mut workers = Vec::with_capacity(size);
+
+ for id in 0..size {
+ workers.push(Worker::new(id, Arc::clone(&receiver)));
+ }
+
+ ThreadPool { workers, sender: Some(sender) }
+ }
+
+ pub fn execute(&self, f: F) where F: FnOnce() + Send + 'static {
+ let job = Box::new(f);
+
+ self.sender.as_ref().unwrap().send(job).unwrap();
+ }
+
+ // ambitious side project
+ // pub fn build(size: usize) -> Result {}
+}
+
+impl Drop for ThreadPool {
+ fn drop(&mut self) {
+ drop(self.sender.take());
+
+ for worker in &mut self.workers.drain(..) {
+ println!("Shutting down worker {}", worker.id);
+
+ worker.thread.join().unwrap();
+ }
+ }
+}
+
+struct Worker {
+ id: usize,
+ thread: thread::JoinHandle<()>,
+}
+
+impl Worker {
+ fn new(id: usize, receiver: Arc>>) -> Worker {
+ let thread = thread::spawn(move || {
+ loop {
+ let message = receiver.lock().unwrap().recv();
+
+ match message {
+ Ok(job) => {
+ println!("Worker {id} got a job; executing");
+ job();
+ }
+ Err(_) => {
+ println!("Worker {id} disconnected; shutting down.");
+ break;
+ }
+ }
+ }
+ });
+
+ Worker { id, thread }
+ }
+}
+
+type Job = Box;
diff --git a/hello/src/main.rs b/hello/src/main.rs
new file mode 100644
index 0000000..77221d7
--- /dev/null
+++ b/hello/src/main.rs
@@ -0,0 +1,74 @@
+use std::{
+ fs,
+ io::{ prelude::*, BufReader },
+ net::{ TcpListener, TcpStream },
+ thread,
+ time::Duration,
+};
+
+use hello::ThreadPool;
+
+fn main() {
+ // this is not related I was just curious
+ // let test = fs::read_to_string("test.yaml").unwrap();
+ // println!("{}", test);
+
+ let listener = TcpListener::bind("127.0.0.1:7878").unwrap();
+
+ let pool = ThreadPool::new(4);
+
+ for stream in listener.incoming().take(2) {
+ let stream = stream.unwrap();
+ pool.execute(|| {
+ handle_connection(stream);
+ });
+ }
+
+ println!("Shutting down.");
+}
+
+fn handle_connection(mut stream: TcpStream) {
+ let buf_reader = BufReader::new(&stream);
+
+ // let http_request: Vec<_> = buf_reader
+ // .lines()
+ // .map(|result| result.unwrap())
+ // .take_while(|line| !line.is_empty())
+ // .collect();
+ let request_line = buf_reader.lines().next().unwrap().unwrap();
+ // no longer needed, here for debug and being useful
+ // println!("Request: {:#?}", http_request);
+ // if request_line == "GET / HTTP/1.1" {
+ // let status_line = "HTTP/1.1 200 OK";
+ // let contents = fs::read_to_string("./hello.html").unwrap();
+ // let length = contents.len();
+
+ // let res = format!("{status_line}\r\nContent-Length: {length}\r\n\r\n{contents}");
+
+ // stream.write_all(res.as_bytes()).unwrap();
+ // } else {
+ // let status_line = "HTTP/1.1 404 NOT FOUND";
+ // let contents = fs::read_to_string("404.html").unwrap();
+ // let length = contents.len();
+
+ // let res = format!("{status_line}\r\nContent-Length: {length}\r\n\r\n{contents}");
+
+ // stream.write_all(res.as_bytes()).unwrap();
+ // }
+
+ let (status_line, filename) = match &request_line[..] {
+ "GET / HTTP/1.1" => ("HTTP/1.1 200 OK", "hello.html"),
+ "GET /sleep HTTP/1.1" => {
+ thread::sleep(Duration::from_secs(5));
+ ("HTTP/1.1 200 OK", "hello.html")
+ }
+ _ => ("HTTP/1.1 404 NOT FOUND", "404.html"),
+ };
+
+ let contents = fs::read_to_string(filename).unwrap();
+ let length = contents.len();
+
+ let res = format!("{status_line}\r\nContent-Length: {length}\r\n\r\n{contents}");
+
+ stream.write_all(res.as_bytes()).unwrap();
+}
diff --git a/hello/test.yaml b/hello/test.yaml
new file mode 100644
index 0000000..13cef00
--- /dev/null
+++ b/hello/test.yaml
@@ -0,0 +1,41 @@
+Diamond Tier:
+ - Schulich School of Engineering:
+ LogoUrl: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQj9L3ZGK6WtOmJbzxmCzRxwLXYKGC5SDcAKHb0ScfbUmbtG0IujQt6eQDaI_Pm9g4DZvc&usqp=CAU
+ Url: https://schulich.ucalgary.ca/
+ DescriptionAboutSponsor: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eu magna in diam consectetur rhoncus vel nec turpis. Sed finibus mi eu sem varius faucibus. Donec semper erat et bibendum pharetra. Suspendisse cursus lorem sed nisi semper, a rutrum nunc luctus. Nunc ullamcorper enim id orci interdum ultrices. Donec vestibulum nunc vel nisl pretium tempus. Morbi quis ante et ligula eleifend eleifend. Proin bibendum maximus elit vitae congue. Vivamus egestas, ex in tempor posuere, ligula nunc iaculis massa, in imperdiet dui justo eu dolor. Nullam placerat velit quis sem mattis, laoreet pharetra elit tempor.
+Platinum Tier:
+ - Platinum Sponsor Name:
+ LogoUrl:
+ Url:
+ DescriptionAboutSponsor:
+Gold Tier:
+ - Suri:
+ LogoUrl: https://lh5.googleusercontent.com/WJsBsmcLypQhY0MMOLQtJSGFXrLQqPKNc3502rYUGKPCq_SfS9CxuoB3n541Kn9bKPm2b5aixCnYsCVYZAts2Y8xvmOHWL3nnbKtWUkE1KoFYYQ4bXUlikfF0NPIynxhzQ=w1280
+ Url: https://www.surimanufacturing.com/
+ DescriptionAboutSponsor:
+ - SKF:
+ LogoUrl: https://www.skf.com/v2/assets/img/skf-logo-white.svg
+ Url: https://www.skf.com/ca/en
+ DescriptionAboutSponsor: I am not sure
+ - WRMA:
+ LogoUrl: https://wildrosemx.com/wp-content/uploads/2021/08/wild-rose-motocross-calgary-rasterized.png
+ Url: https://wildrosemx.com/
+ DescriptionAboutSponsor:
+Silver Tier:
+ - Encore Metals:
+ LogoUrl: https://www.encoremetals.com/assets/images/logos/encore-metals-logo.png
+ Url: https://www.encoremetals.com/
+ DescriptionAboutSponsor: Metal supplier
+ - CNOOC:
+ LogoUrl: https://cnoocinternational.com/img/cnooc-logo.png
+ Url: https://cnoocinternational.com/
+ DescriptionAboutSponsor:
+Bronze Tier:
+ - Redbull:
+ LogoUrl: "https://img.redbull.com/redbullcom/static/redbullcom-logo_double-with-text.svg"
+ Url: https://www.redbull.com/ca-en/
+ DescriptionAboutSponsor:
+ - Canada Action:
+ LogoUrl:
+ Url:
+ DescriptionAboutSponsor:
\ No newline at end of file
diff --git a/hello_cargo/target/.rustc_info.json b/hello_cargo/target/.rustc_info.json
index 8613401..98b80bc 100644
--- a/hello_cargo/target/.rustc_info.json
+++ b/hello_cargo/target/.rustc_info.json
@@ -1 +1 @@
-{"rustc_fingerprint":953660965870803700,"outputs":{"13331785392996375709":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/brock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"2063776225603076451":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/brock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.85.1 (4eb161250 2025-03-15)\nbinary: rustc\ncommit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181\ncommit-date: 2025-03-15\nhost: x86_64-unknown-linux-gnu\nrelease: 1.85.1\nLLVM version: 19.1.7\n","stderr":""}},"successes":{}}
\ No newline at end of file
+{"rustc_fingerprint":517133967738620428,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.86.0 (05f9846f8 2025-03-31)\nbinary: rustc\ncommit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb\ncommit-date: 2025-03-31\nhost: x86_64-pc-windows-msvc\nrelease: 1.86.0\nLLVM version: 19.1.7\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\Brock\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}
\ No newline at end of file