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 > - Submit a resource -
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 12-11-2011, 04:10 PM   #1
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default jasshelper 2012-01-14

Latest jasshelper: 2012-01-14

This is the thread for new jasshelper versions.
I have taken over development since Vex has ridden into the sunset.

New versions are intended to be absolutely backwards compatible with JassHelper 0.A.2.B
(I made very good automatic tests so this is all but guarantied)

I did a lot of code refactoring and comment writing.
Than I added better loops

Collapse JASS:
// while unit has some buff do some healing
while GetUnitAbilityLevel(whichUnit, 'Bhea') > 0
    call SetWidgetLife(whichUnit, GetWidgetLife(whichUnit) + 10.)
    call TriggerSleepAction(0.1)
endwhile

// print out numbers from 1 to 10 with for loop
for i = 1 to 10
    call BJDebugMsg(I2S(i))
endfor

// print only 1 2 3
for i = 1 to 10
    call BJDebugMsg(I2S(i))
    if i == 3 then
        break
    endif
endfor

// print out numbers from 10 downto 1
for i = 10 downto 1
    call BJDebugMsg(I2S(i))
endfor

// kill all units in a group
for enumUnit in someGroup
    call KillUnit(enumUnit)
endfor
// WARNING: groups are empty after for loop

Changelog:
Quote:
//=====================================
// 2012-01-14
//=====================================
* fixed a bug that prevented new loops to be used with function interfaces

//=====================================
// 2012-01-07
//=====================================
* removed WEWarlock support (outdated)
* more speed improvements
* added full display of external tool calls (ObjectMerger)

//=====================================
// 2012-01-06
//=====================================
* removed FILEPP preprocessor (not enough public support for it)
* done some optimizations, jasshelper is now about 3x faster
* progress bar now shows global progres

//=====================================
// 2011-12-25
//=====================================
* included #bigdef and #foreach modules with FILEPP

//=====================================
// 2011-12-24
//=====================================
* added FILEPP preprocessor (executes before everything else in the map script)
* optimized for group loop as suggested by Troll-Brain.

//=====================================
// 2011-12-19
//=====================================
* added 3 for loops
* added while loop
* added break
Check out this section in jasshelpermanual:
Better looping: for, while, break

//=====================================
// 2011-12-17
//=====================================
* jasshelper now displays full textual progress when used from WE.
* jasshelper will now warn you to reopen your map if you used //! external command
Attached Images
File Type: png JHProgress.png (40.6 KB, 65 views)
Attached Files
File Type: 7z jasshelper 2012-01-14.7z (1.17 MB, 40 views)

Last edited by cohadar : 01-14-2012 at 06:30 AM.
cohadar is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 12-14-2011, 10:10 AM   #2
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 161

Barade is on a distinguished road (14)

Default

Hey,
it would be great if you're going to continue development of the JassHelper although a complete rewrite would be better in the end.
Is there any special reason why GOLD parser/JassHelper can show one single error only which is one of the most annoying things since you have to reparse everything over and over again until it becomes clear JASS code.
Another question, especially important for myself: Is it possible to compile this on GNU/Linux (maybe using wine)?

I've already read that you're going to add for loops. As many vJass users I have a small list of things which could be improved, so if this thread becomes the new JassHelper thread I could post it here but only if you're interested.
__________________
Barade is offline   Reply With Quote
Old 12-14-2011, 10:27 AM   #3
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

I am doing a complete refactoring. (breaking down vexorians 13000 lines one-file-monster into multiple files)

Jasshelper is not a real compiler, that is it does not use GOLD in the way it should.
(it parses code only line-by-line)

It is possible to compile this under linux, vexorian is on linux.

Post any ideas you have, ideas are always welcome.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 12-14-2011, 05:08 PM   #4
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 161

Barade is on a distinguished road (14)

Default

Alright, so are you going to change to use of GOLD that it could show more then one line error or would this be a huge amount of work? I am sorry that I can't help without learning Pascal etc.
The thing about Windows is that I really never compiled any Pascal written program and I only know the gpc but it shouldn't make any difference for now since I couldn't contribute anyway.

So here are some things which would great to see in vJass:
  • add keyword "protected"
  • size-specified structures should be able to extend interfaces
  • size-specified structures should be able to extend structures with the same or a bigger size
  • one struct should be able tot extend multiple interfaces
  • constants should be usable as sizes of array struct members (maybe this doesn't work for constants from "common.j" and "Blizzard.j" only)
  • "static if" should be considered by "//! import" statements or something similar like "//! if" should be added
  • private destructors aren't private actually (useful for static structs)
  • you can not define the size of an array struct (struct bla extends array[10])
  • add better scoping rules (maybe nested libraries)
  • drop "optional" stuff and get everything done by static ifs (maybe add something like .exists() for libraries, as well)
  • text macro runs inside text macros would be great
  • maybe add stronger type casting rules for integers to structs (a JassHelper option for requiring explicit casts would be nice)
  • report errors on using TriggerSleepAction on evaluated functions (conditions as well): this helps users which do not use option [forcemethodevaluate]
  • report errors on adding functions using TriggerAddAction which are declared afterwards in code (not sure if this bug is still present)

Additionally, I have stored most links of my bug reports/feature requests (it's mostly the same like above):
http://www.wc3c.net/showpost.php?p=1...postcount=3566
http://www.wc3c.net/showpost.php?p=1...postcount=3556
http://www.wc3c.net/showpost.php?p=1...postcount=3220
http://www.wc3c.net/showpost.php?p=1...postcount=3084
http://www.wc3c.net/showpost.php?p=1...postcount=2036
http://www.wc3c.net/showpost.php?p=1...postcount=3090
http://www.wc3c.net/showpost.php?p=1...postcount=3511
http://www.wc3c.net/showpost.php?p=1...postcount=3152
http://www.wc3c.net/showpost.php?p=1...postcount=3144
http://www.wc3c.net/showpost.php?p=1...postcount=3147
http://www.wc3c.net/showpost.php?p=1...postcount=3107
http://www.wc3c.net/showpost.php?p=1...postcount=3119
http://www.wc3c.net/showpost.php?p=1...postcount=3630
http://www.wc3c.net/showpost.php?p=1...postcount=3632

Btw. I don't care about Zinc, too. Once I wanted to move to Zinc and had to revert it since Zinc support was very bugged at that time.
It would be great even if you would only support one single item of my huge list since I do still maintain my custom vJass script collection.
__________________
Barade is offline   Reply With Quote
Old 12-14-2011, 06:31 PM   #5
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

I will not do any of the stuff you mentioned.
Before you get disappointed let me explain.

Vexorian made a huge mistake when he tried to make vjass into object oriented language.
jass is a functional language and map scripting is a functional job in nature.

Object paradigm is not inherently better than functional paradigm,
and half-ass object paradigm is simply idiotic.

Ok so why Vexorian did it?
Because he was programming jasshelper in object pascal and he got under the influence of that language.
Literally 80% of junk in jasshelper are language constructs from pascal.

This was really unfortunate because functional paradigm is a lot more suited to jass,
for example one of the most used and valuable advanced features in jass are function interfaces.

And while Vex was adding unnecessary things like inheritances he neglected basic functional constructs that would be 100 times more useful and 100 times more be actually used by members of community.

Compare next 2 scripts for example:
Collapse JASS:
set i = 1
loop
    exitwhen i > 4
    call DoSomething()
    set i = i + 1
endloop

Collapse JASS:
for i = 1 to 4 do
    call DoSomething()
endfor

Notice how much more simpler, easier to understand and easier to write is the second script. THAT will be a real contribution to the community, and not some obscure inheritance feature that will be used by 1 maybe 2 crazy ass people.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 12-14-2011, 07:43 PM   #6
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 161

Barade is on a distinguished road (14)

Default

That might be true for some small systems and newcomers but when you're at the point where you have to create custom data types with properties you'll need at least structs. Otherwise you have to store everything in arrays or hashtables and you'll get much more errors with those ids/indices.
And if you have structs some people might want to extend their functionality which was almost not possible until Vexorian added the "stub" keyword except you had some interfaces.
I agree with you that Vexorian added many unnecessary things but in my opinion it's not that bad for all people to have some JASS based syntax.
I myself moved from JASS to vJass a long time ago since I needed .evaluate()/.execute() because of the declaration order problem. Before I used vJass I wrote systems using integer based ids for custom types which was really annoying.
The problem about your idea is that some people might use systems which are already written in JASS or vJass, so they will have to understand both. Even if you're just using an API I don't believe that this will really help people. For loops you can create macros in your favorite editor, for instance.
__________________
Barade is offline   Reply With Quote
Old 12-15-2011, 04:40 AM   #7
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

You misunderstand.
structs are functional data types, objects are object data types.
structs are ok, struct interfaces & inheritance is useless.

execute/evaluate are functional paradigm (they execute functions no?)

I have no intention of breaking any backwards compatibility.
I just don't plan on adding any more unnecessarry object stuff.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 12-16-2011, 12:24 PM   #8
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 161

Barade is on a distinguished road (14)

Default

Quote:
Originally Posted by cohadar
You misunderstand.
structs are functional data types, objects are object data types.
structs are ok, struct interfaces & inheritance is useless.

execute/evaluate are functional paradigm (they execute functions no?)

I have no intention of breaking any backwards compatibility.
I just don't plan on adding any more unnecessarry object stuff.
I didn't say that execute/evaluate aren't functional paradigm. You might be right about structs are functional data types.
Not breaking backwards compatibility is just useless if the language has a clear lack of features which prevents people who do OOP from using the language.
__________________
Barade is offline   Reply With Quote
Old 12-16-2011, 12:42 PM   #9
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Yeah, I might be right:
http://en.wikipedia.org/wiki/Struct_...ng_language%29

Not breaking backwards compatibility is ALWAYS GOOD.

No one ever did any OOP in vjass because vjass has no OOP.
For OOP you need this:
http://en.wikipedia.org/wiki/Polymor...ed_programming

Anyways I broke jasshelper down into parts:
  • Preprocessor - 1646
  • Structs - 5003
  • ReturnFix - 375
  • ShadowHelper - 339
  • Inliner - 883

Now I need to break preprocessor into: //! textmacros, //! imports, libraries and scopes

Structs unit also needs to be broken but I have no idea into how many pieces, all I know is that it actually has a function with 2287 lines of code
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.

Last edited by cohadar : 12-16-2011 at 12:43 PM.
cohadar is offline   Reply With Quote
Old 12-16-2011, 06:47 PM   #10
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

I attached new version if anyone is interested, still only refactoring.
(Well I did add much better console reports, )

Collapse JASS:
==================================================
== input\4vsUndead.j
==================================================


common.j
  Opening: OK
  Loading: ...................OK
  Parsing: ...................OK

Blizzard.j
  Opening: OK
  Loading: ...................OK
  Parsing: ...................OK

PREPROCESSOR:
  Loading: OK
  Importing: ...................OK
  TextMacros Loading: ...................OK
  Textmacros Parsing: ...................OK
  Textmacros Writing: ...................OK
  Zinc: ...................OK
  Libraries Parsing: ...................OK
  Libraries Writing: ..................OK
  Time: 141

STRUCTS:
  Loading: ...................OK
  Modules Parse: ...................OK
  Modules Implement: ...................OK
  Conditional Blocks: ...................OK
  Parsing: ..................OK
  Evaluating: ..................OK
  Writing: ...................OK
  Time: 296

RETURN FIXER:
  Loading: ...................OK
  Processing: ...................OK
  Time: 47

SHADOW HELPER:
  Loading: ...................OK
  Processing: ...................OK
  Time: 31

INLINER:
  Loading: ...................OK
  Processing:...................OK
  Time: 47

ALL OK.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 12-16-2011, 10:19 PM   #11
BBQ
User
 
Join Date: May 2011
Posts: 85

Submissions (2)

BBQ will become famous soon enough (30)BBQ will become famous soon enough (30)

Default

You may want to check cJass out for some features (the project itself is, unfortunately, dead). I personally think that the JASS2 syntax is way too verbose, but I guess that's just me. Well, I don't plan on doing any WC3 project, so you are free to ignore my opinion.
BBQ is offline   Reply With Quote
Old 12-17-2011, 01:11 PM   #12
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

New Version: 2011-12-17

You might actually want to update to this one.
It has much better progress display inside WE.
It also knows to tells you to close & reopen your map if you used ObjectMerger or similar..

(see the picture in first post)
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.

Last edited by cohadar : 12-17-2011 at 01:11 PM.
cohadar is offline   Reply With Quote
Old 12-17-2011, 04:16 PM   #13
Here-b-Trollz
Corkscrew Chainsaw!!!
 
Join Date: Jun 2006
Posts: 711

Here-b-Trollz has a spectacular aura about (149)

Hero Contest #2 - 2nd Place

Default

The green on black progress text is annoying. The background should be fuchsia or melon.
__________________
By reading this signature, you agree that I cannot be held accountable for anything that I might say or do.
Here-b-Trollz is offline   Reply With Quote
Old 12-18-2011, 12:26 AM   #14
Ignitedstar
Moderator
 
Ignitedstar's Avatar


RP Section Moderator
 
Join Date: Jul 2005
Posts: 1,755

Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)Ignitedstar has a spectacular aura about (102)

Send a message via MSN to Ignitedstar Send a message via Yahoo to Ignitedstar
Default

Quote:
Originally Posted by cohadar
Collapse JASS:
set i = 1
loop
    exitwhen i > 4
    call DoSomething()
    set i = i + 1
endloop

Collapse JASS:
for i = 1 to 4 do
    call DoSomething()
endfor
Ever since I started coding in VB Studio, I've been wondering why we don't have the latter.

I'm afraid of updating to this JassHelper simply because I don't want to see my map malfunction... but as you say, it should be completely backwards compatible. If this version of JassHelper goes crazy on me, it should be easy to copy the old JassHelper and use that if I want to, right? So long as the file executables are the same, I think?
__________________
Current Activity: School
Evaluation: I actually logged in?!?!
"If I speak in the tongues of men and of angels, but have not love,
I am only a resounding gong or a clanging cymbal.
If I have the gift of prophecy and can fathom all mysteries and all knowledge,
and if I have a faith that can move mountains, but have not love, I am nothing."

1 Corinthians 13:1-2

Current Works:
None.
Ignitedstar is offline   Reply With Quote
Old 12-18-2011, 01:11 AM   #15
Here-b-Trollz
Corkscrew Chainsaw!!!
 
Join Date: Jun 2006
Posts: 711

Here-b-Trollz has a spectacular aura about (149)

Hero Contest #2 - 2nd Place

Default

Just move the three files you are replacing somewhere else, so you don't overwrite them. If cohadar sucks (I haven't experienced any problems thus far except lame colors and what appears to be a longer compile time) you can just delete his files and move vex's back in.
__________________
By reading this signature, you agree that I cannot be held accountable for anything that I might say or do.
Here-b-Trollz 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 09:23 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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