-
Notifications
You must be signed in to change notification settings - Fork 38
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
add Emit
IO
#257
base: dev
Are you sure you want to change the base?
add Emit
IO
#257
Conversation
This IO allows users emit (or log) events of its own interest It follows the description provided in #183
// checks if args is a number | ||
if self.check_num(term_to_emit, mana).is_err() { | ||
// if not a number, checks if is a flat CTR | ||
self.check_ctr_argm(subject, None, mana, term_to_emit)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should limit this the same way as CALL
. I'll review this better tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the issue #183 is written:
Emitted terms would be limited somehow, so it's O(1) to read them. Could be in the same way contract call input is limited: only allowing flat Ctrs on U120s.
The way is done, is only allowing "flat" Ctrs
or pure U120
if let Some(call_term) = call_term { | ||
events.push(Event { | ||
fnid: subject, | ||
argm: call_term, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not sure how storing RawTerm
s is working here. I'm pretty sure it should be readback
'ed to a Term
as in the done_term
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I avoided using readback
or doing any transforms on run_io
itself. So I send the RawCell's back as a result, and in the run_statement
function, after checking everything and doing the readback of the done_term
is that I actually read what is written in these RawCell
's (I used the show_term
, but was going to ask you if I should use readback
instead).
This IO allows users emit (or log) events of its own interest
It follows the description provided in #183; closes #183