-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create a system of addressable instructions #18
Comments
I like the idea of using a single-consumption SSA type thing. Perhaps we can still have coproduction if we do something like this? (Excuse the horrible syntax.)
Summary: statements can have a preamble, which can give them a "name" and/or specify which other named statements they order-depend upon.
The "name" can be referenced with form If the statement's preamble includes the form Essentially, I think, this ends up turning each individual statement into its own Execution, effectively, in a way that's encoded into the Script. The names would be purely for lexical purposes; a compiled Script would probably only have SSA-style numbers or something. Of course, statements don't need to be named to have an order dependency; one can write:
I'm sure there are ways to make this less syntactically complex, but I think it is still inherently abstractable which is the main thing: someone could modify the parser (dynamically, of course) to always generate order dependencies on the statement above and in doing so create an imperative/synchronous language. |
@devyn (note, first, that #16 is unrelated to this (except, perhaps, in that they'll need different namespaces of some sort, I suppose.) That's to do with an SSA form for describing dependencies in an instruction graph (that has nothing to do with semantics; it's explicitly syntactic); this is about naming nodes in that graph, with semantic purposes.) So, what you're describing is basically the combination of #16 (almost, although your names are specifically data-value related, whereas my imagined syntax for #16 should allow any node to be depended upon by-name), combined with the partial/unhappy-making solution of retaining linearity for coproductive purposes I described today under #17 … So. Yeah. Sounds like you've come up with some specific examples of what I was already considering, which is good, 'cuz it means we're on the same page. That said, I've expressed my concerns with this solution elsewhere. Other than that, I didn't understand this statement: “This causes the statement to wait for that data value as soon as it needs to pass it out, but is not the same as adding an order dependency - it will use it as soon as it's available and doesn't cause the entire statement to wait.” However, that said, none of this is related to what I was intending to convey with this Issue. I was intending something completely different, with this: non-lexical (unlike the SSA node-naming for dependency purposes), and with semantic meaning inside the language. Think about it as … hm … Objective-C's named arguments, for the Paws equivalent of ‘arguments.’ So, named holes. Except, unlike the original plans for holes, this wouldn't be creating a specific ‘hole’ in the Script, something special that has to be filled … it would be naming an existing node in the Script, and then by referring to that name, pre-emptively setting the return-value of that node. I think. Kinda. (So, queueing results to be used? Or something?) This doesn't really relate to coproduction; it doesn't solve the problems in #17, nor does it even really interact with the current design. If we designed what I was trying to describe here on top of the current design without #17-style nonlinears, it'd still fit in: it could be used like old-school pipelining was; back then, I wanted to “result” multiple values quickly, with the intention of them filling in a series of subsequent holes in the thing we're resulting to. That didn't work out, but with this, we could queue up multiple results (multiple “arguments”) to a given Execution, by specifying which named-nodes to fill. |
Basically, given
The following will cause data dependency once execution of this statement reaches
And the following won't depend on the data from
And then this statement does both; it waits for
So, no, these aren't explicitly data related; they're really just "named statements" and the |
At the moment, the only way to give somebody a ‘hole’ for a given location in a Script, is for it to
unstage
itself at that location, and for you to give somebody else your Execution, and then run the Execution up to that unstaging. This is obviously terrible: it's inflexible, and precludes several useful abstractions:In addition, there's lots of issues (#17) with the desired non-linear executions we're discussing now that might be solved, or at least de-emphasized, by being able to specifically address instructions in a Script.
So, I don't have a specific solution to these I like, but the problems above obvious imply a particular sort of solution: a way to create stagings (resumptions), that represent a resumption at a specific place in the Script. (Anybody remember ‘holes?’)
To do that, we need a way to identify the aforementioend ‘specific place’ in a Script. Which, unless we can come up with an even more crazy-intricate folded-over-itself multi-dismensional syntax than Tires, basically means introducing naming to the syntax, somehow.
The text was updated successfully, but these errors were encountered: