WTF Bites



  • Another Amazon WTF: I wanted to save something to a second, private wishlist (really more of a "look at it later" list). I highlighted the name by dragging across it, and since I let go of the mouse button outside the "create wishlist" dialog, it dismissed and cancelled the whole thing.



  • @hungrier said in WTF Bites:

    @jinpa I only know similar words in Russian, but żółcią and Zażółcił share the same root

    But as an anglophone, what was interesting was that the two words both mean "yellow", but they are not identical, though similar. In Russian, there are different words for yellow and yellow, depending on whether it is used as an adjective or as a noun? (i.e. "the color yellow")



  • @jinpa In Russian, and I suspect Polish and other Slavic languages, words can be modified by adding prefixes and suffixes, and conjugated in different ways. So in this example (again, guessing based on Russian knowledge), żółcią is the adjective form and close to the root word, while Zażółcił means something like "made yellow" or "became yellow"

    e: What also may not be immediately obvious to an Anglophone is that word order can be different as well. The sentence in order reads something like made yellow self yellow turtle



  • @levicki Is there not a general "Tools>Options...>Code Analysis>General>Enable Code Analysis on Build" option (or some similar path) to correspond with the project-specific override settings?



  • @jinpa said in WTF Bites:

    @MrL said in WTF Bites:

    Sounds like a normal Polish word 🍹

    Zażółcił jaźń żółcią żółw.

    I wanted to see what that meant in English. According to Google translate:
    Zażółcił jaźń żółcią żółw = Yellow turtle turned yellow
    I was curious why there are two different words for yellow.

    Removing the last word completely changes the meaning:
    Zażółcił jaźń żółcią = Yellowing of the self with bile
    Zażółcił jaźń = Yellowed self
    Zażółcił = Zażółcił (i.e. no translation)

    Is Google translation of Polish really that poor, or does the meaning of words in Polish completely change depending on what comes after them?

    Or is this just an idiom?

    Two posts down is the actual translation, along with the answer to the first of your three questions:

    @MrL said in WTF Bites:

    @Zerosquare said in WTF Bites:

    :

    Yellow turtle turned yellow.

    Sounds likes a typical bug report.

    Turtle painted (its) ego yellow with bile.

    G translate sucks.

    Although, to be perfectly :pendant:ic, wouldn't the second question be technically the same as the third question?



  • @djls45 said in WTF Bites:

    @jinpa said in WTF Bites:

    Is Google translation of Polish really that poor, or does the meaning of words in Polish completely change depending on what comes after them?

    Or is this just an idiom?

    Although, to be perfectly :pendant:ic, wouldn't the second question be technically the same as the third question?

    Not entirely. In English, the following words don't generally change the meaning of the earlier words. But idioms are a special case. "idio" (stupid) + "m" is a phrase with a customary meaning which cannot always be determined from the individual words.



  • @topspin said in WTF Bites:

    @Mingan said in WTF Bites:

    @topspin said in WTF Bites:

    The target audience for this thing doesn’t know what this “white balance“ you’re talking about even is.

    It's a neo-nazi thing, no? :trollface:

    Turn the white balance high enough and even Hitler was aryan blonde. 🤷🏻♂

    I think you're mistaking white balance for gamma - it's a red-/blueshift instead. :pendant:


  • Discourse touched me in a no-no place

    @jinpa said in WTF Bites:

    In English, the following words don't generally change the meaning of the earlier words.

    Yeah, right, suuuure.


  • Notification Spam Recipient

    @jinpa said in WTF Bites:

    @MrL said in WTF Bites:

    Sounds like a normal Polish word 🍹

    Zażółcił jaźń żółcią żółw.

    I wanted to see what that meant in English. According to Google translate:
    Zażółcił jaźń żółcią żółw = Yellow turtle turned yellow
    I was curious why there are two different words for yellow.

    There are not. It's just G translate fail.

    How to explain why it failed...

    Let's take those words one by one:
    Zażółcił - made yellow
    jaźń - something between 'self', 'ego' and 'conciousness'
    żółcią - with bile
    żółw - turtle

    So: "made yellow self with bile turtle". Doesn't make much sense in English. Does it in Polish? Yes.
    How about "turtle made self yellow with bile" -that's fine in English. But in Polish? Yes, the meaning is the same.
    self turtle made yellow with bile
    with bile turtle self made yellow
    turtle self with bile made yellow

    And so on, they all have the same meaning 😁
    Variable word order doesn't make it easy for translators.

    Second thing is that words change depending on many factors.
    Gender, time, completion, relation to speaker, 'mode', and some I forgot probably.
    Roots of words stay the same (or not), beginnings and ends change.

    For example zażółcił ('made yellow' ) is

    1. 'making something yellow' root (żółcić)
    2. in past tense
    3. completed
    4. performed by a male

    Keeping all possible forms of words in dictionaries/translators would be impossible(?), so only roots are kept.
    Here G translate fails again, it doesn't know root żółcić, but knows some other forms, with wrong translations.

    Third thing is that words can be easily created from existing ones. The example żółcić is a verb-from-noun. Rules for creating words like this are... I don't even know what they are, some words just sound wrong. Which makes for some great poetry and ad hoc word creation, but is not so cool for translators.

    There are other problems, but I think this is enough for now.


  • Notification Spam Recipient

    @MrL said in WTF Bites:

    So: "made yellow self with bile turtle". Doesn't make much sense in English.

    Seems to make sense to me. Much more comprehensible than most Twitter posts at least.


  • BINNED

    @Tsaukpaetra you could jump that bar in a wheelchair.


  • Discourse touched me in a no-no place

    @topspin said in WTF Bites:

    @Tsaukpaetra you could jump that bar in a wheelchair.

    01e87072-6cef-4b9f-9d72-e1255d6166af-image.png


  • Notification Spam Recipient

    @levicki said in WTF Bites:

    @MrL said in WTF Bites:

    "turtle made self yellow with bile"

    Isn't that maybe to literal? How about "Turtle became yellow with bile"?

    This doesn't point to the turtle as executor of yellowing, which exists in Polish version.

    It would have to be 'zażòłciła jaźń żòłwia żòłć' - with bile as yellowing executor. Or 'jaźń żòłwia została zażòłcona żółcią' - without any executor.

    In fact the original version doesn't say exactly that 'self' belongs to the turtle, it's implied (but not certain).



  • Status: I wonder if WTF bites is done arguing about Latin grammar yet.

    opens thread, finds arguments about Polish grammar


  • Notification Spam Recipient

    @mott555 said in WTF Bites:

    Status: I wonder if WTF bites is done arguing about Latin grammar yet.

    opens thread, finds arguments about Polish grammar

    But wait! We didn't yet talk about counting in Polish, which is the most wicked part of the language!


  • BINNED

    @MrL “80 blaze it” 🇫🇷

    BF641E35-B964-4266-BF3F-8E5EE06DB16D.jpeg


  • Notification Spam Recipient

    @topspin said in WTF Bites:

    @MrL “80 blaze it” 🇫🇷

    BF641E35-B964-4266-BF3F-8E5EE06DB16D.jpeg

    Hah, just naming numbers, how mundane. Numbers in the wild (in Polish), that's something to behold.

    Four families of four, with four cats and four children, living on fourth floor, on fourth street.

    Cztery czteroosobowe rodziny z czterema kotami i czworgiem dzieci, mieszkające na czwartym piętrze, na czwartej ulicy.

    Just number four - cztery, that's the root
    four (families) - cztery
    four person (family) - czteroosobowa
    with four (cats) - czterema
    with four (children) - czworgiem
    on fourth (floor) - czwartym
    on fourth (street) - czwartej


  • BINNED

    @MrL you win. I shouldn’t have asked.

    Filed under: oh wait, I didn’t. 🍹



  • @MrL said in WTF Bites:

    Cztery czteroosobowe rodziny z czterema kotami i czworgiem dzieci, mieszkające na czwartym piętrze, na czwartej ulicy.



  • @levicki said in WTF Bites:

    and I wasn't sure if { 0 } syntax uses the same optimizations as memset() internally.

    But SecureZeroMemory() specifically doesn't use those optimizations. It's the function for "oh shit, there used to be a password / key material in that memory, and if it's not gone from everywhere right now, including the page file, some hacker could steal it!" For initialization, you really want memset() or an initializer list. You're right about the unions though.



  • @MrL said in WTF Bites:

    Cztery czteroosobowe rodziny z czterema kotami i czworgiem dzieci, mieszkające na czwartym piętrze, na czwartej ulicy.

    Gesundheit!



  • WTF of my day: So, today I participated in a training course on "How to write concept papers".

    Concept papers are something every teacher in Germany has to write when he or she applies for a position above grunt level. They're basically rough outlines on what you propose on doing in this position should you get it. In order to write such a paper, you're supposed to read the job description and then also do some research on the school to see what you can offer which makes you stand out among your competition. It's both simpler and more involved than it sounds.

    Anyway, after my last attempt I got the feedback that, while my concept paper was not bad, there was room for improvement. Okay!

    Which brings us to today - it was advertised as a six hours course. Naturally, I asked myself what we're supposed to do during six hours? The most likely explanation I came up with was that we were supposed to write a dummy concept using one of several job offers, with the whole thing culminating in an at least cursory review of our writing style and choice of contents. Y'know, "act as if you're applying for this position as a vice principal. Here's what the school stated in their offer and here's some further data on the school."

    What I actually got was:

    • Two and a half hour of explanations on what attitudes and innate abilities make a good personality for various positions
    • 45 minutes of lunch break
    • 15 minutes of reading a paper on what should go into a concept paper (i.e. style, contents, structure) which was actually helpful
    • another hour of talking about what happens when you apply for a position (don't let the light go out or a grue will eat you! ... I may not have paid much attention)
    • after that our lecturer asked if someone had an actual paper to review at which point I decided to get out of there.

    So, 15 minutes of helpful content. For which I got up at 8am on a Saturday and walked through cold rain (and afterwards, walked back through cold rain)


  • Java Dev

    @levicki Some of my favourite macros:

    #define bzero_obj(o) memset(o, 0, sizeof *(o))
    #define bzero_arr(a, n) memset(a, 0, n * sizeof *(a))
    

  • Banned

    @levicki said in WTF Bites:

    Oops! So I'd say using what I was using results in exactly the same code.

    Or does it? That _Out_writes_bytes_all_(cnt) looks rather magical.



  • @MrL said in WTF Bites:

    Numbers in the wild (in Polish), that's something to behold.

    How true - Polish is likely the hardest to learn language in Europe.
    But look at the languages of American Indians. Their verbs contain the information on how the other words of the sentence relate to each other, plus many aspects (what 2 aspects only in Polish?), tense, person, determinateness, ...



  • So, multinational fast food chain Burger King just updated their website. It mostly doesn't work.

    Zoomed out screenshot of the landing page at the time of this post, for reference

    61789cd7-3818-4dd2-89f5-dac8879df42c-image.png


    • 33 links in the footer of their page including their social media icons, only one works (Trademarks). One of those links is a "Contact Us" link, which since it doesn't work, means I can't contact them to tell them their links don't work.
    • The copyright in the footer says 2018. That how long this redesign has been sitting in the wings being worked on?
    • The "Our Menu" link is just a shortcut to the store locator (the "Restaurants" link in the header), which is just a shortcut to their online order system (the "Order" link in their header).
    • Every location I can think to try either shows "Online Soon" on a disabled button (but has no UI hint that it is disabled) and a few in certain locations show "Order Here" but every one like that says "this restaurant isn't accepting mobile orders at this time"
    • The "Offers" link in the header and the "View All Offers" button lead to an offers page that just dies on a blank screen on load. The listed offers on the home page instead ask you to sign in, and if signed in, try to route you through the online order system.
    • Their sign in does work, but doesn't use a password, instead it sends a verification email that generates a link that is 1227 characters long to log you in.


  • @topspin said in WTF Bites:

    @MrL “80 blaze it” 🇫🇷

    BF641E35-B964-4266-BF3F-8E5EE06DB16D.jpeg

    Let's add Khmer (Cambodian): 90+5+2
    Unfortunately, Khmer "imported" the tens from 30 onwards from Thai, otherwise their originally vigesimal number system should use 4*20+10+5+2.
    But there are still some other languages with vigesimal systems.
    Chuckchi might still do so: https://www.omniglot.com/language/numbers/chukchi.htm
    5 fingers on a hand, then comes the second hand (i.e. 1 full hand + n fingers), the both hands make the new number 10. Next, add the feet, i.e. completed hands + (1 full hand/foot) + n fingers/toes, then you get to 20 as a unit. Then continue with that system. In the end, a vigesimal system is also based on 5.


  • BINNED

    @levicki said in WTF Bites:

    Oops! So I'd say using what I was using results in exactly the same code. Both RtlZeroMemory and SecureZeroMemory are just shorthands for memset where you don't have to specify the fill value.

    From MSDN:

    Use this function instead of ZeroMemory when you want to ensure that your data will be overwritten promptly, as some C++ compilers can optimize a call to ZeroMemory by removing it entirely.

    So, as the name of this function implies, its purpose is to ensure memory is zeroed in the face of compiler optimizations that recognize it's not otherwise observable from the compiler's point of view, as in:

    memset(p, 0, N);
    free(p);
    

    From cppreference:

    std::memset may be optimized away (under the as-if rules) if the object modified by this function is not accessed again for the rest of its lifetime (e.g. gcc bug 8537). For that reason, this function cannot be used to scrub memory (e.g. to fill an array that stored a password with zeroes). Solutions for that include std::fill with volatile pointers, C11 memset_s, FreeBSD explicit_bzero or Microsoft SecureZeroMemory.

    That seems to be what SecureZeroMemory does as well: cast the pointer to volatile.

    Now, if you think it doesn't do anything else than memset and you don't need secure erasing, why are you using it in the first place?

    @Gąska said in WTF Bites:

    @levicki said in WTF Bites:

    Oops! So I'd say using what I was using results in exactly the same code.

    Or does it? That _Out_writes_bytes_all_(cnt) looks rather magical.

    That's just annotation for static analysis, it doesn't do anything.



  • @topspin Also, the SecureZeroMemory seems to compile down to __stosb() (AMD64) which should result in a rep stosb according the the MS docs.

    Most fixed size std::memset() don't (assuming they aren't optimized away) - I often see them turn into a few movups or similar. Not going to dig into the instruction throughput/performance lists right now, but I would guess there's a reason for that (i.e., rep stosb isn't actually the most efficient choice).


  • BINNED

    @cvi I'd have thought they use more modern instructions than the old string processing ones. I think I've read that at least memmove / memcpy uses the XMM/AVX instructions/registers with higher throughput, possibly combined with Duff's device for alignment, which you don't otherwise see in the wild, but I don't really have a clue about it.



  • @levicki said in WTF Bites:

    You wouldn't use a bus to drive yourself to the corner shop and you probably shouldn't use movups / movntps unless you need to fill / copy more than 2 KB of data.

    MSVC is definitively replacing calls to memset() with movups et al. when it decides to inline it (fixed & small sizes, like typical structs).

    The code you posted is also branching to either SmallMov (<32 bytes) or XmmMovSmall (< 128 bytes) for small memsets. Based on the name, I'd guess that XmmMovSmall uses movups or something else SSE/AVX ("xmm" being the SSE/AVX registers). So, it looks like it uses the rep stosb for large moves and the movups ones for small ones.


  • Discourse touched me in a no-no place

    @levicki said in WTF Bites:

    I am using it out of habit and I think it's a good one.

    Hmm.... Sometimes, it is worth reexamining habits to determine if they are actually good or not.

    (Standard policy expected by MSVC devs: ZeroMemory after allocate, SecureZeroMemory before dispose if warranted.)



  • @topspin said in WTF Bites:

    why are you using it in the first place?

    He's building a struct that contains one required parameter and any number of optional parameters (right now up to two more, but that's changed in the past and could change in the future) to embed in another struct to send off to a security function. The parameters he's not using need to be set to null, and he doesn't want to list them out in full because some may be added in the future (and generate that warning again, but this time at WinVerifyTrust()).



  • @levicki said in WTF Bites:

        imul    eax, 01010101h
    

    Heh. Nice little trick.


  • Considered Harmful

    @levicki said in WTF Bites:

    Well let's assume, for the sake of the performance argument, that both code versions are getting sane input?

    In the beginning was the word, and the word was with the programmer, and the word was "assume". All WTFs were made through the word, and without the word nothing was made that was a WTF.
    —John Carmack


  • Considered Harmful

    @Gąska said in WTF Bites:

    FUCK EVERYONE WHO USES UNICODE MATHEMATICAL SYMBOLS FOR FUNCTION NAMES!!!!!

    Don't oppress the cultural identity of the Intramuros!!!11


  • Considered Harmful

    @Gąska said in WTF Bites:

    Filed under: U+1F4A9

    I hate having to duckduckgo that every effing time. They could at least have put it in the Hangul block under U+CACA or way up at U+FECE5.


  • Considered Harmful

    @HardwareGeek said in WTF Bites:

    Yes, that is descriptive, but having the same name for every function in the codebase is a bad idea.

    Given that a good deal of the 💩 volume is actually dead bits of mucosa, a proper editor should let you use skin tone modifiers. Also, some combining characters may be used for accessories: 💩ັ 💩ີ


  • BINNED

    @cvi said in WTF Bites:

    @levicki said in WTF Bites:

    You wouldn't use a bus to drive yourself to the corner shop and you probably shouldn't use movups / movntps unless you need to fill / copy more than 2 KB of data.

    MSVC is definitively replacing calls to memset() with movups et al. when it decides to inline it (fixed & small sizes, like typical structs).

    The code you posted is also branching to either SmallMov (<32 bytes) or XmmMovSmall (< 128 bytes) for small memsets. Based on the name, I'd guess that XmmMovSmall uses movups or something else SSE/AVX ("xmm" being the SSE/AVX registers). So, it looks like it uses the rep stosb for large moves and the movups ones for small ones.

    Wait, so it does use AVX instructions that address far larger sizes than the single bytes stosb addresses, but it uses them for small inputs only? Isn’t that reversed? Now I don’t understand anything anymore. 😕

    I think the order is SmallMove < XmmMovSmall < XmmMov.


  • Considered Harmful

    @BernieTheBernie said in WTF Bites:

    @Gąska said in WTF Bites:

    I don't care if it's in German or Cambodian

    ÄäÖöÜüß
    ហ្គាសក
    Hm, I guess I care.

    Yeß but how do you ẞ?!
    #define ẞcanf sscanf



  • @LaoC said in WTF Bites:

    Don't oppress the cultural identity of the Intramuros!!!11

    It's okay, we are not supposed to talk to Ita anyway.



  • @topspin said in WTF Bites:

    I think the order is SmallMove < XmmMovSmall < XmmMov.

    I think it's SmallMov < XmmMovSmall < (XMMMov|rep stosb). The choice between XMMMov and the string store depends on the __favor value, and not on the size of the input. rep stosb is essentially a loop (thanks to the rep prefix), so it's granularity is bytes, but ecx says how many.

    I did a quick search for the ERMSB that @levicki mentioned. There's a bunch of benchmarks and the results are bit all over the place. With ERMSB, apparently the rep stosb can end up using larger (nontemporal) stores internally (see here [warning SO]).



  • @levicki Are you by any chance running the cudaStreamDestroy() in a destructor of an object with global lifetime or in atexit()? I've had a lot of fun with order of destruction issues where the (hidden) cuda context gets iced before the call to e.g. cudaStreamDestroy(), and the symptoms have been somewhat similar ... sometimes, anyway.


  • Considered Harmful

    @levicki said in WTF Bites:

    Since I can't seem to find the cause for this and it's annoying me to no end while debugging here is a "solution" for it:

    #ifdef _DEBUG
    #define SWALLOW(x)	__try { x; } __except (EXCEPTION_EXECUTE_HANDLER) {}
    #else
    #define SWALLOW(x)	x
    #endif
    	...
    	SWALLOW(cudaStreamDestroy(Stream));
    

    NOTE: Don't do this in production code.

    Swallowing streams from undebugged sources is inherently unsanitary, no exceptions. Don't even try.


  • Considered Harmful

    ^^^


  • Banned

    MSDN:

    f3b9ffa7-a907-4fff-9012-5c1131b7fe62-obraz.png



  • @LaoC said in WTF Bites:

    @levicki said in WTF Bites:

    Well let's assume, for the sake of the performance argument, that both code versions are getting sane input?

    In the beginning was the word, and the word was with the programmer, and the word was "assume". All WTFs were made through the word, and without the word nothing was made that was a WTF.
    —John Carmack

    Sounds strikingly similar to what Elohim says in the game The Talos Principle:
    In the beginning were the words and the words made the world. I am the words. The words are everything. Where the words end the world ends. You cannot go forward in the absence of space. Repeat.
    These are probably both referencing something else I've never heard of before, aren't they?


  • Notification Spam Recipient

    @LB_ said in WTF Bites:

    These are probably both referencing something else I've never heard of before, aren't they?

    "hey Google: creation story"



  • @levicki Ok, fair. It was a bit of a wild-ass guess anyway.


  • Notification Spam Recipient

    @levicki said in WTF Bites:

    @Tsaukpaetra said in WTF Bites:

    "hey Google: creation story"

    What if scientists one day discover that everything around us including us was indeed created, not necessarily by God but, you know, some advanced Type II civilization like Jardaan from Mass Effect universe which created Angara species and started terraforming Heleus cluster?

    Would there make a difference?

    Any future speculation should probably be heralded in the salon/garage depending.


Log in to reply