Custom Rings

ok. so ive tried about a million different things, and i just cant seem to get this to work how i want. it seems trival at first, and ive got a handful of partially working versions but everytime i run into some kind of problem that usually ends with the project freezing or breaking.

simply, i want this: untitled script pic(43) to look like this: untitled script pic(44)

now ive got a so-so technically working-how-its-supposed-to version, untitled script pic(45), but i want the ring slot to be in the block itself, without the ring parameters because i am already defining the parameters i want to use to the left.

heres some examples.

this, is all good:

untitled script pic(46)

untitled script pic(47)

untitled script pic(48)

acts just like a ring

untitled script pic(49)

untitled script pic(50)

untitled script pic(51)

heres where things get tricky:

untitled script pic(52)

untitled script pic(53)

untitled script pic(54)

nothing out of the ordinary, returns the unevaluated expression, but

untitled script pic(56)

untitled script pic(57)

untitled script pic(58)

it gives me the name of the wrong upvar

heres the code of what ive got;

untitled script pic(59)

(ive gotten close a couple of times without js using join / split blocks but they started acting up and getting too complicated for theyre supposed to do)

which works

mult( (pow (5)(3) )(2) )
or 5 ^ 3 * 2

but i want untitled script pic(62)

instead of untitled script pic(63)

and ideally, i want to be able to have
untitled script pic(64)
with a multi arg(which i could handle if the main block would behave) that still does all of the steps but doesnt nest into oblivion.

this is what i currently have:

untitled script pic(65)

which is just tne most stable thing ive got right now.

this untitled script pic(66)

explaination

(which is a ring, with the 'a' var not in the slot but taking place of the slot, so it doesnt just ring the a variable, but evaluates it into the expression that was put into the custom block and puts that into the ring, and the input list lets me set the parameter names to whatever was set by the upvar, as a string) (basically im returning a ring with the custom block vars passed in as the right values)

actually works great until i try constructing untitled script pic(67), and has a tendency to bug out and freeze snap if its part of an error

basically i want to know how rings declare parameters and how they become available in the right scope.

I have no idea, but are you saying that it works if you declare the input to be of type Reporter, but it doesn't work if you declare the input to be of type Any (Unevaluated)?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.