-
Notifications
You must be signed in to change notification settings - Fork 52
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
Robot to name or id and back #343
Comments
Also, since #303 each robot gets a random name, like Fermi or Gagarin. 😄 This funny detail is sadly not shown to users. To kick off the discussion, my idea would be to add two functions: robotNamed : string -> cmd robot // current 'find'
robot : int -> cmd robot // currently missing Then the |
@xsebek I am fine with I agree the |
Btw. when
So I would argue for just printing If we wanted to make it really opaque, we could print EDIT: the name also shows up in uploaded logs, which is another good reason to show it in REPL |
One problem is that names are not guaranteed to be unique. So printing out The names are supposed to provide a convenient way for you to tell which robot you are |
I guess in general I don't see the need to be able to look up robots by name. If you are just dealing with a few robots directly at the REPL, you can just put them in memorably named variables. If you are writing a program to deal with many robots, then you will have them in some sort of data structure, and it really doesn't make a difference whether you're dealing with strings or |
Sure, but Pairing the REPL command to the robot that logged some error seems quite important. For debugging, I need the robot numbers. Even if I occasionally do |
I was frustrated today when I forgot to bind the result of
This should be quite doable with some clever data structures. Is it worth it? Is it too complex? |
@byorgey I like it, sounds very user Maybe if you have a spare counter you could make an indexed log of robots:
This would be so helpful for debugging, maybe we could add that to cheating:
|
Ah, I like the idea of making it a device! I don't know if it needs to be a separate cheating option; if you turn on |
I'm not sure I understand what you mean. But in any case I don't really care, if you think adding a special command-line flag would be much more convenient, then feel free to add it. |
Sometimes I need a dirty and direct way to get the n-th robot in the world quickly. The name of the command is longer by design so that it does not get confused with the proposed `child` command or custom user definitions. - part of #343
The diagram above is filled now with |
This is a meta issue for discussion of the way we convert between robot, its name and id.
Why the robot ID? Because it is unique, stored in
VRobot Int
and printed in REPL:The problem is that typing
<r1>
in REPL does not returnrobot
value. What shall we do?The text was updated successfully, but these errors were encountered: