Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

A couple of small improvements to CraftOS #566

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SquidDev
Copy link
Contributor

@SquidDev SquidDev commented Aug 12, 2018

  • Make window.reposition's argument validation a little more strict. Previously it would accept window.reposition(x, y, width) (no height argument), just not act upon it.
  • Use select instead of table.unpack within pastebin run.
  • Use parallel.waitForAny instead of waitForAll within the dance program.
  • Pipe the entire help file into textutils.pagedPrint, rather than doing it line by line.
  • Remove bytecode loading disabling from bios.lua. This never worked correctly, and serves little purpose as LuaJ is not vulnerable to such exploits.

I realise many of these changes are incredibly minor, and so don't really seem worth it. However, CraftOS is a great reference to link people to when they're looking for help, and so it's always good if we can show "best practices" for using CC & Lua's features.


If anyone else has changes that really aren't worth a separate PR, feel free to let me know/send a patch.

 - Make window.reposition's argument validation a little more strict.
   Previously it would accept `window.reposition(x, y, width)` (no
   height argument), just not act upon it.
 - Use select instead of table.unpack within `pastebin run`.
 - Use `parallel.waitForAny` instead of `waitForAll` within the dance
   program.
 - Pipe the entire help file into `textutils.pagedPrint`, rather than
   doing it line by line.
 - Remove bytecode loading disabling from bios.lua. This never worked
   correctly, and serves little purpose as LuaJ is not vulnerable to
   such exploits.
@SquidDev SquidDev force-pushed the feature/tiny-lua-wins branch from de13079 to 226000d Compare December 27, 2018 09:07
ccserver pushed a commit to ccserver/ComputerCraft that referenced this pull request Sep 16, 2019
…tiny-lua-wins

A couple of small improvements to CraftOS
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants