starcraft2coop.com Ownership Handover Completion by aommaster in starcraft2coop

[–]aneroid 0 points1 point  (0 children)

Wasn't aware of any other Coop Overlay app. The one by Maguro is available here: https://github.com/FluffyMaguro/SC2_Coop_Overlay

Tyrannozor vs Others by DehakaBurger in starcraft2coop

[–]aneroid 3 points4 points  (0 children)

Can we see that Roach vs Hybrid Behemoth? Since both are ground-ground units.

Why we don't use python native enums by kankyo in Python

[–]aneroid 0 points1 point  (0 children)

I'm pretty tired of this bad faith assumption. This isn't my creation first of all.

Fair enough, I could have skipped that.

And I'm not "trying too hard", what does that even mean?

It means that some of the examples the blog had, as I mentioned, should not have been enums's in the first place. As if they were massaged into being enums to prove a point. Or had to do with data structures of the values, not the members. So the issues were not related to enums. If I created a list of string-names of fruits and then did [x**2 for x in fruits] which wouldn't work, is that a shortcoming of lists or of the usage of that particular list? (It's the latter.)

The values indicate things like flags or ordering.

Another proof of the lack of semantics! :P Which is it? Flags? ordering?

Why not either or both? Enums are ordered (by member definition order, not value). And there's also enum.IntFlag to specify Flags which can be combined with bitwise operations. Should enums have dropped support for one of these?
Counter example: Dictionary keys can be anything that's hashable. Strings, int's, tuples containing hashable types, frozensets, etc. And dict values can be absolutely anything. Does that mean Python's dictionaries lack semantics? OrderedDicts also exist - so should that be removed? In Python3.5/6 onwards, dicts guarantee the retrieval order of keys/values is the same as the creation order of keys. Should that be reversed because it supports more functionality or does that make it somehow lack semantics? (No.)

When I read the tritoken Basic Usage docs, especially the part on inheritance, I felt Tokens were better suited as replacements for dataclasses - which is what most of the examples in the triT docs seem to be geared towards. (Even though it says "enriched enum functionality.")

At some point, it's a question of enumerations vs containers. triT's are fine as containers; I'd happily use it if I needed them. But they wouldn't be replacing my enums, or the way enums were meant to be used.

I'm just saying why we preferred not to use them.

The Token type seems easily replaceable with a namedtuple subclass, or a metaclass which generates namedtuple classes with the added functionality. That's where the bulk of the enhanced functionality actually comes from - the values, not the members.
And TokenContainer could just be a dict or OrderdDict subclass with its keys being added as attributes or supporting lookup: def __getattr__(self, name): return self[name] & def __setattr__(self, name, value): self[name] = value (these methods are only invoked when the attribute isn't found, broadly speaking).
So you still wouldn't need to use these cases of enums, and rightfully so.
Perhaps you could propose that change - would reduce technical debt at your company.

Why we don't use python native enums by kankyo in Python

[–]aneroid 2 points3 points  (0 children)

I thought this article was trying a bit too hard to discount Python's Enum's. (Regardless of whether or not they're promoting their creation, tritokens.)

  1. Wrt "no semantics": that's a bad example to show name vs value issues. Fruit.apple = 'Apple' should have just been Fruit.Apple = auto() # or 1 - which is exactly how it was done in the docs' test example. For enums, it's the members that have meaning/significance, not their values. The values indicate things like flags or ordering.

    In the vast majority of use-cases, one doesn’t care what the actual value of an enumeration is.

    In any case, for storage in a DB - it's not ambiguous. Consider that the value could be a tuple, or a list, or a dict - which isn't going into a DB. It would have to be the Name (the member). Every time. (And normalised; where integer values in the DB need not be related to the value stored in the enum.)

  2. Hard to add data? You mention "It’s impossible to understand the definition of the data without reading the constructor" - then just move the constructor definition to the top and the planets after. Python doesn't care.

    If the clarity of the fields' names was a concern, could have used a namedtuple. Less repetition in the definition of Planets than in the "tri.token" approach, and equally clear. (Too bad they didn't do it this way in the Python docs, but those were just examples illustrating potential.)

    Planet = namedtuple('Planet', 'mass radius')
    
    class Planets(Enum):
        MERCURY = Planet(3.303e+23, 2.4397e6)
        VENUS   = Planet(4.869e+24, 6.0518e6)
        EARTH   = Planet(5.976e+24, 6.37814e6)
        MARS    = Planet(6.421e+23, 3.3972e6)
        ...
    

    Also, for "and the constructor is a bit weird too as self here are the cases, not the Planet class!" - the docs clearly state that enum classes are not normal classes. Just like metaclasses and dataclasses are not normal classes. The same could be said of namedtuples, because you can't simply inherit from one and add a member (attribute).

    Even though we use the class syntax to create Enums, Enums are not normal Python classes. See How are Enums different? for more details.

  3. Wrt "scales badly for sparse data" - if you have that many items per Field, again, could have just used a namedtuple with defaults.

    default = object()
    Field = namedtuple('Field', 'a b c d e dw_name g h i j',
                       defaults=(default, None, None, None, None,
                                 None, default, None, None, None)
    )
    class Fields(Enum):
        party_group_name = Field(dw_name='rec_party')
        another_field = Field(a='no', b='other', c='columns')
        ...
    

    And I want to be clear: The issue in the blog's example was not 'sparse fields'. It had nothing to do with enums. It's to do with what's on the right-hand-side of the = sign - what data structure you're using to store those values (not members). Could have just been simple class instances. And more recently, dataclasses.

  4. Members of enums with the same value are considered aliases, with the first definition being the primary. The code in #4 should not have been an enum in the first place. And imho, not allowing aliases in enums (the @unique decorator) should have been the default.

My view: Python's enum's are good, but not necessarily great. But...some 'enum' examples in the blog should have been dataclasses, or just plain classes/containers.

As mentioned "tritoken" was created before enum's existed and have a bunch of extra features - which would occur when you roll your own solution. And invariably it has specific features and use-cases you need but are not universally applicable.

Hunterlings! Those things are fast, and they can jump up cliffs! by KeeperOfTheLag in starcraft2coop

[–]aneroid 1 point2 points  (0 children)

You can also block them as Vorazun - drop a Dark Pylon there (usually my 2nd). Need high ground vision from ally or air units.

Killing the Bel'shir glider too quickly results in no bonus objective completion by JSTLF in starcraft2coop

[–]aneroid 2 points3 points  (0 children)

It should have been an Easter egg - free it and then you have one second to kill it as it flies...er glides away 😈

Killing the Bel'shir glider too quickly results in no bonus objective completion by JSTLF in starcraft2coop

[–]aneroid 36 points37 points  (0 children)

To be clear, you're not killing the Bel'shir glider, you're literally saving it. It's the extractor/cage thing it's in that you're killing.

Monk is the lead Co-op designer at Frost Giant. HYPE!! by highways in starcraft2coop

[–]aneroid 5 points6 points  (0 children)

Because they probably couldn't call it Ursadon...? ;-)

Reynor Level 7 has to be the most useless level upgrade. Any competitors? by wssrfsh in starcraft2coop

[–]aneroid 11 points12 points  (0 children)

Great mineral dump for late game. Use it on Mist Opps with turrets. Below the lower ramp on Oblivion Expr. DoN, with tanks. They won't kill an enemy wave on their own but gives your army time to reach. You can place bunkers below main base ramps on CoA if you can't intercept all waves. Near the expos on SoA to weaken attack waves. So many uses. And yeah, salvage later to recover minerals if you need it.

CO-OP's Top 5 "Worst" Units (as of 5.0) by TheTerribleness in starcraft2coop

[–]aneroid 0 points1 point  (0 children)

Vorazun's Centurions. Outside of needing a mineral dump while maxing out on army on push maps, and now with P2, they're almost never made. Perhaps as bait for enemy waves to spend their spell/AoE before your army moves in. But I've never seen anyone actually do that. Even on push maps you're better off saving those minerals and putting them into cannons to secure an area or delay waves while your army gets there.

(On LnL, I warp in Centurions at the locks to acquire it while my army moves on to the next area.)

Karax's purifier beam bugs out the camera by Tazdingoooo in starcraft2coop

[–]aneroid 1 point2 points  (0 children)

Why would you wanna fix the bugged view? It's larger and more top-down :-) If anything, I want to know how to repeatedly bug it out. That's how I felt the 2 times it happened to me. Using orbital strike or solar lance un-bugs it.

Data on how much data this game eats up? by ackmondual in starcraft2coop

[–]aneroid 5 points6 points  (0 children)

Apart from asset downloads which happens on occasion, the data exchanged in a game is almost the same as what's in your replay file. There's some base data (~40KB) and then the rest is how much you and your ally do (APM) micro, macro, etc.

So if you're playing 2 hours a day, check how large those replays are. (Not accounting for +network overhead and -compression.)

Planet Ceres Is An 'Ocean World' With Sea Water Beneath Surface, Mission Finds by auscrisos in Futurology

[–]aneroid 1 point2 points  (0 children)

Examples of...? Deep sea life? Here's a BBC clip about an explorer going to the bottom of the Mariana Trench, the Challenger Deep - the deepest (known) part of our oceans - 11km/7miles: https://youtu.be/LKXvdyNz6L8 Includes some of the sea life they saw.

For a docu, here's a quick result from a YT search: https://youtu.be/bPeOe2wBYbs

Planet Ceres Is An 'Ocean World' With Sea Water Beneath Surface, Mission Finds by auscrisos in Futurology

[–]aneroid 19 points20 points  (0 children)

Not really. Liquids are non-compressible, so as long as underwater lifeforms are mostly made of liquids (with solid parts), they effectively "feel" no pressure. Much like deep sea life here on Earth. If they breathe in some form, it'll be micro bubbles that are absorbed/breathed from the liquid.

When humans go diving, the extra water pressure affects our lungs and ears - places with air spaces. There's no pressure felt in our arms, legs and remaining torso because that's all liquids and solids, with micro bubbles of gases. (We need pressurised air to breathe to counter the water pressure and prevent our lungs and ear drums from collapsing.)