• Albert

    Hi,

    Thanks., after lot of hours of trail and error I have found that to retrieve the data. The thing is that the output dump disappear when I have the writefunction. Here is the code.

    local curl = require('libcurl')
    local ffi = require('ffi')
    local returndata=""

    easy = curl.easy{url=urlstr, verbose=false, noprogress=true, followlocation= false,
    writefunction = function(data, size, n)
    local size = tonumber(size * n)
    ret = ffi.string(data, size)
    returndata = returndata .. ret
    return size
    end,
    }

    easy:perform()
    easy:close()

    print(returndata)

    posted in General Discussion read more
  • Albert

    Hi,

    I have the following code and the curl dumps the output even when there is no print statement. Can the print output be hidden?

    easy = curl.easy{url="http://www.google.com", verbose=false, noprogress=true,
    xferinfofunction = function(self, ...)
    print(...)
    return 0
    end,
    }

    easy:perform()

    easy:close()

    posted in General Discussion read more
  • Albert

    Hi,

    May I ask if the effect of bundle.load('yourfile.lua') is similar to dofile('yourfile.lua') ?. Thank you.

    posted in General Discussion read more
  • Albert

    Hi,

    I have a lua program that I compiled with bundle with a dofile call. It compiles ok but at runtime the myluaprog.lua must be present externally even if it is bundled with the "-m " parameters. How do I get this working. Thanks.

    ./mgit bundle -m "firsprog myluaprog" -a "socket_core " -M firstprog -o firstprog -v

    ----firstprog.lua
    dofile("myluaprog.lua")

    posted in General Discussion read more
  • Albert

    Hi,

    Before I head down and get the LLVM. I would like to know what the pro and cons of both approaches? Thanks.

    posted in General Discussion read more
  • Albert

    Hi,

    I am trying out the mysql.lua with mariadb. I have download the code plus put the libmariadb.so in the same directory as my test.lua code. It seems that the luajit cannot locate the library. I am getting the following error. What gives? Thanks.

    ----- test.lua
    local mysql = require("mysql")

    mysql.config('mariadb')
    local conn = mysql.connect('localhost','suser','PassWord','testdb')


    luajit test.lua
    luajit: ./mysql.lua:23: libmariadb.so: cannot open shared object file: No such file or directory
    stack traceback:
    [C]: in function 'load'
    ./mysql.lua:23: in function 'config'
    test.lua:3: in main chunk
    [C]: at 0x00404d60

    posted in General Discussion read more
  • Albert

    Thanks. That fixed the problem.. I have compiled and the changes you have made works.

    posted in General Discussion read more
  • Albert

    The command does not work

    ./mgit bundle pull
    Invalid option: pull

    Compile and link together LuaJIT, Lua modules, Lua/C modules, C libraries,
    and other static assets into a single fat executable.

    Tested with mingw, gcc and clang on Windows, Linux and OSX respectively.
    Written by Cosmin Apreutesei. Public Domain.

    USAGE: mgit bundle options...

    -o --output FILE Output executable (required

    posted in General Discussion read more
  • Albert

    I would like to ask, How do I pull in the new update? I tried ./mgit pull bundle, well that is a no go. Thanks.

    posted in General Discussion read more
  • Albert

    Hi,

    It seems very wired that the compiled luajit is looking for the library named mysql.dll instead of mysql.so. I renamed it form extension so to dll it worked. FYI, I am running this in Ubuntu Linux x64. Can you please check if it is indeed looking up the wrong extension via a via OS platform. Thanks.

    no field package.preload['luasql.mysql']
    no file './luasql/mysql.lua'
    no file './luasql/mysql/init.lua'
    no file './clib/luasql/mysql.dll'
    no file './clib/luasql.dll'
    no symbol 'Blua_luasql_mysql'
    no symbol 'luaopen_luasql_mysql'

    posted in General Discussion read more
  • Albert

    For your information, I am running all the commands in Ubuntu 14.04 64bit machine.

    ./luajit -lluasql.mysql

    LuaJIT 2.1.0-alpha -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/
    JIT: ON SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse

    posted in General Discussion read more
  • Albert

    @cosmin I traced that the the mysql.so to the following /usr/lib/x86_64-linux-gnu/liblua5.1-sql-mysql.so.2.0.0

    I did a ln -s /usr/lib/x86_64-linux-gnu/liblua5.1-sql-mysql.so.2.0.0 mysql.so in the bin/linux64/clib/ directory. Compiled again but still getting the same error. What else do I need to do? Thanks.

    posted in General Discussion read more
  • Albert

    Yes. I was working with lua in the beginning and most people point me to luasql so there is where i build my modules.

    How about socket, mime and ltn12? do I need to move the library to the /bin/linux64/clib ?

    posted in General Discussion read more
  • Albert

    I did a search and it appear as

    sudo find /. |grep luasql

    /./usr/lib/x86_64-linux-gnu/lua/5.1/luasql
    /./usr/lib/x86_64-linux-gnu/lua/5.1/luasql/mysql.so
    /./usr/lib/x86_64-linux-gnu/lua/5.2/luasql
    /./usr/lib/x86_64-linux-gnu/lua/5.2/luasql/mysql.so

    posted in General Discussion read more
  • Albert

    Hi,

    I have compiled a project of mine and the process when without any error. But I encounter this problem with luasql.mysql . How do I include it in the executable. Thanks.

    ./mainexe: ./main.lua:13: module 'luasql.mysql' not found:
    no field package.preload['luasql.mysql']
    no file './luasql/mysql.lua'
    no file './luasql/mysql/init.lua'
    no file './clib/luasql/mysql.dll'
    no file './clib/luasql.dll'
    no symbol 'Blua_luasql_mysql'
    no symbol 'luaopen_luasql_mysql'

    ----- Compiled Command
    ./mgit bundle -m --all -a --all -M main -o mainexe -v

    posted in General Discussion read more
  • Albert

    Hi,

    Thanks for the clear explanation on your approach to luapower. FYI, I have only cloned the mgit, bundle and luapower-repos. Even that those three, I am bewildered with the sear amount of files and sub-directory.

    Again my expectation was way off from your vision of luapower. I was thinking more along the line of mgit source compiled to an executable which in turn can be used for bundling/compiling of lua code into a standalone execute.

    Anyway, I would like to express my sincere gratitude for all the work that you have done for the lua /luajit community. Thank you.

    posted in General Discussion read more
  • Albert

    Hi,

    I have done that but the issue is that I need to dump my source code in the /home/albert/luapower directory. The use case that I am look for is the ability to execute the bundle compiler on an directory of my choosing. Hope this clarify my use case scenario. Thanks.

    posted in General Discussion read more
  • Albert

    Hi,

    As an example, I install the mgit, bundle and luapower-repos in /home/albert/luapower. Now my custom lua scripts is in /usr/local/programs. I would like to be able to issue the "mgit bundle -m --all -M main -o main.exe" from the /usr/local/programs directory. In essence, I want to keep my custom scripts directory separate from the luapower directory. Thanks.

    posted in General Discussion read more
  • Albert

    Hi,

    Thanks. Got that working now. What do I need to add to the PATH so that I can execute mgit bundle outside of the installed directory?
    FYI, OS is Ubuntu 14.04 64bit.

    posted in General Discussion read more
  • Albert

    I did the following but still getting error. I could not find the file platform.sh anywhere in the cloned directory. What am i still missing . Thanks.

    git clone https://github.com/capr/multigit luapower
    cd luapower
    ./mgit clone https://github.com/luapower/bundle.git

    ./mgit bundle

    ---Error
    .mgit/bundle.sh: line 423: .mgit/platform.sh: No such file or directory
    Unable to set platform.

    posted in General Discussion read more
Internal error.

Oops! Looks like something went wrong!