Time |
Nick |
Message |
02:08 |
|
ShadowNinja|Away joined #minetest-dev |
02:49 |
hmmmm |
trying something totally new *crosses fingers* |
02:50 |
VanessaE |
uh oh. |
03:00 |
|
BackupCoder joined #minetest-dev |
05:31 |
|
BackupCoder joined #minetest-dev |
05:44 |
|
darkrose joined #minetest-dev |
06:04 |
|
darkrose joined #minetest-dev |
06:19 |
celeron55 |
23:35:37 < sapier> celeron setmetatabe is used for all register functions therefore it doesn't seem to be easy to disable |
06:19 |
celeron55 |
i already said how you do it |
06:42 |
|
darkrose joined #minetest-dev |
06:51 |
|
darkrose joined #minetest-dev |
07:18 |
thexyz |
wait, are you going to disable setmetatable for security reasons? |
07:52 |
celeron55 |
yes; in lua you need to do that in order to sandbox anything |
07:52 |
celeron55 |
anything that allows it is incapable of sandboxing |
07:56 |
celeron55 |
or, well; i am not exactly sure if it always makes a security hole, but it definitely always allows to at least crash other code |
08:47 |
thexyz |
bad, stress won't work without it |
08:47 |
thexyz |
or, well, anything oop |
08:49 |
thexyz |
not "anything" though |
08:49 |
thexyz |
but it'll look dirtier |
08:56 |
thexyz |
being unable to redefine operators is bad too |
09:00 |
|
Calinou joined #minetest-dev |
09:04 |
RealBadAngel |
i just replaced lualib.a with luajit, and got some error in serialization tests |
09:05 |
RealBadAngel |
its safe to skip those tests? |
09:06 |
RealBadAngel |
https://github.com/minetest/minetest/blob/master/builtin/serialize.lua#L200 |
09:06 |
RealBadAngel |
this line is the problem |
09:07 |
thexyz |
just comment it out |
09:10 |
RealBadAngel |
first impressions: no lag at start, with old lua i had 4-5fps at start then slowly it was raising |
09:10 |
RealBadAngel |
now it is 50fps from the very start |
09:11 |
RealBadAngel |
world is generating faster (moreores, technic worldgen, moretrees, plantib here) |
09:13 |
|
proller joined #minetest-dev |
09:14 |
RealBadAngel |
i need to compare now execution time of some technic routines |
09:27 |
RealBadAngel |
well, it is several times faster at least |
09:44 |
RealBadAngel |
maybe not several times, but way faster |
09:44 |
|
proller joined #minetest-dev |
09:50 |
RealBadAngel |
http://pastebin.com/B16s5um7 |
09:51 |
RealBadAngel |
comparision of Lua and LuaJit with search alorithms |
09:51 |
RealBadAngel |
execution of search repeated 100x, measured 20 times |
09:52 |
RealBadAngel |
end of story, luaJIT IS way faster |
10:00 |
|
Taoki joined #minetest-dev |
10:48 |
thexyz |
wtf |
10:48 |
thexyz |
100 nodes, run 100 times - 1s? |
10:49 |
thexyz |
that's like 10^4 times slower than same in C i guess |
10:50 |
celeron55 |
that text doesn't tell anything about what it's actually doing |
10:50 |
thexyz |
hm, yes |
10:50 |
thexyz |
i don't think it's that slow |
10:50 |
celeron55 |
maybe it's depth of 100 in three dimensions, being 100^3? 8) can't know; RBA needs to tell |
10:51 |
thexyz |
well, assuming he used dfs and knowing dfs is O(N) |
10:56 |
RealBadAngel |
http://en.wikipedia.org/wiki/Breadth-first_search |
10:57 |
RealBadAngel |
it is forced to identify and find 100 connected nodes |
10:57 |
RealBadAngel |
and reapeat it 100 times in one abm call |
11:02 |
thexyz |
looks more like O(n^3) then |
11:03 |
thexyz |
so, 10^8 operations are done in ~1s which is fast |
11:03 |
RealBadAngel |
screenshot of what it is doin on its way |
11:05 |
RealBadAngel |
http://i.imgur.com/XitsGs4.jpg |
11:05 |
celeron55 |
RealBadAngel: put a counter in it to count how many it actually checks |
11:05 |
RealBadAngel |
starting from battery box, find all the wire nodes, and all connected to it devices |
11:05 |
RealBadAngel |
store them in a table |
11:06 |
RealBadAngel |
instead of 1 time per abm call i repeat it 100 times for measuring purposes |
11:07 |
celeron55 |
so doing that thing takes 14 or 40ms |
11:07 |
celeron55 |
quite reasonable |
11:08 |
celeron55 |
do you have good ways of invalidating the cache? |
11:10 |
RealBadAngel |
what do you mean exactly? |
11:11 |
celeron55 |
i guess you only need to check the type of a modified node to know if you need to recalculate the cached wire network |
11:11 |
RealBadAngel |
it is not cached, it is live |
11:12 |
RealBadAngel |
table is created each time from scratch |
11:12 |
RealBadAngel |
so if i connect 2nd batbox to it, break the circuit somwhere, it will create 2 separate circuits |
11:13 |
celeron55 |
that'll be quite wasteful if you make a few times larger circuit |
11:13 |
RealBadAngel |
no need to create such big circuits |
11:13 |
RealBadAngel |
and 100 is hardcoded max of a graph |
11:14 |
RealBadAngel |
something like mesecons losing signal after some distance |
11:16 |
RealBadAngel |
thx to it it is recalculated each time, devices just works on plug in and circuit is responding live on player actions |
11:17 |
RealBadAngel |
but back to measures, they show how much faster is luajit for such things |
11:18 |
RealBadAngel |
when everythin to get more than twice as fast code is to replace one lib i think its worth it |
11:26 |
thexyz |
yeah, but serialize is broken |
11:27 |
thexyz |
or maybe escape sequences work differently |
11:32 |
RealBadAngel |
its not broken |
11:32 |
RealBadAngel |
stargates working just fine |
11:32 |
RealBadAngel |
and they use serialize to store tables on disk |
11:34 |
thexyz |
yes, i mean, something is wrong with escape sequences |
11:34 |
thexyz |
i guess that's not important at all |
11:34 |
RealBadAngel |
i googled something about using % instead of / |
11:34 |
thexyz |
i wonder how should we include luajit |
11:35 |
thexyz |
like a git submodule maybe? |
11:35 |
RealBadAngel |
i just did it your way, compiled and renamed library to liblua.a |
11:35 |
thexyz |
do they have public git repo? |
11:35 |
thexyz |
that's great, but we need saner way to include it into minetesr |
11:36 |
RealBadAngel |
http://luajit.org/download.html |
11:38 |
thexyz |
good |
11:46 |
RealBadAngel |
tested stargates a bit more, seems that serialize/deserialize workin just fine |
11:54 |
thexyz |
yeah, that seems logical |
11:59 |
RealBadAngel |
i tested all my code that is using serialize, no problems at all |
12:02 |
RealBadAngel |
thexyz, btw if you want to test stargates: https://github.com/RealBadAngel/technic |
12:02 |
RealBadAngel |
theyre almost finished |
12:02 |
RealBadAngel |
need to add a few simple and easy pieces just |
12:19 |
|
troller joined #minetest-dev |
13:07 |
|
PilzAdam joined #minetest-dev |
13:15 |
|
hmmmm joined #minetest-dev |
13:33 |
RealBadAngel |
hi hmmmm |
13:34 |
RealBadAngel |
ive tested luajit and it is faster than lua |
13:36 |
ecube |
it would be hard to switch to luajit |
13:37 |
RealBadAngel |
not really |
13:37 |
RealBadAngel |
im switchin now there and back by copying one file and linking binaries again |
13:38 |
RealBadAngel |
ive compiled luajit and renamed the library to liblua.a |
13:40 |
RealBadAngel |
https://github.com/minetest/minetest/blob/master/builtin/serialize.lua#L200 |
13:40 |
RealBadAngel |
only this line has to be fixed for luajit to work |
14:21 |
celeron55 |
you should see what causes the problem on that line |
14:32 |
RealBadAngel |
unittest_input = {escapechars="\n\r\t\v\\\"\'\[\]", noneuropean="θש×٩∂"} |
14:32 |
RealBadAngel |
problem is \[ and \] |
14:33 |
RealBadAngel |
brackets in general |
14:34 |
RealBadAngel |
http://lua.2524044.n2.nabble.com/LuaJIT-2-0-0-beta9-and-Lua-5-1-4-different-behavior-td7175550.html |
15:16 |
RealBadAngel |
celeron55, do we need that feature? |
15:21 |
celeron55 |
ah so the \[\] thing are invalid escape sequences |
15:21 |
celeron55 |
remove them from there |
15:22 |
RealBadAngel |
i made it here, about replacing whole lua sources with luajit im not sure how to do that |
15:23 |
RealBadAngel |
i compiled luajit in another directory and replaced compiled .a |
15:27 |
|
SpeedProg joined #minetest-dev |
15:41 |
celeron55 |
lol Taoki is just silly; first goes to make jumping harder, and then wants to bloat up everything with partial blocks in order to make moving less hard: http://forum.minetest.net/viewtopic.php?id=5072 |
15:41 |
celeron55 |
8D |
15:41 |
* celeron55 |
does not approve |
15:58 |
|
Jordach joined #minetest-dev |
15:58 |
|
Jordach joined #minetest-dev |
16:29 |
VanessaE |
I've been testing luajit per realbadangel's instructions. The speedup under minetest (e.g. with moretrees) is significant. |
16:29 |
VanessaE |
it ain't the silver bullet, but it's definitely faster. |
16:31 |
|
Calinou joined #minetest-dev |
16:32 |
VanessaE |
my server now runs this luajit build for those who want to check that out. |
16:36 |
Calinou |
*electricity company frowns at VanessaE* |
16:36 |
VanessaE |
lol |
16:57 |
khonkhortisan |
Hi RealBadAngel. Where did 6d facedir go? |
16:57 |
RealBadAngel |
will be there this weekend |
16:58 |
khonkhortisan |
okay |
16:58 |
RealBadAngel |
i just finished workin on stargates, tested luajit |
16:58 |
RealBadAngel |
now i can go back to 6d facedir |
17:01 |
|
rubenwardy joined #minetest-dev |
17:02 |
|
iqualfragile joined #minetest-dev |
17:12 |
|
rubenwardy joined #minetest-dev |
17:13 |
|
rubenwardy left #minetest-dev |
17:13 |
|
rubenwardy joined #minetest-dev |
18:04 |
|
proller joined #minetest-dev |
18:18 |
|
rubenwardy joined #minetest-dev |
18:23 |
PilzAdam |
why do we have the movement and on_demand_item_visuals branch still hanging arround in minetest/minetest |
18:24 |
|
celeron55 joined #minetest-dev |
18:29 |
|
markveidemanis joined #minetest-dev |
18:29 |
|
markveidemanis left #minetest-dev |
18:38 |
|
rubenwardy joined #minetest-dev |
18:50 |
rubenwardy |
can someone make me a cmakelists.txt that compiles main |
18:50 |
rubenwardy |
meh |
18:50 |
MiJyn |
compiles main? |
18:50 |
MiJyn |
what do you mean? |
18:50 |
rubenwardy |
can someone make me a cmakelists.txt that compiles src/main.cpp and outputs it to bin/game.exe? |
18:51 |
rubenwardy |
sorry mis-enter |
18:51 |
MiJyn |
uhhh, isn't this just the default cmakelists.txt |
18:51 |
rubenwardy |
no, for enougher project |
18:51 |
rubenwardy |
another |
18:52 |
MiJyn |
(btw, I think this should be posted on #minetest-delta) |
18:52 |
rubenwardy |
ok... |
19:01 |
|
MiJyn left #minetest-dev |
20:38 |
hmmmm |
ugh |
20:39 |
hmmmm |
partial blocks would be tough to implement too, since you need to take direction into account for everything |
20:41 |
hmmmm |
if he wants to do this, seriously, just freaking fork minetest.. you're basically changing the game |
20:42 |
hmmmm |
as for the minetest.after thing, i'll merge that later, i still need to do some stuff such as pass out on the couch and eat dinner |
20:46 |
Jordach |
hmmmm, tell that to Taoki |
20:47 |
Taoki |
hmmmm: I don't think this would break the purpose of minetest. Slabs are basically half-voxels. It is true direction would need to be changed to do it fully, but IMO it's only needed for the ground |
20:47 |
Taoki |
Either way it can be done as an optional mod. I don't think we should be afraid to add things MineCraft never had however |
20:49 |
RealBadAngel |
hi all |
20:50 |
hmmmm |
oh taoki you're mirceakitsune? |
20:50 |
Taoki |
yep |
20:50 |
Taoki |
RealBadAngel: Hi |
20:50 |
hmmmm |
just curious, what email did you want on the credits page? |
20:51 |
hmmmm |
i used your yahoo account but |
20:51 |
hmmmm |
maybe there's something else that you'd want to be seen |
20:51 |
RealBadAngel |
tryin to compile luajit together with minetest now |
20:52 |
Taoki |
I guess any is ok. I think I'd prefer mirceakitsunegmail.com though |
20:54 |
RealBadAngel |
shit, no luck at all |
20:54 |
RealBadAngel |
im not familiar with it |
21:04 |
|
SpeedProg1 joined #minetest-dev |
21:09 |
|
Taoki joined #minetest-dev |
21:34 |
|
sapier1 joined #minetest-dev |
21:35 |
sapier1 |
https://github.com/minetest/minetest/pull/495 next try, I disabled metatable and raw access too |
21:40 |
sapier1 |
And something completely different: https://github.com/minetest/minetest/pull/548 |
21:41 |
PilzAdam |
why do you change -O1 to -O0? |
21:42 |
sapier1 |
oops I'll remove it ... -O1 is not debug friendly in my opinion but celeron wants it that way |
21:43 |
RealBadAngel |
somebody here knows how to compile luajit together with minetest? |
21:43 |
sapier1 |
currently this code might run on linux only (not because of features but because of timing calcultation) does anyone know how to get ns timings on windows? |
21:43 |
sapier1 |
no but I assume luajit doesn't help that much |
21:43 |
RealBadAngel |
? |
21:44 |
RealBadAngel |
its more as twice as fast comparing to lua |
21:44 |
sapier1 |
no it may even be slower |
21:44 |
RealBadAngel |
wanna bet? |
21:44 |
RealBadAngel |
i do have luajit workin here |
21:44 |
sapier1 |
I've even precompiled mobf |
21:45 |
sapier1 |
it even slowed down mobf |
21:45 |
RealBadAngel |
technic search algorithms works more twice as fast |
21:45 |
RealBadAngel |
all is faster |
21:45 |
sapier1 |
maybe that's a usecase where precombiling helps but this isn't true for everything |
21:45 |
RealBadAngel |
join vanessae server, its workin on jit |
21:46 |
sapier1 |
I believe it may help for some cases |
21:46 |
RealBadAngel |
overall game performance is better |
21:47 |
sapier1 |
that's not true in general |
21:47 |
RealBadAngel |
idk what tests have you done to be slower :) |
21:47 |
RealBadAngel |
it is |
21:47 |
RealBadAngel |
i can see and measure it |
21:47 |
sapier1 |
its true for some(many) cases but not ALL |
21:47 |
sapier1 |
ok then plz remove all mods add mobf and measure again if this is true for mobf too I don't think so |
21:47 |
RealBadAngel |
http://pastebin.com/B16s5um7 |
21:48 |
sapier1 |
as precompiled code should be even better |
21:48 |
RealBadAngel |
its bfs repeated 100 times (technic batbox with 100 wire nodes) |
21:49 |
sapier1 |
good god ... you take the worst thing to do in lua find out that in this scenario jit helps and guess it's helping for everything? |
21:49 |
RealBadAngel |
worst scenario? |
21:49 |
RealBadAngel |
i can see 60fps again |
21:49 |
sapier1 |
search algorithms in lua ;-) |
21:49 |
sapier1 |
is worst thing you can do |
21:49 |
RealBadAngel |
because game is faster, mapgen stuff |
21:50 |
sapier1 |
what about debugging jitted code? |
21:50 |
sapier1 |
does it work? |
21:51 |
RealBadAngel |
idk, im just testing it |
21:51 |
RealBadAngel |
game works as usual but faster |
21:51 |
sapier |
:-) I'd be glad if you succeed |
21:52 |
sapier |
but searching in lua isn't worth any optimization |
21:52 |
sapier |
you discovered yourself with treegen |
21:52 |
sapier |
I just noticed same for pathfinding ... 30s lua 100 ms c++ |
21:53 |
RealBadAngel |
but moving everythin to engine is also not an option |
21:53 |
sapier |
true but maybe some generic search algorithms what exactly istechnic searching? |
21:54 |
RealBadAngel |
its bfs with some additions |
21:54 |
sapier |
bfs? |
21:54 |
RealBadAngel |
http://en.wikipedia.org/wiki/Breadth-first_search |
21:55 |
RealBadAngel |
im using 2 variants of this, 2nd with remembering parent vertice |
21:56 |
sapier |
seams to be a simple binary search |
21:56 |
RealBadAngel |
yes |
21:57 |
sapier |
what exactly is technic doing with this? |
21:57 |
RealBadAngel |
wireing |
21:58 |
RealBadAngel |
2nd is used to map connected tubes and get path for items travelling in them |
21:58 |
sapier |
hmm what do you think about adding trees to api? |
21:59 |
sapier |
nodes and linkage within core datastructures and each node has a configurable pointer to a lua object |
22:00 |
RealBadAngel |
i want to add such things to core anyway |
22:00 |
sapier |
if you do it plz do it in a very generic way |
22:01 |
sapier |
so arbitrary search algorithms could be implemented on top of it |
22:01 |
RealBadAngel |
but still, simply replacing lualib.a with libluajit.a and getting code working twice as fast... |
22:01 |
sapier |
is only usefull if it doesn't make debugging impossible |
22:02 |
RealBadAngel |
what kind of debugging? |
22:02 |
RealBadAngel |
game works as usual |
22:03 |
sapier |
debugging as of get usefull crash information if a mod crashes on a server running luajit |
22:03 |
RealBadAngel |
it crashes usual way |
22:03 |
RealBadAngel |
with all the reports |
22:03 |
sapier |
ok that's been what I was wondering ;-) |
22:03 |
RealBadAngel |
just try it for yourself |
22:04 |
sapier |
how difficult is it to get luajit running? |
22:04 |
RealBadAngel |
grab the sources, compile, take .a, rename it to liblua.a |
22:04 |
RealBadAngel |
overwrite it on already compiled minetest sources |
22:04 |
sapier |
I'll wait until you get it included ;-) |
22:04 |
RealBadAngel |
erase executables |
22:05 |
RealBadAngel |
and make again to force link with replaced lua lib |
22:05 |
RealBadAngel |
takes 2 minutes to do that |
22:05 |
RealBadAngel |
and you can switch to jit and back in no time |
22:06 |
sapier |
last time I tried to do it that easy I gave up after a day ;-) maybe I downloaded wrong luajit version or whatever |
22:06 |
RealBadAngel |
http://luajit.org/download/LuaJIT-2.0.1.tar.gz |
22:06 |
RealBadAngel |
open, go to /src and make |
22:07 |
RealBadAngel |
you will get libluajit.a |
22:07 |
RealBadAngel |
rename it to liblua.a |
22:08 |
RealBadAngel |
and overwrite the one in minetest /src/lua/build |
22:11 |
RealBadAngel |
game is workin smoother, way faster with my usual set of mods. plantlife, moretrees, technic, mesecons, moreores etc |
22:12 |
RealBadAngel |
i dont have lags on startup anymore (like a few fps freeze for half a minute) |
22:13 |
sapier |
hmm sounds great |
22:13 |
RealBadAngel |
VanessaE server is workin on jit for several hours already |
22:13 |
sapier |
almost to great to be true ;-) |
22:14 |
RealBadAngel |
just test it out |
22:14 |
sapier |
I don't have time for comprehensive testing but I'll try |
22:15 |
RealBadAngel |
ah, one more thing |
22:15 |
RealBadAngel |
builtin/serialize.lua line#200 invalid escape chars have to be removed /[ and /] |
22:16 |
RealBadAngel |
luajit doesnt allow them |
22:17 |
RealBadAngel |
otherwise you will see debug in action ;) lol |
22:17 |
sapier |
hmmm |
22:17 |
sapier |
hopfully this won't make integration of security addons even more difficult |
22:18 |
RealBadAngel |
luajit is workin as generic lua but faster |
22:18 |
RealBadAngel |
those you were afraid of were precompiled binaries |
22:19 |
sapier |
you just told an exapmle where it doesn't work as generic lua |
22:19 |
sapier |
yes precompiled binarys are a big problem too |
22:20 |
RealBadAngel |
also luajit comes with bitwise library |
22:21 |
sapier |
still I'm close to giving up adding security as there is next to noone supporting it |
22:22 |
RealBadAngel |
some1 will in the future |
22:22 |
sapier |
yes once something very bad happened |
22:22 |
RealBadAngel |
i made backgrounds for formspec and first mods using this popped up half a year later ;) |
22:23 |
RealBadAngel |
now even minetest-game uses them lol |
22:23 |
sapier |
but it was added ;-P and formspecs got only really usefull after they could be shown by lua function call ;-) |
22:24 |
RealBadAngel |
yeah |
22:24 |
RealBadAngel |
stargates are using that too |
22:25 |
jin_xi |
RealBadAngel: multimaterial turtle stuff: http://i.imgur.com/LbcIJj6.png |
22:26 |
RealBadAngel |
saw the picture already, looks great :) |
22:26 |
sapier |
what exactly do did you mean with the escape sequences? |
22:26 |
RealBadAngel |
hold on |
22:27 |
RealBadAngel |
unittest_input = {escapechars="\n\r\t\v\\\"\'", noneuropean="θש×٩∂"} |
22:27 |
jin_xi |
i'm now using lua to generate turtle programs. its nice being lua and all, but i dont know how to randomize stuff this way |
22:27 |
sapier |
and how to fix it? |
22:27 |
RealBadAngel |
libjua is just more strict |
22:27 |
RealBadAngel |
its not a bug |
22:28 |
sapier |
how to fix it? |
22:28 |
jin_xi |
can lua stuff run when map is generated? |
22:28 |
RealBadAngel |
what for do you need such escape chars? |
22:28 |
sapier |
on_generated |
22:29 |
* jin_xi |
checks |
22:29 |
RealBadAngel |
if you want them use % instead of / |
22:29 |
RealBadAngel |
i mean \ |
22:29 |
sapier |
for formspecs maybe? |
22:30 |
RealBadAngel |
so use % |
22:32 |
RealBadAngel |
%93 will give you [ |
22:32 |
RealBadAngel |
lua was just ignoring \ |
22:32 |
RealBadAngel |
luajit says it is invalid escapechar |
22:33 |
sapier |
if it didn't work before it's no problem but I'm not sure about that |
22:33 |
RealBadAngel |
i dont think its a problem at all |
22:34 |
sapier |
anything that did work before and is not working now is a problem ;-) |
22:34 |
RealBadAngel |
only thing not workin is just this test line |
22:34 |
RealBadAngel |
copied and brougth to minetest from some strange place |
22:35 |
RealBadAngel |
it is not minetest code at all |
22:35 |
RealBadAngel |
and even not a part of the original serialize.lua file |
22:35 |
sapier |
as I said if it didn't work before either it's no problem ;-) |
22:36 |
RealBadAngel |
some1 merged to minetest modified version of it |
22:36 |
RealBadAngel |
which can be also found on net |
22:36 |
RealBadAngel |
googled for this today |
22:39 |
RealBadAngel |
anyway, im not familiar with cmake files |
22:39 |
RealBadAngel |
some1 will have to do that |
22:41 |
sapier |
ok seams to work at least it didn't crash on trying |
22:42 |
RealBadAngel |
i havent noticed any crash related to change yet |
22:45 |
RealBadAngel |
now you can test it |
22:46 |
sapier |
currently i wonder why i don't have minetest.settings_save ... hmm |
22:47 |
RealBadAngel |
i got an idea |
22:47 |
RealBadAngel |
lemme try it :) |
22:47 |
sapier |
thought this was merged some time ago but can't find it anymore |
22:58 |
sapier |
ahhh found the function |
23:04 |
RealBadAngel |
better test luajit ;) |
23:05 |
sapier |
I don't have any performance problems I fixed it by doing things a more smart way ;-) |
23:07 |
RealBadAngel |
for lower end machines such performance gain is huuuge |
23:08 |
RealBadAngel |
im testing now more generic stuff |
23:08 |
RealBadAngel |
wonder bout the results |
23:17 |
hmmmm |
ugh again for the 1000th time, it's definitely worth adding in luajit, it really does help, people should be able to actually do things in lua without a helper API in the core |
23:17 |
hmmmm |
besides, let's suppose it didn't help for most things: still, why would you not use luajit? |
23:18 |
sapier |
can someone plz start a consistent project development guidline? about 6 months ago when I suggested adding luajit the suggestion was taken down by everyone |
23:18 |
sapier |
still if it helps and doesn't break anythin I support adding it |
23:20 |
RealBadAngel |
with generic stuff luajit and lua are equal |
23:20 |
sapier |
this is a limitation again is it equal or not |
23:21 |
sapier |
wait lets be precise ... do you know of any limitations? |
23:21 |
RealBadAngel |
http://pastebin.com/6zzUCwas |
23:21 |
RealBadAngel |
timings and testcode |
23:22 |
sapier |
ok you're talking about performance atm |
23:22 |
jin_xi |
|
23:22 |
jin_xi |
. |
23:23 |
jin_xi |
oops |
23:23 |
hmmmm |
|
23:23 |
hmmmm |
, |
23:23 |
RealBadAngel |
with lotsa operation on tables it is definitely faster |
23:23 |
sapier |
; |
23:23 |
hmmmm |
sapier, you mean like what i'm doing? |
23:23 |
hmmmm |
:3 |
23:24 |
jin_xi |
its my cat rubbing her head at the side of the keyboard with numberblock |
23:24 |
sapier |
not exactly I want to know where minetest is heading to ... 1.5 years ago everything needed to be moved to lua |
23:24 |
hmmmm |
6 months ago somebody else was in charge and they apparently liked Lua to be weak |
23:24 |
sapier |
0.5 years ago everyone started adding everything to core |
23:24 |
sapier |
and now it seems to move back to lua again |
23:24 |
hmmmm |
well |
23:24 |
sapier |
at least thats my ipression |
23:24 |
RealBadAngel |
not really |
23:25 |
RealBadAngel |
some thing definitely have to be made in core |
23:25 |
RealBadAngel |
like common algorithms |
23:25 |
hmmmm |
don't want to move 'everything' to lua like people wanted, things that are necessary are still made in the core, but we want people to be able to actually use lua without having to add things to the core |
23:25 |
hmmmm |
because otherwise you'd just have to add a new feature to the core every time you want to do something interesting with a mod |
23:26 |
RealBadAngel |
find node near is example of core thingy |
23:26 |
hmmmm |
at which point you'd be wondering why you don't just have the whole thing in the core |
23:26 |
RealBadAngel |
find all connected nodes can be another |
23:26 |
sapier |
I think I may have a very good testcase for lua <-> luajit <-> core dijkstra pathfinding is a very heavy operation containing lua<->c interaction as well as array operations |
23:26 |
sapier |
and I have same code in lua and c++ almost ready |
23:26 |
sapier |
I'll do some tests |
23:27 |
RealBadAngel |
i do have trees in lua and core |
23:27 |
RealBadAngel |
theres nothing to compare |
23:27 |
hmmmm |
the pathfinding algorithm is a good candidate for the core, but not *everything* needs to be in the core |
23:27 |
RealBadAngel |
blink or 30s |
23:27 |
sapier |
pathfinding can only be done in core at all ... first measurements gave 10s for small paths in lua |
23:27 |
sapier |
in core it's < 10ms |
23:28 |
RealBadAngel |
finite water was another example |
23:29 |
RealBadAngel |
now lets wait for some1 makin shaders in lua ;) |
23:30 |
hmmmm |
pffff speaking of shading |
23:31 |
hmmmm |
i think i'm dumping the pseudo-ray-tracing algorithm for lighting calculations i made |
23:31 |
sapier |
btw as there are lots of core developers in here, what do you think about the idea making lua thread safe? |
23:31 |
hmmmm |
it's tough |
23:31 |
hmmmm |
you need to fix a lot of other things first |
23:32 |
sapier |
yes it can't be done at once but it's not as big as you may think |
23:32 |
RealBadAngel |
http://www.youtube.com/watch?v=uDiJyRTPF7g |
23:32 |
RealBadAngel |
make something like this |
23:32 |
hmmmm |
you need to be envlocked and conlocked while doing lua anything, so we'd be well into one of the main TODOs |
23:32 |
sapier |
no you don't |
23:33 |
hmmmm |
to call any of the lua apis you do |
23:33 |
sapier |
fore some operations you need env for others con lock |
23:33 |
hmmmm |
yeah but you don't know which ones need con and env |
23:33 |
sapier |
and of course there may not be multiple threads working on lua stack same time |
23:34 |
hmmmm |
if you're considering locking what's needed in every single api.... just try it and see how well that works |
23:34 |
sapier |
yes but you may not need to know callbacks are done using scriptapi* functions |
23:34 |
sapier |
those calling this already have lock (at least those examples I looked at) |
23:35 |
sapier |
hmm locking what is needed only is the only way to gain reall performance benefit of multicore architectures |
23:35 |
hmmmm |
well, try it :) |
23:36 |
hmmmm |
if it works out, that's awesome and we win |
23:36 |
hmmmm |
i'm just saying it's going to be a lot tougher than you think |
23:36 |
sapier |
It's not a task to be done at once |
23:36 |
sapier |
my suggestion is as started in the pull request separating lua from core more than it is atm |
23:37 |
RealBadAngel |
if everything would be easy, it wont bring any satisfaction when done |
23:37 |
sapier |
so those places where someone requires lua stack the stack will be locked |
23:37 |
sapier |
and freed as soon as possible |
23:38 |
RealBadAngel |
hmmmm, and what do you think about luajit stuff? |
23:38 |
sapier |
this will help e.g. jeijas download modification too as he doesn't need to busy wait or lock stack forever |
23:39 |
hmmmm |
realbadangel, what do you think? i wrote "we should use luajit" in the todo list |
23:39 |
hmmmm |
lol |
23:40 |
RealBadAngel |
so it works |
23:40 |
RealBadAngel |
whos able to change cmake files then? :) |
23:40 |
sapier |
I assume noone did find anything bad by now |
23:40 |
sapier |
It's always the one asking ;-) |
23:41 |
RealBadAngel |
idk nothin bout cmake and compiling for different env |
23:42 |
sapier |
I only can add or remove files ;-) not enough for completely adding cmake support |
23:43 |
RealBadAngel |
i found luajit distro with cmake files, but it started to make unecesary objects in /bin like minilua etc |
23:44 |
RealBadAngel |
https://github.com/LuaDist/luajit |
23:52 |
RealBadAngel |
thexyz, will you be able to do that? |
23:54 |
RealBadAngel |
VanessaE's server already runnin jit for 7hrs28min ;) |
23:55 |
sapier |
by the way does anyone have an idea what to do with a pathfinding algorithm? |
23:55 |
hmmmm |
what to do with it?? |
23:55 |
hmmmm |
what do you mean |
23:56 |
RealBadAngel |
write? |
23:56 |
sapier |
I've written it because I thought I could do something with it but now I see I have not even a real testcase |
23:57 |
RealBadAngel |
beacause of jit? |
23:57 |
hmmmm |
what? of course, there are mobs |
23:57 |
sapier |
no completely unrelated ... just to get a list of points representing waypoints between two positions isn't quite a usefull feature |
23:57 |
hmmmm |
mobs? |
23:57 |
sapier |
normal mobs don't need pathfinding |
23:58 |
sapier |
maybe guard mobs could use it but even here it's not really important |
23:58 |
RealBadAngel |
items in tubes need |
23:58 |
hmmmm |
shrug |
23:58 |
RealBadAngel |
electricity, mesecons |
23:58 |
sapier |
pathfinding does only work on loaded blocks that's quite a limitation |
23:58 |
sapier |
doesn't work |
23:58 |
sapier |
pathfinding finds ways in world not in graphs |
23:59 |
RealBadAngel |
ofc it works only on loaded ones |
23:59 |
RealBadAngel |
way is a graph |
23:59 |
sapier |
not exactly |
23:59 |
sapier |
world is a special case |