Skip to content
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 rerun() #1465

Merged
merged 3 commits into from Oct 20, 2021
Merged

add rerun() #1465

merged 3 commits into from Oct 20, 2021

Conversation

tyleretters
Copy link
Contributor

started doing this in lua/lib/devtools.lua but that require()d too much effort on the dev side. scanning all the files already included this felt like the most logical place. open to feedback!

Copy link
Member

@ngwese ngwese left a comment

Choose a reason for hiding this comment

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

we have run into problems in the past single letter variables being overwritten or accidentally picked up in scripts so i’m hesitant to see the introduction of r

naming aside duplicating the implementation is not needed. functions are values just like anything else so r = rerun is all that is needed for creating aliases (which incidentally a user could easily do themselves)

@ngwese
Copy link
Member

ngwese commented Oct 19, 2021

fwiw stuff like this is also a great candidate for a mod

@tehn
Copy link
Member

tehn commented Oct 19, 2021

i'd be fine with

norns.rerun = function()
  norns.script.load(norns.state.script)
end

to facilitate less typing while staying inside the norns table, but i agree that we want to have fewer globals. also yes, this is a perfect candidate for a one-liner MOD.

@tyleretters tyleretters changed the title add rerun() and r() add rerun() Oct 19, 2021
@tyleretters
Copy link
Contributor Author

updated!

@tehn tehn merged commit df54e8c into monome:main Oct 20, 2021
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.

None yet

3 participants