Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Tharotiger

The useage of the Temp Folder

Recommended Posts

1. Global variables are evil. The only place where you can safely use globals is the interactive Lua shell, which runs inside its own sandbox. Everywhere else you should make all variables local. So far I've never had a situation where I needed to use globals, but I certainly had a few cases where I accidentally used globals instead of locals, which caused some hard to find bugs.

2. Variables are stored in RAM, which is very limited in OC compared to real computers. /tmp is a special filesystem, which (I think) does not count towards computer RAM usage.

3. It's a convenient place to put files when working in the shell without occupying space on the real hard disk.

4. It's guaranteed to be a writable location. The default OpenOS boot disk for example is loaded from the mod files and read-only, however you can still work in /tmp.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.