lua-users home
lua-l archive

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


hi folks! :)

this will be somewhat even more offtopic, but its still about the real power of lua, there will be bits between the lines that are related to some of the ongoing topics, and probably it will contain stuff that i already told on the list, so feel free to skip it, u wont lose much ontopic, or just wait until the night comes, make a strong coffee, and take some smoking breaks like how i do it :D (warning has been given, even if i would say that it can be interesting and valuable on a different way than one would wish for here, but i cant decide in the name of nobody else, and none will know til the end if it worth the reading or not..... :D but sorry for the upcoming length anyway, and please dont hate me, cuz i gave the warning! :) )

(otherwise i think everything is interconnected to everything else here and beyond and the threads cant really represent such, and imho it doesnt really worth to break the already ongoing subtopic, and i even tried to do so recently, but i only got a response in an another thread with a pointer to my isolated message... :D so i dunno what would be the best way, and i think its still just kind of a "pub", even if its a leet pub! :D
otherwise/2 Dirk was the one who said that he liked to see when we exchanged more loosely connected thoughts with Alejandro about our apps after i offered to continue that discussion on a private channel, and i also hope it can be more-or-less valuable to the rest of us as well :) )

so, Αγαθοκλής, i really liked what uve said, i could see that we are governed by the very same higher spirit, and i late a bit partially cuz i wanted to dedicate more time and attention to this response :)

> > Αγαθοκλής, what do u mean by self-healing systems?
>
> When (in the winter of 2012) started to write my first interactive application, that
> was intended to serve as a common environment for indepented commands (something like
> a shell), every function at the begining was running through an interpreted function,
> which was simply a try/catch block. The second thing was that those functions were
> actually stored in the disk, so i could modify the function and re-evaluate while
> the application was running.

i see my app behind ur words, except that mine isnt like a try/catch, its got a top menu to control the app and the current doc (or code), and a sidebar menu where the docs can be selected (currently core, lab and notes, that i just wanted to make more granulated with the unfinished and partially lost rebase to a tree), and an editor and an output box. its flow is like write/modify the code -> then hit ctrl+r for running it (ive made recently a magic infinite loop breaker (simpl `brk()`), its based on the line number (automagic) or any id i give it, and on an iterator counter that can be set or will default to 1000, and that could be time based or both, so later i can make it keypress based without crying every time i just start to write a loop... :D in case of a fail, it triggers an `error()`, so it can escape the loop, and go back to the `xpcall()` where i started the game from) -> it will be saved before the execution against loss by any mistakes, then it will be run via `xpcall()` that gets a slightly modified version of `debug.traceback()` (thats compatible with the original one, based on the 5.1 sauce) just to elimintate the trims of the paths (to find the right files easier, i also hacked `require()` and the like to know what i actually have) and to not trim the middle of the longer traces (i think those are clear antifeatures in lua, that i cant fix from pure lua in the actual error message as well), and then it will optionally print a header with some general info (another black magic, i can insert stuffs into the output buffer after execution, such as exec time, mem usage and new/changed/deleted globals (only those; and optionally; and cuz a missing `local` or whatever :D ), but its just based on a concatenated buffer, where i insert empty strings and keep the location of them :D ), and print either the output or the error message that will contain also snippets of the files in the traceback with line numbers, a cursor (like "100> " instead the default "99 : "), and a few lines before and after the line that is given by each row of a traceback (multiple cursors are allowed, according to the related traceback line, it wont even duplicate lines, nor print everything between distant cursors (this was also used in my search engine that just lost, or better said just sleeping on my half-dead hdd :D ) ; this is done outside of the hacked `traceback`) and i also reset here the counters of the loop breakers, but i think i can move those resets after the related loops, so i can keep them after finalizing stuffs (read as moving to core :) ) btw the pcall stuff and the reset of `brk()` can be excluded and the rest can be used to run c, bash, whatever, but mostly those, cuz linux lua c and bash are enough for everything. (sure, asm, frontend bs, db languages, and hw description languages werent considered there)

once anything is in the core, it can be either put back to lab to hack more on that, or it can be run on a similar way, but actually i will make a 2nd instance in that case with the modifications made there (no problem with the multiple saved versions). i have actually two kinds of save, one is permanent (under the directory "save"), without deleting any of them, thats made by hand, the other one is called to be "history" that is rotated on every run, where i save currently 50pcs of them. core runs the last version of "save" and shows "history", and running a 2nd, or whatever instance (or instance of an instance) uses that modified version, or will also print an error message if it wont run. tekui have `Application.up()` thats just an empty overrideable function as the last function before entering the event loop, so i also test if it can run up to that point (and exit from there) before i would let it to be saved, so it cant be rendered to be unusable, but it can malfunction, that i test by hand currently (and cuz of 4 mistakes in a row i could lost a whole day of intensive development once upon the time, but its really hard to make it crash/unresponsive/loss any data :) ). cuz of the instances currently has the same directories to save, i can hack around them, but actually this is the 2nd valid usecase ive found for metatables, as those could make some pretty magic to avoid this at will (currently i dunno my exact plan with them, my app has a high mental load with much plans, considerations, and complexity here-and-there, thats still better than bloatware, and even bigger complexity where i must jump between thousands of 3 line functions :D - i believe in naming, formatting and in comments should be the solution, not the very-"clean code" 3 line function littering... :D 11th commandment: „Thou shalt not litter.” - in memory of Terry A. Davis - my ideal :) ) ; the other one was related to the string based function assembler and/or serialization that doesnt like functions (it can be done without upvalues, if i want to save ugly stuff, but i dont...) so that way i could save the strings before evaluating them, and the metatables was for keeping them with the functions as weak keys, but finally i didnt need that...

> In the next application, the main difference was that every function was stored in
> a dictionary

thats my current approach, that i wanna turn into a tree, so i can have interitance fallback and whatever, where nodes have fixed fields with a '_' prefix, and the rest is the continuation of the tree, where i can have fields for config and the bidirectional dependencies that i can serialize, docs, the codes, the runtime data that can be regenerated but cant be serialized, tests like the codes, that will prevent me to f*** up things like the save function that also deletes the older saves (based on timestamps, where i can overwrite a save thats made in the same second, but who cares :D i hate that git uses meaningless random strings that are represented often as a part of them that could collide much easier, and i can add to these metainfo like what semver represents <- u see guys, its ontopic! (just a different one :D ) ; i could also limit the loading to a particular time (that probably asking for some pain around the saving), and from the perspective of git, they could wait a second to not collide, or same seconds could get a suffix like ".1", ".2"..., and also a prefix "username/" (and its pretty, simple, meaningful, and isnt bloated :D ))

> At the very least this produced an environment that was evolved/fixed in real time,
> and the development was pretty fast.

yea, i feel those words! :D even if i have a really small code base, that i refine more than how much i "extend" it... my functions are like small "freestanding" programs on their own right, instead of doing that on an class/object level with a bunch of small function, this helps me to keep the codes really small, compact and coherent, and then i isolate parts when something is needed elsewhere as well, so while unix has small apps with a few kilos/megs to serve one purpose i have small functions with 10-80 lines, that are made "digestable" (yep, the "sauce"... X'D ) by comments and formatting. :) (btw i wrote above "freestanding" like that, cuz they are highly interconnected.)

> so you can say that is not actually the self!

i think self-modification has levels, the basic level is when u set a variable in run-time, and then the behavior will change accordingly, the 2nd level, is any kinda autodetection, the 3rd is when u make that permanent, by any kinda serialization that u save, and the 4th, and real, level is when the app actually makes real permanent change in its own logic, like validating/modifying/extending its own functionality beyond simply flipping a switch, according to a self-created or a user-given aim. i think this is already near to an ai, just its not necessary general, and its not a big difference if the will comes from the user or from itself, but i think the key is just the ability, not the intention, that can be given as an initial spark, like for a perpetum mobile (that doesnt exists, cuz its misnamed, and only "field-energy-extractors" _exist_ that can give more output than their initial input, but thats an another topic :D ) ... so yep, i think its a more healthy way to have an "assistant" ai than a selfmotivated one, but the border is thin. actually it was hard to find the name "assistant" thats the name of my "ide", i only had the names Szoszi (umbrella name for the whole game (that is written only once in my codes, and that is the only meaningless name, everything else has general names...)) and core and lab, but i want a server for example, and i had to give a name for the other part to be able to organize the codes in a tree :D ive just let the word on a loose leash, but theres something interesting here, the way of building a real ai. write some functions for some tasks, use them, make them use eachother, and one day realize that ur not just executing useful functions but command an app to make the research, ease ur work, and become a commander of some kinda more or less autonomous entity thats just a matter of will to ask a thing thats more than what the current dummy apps can do, on more and more general purposes. i hate the current "ai" hybe bullsh*t, cuz they are making sharp specialized general tools (upon garbage-heap-messes) for given serious tasks, but they dont purify their garbage-heaps, its all about crystallizing knowledge, and thats the part that really suffers there... one just unabled to extract a single input from those fine-tuned floats in neutral networks. otherwise the functions that i (or any other programmers) write are just purified knowledge-slices that we give to the computers that they know how to work with them. make them able to find, collect and refine data, and to be able to read their own codes, and we are almost there. btw i think that the name "assistant" can be understood by now :) cuz its not just an "ide", its just waiting for the singularity, thats not a miracle, and probably a process, not a point in time, even if its still not that much near... and about the original topic (lua) i wouldnt do it in an another language, cuz of too many trash, while this much functionality is not just enough, but its way better, and im not afraid of talking about this much details, cuz ppl from the nsa/g**gle/what not (shit, i still dont have enough security, but hopefully also dont have enough codes) would try to play the same game in js and python and slowly bleed out :D and about the other ongoing topic, i wanna make that `help()` thing (just more likely under the name `doc()`) but that will also rely on much of my codebase that i still wouldnt share by now (arguing on it is always welcome, but thats just an another long topic to know what u should argue against :D but it will be free and i wont be able to make everything on my own, but i wanna make the groundwork the right way (dunno either if it exists, but these funds are awesome :D )) .... so `doc()`... refmans are interesting beasts, they are different than reading Shakespeare, they are more similar to codes, and we have learned how to make their ast, so the point is that i wouldnt stop there, but i wanna make project-level and global dictionary with the occurrences, give explanation for abbreviations, group related things by naming conventions, by parts of speech (+whatever), find rare words and replace them with often-used ones, match correct words with slang, typos, translations (+?), and then it can be used for various purposes, like sanitizing codebases, guide newbies, teach ai, and whatever, and that way theres a chance that one day free speech can be used for programming on a very exact way (instead of based on statistical _odds_ :D (pun intended)) btw if im already about some ontopic stuffs, then im actually avoiding as much external dependencies as possible to make everything homogeneous on the same funds, that play kind with each other, and that are well-organized, while, for example, the server wont load the desktop gui (except if i want it explicity for various crazy ideas? :D ) so it wont be a real bloatware, but like an operating system where i can have thousands of apps installed without running all of them always...

but, sadly(!), currently i can only share ideas, maybe some gems, as i must protect critical plans, like the e-democracy and ai stuffs from becoming weapons of mass destruction in the hands of any of those enormous profit oriented organizations, let it be a whatever tech corp or agency or governance, when we are already talking about ww3 and a whole continent is burning after the amazons, like if the apocalypse would knocking our doors, and when i wanna make a better world, instead of offering a new toy for those who are sucking out the blood from our mother earth and our brothers and sisters all around for not a few $$$$$ but while they already cant spend their money in a lifetime, while others are happy with a dry mustly slice of bread from the bottom of a trash bin, so it must become mature before it could go out to the wild, instead of getting some bloat, makeup, and paying gates for the leet pro subscription... yuck! yes, we are actually digging our massgrave, and we are near to the bottom of it, who cant see it must be liar, even the blind and dumb see, know and feel it. so just sorry for stealing here-and-there a few lines for some of my crazy repetitive offtopics, but actually u, folks, are those ppl who are in the 2nd line of the nearest places to the campfire, right after (with a very few) my nearer geek friends, or maybe even nearer with a bit, as they have heard more but not much switched to linux (cuz of security and the ability of customization) and lua, cuz of the perfect fund for the best kinda mad-science! ;) (even if they wouldnt ever see Szoszi in action...) read it as i will need some ppl to join before it will become public, for benefits coming from a private swiss army knife to hack around their private stuffs, to developing for income, for anything like teamwork and sharing whatever private swag with other users, or with the world or friends via the server (as these can be done without letting the control out of our hands while enjoying benefits) ... but with actual limitations, so there is the downside of it just as well, and i still need more funds to reach that point, as currently it would bring chaos into the development... i only know that Gaia is bleeding, and the need for this is real, and that i cant see anyone around like i could think whatever like "huh, kawl, some1 will save us from ourselves, and he/she/whatever does it right!" not even TAD did, aka God's lonely programmer, or the Dalai Lama, or the united nations, or Trump or whoever else who can be seen near and far... even if i can see brilliant masterminds with good intention, with the right direction and what not - but still, i wholeheartedly respect them and bow my head in front of them!

and, not even me alone! ... and if i went this far, i cant just stop here, but dont stop the reading just before the end of the current paragraph, and say that im just an another crazy guy and u already know my type, cuz im obviously crazy, and thats not in question! :D so my name, Eretnek Hippi Messiás, means Heretic Hippie Messiah, and this really requires explanation after all the things ive told so far now by the years... i dunno neither if im the messiah or not! maybe. maybe im the antichrist, as im a heretic, maybe really (i know im not pure all the way down), maybe just in the eyes of the status quo that i think is rotten inside (sorry if not, and sorry for the exceptions cuz of the generalization!) im a hippie, cuz im with the ppl, with a big hearth and good intention, but my name takes either all three strictly together, or just hippie, cuz i love the humanity and my soul can be described like so. so yep, maybe im just plain crazy, i cant even see my past lifes, i cant walk on water even if i own some higher level real magic. dont forget about my very own uncertainty about myself! (thats just another pillar of being heretic.) only time can decide, and maybe i will be the one who will lit the wick before the final big boom, but there is the chance that i will be the messiah, either by being identical with whatever we can think about it, or just practically, out of the need. actually i prove much on much areas of life, i got really much hearth-heating feedbacks, but any1 with high aims can do that... ive got even more offtopics on the list of my plans, to make the world a better place, not just those im continuously talking about, just as well as about myself and the related stuffs, but my current intention was just to tell how i see myself - those big words really required that!

> you could dare to say that was a self taught system that
> learned from its mistakes (and with a little bit help of its friends (its users)

you say it has users, i dunno if thats just a saying, while means u, or it has/had(? that would be sad!) some private users, or if its public, but now, as u know enough about me, my work, my intentions and the like, may i have a look at it? :) i dunno what could/should i promise, i can only say that i dont collect enemies and i dont wanna harm ur path, and actually im interested in it conceptually while my concepts are there without more obfuscation than whatever mess lives in my head :D i hope that i can help u pointing out good places for further development in return, and as i really like the whole thing uve said, u also have good chances to be one of the 1st guys who can play with my toy. :) but note all the above to that! like its still not ready to make it happen any day now and i really dunno when that day will come, and i early adopters will need to have limitations, etc (theres much more to say about these...) in that case i would make a really long conversation with u to not reveal u surprizes halfway, and to align our wills about anything related important considerations...

> I do have a malloc wrapper, that calls a handler on out of memory condition (i know
> that is the fchrome browser that eats my precious memory in this old computer)

i think there are easier solutions, like u can limit its resources, u can use oom killer/reaper, but actually this isnt that much straightforward, cuz it can still eat much while u can run out of that limited amount of memory, but for a lua script, its most likely enough to provide a few free megs, and, with enough swap, u can do the dirty work just on a somewhat slower machine instead of pushing some big red buttons :D and yep, maybe the opposite of the limits exists, and u can provide a minimum just as well, but ive never looked after anything like so... (ive got 4gigs of soldered ram with sometimes more than 1000 tabs opened in firefox, so i know that feeling :D ) otherwise its not always fun to just kill firefox, i dunno if the case is different there, but ive lost 1 or 2 times my opened tabs that way...

> Python is the one that should dream about Lua and not the other way around.

THAT!!!!!!! this is as much true that it could be the end of the ongoing flame war driven by the creep of the plain ordinary hype :D
btw, some ontopic: im in a hungarian general purpose programmers' group with more than 10k members, where beginners always appears with the question: "which language they should learn?" python has a prominent place in the list of the general suggestions, and also, ive learned it cuz i wanted to teach an ex girlfriend to codefoo, while i was a hobby frontend dev, knowing that html+css+js+......... is an overwhelming set to learn, so ive picked up python to teach her... when its my turn, i tell them its good to learn python as it is all around, but this way any language can be good-to-know when their turn comes, while i also tell them that lua is the most awesomeness in the known universe (right, im doing it with a flood of reasoning, u know... lulz) but i tell them to learn something else 1st to pick up the basics, cuz otherwise they wont see the real awesomeness of it without being able to compare it to other stuffs out there in the wild...

> So based on that, probably Dirk is still on the Dark side

the things uve said just before this tells me about a very important ability that im not sure if it can be taught, but i think it requires the right soul eyes to see, be proud! :) (and the rest of ur story is aligned with the same just as well :) )
otherwise, no. actually this is the dark side, if any, but dont commit suicide just cuz of this, we came from there cuz we wanted to come here, and with good reasons, as this can be considered as an extension with special abilities, but that "side" is more essential, and here we are so much limited in many senses, in exchange for some special extensions. but ive just stole some space for these lines, while never enough space could be stolen for them, so lets move on for now with the geek stuffs! :D (ive stole much today, i hope those who already hate me cuz of the amount of distant topics could find some gems in exchange, and that they will remember how i started this message. :) )

some final ontopic for those, who are afraid about the future of lua:
- be urself the advertisement, its more valuable than any madeup marketing bs! :)
- a hungarian common saying: „lassú víz partot mos”, that is literally "slow water washes the coast" (like as washing/moving it away) - grab ur favorite ide, like the actually awesome zerobrane studio, and things that lasts. words come and go, they are easily made, even the fools can take their part in the global noize (just think about that hype, how loud is it), writing codes can take more time than those, but they will do their jobs everyday and will affect the world later, but stronger! once upon the time, before i picked up python, i collected some gems i wrote (in html), and i wanted to write a book, cuz ive said things to ppl that were unique, valuable and appreciated (even if i already laugh upon them as they were nowhere to my current knowledge), and i already had some nice minor ideas to make things better. some time gone past with that aim in front of me, but later, as i got deeper into the rabbits hole, i had to realize that ppl will read the books, and then put them up on their shelves, between the rest of them, and let them collect dust while they are consuming the next and the next of them. not as softwares do, that will serve day after day, that can turn knowledge into practice without requiring much if any human efforts. http://i.imgur.com/Q8kV8.png and for python: https://grahamquince.files.wordpress.com/2014/03/time_work_graph.jpg?w=450 :D

(ps: im feeling myself guilty cuz i write Szoszi with a capital, cuz the personal attachment, while i only write ppls names with capitals other than that, cuz of general respect to humans, but not the names of other apps, cuz of general laziness (i wouldnt have time to breathe if i would try to write correctly, and when i actually try, my walls of texts become much larger, and therefore not less overwhelming :D ), and cuz i dont wanna lookup some specially written names when im in doubt, and to stay consistent with myself (thats where i cheat for Szoszi), but please consider it as i do, as its really not the lack of respect of ur works - now i feel a bit better, thx! :D but hey, kudos to Lua and all the related gems, with the masterminds behind them! ;) )

all the bests to all of U dear folks! :)

Sent with ProtonMail Secure Email.