nesbox / TIC-80

TIC-80 is a fantasy computer for making, playing and sharing tiny games.
https://tic80.com
MIT License
5.03k stars 488 forks source link

Enhancement: Add libraries to help #1987

Open BuoYancYdabl opened 2 years ago

BuoYancYdabl commented 2 years ago

for example, "help math.sin()" will tell what is this and which parameters it can be. Doing "help table" will trace all the possible functions with "table." library.

If it will be complicated to do or simply not really helpfull you can always close this issue!

joshgoebel commented 2 years ago

I could see the helpfulness angle - some people REALLY love the built in help for API stuff, but I think per-language library help is just way out of scope (personally)... we support 7 scripting languages now - so each of them would need individual docs for libraries and some languages (think Ruby) have HUGE libraries... adding it all is probably most definitely out of scope (unless it was automated somehow) - if not we'd have to argue over what deserves to be in the tool and what not... just a mess, IMHO. :-) And all the work that would need to be done when a language had a big update (with lots of new/change API)...

Adding the TIC-80 API (which we own) has a lot of merit since we're in charge of it fully and can make sure it's current, up-to-date, and it's not going to see massive changes...

I think it'd be better to clearly link to up-to-date library docs for each language so users can go to those sites and explore the docs... or to have a per-language page on the wiki with "most helpful functions" though I have no idea who would decide which functions are "most helpful" or keep those collections properly curated...

That's my 0.02.

BuoYancYdabl commented 2 years ago

I could see the helpfulness angle - some people REALLY love the built in help for API stuff, but I think per-language library help is just way out of scope (personally)... we support 7 scripting languages now - so each of them would need individual docs for libraries and some languages (think Ruby) have HUGE libraries... adding it all is probably most definitely out of scope (unless it was automated somehow) - if not we'd have to argue over what deserves to be in the tool and what not... just a mess, IMHO. :-) And all the work that would need to be done when a language had a big update (with lots of new/change API)...

Adding the TIC-80 API (which we own) has a lot of merit since we're in charge of it fully and can make sure it's current, up-to-date, and it's not going to see massive changes...

I think it'd be better to clearly link to up-to-date library docs for each language so users can go to those sites and explore the docs... or to have a per-language page on the wiki with "most helpful functions" though I have no idea who would decide which functions are "most helpful" or keep those collections properly curated...

That's my 0.02.

I think adding a links to every library might be helpfull! Ill leave this open if you decide to do that.

joshgoebel commented 2 years ago

I created a placeholder page:

https://github.com/nesbox/TIC-80/wiki/supported-languages--libraries