WTF Bites


  • kills Dumbledore

    @Jaloopa The error does occur in live, it's just swallowed by the console and the page works, whereas on UAT and dev it throws up an error that seems to stop the dropdown from showing up



  • @Jaloopa I posted a much, much worse nested table tree, somewhere up thread...


  • BINNED

    @Jaloopa said in WTF Bites:

    if... = false. An anti pattern I see a lot in the codebase.

    This should be a hanging offense, especially since If Not is used further down in the code, so whoever wrote that has to know about it. On the other hand, having to code in VB is probably punishment enough.


  • area_can

    Leveraging post-literate tools like YouTube

    😆

    Graduating from the most recent batch of Y Combinator

    :/



  • The Linux file system layer is called "Virtual File System". This makes no sense as all file systems are equally virtual.

    Also, who the hell writes quotes like this?
    0_1490972159393_upload-94a29b43-5991-417a-aabb-5da942a7496f


  • area_can

    @anonymous234 people who are used to LaTeX


  • FoxDev

    @anonymous234 said in WTF Bites:

    Also, who the hell writes quotes like this?
    0_1490972159393_upload-94a29b43-5991-417a-aabb-5da942a7496f

    That's... special.


  • kills Dumbledore

    @bb36e said in WTF Bites:

    @anonymous234 people who are used to LaTeX

    Don't be silly. Nobody is used to LaTeX


  • BINNED

    @RaceProUK said in WTF Bites:

    That's... special.

    So is LaTeX.



  • @Jaloopa said in WTF Bites:

    @bb36e said in WTF Bites:

    @anonymous234 people who are used to LaTeX

    Don't be silly. Nobody is used to LaTeX

    I very much prefer LaTeX over Word.



  • in standard kernel wording "get" means "allocate and fill", "read" means "fill" and "put" means "release"

    I guess "fill" and "release" would have been too easy.



  • Penis.


  • BINNED

    @anonymous234 said in WTF Bites:

    The kernel doesn't even remember the file name after opening it.

    Why should it? You can remove or move or rename it and all that matters is the handle to the inode. On the other hand, on windows you cannot delete/move/rename a file that has an open file handle!

    @anonymous234 said in WTF Bites:

    So if you want to make a dynamic file system, let's say /proc/, you can't just parse the address "/proc/1234/mem" whenever someone requests it, no, you have to generate all the files you want on the first time anyone reads /proc/1234, then invent a new number for each of those, then add the names and numbers to a table in memory and keep it forever in case someone requests file 123458266.

    Are you talking about FUSE?
    Why do you want to emulate /proc? Do you also emulate Windows registry very often?



  • @dse remembering the path and name of a file should not be mutually exclusive with being able to move/rename/delete the file while it is open. Though I would argue that it doesn't make much sense to delete an open file.


  • BINNED

    @LB_ said in WTF Bites:

    Though I would argue that it doesn't make much sense to delete an open file.

    Do you want to restart anytime you want to update?



  • @LB_ said in WTF Bites:

    Though I would argue that it doesn't make much sense to delete an open file.

    If a file can have more than one name, why can't it have zero names?

    Think about it this way - you can create a temporary file on Linux without giving it a name. If your program crashes, there's nothing to clean up.

    You can create a file and populate its contents before giving it a name. No more making foo.zip.tmp and renaming it.



  • @ben_lubar @dse I agree that not having any names is not the same as deleting the file. I would be satisfied if there was a function that, given the file ID/handle/whatever, gave you a list of all the names. I would not be satisfied if the file I was reading was suddenly deleted.



  • @LB_ said in WTF Bites:

    I would not be satisfied if the file I was reading was suddenly deleted.

    You wouldn't notice. As long as you hold the file handle, the file's contents will remain readable to you (ok, technically, somebody could go and manually truncate the file before deleting it, but that's not commonly done).


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    I very much prefer LaTeX over Word.

    At least you found the right topic for such a statement.



  • @bb36e "post-literate" is a scary word combination.



  • @Medinoc said in WTF Bites:

    @bb36e "post-literate" is a scary word combination.

    Just think, some advanced future civilisation might devise a way to imbue our emoticon pictographs with abstracted meaning and join them together in novel combinations according to lexical rules - imagine the exciting possibilities...

    :(


  • BINNED

    0_1491053750518_upload-c7040190-3c06-4db0-8f0a-d9df8c0b8e11

    Yup. Steam. Yes. Quality. 7/10.

    Pls to port to Discourse or NodeBB. Less bugs there. FFS.


  • Java Dev

    @anonymous234 said in WTF Bites:

    Oh, and the entire file system design DEPENDS on each file having an inode and each inode being directly indexable by number. The kernel doesn't even remember the file name after opening it.

    So if you want to make a dynamic file system, let's say /proc/, you can't just parse the address "/proc/1234/mem" whenever someone requests it, no, you have to generate all the files you want on the first time anyone reads /proc/1234, then invent a new number for each of those, then add the names and numbers to a table in memory and keep it forever in case someone requests file 123458266.

    Real fucking forward thinking there.

    Actually modern kernels do hang on to the original name - it's in the /proc/self/fd/* symlinks.

    Also, I expect the inode values in /proc are computed (since that's how I'd do it). Combined with either hardcoded or assigned-during-registration sequence numbers for specific files.

    @LB_ said in WTF Bites:

    @ben_lubar @dse I agree that not having any names is not the same as deleting the file. I would be satisfied if there was a function that, given the file ID/handle/whatever, gave you a list of all the names. I would not be satisfied if the file I was reading was suddenly deleted.

    A file without any names is deleted when no process has it open anymore, or (I think) when the filesystem is mounted.



  • @loopback0 said in WTF Bites:

    @cvi said in WTF Bites:

    I very much prefer LaTeX over Word.

    At least you found the right topic for such a statement.

    Indeed.

    Doesn't make it less true, though.



  • 0_1491201492300_q.PNG



  • @anonymous234 said in WTF Bites:

    in standard kernel wording "get" means "allocate and fill", "read" means "fill" and "put" means "release"

    No, ‘get’ means “get me a reference I can use, whatever it takes”. What it takes depends on the type. For most it simply increments reference count, but for some it looks up in cache and reads it if it's not there. ‘put’ is then simply opposite of ‘get’. Yes, ‘release’ is more common for this.

    I guess "fill" and "release" would have been too easy.

    ‘fill’ wouldn't have made sense. You can fill a structure in many different ways, so saying ‘fill’ does not capture the intent. Instead you either want to ‘get’ it, reusing cached data if possible, or you want to ‘read’ it, creating a new instance.

    @anonymous234 said in WTF Bites:

    DEPENDS on each file having an inode

    Well, in memory it does. The on-disk or on-network or whatever representation does not need anything like that.

    and each inode being directly indexable by number

    No, it does not. The inode cache is indexed by number, but VFS does not use that functionality. It is just a utility for filesystems that do have inodes on-disk, because that's majority of them. But if you don't have numbers, you can fill in garbage and nothing will break (you probably want to fill in unique grabage in case userland depends on them for hardlink detection). Been there, done that.

    @anonymous234 said in WTF Bites:

    you can't just parse the address "/proc/1234/mem"

    Obviously. Because the “/proc” part is not under your control.

    @anonymous234 said in WTF Bites:

    keep it forever in case someone requests file 123458266.

    No, you don't, because nobody can. Requesting files by inode number is only possible when the filesystem is exported over NFS; and it might also be a thing in FUSE to keep the caches in sync, though I am not sure.

    So when it drops from the icache, you simply repopulate it with new pseudo-random inode and everything will be just fine.


  • Java Dev

    @PleegWat said in WTF Bites:

    Also, I expect the inode values in /proc are computed (since that's how I'd do it). Combined with either hardcoded or assigned-during-registration sequence numbers for specific files.

    I decided to check. On an EL5 system, the inodes in /proc/<pid> are of the form pid << 16 + C, where C varies per file. Nodes in both /proc/<pid>/fd and /proc/<pid>/fdinfo are of the form pid << 16 + 0x8000 + fd. (So the same FD has the same inode in both of those, but one is a symlink and the other is a plain file, and hardlink count is 1).

    EL6/7 systems do not return consistent inode numbers, sometimes even between stat calls.


  • Winner of the 2016 Presidential Election

    @boomzilla said in WTF Bites:

    Gah! Stupid java case sensitive date format patterns.

    @djls45 said in WTF Bites:

    @boomzilla said in WTF Bites:

    Gah! Stupid java case sensitive date format patterns.

    The only ones I know of are mm/MM for minutes/months and hh/HH for 12-/24-hour times.

    Fake edit: Ah, I guess there're also a bunch of others.

    @boomzilla said in WTF Bites:

    @djls45 It was minutes / months that got me, as usual. Sometimes I get them mixed up with Oracle's formatting, which uses mi for minutes.

    @djls45 said in WTF Bites:

    @boomzilla Bu-bu-bu-bu-but, I just linked to docs.oracle.com!
    WHY would they use different formatters for the same thing?!

    Filed under: More fodder for The I-Hate-Oracle Club

    @boomzilla said in WTF Bites:

    @djls45 said in WTF Bites:

    WHY would they use different formatters for the same thing?!

    Fucken legacy requirements.

    @Bulb said in WTF Bites:

    @djls45 said in WTF Bites:

    Ah, I guess there're also a bunch of others.

    … and that does not even include the j format that you actually want to use for hours when presenting to the user. See TR#35 for the monstrosity in its full glory.

    @Onyx said in WTF Bites:

    @boomzilla said in WTF Bites:

    @djls45 It was minutes / months that got me, as usual. Sometimes I get them mixed up with Oracle's formatting, which uses mi for minutes.

    Better than PHP where minutes are i. Because.

    @TimeBandit said in WTF Bites:

    @Onyx said in WTF Bites:

    Better than PHP where minutes are i. Because.

    minutes. That's why 🤦🏻

    I'd always thought this was standardized, but I guess not.


  • Winner of the 2016 Presidential Election

    @TimeBandit said in WTF Bites:

    @remi said in WTF Bites:

    How long did the guy (s?) in the picture survive after it was taken?

    Looks like he was still alive in 2014, at least

    Artur Korneyev, 65, a radiation specialist, at his home in Slavutich. After the accident, his job was to locate radioactive fuel on site and determine radiation levels to limit the exposure of other workers.

    For those to lazy to read the article, same guy said this:

    These days Mr. Korneyev works in the project management unit, but because of his health — he has cataracts and other problems related to his heavy radiation exposure during his first three years — he is no longer allowed inside the plant. “Soviet radiation,” he joked, “is the best radiation in the world.”


  • ♿ (Parody)

    @Dreikin said in WTF Bites:

    I'd always thought this was standardized, but I guess not.

    It's been standardized lots.


  • BINNED

    Article said:

    1986 nuclear reactor explosion

    It was not an explosion! Nuclear reactors cannot explode no matter how much you try, you can't get such a reaction from U-235. The term is "meltdown" for a fucking reason!

    Gah!



  • @boomzilla said in WTF Bites:

    @Dreikin said in WTF Bites:

    I'd always thought this was standardized, but I guess not.

    It's been standardized lots.

    More specifically, there are two somewhat universal standards: IEEE 1003.1-2008 (POSIX), function strftime—the one with %s—and Unicode TR#35, Part Ⅳ §8—which should match the Java implementation. And then there are many, many extensions and modified versions like in PHP. Because:

    (and also because anything that has to do with localization is absurdly complicated)


  • Java Dev

    @Onyx said in WTF Bites:

    Article said:

    1986 nuclear reactor explosion

    It was not an explosion! Nuclear reactors cannot explode no matter how much you try, you can't get such a reaction from U-235. The term is "meltdown" for a fucking reason!

    Gah!

    And if I may attempt some :pendant: . The reactor did explode. Twice. Just because the nuclear fuel itself in incapable of exploding doesn't mean a reactor can't explode. In this case, the first explosion was caused by steam pressure buildup. Which would get pretty damn high from a runaway nuclear reaction in a water-cooled reactor with non-working pumps.



  • In case the Daily Express ever bothers to hire an editor, the headline is 'Windows Phone is dead, so Microsoft now thinks you to buy a Samsung Galaxy S8'.


  • FoxDev

    The operating system dropped from a 1.2 per cent market share at the end of 2015, to a new low of 0.3 per cent by the end of Microsoft's third financial quarter in 2016.

    MS can turn that around if they spend more than $0 a year on advertising the damn things.

    Anyway, good thing the S8 has no major issues, right?

    Oh.


  • 🚽 Regular

    I was going to ask "Why did you post the ad?" only to realize it's the Express' onebox adding a videoauto-advancing video playlist below it. 💢 🗯 🍊


    Anyways, the video was an ad for the Galaxy S8.

    The ability to unlock your phone with a finger. Or even with your face.

    Pushes face against fingerprint reader. "Hey, this isn't working!"

    I wonder if that's why they put the scanner next to the camera.


  • kills Dumbledore

    @RaceProUK so the MASSIVE problem is that using the fingerprint scanner might make the camera a bit dirty? Clickbaity headline is clickbaity



  • @Jaloopa The real MASSIVE problem with the Galaxy S8 is that it's made by Samsung.


  • kills Dumbledore

    I've just discovered that Outlook has been infested with the Markdown brainworm. Discussing which SQL roles need to be enabled involves a lot of underscores, and Outlook has decided to remove some of them and italicise the text in between


  • FoxDev

    @Jaloopa said in WTF Bites:

    Clickbaity headline is clickbaity

    Of course it is: it's the Daily Express.


  • kills Dumbledore

    @RaceProUK Oh, I didn't recognise it because it didn't mention which phone Diana would have preferred.



  • @Atazhaia Obligatory educational link:
    http://imgur.com/a/TwY6q

    IMO the most interesting part:

    • At 01:23:04, turbine 8 was disconnected and began to coast down. Within seconds, the main circulating pumps began to cavitate and fill with steam, reducing the flow of valuable cooling water and allowing steam voids (pockets of steam where there should be water) to form in the core. A positive void coefficient was occurring: the absence of cooling water causing an exponential power increase.
    • At precisely 01:23:40, Akimov pressed the emergency shutdown button.
    • At precisely 01:23:58, a mere 18 seconds after Akimov pressed the SCRAM button, a steam explosion blew the 450-ton upper biological shield clear off the reactor before it crashed back down, coming to rest at a steep angle in the raging maw it left behind. The core was exposed.

    Literally just 54 seconds between the moment things start to definitely go wrong and the massive explosion.



  • 0_1491478781220_upload-4d490f1f-9074-405c-a697-4b866770beec

    My recent activity was buying an MHL to HDML adapter from Amazon.


  • FoxDev

    Lowering fuel fuel into the completed reactor.

    Certainly better than loading that non-fuel fuel: that stuff's icky nasty


  • area_deu

    @hungrier said in WTF Bites:

    0_1491478781220_upload-4d490f1f-9074-405c-a697-4b866770beec

    My recent activity was buying an MHL to HDML adapter from Amazon.

    Well then, you might want to buy another one for when the first one breaks XD


  • BINNED

    TIL that the shortcut to add/remove yourself to/from a card in Trello is space. Not something like ctrl+space - just the largest, most easy to hit on accident key on most keyboards, alone. Yes, it works both when you have a card open and when you're just hovering over a card in a list. No, you can't change it.


  • ♿ (Parody)

    @coldandtired said in WTF Bites:

    In case the Daily Express ever bothers to hire an editor, the headline is 'Windows Phone is dead, so Microsoft now thinks you to buy a Samsung Galaxy S8'.

    Or maybe the MS mind control research (to counter Jobs' RDF) really paid off.


  • 🚽 Regular

    @hungrier said in WTF Bites:

    My recent activity was buying an MHL to HDML adapter from Amazon.

    It converts video+audio to an obsolete markup language? :P

    (I assume it doesn't convert to a WWII water vessel. That would be ridiculous)



  • @Zecc said in WTF Bites:

    (I assume it doesn't convert to a WWII water vessel. That would be ridiculous)

    How else would I connect my tablet to it? There was no USB back then.



  • @RaceProUK said in WTF Bites:

    The operating system dropped from a 1.2 per cent market share at the end of 2015, to a new low of 0.3 per cent by the end of Microsoft's third financial quarter in 2016.

    IOW, you own 0.3% of the worlds smartphones. :trollface:

    MS can turn that around if they spend more than $0 a year on advertising the damn things.

    So, if MS would advertise it more, you would buy more of them ?

    More seriously, you are delusional :rolleyes:


Log in to reply