570 karma · joined October 21, 2014
meet.hn/city/-16.9206657,145.7721854/Cairns
From what I hear SA is one of the best places in the country to generate. Optimal temperature for the panels plus lots of sunlight. 8 years seems like nothing with the genny and battery. We tried but couldn't make the numbers work with any kind of decent backup, this was 3 years ago.
Cheers for the info!
Interested to read other's experience.
Forget the idea that the tokeniser could place markers on semicolons / curly brackets to bound any future lookaheads. Why couldn't you just look one token ahead and analyse the potential pseudo-class/property. Pseudo-classes are clearly defined. There are about 50 of them. AFAIK none of them clash with property values. Keep it this way. If it's not a valid pseudo it's either an invalid selector or a property. Then you're just analysing the equivalent of a property value anyway.
---
Of course the above logic is flawed. I'm really just trying to tease out some useful information other than "can't be done".
I think the main challenge with this discussion is that the limitations of the parsers are not clear, at least outside circles directly working with them. Not only that, the explanations of why certain cases won't work are provided without the proper context needed to understand.
From what I understand tokenisation is dumb, it basically just spits out words. Without nesting it is straightforward for a parser to iterate over these tokens one by one, distinguishing between selectors and properties, based on prior context. Of course parsers could look ahead, but by design they don't, because efficiency.
The arguments for breaking the defacto nesting syntax (i.e. scss) seem to lie in the fact that the rules of the past must lie within the rules of the future, because graceful degradation.
Option C. - the most popular option, and also the most true to scss - while pragmatic in it's approach, is still shoehorning new into old.
I'm sure most agree that unbounded lookahead is probably not workable. But to make the argument that parsers can never look ahead, can never improve, seems ideological, if not ridiculous.
Also, looking at your second line: I would say the second part (starting at the semicolon before the h1), is invalidated by the semicolon. No need to lookahead or read up to the semicolon. The first part would always be evaluated first, up to the closing curly bracket. The second part would fail at the first character. I'm looking at this on a phone so maybe I've misread?
Edit: I should add, I'm not disagreeing with your point (I don't think!), just emphasising it
In fact lookahead isn't needed at all, except in (exceptionally) rare cases. Is the problem that the parsers are incapable of using any smarts beyond what is already provided?
Am I missing something?
Aside: Good point on the semicolon! I think in the previous discussion someone was making the point that parsers are exceptionally flexible/forgiving re. weird and wonderful line break and spacing combos. I wasn't sure about the status of semicolon usage. Idea of strict would just be to put an end to that.
Edit: and hey, apologies for labouring the point on this. But I am genuinely interested. I feel like these conversations just always end up in "you wouldn't understand" territory.
This allows for graceful degradation.
My point about corner cases is that there is very, very limited use of pseudo selectors, relatively speaking. Let alone pseudo selection where the selector is based on an element and not a class, or ID, or something else easily differentiable from a property. Which is to say, they are the corner case.
The point of the declaration is to tell the browsers that can handle the syntax to handle it. Another method could be to use a new linking method. Regardless, the language would still gracefully degrade as only the newer syntax would require strict rules in place.
Please explain it to me if I am completely missing the point.
I put together a regex last time this was discussed [1] (which obviously completely alleviates all concerns): https://regex101.com/r/aOc2Pz/1
But seriously, syntax evolutions happen. If there's an issue with parsing garbage CSS why not just let that garbage run slowly, and re-optimise for the rest, prioritising for form and function.
Bright eyed 24yo non-dev: Hey look at this amazing thing I made. Buy a print and think about conservation and I will donate money to a charity. World: Wow. Hang on, not wow! NOT. WOW! Our original wow was based on our own distorted / ignorant reality, now corrected by internet / Truth™. OMG you f#$!ing tried to trick us. At least we're pretty sure you did. Destroy.
Edit: She's 24. She doesn't need to be taught a lesson by you or the internet.
Yes the court's decision comes in the form of a recommendation, but it is a significant one and will be difficult to ignore. At the very least it should remove any question of a social license for these kind of activities in Australia (i.e. thermal coal extraction!) - which are often presented as beneficial to first nations groups, yet are environmentally and culturally blasé through and through.
My grandparents, both in their mid 90s and long-retired, probably watch at least 4-6hrs of TV in a day. At least. Almost always in the evening from about 6 or 7pm until they go to bed (quite late usually). Combination of news, british crime drama, and classic films from their DVD collection. They mainly spend their days playing (a surprising amount of) golf, driving to and eating cheap lunches at various clubs where they are life members (mainly motoring and golf clubs), getting coffee and browsing at shopping centres, and visiting (and being visited by) their large and ever-expanding family. They own a smart phone but until recently only used it for receiving calls (they've just started making them too). They do use the internet sporadically via a PC, mainly to make reservations or plan trips (no email or direct communication). They were the first family on the street to get a TV and every kid on the block used to come around to watch it when my Dad was a kid. They never allowed eating dinner in front of the TV, but usually do so themselves now unless someone is visiting. Their screen time is primarily passive. They find it enjoyable, normal, and don't seem to worry about it at all.
My parents and their partners, all in their 60s and working, waste time on their phones to varying degrees, including a small amount spent on social media. They all enjoy complaining about why internet technology works (or doesn't) the way it does and how much time they spend on it - they came to it later in life (duh) and are very self-ware in their usage. They also watch TV (2-3hrs, broadcast and on-demand), listen to radio, and read books, newspapers and magazines with much less complaint / awareness. Their media use encompasses their lives, but it is not all-encompassing. They take a lot of joy from a family group chat we're all part of, but to talk it's always over the phone or in person. They never allowed watching TV at dinner time, but we did watch the news together (sometimes the Simpsons!) and were one of the first houses in our small suburb to get a game machine (and a PC) in the early 90s, though usage was strictly controlled! My parents & partners will sometimes watch TV at dinner now. Their screen time is probably 50-50 passive to active.
I am on a phone and laptop all day for work. I lead a fairly active/outdoorsy life outside of work (mainly on the weekend), but also watch quite a bit of on-demand, a small amount of broadcast TV, and spend a couple of hours on personal internet use per day. I was the first professional / white collar worker in my family. I would classify my screen time as significant, bordering on excessive and primarily active.
My kids aren't allowed to watch TV at dinner time. They're about to enter school so still don't have too much use (or want) for a phone or the internet yet, beyond 2-3hrs on-demand streaming per week. I plan on limiting it as much as possible while I can, assuming that it will dominate their lives (while hoping that it won't). This seems to be the generationally-shared sentiment.
Personally (controversially?) I've always questioned the idea of a tiny house in the countryside. In dense urban (and otherwise restrictive) environments focusing on size makes some sense. But in a rural setting? Emphasizing 'tiny' over e.g the UN-Habitat's mantra of "fast, affordable and absolutely green" feels like a misinterpretation and unnecessary burden ('fast' might be switched out in this context too). I'm not advocating for sprawling mansions by any means, but certainly a more holistic consideration of space and its effects on mental health.
My point is that this should be the exception, not the rule. I certainly don't think this level of abstracted complexity is necessary, or even better, in most scenarios. I'm talking at a design or implementation level.
That said, personally I put a bit of effort into achieving (dynamic) ends without javascript (despite being a js dev) and find form styling, with it's intrinsic state, one of the less-problematic things to style. In fact, I tend to use input elements in a bunch of unconventional places as state machines in place of js. Hamburger menus, overlays (prior to the <dialog> tag), dark mode toggle, etc. have all been prime candidates for "previous-sibling" (or "parent-previous-sibling") input treatment.
In the form examples provided, the <labels> being styled could easily be included "after" the <input> in code (regardless of where they appear visually) allowing them to be targeted based on state/focus of the input. Similarly the :focus-within vs :has(:focus-visible) consideration is interesting, but in reality not really a massive concern and certainly not a blocker. The fact that people have relied on JS for this stuff traditionally I think is the bigger concern for me. Here's to progress!
P.S. I mainly like the idea of low/no js from an academic perspective. But I do think it comes in handy in surprising situations, both when a random no-js purist stumbles across your site and is able to do something, but also when something breaks (naughty browser plugin, broken script, dodgy refactor) and people are still able to open your nav / close your popover / fill in your complaints form.
In my case I actually render them on the client using dom-to-image[2] and then store/cache them using R2. This is basically to save on server costs (it's hosted on free CF pages with a worker). A more secure implementation (with a compute budget) might use a headless browser like this server side to render the image.
[1] perfectpollie.au
[2] npmjs.com/dom-to-image