Run lua file other than main in replit - lua

I'm trying to run a lua file other than main on replit.com, and I'm not sure how to do that. I know in java you just type "java name_of_file" into the terminal but typing "lua name_of_file) doesn't work.
Here is a screenshot of what I'm trying to do:
Here is my code on replit, so you can try running it: https://replit.com/join/kxisutsa-suzm10

You are currently in console, use shell instead and use lua activity.lua to run the activity.lua file.

Related

trying to run an .exe file in lua

recently i have been trying to run a script in lua that through os.execute() will execute a script in C# compiled into an executablethat is in the same directory as my script.
In my first attempt adding the entire directory until the executable worked:
os.execute("C:\\ServerTest\\test\\tex\\testcode.exe")
however I need this script to work on other computers, which means I can't add the entirely path to the file.I tried countless methods to execute the .exe file inside the same directory without using the entire path and none of the methods worked
os.execute("./testcode")
os.execute [[".\testcode.exe"]]
os.execute(".\\testcode.exe")
os.execute "testcode.exe"
I even tried to create an environment variable and run the entire directory from it xD
os.execute("set wTest=%cd%")
os.execute("%wTest%\\testcode.exe")
but nothing worked. I also tried to use io.popen() but didn't get results either (because the executable will close a computer process, it does not give any output :V)
does anyone know how I can do this?????

Troubleshooting Lua "qdbus" command via os.execute()

I'm using ArchLinux/KDE/Plasma and I'm trying to program a lua script (as a plugin in TeamSpeak 3) that will execute the following command, which works in my terminal emulator, but not via a Lua script (that seems to be running as the same user).
The following fails:
os.execute("qdbus org.mpris.clementine /Player org.freedesktop.MediaPlayer.Pause")
I'm wondering if it's a permissions or library requirement? I know os.execute is working though, because I can run system notifications. I've tried alternative commands like machinectl, but those fail as well. I'm very new to Lua, do I need a dbus library? If so, I have no clue how to implement it.

Atom Run F# script, Windows 7 error

I am trying to run F# script from Atom editor but kept on getting the following error:
Unable to run fsi is it in your path?
I've checked the environment variables and the path is set correctly and can run it from the command prompt. Also others suggested running Atom from command prompt, I did that but still the same. Is Atom looking for files in a case sensitive way? (If so that may be the issue as the F# interactive is "Fsi.exe").

Using TDBLoader in JENA

I'm trying to learn how to use TDBLoader using this example I found:
https://github.com/ijdickinson/jena-tdb-ont-example
However, when trying to run the init-demo script, I keep running into issues
https://github.com/ijdickinson/jena-tdb-ont-example/blob/master/src/main/script/init-demo
I'm using cygwin to attempt to run the script, but I keep getting please ensure $Path contains $TDBROOT/bin
I set TDBROOT= C:\Development\apache-jena-2.12.1
And my Path has "%TDBROOT\bin"
I'm really new to using command line and shell scripts, so I'm not at all familiar with how to go about debugging this.
I have my tdbloader in apache-jena-2.12.1\bin , is there a way I can check if this is even working? Or if my path is properly set?
I tried "tdbloader" and "-v tdbloader" in command line and I get "tdbloader" is not recognized...
That's not supposed to happen if my path is set correctly, right?

How to run ./script/generate rx_config?

I'm a newbie and i'm working follow this link http://dima.github.com/2009/03/19/working-with-restfulx-model-attachments.html
But I stuck on the step run ./script/generate rx_config. I don't know how can I run it.
I tried to go to the path of folder script and typed generate rx_cofig on command line but it doesn't work.
C:\Data\Workspace\rx_model_attachments\script>generate rx_config
I got the error 'generate' is not recognized as an internal or external command, operable program or batch file.
Anyone can tell me step by step of doing this. Big thanks!
Since you're on windows, you will need to preface all of the scripts in the scripts folder with ruby:
C:\Data\Workspace\rx_model_attachments\script>ruby script/generate rx_config
The usual hash-bang (#!) at the start of the script files to let the shell know which interpreter to run does not work on windows.

Resources