Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1003154 // Test Lua(J) in JavaX

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 9620K of libraries. Click here for Pure Java version (158L/2K/5K).

1  
!752
2  
!1003153 // magic.jar
3  
4  
import net.luaos.tb.tb12.Sandbox;
5  
import net.luaos.tb.common.LuaTimeOutSandbox;
6  
import net.luaos.tb.remote.ServerConnection;
7  
8  
static S luaCode = "return 5+5";
9  
10  
p {
11  
  print("Code:\n" + indent(luaCode) + "\n");
12  
  Sandbox sandbox = new Sandbox(ServerConnection.aServerConnection());
13  
  LuaTimeOutSandbox.defaultTimeout = 10; // set to 1 to cause timeout
14  
  LuaTimeOutSandbox.ResultWithStats results = sandbox.callLuaWithStats(luaCode, "test");
15  
  print("Instruction count: " + results.instructions);
16  
  print("Lua result: " + results.result);
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003154
Snippet name: Test Lua(J) in JavaX
Eternal ID of this version: #1003154/1
Text MD5: 4dc62cfe12bdff8aed92c2f4cbb9625a
Transpilation MD5: d51f616234568c6f1ba6224464cda2ab
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-05-15 21:10:59
Source code size: 581 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 541 / 616
Referenced in: [show references]