spartanatreyu

joined 1 year ago
[–] spartanatreyu 2 points 1 month ago

The syntax is only difficult to read in their example.

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

[–] spartanatreyu 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 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 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 133 points 1 month ago (7 children)

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

[–] spartanatreyu 6 points 1 month ago (1 children)

You should put this in codepen so people don't need to clone a repo to see it.

For example, here's a 3d css-only thing I was fiddling with: https://codepen.io/spartanatreyu/pen/yPyNjw?editors=0100

[–] spartanatreyu 3 points 1 month ago

You keep saying "relevance", and now other things like "gimmick" and "marketing".

Why are you so focused on "relevance"?

They're completely unrelated to Deno.


Node had problems, ts-node had problems, Deno fixes those problems for developers.

Separately, Bun trades solving some problems for solving other problems.

Developers are free to choose between runtimes based on what problems they encounter.

Personally I use node for existing web projects and deno for data processing and to compile scripts into redistributable binaries.

[–] spartanatreyu 2 points 1 month ago (1 children)

No one's asking nor wondering why you find looking at things in the sky beautiful.

They're asking why you're ascribing meaning to an arbitrary number of days. Months aren't subjective, they're arbitrary.

[–] spartanatreyu 32 points 1 month ago (13 children)

What to know about blue supermoons:

  1. They literally mean nothing.
  2. The change is imperceptible to everyone.
  3. Expect useless clickbait slop about it until it passes.
[–] spartanatreyu 3 points 1 month ago (2 children)

stdlib.io is a data process/vis library, not a standard library.

jQuery was a DOM/Utility DX library (and also a compatibility layer before all browsers finally focussed on standards), not a standard library.

Deno people are trying so fucking hard to be relevant. It’s embarrassing. Bringing nothing to the table has been their MO from day 1.

Let's examine that.

Deno has always been:

(parapharing) "Hi, I'm the creator of Node and want to make it better but can't get everyone on board with the changes. So I'm going to create a new JS runtime. Node will need to implement these improvements to keep up or everyone will switch away from node. Either way, developers win."

We know it's been that way since he was a month into Deno's development in his famous talk: 10 Things I Regret About Node.js

Deno [...] Bringing nothing to the table [...]

Have a look through each of those 10 points he brought up, then compare that to node before, and node now. It's pretty clear he gave them the swift kick in the ass to start making those changes. We win. That's clearly a success.

[–] spartanatreyu 5 points 1 month ago (4 children)

What standard library?

JS has only had package/library hell

[–] spartanatreyu 5 points 2 months ago

Who is this article for?

Firstly, it's basically just a repost of existing info from the mozilla article but now with ads.

Secondly, the puppeteer team left years ago to work on playwright which is now the better product, which also supports firefox through the webdriver-bidi standard...

So now I'm wondering... just who was this article for?

 

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

 

The mistake most devs make when trying to document their project is that they only make one (maybe two) types of documentation based on a readme template and/or what their mental model of a newcomer needs.

Devs need to be actively taught that:

  1. Good documentation isn't one thing, it's four. To have good documentation, you need all four distinct types of documentation.
  2. What the four types of documentation are (this is discussed in the link)

If you don't have all four types of documentation, you have bad documentation.

view more: ‹ prev next ›