I'm curious if anyone here has built Lua 5.2 for OpenWRT?
All Google brings up is this thread disparaging Lua 5.2's new environment system, and noting how LuCI won't work with Lua 5.2.
However, I am not at all interested in using LuCI or, for that matter, most of the other Lua code supplied by OpenWRT. Compatibility with LuCI etc. is not an issue.
Therefore my question: Has anyone compiled Lua 5.2 for OpenWRT? Do all the OpenWRT patches apply cleanly? I suspect they don't; at any rate, the LNUM author has said he does not plan on supporting his patch.
Basically, I would like to know if building Lua 5.2 is feasible/has been done/sounds doable before I plunge in, lose two weeks to frustration and am then forced to give up.
I build 5.3.2 for OpenWRT Mips32r2. Should be work with 5.2.4 too.
https://github.com/markuman/zsun_fun/blob/master/mips_cross.sh
Related
I am starting a new Lua project so I downloaded Cocos2d-x and Cocos Code IDE. How to configure the IDE so that it uses cocos2d-x? See the picture below:
Whenever I point that to cocos2d-x folder, an error pops-out:
I am just a beginner, and I chose cocos2d over Corona because it's open-source and free.
Make sure you are using (at least) cocos2d-x version 3.2. I had the same problem when I tried first with version 2.2.5 but, as you will read on the wiki under the heading Basic Requirements, you must use 3.2 Final.
In a related vein, though not the cause of your problem, as a Windows user you need to have Python 2.7.x installed.
I am writing some test scripts for my Lua project and I want to be sure that they run correctly under the different Lua versions available. Since my unit testing framework can use the wrong Lua version if I misconfigure it, I would like to be extra safe and check at runtime what Lua version my tests are running under. What would be the best way to do that?
I know that a quick way to tell 5.1 and 5.2 apart is to check the _VERSION global but how can I tell regular Lua 5.1 and LuaJIT apart?
Luajit extends the standard library with a jit module. That is probably a more direct way to detect its presence:
if type(jit) == 'table' then
print(jit.version) --LuaJIT 2.0.2
end
I have a website made for php 5.3 that uses a lot of features included in php 5.3.
My web server (wich is a share host) uses php 5.2 and the company doesn't support php 5.3.
So I want to know if there is a php framework, class, bunch of functions or anything I can use to "simulate" php 5.3 on a php 5.2 server?
If so, what is the best one and where can I find it?
You could probably get 80% there, writing workarounds for some of what is introduced in PHP 5.3. However, there are a lot of things introduced at the language level that simply can't be emulated using PHP 5.2.
If you are really committed to your host, your best chance would be to evaluate exactly which features of PHP 5.3 your existing code is using, and then determine if those things fall within the scope of what you could find workarounds for. Alternatively, you could simply rewrite any code that is using PHP 5.3 features so that the would behave properly under 5.2. Either way, that's probably going to be a lot of work with not a significant amount of benefit (assuming changing hosts is an option).
So two options:
If this is a situation where the code must run on this host (say it was a school project hosted on school servers, or similarly a company project on company servers), I think your best bet is going to be refactoring your code to run on PHP 5.2.
If you can change hosts, I would recommend that as your best option.
I don't think you can. PHP 5.3 adds new options to the language that are not even close to being backwards compatible with PHP 5.2
I'm trying to learn Lua, but I don't really know which binary to download. There's 2 choices:
Lua Binaries
Lua for Windows
The second option Lua for Windows seems to be the recommended option, but the installer weighs in at 26.6Mb, which is pretty hefty for what is supposed to be a v.lightweight language.
I'm thinking of using Lua as a scripting language for games, and perhaps as a fast development language for file processing like how Python or Ruby does it. So it must be something lightweight, not a 26.6Mb file.
Which is the appropriate one to download and start?
Luaforwindows, no doubt. It's simpler, easier and faster.
The installer comes with lots of stuff (Scite editor & several extra libs if I remember well). But the installer asks you before installing all those extra stuff. Just install the minimum and you will be fine.
Lua for Windows includes a handful of other, useful libraries and tools. The actual Lua executable included is still tiny, in the 1-2MB range as expected.
Having the extras there already will only make things easier, and disk space is cheap: go with Lua for Windows.
You may also want to check ZeroBrane Studio, which is only 4M download on Windows and is based on the same editor as SciTE that comes with Lua for Windows. ZBS also comes with 50+ Lua examples and few simple lessons to get started quickly with Lua programming.
Quoting from here.
Installation
The LuaBinaries files are intended for advanced users and programmers who want to incorporate Lua in their applications or distributions and would like to keep compatibility with LuaBinaries, so they also will be compatible with many other modules available on the Internet.
If what you want is a full Lua installation, please check other projects such as the Lua for Windows and LuaRocks.
Seems quite clear to me that you should download Lua for Windows.
Just a small question from a "Lua newbie"...I have been using LuaJIT and it is awesome, no the question is since LuaJIT is Lua 5.1 compatible does that mean I can use all the "LuaRocks" that standard Lua uses in LuaJIT?
For instance if I wanted to install one of the SQLite libraries (e.g. http://luaforge.net/projects/luasqlite/) - how would I install that in LuaJIT?
Do all the available "LuaRocks" work out the box with LuaJIT?
LuaJIT is designed to be drop-in compatible with the Lua stand-alone. There is no reason why any purely Lua-based Rocks shouldn't work. DLL-based Rocks ought to work as well, since the LuaJIT stand-alone DLL is compatible with the original DLL.
Concretely:
"LuaJIT is fully upwards-compatible with Lua 5.1. It supports all standard Lua library functions and the full set of Lua/C API
functions. LuaJIT is also fully ABI-compatible to Lua 5.1 at the
linker/dynamic loader level. This means you can compile a C module
against the standard Lua headers and load the same shared library from
either Lua or LuaJIT."
I think that pretty much says it all.