wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 08-06-2009, 06:01 AM   #16
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,523

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Lists seems fine to me; I can't find anything wrong with it.

Stacks took me a little bit of effort to figure out, but I see you have a sort of pseudo linked-list going on there. The lack of .size doesn't annoy me, as anyone using a stack wouldn't really need to know that anyway.

I approve of this, but someone with more authority correct me if I missed something.
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-08-2009, 12:46 PM   #17
Sinnergy
User
 
Sinnergy's Avatar
 
Join Date: Apr 2009
Posts: 173

Sinnergy has little to show at this moment (8)

Default

this looks simple, but I can't think of something to make use of this? chains?
__________________
Current Project:
Rise of Sinnergy v1.00
Sinnergy is offline   Reply With Quote
Old 08-08-2009, 09:45 PM   #18
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

Any chance we can get a copy method for those stacks and lists? I don't know how much it would be used or if it would conflict with your light-weight design, but I know the functionality is nice sometimes.

EDIT: I've written a version of CustomType using Lists instead of LinkedList. Unfortunately, there is a minor compatibility issue with ABuffAuras; Jasshelper pops the "Identifier redeclared" syntax error for the "list" integer local in the UpdateAll function. I've renamed the local to compensate, but I figured it was worth mentioning.

Oh, and implementing Lists for my script has made it far more readable.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2

Last edited by Archmage Owenalacaster : 08-09-2009 at 02:31 AM.
Archmage Owenalacaster is offline   Reply With Quote
Old 08-10-2009, 05:14 AM   #19
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

That's actually quite a big issue, it seems public structs should all be capitalised to avoid such issues (since local variables never are), of course the name "List" is already taken by the other LinkedList implementation.

Right now I'm considering just droping the list, adding it's functionality to the stack (increasing it's performance in the process, while the performance of stack operations would remain unaffected) and renaming it to "Stack". Anyone using list would just need to rename it to Stack, everything else would remain the same. What do you think?
__________________
Anitarf is offline   Reply With Quote
Old 08-10-2009, 05:39 AM   #20
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

Merging functionality with no loss to performance? Sounds good. Not to mention the merge with Stack would solve the identifier issue.

I'd still like a copy method.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2
Archmage Owenalacaster is offline   Reply With Quote
Old 08-10-2009, 08:37 PM   #21
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Okay, do you mind testing the new object? Here it is:

Edit: Code moved to first post.

By the way, I added a copy method, also I modified the enumerate method so it is safer and renamed it to just enum and I added a boolean argument to it so you can enumerate from top to bottom or from bottom to top, not quite sure which of those two options makes more sense as "true" and which as "false", though.
__________________

Last edited by Anitarf : 08-11-2009 at 01:30 AM.
Anitarf is offline   Reply With Quote
Old 08-10-2009, 10:19 PM   #22
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

Seems to work just fine. All I had to change was struct ctlist extends Stack, replace an enumerate, and run a test. My enum callbacks weren't compromised by the changes and there weren't any bugs.

Thanks for the copy method.

EDIT: By the way, while I like how this doesn't deal with Links as objects (the way LinkedList did), I wonder if you've considered any methods dealing with position (index in the stack)? I expect you could achieve the more powerful functionality of LinkedList without its bulky disadvantages.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2

Last edited by Archmage Owenalacaster : 08-10-2009 at 10:31 PM.
Archmage Owenalacaster is offline   Reply With Quote
Old 08-10-2009, 10:58 PM   #23
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Archmage Owenalacaster
EDIT: By the way, while I like how this doesn't deal with Links as objects (the way LinkedList did), I wonder if you've considered any methods dealing with position (index in the stack)? I expect you could achieve the more powerful functionality of LinkedList without its bulky disadvantages.
No, I consider array-like syntax outside the scope of this library.

Any thoughts on the enum boolean, which direction should be true and which false? Maybe I should just add some constants?

By the way, why are you extending the struct? I don't think you can get any new functionality out of the stack since all the internal indexing is private.
__________________
Anitarf is offline   Reply With Quote
Old 08-11-2009, 12:43 AM   #24
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

I extended the struct partially for that reason. I added wrapper methods for a degree of type safety (whereby it will only accept customtypes as data) and to prevent multiple entries of the same customtype. EDIT: I'm considering using delegate instead.

I think the boolean sorting direction is fine as is. It's arbitrary, but no more so than some static constant integers (like TOP_DOWN & DOWN_TOP), and embraces that the option is binary. As long as it's explained, it shouldn't be a problem and, in many cases where it is implemented as a list, often won't matter.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2

Last edited by Archmage Owenalacaster : 08-11-2009 at 01:06 AM.
Archmage Owenalacaster is offline   Reply With Quote
Old 08-12-2009, 01:34 AM   #25
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

I just noticed Ammorth made a Stack script as well. Of course the stack-methods are identical, since pop, peek and such are features you'd expect of a stack, but the library and the struct identifiers are identical.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2
Archmage Owenalacaster is offline   Reply With Quote
Old 08-12-2009, 03:18 AM   #26
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

yay for standardization
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.
Alevice is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:21 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services