Search Results

Search found 10 results on 1 pages for 'luajit'.

Page 1/1 | 1 

  • LuaJit FFI and hiding C implementation details

    - by wirrbel
    I would like to extend an application using LuaJit FFI. Having seen http://luajit.org/ext_ffi_tutorial.html this is surprisingly easy when comparing this to the Lua C API. So far so good. However I do not plainly want to wrap C functions but provide a higher level API to users writing scripts for the application. Especially I do not want users to be able to access "primitives", i.e. the ffi.* namespace. Is this possible or will that ffi namespace be available to user's Lua scripts? On the issue of Sandboxing Lua I found http://lua-users.org/wiki/SandBoxes which is not talking about FFI though. Furthermore, the plan I have described above is assuming that the introduction of abstraction layers happens on the lua side of code. Is this an advisable approach or would you rather abstract functionality on the statically compiled code (on the C-side)?

    Read the article

  • Terra lang and Lua

    - by msalese
    I was reading on terralang site about terra language as "a new low-level system programming language that is designed to interoperate seamlessly with the Lua programming language..." Zach DeVito (the main author) write about the use of terra : A scripting-language with high-performance extensions..... An embedded JIT-compiler for building languages..... A stand-alone low-level language.... But (may be my fault) I don't understand if terra is: a luaJit competitor a better system to interface with c library something better than luaJit using llvm Can someone help me to better understand what is going on terralang project ? Thanks

    Read the article

  • What's a good starting point to learn about JIT compilers?

    - by davidk01
    I've spent the past few months learning about stack based virtual machines, parsers, compilers, and some elementary things about hardware architecture. I've also written a few parsers and compilers for C like languages to understand the generic parser/compiler pipeline. Now I'd like to take my understanding further by learning about optimizing compilers and JIT compilers but I'm having a hard time finding material at the right level. I don't yet understand enough to dive into a code base like PyPy or LuaJIT but I also know more than what most introductory compiler books have to offer. So what are some good books for an intermediate beginner like to me to look into?

    Read the article

  • Is LuaJIT really faster than every other JIT-ed dynamic languages?

    - by Gabriel Cuvillier
    According to the computer language benchmark game, the LuaJIT implementation seems to beat every other JIT-ed dynamic language (V8, Tracemonkey, PLT Scheme, Erlang HIPE) by an order of magnitude. I know that these benchmarks are not representative (as they say: "Which programming language implementations have the fastest benchmark programs?"), but this is still really impressive. In practice, is it really the case? Someone have tested that Lua implementation?

    Read the article

  • options' default values of autoconf ./configure scripts

    - by hamstergene
    Having run ./configure --help there is a list of options that can be tweaked in the future build, for example --enable-luajit Enable LuaJit Support --disable-env clearing/setting of ENV vars Though any option can be used with enable and disable prefix, some are presented as --enable-me and other as --disable-me in the help output. Is this supposed to hint me of default values, and if yes, how do I to figure them out? Because either way makes sense to me: luajit is disabled by default and therefore it is presented as --enable-luajit so I can enable it by conveniently copy-pasting it from help output to command line. being listed with --enable in help output indicates that luajit is enabled by default.

    Read the article

  • List of Lua derived VMs and Languages

    - by Shane Holloway
    Is there a compendium of virtual machines and languages derived or inspired by Lua? By derived, I mean usage beyond embedding and extending with modules. I'm wanting to research the Lua technology tree, and am looking for our combined knowledge of what already exists. Current List: Bright - A C-like Lua Derivative http://bluedino.net/luapix/Bright.pdf Agena - An Algol68/SQL like Lua Derivative http://agena.sourceforge.net/ LuaJIT - A (very impressive) JIT for Lua http://luajit.org MetaLua - An ML-style language extension http://metalua.luaforge.net/

    Read the article

  • Should extension scripts be run in a sandbox?

    - by Cubic
    In particular, this is about game extensions written in lua (luajit-2.0). I was contemplating whether I should restrict what these scripts can do, and arrived at the conclusion that I probably shouldn't: It's hard to get right. Sounds silly, but chances are my sandbox is gonna end up leaky anyways. The only benefit I could think of would be giving users some sense of security when running third party scripts. The disadvantages would be that it's just incredibly annoying for extension writers. That is, for now, myself (game content will be mostly scripted). The reason I'm asking this now before I actually have anything presentable is that adding a sandbox early on is easy, but would impose said annoying restrictions on myself too. However if I first go on with it and then later decide I do need a sandbox after all, I'm gonna run into problems (I'd either have to rewrite the scripts that are already there, or introduce some form of trust management system which seems to be more trouble than it's worth).

    Read the article

  • Nginx & Lua: Hacks, optimizations & observations

    - by Quintin Par
    Following this post on using Lua to increase nginx’s flexibility and in reducing load on the web stack I am curious to know how people are using Lua to enhance nginx’s capability. Are there any notable hacks, optimizations & observations using Lua? Hacks that people have used to discover capability with Nginx that would otherwise be complicated/impossible with a webserver or reverse proxy? Edit: Links: http://thechangelog.com/post/3249294699/super-nginx-killer-build-of-nginx-build-for-luajit-plus http://skillsmatter.com/podcast/home/scripting-nginx-with-lua/te-4729 http://devblog.mixlr.com/2012/06/26/how-we-use-nginx-lua-and-redis-to-beta-ify-mixlr/

    Read the article

  • Dynamic libraries are not allowed on iOS but what about this?

    - by tapirath
    I'm currently using LuaJIT and its FFI interface to call C functions from LUA scripts. What FFI does is to look at dynamic libraries' exported symbols and let the developer use it directly form LUA. Kind of like Python ctypes. Obviously using dynamic libraries is not permitted in iOS for security reasons. So in order to come up with a solution I found the following snippet. /* (c) 2012 +++ Filip Stoklas, aka FipS, http://www.4FipS.com +++ THIS CODE IS FREE - LICENSED UNDER THE MIT LICENSE ARTICLE URL: http://forums.4fips.com/viewtopic.php?f=3&t=589 */ extern "C" { #include <lua.h> #include <lualib.h> #include <lauxlib.h> } // extern "C" #include <cassert> // Please note that despite the fact that we build this code as a regular // executable (exe), we still use __declspec(dllexport) to export // symbols. Without doing that FFI wouldn't be able to locate them! extern "C" __declspec(dllexport) void __cdecl hello_from_lua(const char *msg) { printf("A message from LUA: %s\n", msg); } const char *lua_code = "local ffi = require('ffi') \n" "ffi.cdef[[ \n" "const char * hello_from_lua(const char *); \n" // matches the C prototype "]] \n" "ffi.C.hello_from_lua('Hello from LUA!') \n" // do actual C call ; int main() { lua_State *lua = luaL_newstate(); assert(lua); luaL_openlibs(lua); const int status = luaL_dostring(lua, lua_code); if(status) printf("Couldn't execute LUA code: %s\n", lua_tostring(lua, -1)); lua_close(lua); return 0; } // output: // A message from LUA: Hello from LUA! Basically, instead of using a dynamic library, the symbols are exported directly inside the executable file. The question is: is this permitted by Apple? Thanks.

    Read the article

  • Node.js for lua?

    - by Shahbaz
    I've been playing around with node.js (nodejs) for the past few day and it is fantastic. As far as I can tell, lua doesn't have a similar integration of libev and libio which let's one avoid almost any blocking calls and interact with the network and the filesystem in an asynchronous manner. I'm slowly porting my java implementation to nodejs, but I'm shocked that luajit is much faster than v8 JavaScript AND uses far less memory! I imagine writing my server in such an environment (very fast and responsive, very low memory usage, very expressive) will improve my project immensly. Being new to lua, I'm just not sure if such a thing exists. I'll appreciate any pointers. Thanks

    Read the article

1