uiua-lang/uiua

Integration into Rust macro ?

Closed this issue · 1 comments

The main advantage of language seems to be manipulating arrays purely on stack, without allocations. I could see this as a huge performance improvement similar to assembly macro, where one can modify assembly for performance reasons.

Could there be an enhancement, to use for example array { } macro, which would parse uiua code ?

something like:

let array = &vecRef
let result : [Int] = uiua::aray{ |array| -> row /+ (dip (*) , ) }

Uiua array data exists on the heap.
There is a Rust API for calling Uiua code from Rust code.
I would accept a PR for a macro like that one, but it would be complicated to implement. It would have to be a procedural macro.