WTF Bites



  • @TimeBandit said in WTF Bites:

    I created a Moodle plugin to delete old courses.

    :nelson:

    @TimeBandit said in WTF Bites:

    Of course, this plugin is part of the O365 plugin suite.

    :nelson: but bigger.

    I mean, the O365 was the biggest clusterfuck I ever saw, it never worked right and I had customers that were prepared to pay me money on an hourly rate to try to make it less shit and I was... uh... I ain't got nearly enough turd polish in stock for that.

    Bonus points if you're running the Moodle on Azure.



  • @Arantor said in WTF Bites:

    No, some portal involving my lawyers.

    Ah, lawyers.
    "No we can't remember anything. You have to tell is everything every time. At our usual rate, of course."
    At least they're being consistent...



  • @Arantor said in WTF Bites:

    Bonus points if you're running the Moodle on Azure on Windows.

    That would be crazy



  • @dcon they have two, they're both shit, and they're paying a lot of money for absolute rookies.



  • @TimeBandit why even involve Windows? Running Moodle on Azure regardless of backend was a complete clusterfuck. So many things would just spontaneously fail and Microsoft couldn't ever explain why. Not even that they didn't want to, they just couldn't.



  • @Arantor said in WTF Bites:

    So many things would just spontaneously fail and Microsoft couldn't ever explain why. Not even that they didn't want to, they just couldn't.

    Typical Microsoft support


  • Discourse touched me in a no-no place

    @TimeBandit said in WTF Bites:

    @Arantor said in WTF Bites:

    So many things would just spontaneously fail and Microsoft couldn't ever explain why. Not even that they didn't want to, they just couldn't.

    Typical MicrosoftEnterprise support



  • @loopback0 said in WTF Bites:

    Typical Enterprise support

    I always feel like Scotty knows WTF is going on, though Geordi needs help someimes.


  • Discourse touched me in a no-no place

    @Arantor said in WTF Bites:

    @loopback0 said in WTF Bites:

    Typical Enterprise support

    I always feel like Scotty knows WTF is going on, though Geordi needs help someimes.

    :yoda: What you did there, I see


  • BINNED

    @Arantor said in WTF Bites:

    @loopback0 said in WTF Bites:

    Typical Enterprise support

    I always feel like Scotty knows WTF is going on, though Geordi needs help someimes.

    :doubt:

    BCE66AE6-8BC6-4D22-BA95-A5DED0BB536A.gif



  • @LaoC Huh, boy, you weren't kidding about Traefik's config being a PITA.

    Doesn't help that they don't explicitly spell out the actual way to create a config (and it also doesn't help that there obviously was a rework of the rules so all those "helpful" tutorials out there do not work anymore)

    So, in case anyone else stumbles across this:

    The config is hard split into two parts: The "static" and the "dynamic" one. (I'm guessing the latter allows for dynamic reloading so you can append new sites without having to restart everything?) And this split extends in both a logical and a physical dimension.

    The static one is either done through command line commands or a configuration file (an XOR, mind!). For the dynamic part you then have to reference a "provider" in the static part - and the provider then does autodiscovery through Docker or reads stuff from a file.

    You cannot have the two living in the same file.

    It would really help if those documents didn't always rely on automagically discovering all the things.



  • @Rhywden said in WTF Bites:

    @LaoC Huh, boy, you weren't kidding about Traefik's config being a PITA.

    Doesn't help that they don't explicitly spell out the actual way to create a config (and it also doesn't help that there obviously was a rework of the rules so all those "helpful" tutorials out there do not work anymore)

    So, in case anyone else stumbles across this:

    The config is hard split into two parts: The "static" and the "dynamic" one. (I'm guessing the latter allows for dynamic reloading so you can append new sites without having to restart everything?) And this split extends in both a logical and a physical dimension.

    The static one is either done through command line commands or a configuration file (an XOR, mind!). For the dynamic part you then have to reference a "provider" in the static part - and the provider then does autodiscovery through Docker or reads stuff from a file.

    You cannot have the two living in the same file.

    It would really help if those documents didn't always rely on automagically discovering all the things.

    Yeah, I'm just finishing up fighting through a similar thing. Except I'm trying to set up the stable version, and the tooling I was given by the people who wrote it only applies to the (very differently configured) v1 branch.


  • Discourse touched me in a no-no place


  • Considered Harmful

    @Rhywden said in WTF Bites:

    @LaoC Huh, boy, you weren't kidding about Traefik's config being a PITA.

    Doesn't help that they don't explicitly spell out the actual way to create a config (and it also doesn't help that there obviously was a rework of the rules so all those "helpful" tutorials out there do not work anymore)

    I had no problem filtering out the old tutorials, but yeah, the split is really weird. Also took me a while to find out that for HTTP, TLS is a parameter of the endpoint while for TCP it belongs to the router :facepalm:
    When I commented to a coworker how utterly shit the error messages are, he said they "got a lot better from 2.5 on". I never even tried anything below 2.9.


  • Discourse touched me in a no-no place

    @Rhywden said in WTF Bites:

    It would really help if those documents didn't always rely on automagically discovering all the things.

    Finding things reliably in a way you can comprehend? Not modern enough!


  • Java Dev

    I dunno what kinda storage array I would need to install this, not that the mkfs would support it anyway.

    size-too-big.png



  • @Atazhaia Guess going zetta-scale will require a new mkfs... 🍹



  • @TimeBandit I'm not sure I understand. What should be done instead if none found?
    For me the problem lies in the calling code (i.e. the plugin) assuming it would always be found...



  • @LaoC said in WTF Bites:

    @Rhywden said in WTF Bites:

    @LaoC Huh, boy, you weren't kidding about Traefik's config being a PITA.

    Doesn't help that they don't explicitly spell out the actual way to create a config (and it also doesn't help that there obviously was a rework of the rules so all those "helpful" tutorials out there do not work anymore)

    I had no problem filtering out the old tutorials, but yeah, the split is really weird. Also took me a while to find out that for HTTP, TLS is a parameter of the endpoint while for TCP it belongs to the router :facepalm:
    When I commented to a coworker how utterly shit the error messages are, he said they "got a lot better from 2.5 on". I never even tried anything below 2.9.

    It would have helped if there was a Warning log level message like: "Encountered dynamic config when only static configuration was expected in this file" or something.

    Kind of like VisualStudio's message about "Oy, you declared this variable but never use it. Are you sure that's right?"


  • BINNED

    I’m not sure if there is an upper limit on how stupid advertisements can get, but seriously, :wat-girl:.

    04418900-7B22-4CD4-B22B-A33592309C5F.jpeg



  • @Medinoc said in WTF Bites:

    assuming it would always be found...

    This. The code calling it doesn't check the return value and blindly use it in the next call, which cause the error.

    I didn't investigate if the code could still do the job without that parameter. If so, then the null value should be replaced with an empty string.


  • I survived the hour long Uno hand

    @topspin said in WTF Bites:

    I’m not sure if there is an upper limit on how stupid advertisements can get, but seriously, :wat-girl:.

    04418900-7B22-4CD4-B22B-A33592309C5F.jpeg

    It's too bad you didn't get the adult feed version of the Pearl Necklace advertisement 🍹

    (I do not recommend searching for that term while at work)


  • Considered Harmful

    @izzion said in WTF Bites:

    (I do not recommend searching for that term while at work)

    butyoudo.gif


  • Notification Spam Recipient

    @izzion said in WTF Bites:

    @topspin said in WTF Bites:

    I’m not sure if there is an upper limit on how stupid advertisements can get, but seriously, :wat-girl:.

    04418900-7B22-4CD4-B22B-A33592309C5F.jpeg

    It's too bad you didn't get the adult feed version of the Pearl Necklace advertisement 🍹

    (I do not recommend searching for that term while at work)

    I'm not finding particularly abnormal things for "Pearl necklace". Perhaps I'm. :doing_it_right:


  • BINNED

    @Tsaukpaetra
    Can't believe you turned on safe search


  • Notification Spam Recipient

    @Luhmann said in WTF Bites:

    @Tsaukpaetra
    Can't believe you turned on safe search

    Not by choice!

    That is to say: everything claims I have not done so.



  • @Luhmann said in WTF Bites:

    @Tsaukpaetra
    Can't believe you turned on safe search

    You're making assumptions about @Tsaukpaetra levels of "abnormal".


  • BINNED

    Looks at my Mayan calendar ...
    What year is this?!

    Bildschirm­foto 2023-04-21 um 12.57.19.png


  • Java Dev

    @topspin said in WTF Bites:

    What year is this?!

    The current year is 13.0.10, if I got my numerals right.



  • @topspin Also: why 2 GiB (as opposed to 4 GiB)? Do they use a signed 32 bit integer variable to indicate the position in the file?


  • Java Dev

    @BernieTheBernie said in WTF Bites:

    @topspin Also: why 2 GiB (as opposed to 4 GiB)? Do they use a signed 32 bit integer variable to indicate the position in the file?

    Windows 9x had a maximum file size of 2GiB. So yes, probably signed. I also recall it not reporting more than 2GiB of free space on a file system in at least some contexts.


  • Discourse touched me in a no-no place

    @BernieTheBernie Probably use the 32-bit seeking API, as that is signed (because you can also move to points relative to the end or the current position). Why they haven't bothered to recompile to do away with the limitation...


  • Considered Harmful

    @BernieTheBernie said in WTF Bites:

    @topspin Also: why 2 GiB (as opposed to 4 GiB)? Do they use a signed 32 bit integer variable to indicate the position in the file?

    ftell(3) and related calls have always used a signed offset, if only for in-band error signalling.



  • @LaoC said in WTF Bites:

    ftell

    Is that a combination of fortune and tell?
    :belt_onion: fortune was fun...


  • Java Dev

    @LaoC said in WTF Bites:

    @BernieTheBernie said in WTF Bites:

    @topspin Also: why 2 GiB (as opposed to 4 GiB)? Do they use a signed 32 bit integer variable to indicate the position in the file?

    ftell(3) and related calls have always used a signed offset, if only for in-band error signalling.

    ftell and fseek both use off_t for offsets, and as mentioned above in fseek it has to be signed because it can also be relative to the current file position or to the end of the file.

    On 64-bit platforms, off_t is 64 bits and you automatically get the 64-bit versions of the calls. But even on 32-bit you can access the 64-bit versions of the calls and type.



  • @BernieTheBernie said in WTF Bites:

    fortune was fun...

    10dedb81-6f7c-45f7-bd61-7db51adaa337-image.png

    :(


  • Considered Harmful

    @PleegWat said in WTF Bites:

    @LaoC said in WTF Bites:

    @BernieTheBernie said in WTF Bites:

    @topspin Also: why 2 GiB (as opposed to 4 GiB)? Do they use a signed 32 bit integer variable to indicate the position in the file?

    ftell(3) and related calls have always used a signed offset, if only for in-band error signalling.

    ftell and fseek both use off_t for offsets, and as mentioned above in fseek it has to be signed because it can also be relative to the current file position or to the end of the file.

    Glibc just uses long which is as well because off_t is only defined as a "signed integer" without any size requirements anyway.



  • @LaoC said in WTF Bites:

    long

    Is one of the types that isn't consistent between Linux and Windows.

    On Linux, it's 32 bits on 32 bit systems and 64 bits on 64 bit systems. On Windows, long is always 32 bits.

    Not the greatest choice either, if you aim for portability.


  • Discourse touched me in a no-no place

    @cvi The requirement by the C standard is simple:
    sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)
    And there must be constants describing the range of values each type supports (in the relevant header).

    ...

    Yes, there have been platforms where they were all the same size. Damnit, Cray!


  • Considered Harmful

    @cvi said in WTF Bites:

    @LaoC said in WTF Bites:

    long

    Is one of the types that isn't consistent between Linux and Windows.

    On Linux, it's 32 bits on 32 bit systems and 64 bits on 64 bit systems. On Windows, long is always 32 bits.

    Not the greatest choice either, if you aim for portability.

    Honey, Drepper don't care.



  • @dkf said in WTF Bites:

    And there must be constants describing the range of values each type supports (in the relevant header).

    Isn't there also a minimum range for each of the type? (Might be a separate requirement from the standard library, so a freestanding environment wouldn't need to respect that.)

    Either way, all being equal is still possible.



  • @PleegWat said in WTF Bites:

    @LaoC said in WTF Bites:

    @BernieTheBernie said in WTF Bites:

    @topspin Also: why 2 GiB (as opposed to 4 GiB)? Do they use a signed 32 bit integer variable to indicate the position in the file?

    ftell(3) and related calls have always used a signed offset, if only for in-band error signalling.

    ftell and fseek both use off_t for offsets, and as mentioned above in fseek it has to be signed because it can also be relative to the current file position or to the end of the file.

    No, they don't.

    @LaoC said in WTF Bites:

    Glibc just uses long which is as well because off_t is only defined as a "signed integer" without any size requirements anyway.

    It isn't as well. off_t is used by the lseek syscall, so it's size is defined by the kernel. The long does not necessarily follow that size. There are ftello and fseeko that use the same off_t as lseek

    On 64-bit platforms, off_t is 64 bits and you automatically get the 64-bit versions of the calls. But even on 32-bit you can access the 64-bit versions of the calls and type.

    Yes. But it does not affect the stdio functions fseek and ftell, because those use long.

    @cvi said in WTF Bites:

    Not the greatest choice either, if you aim for portability.

    Glibc does not aim for portability (to different operating systems; it does aim for portability to different architectures, but only to Linux and similar kernels).

    @cvi said in WTF Bites:

    On Linux, it's 32 bits on 32 bit systems and 64 bits on 64 bit systems. On Windows, long is always 32 bits.

    Okteta is a KDE component, so it is almost certainly running on Linux. And since the x32 target never really caught on, is almost certainly compiled with both 64-bit off_t and 64-bit long.

    But … it's a KDE component, so it probably uses a QFile rather than libc's FILE. Which … makes it even worse, because Qt uses explicit qint64 for file sizes and offsets.

    So, yeah, :wtf:


  • BINNED

    @dkf said in WTF Bites:

    @cvi The requirement by the C standard is simple:
    sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)
    And there must be constants describing the range of values each type supports (in the relevant header).

    ...

    Yes, there have been platforms where they were all the same size. Damnit, Cray!

    I thought the standard also required sizeof(short) < sizeof(long). Which means int can only equal at most one, and having those three equal is Wrong.

    But maybe that’s a newer standard than such systems. It’s also possible I don’t really care about the nuances :kneeling_warthog:


  • Discourse touched me in a no-no place

    @kazitor The C Standard doesn't even require 8 bit bytes or 32 bit words. Or 2s complement integer arithmetic. Or that sizeof(char *) == sizeof(void *). If they would just cut loose a few really crazy platforms that almost nobody uses, they could simplify things a lot.



  • @dkf said in WTF Bites:

    Or 2s complement integer arithmetic.

    I heard somewhere relatively recently (~5 years ago, maybe) that there are some widely used microcontrollers (where they from Hitachi? I don't remember the type designation) that don't use 2's complement.

    Sure, most code never needs to run on that kind of things, but the C compilers do need to target them, so the standard still leaves the room for such quirks.


  • Considered Harmful

    @Bulb said in WTF Bites:

    @dkf said in WTF Bites:

    Or 2s complement integer arithmetic.

    I heard somewhere relatively recently (~5 years ago, maybe) that there are some widely used microcontrollers (where they from Hitachi? I don't remember the type designation) that don't use 2's complement.

    AFAIK, Unisys mainframes still use ones' complement even though their hardware is all Intel by now. I've never seen one of these but Wikipedia says they employ 16,000 people so I suppose there are quite a few of them still sitting in bank basements or military bases.


  • Discourse touched me in a no-no place

    @Bulb said in WTF Bites:

    @dkf said in WTF Bites:

    Or 2s complement integer arithmetic.

    I heard somewhere relatively recently (~5 years ago, maybe) that there are some widely used microcontrollers (where they from Hitachi? I don't remember the type designation) that don't use 2's complement.

    Sure, most code never needs to run on that kind of things, but the C compilers do need to target them, so the standard still leaves the room for such quirks.

    And they could use an older version of the standard.



  • @LaoC said in WTF Bites:

    AFAIK, Unisys mainframes still use ones' complement even though their hardware is all Intel by now.

    It's the only example in N2218 Signed Integers are Two’s Complement for something that still runs and isn't two's complement. (They do note that it runs on Intel+FPGAs now.)

    IIRC C++20 now mandates two's complement. The idea is, as @dkf says, that if they want something else, they can use an older standard.


  • Java Dev

    @HardwareGeek said in WTF Bites:

    @BernieTheBernie said in WTF Bites:

    fortune was fun...

    10dedb81-6f7c-45f7-bd61-7db51adaa337-image.png

    :(

    You need a better database! 🍹

    fortune-o.png



  • So last night I was setting up a new virtual hard drive for my Amiga emulation environment. Long story, not relevant.

    The first fun hurdle I get:
    541887f1-845d-4cae-97ce-aabb9a3fd655-image.png

    The operating system knows that the volume BraveNewWorld has a total of 4GB - of which '3339M' is free. (In reality it's a passthrough to a folder, the drive is a 500GB drive with 120+GB free so it's already lying about the drive size)

    But as you can see, the Workbench installer is confused about the amount of space I have.

    If I follow the text as given, "dragging the icon of the Amiga Fonts disk version 3.1 on top of the BraveNewWorld icon", I get a weird and spurious error that the two things are differently sized.

    Then I was installing a tool called Imagemaster.

    89d83f03-e2d9-4b6e-836d-dfabafe99751-image.png

    "This installation requires about 7606088 bytes free on the volume where you wish to install Imagemaster. Please make this space available and the re-install. For your information, the volume you have selected has only -1100857344 bytes free. You need 1108463432 more bytes."

    In reality I just nudged the emulation config to lie about the drive size and claim it was a 1GB drive rather than the 4GB it was already lying about being.

    Old tech, eh?


Log in to reply