Refs & state #24

Closed
opened 2023-12-27 00:40:03 +00:00 by scott · 3 comments
Owner

The object that run returns should not be a bespoke object that's managed and exported by the postlude, but actually a dump of all the refs in the executed Ludus code. Easy peasy: the result of a script is not only the result, but also the state of its stateful parts upon exiting.

The object that `run` returns should not be a bespoke object that's managed and exported by the postlude, but actually a dump of all the refs in the executed Ludus code. Easy peasy: the result of a script is not only the result, but also the state of its stateful parts upon exiting.
scott added the
accepted
clj
now
proposal
semantics
labels 2023-12-27 00:40:33 +00:00
scott self-assigned this 2023-12-27 04:18:16 +00:00
scott added this to the Computer Class milestone 2024-04-26 21:14:52 +00:00
Author
Owner

One design issue that's not so easy-peasy: refs would now need globally unique names.

That's probably good enough for Computer Class, which probably won't use refs except under the hood.

Possible solutions include:

  1. don't export refs in this way, but only specific, hard-coded refs,
  2. manually export refs with some magic function,
  3. give each ref a unique ID that isn't a lexical name

(In the latter case, naming conflicts would of course be checked.)

I'm actually leaning towards one of the first two.

This is mostly an issue for #31 and #23. Maybe work locally with those two, and then make a decision here.

One design issue that's not so easy-peasy: refs would now need globally unique names. That's probably good enough for Computer Class, which probably won't use refs except under the hood. Possible solutions include: 1. don't export refs in this way, but only specific, hard-coded refs, 1. manually export refs with some magic function, 1. give each ref a unique ID that isn't a lexical name (In the latter case, naming conflicts would of course be checked.) I'm actually leaning towards one of the first two. This is mostly an issue for #31 and #23. Maybe work locally with those two, and then make a decision here.
scott added
research
and removed
accepted
labels 2024-05-19 19:25:49 +00:00
scott modified the milestone from Computer Class to 0.2.0 2024-05-29 19:09:52 +00:00
Author
Owner

Everything stays hardcoded for Computer Class; fix this for 0.1.0.

Everything stays hardcoded for Computer Class; fix this for 0.1.0.
Author
Owner

This is now irrelevant; the actor model supersedes this.

This is now irrelevant; the actor model supersedes this.
scott closed this issue 2024-07-03 00:23:40 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: twc/ludus#24
No description provided.