TIL (about the Dark Arts of HTML)
-
@Arantor said in TIL (about the Dark Arts of HTML):
The wonderful world of JavaScript.
Browser DOM in this instance.
-
@Atazhaia said in TIL (about the Dark Arts of HTML):
@Watson said in TIL (about the Dark Arts of HTML):
And then they
forget all of them andbecause NIH invent a new way it can be done.FTFY
I'd think the existence of left-pad is evidence that NIH is not at play.
-
@Bulb You see, for basic one-liners you learn in Programming 101 you need to import a third-party library to do it. For advanced stuff like date handling you write your own because NIH.
-
@Atazhaia said in TIL (about the Dark Arts of HTML):
@Bulb You see, for basic one-liners you learn in Programming 101 you need to import a third-party library to do it. For advanced stuff like date handling you write your own because NIH.
There’s the standard library, Deno just added a new one to its standard library because the standard library sucked, then everyone NIH’s over the top of both.
(And PHP continues to demonstrate that it figured this shit out, given that left-pad has been in the language for 25 years and a cromulent date/time library has been core for nearly 20, though “more elegant” wrappers also exist over the top)
-
@Arantor said in TIL (about the Dark Arts of HTML):
(And PHP continues to demonstrate that it figured this shit out, given that left-pad has been in the language for 25 years and a cromulent date/time library has been core for nearly 20, though “more elegant” wrappers also exist over the top)
Still no way to represent a calendar difference (as opposed to timestamp difference). Though to be fair, I don't think there exists any library that can represent a calendar difference (as opposed to timestamp difference). Even though calendar difference is and has always been the most common operation for datetime types.
-
-
@accalia said in TIL (about the Dark Arts of HTML):
29.975 frames per second
If this is running on a computer, that's not really a relevant frame rate
scrolls upNTSC Snow
-
@Arantor okay, color me impressed.
-
@hungrier said in TIL (about the Dark Arts of HTML):
@accalia said in TIL (about the Dark Arts of HTML):
29.975 frames per second
If this is running on a computer, that's not really a relevant frame rate
scrolls upNTSC Snow
-giggles- you are correct it's not relevant to computers... but that's still the target frame rate.
-
@accalia it's a target frame rate for sure.
-
@Gustav it's the target framerate for what i was no0stalgic about.
there are of course other standard, but this is mine. ;D
-
@accalia said in TIL (about the Dark Arts of HTML):
@Gustav it's the target framerate for what i was no0stalgic about.
No it's not because your reasoning is wrong, but even if it was right, it's still not because you derped the math.
-
-
@Gustav said in TIL (about the Dark Arts of HTML):
@accalia said in TIL (about the Dark Arts of HTML):
@Gustav it's the target framerate for what i was no0stalgic about.
No it's not because your reasoning is wrong, but even if it was right, it's still not because you derped the math.
1000 ms in a second.
NTSC framerate of 29.97(5) frames per second.
one divide the other
33.3611342786 ms per frame (33.3667000334 if you only use 29.97 fps)
only have milisecond resolution so....... 33ms per frame it has to be. yes that makes me a little faster, but best i can do without running into kneeling fox issues. :P
-
@accalia said in TIL (about the Dark Arts of HTML):
(5)
-
@Gustav said in TIL (about the Dark Arts of HTML):
@accalia said in TIL (about the Dark Arts of HTML):
(5)
thanks to only having millisecond resolution i still get the same answer out the far end of the math :P
-
@Zerosquare said in TIL (about the Dark Arts of HTML):
I'm thoroughly enjoying myself when I ruin somebody's misguided nostalgia. Dude, you're not even doing any H-sync, you're never gonna get that authentic 60s CRT look. Just give up and use 60Hz like a normal person.
-
: It doesn't matter anyways, because if your analog TV is showing snow, that means it doesn't get a signal. If it doesn't get a signal, it's not getting sync pulses. If it's not getting sync pulses, it's not running at the precise NTSC rate, it's free-running at a lower frequency that depends on the vertical hold setting (which can be adjusted, at least on older TV sets).
Now, shut up and watch the pretty snow.
-
And not all of us used NTSC. I have equipment sat here on my desk that aligns to 50Hz refresh rates which is good fun on modern equipment.
-
@Gustav said in TIL (about the Dark Arts of HTML):
@Zerosquare said in TIL (about the Dark Arts of HTML):
I'm thoroughly enjoying myself when I ruin somebody's misguided nostalgia. Dude, you're not even doing any H-sync, you're never gonna get that authentic 60s CRT look. Just give up and use 60Hz like a normal person.
Please no, the stupid CPU was already crunching enough, I really don't need it working harder for no actual gain!
-
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
working harder for no actual gain!
And why should this be different from the rest of your life?
-
@HardwareGeek said in TIL (about the Dark Arts of HTML):
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
working harder for no actual gain!
And why should this be different from the rest of your life?
.. ...... ..... You shut up!
-
@accalia said in TIL (about the Dark Arts of HTML):
i preferentially code in JS for fun! :D
-
@TimeBandit said in TIL (about the Dark Arts of HTML):
@accalia said in TIL (about the Dark Arts of HTML):
i preferentially code in JS for fun! :D
oh, sorry. should i have said "and profit"?
-
@TimeBandit If I had to choose between having to code in JS for fun or for other reasons, I'd definitely choose for fun.
-
@Zecc said in TIL (about the Dark Arts of HTML):
@TimeBandit If I had to choose between having to code in JS for fun or for other reasons, I'd definitely choose for fun.
If I could choose to JS for fuck's sake....
-
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
JS for fuck's
I don't think that's going to work well for you.
-
@HardwareGeek said in TIL (about the Dark Arts of HTML):
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
JS for fuck's
I don't that's going to work well for you.
But it might be interesting for a second or twinch!
-
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
twinch
-
@HardwareGeek said in TIL (about the Dark Arts of HTML):
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
twinch
Oops! There was a problem. :(
-
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
@HardwareGeek said in TIL (about the Dark Arts of HTML):
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
twinch
Oops! There was a problem. :(
You were involved, so Pikachu wasn't surprised.
-
@HardwareGeek said in TIL (about the Dark Arts of HTML):
I don't that's going to work well for you.
You a word there
-
@TimeBandit What are you talking about.
-
@Benjamin-Hall said in TIL (about the Dark Arts of HTML):
@Watson said in TIL (about the Dark Arts of HTML):
@Gustav If it's uninhabited then who's doing the granting?
If it's the case I'm thinking of, the island in question happens to be a part of the US territorially. And the US grants anyone born in their territory (with some exceptions around certain Territories like American Samoa) citizenship by the doctrine of jus solis and the 14th Amendment.
So it just happens to be a very far-distant piece of the US, but otherwise behaves like any other US possession.
I'm curious whether children born in US embassies in foreign countries count as citizens...ok, google says no. They're not literally US territory, they're just under diplomatic protection by international law. Same with US military bases in foreign countries.
Edit: American Samoa is weird--people there are U.S. nationals but not U.S. citizens. And entry is controlled by American Samoa, not US Citizenship and Immigration Services. Even US citizens need to either have proof of employment in A.S. or a ticket onward within 60 days to enter the country, similar to any other foreign national.
I wonder how people prove they were born there if it's empty. By the way, what happens if an American lose his birth certificate or something? How places with an illegal immigration problem distinguish them?
-
@Arantor said in TIL (about the Dark Arts of HTML):
And not all of us used NTSC. I have equipment sat here on my desk that aligns to 50Hz refresh rates which is good fun on modern equipment.
it was PAL-M here
-
Ah, yeah, that weird video format that nobody else used.
(says the guy whose country invented SECAM )
-
You know the acronym
CSV
, don't you?
You only think you know it.
TIL it's real meaning:
Commercial Spyware Vendors
.
See
https://www.bleepingcomputer.com/news/security/google-says-spyware-vendors-behind-most-zero-days-it-discovers/
-
Today I learned if you have an XLSM file and rename it to XLSX, Excel does not load the file excluding macros, it sits there and cries that the file is corrupt because the extension does not match the content (but is otherwise unable to give you any useful feedback on this otherwise, even though it knows perfectly well what both file types are)
-
If only you were hiding your file extensions like a good boy, you wouldn't be having that problem.
-
@PleegWat said in TIL (about the Dark Arts of HTML):
If only you were hiding your file extensions like a good boy, you wouldn't be having that problem.
I naively assumed it was safe for me to upload to OneDrive forcing an .XLSX extension… (because via the API I do have to give it a full path)
-
@Arantor said in TIL (about the Dark Arts of HTML):
Today I learned if you have an XLSM file and rename it to XLSX, Excel does not load the file excluding macros, it sits there and cries that the file is corrupt because the extension does not match the content (but is otherwise unable to give you any useful feedback on this otherwise, even though it knows perfectly well what both file types are)
Tell me you haven't ever replaced the
.xlsx
(or also.docx
) extension for.zip
without telling me...
-
@BernieTheBernie said in TIL (about the Dark Arts of HTML):
@Arantor said in TIL (about the Dark Arts of HTML):
Today I learned if you have an XLSM file and rename it to XLSX, Excel does not load the file excluding macros, it sits there and cries that the file is corrupt because the extension does not match the content (but is otherwise unable to give you any useful feedback on this otherwise, even though it knows perfectly well what both file types are)
Tell me you haven't ever replaced the
.xlsx
(or also.docx
) extension for.zip
without telling me...This I have done for sure. I’ve even rolled my own XLSX generator in the past.
But I realise the Redmond crew are just trying their best.
-
@Arantor Small indie company, can't afford a QA department.
-
@PleegWat said in TIL (about the Dark Arts of HTML):
@Arantor Small indie company, can't afford a QA department.
I'll have you know I just got promoted to Medior Windows QA Tester
-
@izzion Ah, your employer has a bulk license?
-
@BernieTheBernie said in TIL (about the Dark Arts of HTML):
replaced the
.xlsx
(or also.docx
) extension for.zip
Unfortunately file-types, neither in their extension incarnation, nor their MIME one, can't represent a file type being a subtype of another one. Like here OOXML (and OpenDoc and JAR etc.) being a subtype of ZIP. Or a lot of other formats being a subtype of XML or of JSON.
Most of the time it does not matter, but there are times, where double extensions are really needed, like the
.drawio.png
and.drawio.svg
formats.
-
@Bulb while I’d agree with you conceptually, compound registered MIME types like
application/epub+zip
do exist.As does
image/svg+xml
, so there’s clear precedent for container formats.
-
@Arantor said in TIL (about the Dark Arts of HTML):
I naively assumed it was safe for me to upload to OneDrive
-
@Arantor said in TIL (about the Dark Arts of HTML):
@Bulb while I’d agree with you conceptually, compound registered MIME types like
application/epub+zip
do exist.As does
image/svg+xml
, so there’s clear precedent for container formats.You don't even need to go further than the
/
.
-
@Arantor said in TIL (about the Dark Arts of HTML):
@Bulb while I’d agree with you conceptually, compound registered MIME types like
application/epub+zip
do exist.As does
image/svg+xml
, so there’s clear precedent for container formats.But does it have actual semantic significance? That is, is there an application that, upon seeing
application/epub+zip
will say that it has no clue whatepub
is, but it does know what azip
is, so it will offer the user to open it as azip
archive?Also, how do you reduce
image/svg+xml
toapplication/xml
without already knowing that format?@Zecc said in TIL (about the Dark Arts of HTML):
You don't even need to go further than the /.
The formats that have the same prefix before
/
often don't share anything, so that's not useful. Not only theapplication/*
ones, but applications that can displaytext/html
rarely can displaytext/rtf
and vice versa. The prefixes are somewhat useful for the content negotiation—clients that can display images may say they acceptimage/*
, clients that can play audio may say they acceptaudio/*
and clients that can play video may say they acceptvideo/*
—but most clients saying they acceptimage/*
still won't be able to displayimage/tiff
or only some of them, and the situation is only worse for video. Because these formats still allow many different encodings inside, but the mime type does not encode which one. Which is why the video negotiation for web is such a mess.