Discussion JassHelper -> some new features?

Bribe

vJass errors are legion
Reaction score
67
1. Could Zinc have "readonly" like vJass? I know it's "nonstandard" but the method operators that must be used instead are hard to view when I'm trying to make a readable library.

2. Can modules be expanded on to force the containing struct to require some methods?

3. Can modules have overridable variables/methods? Using delegate variables is fine unless you have multiple structs delegating them for different purposes.

4. Please make a struct type similar to array structs that it disables the auto-generated allocation, but without the lame inability to extend/be extended.

5. [ljass]if (condition) { u = null ; }[/ljass] please make this stop causing syntax errors in Zinc. It's really hard to visually distinguish one-line "if" statements.

6. Please use the vJass "implement" keyword in Zinc instead of "module;" as the implementation looks really weird o_O

7. Perhaps implement [ljass]default delegate structName[/ljass] so that boring people like me don't have to bang our heads against the wall to come up with some ridiculous name for it that we never use?

Thank you for (however unlikely) reading this.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
I think Vex should fix the bugs on vJass before adding these features, because Zinc will be compiled into vJass first.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I recall him saying that (aside from major (major) bugs) JassHelper wasn't going to be developed anymore.
 

Bribe

vJass errors are legion
Reaction score
67
This game needs some added functionality, else it's going to die hard. The GUI users will switch to SC2 for simplicity, the JASS'ers will feel rejected.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
I recall him saying that (aside from major (major) bugs) JassHelper wasn't going to be developed anymore.
No, Vex said that he will continue it but no more new features will be added.
 

Jesus4Lyf

Good Idea™
Reaction score
397
This game needs some added functionality, else it's going to die hard. The GUI users will switch to SC2 for simplicity, the JASS'ers will feel rejected.
Sorry, doomsday prophet. We've already had many of you tell us WC3 is dieing. No amount of hype about it dying is going to make it last any shorter than the original SC.

More amusingly, most of what you requested already works fine in vJass.
 

Bribe

vJass errors are legion
Reaction score
67
2, 3, 4 and 7 are not supported in vJass, so technically "most" are not implemented. Technically.
 

Jesus4Lyf

Good Idea™
Reaction score
397
2, 3, 4 and 7 are not supported in vJass, so technically "most" are not implemented. Technically.
>Can modules be expanded on to force the containing struct to require some methods?
Yes, just try to call the method from within the struct...

>Can modules have overridable variables/methods? Using delegate variables is fine unless you have multiple structs delegating them for different purposes.
Function interfaces answers for overridable methods, why the hell would you override variables..??

>Please make a struct type similar to array structs that it disables the auto-generated allocation, but without the lame inability to extend/be extended.
This is mildly unfortunate. When I require this, I swallow the fact that it will generate the allocator, which simply doesn't get used. Remember the good news: destroy is overridable. So is create. :) (Good job, Vex.)

>Perhaps implement default delegate structName so that boring people like me don't have to bang our heads against the wall to come up with some ridiculous name for it that we never use?
Lol? Rearrange to delegate structName default. ;)
 

Bribe

vJass errors are legion
Reaction score
67
>Yes, just try to call the method from within the struct...

Sorry, I meant the other way around. Force the struct implementing the module to create a method by a certain name.

>Function interfaces answers for overridable methods, why the hell would you override variables..??
Function interfaces? I'll look into that, thank you :)
Override variables the way I want is actually seemingly impossible as I wanted a static if inside of a module, but modules cannot implement static if's. So forget that part.

>This is mildly unfortunate.
Why compromise when you can fix the problem? The same thing goes with how I've had to use method operators in Zinc instead of readonly, though not as extreme because at least the operators inline.

>Lol? Rearrange to delegate structName default.
And the second delegate would be named, what, default2? What if I have 50 of them, that's just wrong. I suppose I could make yet another compromise. Might as well, because I'd rather take the heat than endlessly wait for someone who doesn't care to start caring.
 

Jesus4Lyf

Good Idea™
Reaction score
397

Bribe

vJass errors are legion
Reaction score
67
OK, I got readonly to work! You just have to create a module outsize of the zinc block with readonly members, and they behave exactly the same way as you'd expect. The rest of these suggestions have pretty much been solved by your guys' helpful replies, so this thread can be closed/ignored. Thank you for your help!
 

Bribe

vJass errors are legion
Reaction score
67
JASS:

struct parent
    readonly unit dude
    method foo takes nothing returns nothing
        call KillUnit(this.dude) // valid.
        set this.dude = null // valid.
    endmethod
endstruct

struct child extends parent
    method foo takes nothing returns nothing
        call KillUnit(this.dude) // valid.
        set this.dude = null // syntax error: <dude> is readonly.
    endmethod
endstruct


Readonly means the variable can be set only by the struct in which it is declared. It gives the child-structs functionality with that variable, but it protects that variable from getting re-assigned.
 

Crazy_Dead

New Member
Reaction score
24
So like a private? :p Dont really get it... :S

Readonly makes this member to be unusable in other structs/functions, even by using [ljass]local data d = data.create()[/ljass] ?? :eek:
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Readonly is read only.
You can get the value but not write it at outside of struct.
You can write/read it in struct only.
The feature is mainly for protecting the variable from being edited.
 

Bribe

vJass errors are legion
Reaction score
67
Yea, but not merely out of struct context; even a struct that extends the struct with that variable will not be able to set that variable.

Private > No access outside of scope.
Readonly > Accessible but not assignable outside of scope. I think this only works for structs.
Public > Complete access outside and inside of scope.
 
General chit-chat
Help Users
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top