TehPers

joined 2 years ago
[–] TehPers@beehaw.org 2 points 1 day ago (1 children)

Not yet. WASM unfortunately does not have DOM access or the ability to call any native JS functions without glue code.

There are packages that work with wasm_bindgen in Rust that can generate that JS for you, but it's all still super early.

[–] TehPers@beehaw.org 2 points 3 days ago

The required components are documented in the component impl block. Scroll down in docs.rs until you find impl Component and they'll show up there.

Apparently there were issues getting required components to show up at the top of the page (from my understanding anyway), so for now they live there.

[–] TehPers@beehaw.org 1 points 4 days ago

When you tariff them by over 100% of their value, they tend to cost more to import.

My whole comment was on the tariffs specifically, and there is a 100% chance they affect sales in the US. Even with cost reductions in manufacturing over the total lifetime of the console, there's no chance they cut costs enough to keep up with the tariffs, and there is no chance they planned for the tariffs to be this high in their planning.

Outside the US? These tariffs aren't applied, but raising the prices globally limits the impact of them on one of their largest markets since they can amortize the cost across all their markets instead of just one.

[–] TehPers@beehaw.org 2 points 4 days ago

If you are new to something and want to learn, seek resources and educate yourself with them. Learning takes time, and there are no shortcuts.

A hot DB should not run on HDDs. Slap some nvme storage into that server if you can. If you can't, consider getting a new server and migrating to it.

SQL server can generate execution plans for you. For your queries, generate those, and see if you're doing any operations that involve iterating the entire table. You should avoid scanning an entire table with a huge number of rows when possible, at least during requests.

If you want to do some kind of dupe protection, let the DB do it for you. Create an index and a table constraint on the relevant columns. If the data is too complex for that, find a way to do it, like generating and storing hashes, sorting lists/dicts, etc just so that the DB can do the work for you. The DB is better at enforcing constraints than you are (when it can do so).

For read-heavy workflows, consider whether caches or read replicas will benefit you.

And finally back to my first point: read. Learn. There are no shortcuts. You cannot get better at something if you don't take the time to educate yourself on it.

[–] TehPers@beehaw.org 3 points 5 days ago (1 children)

Sure you can. Actions taken in the right direction are still going in the right direction regardless of who makes them.

This would be like saying that a member of a capitalist society can't criticize their society. It reeks of "yet you participate in society".

[–] TehPers@beehaw.org 4 points 5 days ago (3 children)

This depends on the markets. For example, if prices in the US raised 50% due to Tariffs, then they might lose one of their largest markets, but if they can raise them 10% globally, then they can potentially limit that loss and still have a chance (as much as possible anyway) in all of their markets.

Either way, they need to raise prices because their costs have gone up. It's a question of where that money is coming from, and how they can reduce its impact on them as much as possible.

[–] TehPers@beehaw.org 3 points 6 days ago

There are ad docs in the dotnet copilot.

[–] TehPers@beehaw.org 3 points 6 days ago* (last edited 6 days ago) (1 children)

For your second part:

A lot of open source projects exist to make people's lives easier at work. The people developing these projects are often also people who have jobs as devs and have a use for the projects. It just so happens that it's easier to use these libraries at work and share them with others when they're more permissively licensed, and there are community benefits when people all contribute back to it.

There's nothing wrong with wanting to go the AGPL route and forcing everyone into open source, but that makes it much harder to use these tools at work, which often kills the motivation behind building them in the first place.

I tend to be of the opinion that community tools should be GPL/AGPL, while libraries can be anything. It works as a compromise for both - so devs can have an easier time at work while also forcing contributions back to community-developed tools.

Edit: I should also mention dual licensed AGPL/paid commercial. That model is probably my favorite, but unfortunately uncommon.

[–] TehPers@beehaw.org 7 points 6 days ago

https://ground.news/article/lol-these-house-democrats-just-changed-their-minds-about-trying-to-impeach-trump

The URL says it all.

[–] TehPers@beehaw.org 14 points 6 days ago

The comments on the article are truly an example of justifying being a shitty person as "politics". It's okay to discriminate and harm others as long as a politician does it first!

[–] TehPers@beehaw.org 5 points 1 week ago (1 children)

The two-sentence ruling offered no explanation for why the judges were overruling the trial court; it also didn't name the judges who made the decision. And it came despite the judges hearing no oral arguments on the case.

Clearly it's because Chewbacca lives on Endor, but that makes no sense.

[–] TehPers@beehaw.org 2 points 1 week ago* (last edited 1 week ago) (1 children)

This seems to me more like a complaint about JS's functional methods on arrays being eager rather than a complaint about loops. All of this is solved in languages with iterators (or async iterators for a potentially better solution).

For example, in C#, .Where does nothing immediately on enumerable types, and on IAsyncEnumerable, you can go as far as streaming/chunking results from a DB into the enumerable and filtering off the DB asynchronously just by passing the enumerable into an await foreach. In Rust, you get the same options (though more verbose) using streams from futures.

Edit: the rest of the article doesn't really have much to do with loops, but these are all solved problems in C#, Rust, and I assume other languages too. Even Python has iterables, and you can configure your thread pools however you want to for concurrency.

view more: next ›