Ludus should allow spawn!
ing turtles
#56
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: twc/ludus#56
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Let's do multiple turtles!
The core turtle graphics functions,
forward!
, etc., address:turtle_0
.We need to design and devise an API for additional turtles.
I think what we want to be able to do is something like the following:
This depends upon method sugar, but hey, that's fine.
The one issue I have with this is that, conceptually,
forward! (100)
isn't just sugar formyturtle ::forward! (100)
; that means that you can't dosend (:turtle_0, (:forward!, 100))
.Architecturally, I can't do this now, since
prelude
is loaded synchronously before every run, and can't spawn actors it can pass to processes.For now, I think that's okay. I don't want to muck with the architecture at this point. Long-term, we will probably want some architectural flexibility around this.
In fact, it's the case that we need actors to do this, but we're going to use actors to do this. It would be easy enough for turtle functions to take a keyword turtle id--if we're keeping track of multiple turtle states in a single boxed dict, then there's no reason we couldn't do this.
Of course, we do want actors to do this. Anyway, this should work now. But we have a few other things we have to do to the language to make this ergonomic.
Done in
8e75713cd7