define parallel/sequential in nac3artiq Rust side #74
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#74
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Make it clear that they are special. Same as now_mu, at_mu, delay_mu
What's your view on supporting things like
import artiq as aq
,with aq.parallel
aq.delay_mu
. This is the style we're moving towards here. In the current compiler,aq.delay
gives an obscure error message about missing time managers.Doesn't seem to be worth the extra complexity in the compiler.
aq.delay
(or anything other than plaindelay
) would not be supported at all.Actually this is #40.
FYI: I plan to support this together with #54 (as I have to do some refactoring, which can also support module type with little effort)
Cool! It's not a huge deal, but would make some things cleaner. The situation with the old compiler is a bit annoying because the error message is so bad.
So you'd define e.g.
delay_mu
andparallel
in a Python module? How will the compiler know that it's the special ones?Just get the Python object ID and compare them. In general we should use
SymbolResolver
to check for it.How do you know the object IDs of the special ones?
Call things like
NAC3.register_parallel(parallel)
from Python?016cbf2b90/nac3artiq/src/lib.rs (L250-L286)
But those would always be present in the global namespace, and are not confined to a module.
You can import it, or call
register_xxx(xxx)
in python, ignore the ID and check for the existance of a special field in the object, etc. This is just an implementation detail, I don't think it is hard to do.I would say the simplest way might be to just register the entire module and get whatever we want without implementing a register function for every special construct we have.
If we do implement this,
register_special(name, id)
and ID comparison sounds fine to me. We can probably also have decorators that make it consistent with the way@extern
works currently.