mocha

im gay lol

i make games and software and other software

regrettably dutch

pfp by @lif3_0n_m4rs on twitter

A small animated 88x31 button. The text says 'lisanne.gay'. periodically eyes appear that briefly observe a moving cursor


Last.FM Recently Played


this account is part of the m,cai ringbug

↑up↑
here
↓down↓



ive worked on a bunch of projects that depend on in-game scripting languages as the main focus and almost always run into a thing where none of the existing offerings let you do step-by-step execution. Like usually you input a string and then that gets run and then you get whatever the result of that was. but that sucks most of the time!! like if you let the user write anything that runs forever then ur game just breaks. being able to call the interpreter to do the next step would be so chill. then infinity wouldnt really matter, or if it did you could just limit to either X seconds or X amount of time. you could also run the interpreter in a thread but out of all the offerings ive seen i never saw an interface to cancel execution. also that would not work at all if you for instance want to limit the speed of execution, other than trying to inject sleeps or whatever into the code which is a nightmare.

like i get that this is not a problem for what these kind of libraries are usually used for, stuff like plugins and mods or whatever, but it would be nice to just get a little deeper control in what it must already be doing under the hood. i got frustrated about this enough one time that i spent 3 months building my own interpreter for a custom scripting language and it sucked and was so slow and the project exploded in scope and never got anywhere lol.
anyways writing ths because im currently using lua for the 3ds engine thing and i realized that the way i changed my approach to how script evaluation works could totally allow for infinite loops lol. which would almost certainly freeze everything up :P maybe i could start a thread inside of lua that throws an error after X seconds or something idunno lol


You must log in to comment.