farcaster

@farcaster@lemmy.world

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

farcaster,

I enjoy opamps. Texas Instruments LME49723 is one of my favorites :P

farcaster,

By asking this question you’re already ahead.

Be your genuine self. Share your wisdom. Love your child.

farcaster,

I’m guessing regular non-LP DDR works fine socketed in desktops because power is nearly a non-issue. Need to burn a few watts to guarantee signal integrity? We’ve got a chonky PSU, so no problem. On mobile devices however every watt matters…

farcaster,

California somehow never fails to do the wrong thing when it comes to utilities.

The problem isn’t people with a few solar panels on their houses, the problem is climate change and poorly maintained infrastructure leading to wildfires and massive liabilities. Perhaps if these liabilities would come out of PG&Es absurdly high profits they’ll be motivated to rethink how maintenance and wildfire risk is mitigated.

farcaster,

The author pointed out they also could’ve just called openssl prime -generate -bits 1024 if they weren’t trying to learn anything. Rebuilding something from scratch and sharing the experience is valuable.

farcaster,

There isn’t even any memory management in their code. And arguably the most interesting part of the article is implementing a bignum type from scratch.

farcaster, (edited )

The builtin u64.isqrt seems to be available in nightly only, and additionally I guess the author didn’t want to use any external crates as part of their self-imposed challenge. Though I think there may be an off-by-one result with f64.sqrt I don’t think this functionally breaks their u64 code because they loop to root_n + 1.

doc.rust-lang.org/std/primitive.u64.html#method.i…

farcaster, (edited )

Well, yeah, but you asked why they didn’t use integer sqrt. It’s something many programming languages just don’t have. Or if they do, it’s internally implemented as a sqrt(f64) anyway, like C++ does.

Most CPUs AFAIK don’t have integer sqrt instructions so you either do it manually in some kind of loop, or you use floating point…

farcaster,

I doubt doing it in software like that outperforms sqrtss/sqrtsd. Modern CPUs can do the conversions and the floating point sqrt in approximately 20-30 cycles total. That’s comparable to one integer division. But I wouldn’t mind being proven wrong.

farcaster,

As he alludes to, this is different on Teslas. Where in an attempt to save a few bucks on a simple sensor they’re using “machine learning” to detect rain with the front-facing camera and it doesn’t fucking work.

farcaster,

I think Big Tech is still pretty much a dream job for most people. High pay. Perks. Work/life flexibility. It’s certainly not as dreamy as it was 5 years ago perhaps, but realistically I’d take it over pretty much anything else.

farcaster, (edited )

Eh. I work in tech. I have friends who work or worked at almost every big tech company you’d recognize. These are still jobs, dealing with layoffs, annoying bosses, etc. has always been a fact of life. But from what I can see the average techie still has it very good compared to most other jobs. My friend who is a nurse would certainly like to earn a tech salary, not have to deal with hospital politics, and not work night shifts all the damn time, and take time off whenever they want to not whenever there’s availability…

farcaster,

One of the developers I respect most in my career walked out on .5M in bonuses on Amazon because of their ranking system for his employees. I was shocked.

This also shows what an incredibly privileged position techies have in the job market. I totally understand quitting Amazon. Really, I wouldn’t want to work there either. But ask one of their warehouse workers if they’d ever quit and forfeit a 0.5M bonus…

farcaster,

Yeah. Tech has gotten worse. But you really think it’s better in any other sector? I’m sure there are a few highly-compensated lap-dance-inspectors out there but the vast majority of workers deal with the same shit techies are dealing with, for significantly less pay and respect, if you can believe that.

farcaster,

And I don’t think they give out stock grants to warehouse workers, but I could be wrong.

Yeah. That’s my point. And still people take these jobs and work very hard indeed. Try explaining “limited bathroom break time” to your average tech worker.

Average Amazon .com Warehouse Worker hourly pay in the United States is approximately $16.96, which is 7% above the national average.

People don’t seem to understand the average worker would kill to make $80/hour and $200k in RSUs. Not a dream job, right.

farcaster,

Star Wars making the 40k universe look fun.

farcaster,

What alternatives are you using? I’ve only tried Lemmy after Reddit. I don’t find it overly negative here either btw, but I’m interested to compare.

farcaster,

It is a general purpose language for me. I wrote lots of little (or not so little) scripts in Rust. I wrote high performance GPU kernels in Rust. I wrote web services in Rust. It’s less hard to read and write Rust than is often claimed. Imo.

farcaster, (edited )

TLDR: “I picked a systems programming language to write and iterate on a bunch of gameplay scripting. Why does Rust not meet the needs of a gameplay scripting language like <every link in the article which either refers to dedicated game-programming scripting languages, or Unity which is whole goddamn commercial game engine>. Hmm yes, the problem must lie with Rust, not with the choices I made in my project.”

Just try to write a complete game with nothing but open source libraries in C++, or C#, or Java. Good luck with that. The author is switching to Unity for a very good reason. It turns out a commercial product made by 6000 people delivers value…

You use a systems programming language to write your engine. And then a scripting language to write your game. Everybody in gamedev knows this, I thought.

farcaster,

For me the biggest difference between Rust and C++, for things like scripting, is cargo. Being able to just add an awesome parser, or support for a particular file-format, to my “script” with a single line in cargo.toml is awesome. In this particular way cargo is better than Python even. The amount of time spent on acquiring, setting up, and linking libraries in other languages cannot be understated.

farcaster,

I’ll grant C# is easier to iterate with. But C/C++, i don’t think so. You still have to carefully consider ownership with those, just like Rust, and refactoring can be laborious. Except with Rust once it compiles your code is probably correct, ownership-wise, which iterates considerably faster than running C++ code and getting segfaults (or data races)…

I helped ship multiple games. All of them used scripting languages, like Lua or in-house, for gameplay code. It makes sense for iteration.

Oh and C# and Java come at a cost, of course. It’s easy to write them, I’m a big fan of C#’s design, but its overuse is also how we ended up with so many relatively simple indie games which consume gigabytes of memory and constantly drop frames stalling for GC. Nothing is without tradeoffs.

farcaster,

Completely agree with all those points.

The author seems to be a enthusiastic coder and made several game engines in Rust. I’m not sure why they didn’t hook up some hot-reloadable scripting to their engine, call it good, and build games. Probably less work than writing this very long article :)

Yeah I would probably not use Bevy either if the only option is to write all gameplay code in Rust. It doesn’t seem like the best tool for the job.

farcaster,

It’s not like Rust is the first language which requires you to reason about ownership. People still write tons and tons of C++. Rust is much faster to write than C++ in my experience, because ownership is checked by the compiler instead of requiring the human programmer to constantly think and reason about.

I wouldn’t write gameplay code in Rust like I posted above, but most of the complaints about the borrow checker making Rust somehow exceptionally hard to write are overblown imo. There’s a learning curve but then it makes sense.

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