lower calc limit and lower marginalia weight
This commit is contained in:
parent
d6915cfd1d
commit
02865265e3
@ -1,4 +1,4 @@
|
|||||||
use std::{cell::Cell, sync::LazyLock, time::Instant};
|
use std::{cell::Cell, sync::LazyLock};
|
||||||
|
|
||||||
use fend_core::SpanKind;
|
use fend_core::SpanKind;
|
||||||
|
|
||||||
@ -194,9 +194,12 @@ fn evaluate_into_spans(query: &str, multiline: bool) -> Vec<Span> {
|
|||||||
context.set_output_mode_terminal();
|
context.set_output_mode_terminal();
|
||||||
}
|
}
|
||||||
|
|
||||||
// not a perfect anti-abuse but good enough for our purposes
|
// avoids stackoverflows and queries that take too long
|
||||||
|
// examples:
|
||||||
|
// - Y = (\f. (\x. f x x)) (\x. f x x); Y(Y)
|
||||||
|
// - 10**100000000
|
||||||
let interrupt = Interrupter {
|
let interrupt = Interrupter {
|
||||||
invocations_left: Cell::new(10000),
|
invocations_left: Cell::new(1000),
|
||||||
};
|
};
|
||||||
let Ok(result) = fend_core::evaluate_with_interrupt(query, &mut context, &interrupt) else {
|
let Ok(result) = fend_core::evaluate_with_interrupt(query, &mut context, &interrupt) else {
|
||||||
return vec![];
|
return vec![];
|
||||||
|
@ -72,7 +72,7 @@ impl Engine {
|
|||||||
Engine::Google => 1.05,
|
Engine::Google => 1.05,
|
||||||
Engine::Bing => 1.,
|
Engine::Bing => 1.,
|
||||||
Engine::Brave => 1.25,
|
Engine::Brave => 1.25,
|
||||||
Engine::Marginalia => 0.3,
|
Engine::Marginalia => 0.15,
|
||||||
_ => 1.,
|
_ => 1.,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user