Reorganize

This commit is contained in:
2025-11-02 11:08:51 -08:00
parent 14d8a9b00c
commit fd48f75245
75 changed files with 8 additions and 17 deletions

View File

@@ -0,0 +1,94 @@
use assetserver::Asset;
use macro_assets::assets;
assets! {
prefix: "/assets"
router: asset_router()
//
// MARK: images
//
Image_Cover {
source: "../../assets/images/cover-small.jpg",
target: "/img/face.jpg"
}
Image_Betalupi {
source: "../../assets/images/betalupi-map.png",
target: "/img/betalupi.png"
}
Image_Icon {
source: "../../assets/images/icon.png",
target: "/img/icon.png"
}
//
// MARK:fonts
//
FiraCode_Bold_woff2 {
source: "../../assets/fonts/fira/FiraCode-Bold.woff2",
target: "/fonts/FiraCode-Bold.woff2"
}
FiraCode_Light_woff2 {
source: "../../assets/fonts/fira/FiraCode-Light.woff2",
target: "/fonts/FiraCode-Light.woff2"
}
FiraCode_Medium_woff2 {
source: "../../assets/fonts/fira/FiraCode-Medium.woff2",
target: "/fonts/FiraCode-Medium.woff2"
}
FiraCode_Regular_woff2 {
source: "../../assets/fonts/fira/FiraCode-Regular.woff2",
target: "/fonts/FiraCode-Regular.woff2"
}
FiraCode_SemiBold_woff2 {
source: "../../assets/fonts/fira/FiraCode-SemiBold.woff2",
target: "/fonts/FiraCode-SemiBold.woff2"
}
FiraCode_VF_woff2 {
source: "../../assets/fonts/fira/FiraCode-VF.woff2",
target: "/fonts/FiraCode-VF.woff2"
}
//
// MARK: icons
//
Fa_Brands_woff2 {
source: "../../assets/fonts/fa/fa-brands-400.woff2",
target: "/fonts/fa/fa-brands-400.woff2"
}
Fa_Regular_woff2 {
source: "../../assets/fonts/fa/fa-regular-400.woff2",
target: "/fonts/fa/fa-regular-400.woff2"
}
Fa_Solid_woff2 {
source: "../../assets/fonts/fa/fa-solid-900.woff2",
target: "/fonts/fa/fa-solid-900.woff2"
}
Fa_Brands_ttf {
source: "../../assets/fonts/fa/fa-brands-400.ttf",
target: "/fonts/fa/fa-brands-400.ttf"
}
Fa_Regular_ttf {
source: "../../assets/fonts/fa/fa-regular-400.ttf",
target: "/fonts/fa/fa-regular-400.ttf"
}
Fa_Solid_ttf {
source: "../../assets/fonts/fa/fa-solid-900.ttf",
target: "/fonts/fa/fa-solid-900.ttf"
}
}

View File

@@ -0,0 +1,65 @@
use assetserver::Asset;
use maud::{Markup, html};
use crate::{
components::{
base::{BasePage, PageMetadata},
md::Markdown,
},
routes::assets::{Image_Betalupi, Image_Icon},
};
pub async fn betalupi() -> Markup {
let meta = PageMetadata {
title: "What's a \"betalupi?\"".into(),
author: Some("Mark".into()),
description: None,
image: Some(Image_Icon::URL.into()),
};
html! {
(BasePage(
meta,
html!(
// TODO: no metadata class, generate backlink array
div {
a href="/" style="padding-left:4pt;padding-right:4pt;" {"home"}
"/"
span class="metaData" style="padding-left:4pt;padding-right:4pt;" { "whats-a-betalupi" }
}
(Markdown(MD_A))
br {}
(Markdown(MD_B))
br {}
img alt="betalupi map" class="image" src=(Image_Betalupi::URL) {}
)
))
}
}
const MD_A: &str = r#"[es]: https://github.com/endless-sky/endless-sky
[*Stellaris*]: https://www.paradoxinteractive.com/games/stellaris/about
[Arabic]: https://en.wikipedia.org/wiki/List_of_Arabic_star_names
[wiki-betalupi]: https://en.wikipedia.org/wiki/Beta_Lupi
# What's a "betalupi?"
Beta Lupi is a solar system on the [_Endless Sky_][es] galaxy map,
which is the first place I look whenever I need to name a server.
Stellar names (especially those of [Arabic] origin) make pretty good hostnames: they're meaningless (in English), they sound interesting, and the "hyperlanes" that connect them in titles like [_Endless Sky_][es] and [*Stellaris*] look a lot like a network topology.
Beta Lupi also happens to be a real star in the southern constellation of Lupus ([wiki][wiki-betalupi]), but that's not particularly important.
A snippet of the [_Endless Sky_][es] map is below."#;
const MD_B: &str = r#"**In other words:** Try finding a `.com` domain that...
- Isn't already taken
- Doesn't sound awful
- Isn't owned by a scalper that's selling it for $300"#;

View File

@@ -0,0 +1,248 @@
use assetserver::Asset;
use maud::{Markup, html};
use crate::{
components::{
base::{BasePage, PageMetadata},
fa::FAIcon,
mangle::{MangledBetaEmail, MangledGoogleEmail},
md::Markdown,
misc::FarLink,
},
routes::assets::{Image_Cover, Image_Icon},
};
pub async fn index() -> Markup {
let meta = PageMetadata {
title: "Betalupi: About".into(),
author: Some("Mark".into()),
description: Some("Description".into()),
image: Some(Image_Icon::URL.into()),
};
html! {
(BasePage(
meta,
html!(
h2 id="about" { "About" }
div {
img
src=(Image_Cover::URL)
style="float:left;margin:10px 10px 10px 10px;display:block;width:25%;"
{}
div style="margin:2ex 1ex 2ex 1ex;display:inline-block;overflow:hidden;width:60%;" {
"Welcome, you've reached Mark's main page. Here you'll find"
" links to various projects I've worked on."
ul {
li { (MangledBetaEmail {}) }
li { (MangledGoogleEmail {}) }
li {
(
FarLink(
"https://github.com/rm-dr",
html!(
(FAIcon::Github)
"rm-dr"
)
)
)
}
li {
(
FarLink(
"https://git.betalupi.com",
html!(
(FAIcon::Git)
"git.betalupi.com"
)
)
)
}
}
}
br style="clear:both;" {}
}
"Also see "
a href="/whats-a-betalupi" { "what's a \"betalupi?\"" }
(Markdown(concat!(
"## Pages\n",
" - [Handouts](/handouts): Math circle lessons I've written\n",
" - [Links](/links): Interesting parts of the internet"
)))
hr style="margin-top: 6rem; margin-bottom: 6rem" {}
h2 { "Projects" }
ul {
li {
p {
b { "RedoxOS" }
", a general-purpose, microkernel-based operating system written in Rust. "
em { span style="color: var(--grey);" {"[enthusiast]"} }
}
ul {
li {
span style="color: var(--grey);" {"Status: "}
span style="color: var(--yellow);" {"Passive"}
}
li {
span style="color: var(--grey);" {"Website: "}
(
FarLink(
"https://www.redox-os.org",
html!(
(FAIcon::Link)
"redox-os.org"
)
)
)
}
}
}
li {
p {
b { "Tectonic" }
", the LaTeX engine that is pleasant to use. Experimental, but fully functional. "
em { span style="color: var(--grey);" {"[co-maintainer]"} }
}
ul {
li {
span style="color: var(--grey);" {"Status: "}
span style="color: var(--yellow);" {"Passive. "}
(FarLink("https://github.com/typst/typst", "Typst"))
" is better."
}
li {
span style="color: var(--grey);" {"Main Repo: "}
(
FarLink(
"https://github.com/tectonic-typesetting/tectonic",
html!( (FAIcon::Github) "Tectonic" )
)
)
}
li {
span style="color: var(--grey);" {"Bundle Tools: "}
(
FarLink(
"https://github.com/tectonic-typesetting/tectonic-texlive-bundles",
html!( (FAIcon::Github) "tectonic-texlive-bundles" )
)
)
}
}
}
li {
p {
b { "Daisy" }
", a pretty TUI scientific calculator. "
em { span style="color: var(--grey);" {"[author]"} }
}
ul {
li {
span style="color: var(--grey);" {"Status: "}
span style="color: var(--orange);" {"Done. "}
"Used this to learn Rust. "
(FarLink("https://numbat.dev", "Numbat"))
" is better."
}
li {
span style="color: var(--grey);" {"Repository: "}
(
FarLink(
"https://github.com/rm-dr/daisy",
html!( (FAIcon::Github) "rm-dr/daisy" )
)
)
}
li {
span style="color: var(--grey);" {"Website: "}
(
FarLink(
"https://daisy.betalupi.com",
html!(
(FAIcon::Link)
"daisy.betalupi.com"
)
)
)
" (WASM demo)"
}
}
}
li {
p {
b { "Lamb" }
", a lambda calculus engine. "
em { span style="color: var(--grey);" {"[author]"} }
}
ul {
li {
span style="color: var(--grey);" {"Status: "}
span style="color: var(--orange);" {"Done. "}
"Fun little project."
}
li {
span style="color: var(--grey);" {"Repository: "}
(
FarLink(
"https://github.com/rm-dr/lamb",
html!( (FAIcon::Github) "rm-dr/lamb" )
)
)
}
li {
span style="color: var(--grey);" {"PyPi: "}
(
FarLink(
"https://pypi.org/project/lamb-engine",
html!(
(FAIcon::Python)
"lamb-engine"
)
)
)
}
}
}
}
)
))
}
}

View File

@@ -0,0 +1,174 @@
use assetserver::Asset;
use maud::{Markup, html};
use crate::{
components::{
base::{BasePage, PageMetadata},
md::Markdown,
},
routes::assets::Image_Icon,
};
pub async fn links() -> Markup {
let meta = PageMetadata {
title: "Links".into(),
author: Some("Mark".into()),
description: None,
image: Some(Image_Icon::URL.into()),
};
html! {
(BasePage(
meta,
html!(
// TODO: no metadata class, generate backlink array
div {
a href="/" style="padding-left:4pt;padding-right:4pt;" {"home"}
"/"
span class="metaData" style="padding-left:4pt;padding-right:4pt;" { "links" }
}
(Markdown(MD_A))
hr style="margin-top: 8rem; margin-bottom: 8rem" {}
(Markdown(MD_B))
hr style="margin-top: 8rem; margin-bottom: 8rem" {}
(Markdown(MD_C))
hr style="margin-top: 8rem; margin-bottom: 8rem" {}
(Markdown(MD_D))
)
))
}
}
/*
Dead links:
https://www.commitstrip.com/en/
http://www.3dprintmath.com/
*/
const MD_A: &str = r#"# Bookmarks
This is a heavily opinionated bookmarks toolbar."#;
const MD_B: &str = r#"## Podcasts
- :star: [Darknet Diaries](https://darknetdiaries.com/): A perennial classic.
- [Art of Manliness](https://www.artofmanliness.com/podcast/): Philosophy, literaure, psychology.
- [The Overanalyzers](https://www.theoveranalyzers.com/): Amateur podcasters talk amateur psychology. This is a complement---they're _very_ good!
- [Rust in Production](https://corrode.dev/podcast/): Operations, Rust, and modern tech.
- :star: [On the Metal](https://onthemetal.transistor.fm/): Quality stories from quality engineers.
- [Security Cryptography Whatever](https://securitycryptographywhatever.com/): Modern cryptography, for those who understand the underlying theory.
## Essays
- [Real Programmers don't use Pascal](https://www.ee.torontomu.ca/~elf/hack/realmen.html)
- [A Mathematician's Lament](/files/lockhart.pdf)
- :star: [The Jargon File](http://www.catb.org/jargon/)
## Textbooks
- :star: [OpenLogic](https://openlogicproject.org/): The gold standard
- [Operating Systems: from 0 to 1](https://github.com/tuhdo/os01)
- [Operating Systems: Three Easy Pieces](https://pages.cs.wisc.edu/~remzi/OSTEP/)
- [Crafting Interpreters](https://craftinginterpreters.com/contents.html)
- [An Introduction to Mathematical Cryptography](https://link.springer.com/book/10.1007/978-0-387-77993-5)
- [Stories about Maxima and Minima](https://archive.org/details/storiesaboutmaxi0000tikh)
## Miscellanea
- [Hackaday](https://hackaday.com/)
- [Grumpy Website](https://grumpy.website/): Daily design crimes
- :star: [ZSA Voyager](https://www.zsa.io/voyager): World's best keyboard
- [Nikita Prokopov](https://tonsky.me/)
- [Faster Than Lime](https://fasterthanli.me/)
- [Pepper & Carrot](https://www.peppercarrot.com/): The open-source webcomic
- [User Friendly](https://en.wikipedia.org/wiki/User_Friendly): Old-school. Offline and archived.
- [PhD Comics](https://phdcomics.com/): Quality academic humor. Discontinued.
- :star: [Spintronics](https://store.upperstory.com/collections/spintronics/products/spintronics-act-one): Mechanical circuits. Very clever toy.
- :star: [Turing Tumble](https://store.upperstory.com/collections/turing-tumble-game/products/turing-tumble): Modern Dr. Nim"#;
const MD_C: &str = r#"## Tools
- :star: [Numbat](https://numbat.dev/)
- [MxToolbox](https://mxtoolbox.com/)
- [Brainfuck Interpreter](https://copy.sh/brainfuck/)
- [Compiler Explorer](https://godbolt.org/)
- [Monkeytype](https://monkeytype.com/)
- :star: [TLDR](https://tldr.sh/)
- [TOS;DR](https://tosdr.org/)
- [Regexr](https://regexr.com/)
- [Choose a License](https://choosealicense.com/)
- [DeepL](https://www.deepl.com/translator)
- [ShuffleCake](https://shufflecake.net/)
- [Zola](https://www.getzola.org/): Static site generator
- [Presenterm](https://github.com/mfontanini/presenterm)
- [mprocs](https://github.com/pvolok/mprocs): Simpler tmux
- [mask](https://github.com/jacobdeichert/mask)
- [gitui](https://github.com/gitui-org/gitui): git tui
- [tokei](https://github.com/XAMPPRocky/tokei): count lines of code
- [delta](https://github.com/dandavison/delta): pretty pager for diffs
- [dust](https://github.com/dandavison/delta): `du`, but better
## Math Resources
- [Quantum Quest](https://www.quantum-quest.org/)
- [The Natural Number Game](https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game/)
- [Intro to Lambda Calculus](https://www.driverlesscrocodile.com/technology/lambda-calculus-for-people-a-step-behind-me-1/)
- [FSM Simulator](https://ivanzuzak.info/noam/webapps/fsm_simulator/)
- [Euclidea](https://www.euclidea.xyz/)
- [Problems.ru](https://problems.ru/)
## OS Dev Resources
- [OS Dev Wiki](https://wiki.osdev.org/Expanded_Main_Page)
- [Nand2Tetris](https://www.nand2tetris.org/course)
- :star: [Writing an OS in Rust](https://os.phil-opp.com/)
- [x86 Assembly Guide](https://www.cs.virginia.edu/~evans/cs216/guides/x86.html)
- [Writing a simple x86 Bootloader](https://www.alanfoster.me/posts/writing-a-bootloader/)
- [FDC Programming](http://www.brokenthorn.com/Resources/OSDev20.html)
- [CS77 at Bristol College](http://www.c-jump.com/CIS77/CIS77syllabus.htm)
## Misc Resources
- [Learn OpenGL](https://learnopengl.com/)
- [Learn WGPU](https://sotrh.github.io/learn-wgpu)
- [WGPU Fundamentals](https://webgpufundamentals.org/)
- [Acko](https://acko.net/)
- [Bezier Info](https://pomax.github.io/bezierinfo/)
- [SHA256 Algorithm](https://sha256algorithm.com/)
- [ML Playground](https://ml-playground.com/)
- [Learn you some Erlang](https://learnyousomeerlang.com/)
- [Learn you a Haskell](https://learnyouahaskell.github.io/)
- [Teach yourself CS](https://teachyourselfcs.com/)
- [The Architecture of Open Source Applications](http://aosabook.org/en/index.html)
- [wtfjs](https://github.com/denysdovhan/wtfjs): js [wat](https://www.destroyallsoftware.com/talks/wat)s
## Reference
- [DevHints](https://devhints.io/)
- [OverAPI](https://overapi.com/)
- [TSConfig Cheat Sheet](https://www.totaltypescript.com/tsconfig-cheat-sheet)
- [Makefile Tutorial](https://makefiletutorial.com/)
- [The Pinouts Book](https://pinouts.org/)
- [Laws of UX](https://lawsofux.com/)
## Rust
- [Understanding Memory Ordering in Rust](https://emschwartz.me/understanding-memory-ordering-in-rust/)
- [Unfair Rust Quiz](https://this.quiz.is.fckn.gay/): wtfjs, but in Rust."#;
const MD_D: &str = r#"## Misc
- [Slide Rule Collection](https://www.followingtherules.info/)
- [MK-61 Command Reference](http://www.thimet.de/CalcCollection/Calculators/Elektronika-MK-61/CmdRef.html)
- [Why Privacy Matters](https://www.ted.com/talks/glenn_greenwald_why_privacy_matters)
- [Papers we Love](https://paperswelove.org/)
- [Grug Brain Dev](https://grugbrain.dev/)
- [Zen of Python](https://peps.python.org/pep-0020/)
- [The XY Problem](https://xyproblem.info/)"#;

View File

@@ -0,0 +1,24 @@
use axum::Router;
use axum::routing::get;
use tracing::info;
use utoipa::OpenApi;
mod assets;
mod betalupi;
mod index;
mod links;
#[derive(OpenApi)]
#[openapi(tags(), paths(), components(schemas()))]
pub(super) struct Api;
pub(super) fn router() -> Router<()> {
let (asset_prefix, asset_router) = assets::asset_router();
info!("Serving assets at {asset_prefix}");
Router::new()
.route("/", get(index::index))
.route("/whats-a-betalupi", get(betalupi::betalupi))
.route("/links", get(links::links))
.nest(asset_prefix, asset_router)
}