[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Starting with Lua
- From: v <v19930312@...>
- Date: Fri, 20 Nov 2020 17:24:05 +0300
> I’m starting with LUA. I started with Lua for Windows v5.1.5-52
> Released https://github.com/rjpcomputing/luaforwindows/releases
It's called Lua, not LUA. Also, is there any reason to choose such old
version when 5.4 is out? 5.4 is still a bit experimental, so 5.3 might
be your best bet for now.
> Our idea is implemt LUA in a WinCE 6 device, What do you think, is it
Lua is written in ANSI C, so it should be possible to run it there.
> We have a main program running, monitoring serial port if something
> happen it is shown in a Web, and from Web we can send something to
> the serial port. Our goal is provide more inteligence to our device.
> For example, if something happen in the serial port, execute a logic
> AND, Is it posible to trigger LUA with a variable from my main
> program? How can the output of LUA inform the main program with the
I don't exactly understand what is your plan here. While I'm not
familiar with WinCE at all, you have two options:
1) Run standard Lua interpreter as a separate process. In this case,
you should look up how interprocess communication is done in WinCE. I
expect standard things like stdio and passing arguments to command to
2) Run Lua directly inside main program, linked to it either statically
(recommended for your use case) or dynamically. In this case, all
interaction with Lua is done using its C API, which is described in
details in Lua's reference manual.