Skip to content

Conversation

@JobLeonard
Copy link

Add a simplified explanation of lexical lifetimes and scheduling to the Hello World! to concretely show the "value proposition" of Atmos as early as possible.

I also have an open question about the stream example.

Add a simplified explanation of lexical lifetimes and scheduling to the Hello World! to concretely show the "value proposition" of Atmos as early as possible
print("Hello World!")
end)
local s2 = S.from(clock{s=5}):take(1)
-- note that s2 comes before s1!
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually wasn't supposed to be in the commit, but it does highlight a question I have.

Currently s1 is defined before s2, an also placed before s2 in t he S.paror(s1,s2):to() call.

My intuition expects that the local definition order of s1 and s2 doesn't matter, but that the order in which they appear as arguments in S.paror does.

But wouldn't that mean that as currently written "Hello World!" would be printed five times in the stream example, meaning it's a bug if we want to make it equivalent to the first?

The stream section in the guide doesn't clarify this for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant