[-] spartanatreyu@programming.dev 13 points 2 weeks ago

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 132 points 3 weeks ago

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

[-] spartanatreyu@programming.dev 32 points 4 weeks ago

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.
12

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.

[-] spartanatreyu@programming.dev 22 points 4 months ago

As an outsider looking in, it looks like it's a bit of a wipe the slate clean governance and moderation wise as voted on by the community.

So, now over the coming days the community will in essence vote on whether they will allow sponsorships from the military industrial complex.

[-] spartanatreyu@programming.dev 14 points 4 months ago

Presenting: an excerpt from my lua windows management script:

-- Exists because lua doesn't have a round function. WAT?!
function round(num)
	return math.floor(num + 0.5)
end

Yeah, not a fan.

[-] spartanatreyu@programming.dev 16 points 5 months ago

Luckily for you, there's not a vaccine for stupidity.

[-] spartanatreyu@programming.dev 35 points 5 months ago* (last edited 5 months ago)

There's a reason Teams is/was shit.

The first teams was written in AngularJS (which is a slow to run resource hog, but fast to develop) wrapped in Electron. It was kind of a minimum viable product, just to build something quickly to get some feedback and stats on what people needed.

The plan was to build a new native version of teams and build it into the next windows while having an web fallback (built on react) for everyone else.

They stopped working on the original teams and started working on the new versions.

They got half-way through working on the native and react versions when suddenly, covid happened.

They couldn't keep working on the new versions because they wouldn't be ready for a while, so they had to go back and resume development on the old one, introducing patch after patch to quickly get more features in there (like more than 2 webcam streams per call).

Eventually covid subsided and they were able to resume development on the new teams versions.

Windows 11 launched with a native teams version (which has less features but runs super quick), and the new react based teams (which can now be downloaded in a webview2 wrapper) has been in open beta since late last year (if you've seen the "Try the new Teams" toggle, then you've seen this). The React+Webview2 teams will replace the AngularJS+Electron version as the default on July 7th.

[-] spartanatreyu@programming.dev 12 points 10 months ago

My long bet: The EU will force Google Search + Ads, to separate from Youtube within a decade.

[-] spartanatreyu@programming.dev 19 points 11 months ago

That's not pro, that's just reckless gambling.

48
1
[-] spartanatreyu@programming.dev 12 points 1 year ago* (last edited 1 year ago)

Single player nostalgia list:

  • FPS:
    • Halo series (Reach, 1, 2, ODST, 3, 4)
  • Strategic:
    • Homeworld
    • Supreme Commander
  • Racing:
    • Trackmania Stadium
  • Roguelike
    • FLT
  • Survival:
    • Minecraft
    • Factorio
  • Tactical:
    • Advance Wars 2
    • Battle for Wesnoth
  • Other:
    • Thumper
    • Space Engine

Multiplayer nostalgia list:

  • FPS:
    • Halo series (again, 90% of the time the custom game browser already has a game running that I want to join, and it's still getting updates)
    • PUBG (how is this 6 years old already?)
  • Party games:
    • Golf with Friends
    • Tabletop Simulator
    • Ultimate Chicken Horse
1
Typescript 5.2 Released (devblogs.microsoft.com)
[-] spartanatreyu@programming.dev 14 points 1 year ago

It depends what you need your configuration file to be:

Need a well defined easy to understand concrete configuration file?

  • Use .toml. It was made to be both human and computer friendly while taking special attention to avoid the pitfalls commonly found in other configuration files by explicitly stating expected types around commonly confused areas.

Need a simple to implement configuration file?

  • Use .json. It's famous for being so simple it's ~~creator~~ "discoverer" could define it on a business card.

Need an abstract configuration file for more complicated setups?

  • Use .ncl. Nickle allows you to define functions so that you can generate/compute the correct configuration by changing a few variables/flags.
1
[-] spartanatreyu@programming.dev 46 points 1 year ago

Github has always had being a job site be it's secondary feature.

Except that it has a slightly higher bar of entry to recruiters and recruitment bots spreading toxic positivity, and anyone asking for a job is able to prove (at least some of) their value by showing off their code and how they participate publically in other repos (if at all).

1
1
submitted 1 year ago* (last edited 1 year ago) by spartanatreyu@programming.dev to c/programming@programming.dev

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.

4
1

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

2
6

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: next ›

spartanatreyu

joined 1 year ago