Andromeda - a galaxy extension

gex

New Member
Reaction score
6
quicko safety rant
I personally don't like all that extra safety. I say only have safety in debug mode complete with error messages. If code is coded right, safety isn't needed. Only need safety when you are dealing with player input (text commands and what not).


Safety is just extra fluff that provides false positives.
end quicko safety rant
Do you work as software developer in a company? I guess not ;). (Also I don't but I made some internships): If you talk like that in a company you're fired immediately I guess ;).
Code is always wrong at first. There is no genius that codes bugless code. Thus safety just speeds up the production of really bugless code since you can make less and only less serious bugs.
You even do not need a typed language with this logic. Datatypes are just there to protect you from errors :D. So back to assembler ;).

But enough of that, I know what you wanna say. And also I sometimes wanna do such hacks :). I wish we still had pointers...

Your example does not work. Neither the first, nor the second. Since ++ uses java / C semantics. And those semantics say that the operand must be a correct LValue. Method invocations are no correct LValues, so you should get an error here.

Other questions about how you intend to finish inline that I can ask later relate to when it copies variables into other variables and when it doesn't. For example, it should only have to copy a variable if it does a write to that variable somewhere in the inlined method. Variables that are only read should not need to be copied ; ).
Be sure, my inlining will be that clever :).

foreach syntax:
for (type var: col)
This one. As it is java syntax.

I am not quite sure how it will work. Probably with an Iterator. Your datastructure must provide a getIterator() method that returns and properly initializes an iterator (here, it should be set on your "first" element). The iterator has then the next and hasNext methods. The iterator will be deleted after the loop has finished.
 

Nestharus

o-o
Reaction score
84
I added some other questions

Your example does not work. Neither the first, nor the second. Since ++ uses java / C semantics. And those semantics say that the operand must be a correct LValue. Method invocations are no correct LValues, so you should get an error here.

?? Don't know what you are talking about here ; P.

Code is always wrong at first. There is no genius that codes bugless code. Thus safety just speeds up the production of really bugless code since you can make less and only less serious bugs.

Let me remind you that a programming language is not equal to coding in that language.
 

gex

New Member
Reaction score
6
Now about some very useful vJASS features that might also be useful in Andromeda-
Will there be a thistype keyword ever? I know it's not in Java or really any language, but it was always very useful. You could just do this for constructors and what not

thistype() { }
~thistype() { }


Will you be able to declare a thistype this like in vJASS?
Will you be able to write to the this var? (I know it's normally readonly)

No such keyword is planned at the moment. Without vjass's macros it wasn't too useful. This is why it is not really in any other language.

Writing to the this var: No, impossible and also useless. It is just a normal local variable. There is no useful scenario where you had to write to it, just use another local.

For specifically inline methods and global args (if Galaxy doesn't get pointers back), will you allow refs and outs?
If Galaxy never gets function pointers, will you add vJASS style delegate fields as well as delegate properties? This would allow for multi inheritance and easy linking of classes.
operator overloading (+, -, /, *, ++, --, >, <, <=, >=, ==, [], [,], etc etc)
array properties?

As you can see, I'm very curious as to the specifics of your language from features I don't see listed or planned to what kind of code is actually generated and what would happen in specific situations ; D.
If pointers get back, outs and refs will be no problem. Without, they won't get in (Damn you blizzard!).
Delegates won't be in. At least not for a very long time.
Same goes with operator overloading, despite the [] operator, since I will support array accessor methods that can use it. So you can make a class that can be used like an array.


@production safety:
If I allow to make own allocations it will reduce safety, in debug as in non-debug mode. Disallowing them would increase safety. That was all what I wanted to tell.
 

Nestharus

o-o
Reaction score
84
array property? (something I've needed countless times)

Code:
int hi[int index, int index2] //n dimension array
{
    get { }
    set { }
}


and
Let me remind you that a programming language is not equal to coding in that language.

I always figured the safety of a product was always up to the user, not the tool ; D. If the tool provides it, I've always seen it as optional (maybe debug mode vs production or maybe some flag).
 

gex

New Member
Reaction score
6
well that is something like an array accessor. So probably yes, for nice syntax reasons. But it is not necessary. Just a get and set method do the same.
 

Nestharus

o-o
Reaction score
84
well that is something like an array accessor. So probably yes, for nice syntax reasons. But it is not necessary. Just a get and set method do the same.

In that regard, all properties are just pretty syntax and not needed ; P, so I think you should 100% add it (not just a probably) regardless : D.


and again

I always figured the safety of a product was always up to the user, not the tool ; D. If the tool provides it, I've always seen it as optional (maybe debug mode vs production or maybe some flag).


was nice talking to you, but I need to get some sleep : D.
 

SerraAvenger

Cuz I can
Reaction score
234
In big projects with many people involved

Like SC2 maps?

As a matter of fact, I guess Java is so popular because... Well, it's taught everywhere. It's (relatively) fast. It has huge libraries backing it up. It has a wide variety of possible applications.
And last but not least, it's just an Island.

I personally am more on the golang and ruby side = )

Oh and I don't believe Java guarantees bugfree code or even just less serious bugs. I believe, however, that it gives away a lot of power.
Possibly the number of serious bugs will reduce for newby programmers doing non-newby stuff. But really... That's not their job.
The question you must ask yourself is whom you want to target.
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
I cant seem to change the code, I found view script but wont let me add the include nothing saves. Can you explain how to do this step more detailed.

Using dedicated files


You can write your code into normal text files. These files need to have the extension .a (for Andromeda). But how to attach those files to a map, so they get compiled with it? Easy:

* Place the files into the same folder where your map is located or into a subfolder.
* You can then include them with a normal galaxy include directive (in andromeda code in your map)
* The include must have the relative path from the map to the file. The extension .a is omitted.



So if you created a script file named foo.a and placed it in the subfolder bar then the correct include is:

1



include "bar/foo"
 

Nestharus

o-o
Reaction score
84
The question you must ask yourself is whom you want to target.

I say target the pros : (, or you make us all sad. Beginners can just use your default stuff without overriding it. Pros can delve in and change w/e.

Do the right thing or I shall cry : (

Also you are only a beginner for so long ^>^


Here's another question to ask yourself-
Basic vs c++

Obviously a bit of an extreme example, but I hope you can understand where I'm coming from.
 

gex

New Member
Reaction score
6
lets stop the java discussion here. I think everyone, including me sees the pros AND cons of a restrictive language.

Andromeda will copy the syntax from JAVA, but this doesn't mean it will be as restrictive as java, since I myself also sometimes want full control over something. So believe me, I will give you (sooner or later) all control that is somehow useful.
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
A Demo Map Of a Hello World Would be Helpful.

What I have Done
1. Get Starcraft 2
2. Download Andromeda
3. Get Java
4. Get NotePad++ (Optional)
5. Get Extension for NotePad++(Optional)
6. Found A Demo Map That allows you to use custom script and save it. (Element of Water Made)
8. Create a .a Type File and Add to Map. (Thats The file attached)

Where I Was Stuck
Its Not 3.1 Or 3.2 Its 3.1 Or 3.1 + 3.2 to get 3.2 to work. In The Tutorial

Where I Am Stuck
Geting Any functions to run in the custom script section, Like say "Hello World".
 

Attachments

  • Galaxy Demo.zip
    10 KB · Views: 295

Nestharus

o-o
Reaction score
84
Will you be able to disable new/delete entirely as well as allocate/deallocate for a class?

Sometimes there is absolutely no need for those ; D.


I assume that they are automatically defined for classes if there are no constructors/destructors in it, so a user would have to make them private or w/e, which is a waste ; ).

Eh... maybe structs should just be bare bones where people can code from scratch so other people can use andromeda syntax and classes should have all the extra cool andromeda stuff. I mean like structs can have the features of classes, but nothing is auto implemented and it all has to be done from scratch o-o. Like struct extends array vs struct in vJASS.

Just a thought ; D.
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
I Figured It out.

It wont let me, run it after the test, It says sc2Folder is not setup in the config.

Shouldn't it be something like this. It doesn't like it.
sc2Folder=C:/Program Files (x86)/StarCraft II Beta
 

SerraAvenger

Cuz I can
Reaction score
234
gex, may I see your grammar? Guess it's JavaCC
Currently working on a galaxy -> GUI compiler based on yacc. Have a first grammar done, but didn't try it out yet. I did it in 30 minutes so I think I did something wrong somewhere^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top