Oxygen Basic

Programming => Example Code => Topic started by: pber on August 09, 2017, 08:37:52 AM

Title: Lua + o2
Post by: pber on August 09, 2017, 08:37:52 AM
Hi all,
in this example o2 makes a Lua module,
with which Lua can compile functions
on the flight.

(you need to change some paths in the o2bas
and compile it under LUA_CPATH)

cheers
p.

.
Title: Re: Lua + o2
Post by: Charles Pegge on August 11, 2017, 07:53:06 AM
Thanks Paolo!

But first a crash course in LUA:

https://www.youtube.com/watch?v=iMacxZQMPXs

https://www.lua.org/manual/5.3/

I wonder if LUA has compilable features we could incorporate into OxygenBasic..

Title: Re: Lua + o2
Post by: pber on August 11, 2017, 04:22:33 PM
I wonder if LUA has compilable features we could incorporate into OxygenBasic..

One idea could be this:
http://lua-users.org/wiki/LuaToCee
O2 could make a much better work, because it is able to work jit.
And it is (quite) simple to implement.

Title: Re: Lua + o2
Post by: JRS on August 11, 2017, 09:46:47 PM
Quote
LuaToCee - It generates C code in the form of Lua C API calls.

I'm putting my efforts into the C BASIC preprocessor for gcc. Works on Windows, Linux and Android (Linux).

Lua is from the IUP folks.