|
Post by warspyking on Dec 15, 2015 21:35:55 GMT
Dang dude, did you test this code? How long does it take for your computer to spit an error out at you? I'm running this on pc and it still takes forever.
|
|
|
Post by Thijs on Dec 15, 2015 21:55:41 GMT
Dang dude, did you test this code? How long does it take for your computer to spit an error out at you? I'm running this on pc and it still takes forever. Uhmmm, idk, not long.. By the way, the constant table overflow showed up when... I created a Lua file containing 1 long table generated by a PHP script which was reading a PNG image.. I used PHP to read the PNG Image and then used Lua to convert it to my ZQL Image.. I'm not sure whether the error occurred due to the long table WRITTEN in script, or just because it's a long table. (If the table is defined by code, or if it's generated by a FOR-loop).. So MAYBE that's the reason we can't reproduce the constant table overflow by generating a table, if it matter if the table is written all at once. if I were Lua, I wouldn't like to read 2.3 million children within a table... Poor Lua.. )
|
|
|
Post by warspyking on Dec 15, 2015 21:59:30 GMT
Dang dude, did you test this code? How long does it take for your computer to spit an error out at you? I'm running this on pc and it still takes forever. Uhmmm, idk, not long.. By the way, the constant table overflow showed up when... I created a Lua file containing 1 long table generated by a PHP script which was reading a PNG image.. I used PHP to read the PNG Image and then used Lua to convert it to my ZQL Image.. I'm not sure whether the error occurred due to the long table WRITTEN in script, or just because it's a long table. (If the table is defined by code, or if it's generated by a FOR-loop).. So MAYBE that's the reason we can't reproduce the constant table overflow by generating a table, if it matter if the table is written all at once. if I were Lua, I wouldn't like to read 2.3 million children within a table... Poor Lua.. ) The thing is, I don't think it's a table limit. And I can't diagnose it because generating a table takes too long.
|
|
|
Post by Thijs on Dec 15, 2015 22:01:38 GMT
Uhmmm, idk, not long.. By the way, the constant table overflow showed up when... I created a Lua file containing 1 long table generated by a PHP script which was reading a PNG image.. I used PHP to read the PNG Image and then used Lua to convert it to my ZQL Image.. I'm not sure whether the error occurred due to the long table WRITTEN in script, or just because it's a long table. (If the table is defined by code, or if it's generated by a FOR-loop).. So MAYBE that's the reason we can't reproduce the constant table overflow by generating a table, if it matter if the table is written all at once. if I were Lua, I wouldn't like to read 2.3 million children within a table... Poor Lua.. ) The thing is, I don't think it's a table limit. And I can't diagnose it because generating a table takes too long. Mm.. :/
|
|
|
Post by lars on Dec 16, 2015 22:55:56 GMT
Why do you use php, and not Lua for reading the image? I think it's mutch easier to use abd understand, when it only uses one programming language. But ik that it costs much time for writing the library to read images :/ But I think this should fix the error (I think Lua gives out an error in because of a too long table syntax). But nice work! And a simple, but effective algorythmus
|
|
|
Post by Thijs on Dec 17, 2015 18:52:12 GMT
Why do you use php, and not Lua for reading the image? I think it's mutch easier to use abd understand, when it only uses one programming language. But ik that it costs much time for writing the library to read images :/ But I think this should fix the error (I think Lua gives out an error in because of a too long table syntax). But nice work! And a simple, but effective algorythmus TX , btw, I can't read PNG Images with Lua, PHP got his own build-in functions for that. A very big library.
|
|
|
Post by warspyking on Dec 17, 2015 19:08:01 GMT
Alright, here are my 2 ideas (but I can't test due to failure to reproduce error):
1. Split the image: This is PROBABLY the best idea. Read different chunks of the image (split it into quarters for example), and manipulate each of them separately.
2. Generate the table in different functions: When you make the table, say for example your code is:
local tab = {}
function N() --Generate the table here end
It's possible doing this can solve the problem:
local tab = {}
function N1() --Generate the first half here end
function N2() --Generate the second half here end
Given you're working with php here, you may want to split up the php to deal with the picture half-by-half, and then use separate functions to grab the return results.
|
|
|
Post by warspyking on Dec 19, 2015 17:03:48 GMT
Did any of them work?
|
|
|
Post by Thijs on Dec 23, 2015 11:18:10 GMT
Alright, here are my 2 ideas (but I can't test due to failure to reproduce error): 1. Split the image: This is PROBABLY the best idea. Read different chunks of the image (split it into quarters for example), and manipulate each of them separately. 2. Generate the table in different functions: When you make the table, say for example your code is: local tab = {}
function N() --Generate the table here end It's possible doing this can solve the problem: local tab = {}
function N1() --Generate the first half here end
function N2() --Generate the second half here end Given you're working with php here, you may want to split up the php to deal with the picture half-by-half, and then use separate functions to grab the return results. I think the length on 1 single table doesn't matter, I think it's about all the data in _G. _G is also a table, try to generate 1 million variables witha for-loop, let's see what happens. So I think storing the data in 2 different tables won't work.. By the way, I think I already tried that once.. Mhmm.. Yea I did..
|
|
|
Post by warspyking on Dec 23, 2015 14:58:30 GMT
Alright, here are my 2 ideas (but I can't test due to failure to reproduce error): 1. Split the image: This is PROBABLY the best idea. Read different chunks of the image (split it into quarters for example), and manipulate each of them separately. 2. Generate the table in different functions: When you make the table, say for example your code is: local tab = {}
function N() --Generate the table here end It's possible doing this can solve the problem: local tab = {}
function N1() --Generate the first half here end
function N2() --Generate the second half here end Given you're working with php here, you may want to split up the php to deal with the picture half-by-half, and then use separate functions to grab the return results. I think the length on 1 single table doesn't matter, I think it's about all the data in _G. _G is also a table, try to generate 1 million variables witha for-loop, let's see what happens. So I think storing the data in 2 different tables won't work.. By the way, I think I already tried that once.. Mhmm.. Yea I did.. I really don't think it's a limit. Have you tried BOTH of the methods I provided?
|
|
|
Post by Thijs on Dec 26, 2015 19:20:57 GMT
I think the length on 1 single table doesn't matter, I think it's about all the data in _G. _G is also a table, try to generate 1 million variables witha for-loop, let's see what happens. So I think storing the data in 2 different tables won't work.. By the way, I think I already tried that once.. Mhmm.. Yea I did.. I really don't think it's a limit. Have you tried BOTH of the methods I provided? I already tried to split data.
|
|
|
Post by warspyking on Dec 26, 2015 19:39:35 GMT
Thijs, would you be willing to help me with a project I'm currently undertaking with TouchLua?
|
|
|
Post by Thijs on Dec 31, 2015 23:34:24 GMT
Thijs, would you be willing to help me with a project I'm currently undertaking with TouchLua? I private messaged on your question, I'll think about it.
|
|
|
Post by Thijs on Jan 3, 2016 9:59:04 GMT
I think the length on 1 single table doesn't matter, I think it's about all the data in _G. _G is also a table, try to generate 1 million variables witha for-loop, let's see what happens. So I think storing the data in 2 different tables won't work.. By the way, I think I already tried that once.. Mhmm.. Yea I did.. I really don't think it's a limit. Have you tried BOTH of the methods I provided? By the way, an important thing: the table wasn't generated by a loop. It was DEFINED by the script, like: Table={["a"]=.5}. Maybe that's called a constant table?
|
|
|
Post by warspyking on Jan 3, 2016 10:56:14 GMT
I really don't think it's a limit. Have you tried BOTH of the methods I provided? By the way, an important thing: the table wasn't generated by a loop. It was DEFINED by the script, like: Table={["a"]=.5}. Maybe that's called a constant table? I honestly think you need to split up the definitions into separate functions. I read something online about it a while back.
|
|