WTF Bites



  • @LaoC said in WTF Bites:

    @Bulb said in WTF Bites:

    @Benjamin-Hall Well,

    says:

    Note: Parsing of date strings with the Date constructor (and Date.parse, they are equivalent) is strongly discouraged due to browser differences and inconsistencies.

    And then the example has the T separator instead of space as is the default ISO-8601 separator.

    So it discourages the constructor, says they're working on something sane that's not ready yet—and the implication is, "please roll your own", isn't it?

    Ain't we used to that?

    Because standard library for JavaScript requires all the browser vendors out there to agree on it and implement it, getting tools for all the common tasks in it is difficult, so rolling your own – or rather importing one somebody rolled – is the most practical approach anyway.

    It's not even specific to JavaScript. Only languages that have only one, or one main vendor—Java, C# (.нет), Python—have big standard libraries with tools for most common tasks. Languages like C and C++ don't because of the same problem of needing the main compiler vendors to agree on anything that should be added, and actually adding it.

    And then there are languages that choose not to have a big standard library anyway because of the backward compatibility requirements that tend to devolve into ass-backward compatidebility sooner or later, like Rust. Because if someone rolls a datatme library, and the interface turns out to be lacking, they can ship new major version with different interface and you can keep using the old version until you get enough round toits to update the code. But in standard library the old interface has to be maintained for unforeseeable future. Seen all those functions with Ex suffix in Windows API?


  • 🚽 Regular

    @LaoC said in WTF Bites:

    says they're working on something sane that's not ready yet

    Well, a Date constructor takes time.

    :rimshot:


  • Considered Harmful

    @Zecc said in WTF Bites:

    @LaoC said in WTF Bites:

    says they're working on something sane that's not ready yet

    Well, a Date constructor takes time.

    :rimshot:

    What? It's only 04 October 2005 20:22.


  • BINNED

    People Bite: I googled how to escape single quotes in matlab. There's two obvious things to try, I tried the wrong one before googling, the other one works.
    Anyway, the first sentence of the accepted answer on the matlab forum: "Not sure why you would want something like that."
    Fuck. Off! 🍊

    Stack Overflow is spreading.



  • @topspin There's always ['hello ' char(39) ' world'] 🏆

    Filed under: because strings are obviously row-vectors of characters


  • Discourse touched me in a no-no place

    @Bulb said in WTF Bites:

    Languages like C and C++ don't because of the same problem of needing the main compiler vendors to agree on anything that should be added, and actually adding it.

    A significant part of the C community doesn't want any standard library at all because they'll supply their own that works better in the very specific use cases that they're working with. (Seriously, glibc is really bloated when you're working in a very restricted environment.)


  • BINNED

    @dkf said in WTF Bites:

    Seriously, glibc is really bloated when you're working in a very restricted environment

    What does it even do to cause that? I mean that as in: are other implementations (musl?) incomplete or why are they smaller?



  • @dkf said in WTF Bites:

    @Bulb said in WTF Bites:

    Languages like C and C++ don't because of the same problem of needing the main compiler vendors to agree on anything that should be added, and actually adding it.

    A significant part of the C community doesn't want any standard library at all because they'll supply their own that works better in the very specific use cases that they're working with. (Seriously, glibc is really bloated when you're working in a very restricted environment.)

    That's why the concept of “non-hosted environment” exists. Does not apply all that much to C++ though. Most C++ code is for regular computers where powerful standard library would be desired.

    @topspin said in WTF Bites:

    @dkf said in WTF Bites:

    Seriously, glibc is really bloated when you're working in a very restricted environment

    What does it even do to cause that? I mean that as in: are other implementations (musl?) incomplete or why are they smaller?

    Musl only keeps much lighter locale support, does not have much of the name service switch machinery (that allows things like users from ldap or kerberos almost nobody uses—and that's posix, not plain C anyway), does not have all those character encoding conversion tables including ebcdic and whatnot, does not have optimized versions of various routines for all sorts of cpu variants, etc.


  • Discourse touched me in a no-no place

    @topspin said in WTF Bites:

    What does it even do to cause that?

    It's got quite a bit of code to handle things like a misaligned memcpy(); if you are never feeding it misaligned buffers, you really don't need that. It also has quite a bit of code inside the guts of sprintf() for printing double precision floating point numbers; it's not much use to applications that print (logging is a thing even in embedded applications), but never print doubles (or floats) yet the compiler+linker for sure isn't going to be smart enough to exclude it for you automatically. On some architectures, libgcc has quite a lot of bloat as well (e.g., we want any use of double to fail, as there's no hardware support and the software emulation is ghastly). We have our own versions of all sorts of little things like that; they're much smaller and faster, but at a cost of some generality (which is acceptable to us).

    Being able to build for standalone applications (i.e., no operating system at all, and no assumption of standard library) is actually a required operating mode for C and C++ compilers. Not that they all actually obey that part of the spec.



  • @dkf Indeed that is a required use-case. But it is orthogonal to what a standard library contains on the systems where it can be present. There it's still mainly about compiler vendors all having to agree on and include the functionality, where an add-on built on top of slim standard library can be dropped in without much coordination needed anywhere.


  • Considered Harmful

    @topspin have you tried using half of a double quote?

    Like a civilized person might do?

    If you must needs lay about you with the ape jawbone of a legacy single quote, then tho I suppose needs must.

    Why'd y'all wannot go'n d'that for...



  • WTF of my day: So, after having received the definite word from my landlord that I have to take care of installing a car charger myself, I promptly went out and ordered one plus the installation service alongside it.

    The way this works is that you put down a fixed amount of money (1,380€ to be exact) and this includes an electrician inspecting the premises, installing the charger and of course the charger itself. Plus a 2-year warranty. Now, this may not be the final amount as the initial cost includes a limit to the amount of installation work done which is reasonable - so, for example, drilling through 2 meters of concrete is not included. Said limits are clearly defined, however. Plus, after the initial inspection you get a quotation so you'll be informed exactly as to what will be done and as to the additional costs. At that point you can still decline and get all the money back (no inspection fees).

    This amount is not outlandish, by the way, we're talking about installing a longer cable capable of sustaining 11 kW and hooking it up to the grid.

    Up to this point, only backstory, no :wtf:

    After I ordered, I got an email from the company (a subsidiary of VW - so subsidiary in fact that you'll be greeted with "Welcome to Volkswagen!" when you call them, instead of the company name) stating that after the initial check, delivery times would be two to three weeks and that installation would be coupled to delivery of the charger. Well, again, reasonable so far.

    Only snag: When is the initial check supposed to happen? I looked through the emails and the attachments, didn't see it. So, after waiting for 4 work days (in case they'd call on their own) I phoned them instead.

    And got a very confused support drone. Remember how the company is a "subsidiary" of VW? Well, I explained to the support guy that I ordered a charger from them and that I didn't yet know when the checkup was supposed to happen as I did not find the information.

    🃏 Well, I see here three closed tickets, the last one on January?
    🧙 Yes, that was about my car. But, no, I ordered the charger last week, 30th of March.
    🃏 Oh, so this is about our charging tariffs for charging on the go?
    🧙 No? This is about your charging box for the home along with the installation service
    🃏 So, you want to know when the box is going to be delivered?
    🧙 No, I want to know about the date for the installation service
    🃏 Right, I see. So, you ordered on the 29th of March...
    🧙 30th!
    🃏 Please hold the line

    At that point, after going through the documents again, I had found the passage talking about the installation service - it promised that someone would contact me "inside two work days". Well, with it now having been four workdays, that's a bit overdue then.

    🃏 Well, can I have your number so someone can call you back?

    I'll give them till the end of the week and if I haven't heard from them till then, I'll probably cancel the contract.


  • Java Dev

    @Rhywden It is good to be careful. You don't want something like this to happen, where apparently they hit a gas line while installing a car charger.



  • @PleegWat said in WTF Bites:

    You don't want something like this to happen

    Yeah, it appears to be Dutch. I definitely don't want that to happen. :tro-pop:


  • 🚽 Regular

    @topspin said in WTF Bites:

    I googled how to escape single quotes in matlab.

    You can't. They will track you down and get you sooner or later.

    * EVIL LAUGH *


  • Considered Harmful

    @PleegWat sudden, virulent aphasia, you wargle



  • @PleegWat said in WTF Bites:

    @Rhywden It is good to be careful. You don't want something like this to happen, where apparently they hit a gas line while installing a car charger.

    The people across the street have a NEST doorcam.
    https://www.youtube.com/watch?v=GYf1ztYY0gs



  • @nerd4sale said in WTF Bites:

    explosie

    That's one way to get views for your video. Worked for me.



  • @Rhywden said in WTF Bites:

    cable capable of sustaining 11 kW

    Like for e.g. a kitchen stove.

    By the way, with some 15 kWh per 100 km, and a charging time of some 12 hours overnight, you could easily get a re-charge for such a distance with a common line: compare that with some 2 kW used by a tumble drier, times 12 hours = 24 kWh.
    Of course, charging after long tours would be an issue, but for everyday use ...?
    But the industry wants to eat up all the money - clearly beyond 1,000 Euros as you showed us - made available thru stupid political subsidies.



  • @Rhywden said in WTF Bites:

    cable capable of sustaining 11 kW

    :pendant:: cables are rated for intensity, not power. Are you sure you're a physics teacher? 🚋


  • Discourse touched me in a no-no place

    @Zerosquare said in WTF Bites:

    @Rhywden said in WTF Bites:

    cable capable of sustaining 11 kW

    :pendant:: cables are rated for intensity, not power. Are you sure you're a physics teacher? 🚋

    I'm guessing that they're really rated for current (cross-sectional size and material of conductor) and voltage (thickness and material of surrounding insulator), but that has an implied power.



  • @dkf said in WTF Bites:

    that has an implied power

    after you factor in the sin of phase.


  • Considered Harmful

    @BernieTheBernie said in WTF Bites:

    the sin of phase

    On what grounds is phase sinful?


  • Considered Harmful

    @Applied-Mediocrity said in WTF Bites:

    @BernieTheBernie said in WTF Bites:

    the sin of phase

    On what grounds is phase sinful?

    I'd say phase on on yellow/green definitely is.



  • @Applied-Mediocrity Ask your GFCI (ground fault circuit interrupter).


  • Notification Spam Recipient

    STATUS My work VM is shitting the bed in a new and interesting way. Every time I copy and paste from Word this happens.

    b911f957-b1df-4b68-9120-2bf1d6237d46-image.png

    If I've just doxxed myself, just fire me. I'm sick of your technical support people.


  • Discourse touched me in a no-no place

    @BernieTheBernie said in WTF Bites:

    after you factor in the sin of phase.

    Heating elements are almost entirely resistive, so not much factoring needed.



  • @dkf So much resistance against the sin of pun. Gigaohms? TeraOhms? :wtf:Ohms!


  • Considered Harmful

    @DogsB said in WTF Bites:

    If I've just doxxed myself, just fire me.

    ⚠ Industries does not tolerate the unauthorized use of ⚠ Industries trade or service marks or other protected intellectual property.


  • Considered Harmful

    @BernieTheBernie said in WTF Bites:

    @dkf So much resistance against the sin of pun. Gigaohms? TeraOhms? :wtf:Ohms!

    I see no such term expressed in the system behavior.



  • @Zerosquare said in WTF Bites:

    @Rhywden said in WTF Bites:

    cable capable of sustaining 11 kW

    :pendant:: cables are rated for intensity, not power. Are you sure you're a physics teacher? 🚋

    Considering that the voltage is usually fixed, it's a useful equivalent. But, sure, rated for three-phase 16A, then.


  • Grade A Premium Asshole

    I need to install Docker again. I go to see if anything has changed and looking at their install walkthrough I see something:

    Screen Shot 2022-04-06 at 12.22.23 PM.png

    The fuck? You can run Docker on System/390? Who the fuck needed to do that, and why? AFAIK System/390 was discontinued in the 90's.

    Someone out there is managing some serious :wtf:s and they need to come tell us about them.



  • @Polygeekery said in WTF Bites:

    The fuck? You can run Docker on System/390? Who the fuck needed to do that, and why? AFAIK System/390 was discontinued in the 90's.

    It was “discontinued” in the sense of obsoleted by newer design. The IBM Z product line is still alive, currently up to z15. At least Wikipedia says so.



  • @Polygeekery :trwtf: is that it is not supported on all platforms Linux is (as long as you build it yourself for the obscure ones). It shouldn't be doing anything architecture-specific.


  • Considered Harmful

    @Polygeekery IBM has been somewhere in the range of quietly promoting / quietly tolerating Linux on Z for some years acktshuallly



  • @Polygeekery said in WTF Bites:

    I need to install Docker again.

    Also, I now prefer podman on Linux. It runs under each user separately, so rootless unless you run it through sudo. And Kubernetes has mostly switched to plain containerd, but the docker-compatible cli nerdctl is not packaged in Debian yet.



  • @Bulb said in WTF Bites:

    @Polygeekery :trwtf: is that it is not supported on all platforms Linux is (as long as you build it yourself for the obscure ones). It shouldn't be doing anything architecture-specific.

    Does it not use hardware virtualization? If so, that's pretty architecture-specific.


  • Considered Harmful

    @Zerosquare said in WTF Bites:

    @Bulb said in WTF Bites:

    @Polygeekery :trwtf: is that it is not supported on all platforms Linux is (as long as you build it yourself for the obscure ones). It shouldn't be doing anything architecture-specific.

    Does it not use hardware virtualization? If so, that's pretty architecture-specific.

    No, you can run it even on a VM. It isolates containers using OS features like cgroups.
    I suppose it will work fine pretty much everywhere (my MIPS and HP/PA boxes all got ditched somewhere between continents so I can't check now—qemu :kneeling_warthog:) but the Docker team doesn't have enough expertise and hardware to commit to officially supporting other architectures.



  • @Zerosquare said in WTF Bites:

    @Bulb said in WTF Bites:

    @Polygeekery :trwtf: is that it is not supported on all platforms Linux is (as long as you build it yourself for the obscure ones). It shouldn't be doing anything architecture-specific.

    Does it not use hardware virtualization? If so, that's pretty architecture-specific.

    It's pretty much the point that it does not. The containerized process is just a process under the host kernel with restricted view of the filesystem, network, other processes and devices, which means the only overhead is the couple of kernel structures defining that view, and the second copy of some libraries. The layered structure of the containers even means that if you have two containers running that share the base layer, the shared libraries from those layers will only be loaded once, because the kernel still sees they are the same file. That's what makes docker practical for many uses VMs not really are.



  • @Bulb I recall trying to install it on Windows, and it refused to do so unless you changed some actual virtualization setting, maybe even something in the bios. But that's only on Windows: In Linux, even a Linux guest VM, it Just Worked™



  • @hungrier yup, Docker on Windows wants VirtualBox or HyperV if you run Linux containers. WSL2 is also supported, I think.



  • @hungrier said in WTF Bites:

    @Bulb I recall trying to install it on Windows, and it refused to do so unless you changed some actual virtualization setting, maybe even something in the bios. But that's only on Windows: In Linux, even a Linux guest VM, it Just Worked™

    That's because the containers are designed to run under Linux, so it needs a Linux and it installed in VM. It has since switched to WSL2, but I believe that still uses some bits of the virtualization support. It also needs a Linux VM when installed on MacOS.



  • @Arantor said in WTF Bites:

    WSL2 is also supported, I think.

    WSL2 has been the default for quite a while.



  • a2bbda77-f3c6-4906-94ff-1a8550c3f7bc-image.png

    Naturally, the cancel button here does nothing, and the rest of VS aside from this modal spinner is completely frozen



  • @hungrier doesn't VS stand for Very Slow?



  • @Arantor Usually it's ok but sometimes it Verymuch Sucks



  • @hungrier said in WTF Bites:

    @Arantor Usually it's ok but sometimes it Verymuch Sucks

    Still better than xcode.


  • Fake News



  • @dcon said in WTF Bites:

    @hungrier said in WTF Bites:

    @Arantor Usually it's ok but sometimes it Verymuch Sucks

    Still better than xcode.

    That bar isn't just low, it's embedded somewhere near the center of the earth. If it were possible to get lower, xCode would find a way.


  • Discourse touched me in a no-no place

    @dcon said in WTF Bites:

    Still better than xcode.

    Ebola is a haemorrhagic virus that causes many of its victims to die horrible deaths, bleeding out of all their orifices. It's extremely high up the list of diseases you really don't want to get.

    It's also better than Xcode.


Log in to reply