monome / crow

Crow speaks and listens and remembers bits of text. A scriptable USB-CV-II machine
GNU General Public License v3.0
166 stars 34 forks source link

Put global functions into (write protected?) tables #205

Closed trentgill closed 4 years ago

trentgill commented 5 years ago

time should be in util.time tell should be crow.tell or util.tell

there's all the C functions (including those 2 above) in libCrow: https://github.com/monome/crow/blob/master/lib/lualink.c#L448

Plus all the functions that are defined in crowlib https://github.com/monome/crow/blob/master/lua/crowlib.lua

pq commented 5 years ago

lots of global write-protection discussion over on norns... maybe https://github.com/monome/norns/pull/667 is useful?

tehn commented 5 years ago

luckily LVM reset happens all of the time with crow, which is good. no attempt to preserve LVM state across scripts.

only a handful of crow things need to be protected, and luckily they are few. would even be sufficient to get them into a table as suggested.

most overwrites will happen by accident, ie time = 3 since that is a common var

trentgill commented 4 years ago

Closing as it's a non-issue in terms of user experience.