-
Notifications
You must be signed in to change notification settings - Fork 1
Bump to v9: Restructure mathsys as library-first #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,9 +7,7 @@ | |
|
|
||
| #> IGNORE -> FOLDER INFO | ||
| **/.DS_Store | ||
| .DS_Store | ||
|
Comment on lines
9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Redundant Line 9 ( 🤖 Prompt for AI Agents |
||
|
|
||
| #> IGNORE -> SYMLINK | ||
| mathsys | ||
|
|
||
| #> IGNORE -> TEST FILE | ||
| file.msm | ||
| mathsys | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,11 +36,19 @@ | |
| "backgroundColor": "transparent", | ||
| "bold": false, | ||
| "italic": true | ||
| } | ||
| }, | ||
| { | ||
| "tag": "!", | ||
| "color": "#00FF00", | ||
| "strikethrough": false, | ||
| "underline": false, | ||
| "backgroundColor": "#FF00FF", | ||
| "bold": true, | ||
| "italic": false | ||
| }, | ||
|
Comment on lines
+40
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial That color combo is going to melt someone's retinas, bud.
🤖 Prompt for AI Agents |
||
| ], | ||
| "rust-analyzer.inlayHints.genericParameterHints.const.enable": false, | ||
| "rust-analyzer.inlayHints.parameterHints.enable": false, | ||
| "rust-analyzer.inlayHints.typeHints.enable": false, | ||
| "rust-analyzer.inlayHints.renderColons": false, | ||
| "python.analysis.ignore": [".venv/**"] | ||
| "rust-analyzer.inlayHints.renderColons": false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heads up — dropping The AI summary notes that 🛠️ Restore the ignore setting "python.analysis.diagnosticMode": "workspace",
+ "python.analysis.ignore": [".venv/**"],🤖 Prompt for AI Agents |
||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| //^ | ||
| //^ HEAD | ||
| //^ | ||
|
|
||
| //> HEAD -> MODULES | ||
| pub(super) mod latex; | ||
|
|
||
| //> HEAD -> PRELUDE | ||
| use crate::prelude::{ | ||
| dispatch | ||
| }; | ||
|
|
||
| //> HEAD -> LOCAL | ||
| use self::super::{ | ||
| solver::{ | ||
| nonterminal::{ | ||
| Item, | ||
| NonTerminal | ||
| }, | ||
| context::Context | ||
| }, | ||
| syntax::{ | ||
| Start, | ||
| level1::{ | ||
| Definition, | ||
| Function, | ||
| Level1, | ||
| Node, | ||
| Equation, | ||
| Use | ||
| }, | ||
| level2::{ | ||
| Level2, | ||
| Expression | ||
| }, | ||
| level3::{ | ||
| Level3, | ||
| Term | ||
| }, | ||
| level4::{ | ||
| Limit, | ||
| Level4, | ||
| Factor | ||
| }, | ||
| level5::{ | ||
| Absolute, | ||
| Level5, | ||
| Infinite, | ||
| Variable, | ||
| Nest, | ||
| Tensor, | ||
| Whole, | ||
| Undefined, | ||
| Rational, | ||
| Call | ||
| } | ||
| } | ||
| }; | ||
|
Comment on lines
+14
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: fd -t f "mod.rs" backends/ --exec wc -l {} \;Repository: alejandro-vaz/mathsys Length of output: 83 🏁 Script executed: cat -n backends/mod.rsRepository: alejandro-vaz/mathsys Length of output: 1779 🏁 Script executed: # Check if syntax types are used in the backends module
rg "Start|Definition|Function|Level1|Node|Equation|Use|Level2|Expression|Level3|Term|Level4|Limit|Factor|Level5|Absolute|Infinite|Variable|Nest|Tensor|Whole|Undefined|Rational|Call" backends/ -t rust --no-filename -nRepository: alejandro-vaz/mathsys Length of output: 962 🏁 Script executed: # Check what's in the latex module
cat -n backends/latex.rs | head -100Repository: alejandro-vaz/mathsys Length of output: 3158 Remove unused syntax imports from backends/mod.rs. Your imports of 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| //^ | ||
| //^ TRAITS | ||
| //^ | ||
|
|
||
| //> TRAITS -> SPAWN | ||
| pub(super) trait Spawn: Backends { | ||
| fn spawn(items: Vec<Item>, context: Option<&mut Context>) -> NonTerminal; | ||
| } | ||
|
Comment on lines
+66
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial
Every type that can be spawned must also implement Not blocking — just making sure you've thought about it. 🤖 Prompt for AI Agents |
||
|
|
||
| //> BACKENDS -> TRAIT | ||
| #[dispatch] | ||
| pub(super) trait Backends { | ||
| fn latex(&self) -> String; | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,11 @@ | |
|
|
||
| //> HEAD -> PRELUDE | ||
| use crate::prelude::{ | ||
| FilePath, readFile, writeFile | ||
| FilePath, | ||
| readFile, | ||
| writeFile, | ||
| EnumString, | ||
| AsRefStr | ||
| }; | ||
|
|
||
| //> HEAD -> LOCAL | ||
|
|
@@ -29,32 +33,47 @@ pub enum Argument { | |
| //^ | ||
|
|
||
| //> INPUT -> FILE | ||
| #[derive(Clone, Debug)] | ||
| pub struct File { | ||
| pub name: FilePath | ||
| } impl File { | ||
| pub fn read(&self) -> Result<String, Issue> {readFile(&self.name).ok().ok_or_else(|| Issue::FileNotFound(self.name.to_str().unwrap().to_string()))} | ||
| pub async fn write(&self, extension: &str, content: String) -> () { | ||
| let mut path = self.name.clone(); | ||
| #[derive(Clone)] | ||
| pub struct File (pub FilePath); impl File { | ||
| pub fn read(&self) -> Result<String, Issue> {readFile(&self.0).ok().ok_or_else(|| Issue::FileNotFound(self.0.to_str().unwrap().to_string()))} | ||
| pub fn write(&self, extension: &str, content: String) -> () { | ||
| let mut path = self.0.clone(); | ||
| path.set_extension(extension); | ||
| writeFile(path, content).unwrap(); | ||
| } | ||
| } | ||
|
Comment on lines
+36
to
44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tuple struct conversion is fine, but
Also, 🤖 Prompt for AI Agents |
||
|
|
||
| //> INPUT -> FLAG | ||
| #[derive(Clone, Debug)] | ||
| pub struct Flag { | ||
| pub value: String | ||
| #[derive(EnumString, Clone, Copy, AsRefStr)] | ||
| #[strum(serialize_all = "lowercase")] | ||
| pub enum Flag { | ||
| Quiet, | ||
| Verbose | ||
| } | ||
|
|
||
| //> INPUT -> ALIAS | ||
| #[derive(Clone, Debug)] | ||
| pub struct Alias { | ||
| pub letters: Vec<char> | ||
| } | ||
| pub struct Alias(pub Vec<char>); impl Alias {pub fn expand(self) -> Result<Vec<Flag>, Issue> { | ||
| let mut converted = Vec::new(); | ||
| for letter in &self.0 {converted.push(match letter { | ||
| 'q' => Flag::Quiet, | ||
| 'v' => Flag::Verbose, | ||
| other => return Err(Issue::UnknownAliasCharacter { | ||
| alias: self, | ||
| at: converted.len() | ||
| }) | ||
| })} | ||
| return Ok(converted); | ||
| }} | ||
|
Comment on lines
55
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Alias char-to-flag mapping duplicates knowledge from Right now you have Consider driving the expansion from a single source of truth — either 🤖 Prompt for AI Agents |
||
|
|
||
| //> INPUT -> TARGET | ||
| #[derive(Clone, Debug)] | ||
| pub struct Target { | ||
| pub name: String | ||
| #[derive(EnumString, Clone, AsRefStr, Copy)] | ||
| #[strum(serialize_all = "lowercase")] | ||
| pub enum Target { | ||
| Help, | ||
| Version, | ||
| Tokens, | ||
| Check, | ||
| Ast, | ||
| Latex | ||
| } | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix markdown formatting: missing blank lines around headings and missing trailing newline.
Come on, the rest of the changelog is formatted properly — don't drop the ball on the new sections. Static analysis flagged numerous MD022 violations (headings need blank lines above and below) and a missing trailing newline (MD047).
📝 Proposed formatting fix
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[style] ~234-~234: ‘under stress’ might be wordy. Consider a shorter alternative.
Context: ...g mechanics. ### Fixed 1. CLI behaviour under stress.
(EN_WORDINESS_PREMIUM_UNDER_STRESS)
🪛 markdownlint-cli2 (0.21.0)
[warning] 212-212: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 213-213: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 213-213: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 216-216: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 216-216: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 219-219: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 219-219: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 221-221: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 221-221: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 224-224: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 225-225: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 225-225: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 228-228: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 228-228: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 230-230: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 230-230: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 233-233: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 233-233: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 234-234: Files should end with a single newline character
(MD047, single-trailing-newline)
🤖 Prompt for AI Agents