1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[JASS] New Language - Discussion

Discussion in 'Triggers & Scripts' started by thelifelessone, Feb 11, 2010.

  1. thelifelessone

    thelifelessone

    Joined:
    Feb 7, 2009
    Messages:
    369
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Because I thought some of you here might care, here's what I said in a topic on The Helper:

    In another thread, someone commented about having someone else work on vJASS (at least that's what I think he implied), so I replied that I had been planning to make a language built specifically as a "holy crap, I'm bored so I'm making this" kind of project.

    But for an hour or so, I started thinking.
    We could really, REALLY use a new language. cJASS is broken last I heard, and it seems vJASS has a lot of bugs (I don't pay attention to this stuff unless it directly affects me, so meh. :/ ), and each are developed by a single person.

    I personally believe this is very inefficent, and by making a new language, with a team of people working on it, we can create a brand-new language, which has minimal bugs and/or issues, has frequent updates, cross-platform, and has the features people want.

    So I mainly want to ask this: Would you want a brand new language, which has all the features that vJASS currently has (and cJASS, possibly.), built into a fast compiler, which has as few as possible bugs (hopefully, at least.).

    (Now, despite what I had said about having a team work on this, I'd be more than happy develop the language and build the parser myself. I just need input on features.)

    PS: This will be written in C, and will be as cross-platform as possible.
     
  2. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5
    I personally like Zinc. It seems to be bug-free and is designed perfectly in my opinion. I just love the whole C++ feel, but with a difference, so it doesn't just feel like a language copy, like cJass.

    If you just want to do a cool language with no real use, LOLCODE would be great :D.
     
  3. Maximilianx

    Maximilianx

    Joined:
    Oct 14, 2008
    Messages:
    334
    Resources:
    0
    Resources:
    0
    LOLCODE, that's hilarious, "IM IN YR LOOP" "IM OUTTA YR LOOP"
    made me lawl.
     
  4. thelifelessone

    thelifelessone

    Joined:
    Feb 7, 2009
    Messages:
    369
    Resources:
    1
    Tools:
    1
    Resources:
    1
    I'm going to be making my own language. It'll have parts from at least two different languages (C, Python).
    This is also going to be built to be as cross-platform as possible. Meaning no more "I can't use vJASS because I'm on a mac".
     
  5. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    Those are idiots anyway, ignore them. Last i heard, JassHelper runs under WINE, which in turn runs on OSX.

    If youre aiming for cross-platform compatibility, you may want to consider Java.

    Other than that, i dont think WC3 needs yet another language. Feel free to write a clean implementation of vJass and ZINC though.
     
  6. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5
    WINE doesn't run on any pre-2006 mac that uses PowerPC instead of Intel for processing, because it doesn't use the same structure as executable files, so you'd need a complete virtual PC system to run it, which needs a valid copy of Windows. You obviously don't know shit about Macs :p
     
  7. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    Basics:

    Full python indentation. Colon, folloed by a bunch of code one tab inward. Next time it sees a spot not one tab in, it finishes off the block.

    No semicolons at the end of a line. Ever. Hate C++ and that, along with Zinc. Which is why cJass is so much better. Personally, I love C++ except for the damn semicolons.

    An advanced macro system. Something that allows me to precalculate something at compile time, instead of doing it at map load. Example: I use a fully dynamic lighitng system in a map. I need to save a bunch of points of where special effects go as well as those handles. As it is, I create those points at compile time when I check all of the rects I've defined (which are PREDEFINED, hence why it is possible to save at compile time), which is useless when I could compile and figure it out once during map save.

    I don't know how you would implement that feature, but if you could think up something that would let me do that, I would love this language endlessly.

    If possible, full OO on all blizzard things. Groups, forces, units all use functions such as UnitAddAbility(). I want to be able to have a unit variable called "u" and do u.AddAbility. This is the single most important feature I want in anything EVER. Blizzard seems to have used OO extensively when coding, hence the structure of functions such as the abovementioned UnitAddAbility, or ForceAddPlayer. vJass is basically an addition to JASS to make it OO (yeah yeah, theres plenty of other stuff, but what does it for me is structs and such). And despite that, it still doesnt have this feature. What is that?

    Extend on vJass libraries; priority system. Instead of making a basic library that almost every other hunk of code requires in your map use "requires xxx" make it so you can set priority 0 and have it auto be included in all libraries (if your doing a preprocesser, anyways).

    Are you replacing vJass or adding a layer on top of it like cJass? I'd need to do know more before I added on to the list. I assume making your own; smartest move possible.

    If possible, see if you cant salvage some sort of compatibility with vJass so as to avoid people having to do massive code rewrites. In fact, how extensive is this system? No vJass support at all?
     
    Last edited: Feb 11, 2010
  8. Maximilianx

    Maximilianx

    Joined:
    Oct 14, 2008
    Messages:
    334
    Resources:
    0
    Resources:
    0
    erm..
    Code (vJASS):

    struct u
        unit U
       
        method AddAbility takes integer ID returns nothing
            call UnitAddAbility(.U, ID)
        endmethod
       
        static method create takes unit U returns u
            local u Unit = u.allocate()
            set Unit.U = U
            return Unit
        endmethod
    endstruct

    function SomeFunction takes something here returns something there
        local u a = u.create(GetTriggerUnit())
        call a.AddAbility('aloc')
    endfunction
     



    meh?
     
  9. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    I dont want to manually code a huge library nor do I want custom variable names, I'd like to use the variable type "unit" specifically. I'd also like to be able to use this unit variable and have it auto use the unit value insidie of it, something not possible with vJass, where you have to use u.Unit or something stupid. I also dislike vJass struct allocation and in your case I would have to create a unit in the creation parameters. Something with useless writing.

    Its not that you can't do it currently with vJass, it's that the syntax is horribad and it would require a huge library.

    Also? If you make a struct equivilent, call them classes (for the love of god) please. >.>
     
  10. overload119

    overload119

    Joined:
    May 28, 2007
    Messages:
    362
    Resources:
    3
    Skins:
    1
    Tools:
    1
    Maps:
    1
    Resources:
    3
    Stupid project.

    If you want to do something that people will actually use, create a new Trigger Editor hack, similar to TESH but with features that something like Visual Studio has.

    Honestly, ZINC is the closest thing to a "simple, easy to write" language that JASS will ever come to.
     
  11. thelifelessone

    thelifelessone

    Joined:
    Feb 7, 2009
    Messages:
    369
    Resources:
    1
    Tools:
    1
    Resources:
    1
    > you may want to consider Java.

    I severely dislike Java.

    > JassHelper runs under WINE

    Mine will run natively.

    > Colon

    Eww.

    > Full python indentation.

    Maybe, depending on how hard it is to implement it.

    > No semicolons at the end of a line

    That all really depends on the features added. In some cases, it may be needed to properly parse.

    > An advanced macro system.

    I'll need an extremely detailed explanation on that. Either PM it to me, or send it to thelifelessone@gamercraft.org

    > If possible, full OO on all blizzard things.

    Again, I'll need a lot of details.

    > priority system

    I've been planning on that. Glad to hear someone else wants it too. :p

    > Are you replacing vJass

    Replacing. I'm going to ask them to add keywords though, which will make the compilers ignore eachother, so you can use all the languages.

    > If possible, see if you cant salvage some sort of compatibility with vJass

    I'm going to implement structs, a library implementation (though I'm not going to use that name), freeform globals, storage enhancers, and a lot of other things.
    Some of them are going to be under different names, and possibly with different syntax.

    > I dont want to manually code a huge library nor do I want custom variable names,

    Explain?

    > Also? If you make a struct equivilent, call them classes (for the love of god) please. >.>

    I'm thinking of adding classes as "hash structs", which uses a global hashtable to store the information.

    > Stupid project.

    Nou. Your opinion.

    > Honestly, ZINC is the closest thing to a "simple, easy to write" language that JASS will ever come to.

    Zinc is terrible.



    ALSO, remember these two things: 1) I'm still in the early development stages of this. I quite literally started this today, but I plan on seeing it through, and 2) Not all the features everyone wants are going to be implemented, and a lot of the features I plan on may not be possible, so just remember that.

    Update:

    I'm going to be creating a parser which will actually read a special XML file (it's XML, but... confusing), and output based on the content of the file.

    Meaning this'll work on SC2, translating into galaxy.
     
    Last edited: Feb 12, 2010
  12. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    OO as related to Blizzard variables: if in any code I declare a unit variable, I want to be able to use any blizzard function relating to it as if it were a struct.

    unit u
    u.SetOwner(p, true) //As opposed to SetUnitOwner(u, p, true)
    u.AddAbility('A000') //As opposed to UnitAddAbility(u, 'A000')

    Python syntax is not horribly hard to add, I did it myself in python for my own preprocessor. Just check the number of indents or spaces in each line and keep a vector of all the line endings you need to search through, loop through them (or find some sort of more optimal way) every line and add an end block if you find that one of the line endings you are searching for has more spaces than your line currently has. But anyways, I just personally like how it forces good indentation and allows you to write code that much quicker.

    "I dont want to manually code a huge library nor do I want custom variable names," was referring to another post made whereupon another poster mentioned OO blizzard types were doable in vJass. I made several arguments against that.

    The macro system was not really fully formed in my mind, I've just always wanted some way to optimize things that wont change and just add to map loading time, ie recalculating points for a lighting system every time the map loads when the compiler could precompile that.

    As for the implementation.. I dont have details. I was wondering if you had any ideas frankly. I would want some sort of script interface which is able to access any predefined rects and such already in the map, which can then act on this information and output lines of code into the map. It would likely be a ridiculous amount of work; I advise avoiding it unless you have an easy way to do it. (cJass actually did something like this with LUA as far as I know, but I completely forgot about it until now >.> I'll take a look at that.)

    And I'm with you on ZINC. I almost find myself liking its function syntax with the -> representing a return. I hate that syntax, but find -> to be incredibly logical and a good choice for a return value. But yeah, the ; line endings just make me want to scream HAET.
     
  13. thelifelessone

    thelifelessone

    Joined:
    Feb 7, 2009
    Messages:
    369
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Yeah, I'll definately look into the OO thing.

    Also, I'm not sure I mentioned a few things:
    First, this will be fully open-source.
    Second, it'll be written in C.
    And finally, I'd like to be able to make this a team project, instead of depending on one person to do all the work (vJASS and cJASS are developed by a single person). So if you know C, and want to help, lemme know (this will also greatly improve chances of bugs being fixed, and new features added.).
     
  14. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    I am aware of that, but those users affected by this limitation are a marginally small group. Most Mac users today have an Intel Mac. Those Mac users are out of luck, really. Then again, this program might not be portable to PPC Macs as well (since the CPU architecture is different AFAIK).

    And thats supposed to be better? I dont exactly care if it runs in a VM or natively. Compile times wont exceed 30 seconds in most maps either way.

    Replace every semicolon with "\n" and you wont ever need semicolons as part of the syntax again. I hate those semicolons as well, and i hate Java for those stupid things.
     
  15. ShadowFlare

    ShadowFlare

    Joined:
    Jun 30, 2008
    Messages:
    552
    Resources:
    0
    Resources:
    0
    Just a suggestion
    right now loops are called like:

    Code (vJASS):
    loop
        exitwhen i > #
        set i = i+1
    endloop


    I would love to see when you initialize a loop, it creates a variable, and then auto set the variable +1 every time it loops, Like:

    Code (vJASS):
    loop 15
    endloop
     

    So it will stop when the variable gets to 15, starting from 0.
     
  16. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5
    I'd love to help, but I don't exactly know C, just C++, so I'm not really clear on what you can and can't do in C. Maybe it could be done in C++?
     
  17. thelifelessone

    thelifelessone

    Joined:
    Feb 7, 2009
    Messages:
    369
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Hmm... C and C++ and very alike, though C is generally easier since it's not OO.

    I'll read up on C++, and see if I can learn it.
     
  18. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5
    Basically, any C code will compile correctly as C++, but in C++ there are more, object-orientated, features.
    So yeah, I do know how to code C, but I don't know which C++ features will also work in C.
     
  19. GodlikeGER

    GodlikeGER

    Joined:
    Jul 16, 2008
    Messages:
    2
    Resources:
    0
    Resources:
    0
  20. Cyclotrutan

    Cyclotrutan

    Joined:
    Dec 13, 2009
    Messages:
    176
    Resources:
    2
    Maps:
    2
    Resources:
    2
    will the name be JAJASSS?
    = Just Another JASS Syntax
    = Just Another Just Another Scripting Syntax Syntax