WTF Bites
-
@TimeBandit said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
I'm the only employee and white
That's racist
Not quite. It's not racist if it's true.
-
@hungrier I'm looking at https://github.com/waitingsong/node-win32-api
So just make a caffeine-stub app, no need for the bot to even know...
-
@levicki @error Another trick is to do something like Mouse Jiggler. It tricks Windows in thinking that the mouse is being moved and so it will should keep things running in the usual mode.
The only downside is that the original codeplex sits might no longer have a binary. In that case you might need to download it from the least-shady freeware site you can find.
-
Another trick is to do something like Mouse Jiggler.
Reminds me of an app that actually does the opposite. It's a prank app that captures your mouse for a second every 20 seconds, limiting it to a 2x2 pixel square.
Fun stuff. And it still works!
-
WTF of my day: So, I was curious and took a look at Amazon Fresh - you know, the delivery service for groceries. It told me right off the bat that I should choose a delivery date before I started because of high demand.
Fair enough, so I went right to the date selection.
And discovered that some bottom-feeder moron had only done the needful.
Basically, you click through each day which has a number of time slots and then select a slot you like. If a slot already is at capacity the
<Select />
field is disabled. On days for which there's no slots available (like sundays or holidays) you get the message "No slot available"Here's the thing: Every slot for the next three weeks is full (and thus not selectable). But they don't tell you that, no, you simply click through every day because there's also no "Show only available slots" filter.
Idiots.
-
@levicki
Did you conspire with @Ben-L to post those huge ass pictures?
-
Did you conspire with @Ben-L to post those huge ass pictures?
I don't see any ass in those pictures.
(as to whether it's huge, if the gal's 188 cm, it's likely appropriately sized, but I still wouldn't call it huge)
-
@levicki said in WTF Bites:
I didn't particularly like your previous posts about this, but I must admit that prominent chin even caught my eye.
And 188 cm height is normal?
My wife's 6 feet and it's awesome! What's wrong with tall women?
-
@Tsaukpaetra said in WTF Bites:
@TimeBandit said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
I'm the only employee and white
That's racist
Not quite. It's not racist if it's true.
@Tsaukpaetra gets canceled in 5... 4... 3...
-
-
@dkf bad puns thread is
-
@Mason_Wheeler said in WTF Bites:
My wife's 6 feet
Most people only have two.
If only that was the end of it...
@Mason_Wheeler said in Tales from Coronavee-rooss Italy, mamma mia!:
-
-
@levicki Then that shop sounds like an awesome place to be! (Or would be if the faces weren't so hideous...)
-
So, in Firefox you can grant access to microphone (etc) temporarily. Neat. It's even easy to revoke the permission on a browser level. It makes it very obvious that the microphone is being used.
Unfortunately, under linux, Firefox doesn't want to acknowledge my microphone's existence. (Something something install Pulseaudio something something, but
.)
Chromium works directly with alsa. But once you grant access to something, it's granted permanently. Revoking it takes you through the settings, and doesn't seem to apply immediately. (Even found an bug tracker entry about it. Closed/wontfix. Having a "only once" option in the dialog is apparently too complicated.)
How Edge? Might be able to be convinced to become the first person ever actually waiting for Edge to be ported to Linux.
-
Chromium works directly with alsa. But once you grant access to something, it's granted permanently. Revoking it takes you through the settings, and doesn't seem to apply immediately.
Private mode?
-
@GÄ ska That might actually be workable.
Not quite as convenient as the Firefox way, but still an improvement. Thanks.
-
Something something install Pulseaudio something something
How did you manage not to have that installed? What desktop are you using that does not depend on it last 10 years?
-
@Bulb Gentoo.
(Yes, yes, I know.)
-
@cvi Gentoo is the distribution. Desktop environments are KDE, GNOME, XFCE, LXDE, Mint, Unity etc. E.g. KDE is all based on pulseaudio, so I am rather confident it would pull in pulseaudio on Gentoo just like it does on Debian.
-
@Bulb Yeah, sorry, you're right. Didn't pay enough attention to the question.
I'm running awesome as the window manager, so there's no fully-fledged DE.
-
@cvi Then I guess you could have avoided it indeed. In my experience alsa should have done everything right, but nothing ever managed to configure it right (and the config files are totally impenetrable for mere mortals) so it never actually worked well. Pulseaudio was big pain in the arse initially as well, but last maybe five years it tends to just work.
-
and the config files are totally impenetrable for mere mortals
QFT. I was looking at my .asoundrc earlier because of the microphone issues. I know I've written that stuff at some point, but couldn't make heads or tails of it now (I know what it does conceptually, but the why and what I've long since forgotten).
I'm sure Pulseaudio works these days, it's mostly
. I have a few weird things set up since forever, and at the moment it just works as well.
-
-
Status: Why is the player object digging so far elsewhere to tell the game it wants to start?
Edit: Why does the ball need to tell the paddle what background it should add the score to?!?!?
Edit Edit: Why are we setting the position of the paddle to a random offset?!?!?
And why is there ambiguity between
System.Random
andUnityEngine.Random
??!?
-
Introductory essay to a recipe:
With a flavor and texture reminiscent of classic yellow cake,
-
@Tsaukpaetra said in WTF Bites:
Why does the ball need to tell the paddle what background it should add the score to?!?!?
"Object-oriented Pong: why it's a bad idea"
-
@Zerosquare said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
Why does the ball need to tell the paddle what background it should add the score to?!?!?
"Object-oriented Pong: why it's a bad idea"
I'm not even mad it's object-oriented, I'm mad at the unnecessary spaghetti. Literally the opposite of separation of concern...
-
@Tsaukpaetra said in WTF Bites:
Why does the ball need to tell the paddle what background it should add the score to?!?!?
Presumably because the ball is the one who knows where it left the field.
Why this is in a ball's method instead of a game logic object is anyone's guess though.
Like that gameController property of the paddlesGenerator object.What's a PaddlesGenerator, anyway?
And what is a PaddleBackground, which has an addToScore method?
-
@Polygeekery said in WTF Bites:
@hungrier it's a movie from 1933. That was my
.
Perhaps it was showing in a theater somewhere. There are theaters that show classic movies, either primarily (e.g., the Stanford Theater in Palo Alto, CA) or occasionally as a special feature.
-
Presumably because the ball is the one who knows where it left the field.
This is actually the ball hitting the paddle, not leaving the field. In this version of Pong, you get points for not letting the ball go past the paddle (i.e. volley).
Why this is in a ball's method instead of a game logic object is anyone's guess though.
Yeah IMO it's inverted, the paddle should rebound the ball, not the ball asking the paddle what its speed is and where on the paddle it hit. Fucking argh!
What's a PaddlesGenerator, anyway?
It's what instantiates and positions the player paddles around the screen-- this is multiplayer pong btw.
And what is a PaddleBackground, which has an addToScore method?
It's what holds all the text for each paddle, and a background (which isn't used for reasons). Apparently the score is held in the fucking background text object.
-
@levicki said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
It's what instantiates and positions the player paddles around the screen-- this is multiplayer pong btw.
So a PaddleFactory then?
Once I spin up this generator....
-
@Tsaukpaetra said in WTF Bites:
Status: Why is the player object digging so far elsewhere to tell the game it wants to start?
Because otherwise this code would be split over two more methods, which would negate any positive effect on readability from having the method easier to find.
@Tsaukpaetra said in WTF Bites:
Edit: Why does the ball need to tell the paddle what background it should add the score to?!?!?
Because the objects are laid out a bit haphazardly.
@Tsaukpaetra said in WTF Bites:
Edit Edit: Why are we setting the position of the paddle to a random offset?!?!?
Because excavator?
@Tsaukpaetra said in WTF Bites:
And why is there ambiguity between
System.Random
andUnityEngine.Random
??!?Because some people like using System and using UnityEngine.
@Tsaukpaetra said in WTF Bites:
Why this is in a ball's method instead of a game logic object is anyone's guess though.
Yeah IMO it's inverted, the paddle should rebound the ball, not the ball asking the paddle what its speed is and where on the paddle it hit. Fucking argh!
It's still the ball's motion that's being resolved, not the paddle's. It's the trouble with object-oriented programming. It insists that every action belongs to some object (shouldn't it be called subject, then?), but the world does not always work this way and then it's ambiguous which one you should chose. Note that speech does work that way, and in this case saying âball bounces off the paddleâ and âpaddle rebounds the ballâ are equally valid expressions in active voice, soâŚ
@Tsaukpaetra said in WTF Bites:
And what is a PaddleBackground, which has an addToScore method?
It's what holds all the text for each paddle, and a background (which isn't used for reasons). Apparently the score is held in the fucking background text object.
Where else, right?
-
Where else, right?
I would have accepted "The global variable pool" at that point.
-
@boomzilla said in WTF Bites:
It seems like the latest Windows 10 version likes to go to sleep when servers are running.
There's probably a Windows API to prevent it, but I don't think it's available from Node.
Call me a sceptic, but I suspect the API is called "Pay for the server version".
Sounds like a job for
ITAPPMONROBOT
.
-
@Zerosquare said in WTF Bites:
"Object-oriented Pong: why it's a bad idea"
At least the paddles aren't monadic endofunctors
-
@Tsaukpaetra You would be exponentially more confused if you checked out the decompiled source code for the Unity game Duskers. There's a defensive turret in the game that, when powered and activated, can kill anything in a room. It can remain activated while unpowered, but of course it doesn't do anything in that case. But, if one of your own probes wanders into that room with an active-but-unpowered defense turret, the probe will commit suicide and claim the defense turret did it. The one with no power. Curiously, this only happens upon the initial entry to the room. If you lock the probe in with the defense turret and power it up and activate it, it will kill everything except the probe. This is only the beginning of the madness, you don't want to know how the game handles "removal" of things that got sucked out to space...
-
@levicki said in WTF Bites:
@Tsaukpaetra Shouldn't both ball and paddle motion ultimately belong to the physics engine?
Like, shouldn't both be derived from some PhysicsObject class?
I have little faith in the dev at this point.
-
@levicki said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
I have little faith in the dev at this point.
Please elaborate.
There are functions whose only purpose is to return constant values of where up, down, left, etc. are.
There are internal bools representing where the user indicated the paddle should travel left or right, calculated in an 80 line function. I could go on, but the itch to refactor would become unbearable and you wouldn't see me for a few days...
-
Hmm. MSVC's been drinking again:
1> [...] error C2664: '<snip />': cannot convert argument 1 from 'const S' to 'const S &' 1> [...] note: Reason: cannot convert from 'const S' to 'const S' 1> [...] note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
-
@cvi
S
sounds like something inside a template. If so,S
might be actually something that can't have reference tacked on. There is fewer such cases now with the reference collapsing, but I think there are still some.
-
@levicki is that a table valued parameter? I've heard about them, but never able to find a use...
-
@Bulb Not a template by itself, but calling one.
This was inside a function catch-clause; the same line compiles just fine when moved out of the catch clause. Neither GCC nor Clang had any trouble with that line to begin with. I think this was just VS2017 hitting some constexpr-evaluation related bug and getting thoroughly confused -- this popped up when changing one of the arguments from a plain old string literal to a compile-time checked format string, courtesy fmtlib.
Workaround for now is lifting the offending line into its own function.
-
@Tsaukpaetra said in WTF Bites:
@levicki is that a table valued parameter? I've heard about them, but never able to find a use...
I've used them (to severely speed up data uploads), but I hadn't realized they could be used outside of stored procedures.
-
FWIW, even though @levicki didn't post a link to the SO answer, through
sheer luckadvanced search techniques I've found it:Edit: linked to the wrong answer.
Edit 2: it's been ages I've logged in to SO, but I've gone and done my part: I've upvoted that answer.
Edit 3: what's been up with excavators, recently?
-
-
@levicki said in WTF Bites:
Another 3D asset
Same image saved as PNG:
Literally 128x smaller file with bit-identical content.
Whyyyyy...
I heard something about TIFF image files being capable of storing multiple layers and that if you open them in the proper software you can get the individual layers. I don't know what software that would be, though...
-
@levicki said in WTF Bites:
Another 3D asset
Same image saved as PNG:
Literally 128x smaller file with bit-identical content.
Whyyyyy...
I heard something about TIFF image files being capable of storing multiple layers and that if you open them in the proper software you can get the individual layers. I don't know what software that would be, though...
Yeah, I had to write a documents -> multipage tiff converter at my current gig. Which was then instantly thrown out because PDF/A was better.
-
@levicki said in WTF Bites:
Another 3D asset
Same image saved as PNG:
Literally 128x smaller file with bit-identical content.
Whyyyyy...
Because TIFF in the base standard supports only very poor types of compression that are run-length-encoding based, so they don't work on high depth images with lot of shading (like photographs). There are extensions for LZW and JPEG encodings in TIFF, but a lot of software won't produce extensions, because it's not clear they would be supported (even though they are from last millennium).
On the other hand the delta-encoding with deflate used in PNG is quite efficient on almost anything.
-
@levicki said in WTF Bites:
This is saved as totally uncompressed TIFF, not even RLE, not to mention LZW which is supported in 3D software and everywhere in the pipeline used to create this stuff.
I rarely see TIFF. But generally my impression is that historically because many applications didn't support all the options, people learned to write them uncompressed and probably still do it for :histerical_raisins:.