Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to /display/ an entire chain of operations producing a variable #367

Open
tekacs opened this issue Nov 13, 2017 · 5 comments

Comments

@tekacs
Copy link
Contributor

tekacs commented Nov 13, 2017

Issue type:

➕ Feature request

Description

IntegratedDynamics doesn't let the user /write/ their own functions (as mentioned in #211), but for debugging purposes, whilst looking at labels is passable, it would be incredibly helpful to be able to see the entire chain of operations leading to a variable's construction.

This probably relates to the (mentioned in some issue that I can't find by @rubensworks, IIRC) suggestion that it should be possible to copy programs for example to put them here in Github Issues.

This possibly relates to #357, as being able to pretty-print variables may depend on reading them back into 'programmer form' from NBT.

What I'm hoping/asking for is something along the lines of the Haskell-esque form that we've all been writing in issues here, along the lines of:

someList = {#11 inventoryReader.items}
mappedList = map uname someList
predicate = and (contains mappedList x) (contains mappedList y)

where someList and the like are labelled variable names,

or (from #211, meant for computers not humans - though breaking it up like above to be more human readable in a heuristic fashion would be nice)

conj(disj(dot(apply(flip(modulus), 3), apply(equals, 0)), dot(apply(flip(modulus), 3), apply(equals, 0))), negate(conj(dot(apply(flip(modulus), 3), apply(equals, 0)), dot(apply(flip(modulus), 3), apply(equals, 0)))))

which is also simpler with some syntax re-introduced (apply left explicit, to be easier for players), in a form like

(apply contains (map uname itemList)) . uname

Any thoughts?

@josephcsible
Copy link
Contributor

In your inventory, it would be really difficult to make that work unless you materialize everything, since you as a player aren't attached to the network that has all of the intermediate step variables.

@tekacs
Copy link
Contributor Author

tekacs commented Nov 13, 2017

@josephcsible Yup, I was assuming it'd have to either be done in one of the existing blocks (display panel, materializer?, proxy?) or by adding a new one.

@tekacs
Copy link
Contributor Author

tekacs commented Nov 13, 2017

I guess that inside the variable store would be one place that this could be correctly displayed (and this would be my suggested option, since that's where I'd expect most debugging to centre around).

@rubensworks
Copy link
Member

@tekacs Do you specifically mean stringifying a chain of operations? Or simply displaying it in a nice way ingame?

What I have in mind for the advanced LP, is that it has a canvas on which operators can be visually chained together (possibly enhanced with IDE-like keyboard controls). This would already allow you to visually observe the operator chains. Other than that, this graph-based visualization would also be exportable (and importable) via JSON (or something similar).

So until this advanced LP arrives, perhaps a quick way for exporting the complete chain behind a variable as a string would be indeed nice for debugging. Adding this behaviour to a network-attached part would indeed be the only way of doing this.

IMO it's not worth the effort to spend time on this as a standalone feature, but I'd rather invest the effort in working towards an advanced LP.

@TomyLobo
Copy link
Contributor

TomyLobo commented Nov 28, 2019

https://www.gradlibrary.net/ this library looks like it'd fit the bill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Options
Development

No branches or pull requests

5 participants