[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Download for standalone version of Lua
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Download for standalone version of Lua

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Nick Gammon   Australia  (21,609 posts)  [Biography] bio   Forum Administrator
Date Wed 24 Nov 2004 06:20 PM (UTC)

Amended on Wed 24 Nov 2004 07:09 PM (UTC) by Nick Gammon

Message
In case you want to play with Lua 'stand-alone' - that is, from a command-line, you can download the precompiled binary from http://www.gammon.com.au/files/mushclient/lua.zip (181 Kb). This archive contains the following files:


122,880 lua.dll
 53,248 lua.exe
 16,492 lua.lib
 57,344 luac.exe
143,360 lualib.dll
  9,562 lualib.lib
  1,877 Readme.txt

The two DLLs implement the Lua 'core' and libraries (they are the same files that ship with MUSHclient). The program 'lua.exe' is stand-alone Lua, and the program 'luac.exe' is the Lua compiler which can be used to make Lua 'binary files'. Just unzip them into a single directory which you can use for testing Lua. The .lib files are needed if you want to write your own DLLs - the export the functions needed for use in Visual C++.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #1 on Wed 24 Nov 2004 06:23 PM (UTC)
Message
You can make native applications with it, or some kind of bytecode or something?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Nick Gammon   Australia  (21,609 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Wed 24 Nov 2004 07:09 PM (UTC)
Message
See other recent post - bytecode.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Hahazhahazha   (1 post)  [Biography] bio
Date Reply #3 on Tue 16 Aug 2005 11:43 AM (UTC)
Message
so weird lor
[Go to top] top

Posted by Eldeon   (9 posts)  [Biography] bio
Date Reply #4 on Tue 22 Jun 2010 06:57 PM (UTC)
Message
I can't run a .lua from the exe. Is there something i'm doing wrong? I'm trying to learn the language and I started with the

Print("Hello World")

in a .lua file. But I don't know how to run it from the lua interpreter. Or can't you?
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #5 on Tue 22 Jun 2010 07:17 PM (UTC)
Message
Just use "lua <filename>". If the file is named test.lua, use "lua test.lua".

Also, it's print, not Print. Lua is case-sensitive.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Eldeon   (9 posts)  [Biography] bio
Date Reply #6 on Tue 22 Jun 2010 07:46 PM (UTC)

Amended on Tue 22 Jun 2010 10:33 PM (UTC) by Eldeon

Message
Thats what I do. and it says

stdin:1 `=' expected near `hello'

I have no clue what this means.

oh and I do have it as print not Print I just mistyped.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #7 on Tue 22 Jun 2010 07:54 PM (UTC)
Message
You must've mistyped elsewhere too, because what you posted is syntactically correct. Please copy and paste -exactly- what you have in the file. You can put it in [code] [/code] tags to format it nicely.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Eldeon   (9 posts)  [Biography] bio
Date Reply #8 on Tue 22 Jun 2010 10:34 PM (UTC)

Amended on Tue 22 Jun 2010 10:52 PM (UTC) by Eldeon

Message
print("Hello World")


That's all that's in the file. Or do I need more?

and i'm putting in exactly

lua hello.lua

and I get the error message.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #9 on Tue 22 Jun 2010 10:36 PM (UTC)

Amended on Tue 22 Jun 2010 10:41 PM (UTC) by Twisol

Message
I notice that you're using "Hello", whereas the error shows "hello". I think maybe you're editing one file and running a different one by mistake, because there's no way you can get that error from this script.


EDIT: Oh, heh. I think I realized what's going on. Don't type "lua hello.lua" from inside the interpreter! Run it from the shell (command prompt in Windows).

This is what I think you're doing (and which you shouldn't do):
$ lua
Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
> lua hello.lua
stdin:1: '=' expected near 'hello'
>


This is what you should be doing:
$ lua hello.lua
Hello World
$



EDIT 2: To execute it from within the interpreter, you can use dofile("hello.lua"). I think this was my fault, for misinterpreting what you asked for.

$ lua
Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
> dofile("hello.lua")
Hello World
>

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Eldeon   (9 posts)  [Biography] bio
Date Reply #10 on Tue 22 Jun 2010 10:53 PM (UTC)
Message
WOW thanks for clearing that up. I hadn't realized that. thanks.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #11 on Tue 22 Jun 2010 10:54 PM (UTC)
Message
You're welcome. Sorry that took so long for such a simple question!

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


10,297 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]