Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 42 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ lto = true
[dependencies]
ahash = { version = "0.8.11", optional = true }
andy-cpp-macros = { path = "andy-cpp-macros" }
anyhow = "1.0.80"
clap = { version = "4.5.1", features = ["derive"] }
either = "1.11.0"
anyhow = "1.0.97"
clap = { version = "4.5.31", features = ["derive"] }
either = "1.14.0"
factorial = "0.4.0"
itertools = "0.13.0"
miette = { version = "7.2.0", features = ["fancy"] }
num = "0.4.1"
once_cell = "1.20.2"
ordered-float = "4.2.0"
owo-colors = "4.1.0"
itertools = "0.14.0"
miette = { version = "7.5.0", features = ["fancy"] }
num = "0.4.3"
once_cell = "1.20.3"
ordered-float = "5.0.0"
owo-colors = "4.2.0"
rand = "0.9.0"
rand_chacha = "0.9.0"
regex = "1.10.4"
regex = "1.11.1"
rustyline = { version = "15.0.0", optional = true, features = ["derive"] }
ryu = "1.0.17"
self_cell = "1.0.4"
serde = "1.0.217"
serde_json = { version = "1.0.138", features = ["arbitrary_precision"] }
thiserror = "2.0.3"
ryu = "1.0.20"
self_cell = "1.1.0"
serde = "1.0.218"
serde_json = { version = "1.0.140", features = ["arbitrary_precision"] }
thiserror = "2.0.12"

[dev-dependencies]
criterion = { version = "0.5.1", features = ["html_reports"] }
Expand Down
8 changes: 4 additions & 4 deletions andy-cpp-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
proc-macro = true

[dependencies]
proc-macro2 = "1.0.79"
quote = "1.0.35"
syn = { version = "2.0.55", features = ["full", "extra-traits"] }
itertools = "0.12.1"
proc-macro2 = "1.0.94"
quote = "1.0.39"
syn = { version = "2.0.99", features = ["full", "extra-traits"] }
itertools = "0.14.0"
2 changes: 2 additions & 0 deletions andy-cpp-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pub fn export_module(_attr: TokenStream, item: TokenStream) -> TokenStream {
let mut registrations = Vec::new();
let mut uses = Vec::new();

// TODO: if we find something that we don't wish to edit we can just copy it over instead of throwing an erreor
// TODO: if we find a non-public function we could just copy it over as well?
for item in items {
match item {
Item::Fn(f) => {
Expand Down
10 changes: 5 additions & 5 deletions benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn run_string(input: &str) -> Result<String, InterpreterError> {
interpreter.run_str(black_box(input), false)
}

#[allow(unused)]
fn math_benches(c: &mut Criterion) {
let mut group = c.benchmark_group("math");
group.warm_up_time(Duration::from_secs(2));
Expand Down Expand Up @@ -41,9 +42,9 @@ fn math_benches(c: &mut Criterion) {
Right,
}
let mut gen = |operand, operation| match (operand, operation) {
(Operand::Right, "^") => rng.gen_range(2..=9),
(Operand::Right, "/" | "\\" | "%" | "%%") => rng.gen_range(1..=10_000),
_ => rng.gen_range(-10_000..=10_000),
(Operand::Right, "^") => rng.random_range(2..=9),
(Operand::Right, "/" | "\\" | "%" | "%%") => rng.random_range(1..=10_000),
_ => rng.random_range(-10_000..=10_000),
};
for typ in types {
for (operator, operator_name) in operators {
Expand Down Expand Up @@ -101,7 +102,6 @@ fn math_benches(c: &mut Criterion) {
group.bench_function(format!("{typ} {operator_name}"), |b| {
b.iter(|| run_string(&program))
});
// println!("{program}");
}
}
}
Expand Down Expand Up @@ -129,5 +129,5 @@ fn directory_benches(c: &mut Criterion) {
}
}

criterion_group!(benches, directory_benches, math_benches);
criterion_group!(benches, directory_benches);
criterion_main!(benches);
2 changes: 1 addition & 1 deletion benches/programs/pi_approx.ndc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ fn monte_carlo_pi(num_samples) {
return (inside_circle / num_samples) * 4;
}

print(monte_carlo_pi(2_500_000).float)
print(monte_carlo_pi(100_000).float)