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

Simple - a Lua-derived "language"

Started by minebuild02, 05 September 2016 - 01:16 PM
minebuild02 #1
Posted 05 September 2016 - 03:16 PM
Decided to make a scripting language, actually it's a custom Lua environment.

Standard library contents:
  1. Standard Lua libraries (string, table, coroutine, parallel, math)
  2. Function wrappers
  3. System library (system) - manages handling events and computer power
  4. Network library (net) - manages RedNet
  5. DNS library (dns) - a wrapper for hostname-related RedNet functions
  6. Debug library (debug) - contains some functions that can be applied for debug purposes
  7. Conversion library (convert) - convert variables
  8. Iteration library (iterator) - Contains key/value and numerical iterator functions
  9. FS library (fs) - a shortened FS API
  10. Event library (event) - contains event names
You can view the source code at the download link.

Simple is UINT-Compatible. It can be used to run scripts using Universal Interpreter!

DOWNLOAD: Language library
Edited on 05 September 2016 - 01:29 PM
Gorzoid #2
Posted 05 September 2016 - 11:31 PM
Not really a custom language at all, you probably should have just merged this with Universal Interpreter, as there are not much uses for them individually. also whats with protected field, it does not really "protect" anything.
minebuild02 #3
Posted 06 September 2016 - 01:01 PM
Not really a custom language at all, you probably should have just merged this with Universal Interpreter, as there are not much uses for them individually. also whats with protected field, it does not really "protect" anything.
As much as I would like this to be the opposite, you're absolutely right. However I am planning to add custom functions and maybe even a simple class system.
Regarding Universal Interpreter, it WAS actually developed as the Simple interpreter, but I decided to make it compatible with loading other compatible programs.
Regarding the simple.protected field, it's just a fancy name for backing up _G
sci4me #4
Posted 18 September 2016 - 04:33 PM
Not really a custom language at all, you probably should have just merged this with Universal Interpreter, as there are not much uses for them individually. also whats with protected field, it does not really "protect" anything.
As much as I would like this to be the opposite, you're absolutely right. However I am planning to add custom functions and maybe even a simple class system. Regarding Universal Interpreter, it WAS actually developed as the Simple interpreter, but I decided to make it compatible with loading other compatible programs. Regarding the simple.protected field, it's just a fancy name for backing up _G

Not to be rude, but, even if you added all of those things, the language would still be Lua…
As for Universal Interpreter… well… it does next to nothing…

I encourage you to look into compiler development. You can do what I have done: write a compiler that compiles a custom language to Lua source code. You'll find that creating a robust and complete language is a surprisingly huge task, but it is very rewarding.