spartanatreyu

joined 1 year ago
[–] spartanatreyu@programming.dev 6 points 1 day ago* (last edited 1 day ago) (1 children)

See I think that’s not what the “anti-woke” people think it means.

That's exactly what I pointed out. The people who provide them their information are actively trying to poison the word to the point that it means something else. But it doesn't, because the poisoning only works in the echo chambers that spread that information.

Turning to urban dictionary, they’re using this definition: [...]

That would be one of the attempts to poison the word. It's worth pointing out that anyone can add a definition to urban dictionary and it's quite often that trolls try to overwhelm existing definitions on there.

[...] (according to that definition).

That comes back to what I said before. People who self report as anti-woke are against anything that uses the label "woke", until they look at what's under the label and they realise they aren't against any of the points the "woke" labelled thing is doing.

They're not actually anti-woke, they're anti-incorrect-label.

[–] spartanatreyu@programming.dev 13 points 1 day ago (3 children)

Because being woke is generally considered to be a bad thing?

No. Being woke is only considered bad in toxic echo chambers where they've tried to poison the word.

Most people who self report as "anti-woke" repeat infectious and carefully crafted but fallacious talking points whenever the term "woke" is said.

But if you bring up a situation where a minority is getting the bad end of the stick and they agree with you that it's bad, they don't realise that they themselves are being woke. They agree with being woke so long as the label "woke" isn't used. It's when you point that out that they start to realise that they've been poisoned against the term.

Being woke simply means that some people don't often get the same affordances as others.

If you accept the general fact that women tend to get paid less for the same amount of work, then you're woke.

If you accept the general fact that black people might not get hired if a person doing the hiring is racist, then you're woke.

If you accept the general fact that some people have to hide the fact that they're not heterosexual in some countries otherwise they'll suffer the death penalty, then you're woke.

[–] spartanatreyu@programming.dev 5 points 1 day ago (1 children)

English doesn't really have a well defined way to write down the "zjush" from the "su" in pleasure.

The most accepted ways are "zh" or "x" in English, or ʒ in IPA.

Since most people call it twitter, and Elon want to call it x, so people push them together to make xitter, because it sounds like "shitter" (the crude term for toilet) and because the quality of twitter has declined dramatically to the point that it resembles an unclean toilet.

[–] spartanatreyu@programming.dev 3 points 1 week ago (1 children)

Watching web developers react to this change on mastodon has been... interesting to say the least

[–] spartanatreyu@programming.dev 8 points 4 weeks ago (10 children)

This doesn't seem overly useful.

It's a list taken out of a bunch of books with no regard for how something can be the best path in one language and a smell in another language.

Look at this page for example: https://luzkan.github.io/smells/imperative-loops

It suggests using functional loop methods (.map(), .reduce(), .filter()) instead of using imperative loops (for, for in, for each) but completely disregards the facts that imperative loops also have access to the break, continue, and return keywords to improve performance.

For example: If I have an unsorted list of 1000 cars which includes a whole bunch of information per car (e.g. color, year manufactured, etc...), and I want to know if there were any cars were manufactured before the year 1980, I can run an imperative loop through the list and early return true if I find one, and only returning false if I haven't found one by the end of the list.

If the third car was made in 1977, then I have only iterated through 3 cars to find my answer.

But if I were to try this with only functional loops, I would have to iterate through all 1000 cars before I had my answer.

A website with blind rules like this is going to lead to worse code.

QOI is just a format that's easy for a programmer to get their head around.

It's not designed for everyday use and hardware optimization like jpeg-xl is.

You're most likely to see QOI in homebrewed game engines.

[–] spartanatreyu@programming.dev -1 points 1 month ago

Are you not made primarily of water?

The syntax is only difficult to read in their example.

I fixed their example here: https://programming.dev/comment/12087783

[–] spartanatreyu@programming.dev 6 points 1 month ago* (last edited 1 month ago) (1 children)

I fixed it for you (markdown tables support padding to make them easy to read):

markdown table
x y
|markdown|table|
|--------|-----|
|x       |y    |
[–] spartanatreyu@programming.dev 2 points 1 month ago (1 children)

Chromium had it behind a flag for a while, but if there were security or serious enough performance concerns then it would make sense to remove it and wait for the jpeg-xl encoder/decoder situation to change.

It baffles me that someone large enough hasn't gone out of their way to make a decoder for chromium.

The video streaming services have done a lot of work to switch users to better formats to reduce their own costs.

If a CDN doesn't add it to chromium within the next 3 years, I'll be seriously questioning their judgement.

[–] spartanatreyu@programming.dev 13 points 1 month ago (3 children)

I'm under the impression that there's two reasons we don't have it in chromium yet:

  1. Google initially ignored jpeg-xl but then everyone jumped on it and now they feel they have to create a post-hoc justification for not supporting it earlier which is tricky and now they have a sunk cost situation to keep ignoring it
  2. Google today was burnt by the webp vulnerability which happened because there was only one decoder library and now they're waiting for more jpeg-xl libraries which have optimizations (which rules out reference implementations), good support (which rules out libraries by single authors), have proven battle-hardening (which will only happen over time) and are written safely to avoid another webp style vulnerability.

Google already wrote the wuffs language which is specifically designed to handle formats in a fast and safe way but it looks like it only has one dedicated maintainer which means it's still stuck on a bus factor of 1.

Honestly, Google or Microsoft should just make a team to work on a jpg-xl library in wuffs while adobe should make a team to work on a jpg-xl library in rust/zig.

That way everyone will be happy, we will have two solid implementations, and they'll both be made focussing on their own features/extensions first so we'll all have a choice among libraries for different needs (e.g. browser lib focusing on fast decode, creative suite lib for optimised encode).

[–] spartanatreyu@programming.dev 131 points 1 month ago (9 children)

That's 41 degrees for everyone who doesn't measure things in bird per gun.

 

Feel free to tweak the two custom properties in the css pane to explore the different mosaic patterns that are generated.

16
I made a thing (codepen.io)
submitted 4 months ago* (last edited 4 months ago) by spartanatreyu@programming.dev to c/webdev@programming.dev
 

Single HTML element + CSS only

  1. Inhale for 4 seconds
  2. Hold for 4 seconds
  3. Exhale for 4 seconds
  4. Hold for 4 seconds

And repeat

Inspired by: https://quietkit.com/box-breathing/

Note: The current Safari version has a bugged linear() implementation that has been fixed in the upcoming version.

 
 

Shows a great example of JS' new using keyword (similar to defer in D, Go, Swift, etc...)

 

Comments should provide context, not repeat what the code already says. The Redis codebase has 9 distinct types of comments (Function, Design, Why, Teacher, Checklist, Guide, Trivial, Debt, Backup), each with a specific goal in mind.

 

Answer: create a new object with the properties of the two original objects using the spread operator.

The order you insert the objects into the new merged object determines which object's properties take priority over the other.

Linked example:

const obj1 = { foo: "bar", x: 42 };
const obj2 = { foo: "baz", y: 13 };

const clonedObj = { ...obj1 };
// { foo: "bar", x: 42 }

const mergedObj = { ...obj1, ...obj2 };
// { foo: "baz", x: 42, y: 13 }

You can find more discussion here: https://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically

view more: next ›