WTF Bites
-
Status: Well.... duh?
-
Mainly posting this for the title:
When your development roadmap needs a development roadmap....on a game that's been in
betaalpha for a darn long time....
-
Do we have a topic for minor video games wtfs? I'm playing Ghost of Tsushima and a cow just suddenly ran into a fire, killing itself
-
@hungrier The fire went out shortly after it died. The guy eating his shish kebab didn't seem to care about any of it.
-
Working against the object system by
bind
ing methods to this particularthis
(pun intended) is not a good sign. Or maybe not. I should sleep on it.Isn't that a standard practice that works around the braindead default behavior and recommended to be done always in every case, so much that ES6 received a new syntax sugar specifically for this?
-
@Benjamin-Hall said in WTF Bites:
Mainly posting this for the title:
When your development roadmap needs a development roadmap....
We need to have a meeting to decide when we want to schedule the next development meeting.
-
Do we have a topic for minor video games wtfs?
FREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
-
Dear Amazon:
When I set the max price to $20, it's because I'm not going to buy anything over $20. Please stop wasting my time.
-
so much that ES6 received a new syntax suger specifically for this?
I don't know if arrow notation was added specifically for this.
It's much nicer regardless.
-
@Benjamin-Hall said in WTF Bites:
Mainly posting this for the title:
When your development roadmap needs a development roadmap....
We need to have a meeting to decide when we want to schedule the next development meeting.
FYI we have a custom emoji:
-
so much that ES6 received a new syntax suger specifically for this?
I don't know if arrow notation was added specifically for this.
It's literally a shorthand for
.bind(this)
.
-
Isn't that a standard practice that works around the braindead default behavior and recommended to be done always in every case, so much that ES6 received a new syntax suger specifically for this?
Aha, so that's why the book doesn't mention
.bind(this)
: it only mentions arrow functions instead. Thanks, TIL.
-
so much that ES6 received a new syntax suger specifically for this?
I don't know if arrow notation was added specifically for this.
It's literally a shorthand for
.bind(this)
.It's shorthand for
function(){doWhateverAndAutomaticallyReturnIfItsAOneLinerAndAlsoBindThis();}
-
"[if(empty(parameters('environmentName')), '', concat('-', if(less(length(parameters('environmentName')), 11), parameters('environmentName'), concat(substring(parameters('environmentName'), 0, 5), substring(parameters('environmentName'), sub(length(parameters('environmentName')), 5), 5)))))]"
I am defining some Azure Resource Manager templates¹. I have this parameter that I use as a suffix to the resource names, and because of naming restrictions need to shorten it to 11 characters in a way that it is still kinda obvious which environment it is. So let's take first and last 5 characters if it's too long – plus I need to prefix
-
if it is non-empty so the name looks reasonable. Well, the expression language it provides makes it this verbose.
¹ **⚠** Leads to a Microsoft manual in the best tradition of Microsoft manual quality. You remember the helicopter joke, don't you?
Helicopter is flying around Washington, but fog falls and the pilot has trouble navigating home. But then he sees a high-rise building and there is someone sitting by an open window. So the pilot flies closer and shouts out, “Hey, good man, where am I?”. “In a helicopter” comes a response from the office window. On hearing that the pilot turns around and in a few moments safely lands at a nearby airport.“How did you make it?” ask his friend when they sit down to a beer for debriefing. “Well, from the answer that was correct, but utterly useless, I realized it must be the Microsoft offices.”
-
In other words, it's also a shorthand for
function() { return }
.Honestly, I even find the
.bind(this)
behaviour surprising.
-
@Zecc Anything having to do with
this
in Javascript is surprising if you're used to any other OO language.Arrow functions automatically return the result of one-liners, making it convenient for things like
let arr = [1,2,3]; arr.map(x => x * 2); > Array(3) [ 2, 4, 6 ]
-
@hungrier I know.
I guess what I meant to say was given how
this
usually works in JS this new behaviour (though appreciated and I wouldn't have it any other way) is surprising.The current state of affairs is
=>
is inconsistent with(function(){})
, but understandably it's too late to change the behaviour of the latter just because the behaviour of the former is more sensible, and changing the behaviour of the former is stupid.
-
@Zecc Even more fun is writing a project in Typescript that had to be compatible with some old IE, compiling down to ES5 (IIRC), and having to remember to always use arrow functions when dealing with
this
in order to ensure that the compiler would do the needful instead of leaving it with the defaultbrokenJavascript version
-
"I wonder why my Word document is all in 10pt Courier New now."
"What?"
"Yes, and all my tables are gone."
"This .docx file? Why does Word tell me it's plain text?"$ docx2txt < file.docx Failed to extract required information from <STDIN>! $ 7z l file.docx Scanning the drive for archives: 1 file, 19122 bytes (19 KiB) Listing archive: file.docx Open ERROR: Can not open the file as [zip] archive ERRORS: Is not archive Errors: 1 $ file file.docx file.docx: Non-ISO extended-ASCII text, with very long lines, with CRLF, CR line terminators
Yup. Somehow managed to accidentally get a
.docx
file containing plain text encoded in ANSI code page.
-
Javascript's binding of this is a WTF for sure, but I'm still not convinced making it different for arrow functions was a good idea. It is very confusing that function(x) { return x + this.y; } and x => x + this.y do different things.
-
@bobjanova The whole point of having arrow functions was being able to be more terse in what you write.
Would like to live in a world where you'd have to write this?
doSomething(((x) => this.masticate(x)).bind(this)); // 🤮
Filed under: loving the italic 🤮
-
Would like to live in a world where you'd have to write this?
No, I'd like to live in one where JS didn't do crazy stuff with this in the first place. But we're not in that world and I think that the inconsistency of them doing different things is worse than the convenience of arrow functions doing it 'right'.
Because you could always use the same hack (const _this = this; somewhere in scope) and write doSomething(x => _this.masticate(x)) if they hadn't made => do an invisible .bind.
-
Somehow managed to accidentally get a .docx file containing plain text encoded in ANSI code page.
It's not that hard to do. When saving documents, Word doesn't warn you when the file extension and the selected format don't match. So if he accidentally selected "ANSI text file" and ignored the "that format doesn't support all of your document's features" dialog (or disabled it), poof! Plain-text .docx file.
-
@bobjanova said in WTF Bites:
I'd like to live in one where JS didn't do crazy stuff
If this was possible, this no longer would be JS.
-
@hungrier Anything in Javascript is surprising if you're used to any other OO language. I still can't wrap my head around how classes and inheritance are implemented in Javascript.
-
@bobjanova said in WTF Bites:
Because you could always use the same hack (const _this = this; somewhere in scope) and write doSomething(x => _this.masticate(x)) if they hadn't made => do an invisible .bind.
That's how the Typescript compiler handles it when going down to ES5
-
@bobjanova said in WTF Bites:
Javascript's binding of this is a WTF for sure, but I'm still not convinced making it different for arrow functions was a good idea. It is very confusing that function(x) { return x + this.y; } and x => x + this.y do different things.
There's a very simple solution: forget that
function
exists at all
-
-
@Zerosquare said in WTF Bites:
he accidentally selected "ANSI text file" and ignored the "that format doesn't support all of your document's features" dialog (or disabled it)
The way I see it, would have to use the Save As dialog to change the format of an existing document, and that dialog should have supplied a different extension the moment the format is changed and/or warn about trying to overwrite a file. And tells me that nothing of the sort happened; last night it was just Close & confirm saving changes.
-
And tells me that nothing of the sort happened; last night it was just Close & confirm saving changes.
They're lying.
-
They're lying.
Or "honestly misremembering". It's hard to blame an overworked person with health problems for all the MS Office adventures they are sometimes having, but I continue to be amazed at the scope of stuff that happens to 's documents when no one is around to help.
-
I continue to be amazed at the scope of stuff that happens to 's documents when no one is around to help.
Sounds like a screen-shitting keylogger needs to be used...
-
-
-
Ok, so trying to watch YouTube on the TV without ad block is completely futile. They put literally 17 ad breaks into a 30 minute video.
What. The. Fuck?!
-
@topspin They're probably trying to sell the YT subscription this way...
-
@topspin They're probably trying to sell the YT subscription this way...
Keyword here being "trying".
-
-
The Microsoft store won't let me rate a game because I didn't buy it. Seems reasonable, except I have the Xbox Game Pass which gives me full access to the game (and I did finish it). But I guess they don't care about engagement on their major platform.
This is a reasonably popular game by the way. It has >2500 reviews on Steam. Want to guess how many ratings (which are a superset of reviews) it has on the Microsoft Store? Four. Four ratings.
-
@anonymous234 said in WTF Bites:
This is a reasonably popular game by the way. It has >2500 reviews on Steam.
Yeah but Steam has the opposite system - it doesn't even require the game to be released.
-
@anonymous234 said in WTF Bites:
The Microsoft store won't let me rate a game because I didn't buy it. Seems reasonable, except I have the Xbox Game Pass which gives me full access to the game (and I did finish it). But I guess they don't care about engagement on their major platform.
This is a reasonably popular game by the way. It has >2500 reviews on Steam. Want to guess how many ratings (which are a superset of reviews) it has on the Microsoft Store? Four. Four ratings.
That's weird. I was just able to rate Gears 5 even though I've only got it through Game Pass Ultimate?
-
@Benjamin-Hall said in WTF Bites:
Mainly posting this for the title:
When your development roadmap needs a development roadmap....on a game that's been in
betaalpha for a darn long time....So, I logged into Star Citizen for the first time in ages and actually spent some time puttering about the 'verse and, much to my surprise, it turned out to be a lot of fun.
Given that I'm only in for the bare minimum and that after all the time spent playing in 2017 I feel like I'd already got my money's worth, I'm not really that stressed about the slow pace of development any more. There has been definite progress since I joined and the current version has got rid of some of the previous pain points, so I'm pretty happy with it ATM.
-
@GOG The JPEGs have been upgraded to PNGs?
-
@Applied-Mediocrity said in WTF Bites:
@GOG The JPEGs have been upgraded to PNGs?
Getting from point A to point B (across the system) now takes 10 minutes instead of 20, so I call it a win.
-
-
@Tsaukpaetra said in WTF Bites:
screen-shitting keylogger
Why does it need to shit all over their screen?
-
That's weird.
Weird indeed. I get the same message on all the applications that come preinstalled (i.e. Sticky notes), but if I right click on their tile I can use the "rate and review" option to actually rate them.
This is what I see on Fallout 76 in the Store app:
And this is what I see in the browser, in private mode:
And in the browser, while logged in: I can't see the "Reviews" section at all!It's a mess. The Microsoft store is just a mess.
-
@Tsaukpaetra said in WTF Bites:
screen-shitting keylogger
Why does it need to shit all over their screen?
Jim knows what he did...
-
@Tsaukpaetra said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
screen-shitting keylogger
Why does it need to shit all over their screen?
Jim knows what he did...
Sometimes your posts have me wondering why people complained about @Gribnit.
-
@Tsaukpaetra said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
screen-shitting keylogger
Why does it need to shit all over their screen?
Jim knows what he did...
Sometimes your posts have me wondering why people complained about @Gribnit.
I make more sense.