Tag : rust

I’m getting slightly lost in Rust compiler semantics, but am attempting to find the lowest cost way of simply referring to an array of tuples of numbers by some name for each field and passing that around between functions. More concretely, I am receiving from an external source a list of the form [(f64, f64, f64)], each of which has a name. I want to be able to refer to the fields by name but without converting them to some additional type (unless that is zero ..

Read more

I am trying to process a lisp-like Sexp by recursively applying an optional simplifier to each node of the expression, and saving the result to an internal AST structure. The simplifier may stop processing sub-expressions (aka arguments) when they become unnecessary (lazyness). For example, one does not need to process C and D in the logical and expression (and A B false C D) because its simplification is false a..

Read more

First of all, I haven’t much experience with rust, so I’m probably misunderstanding some points. I am trying to make a object(struct) that iterate over the combinations of the elements in a iterator. I need to store a reference of the iterator’s elements in the struct but i was not able to figure out how to do it. This is my..

Read more