Code Monkey home page Code Monkey logo

Comments (12)

dom96 avatar dom96 commented on September 15, 2024

Try --deadCodeElim:on perhaps.

from lua.

rbucker avatar rbucker commented on September 15, 2024

--deadCodeElim:on resulted in

could not import: luaL_loadbuffer

from lua.

fowlmouth avatar fowlmouth commented on September 15, 2024

Which lua do you have 5.1 or 5.2
On Feb 16, 2015 3:48 PM, "richard bucker" [email protected] wrote:

--deadCodeElim:on resulted in

could not import: luaL_loadbuffer


Reply to this email directly or view it on GitHub
#2 (comment).

from lua.

rbucker avatar rbucker commented on September 15, 2024
> lua -v
Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio

from lua.

fowlmouth avatar fowlmouth commented on September 15, 2024

Use lua52 module

from lua.

fowlmouth avatar fowlmouth commented on September 15, 2024

Old examples may not work depending on the API changes

from lua.

rbucker avatar rbucker commented on September 15, 2024

lua52 generated this error:

/Users/richardbu/.nimble/pkgs/lua-1.0/lua52.nim(409, 29) Error: ')' expected

from lua.

dom96 avatar dom96 commented on September 15, 2024

@rbucker likely a proc param named func, it errors because func is a keyword now.

from lua.

rbucker avatar rbucker commented on September 15, 2024

sounds like it's a no go?

from lua.

dom96 avatar dom96 commented on September 15, 2024

Change it and create a PR please.

from lua.

rbucker avatar rbucker commented on September 15, 2024

I started working on the PR and then...

/Users/richardbu/.nimble/pkgs/lua-1.0/lua52.nim(634, 41) Warning: 'l' should not be used as an identifier; may look like '1' (one) [SmallLshouldNotBeUsed]
/Users/richardbu/.nimble/pkgs/lua-1.0/lua52.nim(658, 8) Warning: use File instead; TFile is deprecated [Deprecated]
/Users/richardbu/.nimble/pkgs/lua-1.0/lua52.nim(665, 45) Warning: 'l' should not be used as an identifier; may look like '1' (one) [SmallLshouldNotBeUsed]
/Users/richardbu/.nimble/pkgs/lua-1.0/lua52.nim(666, 32) Warning: 'l' should not be used as an identifier; may look like '1' (one) [SmallLshouldNotBeUsed]
/Users/richardbu/.nimble/pkgs/lua-1.0/lua52.nim(667, 22) Warning: 'l' should not be used as an identifier; may look like '1' (one) [SmallLshouldNotBeUsed]
/Users/richardbu/.nimble/pkgs/lua-1.0/lua52.nim(13, 2) Hint: 'LUA_RELEASE' is declared but not used [XDeclaredButNotUsed]
luaex.nim(13, 8) Error: undeclared identifier: 'loadbuffer'

I suppose I could fix the warnings, however, the error... not as much fun.

from lua.

fowlmouth avatar fowlmouth commented on September 15, 2024

@rbucker some compatibility functions are in there, luaL_loadbuffer, left as templates because it was tedious to figure out what types they should be, also some of them would conflict with functions defined. loadbuffer would look like this (see luaL_loadbuffer)

proc loadbuffer(L:PState; buff:cstring; sz:csize; name:cstring): cint = 
  loadbufferx(L, buff, sz, name, nil)

can you try compiling the module lua52 itself? there is a test included if you compile the module itself

from lua.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.