This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MKlegoman357's profile picture

Full Lua library support and a few more suggestions

Started by MKlegoman357, 21 June 2016 - 07:52 PM
MKlegoman357 #1
Posted 21 June 2016 - 09:52 PM
I never really understood this: why CC's Lua does not have full support for Lua libraries. I can understand why such libraries (debug, package system, io, os) were disabled, but I couldn't think of a reason of (other than the debug library) rewriting those libraries either in Java or Lua side with a bit more sandboxing in place. Most of the mentioned libraries and their functions (with the exception of debug library) can be rewritten in CC right now, so why don't we have support for them yet?

And why would I actually want "native" Lua support? As most of CC users who want the same: there are a bunch of already written programs and libraries for Lua which could easily be loaded and used inside of CC if only we had the "native" Lua support.




For other suggestions. These are a few suggestions that didn't get negative feedback and got no comment/got positive feedback from Dan:

Http enhancements - the solution would be to add a new xhttp library and having the http library simply a wrapper around xhttp.

Selecting a color palette - a way to expand the current colors without the "program changing the colors of a windowed OS" problem.

File seeking - something that would allow my above suggestion to fully implement io library.

Why doesn't CC have the require function and the Lua package system - partly my suggestion which didn't really talk about a solution.
Gumball #2
Posted 21 June 2016 - 10:10 PM
Sounds like a great idea. I've actually learned Lua from CC so I am not too familiar with those other libraries, but I am always looking for more to learn.
+1 Upvote
SquidDev #3
Posted 22 June 2016 - 07:37 AM
CCTweaks adds some additional functionality to the http Api. I'd love to see file seeking, but I'm not sure how feasible it is: CC also has to support reading from it's zip file: not sure Java has support for seeking.

Blue Shiny Rocks emulates most of the standard library.

However, I'd love to see all of this within CC itself.
Edited on 22 June 2016 - 08:03 PM