Douno off the top of my head. To take a wild guess they might just wrap a file handle and give it s nice api? If that’s what they do then moving from the file zeros out he handle for basically the same reason smart pointers set their internal pointer to nullptr, so they don’t delete it (or close the file in this case) underneath the new object.
Traister101
Yo whatup
- 0 Posts
- 291 Comments
Depends on the object what happens when they are moved from. Some objects are put into a valid moved from state (usually depends on if doing so is free or required anyway. For example to satisfy the invariant of the moved to unique pointer the moved from pointer needs to be set to nullptr in order to prevent the moved tos unique pointer being deleted from underneath it)
Traister101@lemmy.todayto Technology@lemmy.world•You Can’t Make an Omelette without Exploding Several Billion Dollars’ Worth of EggsEnglish2·21 days agoIt’s not controversial your just really stupid or really stupid and also a natzi
Traister101@lemmy.todayto Technology@lemmy.world•Why Japan's animation industry has embraced AIEnglish211·29 days agoIt hasn’t though? That short “film” in the thumbnail is very not great. Just to summarize a few issues clothing items randomly change colors, clothes randomly switch to different clothes, they attempted to copy the really nice crane shot in Frieren but used “AI” to do it which just smeared ugly green shit around the screen cause there were leaves, a path they are walking on randomly changes material multiple times, ect ect. All the usual AI video crap. They didn’t solve any of the issues it has and it there’s one “animator” credited.
Spoilers if you care (no I’m not going to actually mark them) but there’s a part where using AI would have been a really good directing decision, especially with the faults but because the “director” is just a tech bro who’s incapable of understanding art they completely missed an extremely good use case.
Actual animation studios don’t and won’t use this crap until it’s dramatically better. The closest thing they currently use is cacani (actually an interesting tool scroll through that) and it uses absolutely no “Ai” whatsoever
Because it sounds like English words which is “cool”
Eyy I just watched Red Ranger, extremely enjoyable for how stupid it is. I bet I’d have loved power rangers if I watched it as a kid
Traister101@lemmy.todayto News@lemmy.world•‘Harrowing': Video shows Worcester police hold girl's face on ground during ICE operation41·1 month agoSince there’s been some good replies to this I shall now add my oh so very important reply to the pile.
Water isn’t actually wet, water wets things. Is a cup filled with water wet? No, the cup is dry and contains water. Are freshly washed dishes wet? Yeah, they have some water on them that hasn’t dried off yet.
“Is water wet”, “Is (breakfast) cereal a soup” and “Are hotdogs a sandwich” are some of my favorite stupid nonsense arguments to have. It’s entirely pointless but there is an actual right answer going by the definitions
I can’t judge but wow. Impressive
You cannot have a string argument, arguments and variables in JS don’t have a type. All you have in JS is objects. Actual functions, like full on
function foo(){}
are still objects, like you can actually store data on the things.
JavaScript doesn’t have typed parameters or variables. The function expects a string and does things in the function body which converts the object into a string. JS shares this behavior with all dynamically typed languages and it’s extremely useful in some contexts and extremely frustrating in others. It’s down to what it’s being used for. Dynamic languages make excellent scripting languages, see Python really just being a souped up shell lang
It’s not a string argument though, it’s JS. You can argue it’s expected to be a string but like the rest of JS all you can know from the signature alone is that it takes an object. Hopefully your little ducky quacks the right way!
Traister101@lemmy.todayto News@lemmy.world•Top virologists sound the alarm on bird flu and plead with world leaders to prepare for another pandemic19·2 months agoWe don’t “improve” diseases to make them deadilier and then just release them. The point of gain of function research essentially boils down to “How quickly can this disease become a serious issue and what do we expect that to look like?” with covid, thanks to gain of function research we knew it would quickly mutate and decrease in severity and we could significantly reduce harm by slowing the spread until it got to the point it’s at today.
Even Java has streams and stuff. Course Java so it’s kind of weird (iterators are mutable and internally iterate the collection/whatever lazily) streams are lazy and only go through all the operations, mapping, filtering ect when you collect the elements somehow (like rust). JS is wild lol
Traister101@lemmy.todayto News@lemmy.world•About 4-in-10 Americans say Trump is a ‘terrible’ president amid sinking approval: Survey9·2 months agoHonestly, as a sane person yes I do like honest Nazis more than lying Nazis. But do you know what I like more than honest Nazis? People who aren’t a Nazi, I like those way the fuck more than honest Nazis which apparently puts us in the minority in this shit hole of a county
Traister101@lemmy.todayto Technology@lemmy.world•An Alarming Number of Gen Z Ai Users Think It's ConsciousEnglish101·2 months agoI find it unfair to blame my peers for things largly out of their control. If you are born into an abusive family you’ll only ever know if you happen to luck into the information that such behavior is unhealthy. Is it some of their faults? Certainly, I know people who are willfully stupid and refuse to learn but even knowing these people I feel pretty uncomfortable blaming them for it. I’ve talked to them, I’ve educated them on stuff they were willfully ignorant of and do you know what it generally boils down to? School has taught them that learning things is hard and a waste of their time. They’d rather waste hours trying to get an LLM to generate a script for them than sit down and figure out how to do it despite knowing I’d happily help them.
School has managed to taint “learning” in the minds of many of my peers to such an extent that it should be avoided at any cost. School has failed us, is still failing the current generation and nothing is going to be done about it because it’s working as it’s meant to. This is the intended outcome. Like genuinely the scale of the fuckup is to the extent that enjoying reading is not just rare but seen as weird. We’ve managed to take one of the best ways to educate yourself and instill dread in our children when it’s brought up. How do we expect people who’ve been taught to hate reading to just magically turn around and unfuck themselves? What’d they see a really motivating Tik Tok or some shit? I despise that platform but like seriously you older people just don’t it man. Been complaing since middle school and now people wanna turn around and blame us as if it’s some personal failing it’s fucked up dude. Our education sucks, has sucked and will continue to suck even worse until we stop pretending like this is some kind of personal failing.
Traister101@lemmy.todayto Technology@lemmy.world•An Alarming Number of Gen Z Ai Users Think It's ConsciousEnglish121·2 months agoThe main point here (which I think is valid despite my status as a not in this group Gen Z) is that we’re still like really young? I’m 20 dude, it’s just not my or my friends fault that school failed us. The fact it failed us was by design and despite my own and others complaints it’s continued to fail the next generation and alpha is already, very clearly struggling. I really just don’t think there’s much ground to argue about how Gen Z by and large should somehow know better. The whole point of the public education system is to ensure we well educate our children, it’s simply not my or any child’s fault that school is failing to do so. Now that I’m an adult I can, and I do push for improved education but clearly people like me don’t have our priorities straight seeing who got elected…
Traister101@lemmy.todayto Programming@programming.dev•Vibe Coding is not an excuse for low-quality work9·2 months agoWhat ramdon ass language could they possibly be pulling out of their ass for you to he completely unable to write a for loop? I’ve yet to see a for loop, or really any sort of loop that doesn’t look pretty much exactly like the standard C style for loop
for(int x = 0; x < z; x++) { }
If you have a C style language with iterator for loops like C++, Java and friends you almost certainly have this syntax
for(int x : numbers) { }
Python has exclusively iterator for loops with this syntax
for x in range(z)
The only real difference is that instead of a colon
:
you use thein
token.At best I can see the need for a quick refresh on what the exact syntax is but if your a senior any languages you actually use should have a template for junk like this. I don’t think I’ve manually written a loop in ages, I just type out
iter
for an iterator for loop or when I rarely need an indexfori
and the rest gets stamped out for me.If your being tested on random languages you can simply just not be familiar with a language. I haven’t touched Zig once but I’d totally be down to learn it. Everybody whos got a couple languages under their belt knows how easy it is to pick up new ones.
Traister101@lemmy.todayto News@lemmy.world•Number of Americans who never want kids doubled in 20 years7·2 months agoThere is also that sure but biologically people want to have kids, the extreme cost of living experienced by many prevents them from having kids
Traister101@lemmy.todayto News@lemmy.world•At These Grocery Stores, No One Pays: A growing number of free grocery stores offer shoppers not just free food, but choice, ambiance, and space for dignity, too.1·2 months agoI’m sorry you incorrectly believe conservatives are a political party
Okay so imagine for a second that somebody just invented voice to text and everyone trying to sell it to you lies about it and claims it can read your thoughts and nobody will ever type things manually ever again.
The people trying to sell us LLMs lie about how they work and what they actually do. They generate text that looks like a human wrote it. That’s all they do. There’s some interesting attributes of this behavior, namely that when prompted with text that’s a question the LLM will usually end up generating text that ends up being an answer. The LLM doesn’t understand any part of this process any better than your phones autocorrect, it’s just really good at generating text that looks like stuff it’s seen in training. Depending on what exactly you want this thing to do it can be extremely useful or a complete scam. Take for example code generation. By and large they can generate code mostly okay, I’d say they tend to be slightly worse than a competent human. Genuinely really impressive for what it is, but it’s not revolutionary. Basically the only actual use cases for this tech so far has been glorified autocomplete. It’s kind of like NFTs or Crypto at large, there is actual utility there but nobody who’s trying to sell the idea to you is actually involved or cares about that part, they just want to trick you into becoming their new money printer.