lua-users home
lua-l archive

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


hi there! :)

tldr: read the 1st and the last paragraphs only, but i labelled all of them to know what they are about.

not that much strictly related (cuz isnt about the api, but the things behind), but at least a short one:
my idea for such libs that require c, is to make an isolated groundwork, and then utilize it via both the c api and ffi, and that way both lua and luajit can use it happily.

not so important (as maybe obvious) additional thoughts to the previous stuff:
luaffi is slowly bleeding out, its not even supported in ravi anymore (ive never checked out its sauce), luajit doesnt play nicely with the c api, and i think lua would still work better with the c api, even if luaffi would be polished... on the contrary, heavy use of the c preprocessor can make the game harder for luajit, while the absence of it can probably make suboptimal codes; and also, the jit would probably like the least possible c behind more lua, so i dunno how much beneficial this could be, but basically i think that c cant really much harm the performance. the most obvious benefit is to keep the two worlds nearer, while it doesnt require to write everything twice. other than that, loaders can be hacked easily to decide between coexistent variants, as its basically a matter of modifying the search paths.

my considerations (cuz maybe im not alone with such, and i think the topic is for finding the common fund of the masses around), that are maybe just waste of ur time, and also probably destructive for the success of the ongoing topic:
i wanna support as much lua engines as possible, cuz if i wanna try something instead of just reading the sauce, when i find something cool that requires a newer lua feature, that isnt supported in luajit (my basic engine), or that is actually an another engine, then im able to use my gadgets during the observation.
(the things below may sound like a rant, but i actually had fun and laughed much while wrote them, read in that spirit!!! (just as basically always when i write anything, i already forgot how to be angry, and i forgot how to cry (thats maybe sad...) basically im just happy and cheerful on somewhat different levels :) ))
i wanted to leave myself out from this topic, as im a radical madscientist alien whatever, who would support templeos before w*ndows; just as well as i like to add weird features to very basic stuffs, in case if they are cheap and useful. like my `table.getKeys()` and `fs.listDir()` have a 2nd param, `sort`, that can be falsy, and then wont do nothing, but basically costs only a check, `true` for my basic algo, a table for changing the order of different types in my basic algo (just a matter of `type(sort)=='table' and sort or {.....}`, so its cheap), or a function to change my basic algo; and they also have `filter` and `swap` parameters, that make two tables as a result, where `swap` will swap them, and `filter` can be either a regexp for a key, a table for a set of keys, and a function to make more nasty stuffs. cuz a matter of 2 extra checks if i dont want them, cuz i could merge things that are mostly use together, and in those cases, i think they are faster, and cuz it became more simple to write and use them... this way, i have a different api (more parameters, and more return values) than probably everyone else, but i think im not alone, and this is the very reason why that common api doesnt exists. i think its a matter of making something without questions, that others will feel like they will be served well with it. (<- my best answer for the topic!!) actually such thing is required to be able to divide by zero, play music, print a car, hack nsa, do my homework, feed my cat, and also the things that others wish for. it must be an enslaved "god", that can live my life instead of me, but must be only mine, cuz otherwise others will give me back the hard times i just left behind with such power. maybe its enough to leave all these possibilities open. (bloatwares that could serve all those purposes probably cant serve them, cuz they are bloatwares, and i need to be ready for yesterday... u know... so the solution must be fast without that bloat.)
i wouldnt use penlight (just for an example of its type, and no offense, its not about its quality, but my personal needs only!), cuz it has too much very simple stuffs included, that i would exchange for 1-2 somewhat longer lines here and there, and that will be faster. with such a habit, i could include a whole bunch of overlapping, and maybe incompatible libs just to satisfy one more necessity. (thats why i laugh on those who started to mess with jquery only for getting an xhr ... have u ever seen the code base of it? i think its a mess, that can make more trouble than what it can actually pay back. (sometimesireadminifiedcodes without much pain, but im not talking about that currently, just that jq is a tangled mess in itself...)) with live-coding, im governed by the necessities and possibilities, not by covering a whole topic with everything that i "aint gonna need", while they are too much general purpose, as they wont even cover my corner cases, that will require some workaround all the time. no average person exists, just like no average necessity, and thats why the less is better to use as a fund if someone wanna express their inner chaos. :D (some ppl start a new os and a new arch out of the same feeling :D ) but yes, its still a valid thing to wish for an std lib, it really is the thing that made python, c, php, js, java, whatever successful ... cuz ppl r lazy. (pun intended :D )
uhm... lets continue the destruction some more! (sorry) u, folks, are about to find the set of functions and their io, and then u come up with things like posix stuffs, that made me think... u didnt even start to argue about naming, not to mention the camel vs snake battle, thats as sharp as the black vs white ide, just harder to switch between (dont forget to think about concatenated names here and there...) so pwd? whats that? password? fork? i know that! the thing to pick up my food with! :) https://cdn.notonthehighstreet.com/fs/59/64/abb9-74ce-432d-ac2b-1167dcaa6481/original_sneeboer-garden-fork.jpg (who cares, when i eat cakes with knife.) Szoszi? what the hell is even that? g**gle translate dont even know its real meaning... the reason was that no descriptive name can cover my aims with it, and very much general words are totally overused, while just as meaningless... but thats why its only once in my code base, and the rest has general, self-descriptive names. i hate to be puzzled on abbreviations, and when i use them (inside functions), they must be either derived from their full form (`for f in pairs(files)`) or get a comment if they are not straightforward. have u ever crouched in a dark corner and swing urself to find the perfect name for a variable? ahh, thats sad.... ever left a comment, like "find a better name"? never mind. u can also think about the overmined planetary words around lua, that mostly tells nothing about themselves, or kde, gnome, enlightenment whatever naming conventions... not to mention std lib..... (i hope its more about cures than diseases, if u know what i mean - actually related to the code base. btw, i think c++ folks get much subliminal "infection" that way.) if i were in ur shoes, i would try to align that with lua and/or try to find clear, meaningful names, but actually posix is settled and well-known, and programmers are already damned to learn infinity, even if covering different platforms could serve as a good reason to hide their wording behind just an another one, that can be either one more to learn on top of them, or one that can bring instant understanding, while experts will know by hearth whats behind them, but one more pro behind it is that u can really do anything behind ur very own names. :)

after all, my answer is to collect a bunch of talented ppl who want to make it happen, and then care only about their opinions, or make it alone (nothing personal here, but read it as a general option), enjoy the freedom, and make it useful (either even for those who wanna print a car (being able to print it, or only to make a printer can be both fine here), or just those lucky selected ones that goes to the same direction as u), and if it is useful, then ppl will pick it up. i think ppl want a stable fund of a handful of ppl behind a project to pick it up, except if it can be carried on without the original author, or if it is good as is.

bests! :)


Sent with ProtonMail Secure Email.