WTF Bites


  • Discourse touched me in a no-no place

    @coldandtired Huh? He copied some of the answer but also got no votes for it?



  • @Tsaukpaetra said in WTF Bites:

    @coldandtired how?

    Steal another user's answer from three years' before and pass it off as your own?


  • đźš˝ Regular

    @izzion said in In other news today...:

    <script type="text/javascript">
        // Unused janrain CSS was taking up about 30-40% of CSS processing time.  This gross hack should disable that CSS.
        setTimeout(function () {
            var sheet, i;
            for (i = 0; i < document.styleSheets.length; i++) {
                sheet = document.styleSheets.item(i);
                if (sheet.cssRules && sheet.cssRules[0] && sheet.cssRules[0].href && sheet.cssRules[0].href.indexOf("janrain") >= 0) {
                    sheet.disabled = true;
                }
            }
        }, 5000);
    </script>
    


  • In today's episode of "JQuery All The Things And Turn Your Website Into Slow, Unusable đź’©," my gas bill is due. They just changed their website. I can login fine, but after that I only get a blank white page. A few seconds poking around with developer tools reveals that their main page is almost entirely a blank HTML document and all views get asynchronously loaded via JQuery, but the network requests to fetch JQuery itself are failing with "404 Not Found." :facepalm:


  • Grade A Premium Asshole

    Today I ran in to an issue with Windows Updates on a fresh install of Win7 so I decide to go looking around to see if there is a hotfix or patch available for Windows updates that take forever. Sure enough, there is:

    First :wtf: : This link is to an update, that fixes a prior update that was botched. OK, fair enough, MS does this sort of shit all the time, but this is an update to Windows Update. You really should check this more thoroughly...

    Let's go back to the original and see what it fixes:

    0_1484594099345_upload-2eefa135-206d-4896-b026-5db2f0139e9f >

    An optimization that addresses long scan time for updates that's reported on some computers.

    So how do we get this update you ask?

    0_1484594969558_upload-cc4acc3c-0a0b-46b7-bcca-f571110600de

    I get that this is all boilerplate stuff, but I found it amusing that the recommended way to fix Windows Update issues is with Windows Update. I also realize that it would eventually work. Still a minor :wtf:.


  • Grade A Premium Asshole

    Just to make it more amusing...

    0_1484595645549_upload-3df1ae5a-0cb8-41f3-92f1-97f265cdbb22

    ...been stuck on that for 25 minutes.


  • Discourse touched me in a no-no place

    @Polygeekery There's like 5 ways to fix that, someone on here had that issue recently. Can't remember which topic it was buried in but try disabling Windows Update then running that fix.


  • Grade A Premium Asshole

    Fuck you Microsoft.

    0_1484596173125_upload-b9cebc73-5f6d-40a5-866e-4a6e6d11a477


  • Grade A Premium Asshole

    @loopback0 said in WTF Bites:

    @Polygeekery There's like 5 ways to fix that, someone on here had that issue recently. Can't remember which topic it was buried in but try disabling Windows Update then running that fix.

    Negative. It will not run with Windows Update disabled.


  • Discourse touched me in a no-no place

    @Polygeekery D'oh. I think there's helpful information in the status topic somewhere but NodeBB doesn't seem to have a way of searching within a topic (that I've found) so... *shrug*


  • Discourse touched me in a no-no place

    @Polygeekery Google helped. Some suggestions here, some later on.

    https://what.thedailywtf.com/post/1067906


  • Grade A Premium Asshole

    @loopback0 the second link is the one that I am attempting to install...and it won't install. I will try the first.


  • Grade A Premium Asshole

    ...and the link on the first one to the Win7 x64 version has a broken link. FFS Microsoft.


  • Discourse touched me in a no-no place

    @Polygeekery said in WTF Bites:

    FFS Microsoft.

    MS has never truly understood the importance of keeping links alive for the long term. Not at the organisation level.


  • Grade A Premium Asshole

    @dkf said in WTF Bites:

    MS has never truly understood the importance of keeping links alive for the long term. Not at the organisation level.

    WordPress does a better job of that than MS does. That is horrible.



  • 0_1484619438980_battery.png

    :wtf: was my tablet doing at 10 am with the screen off, for 2.5 hours?



  • @Polygeekery @loopback0 It was me.

    Try opening an administrator command prompt and stopping the service -- net stop wuauserv. Then run the standalone installer for that update.


  • Notification Spam Recipient

    @hungrier said in WTF Bites:

    0_1484619438980_battery.png

    :wtf: was my tablet doing at 10 am with the screen off, for 2.5 hours?

    Not actually sleeping, that's for sure.

    This is why I lament that Google nerfed battery stats.

    I bet it was an app that fell back to long-polling because push notification registration failed.


  • Discourse touched me in a no-no place

    @Tsaukpaetra said in WTF Bites:

    I bet it was an app that fell back to long-polling because push notification registration failed.

    Or the ad network downloading today's batch of annoying javascript attacks “interesting” and “entertaining” offers.



  • @Polygeekery I fixed something like this recently. I had to first install KB3020369 then KB3172605 to get Windows Update to work correctly.

    You're right that it won't install with the Windows Update service disabled. I found if you just stop the service, the update starts the service itself then installs correctly.

    🤷🏻



  • My boss: These coders I am contracting to secretly work for me while at their full time job are doing great! I think I'll poach a few of them to work full-time for me.

    My boss, a month later: These new coders I hired are all disinterested in my startup project and only care for money! Who could have seen this coming?



  • Looking at cars on autotrader.ca.

    When the car is in the same province, I see the distance in kilometers.
    When it's not, the distance is "in the country"

    Well gee, thanks. It's not like if Canada was huge.



  • @TimeBandit It could just be that they weren't ambitious enough to program it to calculate distances adjusted correctly for the curvature of the earth.


  • Notification Spam Recipient

    @anotherusername said in WTF Bites:

    @TimeBandit It could just be that they weren't ambitious enough to program it to calculate distances adjusted correctly for the curvature of the earth.

    Paging.... someone who shant be mentioned because Lounge. ;)



  • Realized that C++11 has a new opportunity for minor evilness. One has always been able to stuff like

    struct X
    {
        float f(), &g(), h() const, x;
    }
    

    This defines, as expected, three functions and a variable. But, you've always been sort-of limited in the sense that the return type had to match (more or less). Anyway, C++11 to the rescue:

    struct Y
    {
        auto f() -> int, g() -> float&, h() const -> std::string;
    };
    

    "Unfortunately" doesn't allow you to mix in variables in the declaration any longer in member declarations (in global/function scope you can, though).


  • Java Dev

    @cvi Why would you do that


  • Winner of the 2016 Presidential Election

    @cvi said in WTF Bites:

    Realized that C++11 has a new opportunity for minor evilness. One has always been able to stuff like

    struct X
    {
        float f(), &g(), h() const, x;
    }
    

    This defines, as expected, three functions and a variable. But, you've always been sort-of limited in the sense that the return type had to match (more or less). Anyway, C++11 to the rescue:

    struct Y
    {
        auto f() -> int, g() -> float&, h() const -> std::string;
    };
    

    "Unfortunately" doesn't allow you to mix in variables in the declaration any longer in member declarations (in global/function scope you can, though).

    I guess I don't see the new :wtf:. Given the first exists, the second looks like a much nicer alternative. Not that you should do either, of course.



  • WTF: So, one of my C# books mentioned a toolkit which makes starting a new Win10 app easier by providing a number of common plugins.

    They also mention that it's very easy to plugin any MVVM architecture you want and provide an example by using MVVM Light. I remember having looked it up before but I didn't remember why I didn't want to use it, considering that it is praised as "one of the most-used MVVM projects".

    So I go to the homepage of the project and am immediately reminded of GeoCities. Not good but I have seen worse. At least there is a clear link to the docs right at the top!

    Which leads to a bunch of goddamn videos with the most important ones being hosted on PluralSight. Which would force me to pay for this shit. And the source code documentation is available as .CHM (okay, it's available as a hosted website, too, but seriously?)


  • Notification Spam Recipient

    @Rhywden said in WTF Bites:

    So I go to the homepage of the project

    Man, it's a good thing the "about this product" introduction is the first thing you see.

    0_1484796895579_Screenshot_20170118-203405.png

    I mean, who wouldn't want to know when the author is making appearances?



  • @Dreikin said in WTF Bites:

    Not that you should do either, of course.

    I guess I mainly needed to get it out of my system somewhere, before it had any chance to actually land in a real code base. (:sorry:)


  • Fake News

    @cartman82 said in WTF Bites:

    disuninterested

    twitch


  • FoxDev



  • So I just spent a while debugging why my code wasn't parsing this (partially completed) Reactive Drop director config file:

    "SpawnSet" {
    	"Name" "Special Onslaught - Base"
    	"Map" "*"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    	"MinHordeSize" "9"
    	"MaxHordeSize" "14"
    	"MinWanderers" "1"
    	"MaxWanderers" "2"
    	"MinHordeWanderers" "0"
    	"MaxHordeWanderers" "4"
    	"MinPrespawn" "1"
    	"MaxPrespawn" "1"
    	"MinPacks" "1"
    	"MaxPacks" "3"
    
    	"HORDE+WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "1"
    		"NPC" {
    			"AlienClass"	"asw_drone"
    		}
    	}
    
    	"PRESPAWN" {
    		"SelectionWeight" "1"
    		"NPC" {
    			"AlienClass"	"asw_shieldbug"
    		}
    		"NPC" {
    			"AlienClass"	"npc_antlionguard_normal"
    			"RequireCVar"	"rd_prespawn_antlionguard"
    			"SpawnChance"	"0.5"
    		}
    		"NPC" {
    			"AlienClass"	"npc_antlionguard_cavern"
    			"RequireCVar"	"rd_prespawn_antlionguard"
    			"SpawnChance"	"0.5"
    		}
    	}
    
    	"PACK" {
    		"SelectionWeight" "1"
    		"NPC" {
    			"AlienClass"	asw_parasite"
    		}
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    			"SpawnChance"	"0.75"
    		}
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    			"SpawnChance"	"0.5"
    		}
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    			"SpawnChance"	"0.25"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Jacob's Rest: Landing Bay"
    	"Map" "asi-jac1-landingbay_01"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER" {
    		"SelectionWeight" "10"
    		"BeforeObjective" "AccessBay"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "1"
    		"AfterObjective" "AccessBay"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "5"
    		"AfterObjective" "AccessBay"
    
    		"NPC" {
    			"AlienClass"	"asw_harvester"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "8"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Jacob's Rest: Cargo Elevator"
    	"Map" "asi-jac1-landingbay_02"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Jacob's Rest: Deima Surface Bridge"
    	"Map" "asi-jac2-deima"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Jacob's Rest: Rydberg Reactor"
    	"Map" "asi-jac3-rydberg"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Jacob's Rest: SynTek Residential"
    	"Map" "asi-jac4-residential"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Jacob's Rest: Sewer Junction B5"
    	"Map" "asi-jac6-sewerjunction"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Jacob's Rest: Timor Station"
    	"Map" "asi-jac7-timorstation"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Area 9800: Landing Zone"
    	"Map" "rd-area9800lz"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Area 9800: Cooling Pump"
    	"Map" "rd-area9800pp1"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Area 9800: Power Generator"
    	"Map" "rd-area9800pp2"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Area 9800: Wastelands"
    	"Map" "rd-area9800wl"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Operation Cleansweep: Storage Facility"
    	"Map" "rd-ocs1storagefacility"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Operation Cleansweep: Landing Bay 7"
    	"Map" "rd-ocs2landingbay7"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Operation Cleansweep: U.S.C. Medusa"
    	"Map" "rd-ocs3uscmedusa"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tears for Tarnor: Insertion Point"
    	"Map" "rd-tft1desertoutpost"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"HORDE" {
    		"SelectionWeight" "10000"
    		"AfterObjective" "objective_beacon1"
    		"BeforeObjective" "objective_beacon2"
    
    		"NPC" {
    			"AlienClass"	"asw_drone"
    		}
    		"NPC" {
    			"SpawnChance"	"0.6"
    			"AlienClass"	"asw_drone_jumper"
    		}
    		"NPC" {
    			"SpawnChance"	"0.2"
    			"AlienClass"	"asw_drone"
    		}
    		"NPC" {
    			"SpawnChance"	"0.1"
    			"AlienClass"	"asw_drone"
    		}
    	}
    
    	"HORDE" {
    		"SelectionWeight" "2"
    		"SpawnerSpawning" "drone_computerhack1"
    
    		"NPC" {
    			"AlienClass"	"asw_drone"
    		}
    		"NPC" {
    			"SpawnChance"	"0.6"
    			"AlienClass"	"asw_drone_jumper"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.2"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "9.8"
    		"AfterObjective" "objective_computer"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tears for Tarnor: Insertion Point - Insane+"
    	"Map" "rd-tft1desertoutpost"
    	"MinSkill" "4"
    	"MaxSkill" "5"
    
    	"WANDERER" {
    		"SelectionWeight" "2"
    		"AfterObjective" "objective_computer"
    
    		"NPC" {
    			"AlienClass"	"asw_mortarbug"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tears for Tarnor: Abandoned Maintenance Tunnels"
    	"Map" "rd-tft2abandonedmaintenance"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.5"
    		"SpawnerSpawning" "harvester_spawn1"
    
    		"NPC" {
    			"AlienClass"	"asw_harvester"
    		}
    
    		"NPC" {
    			"SpawnChance"	"0.1"
    			"AlienClass"	"asw_parasite_defanged"
    		}
    
    		"NPC" {
    			"SpawnChance"	"0.1"
    			"AlienClass"	"asw_parasite_defanged"
    		}
    
    		"NPC" {
    			"SpawnChance"	"0.1"
    			"AlienClass"	"asw_parasite_defanged"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.7"
    		"AfterObjective" "objective_movecrane"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tears for Tarnor: Abandoned Maintenance Tunnels - Hard+"
    	"Map" "rd-tft2abandonedmaintenance"
    	"MinSkill" "3"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.2"
    		"SpawnerSpawning" "parasite_cinematic"
    
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tears for Tarnor: Oasis Colony Spaceport"
    	"Map" "rd-tft3spaceport"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.6"
    
    		"NPC" {
    			"AlienClass"	"asw_drone"
    			"VScript"		"special_onslaught_tft_carrier_drone"
    		}
    	}
    
    	"HORDE" {
    		"SelectionWeight" "0.03"
    
    		"NPC" {
    			"AlienClass"	"asw_drone"
    			"VScript"		"special_onslaught_tft_carrier_drone"
    		}
    	}
    
    	"HORDE" {
    		"SelectionWeight" "10000"
    		"RequireGlobal" "ON:special_onslaught_tft_spaceport_shieldbug"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.8"
    		"SpawnerSpawning" "boomer_rolls_down_door"
    
    		"NPC" {
    			"AlienClass"	"asw_boomer"
    		}
    	}
    
    	"WANDERER" {
    		"SelectionWeight" "1.2"
    		"SpawnerSpawning" "slo_spawn_after_2nd_airlock"
    		"BeforeObjective" "obj_control_computer"
    
    		"NPC" {
    			"AlienClass"	"asw_harvester"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "4"
    		"SpawnerSpawning" "outside_slow_spawn"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "2"
    		"SpawnerSpawning" "outside_slow_spawn"
    
    		"NPC" {
    			"AlienClass"	"asw_boomer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "3"
    		"SpawnerSpawning" "finale_alien_spawn"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "1.2"
    		"SpawnerSpawning" "finale_alien_spawn"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "1.7"
    		"SpawnerSpawning" "finale_alien_spawn"
    
    		"NPC" {
    			"AlienClass"	"asw_boomer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "5"
    		"SpawnerSpawning" "finale_alien_spawn"
    
    		"NPC" {
    			"AlienClass"	"asw_drone"
    			"VScript"		"special_onslaught_tft_carrier_drone"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tears for Tarnor: Oasis Colony Spaceport - Hard+"
    	"Map" "rd-tft3spaceport"
    	"MinSkill" "3"
    	"MaxSkill" "5"
    
    	"HORDE_WANDERER" {
    		"SelectionWeight" "0.1"
    		"RequireGlobal" "ON:special_onslaught_tft_spaceport_shieldbug"
    
    		"NPC" {
    			"AlienClass"	"asw_shieldbug"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tears for Tarnor: Oasis Colony Spaceport - Insane+"
    	"Map" "rd-tft3spaceport"
    	"MinSkill" "4"
    	"MaxSkill" "5"
    
    	"WANDERER" {
    		"SelectionWeight" "10"
    		"SpawnerSpawning" "lift_buzzer_spawn"
    		"SpawnerWaiting" "metal_detector_attack"
    
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Dead City: Omega City"
    	"Map" "rd-dc1_omega_city"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Dead City: Breaking an Entry"
    	"Map" "rd-dc2_breaking_an_entry"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Dead City: Search and Rescue"
    	"Map" "rd-dc3_search_and_rescue"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Lana's Escape: Lana's Bridge"
    	"Map" "rd-lan1_bridge"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER" {
    		"SelectionWeight" "5"
    		"BeforeObjective" "obj_bridge"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"HORDE_WANDERER" {
    		"SelectionWeight" "0.4"
    		"BeforeObjective" "obj_bridge"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"HORDE" {
    		"SelectionWeight" "0.2"
    		"BeforeObjective" "obj_bridge"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.1"
    		"AfterObjective" "obj_bridge"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER" {
    		"SelectionWeight" "5"
    		"AfterObjective" "obj_bridge"
    		"SpawnerWaiting" "comite_de_reception"
    
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    	}
    
    	"HORDE_WANDERER" {
    		"SelectionWeight" "0.1"
    		"AfterObjective" "obj_bridge"
    		"SpawnerWaiting" "comite_de_reception"
    
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "10"
    		"SpawnerSpawning" "comite_de_reception"
    
    		"NPC" {
    			"AlienClass"	"asw_boomer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "10"
    		"SpawnerSpawning" "comite_de_reception"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Lana's Escape: Lana's Sewer"
    	"Map" "rd-lan2_sewer"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "4"
    		"RequireGlobal" "OFF:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "6"
    		"RequireGlobal" "OFF:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"HORDE" {
    		"SelectionWeight" "0.04"
    		"RequireGlobal" "ON:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_shaman"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.6"
    		"RequireGlobal" "ON:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_shaman"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.15"
    		"RequireGlobal" "DEAD:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_shaman"
    		}
    	}
    
    	"HORDE" {
    		"SelectionWeight" "0.5"
    		"RequireGlobal" "DEAD:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_drone_jumper"
    		}
    
    		"NPC" {
    			"SpawnChance"	"0.6"
    			"AlienClass"	"asw_drone"
    		}
    
    		"NPC" {
    			"SpawnChance"	"0.3"
    			"AlienClass"	"asw_drone_jumper"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.8"
    		"RequireGlobal" "DEAD:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.4"
    		"RequireGlobal" "DEAD:special_onslaught_lan_sewer_boss"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Lana's Escape: Lana's Maintenance"
    	"Map" "rd-lan3_maintenance"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "4"
    		"RequireGlobal" "MIN:1:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "2.5"
    		"RequireGlobal" "MIN:2:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"asw_harvester"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.1"
    		"RequireGlobal" "MIN:2:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"npc_antlionguard_normal"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.1"
    		"RequireGlobal" "MIN:3:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"npc_antlionguard_cavern"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.2"
    		"RequireGlobal" "MIN:3:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "5"
    		"RequireGlobal" "MIN:3:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"asw_boomer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "3"
    		"RequireGlobal" "MIN:3:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "8"
    		"RequireGlobal" "MAX:0:special_onslaught_lan_maintenance_repair"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Lana's Escape: Lana's Vent"
    	"Map" "rd-lan4_vent"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "1.5"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.4"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    			"AfterObjective" "obj_1_outvent"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.2"
    		"BeforeObjective" "obj_1_outvent"
    
    		"NPC" {
    			"AlienClass"	"asw_drone_uber"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.8"
    		"BeforeObjective" "obj_1_outvent"
    
    		"NPC" {
    			"AlienClass"	"asw_drone_jumper"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "0.6"
    		"BeforeObjective" "obj_1_outvent"
    
    		"NPC" {
    			"AlienClass"	"asw_boomer"
    		}
    	}
    
    	"HORDE" {
    		"SelectionWeight" "0.5"
    		"AfterObjective" "obj_1_outvent"
    
    		"NPC" {
    			"AlienClass"	"asw_drone_jumper"
    		}
    
    		"NPC" {
    			"SpawnChance"	"0.6"
    			"AlienClass"	"asw_drone"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Lana's Escape: Lana's Complex"
    	"Map" "rd-lan5_complex"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE" {
    		"SelectionWeight" "10"
    		"RequireGlobal" "MIN:19:special_onslaught_lan_complex_path"
    		"RequireGlobal"	"MAX:20:special_onslaught_lan_complex_path"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE" {
    		"SelectionWeight" "10"
    		"RequireGlobal" "MIN:25:special_onslaught_lan_complex_path"
    		"RequireGlobal"	"MAX:33:special_onslaught_lan_complex_path"
    
    		"NPC" {
    			"AlienClass"	"asw_buzzer"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "20"
    		"RequireGlobal" "MIN:21:special_onslaught_lan_complex_path"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "20"
    		"RequireGlobal" "MIN:21:special_onslaught_lan_complex_path"
    
    		"NPC" {
    			"AlienClass"	"asw_ranger"
    		}
    	}
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "12"
    		"RequireGlobal" "MIN:44:special_onslaught_lan_complex_path"
    
    		"NPC" {
    			"AlienClass"	"asw_boomer"
    		}
    	}
    
    	"WANDERER" {
    		"SelectionWeight" "3.5"
    		"AfterObjective" "Nuclear warhead_obj"
    
    		"NPC" {
    			"AlienClass"	"asw_harvester"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Lana's Escape: Lana's Complex - Hard+"
    	"Map" "rd-lan5_complex"
    	"MinSkill" "3"
    	"MaxSkill" "5"
    
    	"WANDERER" {
    		"SelectionWeight" "2"
    		"AfterObjective" "Nuclear warhead_obj"
    
    		"NPC" {
    			"AlienClass"	"asw_mortarbug"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Lana's Escape: Lana's Complex - Insane+"
    	"Map" "rd-lan5_complex"
    	"MinSkill" "4"
    	"MaxSkill" "5"
    
    	"WANDERER+HORDE_WANDERER" {
    		"SelectionWeight" "5"
    		"RequireGlobal" "MIN:22:special_onslaught_lan_complex_path"
    
    		"NPC" {
    			"AlienClass"	"asw_parasite"
    		}
    	}
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Paranoia: Unexpected Encounter"
    	"Map" "rd-par1unexpected_encounter"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Paranoia: Hostile Places"
    	"Map" "rd-par2hostile_places"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Paranoia: Close Contact"
    	"Map" "rd-par3close_contact"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Paranoia: High Tension"
    	"Map" "rd-par4high_tension"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Paranoia: Crucial Point"
    	"Map" "rd-par5crucial_point"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Reduction: Mission 1"
    	"Map" "rd-reduction1"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Reduction: Mission 2"
    	"Map" "rd-reduction2"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Reduction: Mission 3"
    	"Map" "rd-reduction3"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Reduction: Mission 4"
    	"Map" "rd-reduction4"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Reduction: Mission 5"
    	"Map" "rd-reduction5"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Reduction: Mission 6"
    	"Map" "rd-reduction6"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Research 7: Transport Facility"
    	"Map" "rd-res1forestentrance"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Research 7: Research 7"
    	"Map" "rd-res2research7"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Research 7: Illyn Forest"
    	"Map" "rd-res3miningcamp"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Research 7: Jericho Mines"
    	"Map" "rd-res4mines"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: Midnight Port"
    	"Map" "rd-til1midnightport"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: Road to Dawn"
    	"Map" "rd-til2roadtodawn"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: Arctic Infiltration"
    	"Map" "rd-til3arcticinfiltration"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: Area9800 Landingzone"
    	"Map" "rd-til4area9800"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: Cold Catwalks"
    	"Map" "rd-til5coldcatwalks"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: Yanaurus Mine"
    	"Map" "rd-til6yanaurusmine"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: The Factory"
    	"Map" "rd-til7factory"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: Communication Center"
    	"Map" "rd-til8comcenter"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    
    "SpawnSetOverlay" {
    	"Name" "Special Onslaught - Tilarus-5: SynTek Hospital"
    	"Map" "rd-til9syntekhospital"
    	"MinSkill" "1"
    	"MaxSkill" "5"
    
    	// TODO
    }
    

    I'll give you a hint: count the quotes in the base PACK definition.



  • @ben_lubar

    0_1484851320162_upload-96c8954a-62f4-4381-aae6-125807a1e72d

    Instead of finding whatever and counting it, I'll just assume it's the wrong number.



  •     [Flags]
        public enum BooleanValues
        {
            Yes = 1,
            No = 2
        }


  • @fwd said in WTF Bites:

        [Flags]
        public enum BooleanValues
        {
            Yes = 1,
            No = 2,
            FILE_NOT_FOUND = 3
        }
    

    FTFY



  • @fwd said in WTF Bites:

    [Flags]

    BooleanValues FILE_NOT_FOUND = Yes | No



  • @Maciejasjmj said in WTF Bites:

    @fwd said in WTF Bites:

    [Flags]

    BooleanValues FILE_NOT_FOUND = Yes | No

    context won't make sense but there's also this

    DefaultValue = Enums.BooleanValues.Yes | Enums.BooleanValues.No

  • Winner of the 2016 Presidential Election

    @fwd said in WTF Bites:

    @Maciejasjmj said in WTF Bites:

    @fwd said in WTF Bites:

    [Flags]

    BooleanValues FILE_NOT_FOUND = Yes | No

    context won't make sense but there's also this

    DefaultValue = Enums.BooleanValues.Yes | Enums.BooleanValues.No
    

    It's the anti-null!


  • đźš˝ Regular

    @ben_lubar said in WTF Bites:

    I'll give you a hint: count the quotes in the base PACK definition.

    Sorry, I stopped counting after ten.



  • @Zecc said in WTF Bites:

    @ben_lubar said in WTF Bites:

    I'll give you a hint: count the quotes in the base PACK definition.

    Sorry, I stopped counting after ten.

    The eleventh one is missing.


  • Discourse touched me in a no-no place

    @ben_lubar said in WTF Bites:

    @Zecc said in WTF Bites:

    @ben_lubar said in WTF Bites:

    I'll give you a hint: count the quotes in the base PACK definition.

    Sorry, I stopped counting after ten.

    The eleventh one is missing.

    Nah, look, it's right there at the end...
    0_1484870050667_upload-41b0ed24-6fe1-4350-944c-60bdb694348b


  • Discourse touched me in a no-no place

    @ben_lubar said in WTF Bites:

    parsing this

    I'd just make that into executable code (by an appropriate programming language). Why parse when you can run? And yes, it's almost there already…

    I see the lack of balance. I don't see why it is hard to find. We have tools for that sort of thing.



  • @dkf said in WTF Bites:

    I'd just make that into executable code

    The entire point of having configuration files not be executable is that you don't need to recompile the entire game every time you change one.



  • @ben_lubar said in WTF Bites:

    @dkf said in WTF Bites:

    I'd just make that into executable code

    The entire point of having configuration files not be executable is that you don't need to recompile the entire game every time you change one.

    :pendant:: You wouldn't need to recompile the entire game, just the configuration data. You'd maybe have to relink the entire thing, which can be painful enough.

    Not that I disagree with the premise that a runtime config allows you to iterate faster, especially if you can reload said runtime config without reloading all the other crap. OTOH, why you'd want to reinvent yet another config file parser is a bit more of an open question...


  • đźš˝ Regular

    @ben_lubar said in WTF Bites:

    @Zecc said in WTF Bites:

    @ben_lubar said in WTF Bites:

    I'll give you a hint: count the quotes in the base PACK definition.

    Sorry, I stopped counting after ten.

    The eleventh one is missing.

    depiction_of_an_airplane_flying_over_one_s_head.flv


  • đźš˝ Regular

    @ben_lubar said in WTF Bites:

    The entire point of having configuration files not be executable is that you don't need to recompile the entire game every time you change one.

    You could embed Lua, Python, JavaScript or a number of other preexisting language that are adequate for this specific use case.

    And since we're in the right thread:

    0_1484905121549_Untitled.png

    (it did recognize "preexisting")


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    @ben_lubar said in WTF Bites:

    @dkf said in WTF Bites:

    I'd just make that into executable code

    The entire point of having configuration files not be executable is that you don't need to recompile the entire game every time you change one.

    :pendant:: You wouldn't need to recompile the entire game, just the configuration data. You'd maybe have to relink the entire thing, which can be painful enough.

    Not that I disagree with the premise that a runtime config allows you to iterate faster, especially if you can reload said runtime config without reloading all the other crap. OTOH, why you'd want to reinvent yet another config file parser is a bit more of an open question...

    Since the compiler I have in mind would take about 50ms to compile that thing, fast enough that it looks damn close to being interpreted when configured as a JIT engine, the amount of fucks I give is strictly limited. ;)

    And yes, we've got libraries for this. They're called embeddable programming languages.



  • @dkf said in WTF Bites:

    And yes, we've got libraries for this. They're called embeddable programming languages.

    Oh, yeah, definitely. I would (and do) use Lua for this (as mentioned by @Zecc above). It's great for this kind of stuff IMO.

    There are valid reasons for not using a programming language and sticking to a "plain" config file (not being allowed to ship with an interpreter, not wanting your colleagues & coworkers to be able to get too clever in what should be data etc). Even so, it's a bit unclear why you'd want to roll your own parser, after all there plenty of libraries for various formats (JSON, XML, whatever) too (and, yes, most of them suck, but you only need to find a single good one).


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    not being allowed to ship with an interpreter

    It's not an interpreter. It's a configuration file processor.


Log in to reply