Giter Site home page Giter Site logo

support pure-lua environments? about candran HOT 3 OPEN

reuh avatar reuh commented on July 30, 2024
support pure-lua environments?

from candran.

Comments (3)

Jan69 avatar Jan69 commented on July 30, 2024

and of course, on windows, and mac, compiling stuff might be a bit troublesome anyway, since LuaRocks really wants to use gcc, I had to specifically download gcc for windows, to get it to compile correctly, because the clang I had didn't support dynamic linking for god-knows-why

from candran.

Reuh avatar Reuh commented on July 30, 2024

For this use case I would probably advise to setup Candran properly on your development computer, and compile your Candran files to regular Lua files when you want to run them in an environment without Candran, just like you would compile your program before running it for any compiled language. At least that's what I've been doing for my projects when I want to ship them without any native module for portability reasons. With a Makefile or some script that re-compile every candran file in my project directory for convenience.

But of course, if the pure-Lua implementations of lpeg work, I don't see a reason not use them as a fall-back to make setup easier. It's a bit of a shame that they don't support lpeglabel though, that will make syntax error messages a lot more cryptic, but oh well.

It will probably require a fair amount of work to adapt the current code to that though, and I won't have much free time right now I'm afraid (if you have the courage and the time for a PR, all the lpeg stuff is in parser.lua :) otherwise I'll probably get to it in a couple weeks).

from candran.

Jan69 avatar Jan69 commented on July 30, 2024

ok, alhough using effectively lpeg 0.12 would be a big downgrade, I'm happy you're at least considering eventually dealing with it, I'm not really that good with lua yet, myself...also, as the file comments,

This module implements a parser for Lua 5.3 with LPeg,and generates an Abstract Syntax Tree that is similar to the one generated by Metalua.

so why not use Metalua itself as fallback? (or the koneki project's archive)

from candran.

Related Issues (6)

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.