Gareth Adams
Gareth Adams
@gareth.fyi
Oh no it isn't!
December 23, 2024 at 3:22 PM
I'm imagining this is an argument between two siblings
December 1, 2024 at 5:38 PM
I mean, rubocop only took *8* years to get to v1.0.0 according to rubygems
November 27, 2024 at 11:22 PM
Well you've linked to two places that are both embedding this year's AI commercial, yeah.

It's very much not the same as the 1995 original, no, although it's clearly been trained on images from the various iterations
November 21, 2024 at 6:03 PM
They at least will be able to supervise other people who are using AI tools 😉 But probably not much more than that
November 19, 2024 at 1:56 PM
My firm belief is that Brits love *every* kind of weather, but only for 3 days.

"Oh, a heatwave at last!" "Wow it's great to have good weather" "Ok I'm sick of being sweaty now"

"Amazing! Snow day!" "Everywhere's so pretty outside" "Getting to the shops is kind of annoying"
November 19, 2024 at 10:26 AM
I think that depends entirely on what kinds of things they expect to be supervising in the future
November 18, 2024 at 7:17 PM
I forgot to mention earlier that Javascript's CSSOM library (in browsers by default) has a CSS.escape method which deals with this:

> CSS.escape('123') // => "\31 23"

But actually trying to use this in practice makes your Javascript feel as clunky as your CSS is.
November 15, 2024 at 8:39 PM
Reposted by Gareth Adams
Or you can use the attribute selector

[id="123"] {
color: red;
}
November 15, 2024 at 6:03 PM
You might get tripped up by this if you use unprefixed UUIDs as HTML IDs for example, and then target them with Javascript. The easiest solution is definitely "don't". Or use `getElementById` which works. But the fact that this escaping syntax exists and looks like this is *eye-opening*.
November 15, 2024 at 5:26 PM
That's right, if you want to target id="123" in CSS (or in Javascript's querySelector) you end up with this ABOMINATION(!) At that point, if you need this (because you're generating IDs) you should just add a prefix

<div id="123">Hello, world!</div>

<style>
#\31 23 { color: green }
</style>
November 15, 2024 at 5:01 PM
This is because CSS thinks you're escaping the codepoint 3123 here ("ㄣ"). Instead, you have to either a) pad the Unicode codepoint to 6 hexadecimal characters, or b) add a space after the escape sequence to finish the escape:

#\00003123 { color: green } /* YES */
#\31 23 { color: green } /* YES */
November 15, 2024 at 5:01 PM
The Unicode codepoints for the digit characters run from 0x30 to 0x39, which means the escape sequence for a leading `1` is `\31`.

But if you try escaping this way, you'll find you still aren't all of the way there yet.

#\3123 { color: red } /* No */
November 15, 2024 at 5:00 PM
CSS has a single method of escaping characters for identifiers, and it's not one of the common ones: you can replace a character with a \ followed by the unicode codepoint for that character in hexadecimal.

#\123 { color: red } /* No */
#"123" { color: red } /* No */
November 15, 2024 at 4:59 PM
Want any Twitch-related sanity checks beforehand?
November 14, 2024 at 10:03 PM