Author Topic: General Programming Megathread - New OP  (Read 30227 times)

this
none I used a bitmap
im assuming since you asked about PyOpenGL a bit ago
pyopengl?

im assuming since you asked about PyOpenGL a bit ago
pyopengl?
yes

Just fixed the <random></random> tag in ProgramR.

It was really weird. There was just an extra number they added for some reason but it stopped one of their methods from working correctly.

I've already fixed the way AIMLs are processed and I've converted all the static "requires" and file opens to relative paths so it's not a ruby-gem anymore. testing the <learn> tag is going to be a nightmare.

forget, conditions seem broken. This will take time.
« Last Edit: November 11, 2012, 11:06:26 AM by aludane »


regarding that debate nullable and I had a while ago over map() being in lua, i wanted to do a test to see if a mapping function would be faster or slower than using pairs().

i personally prefer, in terms of writing scripts, to use pairs() over a mapping function, but it could be useful if I had some functions defined beforehand to use with map(). i tested using map() with anonymous functions, and defined functions, vs. pairs().

this script creates a table with 10,000 numbers in it, and each function would write all of the numbers, one after another, on one line, with a space in between each number.

http://pastebin.com/EdmbJ5NP

it seems as though pairs pulled through more than map() did in terms of speed. in situations where you don't have tables as large as this one, speed might not matter, but if you were, say, creating a game where every frame in the game had to update as fast as possible, it's important in order to achieve the highest framerate.

regarding that debate nullable and I had a while ago over map() being in lua, i wanted to do a test to see if a mapping function would be faster or slower than using pairs().

i personally prefer, in terms of writing scripts, to use pairs() over a mapping function, but it could be useful if I had some functions defined beforehand to use with map(). i tested using map() with anonymous functions, and defined functions, vs. pairs().

this script creates a table with 10,000 numbers in it, and each function would write all of the numbers, one after another, on one line, with a space in between each number.

http://pastebin.com/EdmbJ5NP

it seems as though pairs pulled through more than map() did in terms of speed. in situations where you don't have tables as large as this one, speed might not matter, but if you were, say, creating a game where every frame in the game had to update as fast as possible, it's important in order to achieve the highest framerate.
Yeah, a script-defined function is always going to be slower than a native function.

it depends on how the native function is defined. either way, it still really wouldn't make a difference, because it's the same logic as, instead of doing this:

for i,v in pairs(sometable) do
  -- do stuff with this table
end

you're doing this:

local function afunction(sometableelement)
  -- do stuff with this element
end

for _, sometableelement in pairs(sometable) do
  afunction(sometableelement)
end
« Last Edit: November 11, 2012, 11:54:03 AM by Kingdaro »


what's an octree
A data container. I don't really see a need for it but he's excited to prove his adeptivity with them.

I'd make it not render faces that touch other faces

I'd make it not render faces that touch other faces
Then that's occlusion not an octree.

Then that's occlusion not an octree.
i'd use an octree to store the positions and occlude based on that


While you're at it, you could combine faces so that instead of having a face per block on the top they all combine to make 1 face properly sized to cover it all.

While you're at it, you could combine faces so that instead of having a face per block on the top they all combine to make 1 face properly sized to cover it all.
How?