TIL (about the Dark Arts of HTML)
-
-
@PleegWat said in TIL (about the Dark Arts of HTML):
What, only living to about 20?
That ship has already sailed, so I'm shooting for what I can.
-
@Zecc finally! This will get me past Dr. Virtue's guard pod and all the rest of his wretched bestiary like a cold knife through firmly pressed against butter patiently for a long time! Like a knife through butter.
-
@Zecc: they forgot the in that chart.
-
@PleegWat said in TIL (about the Dark Arts of HTML):
What, only living to about 20?
The best compromise is to stay a child.
You can keep the life expectancy but sleep twice as much as an adult
-
@TimeBandit Sadly, that trend continues as you accumulate s. I seem to be turning into an old goat.
-
-
: I've been informed by HR that "scratch monkey" is an offensive term. The preferred word is "valued customer".
-
@Zerosquare said in TIL (about the Dark Arts of HTML):
: I've been informed by HR that "scratch monkey" is an offensive term. The preferred word is "
valued customerweb developer".
-
There's an actual language called Scratch, which is designed for kids learning programming:
So I guess "Scratch monkey" would make a suitable insult.
-
If you tell Buzz Aldrin to his face that the moon landing was fake, he will punch you.
-
@Arantor said in TIL (about the Dark Arts of HTML):
PHP's arrays are simultaneously both and this can fuck you over if you somehow expect one and get traces of the other.
Yes.
-
The Oriental Hornet has natural photovoltaic systems.
Next step, attaching the lasers.
-
@Gribnit where the sharks?
-
-
@Arantor said in TIL (about the Dark Arts of HTML):
@Gribnit where the sharks?
Only in two places in the world: The northern and southern hemispheres
-
@hungrier the sharks with frickin’ laser beams on their heads are in both of these places? Cool, where do I go to see them?
-
@hungrier said in TIL (about the Dark Arts of HTML):
@Arantor said in TIL (about the Dark Arts of HTML):
@Gribnit where the sharks?
Only in two places in the world: The northern and southern hemispheres
AHEM. The equator? Otherwise you're gonna end up with double-counts when you add up the hemispheres.
-
@Arantor said in TIL (about the Dark Arts of HTML):
@hungrier the sharks with frickin’ laser beams on their heads are in both of these places? Cool, where do I go to see them?
Sadly, water greatly impedes the effectiveness of photovoltaics.
-
@Arantor said in TIL (about the Dark Arts of HTML):
@hungrier the sharks with frickin’ laser beams on their heads are in both of these places? Cool, where do I go to see them?
@Gribnit said in TIL (about the Dark Arts of HTML):
@hungrier said in TIL (about the Dark Arts of HTML):
@Arantor said in TIL (about the Dark Arts of HTML):
@Gribnit where the sharks?
Only in two places in the world: The northern and southern hemispheres
AHEM. The equator? Otherwise you're gonna end up with double-counts when you add up the hemispheres.
I'm not a shark expert so I don't have the answers to these highly technical questions. Maybe this documentary can help:
https://www.youtube.com/watch?v=GCpKp73kJtI
-
@Arantor said in TIL (about the Dark Arts of HTML):
@hungrier the sharks with frickin’ laser beams on their heads are in both of these places? Cool, where do I go to see them?
The exhibit opens on the 33rd of Nevervember.
-
@hungrier well, there is a lot of terrible stuff in the ocean.
-
@Gribnit said in TIL (about the Dark Arts of HTML):
@hungrier well, there is a lot of terrible stuff in the ocean.
Like the tea from Boston.
-
@dkf said in TIL (about the Dark Arts of HTML):
@Gribnit said in TIL (about the Dark Arts of HTML):
@hungrier well, there is a lot of terrible stuff in the ocean.
Like the tea from Boston.
Well, EITC was a British firm.
-
TIL (about the Dark Arts of HTML)
Also topics must be 4+ characters.
In a strangely-on-topic news:
: https://what.thedailywtf.com//assets/uploads/files/1667111084641-weird_one_any_html_element_can_be_visible_and_editable_with_display_block_and_contenteditable_including_style_tags.mp4
-
Has this thread gone the way of the Emoji Testing thread and stop sending me notifications even though I'm watching it?
-
-
@boomzilla That needle wouldn't be hard to thread in any other way either; it has pretty big eye.
-
@Bulb It might be, if you have bad vision or unsteady hands, but yes, the eye is quite large compared to needles used for most regular sewing. I'd be interested to see whether that technique works well for smaller needles (but not interested enough to slay the and try it myself).
-
@Zecc said in TIL (about the Dark Arts of HTML):
Has this thread gone the way of the Emoji Testing thread and stop sending me notifications even though I'm watching it?
You have to re-subscribe.
I don't know why that's a thing...
-
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
@Zecc said in TIL (about the Dark Arts of HTML):
Has this thread gone the way of the Emoji Testing thread and stop sending me notifications even though I'm watching it?
You have to re-subscribe.
I don't know why that's a thing...
Soon.
-
@Gribnit said in TIL (about the Dark Arts of HTML):
@Tsaukpaetra said in TIL (about the Dark Arts of HTML):
@Zecc said in TIL (about the Dark Arts of HTML):
Has this thread gone the way of the Emoji Testing thread and stop sending me notifications even though I'm watching it?
You have to re-subscribe.
I don't know why that's a thing...
Soon.
This would work on Twitter.
-
TIL: There's a Skylab horror movie.
I already knew there was an LHC horror movie.
Do you still not understand why I watch horror movies?
-
@Gribnit said in TIL (about the Dark Arts of HTML):
Do you still not understand why I watch horror movies?
yes
-
@TimeBandit said in TIL (about the Dark Arts of HTML):
@Gribnit said in TIL (about the Dark Arts of HTML):
Do you still not understand why I watch horror movies?
yes
Finally.
-
@TimeBandit said in TIL (about the Dark Arts of HTML):
@Gribnit said in TIL (about the Dark Arts of HTML):
Do you still not understand why I watch horror movies?
yes
Because you're horrible?
-
@Gribnit said in TIL (about the Dark Arts of HTML):
Do you still not understand why I watch horror movies?
Soon.
-
@dkf said in TIL (about the Dark Arts of HTML):
@Gribnit said in TIL (about the Dark Arts of HTML):
Do you still not understand why I watch horror movies?
Soon.
Sorry, but we're all out of candy.
-
TIL it's possible to do this with C# >= 9's pattern matching:
string? s = "hello"; if (s is { Length: > 0}) { Console.WriteLine("string is not null or empty"); }
Having learnt this, I will now continue to use string.IsNullOrEmpty().
-
@Zecc Or be unnecessarily explicit and abuse the new
is not
operator, too:if (s is not null && s is { Length: > 0 })
-
@Zecc what’s the magic behind that, i.e. what else can you do in that form and how does it de-sugar?
-
@topspin ILSpy says
if (s != null && s.Length > 0) { Console.WriteLine("string is not null or empty"); }
The magic is using pattern matching with a property pattern (1) with a nested relational pattern (2)
1: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns#property-pattern
2: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns#relational-patternsWe can dig deeper:
-
@topspin said in TIL (about the Dark Arts of HTML):
what else can you do in that form
Annoy people like @Zenith... and me.
Somebody apparently didn't like how C-like the language looked. Instead it should be this unholy abomination of Pascal, SQL and Scala.
-
@Zecc said in TIL (about the Dark Arts of HTML):
And this gets at least a nibble useful with the variable binding, but not that much really. Where pattern matching is useful if you have sum types and heavy use of the likes of
Maybe
,Option
orResult
in standard interfaces.Now unless they added something in C# 9—and then it won't be pervasive in the interface ayway—, C# only has nullable/nonnullable, as analog of
Maybe
. Can this be used to provide a nonnullable binding in the branch where a nullable variable is notnull
?
-
Screwing around with this a bit more to postpone working.
I don't know how I feel about this.
var rex = new Regex(@"(?<proto>[^:]+)://(?<rest>.+)"); string[] urls = { "http://example.net", "sftp://ftp.example.com", "gopher://example.org/" }; foreach(string url in urls) { string result = rex.Match(url) switch { { Success: false } => "Not a URI!", { Success: true } match => (match.Groups["proto"].Value, match.Groups["rest"].Value) switch { ("http", string rest) => "HTTP url " + rest, ("sftp", string rest) => "SFTP url " + rest, (_, _) => "Don't know lol", } }; Console.WriteLine(result); }
I probably won't write code like this for real.
-
@Bulb said in TIL (about the Dark Arts of HTML):
Can this be used to provide a nonnullable binding in the branch where a nullable variable is not null?
I am not unlikely unsure if the nonnulled nonnullable binding of nulled nonnulls could be nulling away may horror of the
ON ERROR RESUME NEXT
default binding mechanism...
-
@Applied-Mediocrity said in TIL (about the Dark Arts of HTML):
@topspin said in TIL (about the Dark Arts of HTML):
what else can you do in that form
Annoy people like @Zenith... and me.
Somebody apparently didn't like how C-like the language looked. Instead it should be this unholy abomination of Pascal, SQL and Scala.
Have you seen the abominations people do in React?
I picked one of the examples off the React site, picked a component basically at random.
render() { return ( <div className="component-emoji-results"> {this.props.emojiData.map(emojiData => ( <EmojiResultRow key={emojiData.title} symbol={emojiData.symbol} title={emojiData.title} /> ))} </div> ); }
So return a div as markup (with React magic applied), but also iterate over an object and return one sub component from it per entry inside said div.
The line between native HTML, HTML-React-Component and JS… and not even do much as a quote between them in some cases.
-
@Arantor the thing that surprised me the most was how this could possibly work, syntactically. However, it appears thats handled by a pre-processing step?!
Also, this does look like the old days of
<?php
or whatever (coldfusion?!) where you just randomly mixed the code and the mark-up. I'm skeptical this isn't a step back.
-
@topspin said in TIL (about the Dark Arts of HTML):
this does look like the old days of
<?php
That's the first thing I thought
-
@topspin PHP has mostly moved on from that nonsense unless you’re working in WordPress… but yeah React is precompiled and I still have no idea how it actually works in practice because React feels so fragile and whenever I write it I end up guessing at it until it compiles. Then I guess at it until I get it to behave.