lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The short of it: Has anyone successfully patch slnunicode to work with
5.2? I'm trying to build it from source and can't get it to work?

--Andrew

The therapeutic details...

I'm trying to install lunamark in an environment that cannot take
advantage of luarocks. It has a no-dependency standalone mode, but
that just means it builds the older libraries from sources that it
includes, including Lua 5.1. So that's not an option.

I've got it installed, and am still climbing through its dependencies.
I think I'm down to slnunicode[1]

I found a gist of a patch, which I applied (by hand, because it
wouldn't apply cleanly) [2]

Now slnu compiles (with a bunch-o-warnings about casting) but the
sub-module `.utf8` isn't getting registered as an upvalue. In order to
make it 5.2-esque, the patch used a nifty macro hack that my limited
preprocessor skills were unable to penetrate. Also, I don't know 5.0
or 5.1 well enough to know what they or the author were trying to
accomplish in the first place.

For those with bigger brains, the patch[2] includes the details.

I do appreciate the work that people do when they make libraries like
this. I just wish that the patches to newer libraries were more...
invasive / complete. Right about now, I'm kindasortafrustrated.
`markdown` doesn't quite do what I want, discount is a million miles
away from building on Windows and lunamark is what I've described.

Those three options include every markdown processor known to work
with LDoc, so the world of markdown formatting in Lua isn't...
awesome. (if you need to work on Windows).

-Andrew, better for having vented.

[1] https://github.com/LuaDist/slnunicode/blob/master/slnunico.c#L1227
[2] https://gist.github.com/starwing/2708924