monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
621 stars 144 forks source link

clean up system globals #559

Closed pq closed 4 years ago

pq commented 5 years ago

follow-up from meta issue #557, tracking for clean up of leaked norns system globals.


initial run (out of date)

```lua globals = { } for k,v in pairs(_G) do table.insert(globals, k..' : '..tostring(v)) end for _,v in ipairs(globals) do print(v) end _G : table: 0x538b8 _VERSION : Lua 5.3 _reset_lvm : function: 0x1be28 assert : function: 0x76c2e7bc audio_dir : /home/we/dust/audio/ audio_input_level : function: 0x1b1b4 audio_monitor_level : function: 0x1b114 audio_monitor_mono : function: 0x1a5b4 audio_monitor_off : function: 0x1a584 audio_monitor_on : function: 0x1a594 audio_monitor_stereo : function: 0x1a5a4 audio_output_level : function: 0x1b164 audio_pitch_off : function: 0x1a564 audio_pitch_on : function: 0x1a574 bit32 : table: 0x54898 clamped_value : 0.052140721099196 cleanup : function: 0x759a8 collectgarbage : function: 0x76c2e250 controlspec : table: 0x63a80 coroutine : table: 0x54418 data_dir : /home/we/dust/data/ debug : table: 0x55b98 dofile : function: 0x76c2e734 enc : function: 0x759a8 engine : table: 0x5fdc0 error : function: 0x76c2e1d0 fileselect : table: 0xef690 gain_hp : function: 0x1b5f8 gain_in : function: 0x1b590 get_time : function: 0x1a5c4 getmetatable : function: 0x76c2e6e4 grid : table: 0xaf500 grid_all_led : function: 0x1bf94 grid_cols : function: 0x1be6c grid_refresh : function: 0x1bf34 grid_rows : function: 0x1bed0 grid_set_led : function: 0x1c00c hid : table: 0x664b0 home_dir : /home/we init : function: 0x759a8 io : table: 0x55398 ipairs : function: 0x76c2e4b0 key : function: 0x759a8 line : network > load : function: 0x76c2e53c load_engine : function: 0x1b438 loadfile : function: 0x76c2e674 math : table: 0x56830 metro : table: 0xa3330 metro_set_time : function: 0x1b380 metro_start : function: 0x1a608 metro_stop : function: 0x1b3e8 midi : table: 0xb6188 midi_send : function: 0x1b488 mix : table: 0x6a020 next : function: 0x76c2e060 norns : table: 0x5aef0 os : table: 0x55128 osc : table: 0xee528 osc_send : function: 0x1aa84 osc_send_crone : function: 0x1a8d0 package : table: 0x53808 pairs : function: 0x76c2e490 params : table: 0xf2a78 paramset : table: 0x78fc8 pcall : function: 0x76c2d9a4 poll : table: 0x66260 print : function: 0x76c2dedc rawequal : function: 0x76c2de9c rawget : function: 0x76c2de04 rawlen : function: 0x76c2de44 rawset : function: 0x76c2ddb8 redraw : function: 0x759a8 report_engines : function: 0x1a8c0 request_poll_value : function: 0x1b21c require : function: 0x544d8 restart_audio : function: 0x1a4a0 s : 249255 s_aa : function: 0x1bd3c s_arc : function: 0x1b7a8 s_circle : function: 0xad858 s_clear : function: 0x1c1b4 s_close : function: 0x1c0b4 s_curve : function: 0x1b91c s_curve_rel : function: 0x1b858 s_extents : function: 0x1b644 s_fill : function: 0x1c174 s_font_face : function: 0x1bddc s_font_size : function: 0x1bd88 s_level : function: 0x1bcf0 s_line : function: 0x1bad0 s_line_cap : function: 0x1bc54 s_line_join : function: 0x1bc04 s_line_rel : function: 0x1b9e0 s_line_width : function: 0x1bca4 s_miter_limit : function: 0x1bbb8 s_move : function: 0x1bb44 s_move_rel : function: 0x1ba5c s_rect : function: 0x1b70c s_stroke : function: 0x1c134 s_text : function: 0x1b6bc s_text_center : function: 0xac270 s_text_right : function: 0xac258 s_update : function: 0x1c0f4 screen : table: 0xac7b0 script_dir : /home/we/dust/scripts/ select : function: 0x76c2da48 send_command : function: 0x1a6d4 set_aux_fx_input_level : function: 0x1b018 set_aux_fx_input_pan : function: 0x1afbc set_aux_fx_off : function: 0x1a4e4 set_aux_fx_on : function: 0x1a4f4 set_aux_fx_output_level : function: 0x1af78 set_aux_fx_param : function: 0x1aed4 set_aux_fx_return_level : function: 0x1af34 set_insert_fx_mix : function: 0x1ae90 set_insert_fx_off : function: 0x1a4c4 set_insert_fx_on : function: 0x1a4d4 set_insert_fx_param : function: 0x1ae30 set_poll_time : function: 0x1b26c setmetatable : function: 0x76c2e334 sound_file_inspect : function: 0x1ada8 start_audio : function: 0x1a4b4 start_poll : function: 0x1c1f4 startup : function: 0x760a0 state : table: 0x666b0 stop_poll : function: 0x1b2d4 string : table: 0x539c0 tab : table: 0x57ef8 table : table: 0x54ee0 tape_new : function: 0x1b0c4 tape_open : function: 0x1b074 tape_pause : function: 0x1a514 tape_pause_rec : function: 0x1a544 tape_play : function: 0x1a524 tape_start_rec : functi on: 0x1a554 tape_stop : function: 0x1a504 tape_stop_rec : function: 0x1a534 textentry : table: 0xdf838 tonumber : function: 0x76c2db18 tostring : function: 0x76c2da20 type : function: 0x76c2d94c us : 1537564476 usleep : function: 0x1b328 utf8 : table: 0x57458 util : table: 0x6b748 wifi : table: 0xe5420 xpcall : function: 0x76c2d8bc ```


10/14/2019: see: https://github.com/monome/norns/issues/559#issuecomment-541667273 for latest

pq commented 5 years ago

chatting w/ @tehn and @nf, some interest in exploring a _norns table (w/ possible sub-tables) to corral norns system vars. user-definable callbacks should stay global:

also:

and device tables:

and menu/audio functionality:

tehn commented 5 years ago

@pq i updated your comment with some clarification and additions. will further parse the list and update further

pq commented 5 years ago

ok, i’ve done some surveying and have sorted globals into some categories. roughly, i’m seeing:

as for next steps,

  1. by far the biggest impact would be to start by reigning in the c externs (eyeballing, this may be about half of the reigning in we can do and will have no user script impact)
  2. at the same time, we should cleanup the leaked symbols. there are fewer but they’re just mistakes and cleaning them up will only make the world better.
  3. deserving consideration are things we’ve decided to bless as globals. can any be pulled in? of the ones that shouldn’t, can we protect them from accidental user interference? (e.g., guard engine entries, protect config vars, etc)

once i’ve done another pass at grouping, i’ll update with a list here and we can go from them there.

pq commented 5 years ago

lua native env, libraries, functions

_G : table: 0x53910
_VERSION : Lua 5.3
_reset_lvm : function: 0x1bec0
assert : function: 0x76b547bc
bit32 : table: 0x548f0
collectgarbage : function: 0x76b54250
coroutine : table: 0x54470
debug : table: 0x55bf0
dofile : function: 0x76b54734
error : function: 0x76b541d0
getmetatable : function: 0x76b546e4
io : table: 0x553f0
ipairs : function: 0x76b544b0
load : function: 0x76b5453c
loadfile : function: 0x76b54674
math : table: 0x56888
next : function: 0x76b54060
os : table: 0x55180
package : table: 0x53860
pairs : function: 0x76b54490
pcall : function: 0x76b539a4
print : function: 0x76b53edc
rawequal : function: 0x76b53e9c
rawget : function: 0x76b53e04
rawlen : function: 0x76b53e44
rawset : function: 0x76b53db8
require : function: 0x54530
select : function: 0x76b53a48
setmetatable : function: 0x76b54334
string : table: 0x53a18
tab : table: 0x60510
table : table: 0x54f38
tonumber : function: 0x76b53b18
tostring : function: 0x76b53a20
type : function: 0x76b5394c
utf8 : table: 0x574b0
xpcall : function: 0x76b538bc

proposal: blessed; leave well enough alone


norns config

audio_dir : /home/we/dust/audio/ (dust: mlr)

data_dir : /home/we/dust/data/ (norns: menu, paramset, state, ...; dust: moln, step, foulplay, loom, ...)

home_dir : /home/we (norns: wifi)

script_dir : /home/we/dust/scripts/ (norns: menu, script, state)

proposal: consider putting in a table (norns.env?) and making immutable


user definable callbacks

cleanup : function: 0x75b18
enc : function: 0x10ac70
init : function: 0x101d38
key : function: 0x860b0
redraw : function: 0x75b18

proposal: blessed; leave well enough alone


norns tables

controlspec : table: 0x5ecf0
engine : table: 0x5fe20
metro : table: 0xada38
norns : table: 0x5af48
osc : table: 0xd00b8
params : table: 0xfb6a8
screen : table: 0xb6e50

proposal: blessed; leave well enough alone?

device tables

grid : table: 0xb9bc0
hid : table: 0xbfb48
midi : table: 0xc7ff0

proposal: consider hanging off the norns table (e.g., norns.devices.grid...)


menu/audio functionality

mix : table: 0xa65c0
paramset : table: 0xa4790

proposal: review...


externs (audio, grid, osc, poll, screen, metro, tape, etc)

audio_input_level : function: 0x1b24c
audio_monitor_level : function: 0x1b1ac
audio_monitor_mono : function: 0x1a64c
audio_monitor_off : function: 0x1a61c
audio_monitor_on : function: 0x1a62c
audio_monitor_stereo : function: 0x1a63c
audio_output_level : function: 0x1b1fc
audio_pitch_off : function: 0x1a5fc
audio_pitch_on : function: 0x1a60c

gain_hp : function: 0x1b690
gain_in : function: 0x1b628

get_time : function: 0x1a65c

grid_all_led : function: 0x1c02c
grid_cols : function: 0x1bf04
grid_refresh : function: 0x1bfcc
grid_rows : function: 0x1bf68
grid_set_led : function: 0x1c0a4

metro_set_time : function: 0x1b418
metro_start : function: 0x1a6a0
metro_stop : function: 0x1b480

midi_send : function: 0x1b520

osc_send : function: 0x1ab1c
osc_send_crone : function: 0x1a968

request_poll_value : function: 0x1b2b4
set_poll_time : function: 0x1b304
start_poll : function: 0x1c30c

send_command : function: 0x1a76c

s_aa : function: 0x1bdd4
s_arc : function: 0x1b840
s_circle : function: 0xb68f8
s_clear : function: 0x1c24c
s_close : function: 0x1c28c
s_curve : function: 0x1b9b4
s_curve_rel : function: 0x1b8f0
s_extents : function: 0x1b6dc
s_fill : function: 0x1c2cc
s_font_face : function: 0x1be74
s_font_size : function: 0x1be20
s_level : function: 0x1bd88
s_line : function: 0x1bb68
s_line_cap : function: 0x1bcec
s_line_join : function: 0x1bc9c
s_line_rel : function: 0x1ba78
s_line_width : function: 0x1bd3c
s_miter_limit : function: 0x1bc50
s_move : function: 0x1bbdc
s_move_rel : function: 0x1baf4
s_rect : function: 0x1b7a4
s_restore : function: 0x1c20c
s_save : function: 0x1c1cc
s_stroke : function: 0x1c14c
s_text : function: 0x1b754
s_text_center : function: 0xb7230
s_text_right : function: 0xb7218
s_update : function: 0x1c18c

set_aux_fx_input_level : function: 0x1b0b0
set_aux_fx_input_pan : function: 0x1b054
set_aux_fx_off : function: 0x1a57c
set_aux_fx_on : function: 0x1a58c
set_aux_fx_output_level : function: 0x1b010
set_aux_fx_param : function: 0x1af6c
set_aux_fx_return_level : function: 0x1afcc
set_insert_fx_mix : function: 0x1af28
set_insert_fx_off : function: 0x1a55c
set_insert_fx_on : function: 0x1a56c
set_insert_fx_param : function: 0x1aec8

restart_audio : function: 0x1a538
start_audio : function: 0x1a54c
stop_poll : function: 0x1b36c

tape_new : function: 0x1b15c
tape_open : function: 0x1b10c
tape_pause : function: 0x1a5ac
tape_pause_rec : function: 0x1a5dc
tape_play : function: 0x1a5bc
tape_start_rec : function: 0x1a5ec
tape_stop : function: 0x1a59c
tape_stop_rec : function: 0x1a5cc

(registered in weaver/oracle called from Audio, Grid, Effects, Metro, Midi, Mix, Osc, Poll, Screen, Tape modules)

proposal: register as functions in a single table (https://github.com/monome/norns/issues/425#issuecomment-397030353)

leaked symbols

~clamped_value : 0.28306151645207~ #659 (accidental set in Control:set_raw(value))

~p : table: 0xaae68~ #659 (accidental set in function ParamSet:add_option)

~us : 1543023024~ #659 ~s : 797016~ #659 (accidental set in util.time)

proposal: make local status: done


misc: to review

fileselect : table: 0xd6608 (used in menu and mlr)

proposal: consider adding to a utils table?

load_engine : function: 0x1b4d0 (extern registered in weaver; no use in dust)

proposal:: add to externs table?

poll : table: 0x66d18 (exported in startup.lua; does it have to be?)

report_engines : function: 0x1a958 (registered in weaver; script utility)

proposal: leave global?

sound_file_inspect : function: 0x1ae40 (registered in weaver; used in menu)

proposal: add to externs table?

startup : function: 0x75bd8 (defined in norns —> does it need to be global?)

textentry : table: 0xfaa08 (used in mlr)

proposal: consider adding to utils table?

usleep : function: 0x1b3c0 (registered in weaver; unused?)

proposal: remove or add to externs table

util : table: 0x6b6c8 (accidentally global in util.lua module?)

proposal: make local

wifi : table: 0xf8d38 (made global in startup)

proposal: add to norns table

state : table: 0x6da68 (accidentally global in state module?)

proposal: make local

catfact commented 5 years ago

poll : table: 0x66d18 (???: not sure where this library table is getting exported)

looks like one of the many things exported to global by startup.lua? https://github.com/monome/norns/blob/master/lua/startup.lua#L7-L28

tehn commented 5 years ago

great eval!! i'll comb and clarify some.

shall we add checkboxes to each?

pq commented 5 years ago

check-boxes somewhere would be great. and someplace to track who's doing what.

tehn commented 5 years ago

re: checkboxes. your dash-through method also works wonderfully!

notes:

so this would clean up global but make a huge mess of norns.* so perhaps we need some forward thought for subtables? or maybe it's ok to be unsorted?

also some fields in norns need to be editable directly. if we want to protect the entire table we'd need to overhaul quite a few things and add getter/setter methods?

catfact commented 5 years ago

small reminder that the norns table originally had a specific role - it is the one and only place in the lua code where the C interface looks for functions to call. (it is true that scripts should not modify anything in norns, but that is by implication and not by primary motivation. system modules can and should modify things in norns.)

at this point it has kinda randomly acquired some other stuff. (for example, there is a norns.audio, which seems unnecessary - audio is a lua module.

some fields in norns need to be editable directly. if we want to protect the entire table

i wouldn't. here's my suggestion:

in other words: lua functions called from C have to be global, so they should be collected in a table and that table shouldn't be used by scripts. (it's currently called norns but seems like it should be more explicit like extern.) there's no real requirement that C functions called from lua have to be in the same table but i guess it makes sense.

tehn commented 5 years ago

understood/agreed that norns.* got out of hand and beyond the original scope. one rationalization is it's the hide-away place (without protection currently) but we can improve on that. the menu/script/state management (basically the layer between system calls and user scripts) need some evaluation/scrutiny, and i apologize in advance to anyone willing to look.

user scripts should never touch norns.* as that's really weird syntax to impose and makes little sense.

on the other hand, making metro and audio (etc) read-only makes a ton of sense.

we can always bundle all externs into a single table system if that makes sense? just one level deep even.

pq commented 5 years ago

assuming we go with norns subtables, a few concrete proposals:

thoughts?

/cc @catfact @tehn

1 or if we want communicate off-limits, maybe even norns._system or norns._externs?

pq commented 4 years ago

revisiting. after cleanups, here's a fresh dump.

_G : table: 0x320cc8
_VERSION : Lua 5.3
_clock_cancel : function: 0x1cfb0
_clock_get_time_beats : function: 0x1c5e0
_clock_internal_set_tempo : function: 0x1cf70
_clock_schedule_sleep : function: 0x1f1cc
_clock_schedule_sync : function: 0x1f0e8
_clock_set_source : function: 0x1cf30
_norns : table: 0x3257c0
_path : table: 0x3297d8
_reset_lvm : function: 0x1dd00
_startup : function: 0x349d58
arc : table: 0x3358b8
arc_all_led : function: 0x1f070
arc_set_led : function: 0x1dda4
assert : function: 0x76c1a7bc
audio : table: 0x336790
audio_pitch_off : function: 0x1c620
audio_pitch_on : function: 0x1c630
bit32 : table: 0x321ca8
cleanup : function: 0x347da0
clock : table: 0x388e98
collectgarbage : function: 0x76c1a250
controlspec : table: 0x3a29d8
coroutine : table: 0x321828
crow : table: 0x33d220
debug : table: 0x322fa8
dofile : function: 0x76c1a734
enc : function: 0x347da0
engine : table: 0x3a6208
error : function: 0x76c1a1d0
free_engine : function: 0x1ef98
gain_hp : function: 0x1d3ec
get_time : function: 0x1c640
getmetatable : function: 0x76c1a6e4
grid : table: 0x35c060
grid_all_led : function: 0x1df8c
grid_cols : function: 0x1dec4
grid_rows : function: 0x1df28
grid_set_led : function: 0x1e004
grid_set_rotation : function: 0x1de4c
hid : table: 0x35d680
include : function: 0x38f8a0
io : table: 0x3227a8
ipairs : function: 0x76c1a4b0
key : function: 0x347da0
load : function: 0x76c1a53c
load_engine : function: 0x1d294
loadfile : function: 0x76c1a674
math : table: 0x323c40
metro : table: 0x3515c0
metro_set_time : function: 0x1d1dc
metro_start : function: 0x1c684
metro_stop : function: 0x1d244
midi : table: 0x3748b0
midi_send : function: 0x1d2e4
mix : table: 0x3e0370
monome : true
monome_refresh : function: 0x1dd44
next : function: 0x76c1a060
norns : table: 0x3287e8
os : table: 0x322538
osc : table: 0x3a6008
osc_send : function: 0x1cb08
osc_send_crone : function: 0x1c954
package : table: 0x320c18
pairs : function: 0x76c1a490
params : table: 0x3bb898
paramset : table: 0x3abe28
pcall : function: 0x76c199a4
poll : table: 0x3377d0
print : function: 0x76c19edc
rawequal : function: 0x76c19e9c
rawget : function: 0x76c19e04
rawlen : function: 0x76c19e44
rawset : function: 0x76c19db8
redraw : function: 0x347da0
report_engines : function: 0x1c944
request_poll_value : function: 0x1d078
require : function: 0x3218e8
restart_audio : function: 0x1c5fc
s_aa : function: 0x1dc0c
s_arc : function: 0x1d678
s_circle : function: 0x356fb0
s_clear : function: 0x1ee58
s_close : function: 0x1ee18
s_curve : function: 0x1d7ec
s_curve_rel : function: 0x1d728
s_display_png : function: 0x1d438
s_export_png : function: 0x1d4c4
s_extents : function: 0x1d514
s_fill : function: 0x1ef58
s_font_face : function: 0x1dcac
s_font_size : function: 0x1dc58
s_level : function: 0x1dbc0
s_line : function: 0x1d9a0
s_line_cap : function: 0x1db24
s_line_join : function: 0x1dad4
s_line_rel : function: 0x1d8b0
s_line_width : function: 0x1db74
s_miter_limit : function: 0x1da88
s_move : function: 0x1da14
s_move_rel : function: 0x1d92c
s_rect : function: 0x1d5dc
s_restore : function: 0x1eed8
s_save : function: 0x1ee98
s_stroke : function: 0x1ef18
s_text : function: 0x1d58c
s_text_center : function: 0x356f98
s_text_right : function: 0x356f80
s_update : function: 0x1efd8
screen : table: 0x34e100
select : function: 0x76c19a48
send_command : function: 0x1c754
set_poll_time : function: 0x1d0c8
setmetatable : function: 0x76c1a334
softcut : table: 0x3b3670
sound_file_inspect : function: 0x1cff0
start_audio : function: 0x1c610
start_poll : function: 0x1f018
stop_poll : function: 0x1d130
string : table: 0x320dd0
tab : table: 0x32ceb0
table : table: 0x3222f0
tonumber : function: 0x76c19b18
tostring : function: 0x76c19a20
type : function: 0x76c1994c
usleep : function: 0x1d184
utf8 : table: 0x324868
util : table: 0x33f028
wifi : table: 0x3b4910
xpcall : function: 0x76c198bc
test script

`globals.lua`: ```lua local function sleep(n) os.execute("sleep " .. tonumber(n)) end function init() sleep(2) print('globals') print('------------------------------------------') local globals = {} for k, v in pairs(_G) do table.insert(globals, k .. ' : ' .. tostring(v)) end table.sort(globals) for _, v in ipairs(globals) do print(v) end print('------------------------------------------') end ```

tehn commented 4 years ago

rad, thank you!

tehn commented 4 years ago

i'll annotate this really quick.

r = reserved/lua i = included lib ? = not sure n = norns system function not marked = will be moved into the _norns table within weaver.c (?)

r _G : table: 0x320cc8
r _VERSION : Lua 5.3
_clock_cancel : function: 0x1cfb0
_clock_get_time_beats : function: 0x1c5e0
_clock_internal_set_tempo : function: 0x1cf70
_clock_schedule_sleep : function: 0x1f1cc
_clock_schedule_sync : function: 0x1f0e8
_clock_set_source : function: 0x1cf30
n _norns : table: 0x3257c0
n _path : table: 0x3297d8
_reset_lvm : function: 0x1dd00
n _startup : function: 0x349d58
i arc : table: 0x3358b8
? arc_all_led : function: 0x1f070
? arc_set_led : function: 0x1dda4
r assert : function: 0x76c1a7bc
i audio : table: 0x336790
audio_pitch_off : function: 0x1c620
audio_pitch_on : function: 0x1c630
? bit32 : table: 0x321ca8
n cleanup : function: 0x347da0
i clock : table: 0x388e98
r collectgarbage : function: 0x76c1a250
i controlspec : table: 0x3a29d8
r coroutine : table: 0x321828
i crow : table: 0x33d220
? debug : table: 0x322fa8
r dofile : function: 0x76c1a734
n enc : function: 0x347da0
i engine : table: 0x3a6208
r error : function: 0x76c1a1d0
free_engine : function: 0x1ef98
gain_hp : function: 0x1d3ec
get_time : function: 0x1c640
r getmetatable : function: 0x76c1a6e4
i grid : table: 0x35c060
? grid_all_led : function: 0x1df8c
? grid_cols : function: 0x1dec4
? grid_rows : function: 0x1df28
? grid_set_led : function: 0x1e004
? grid_set_rotation : function: 0x1de4c
i hid : table: 0x35d680
n include : function: 0x38f8a0
r io : table: 0x3227a8
r ipairs : function: 0x76c1a4b0
n key : function: 0x347da0
? load : function: 0x76c1a53c
load_engine : function: 0x1d294
r loadfile : function: 0x76c1a674
r math : table: 0x323c40
i metro : table: 0x3515c0
metro_set_time : function: 0x1d1dc
metro_start : function: 0x1c684
metro_stop : function: 0x1d244
i midi : table: 0x3748b0
midi_send : function: 0x1d2e4
n/? mix : table: 0x3e0370
? monome : true
? monome_refresh : function: 0x1dd44
r next : function: 0x76c1a060
n norns : table: 0x3287e8
r/? os : table: 0x322538
i osc : table: 0x3a6008
osc_send : function: 0x1cb08
osc_send_crone : function: 0x1c954
r/? package : table: 0x320c18
r pairs : function: 0x76c1a490
i params : table: 0x3bb898
i paramset : table: 0x3abe28
r pcall : function: 0x76c199a4
n poll : table: 0x3377d0
r print : function: 0x76c19edc
? rawequal : function: 0x76c19e9c
? rawget : function: 0x76c19e04
? rawlen : function: 0x76c19e44
? rawset : function: 0x76c19db8
n redraw : function: 0x347da0
report_engines : function: 0x1c944
request_poll_value : function: 0x1d078
r require : function: 0x3218e8
restart_audio : function: 0x1c5fc
s_aa : function: 0x1dc0c
s_arc : function: 0x1d678
s_circle : function: 0x356fb0
s_clear : function: 0x1ee58
s_close : function: 0x1ee18
s_curve : function: 0x1d7ec
s_curve_rel : function: 0x1d728
s_display_png : function: 0x1d438
s_export_png : function: 0x1d4c4
s_extents : function: 0x1d514
s_fill : function: 0x1ef58
s_font_face : function: 0x1dcac
s_font_size : function: 0x1dc58
s_level : function: 0x1dbc0
s_line : function: 0x1d9a0
s_line_cap : function: 0x1db24
s_line_join : function: 0x1dad4
s_line_rel : function: 0x1d8b0
s_line_width : function: 0x1db74
s_miter_limit : function: 0x1da88
s_move : function: 0x1da14
s_move_rel : function: 0x1d92c
s_rect : function: 0x1d5dc
s_restore : function: 0x1eed8
s_save : function: 0x1ee98
s_stroke : function: 0x1ef18
s_text : function: 0x1d58c
s_text_center : function: 0x356f98
s_text_right : function: 0x356f80
s_update : function: 0x1efd8
i screen : table: 0x34e100
r select : function: 0x76c19a48
send_command : function: 0x1c754
set_poll_time : function: 0x1d0c8
r setmetatable : function: 0x76c1a334
i softcut : table: 0x3b3670
sound_file_inspect : function: 0x1cff0
start_audio : function: 0x1c610
start_poll : function: 0x1f018
stop_poll : function: 0x1d130
r string : table: 0x320dd0
i tab : table: 0x32ceb0
r table : table: 0x3222f0
r tonumber : function: 0x76c19b18
r tostring : function: 0x76c19a20
r type : function: 0x76c1994c
usleep : function: 0x1d184
r utf8 : table: 0x324868
i util : table: 0x33f028
i wifi : table: 0x3b4910
r xpcall : function: 0x76c198bc
tehn commented 4 years ago

getting shorter!

(edited out native globals)

hid : table: 0x35cdb8
mix : table: 0x3c9cf8
enc : function: 0x42e8e8
arc : table: 0x32fa48
audio : table: 0x3352e0
key : function: 0x3790c0
tab : table: 0x32bf70
grid : table: 0x359108
menu : table: 0x3633f8
cleanup : function: 0x42e580
osc : table: 0x3a6248
_norns : table: 0x324718
screen : table: 0x34d3c8
metro : table: 0x350d20
include : function: 0x3ce748
paramset : table: 0x3ac080
_path : table: 0x3287a0
engine : table: 0x3a6448
math : table: 0x322b98
_startup : function: 0x3469b0
clock : table: 0x369c70
init : function: 0x42eb40
params : table: 0x3bbaf0
poll : table: 0x3367b8
softcut : table: 0x3b38c8
norns : table: 0x327888
crow : table: 0x3462b0
util : table: 0x346970
controlspec : table: 0x3a2c10
wifi : table: 0x3b4b68
redraw : function: 0x3475d8
midi : table: 0x365378
tehn commented 4 years ago

closing this now, but we can revisit this if needed.