AI 2008 Work Log

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: AI 2008 Work Log

#11 Post by kLabMouse »

[quote="Technology"][/quote]
Fixed.
Operator Overloading -- Still Fixing.
Utils::Set -- A little bit rewritten. I've got rid of "$self->{keys}" because such indexing is no good for shared environment
Utils::CallbackList -- Fixed annoying bug in "remove" function.

Going to Fix Mess that You made to AI.

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: AI 2008 Work Log

#12 Post by Technology »

kLabMouse wrote:Going to Fix Mess that You made to AI.
You mean the workaround for the operator overloading bug?

Code: Select all

for (my $i = 0; $i < $activeTasks->size(); $i++) {
my $task = $activeTasks->get($i);
instead of

Code: Select all

foreach my $task (@{$activeTasks}) {
Thats just temporary untill the operator overloading gets fixed.
That workaround allowed me to see the more crucial bugs like: splice shared array, Set::has, ...
It works as is, but is highly likely to change in the future, just like our shared_splice, your Set::find and heck even threading in perl.

Or do you mean the: add to class::add 's
Isn't that obligatory when we have: Set::add, AI::TaskManager::add, CallbackList::add?
(same goes for: remove)
Even if its not obligatory (how is it not?), it still improves readability of the code.

EDIT: ok, now i see why, we'll revert the 2nd back. Also the 1rst when operator overloading is functional.
(do we actually need operator overloading for this? With the hash removed, we could make a normal array of it)
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

kali
OpenKore Monk
OpenKore Monk
Posts: 457
Joined: 04 Apr 2008, 10:10

Re: AI 2008 Work Log

#13 Post by kali »

Tech, the "canonical" workflow for what you've encountered is to branch off a copy of klab's repository and commit there your proposed fixes. Then, once you've narrowed down the exact problems, you can either post a patch against klab's repository or merge your branch with his.

It's even encouraged to create branches in the repository, so you can even have your own branch for testing out stuff.
Got your topic trashed by a mod?

Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.

Have a nice day.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: AI 2008 Work Log

#14 Post by kLabMouse »

kali wrote:Tech, the "canonical" workflow for what you've encountered is to branch off a copy of klab's repository and commit there your proposed fixes. Then, once you've narrowed down the exact problems, you can either post a patch against klab's repository or merge your branch with his.

It's even encouraged to create branches in the repository, so you can even have your own branch for testing out stuff.
Do we need more branches??? I think not.
Anyway, using Something::* for blessed ref's and hashes is no good (Yep, I know, it's easy for reading, but that will ignore perl OO).

kali
OpenKore Monk
OpenKore Monk
Posts: 457
Joined: 04 Apr 2008, 10:10

Re: AI 2008 Work Log

#15 Post by kali »

Well, since we are working on different portions of the project, branches are necessary.

In fact, the Linux kernel uses Git as their source code manager, where branching is the norm (each developer has two or three branches of the main tree). It's definitely a revolution in workflow. We're not required to use such a workflow though, but sometimes some work lends itself naturally to such branching (like just what happened). It prevents rollbacks and developer biting, since devs can just cherry pick changesets from other branches. Other devs can simply track the main branch and branch off when they want to try something, then submit a patch or merge once the experimental branch is stable.
Got your topic trashed by a mod?

Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.

Have a nice day.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: AI 2008 Work Log

#16 Post by kLabMouse »

kali wrote:Well, since we are working on different portions of the project, branches are necessary.

In fact, the Linux kernel uses Git as their source code manager, where branching is the norm (each developer has two or three branches of the main tree). It's definitely a revolution in workflow. We're not required to use such a workflow though, but sometimes some work lends itself naturally to such branching (like just what happened). It prevents rollbacks and developer biting, since devs can just cherry pick changesets from other branches. Other devs can simply track the main branch and branch off when they want to try something, then submit a patch or merge once the experimental branch is stable.
Still don't think that it's needed. "AI 2008" is not stable, and not even fully functional.
That bug happened because of miss understandings, that happen from time to time.
I think that it won't happen next time.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: AI 2008 Work Log

#17 Post by kLabMouse »

Added Test::Deep to deeply compare structures.
Fixed Overloading.
Fixed AI Core modules to be Thread::Safe.
Fixed OO in AI Core modules.

Later:
Updated/Fixed all AI and it's packages to fully support Multi Threading.
Added "exit" command as alias to "quit".

Next Day:
Deleted Test::Deep
Added Added Utils::Compare
Updated Utils::Set to use Utils::Compare

TODO:
We still have problems with "Tasks", when you set their "Mutex" TaskManager won't work correctly.
Can be fixed this way:

Code: Select all

	if (is_shared($self)) {
		assert(is_shared($activeMutexes->{$mutex}) == is_shared($task)); # TODO!
	} else {
			assert($activeMutexes->{$mutex} == $task); # TODO!
	}
But, that will just fix one bug.
if you do:
ai on; wait 10; wait 1;
error will rise in TaskManager in block "Interrupt newly deactivated tasks".

Second bug is inside "AI::Task::Wait", that task won't end.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: AI 2008 Work Log

#18 Post by kLabMouse »

Yey. Fixed TaskManager, now it's fully functional.

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: AI 2008 Work Log

#19 Post by Technology »

One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: AI 2008 Work Log

#20 Post by kLabMouse »

Technology wrote:FLD2 is now in AI 2008
http://www.openkore.com/wiki/index.php/ ... ile_format
WoW!
Is Pathfinding Fixed???

Locked