4 ms·
For the past year I exclusively use Lua for my side projects. And I use it with certain self-imposed restrictions: * no Luarocks * no native libraries More d
by akkartik 3y ago
For the past year I exclusively use Lua for my side projects. And I use it with certain self-imposed restrictions:
* no Luarocks
* no native libraries
More details: http://akkartik.name/freewheeling http://akkartik.name/freewheeling
- iamcreasy 3y agoCan you kindly provide a one line explanation as to why no Luarocks?
- akkartik 3y agohttps://xkcd.com/2347 https://xkcd.com/2347 That way lies npm and left-pad. Tools encourage behaviors. I avoid tools that encourage behaviors I want to avoid.
- AHTERIX5000 3y agoLuarocks works quite well if the lib is pure Lua. For native libs it's a wild west and success depends a lot on your environment. Sometimes the lib is being built with -Werror and fails if you're using more recent compiler, sometimes include paths are not resolved correctly using pkgconfig or similar and so on.
- harryvederci 3y agoGreat talk!
- carapace 3y agoThat essay/software/discipline is awesome!
- nmz 3y agoProblem is, which version of love to use? I do know someone had a multiversion love program but it didn't work for me.
- akkartik 3y agoCould you point me at it? Just for my own understanding.
- nmz 3y agoI think its this but I am unsure. https://github.com/Alloyed/flirt https://github.com/Alloyed/flirt
- akkartik 3y agoI just looked at this. It feels awfully brittle. My goal at the moment is to try to support every version of LÖVE going forward. All my apps work with any version after 11.0. Hopefully that streak won't be too onerous to continue in the future. Here's how my apps' version check works, based on suggestions from the LÖVE Discord (but mistakes are mine): https://git.sr.ht/~akkartik/template-live/tree/9cddb20b96aa1beaeee4c5d8aa9f5ac67a859724/item/main.lua#L45 https://git.sr.ht/~akkartik/template-live/tree/9cddb20b96aa1... I don't use t.version in conf.lua anymore in Freewheeling Apps (though my early apps are not perfect)
- nmz 3y agoI've never used love. It's certainly difficult if you're going with portability, and then add to that backwards compatibility. I've talked about this before, but I think the only way to do versioning is the way everyone does it nowadays. Have a directory, with a wrapper around the dvcs/(Commits/ Tags/) and then a subdirectory for a "git workingset", And then you Import("url",{tag="",commit="",req="x.y.z"}), it should be fast because you're just doing io.open($REPOHOME/$URL/TAG/$TAG/$COMMIT/x/y/z) which just gets dropped to require() as normal. of course, add LÖVE to the mix and I just don't know. love should have mandatorily a love-VERSION as the command.
- onehair 3y agohow has your experience without using types in lua been so far with regards to finding out where issues reside and debugging unexpected values?
- akkartik 3y agoGreat question! It's not ideal, but has been outweighed so far by the other benefits I mentioned. I do track the issues I run into due to lack of static types[1] in the Manual_tests files in each of my projects, e.g. https://github.com/akkartik/lines.love/blob/e568378ecb/Manual_tests.md#other-compromises https://github.com/akkartik/lines.love/blob/e568378ecb/Manua... [1] I wouldn't say Lua/Python/Javascript has no types. They just lack types for variables rather than values. Forth, on the other hand, has no types period.