commit d20a4a2b8c5925b44a01362d436a78c5521d5794 Author: alice Date: Thu Apr 23 14:45:56 2026 -0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ba0162 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +debug/ +target/ + +**/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..34a2706 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,720 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-sink", + "futures-task", + "pin-project-lite", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "h2" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "bytes", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "libc" +version = "0.2.185" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +dependencies = [ + "libc", + "wasi", + "windows-sys", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tokio" +version = "1.52.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "warp" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d06d9202adc1f15d709c4f4a2069be5428aa912cc025d6f268ac441ab066b0" +dependencies = [ + "bytes", + "futures-util", + "headers", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "log", + "mime", + "mime_guess", + "percent-encoding", + "pin-project", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-util", + "tower-service", + "tracing", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "website" +version = "0.1.0" +dependencies = [ + "tokio", + "warp", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..22a185f --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "website" +version = "0.1.0" +edition = "2021" + +[dependencies] +tokio = { version = "1", features = ["full"] } +warp = { version = "0.4", features = ["server"] } diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3d710f0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM rust:1.75-slim as builder +WORKDIR /usr/src/app +COPY . . +RUN cargo build --release + +FROM debian:bookworm-slim +WORKDIR /app +COPY --from=builder /usr/src/app/target/release/your_warp_bin /app/warp_server +COPY ./static /app/static + +EXPOSE 3030 +CMD ["./warp_server"] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..9a1b927 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,11 @@ +use warp::Filter; + +#[tokio::main] +async fn main() { + let hello = warp::path!("hello" / String) + .map(|name| format!("Hello, {}!", name)); + + warp::serve(hello) + .run(([0,0,0,0], 3030)) + .await; +} diff --git a/static/academic/cv/index.html b/static/academic/cv/index.html new file mode 100644 index 0000000..e531100 --- /dev/null +++ b/static/academic/cv/index.html @@ -0,0 +1,10 @@ +Spencer Nicholas Whitehead's Academic Page + + +

Spencer Nicholas Whitehead

+ + Research | CV | Teaching | Art +
+ +

My most recent CV is available here (link to PDF; updated February 7 2023).

+ diff --git a/static/academic/cv/resume.pdf b/static/academic/cv/resume.pdf new file mode 100644 index 0000000..85fa03e Binary files /dev/null and b/static/academic/cv/resume.pdf differ diff --git a/static/academic/index.html b/static/academic/index.html new file mode 100644 index 0000000..6bc1c68 --- /dev/null +++ b/static/academic/index.html @@ -0,0 +1,14 @@ +Spencer Nicholas Whitehead's Academic Page + + +

Spencer Nicholas Whitehead

+

I received my Bachelor of Mathematics and Master of Mathematics from the University of Waterloo in the years 2021 and 2022 respectively, both from the Department of Pure Mathematics. + During these degrees I worked primarily with Benoit Charbonneau in the fields of Euclidean geometry and gauge theory. + Currently I am a Ph. D. student at the Department of Mathematics at Duke University. +

+ +

Aside from my research in mathematics, my primary skills are in software development and teaching. + For a complete history of my work in academia and industry, see the CV tab. + For my teaching activities, see the Teaching tab.

+

Research interests: differential geometry, Euclidean geometry, gauge theory, mathematical art

+ diff --git a/static/academic/teaching/2023/106/grading_info/index.html b/static/academic/teaching/2023/106/grading_info/index.html new file mode 100644 index 0000000..b640659 --- /dev/null +++ b/static/academic/teaching/2023/106/grading_info/index.html @@ -0,0 +1,56 @@ +MATH 106L Grading + + + +

MATH 106L Grading - F23

+

As described in the description of grade breakdown here, grading in this offering of MATH 106L will be on a mastery grading basis. That means for each assignment, you will ultimately receive a grade of either pass or fail.

+ +

In order to pass the course (graded on a pass/fail basis) you must

+ +

At a glance, this seems like a lot. +Most of these bullet points specify that you must pass specific labs/worksheets at the end of the course; fundamentally, you are responsible for 27 small assignments, 6 lab reports, and 2 big assignments to pass. +All of these but the big assignments can (and should) be done in groups! This will make your life much easier.

+ +

Some questions you might want to ask

+ +

Did I pass assignment XYZ?

+

If ever you fail to pass an assignment, I will email you about it prior to publishing the Gradescope grades. +If you haven't received an email from me, the answer is yes!

+ +

What constitutes a `pass'? — Lecture worksheets, individual lab assignments

+ +

Each worksheet consists of a number of `worksheet questions' and potentially some `homework questions'. Each is worth 1 point; earning at least two thirds of the available points constitutes a pass. Your first submission will be graded for feedback only; the resubmission will be graded for correctness, and to determine whether or not a passing grade has been earned.

+ +

What constitutes a `pass'? — Lab reports

+ +

A lab report consists of a typed response in full sentences incorporating answers to a selection of math questions into the body of the text. +Reports will be graded on a rubric for correctness and completeness of the mathematics and quality of written presentation. (See here for best practices in writing mathematics). +A score of level 3 or higher will constitute a pass; that is, a total score of 12 or higher on the following rubric.

+ + +

If your group fails to pass with a level 3 or higher on the first attempt, you will be given feedback and the opportunity to correct and make a resubmission.

+ +

What constitutes a `pass'? — Big assignments

+ +

The big assignments of MATH 106L are the closest thing the course has to conventional tests. +You will fill out and submit the assignment individually, and a score of 70% or higher constitutes a pass. +In the event that you fail to pass the assignment the first time, you will be given the chance to submit corrections to receive up to half of the lost points. +For example, if you earn a grade of 60% on a first submission and submit corrections for 30% of the lost marks, your final grade on the big assignment would be 60% + 1/2 x 30% = 75%; a pass.

+ +

Am I on track to pass the course?

+ +

Unless we've spoken and I've said something to the opposite effect, yes! If you ever don't get credit for an assignment, I will contact you about it. +You are always welcome to email me to request the records I have for grades you've earned in the course to a point.

+ +

DukeHub says we have an exam on the 17th?

+ +

We don't. There are no exams in this course.

+ diff --git a/static/academic/teaching/2023/106/index.html b/static/academic/teaching/2023/106/index.html new file mode 100644 index 0000000..7f479cd --- /dev/null +++ b/static/academic/teaching/2023/106/index.html @@ -0,0 +1,856 @@ +MATH 106L - Fall 2023 + + + + +

MATH 106L: Lab calculus and functions II

+ +

Instructor: Spencer Nicholas Whitehead

+ +

Lecture times: MWF 12:00-12:50, W. Duke 08A

+

Lab times: TTh 12:00-12:50, W. Duke 08A

+ +

Office Hours: W 13:00-14:00, Classroom 132; Th 16:00-17:00, F 15:00-16:00, Zoom (link sent by email). One online office hour TBD.

+ +

Syllabus: See the course syllabus in PDF format here.

+ +

Contact: See a facesheet of course staff and contact info in PDF format here.

+ +

Grading: Detailed information on the grading scheme is available in PDF format here.

+ +

A more detailed breakdown of the grading scheme and FAQ is available here.

+ +

The rubric used to assess reports is available here (see above link for more grading info). + +

+Course description: The notion of quadrature, the computation of the area of a complicated shape by filling it with smaller, better understood shapes, has been studied since the Greeks. +In MATH 105L, you studied the calculus of differentials and learned how the behaviour of a (reasonable) function could be described locally by its derivative. +Historically, this notion came almost 2,000 years after that of quadrature. +It would be a further two centuries until James Gregory would publish a statement and proof of what is today known as the fundamental theorem of calculus. +This theorem states roughly that quadrature, called integration today, is inverse to differentiation: the derivative of an integral of a function is the original function, and the integral of a derivative of a function is the original function—perhaps up to the oft-forgotten '+ C'. +

+

+The fundamental theorem of calculus cannot be described as anything short of astonishing. +There is no reason a priori to believe that the operations of finding area and finding local linear approximations should be related to each other in any reasonable way, but the fundamental theorem of calculus provides exactly this relation. +The fundamental theorem of calculus comprises perhaps the first example of what one might call a 'local-global result': by knowing local information about a function (its derivative at each point), one learns global information about the function (the area under its graph). +This philosophy underlying the fundamental theorem of calculus is omnipresent in day-to-day life, if often invisible—as the sewist closes a sleeve with a stitch in the round or a ship circumnavigates the globe using only an atlas is present the fundamental theorem of calculus, providing rigorous mathematical justification to the idea that local approximations, sufficiently accurate, sum to the whole. +While often exploited as just a computational tool, it would be no exaggeration to call the fundamental theorem of calculus one of the most beautiful in all of mathematics. +

+

+In MATH 106L we will develop the modern integral calculus from a particular kind of quadrature called a Riemann sum, and from this definition prove the fundamental theorem of calculus. +After the fall break, we will begin the study of differential equations and methods of solution. +Finally, after the Thanskgiving break (and throughout the labs) we will study specific examples of differential equations that motivated the historical development of calculus, such as Newton's laws of motion and models for population growth/decay, including the presence of forcing terms. +

+ +

+Best practices for writing mathematics: Through the course, you will have the chance in labs to write a number of group reports. +While there is no universal style guide for mathematical writing, there are a number of accepted best practices, available in PDF format here. +When writing reports, you are expected to follow the practices in this document. +

+ +

+Textbook problems: In the interest of fairness and accessibility, I will pull practice problems and enrichment reading from the free and openly available MIT OpenCourseWare Calculus text of Strang. Click here to access this textbook. +The practice problems will be updated on a (roughly) week-by-week basis; for some weeks there may be no practice problems. +Many Duke courses use recent editions of Hughes-Hallett; this is a resource you may consider purchasing or finding in the library, but is not required for this class. +My personal favourite calculus texts are those of Michael Spivak. +I highly recommend them for enrichment reading, but again do not require them for this class. +See the syllabus for more information on titles, editions, etc. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LessonDateTopicWorksheetDue DateResourcesTextbook practice
(Not to hand in)
External resources
1-12023-08-28105L ReviewWorksheet2023-09-04
Lab2023-08-29Trigonometry, ILab 12023-09-04Section 1.5Basic trig
1-22023-08-30Trigonometry, IIWorksheet2023-09-04Unit circle
Radians
Lab2023-08-31Trigonometric
modelling, I
Lab 2Spreadsheet
Geogebra
Section 1.5Sinusoidal models
1-32023-09-01Trigonometric
identities, limits
Worksheet2023-09-04Section 1.5Trig identities
Angle addition
2023-09-04Labour day, no class
Lab2023-09-05Trigonometric
modelling, II
Report: Global
warming [group]
2023-09-13Section 1.5
2-22023-09-06Trigonometric
Derivatives
Worksheet2023-09-11Section 2.4Differentiating trig functions
Lab2023-09-07Newton's laws
of motion, I
Lab 3
2-32023-09-08Inverse trigonometric
functions
Worksheet2023-09-11Inverse trig functions
3-12023-09-11Trigonometric
inverse derivatives
Worksheet2023-09-18The inverse function theorem
Lab2023-09-12NO LABBIG ASSIGNMENT 12023-09-22
3-22023-09-13Trigonometric
related rates
Worksheet2023-09-18
Lab2023-09-14Newton's laws
of motion, II
Group report: understanding gravity2023-09-20
3-32023-09-15Postition, velocity,
Acceleration
Worksheet2023-09-18
4-12023-09-18Distance from velocityWorksheet2023-09-25
Lab2023-09-19Sums, sigma notation
4-22023-09-20Left- and right-
handed sums
Worksheet2023-09-25
Lab2023-09-21Sums and sigma notation, IILab questions [individual]2023-09-27
4-32023-09-22The definite integralWorksheet2023-09-25
5-12023-09-25Midpoint and
trapezoid sums
Worksheet2023-10-02
Lab2023-09-26Postponed due to technical issues
5-22023-09-27FTC IWorksheet2023-10-02A proof of FTC in an easy case
Lab2023-09-28Riemann sums, ISpreadsheet
5-32023-09-29FTC I, cont.See 5-2
6-12023-10-02Properties of definite
integrals
Worksheet2023-10-09
Lab2023-10-03Riemann sums, II
6-22023-10-04Constructing
antiderivatives
Worksheet2023-10-09
Lab2023-10-05Riemannian Sums, IIIGroup report2023-10-11
6-32023-10-06Integration by substitutionWorksheet2023-10-09
7-12023-10-09Integration by partsWorksheet2023-10-23
Lab2023-10-10Average value of
a function, I
7-22023-10-11Antidifferentiation
practice, I
Worksheet2023-10-23
Lab2023-10-12Average value of a function, IIGroup report2023-10-18Also note:BIG ASSIGNMENT 22023-10-27
2023-10-13Fall break, no class
2023-10-16Fall break, no class
2023-10-17Fall break, no class
8-22023-10-18Antidifferentiation
practice, II
See 7-2
Lab2023-10-19Average Values, II
8-32023-10-20Integrating to infinityWorksheet2023-10-23
9-12023-10-23Other improper integralsWorksheet2023-10-30
Lab2023-10-24NO LAB
9-22023-10-25Big assignment help
Lab2023-10-26Force and Work: I
9-32023-10-27FTC IIWorksheet2023-10-30
10-12023-10-30Differential equations,
initial value problems, I
Worksheet2023-11-06
Lab2023-10-31Force and Work: II2023-11-08
10-22023-11-01Differential equations,
initial value problems, II
Lab2023-11-02Differential equations, I
10-32023-11-03Slope fields, equilibria, IWorksheet2023-11-06
11-12023-11-06Slope fields, equilibria, II
Lab2023-11-07Differential equations, IIReport: Short report [group]2023-11-15
11-22023-11-08Separation of variables, IWorksheet2023-11-13
Lab2023-11-09Euler's methodSpreadsheet
11-32023-11-10Separation of variables, II
12-12023-11-13Growth and decayWorksheet2023-11-20
Lab2023-11-14Euler's methodReport: Short report [group]2023-11-22
12-22023-11-15Applications: heating
and mixing, I
Worksheet2023-11-20
Lab2023-11-16Euler's methodBIG ASSIGNMENT 32023-11-27
12-32023-11-17Applications: heating
and mixing, I cont.
13-12023-11-20Applications: heating
and mixing, II (online only)
Worksheet2023-11-27
2023-11-21Thanksgiving, no class
2023-11-22Thanksgiving, no class
2023-11-23Thanksgiving, no class
2023-11-24Thanksgiving, no class
14-12023-11-27Worksheet2023-12-04
Lab2023-11-28Chemical rates
14-22023-11-29The logistic model for
population, I
Lab2023-11-30
14-32023-12-01The logistic model for
population, II
Worksheet2023-12-04
15-12023-12-04Population models
with migration
Worksheet
Lab2023-12-05Logistic model:
fishing
15-22023-12-06Applications of the
logistic model
Lab2023-12-07Logistic model:
fishing
Report: Short report [group]2023-12-15
15-32023-12-08Course evaluations
+ + diff --git a/static/academic/teaching/index.html b/static/academic/teaching/index.html new file mode 100644 index 0000000..a958bb5 --- /dev/null +++ b/static/academic/teaching/index.html @@ -0,0 +1,83 @@ +Spencer Nicholas Whitehead's Academic Page + + +

Spencer Nicholas Whitehead

+ + Research | CV | Teaching | Art +
+ +

For the Fall 2023 semester I am instructor of record on MATH 106L. Click here to access the course webpage for MATH 106L.

+

Below are a list of my previous teaching activities.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RoleCourseTermInstitution
Lab TAMATH 111
Calculus 1
Fall 2022Duke
MarkerPMATH 347
Intro to Groups and Rings
Spring 2022Waterloo
MarkerPMATH 365
Differential Geometry
Winter 2022Waterloo
TAMATH 137
Calculus 1 for Hon. Math
Fall 2021Waterloo
Tutor
(Official)
MATH 136
Lin. Alg. 1 for Hon. Math
Winter 2021Waterloo
TA leadMATH 135
Algebra for Hon. Math
Fall 2020Waterloo
Tutor
(Official)
MATH 136Fall 2019Waterloo
Tutorial lecturerCS 246
Obj. Oriented Soft. Devel
Fall 2019Waterloo
Tutorial lecturerCS 246Winter 2018Waterloo
Instructional
support (full-time)
CS 246Fall 2018Waterloo
+ diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..bb6b1c5 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..5b88347 --- /dev/null +++ b/static/index.html @@ -0,0 +1,5 @@ +my website + + +

This is the personal website of Spencer Whitehead.

+ diff --git a/static/main.css b/static/main.css new file mode 100644 index 0000000..112587f --- /dev/null +++ b/static/main.css @@ -0,0 +1,46 @@ +@media (prefers-color-scheme: dark){ + body { + background:#000 + } +} +body{ + margin:1em auto; + max-width:40em; + padding:0 .62em 3.24em; + font:1.2em/1.62 sans-serif +} +h1,h2,h3 { + line-height:1.2 +} + +@media print{ + body{ + max-width:none + } +} +body { + margin:40px auto; + max-width:850px; + line-height:1.6; + font-size:18px; + color:#444; + padding:0 10px; + background-color:#EEEEEE +} + +a:link { + text-decoration: none; +} + +a:visited { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a:active { + text-decoration: underline; +} + diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..4cb8dce --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: / +Allow: /academic/ +Disallow: /academic/teaching/socrates