@weilawei@mastodon.online avatar

weilawei

@weilawei@mastodon.online

People are people are people.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

LouisIngenthron, to random
@LouisIngenthron@qoto.org avatar

I will never understand people who enjoy grinding in video games.

What, your day job isn't monotonous enough?

weilawei,
@weilawei@mastodon.online avatar

@LouisIngenthron I find it super hard to get motivated about games that require intense, careful strategizing to succeed.

Caveat that I play mostly strategy/tactics when I play anything at all these days, but I play fast and loose.

It becomes less interesting if I -have- to work at it; I'd rather be programming if I'm going to put in that kind of effort.

JapanProf, to China
@JapanProf@mastodon.social avatar

They did the same thing to Japan in the 1980s. The US made sure that Japan would not become its rival in the Pacific. (Japan has been a very submissive ally with a huge US military presence including in the Tokyo area.) Had the US not weakened Japan, it would have been so much easier to contain China.

https://www.nytimes.com/2024/05/21/business/janet-yellen-europe-china.html?unlocked_article_code=1.tk0.FkN2.hfUT5qxbi-Ia&smid=nytcore-ios-share&referringSource=articleShare&sgrp=c-cb

weilawei,
@weilawei@mastodon.online avatar

@JapanProf We've been deskilling our workforce for decades. That's a management decision, by design, and even the word that the head honcho types like to use for it.

weilawei, to random
@weilawei@mastodon.online avatar

We're going to need a new Turing test.

Since a willingness to fucking swear seems to be something authoritarians don't like, we could lean into that.

Assume AI unless proven otherwise by anti-billionaire behavior.

StillIRise1963, to random
@StillIRise1963@mastodon.world avatar

I want American traitors charged with treason. They’re easy to find, they’re in the government.

weilawei,
@weilawei@mastodon.online avatar

@StillIRise1963 It's not like they had to take money from a foreign government. And it's a little weird about the seeming lack of concern and fire under the butts of the rest of the, presumably "honest", politicians.

weilawei, to random
@weilawei@mastodon.online avatar

One of my least favorite aspects of American nationalism is the part where it causes people to think that "rah rah my team!" is an actual strategy with respect to geopolitics and other, significantly larger countries.

I live here, so there's some bias, but pretending that everyone else is magically inferior because they're not on Team Murica is a shortsighted strategy.

China is kicking our ass in so many ways, and most of the American public seems stucks on stereotypes from decades ago.

weilawei, to random
@weilawei@mastodon.online avatar

Amazon might want to change its name to something less associated with wildfires. Maybe Sahara?

weilawei, to random
@weilawei@mastodon.online avatar

Less "productivity"; more "fuck you, pay me".

weilawei, to random
@weilawei@mastodon.online avatar

Every time I hear the word "productivity" it seems to be a synonym for "magnitude of stolen labor value".

weilawei, to random
@weilawei@mastodon.online avatar

A material representation of a profit motive is probably unlikely to exhibit prosocial behavior at any significant scale.

weilawei,
@weilawei@mastodon.online avatar

tl;dr: corporations will steal your shit, piss on you, insist it's raining, and then try to rent you the poncho they stole from you, but only after they cut telemetry holes in it.

weilawei, to random
@weilawei@mastodon.online avatar

"In one early experiment, conducted in the late ’70s, a group of 3M scientists fed PFOS to rats on a daily basis. Starting at the second-lowest dose that the scientists tested, about 10 milligrams for every kilogram of body weight, the rats showed signs of possible harm to their livers, and half of them died. At higher doses, every rat died. Soon afterward, 3M scientists found that a relatively low daily dose, 4.5 milligrams for every kilogram of body weight, could kill a monkey within weeks."

weilawei,
@weilawei@mastodon.online avatar

When I say that our continued existence is incompatible with their remaining billionaires, it's stuff like this. Just one example of so many.

weilawei,
@weilawei@mastodon.online avatar

This shows how toxic billionaires are:

"The next morning, she read the results to him and several colleagues — positive for PFOS. As Hansen remembers it, Olsen looked triumphant. “Those samples came from my horse,” he said — and his horse certainly wasn’t eating at McDonald’s or trotting on Scotchgarded carpets. Hansen felt that he was trying to humiliate her. (Olsen did not respond to requests for comment.) What Hansen wanted to know was how PFOS was making its way into animals."

weilawei,
@weilawei@mastodon.online avatar

"Almost as soon as Hansen placed her first transparency on the projector, the attendees began interrogating her: Why did she do this research? Who directed her to do it? Whom did she inform of the results? The executives seemed to view her diligence as a betrayal: Her data could be damaging to the company."

This is how they think. These people are sociopaths, and we need them out of power.

weilawei, to random
@weilawei@mastodon.online avatar

The disassembly of the UTF-8 validator in firefox shows that it uses 1871 instructions. 🤪

Vs the < 400 to do it the completely obvious way or the 45 (plus a small static table, not code) to do it the slightly less obvious way.

https://bjoern.hoehrmann.de/utf-8/decoder/dfa/

weilawei,
@weilawei@mastodon.online avatar

I threw together a godbolt example with the sample code from that link to count instructions. Pretty nice.

(Ignore the unsafe stuff; I'm just counting instructions in the one function decode(), and wouldn't put all that unchecked stuff in production code.

EDIT: Which is probably good since my code--not theirs--has a pretty bad bug in it that doesn't affect instruction count. That's what you get without tests.)

https://godbolt.org/z/48j1bjnce

weilawei, to random
@weilawei@mastodon.online avatar

"Why is my computer using so much RAM?"

a) Stop running 3 or 4 browsers simultaneously; even the things that don't look like a browser might have a full browser under the hood these days. Browsers are memory intensive.

b) It's not using as much as you think. Allocated space that isn't resident in physical RAM has a very low cost unless you're actually out of physical RAM. Dynamic libraries that aren't in use will contribute to virtual memory, but not resident memory: browsers link a bunch.

weilawei,
@weilawei@mastodon.online avatar

Where SHTF is when you run out of physical RAM to page in the virtual allocations. Until then, it's all gravy.

For instance, this box has no swap. It's disabled. If I actually ran out of memory for the kernel, it would panic and hard lock.

Fortunately, this is very unlikely in modern systems, and the OOM killer will terminate misbehaving userland apps--and this is a good thing, because it rescues the part of the system that matters for continued operation.

weilawei,
@weilawei@mastodon.online avatar

One of the things you should do when stress-testing code is deliberately run it up against the OOM killer. Make sure there's no landmines for future runs.

For testing, I want to use completely unreasonable workloads that nobody would ever actually want to run in practice and make sure it runs fine anyway.

If they do, then they probably have bigger issues than the performance of my code.

weilawei,
@weilawei@mastodon.online avatar

Writing fast code doesn't have to be rocket science. It mostly consists of

a) doing things in a direct way, in as straight a line as possible, and

b) measuring to make sure something really round-about isn't being done.

I'd argue that's just the basics, not premature optimization (an overabused quote, imo).

After measurement, if the direct way is still too slow, then you can write a faster version. Just don't sacrifice basic efficient movement.

weilawei,
@weilawei@mastodon.online avatar

Most modern compilers will optimize away simple inefficiencies in your code, if it's very direct/straight-line. It's when you get really clever (and don't get it right) that the compiler starts spitting out terrible code.

It is, in fact preferable, to write the less efficient version iff it's that much clearer and you have checked the output to make sure it was optimized.

That also implies you should understand the layers below the language you're working in. The stuff your code runs on.

weilawei,
@weilawei@mastodon.online avatar

Anything that's too clever to be turned into the clever form by an optimizing compiler should probably have more documentation comments than actual code.

I can tell you that comparing bytes to -65 is a fast way to differentiate UTF-8 leading bytes from continuations; but that's a trick no compiler will do for you, because it involves treating one kind of data as another, seemingly unrelated type. So that code warrants a big comment explaining how it works.

weilawei, to random
@weilawei@mastodon.online avatar

Slack is taking the approach of, "we know people would opt out, so we made it impossible without switching to a different product."

This is almost somehow worse than not offering an opt out, because Slack is also insulting their customers.

weilawei, to random
@weilawei@mastodon.online avatar

All that tech being used to murder Palestinians is coming home to be used on you.

weilawei, to random
@weilawei@mastodon.online avatar

Signs your library may not be ready for production usage in the wild:

Your documentation doesn't say what file(s) to include or import.

Your examples use types and functions you don't explain anywhere.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • GTA5RPClips
  • provamag3
  • InstantRegret
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • lostlight
  • All magazines