Howto – LuaLu REPL IDE (Lua version 5.3.4)

LuaLu 4.3.0 Preview

1. Lua REPL

when LuaLu App started, a Lua REPL environment was created. It’s the official Lua standalone interpreter ported to iOS platforms. It runs in a full featured Terminal, support color and links.

1. Intergrated inspect.lua and color.lua libraries

2. Set package.path for Documents and Bundle, you can require Lua files in them.

3. Define bundle, home, doc global var, you can use them in the REPL environment.

4. Useful keyboard input shortcuts, you can input numbers and symbols conveniently. The ‘Tab’ and arrow buttons are also very useful when using the App without physic keyboard.

The App starts the REPL environment by execute the following command in the terminal.

lua -v -i {document/or/bundle/path}/LuaLuAppScripts/lualu.lua --

If lualu.lua script exists in Documents/LuaLuAppScripts folder, it will be executed, or I will look for it in App bundle, if it exists in bundle, then it will be executed.

1.1 Navigationbar tools

1.1.1 Terminal settings

1. Theme (developing)

can choose theme for terminal, there will be some themes support Light/Dark Mode

2. Clear

clear all contents in terminal. You can use this function when there are too many contents in terminal.

3. scrollToTop/scrollToBottom

terminal is scrollable, you can use these functions to scroll it quickly.

1.1.2 REPL settings

Reset lualu.lua:

There are two copies of lualu.lua file, one is in App bundle, it was shipped with the App, and it’s read-only. The other is in Documents/LuaLuAppScripts/, it was coped to there when users opened the App first time(The App check if there is a file named ‘lualu.lua’ exists in Documents/LuaLuAppScripts folder. If not exist, then copy it from bundle. If exists, then will not copy. Because users may modified the file, we will not override it.)

Sometimes, you may want to restore lualu.lua file to the default, you can use this function.

You can also do this through other methods:

1.shell command

copy $APPDIR/LuaLuAppScripts/lualu.lua $HOME/Documents/LuaLuAppScripts/lualu.lua

2.File Manager

File Manager supports copy/paste files and folders..

1.2 Keyboard Input Accessory View

The Keyboard Input Accessory View has 11 buttons, from left to right are:

1.Tab, click it to trigger command or filename completion

2~5.Swipe Button with 5 keys

6. Track Ball, currently not work, the bug will be fixed in next release

7~9. Swipe Button

10. Arrow Button, works like the arrow keys on physic keyboard

11. Hide Keyboard Button

What is Swipe Button:

just like the name, you can swipe on the button. If you want to input the key on the topleft, topright, bottomleft, bottomright, you just swipe to there direction. If you want to input the key in the center, just click the button.

2.Code Editor

You can create and open Lua, C, markdown, HTML, CSS, JavaScript and many more source code files with syntax highlight supports. And you can run and debug Lua scripts.

2.1 Open/Create Files

2.2 Text Editor Settings

2.3 Run/Debug Lua files

2.4 Open/Close Float Panels

0.Known Issues

0.1 Terminal not responding

sometimes when you input some text and press return, if the app does not output any results, then the terminal will be not responding. That means if you click keyboard buttons, the terminal will not receive the text you input. There is a workaround, you can click the ellipse button, then click the “clear line”

0.2 LuaLu app scripts not updated automatically after App updated to new version

When you update the App to a new version. The Lua scripts bundled in the new App will not be copied into the Documents folder. You need to copy them to there by yourself. Because I didn’t keep the old version scripts, so I don’t know whether you have modified the scripts, and I don’t want to override the scripts in case you have modified them.