Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
food for thought.
caveat: i'm flummoxed as to why explicit unloading of
asl
is needed (where it isn't for other libraries brought in by arequire
, like, for examplebeat_clock
).anyway, the idea is a norns script with a line like this:
require 'asl'
will then be able to do things like:
and have it behave like in
druid
....
the dynamic case is tricky of course and requires a low-level
send
. so, something like:the bet is that a string-builder like this will be useful in the common-case and at least not confusing in the complex one...
it has the benefits of feedback from linters and IDEs (since it's valid lua) and scores bonus points for highlighting nicely in maiden
and generally in IDES (like vs code):
as for the global pollution issue (see #557), asl functions only get added to
_G
ifasl
is included and only hang around until the next script is loaded.i think that's probably the right thing.
i should emphasize that i think of this purely as food for thought and i'm not hugely invested in it landing as is (or at all). i just wanted to see the idea through...
fixes: #890
/cc @tehn @catfact @trentgill