@@ -193,7 +193,7 @@ fn hax(
194fn tar_u32<'a>(
194fn tar_u32<'a>(
195 ctx: &mut InterpreterContext,
195 ctx: &mut InterpreterContext,
196− subj: Rc<Noun>,
196+ subj: &'a Rc<Noun>,
198 formula: &'a Rc<Noun>,
198 formula: &'a Rc<Noun>,
199) -> Result<Rc<Noun>, TTanks> {
199) -> Result<Rc<Noun>, TTanks> {
@@ -216,16 +216,16 @@ fn tar_u32<'a>(
216 match ctx.jets.get(&hash) {
216 match ctx.jets.get(&hash) {
217 Some(f) => f(ctx, sample),
217 Some(f) => f(ctx, sample),
218 None => {
218 None => {
219− let foo = tar(ctx, subj.clone(), &b)?;
219+ let foo = tar(ctx, subj, &b)?;
220 let bar = tar(ctx, subj, &c)?;
220 let bar = tar(ctx, subj, &c)?;
221− tar(ctx, foo, &bar)
221+ tar(ctx, &foo, &bar)
226− let foo = tar(ctx, subj.clone(), &b)?;
226+ let foo = tar(ctx, subj, &b)?;
227 let bar = tar(ctx, subj, &c)?;
227 let bar = tar(ctx, subj, &c)?;
228− tar(ctx, foo, &bar)
228+ tar(ctx, &foo, &bar)
@@ -236,7 +236,7 @@ fn tar_u32<'a>(
236 4 => Ok(Rc::new(lus(&*tar(ctx, subj, &formula)?)?)),
236 4 => Ok(Rc::new(lus(&*tar(ctx, subj, &formula)?)?)),
238 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
238 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
239− let foo = tar(ctx, subj.clone(), &b)?;
239+ let foo = tar(ctx, subj, &b)?;
240 let bar = tar(ctx, subj, &c)?;
240 let bar = tar(ctx, subj, &c)?;
241 Ok(tis(ctx, &foo, &bar).clone())
241 Ok(tis(ctx, &foo, &bar).clone())
@@ -244,29 +244,29 @@ fn tar_u32<'a>(
244 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
244 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
245 let (c, d) = c.as_cell().ok_or(TTanks::new())?;
245 let (c, d) = c.as_cell().ok_or(TTanks::new())?;
247− let bar = tar_u32(ctx, subj.clone(), 4, &cell(&ctx.nouns.four.clone(), &b))?;
247+ let bar = tar_u32(ctx, subj, 4, &cell(&ctx.nouns.four.clone(), &b))?;
249− let foo = tar_u32(ctx, ctx.nouns.two_three.clone(), 0, &bar)?;
249+ let foo = tar_u32(ctx, &ctx.nouns.two_three.clone(), 0, &bar)?;
250− let foo = tar_u32(ctx, cell(&c, &d), 0, &foo)?;
250+ let foo = tar_u32(ctx, &cell(&c, &d), 0, &foo)?;
252 tar(ctx, subj, &foo)
252 tar(ctx, subj, &foo)
255 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
255 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
256 let foo = tar(ctx, subj, &b)?;
256 let foo = tar(ctx, subj, &b)?;
257− tar(ctx, foo, &c)
257+ tar(ctx, &foo, &c)
260 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
260 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
261− let foo = tar(ctx, subj.clone(), &b)?;
261+ let foo = tar(ctx, subj, &b)?;
262− tar(ctx, cell(&foo, &subj), &c)
262+ tar(ctx, &cell(&foo, &subj), &c)
265 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
265 let (b, c) = formula.as_cell().ok_or(TTanks::new())?;
266 let foo = tar(ctx, subj, &c)?;
266 let foo = tar(ctx, subj, &c)?;
271 &cell(&ctx.nouns.sig_one, &cell(&ctx.nouns.sig, &b)),
271 &cell(&ctx.nouns.sig_one, &cell(&ctx.nouns.sig, &b)),
@@ -276,7 +276,7 @@ fn tar_u32<'a>(
276 let (b, c) = b.as_cell().ok_or(TTanks::new())?;
276 let (b, c) = b.as_cell().ok_or(TTanks::new())?;
277 let b = b.as_atom().ok_or(TTanks::new())?;
277 let b = b.as_atom().ok_or(TTanks::new())?;
279− let foo = tar(ctx, subj.clone(), &c)?;
279+ let foo = tar(ctx, subj, &c)?;
280 let bar = tar(ctx, subj, &d)?;
280 let bar = tar(ctx, subj, &d)?;
281 hax(ctx, b, &foo, &bar)
281 hax(ctx, b, &foo, &bar)
@@ -285,7 +285,7 @@ fn tar_u32<'a>(
285 match b.borrow() {
285 match b.borrow() {
286 Noun::Atom(_) => tar(ctx, subj, &d),
286 Noun::Atom(_) => tar(ctx, subj, &d),
287 Noun::Cell { p, q, .. } => {
287 Noun::Cell { p, q, .. } => {
288− let eval = |ctx: &mut InterpreterContext| tar(ctx, subj.clone(), &d);
288+ let eval = |ctx: &mut InterpreterContext| tar(ctx, subj, &d);
289 if *p == ctx.nouns.memo {
289 if *p == ctx.nouns.memo {
290 let hash = cell(&subj, &d).hash();
290 let hash = cell(&subj, &d).hash();
291 match ctx.memo.get(&hash) {
291 match ctx.memo.get(&hash) {
@@ -299,7 +299,7 @@ fn tar_u32<'a>(
299 } else if *p == ctx.nouns.mean {
299 } else if *p == ctx.nouns.mean {
300 with_trace((subj.clone(), q.clone()), eval(ctx))
300 with_trace((subj.clone(), q.clone()), eval(ctx))
301 } else if *p == ctx.nouns.slog {
301 } else if *p == ctx.nouns.slog {
302− let noun = tar(ctx, subj.clone(), &q)?;
302+ let noun = tar(ctx, subj, &q)?;
303 let (_prio, tank) = noun.as_cell().ok_or(TTanks::new())?;
303 let (_prio, tank) = noun.as_cell().ok_or(TTanks::new())?;
305 (ctx.slog)(&ram(ctx, tank.clone()).unwrap_or(String::new()));
305 (ctx.slog)(&ram(ctx, tank.clone()).unwrap_or(String::new()));
@@ -411,7 +411,7 @@ pub fn ram_ttanks(ctx: &mut InterpreterContext, tanks: TTanks) -> String {
411pub fn ram_ttank(ctx: &mut InterpreterContext, ttank: TTank) -> String {
411pub fn ram_ttank(ctx: &mut InterpreterContext, ttank: TTank) -> String {
412 let (subj, q) = ttank;
412 let (subj, q) = ttank;
414− let tank = match tar(ctx, subj.clone(), &q) {
414+ let tank = match tar(ctx, &subj, &q) {
415 Ok(gate) => match eval_pulled_gate(ctx, gate) {
415 Ok(gate) => match eval_pulled_gate(ctx, gate) {
416 Ok(tank) => tank,
416 Ok(tank) => tank,
417 Err(_) => {
417 Err(_) => {
@@ -444,13 +444,13 @@ pub const EMPTY_TANKS: TTanks = TTanks::new();
445pub fn tar<'a>(
445pub fn tar<'a>(
446 ctx: &mut InterpreterContext,
446 ctx: &mut InterpreterContext,
447− subj: Rc<Noun>,
447+ subj: &'a Rc<Noun>,
448 formula: &'a Noun,
448 formula: &'a Noun,
449) -> Result<Rc<Noun>, TTanks> {
449) -> Result<Rc<Noun>, TTanks> {
450 let (op, formula) = formula.as_cell().ok_or(TTanks::new())?;
450 let (op, formula) = formula.as_cell().ok_or(TTanks::new())?;
451 match op.borrow() {
451 match op.borrow() {
452 Noun::Cell { .. } => {
452 Noun::Cell { .. } => {
453− let foo = tar(ctx, subj.clone(), &op)?;
453+ let foo = tar(ctx, subj, &op)?;
454 let bar = tar(ctx, subj, &formula)?;
454 let bar = tar(ctx, subj, &formula)?;
455 Ok(cell(&foo, &bar))
455 Ok(cell(&foo, &bar))
@@ -471,7 +471,7 @@ pub fn eval_gate(
471 ctx: &mut InterpreterContext,
471 ctx: &mut InterpreterContext,
472 gate_factory: &Rc<Noun>,
472 gate_factory: &Rc<Noun>,
473) -> Result<Rc<Noun>, TTanks> {
473) -> Result<Rc<Noun>, TTanks> {
474− let pulled_gate = tar(ctx, ctx.nouns.sig.clone(), &gate_factory)?;
474+ let pulled_gate = tar(ctx, &ctx.nouns.sig.clone(), &gate_factory)?;
475 eval_pulled_gate(ctx, pulled_gate)
475 eval_pulled_gate(ctx, pulled_gate)
@@ -480,7 +480,7 @@ pub fn slam(
480 gate_factory: &Rc<Noun>,
480 gate_factory: &Rc<Noun>,
481 sample: &Rc<Noun>,
481 sample: &Rc<Noun>,
482) -> Result<Rc<Noun>, TTanks> {
482) -> Result<Rc<Noun>, TTanks> {
483− let gate = tar(ctx, ctx.nouns.sig.clone(), &gate_factory)?;
483+ let gate = tar(ctx, &ctx.nouns.sig.clone(), &gate_factory)?;
485 eval_pulled_gate(ctx, replace_sample(&gate, sample)?)
485 eval_pulled_gate(ctx, replace_sample(&gate, sample)?)
@@ -490,7 +490,7 @@ pub fn slam(
490pub fn eval_pulled_gate(ctx: &mut InterpreterContext, gate: Rc<Noun>) -> Result<Rc<Noun>, TTanks> {
490pub fn eval_pulled_gate(ctx: &mut InterpreterContext, gate: Rc<Noun>) -> Result<Rc<Noun>, TTanks> {
495 &Rc::new(Noun::Atom(BigUint::new(vec![9]))),
495 &Rc::new(Noun::Atom(BigUint::new(vec![9]))),
496 &cell(&ctx.nouns.two, &cell(&ctx.nouns.sig, &ctx.nouns.one)),
496 &cell(&ctx.nouns.two, &cell(&ctx.nouns.sig, &ctx.nouns.one)),