wkk

@wkk@lemmy.world

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

wkk,

S03 left the most memorable impression on me, I’d recommend powering through ;)

wkk,

One workaround has been to spoof your Firefox user agent so Teams believes it’s Chrome, and would you believe it the feature worked. I don’t know if this trick is still relevant.

wkk,

Antagonizing the borrow checker is wrong. If it screams it does so to prevent you from writing a mistake. Eventually once you have enough experience you should write code in such a way that doesn’t trip the borrow checker because you know how to properly handle your references.

Is it difficult to learn at first? Yes, but the benefits of learning this outweighs the downsides such as writing code that may use references when it shouldn’t.

I’m not a Rust aficionado, but the few Rust I’ve written opened my eyes on issues that I have been dealing with in other languages but for which I was blind.

Lastly I tried following a Godot project tutorial that was using GDScript except I challenged myself to follow it but rewrite the examples given using Rust’s bindings for Godot. It was definitely more cumbersome to work with, but I might also have been doing something wrong (such as blindly transcribing GDscript instead of writing more idiomatic Rust).

All of that to say 1) borrow checker is your friend and 2) scripting languages will always be more convenient at the cost of being way more dirty (way less safeties)

In the end you need to pick the right tool for the job. Multiple tools may be used within the same project.

wkk,

I’ve been told that they didn’t offer a hardcore mode because the game had a few bugs that could kill you for no good reason. Imagine losing your save because of the game’s bullshit. I find this decision smart even though I find stupid the fact that these bugs persisted for so long in the first place.

wkk,

The 2022 nobel prize was given to experimentalists that observed the violation of Bell’s inequality.

en.m.wikipedia.org/wiki/Bell's_theoremen.m.wikipedia.org/wiki/Quantum_nonlocality

I’m genuinely not an expert but I get it to mean that there aren’t hidden variables created alongside the entangled particles.

wkk, (edited )

I mean you can setup a source of entangled particles and two very far detectors that would do measurements roughly at the same time on each particle in such a way that information traveling at the speed of light wouldn’t have time to travel the distance between both detectors.

You can then just gather roughly simultaneous measurements and at a later time join the datasets from both detectors to see what one measured vs the other for each pair.

If I understand correctly the current observations show that collapsing the state of one of the particle influences the other all the way at the other detector. Since there’s no hidden variables that predetermine the result of measurements while the result of the collapse is random, and the fact that particles still respect the correlation over any distance is why there seem to be a FTL communication between the particles.

Something has to be communicated between the particles for the influence to work FTL, but it also seem we cannot leverage this phenomenon to send “actual information” this way :/

edit: Important point with that experiment: once the particles have been observed, if you try the experiment a second time using the same particles, then you’ll get different results, this time in line with hidden variables because the particle’s state already collapsed.

wkk, (edited )

The message transferred between the particles supposedly FTL does contain information though. What I meant was that we cannot encode our own arbitrary information on top of it. The message has a physical effect on reality, without it the state we find the particles in cannot be respected.

Just reconsider this: If we agree that the result of a measurement is totally random (no hidden variable predetermining the result of the measurement) but that once we measure and know the state of one particle then we know with certainty the state of the other particle (entanglement): information about the collapse of the first measured particle was shared to the other so that it’s no longer random.

edit: If your argument is about “sharing information doesn’t imply transmission” then let’s stop here and leave this thread agreeing that “information was shared” :)

I have no opinions on what shape the information sharing takes. Nor am I interested in guessing.

wkk,

It’s definitely not Rust’s fault, but it’s kinda Windows’ one and cmd.exe escape logic… It’s really difficult to write logic that will correctly escape any argument given to it, cmd.exe really is a pain to deal with :/

The Rust security team faced a significant challenge when dealing with cmd.exe’s complexity since they couldn’t find a solution that would correctly escape arguments in all cases.

As a result, they had to improve the robustness of the escaping code and modify the Command API. If the Command API cannot safely escape an argument while spawning the process, it returns an InvalidInput error.

“If you implement the escaping yourself or only handle trusted inputs, on Windows you can also use the CommandExt::raw_arg method to bypass the standard library’s escaping logic,” the Rust Security Response WG added.

I get that in situations where they can’t safely escape a parameter they’ll just stop with an error, which sound as sane as one could go with this!

wkk,

…microsoft.com/…/nf-processthreadsapi-createproce…

To run a batch file, you must start the command interpreter; set lpApplicationName to cmd.exe and set lpCommandLine to the following arguments: /c plus the name of the batch file.

Because a batch file (.bat or .cmd) is basically a set of cmd.exe instructions I guess that’s why you can’t get away from it.

And as if making sense of this CreateProcessA system call wasn’t funny enough, you also need to figure out how to safely prepare that lpCommandLine for it following all of cmd.exe’s weird escaping rules… lol

wkk,

If you can avoid running batch files altogether then great, amazing. But there are projects out there using Rust that still depend on running those and that’s the focus of the issue… But yeah I cannot wait until the day I won’t hear about cmd.exe again.

A Filipino villager is nailed to a cross for the 35th time on Good Friday to pray for world peace (apnews.com)

A Filipino villager has been nailed to a wooden cross for the 35th time to reenact Jesus Christ’s suffering in a brutal Good Friday tradition he said he would devote to pray for peace in Ukraine, Gaza and the disputed South China Sea....

wkk,

It’s like piercings that healed except the hole is in the hands? I want to believe he did something so that they didn’t have to mutilate his hands every 35 times they did this… But at the same time the face he makes when they remove the nails is not reassuring me :/

wkk,

Windows was made this way by humans, spare the machines!

How does data sent over the internet know where to go?

I saw a map of undersea internet cables the other day and it’s crazy how many branches there are. It got me wondering - if I’m (based in the UK) playing an online game from someone in Japan for example, how is the route worked out? Does my ISP know that to get to place X, the data has to be routed via cable 1, cable 2 etc....

wkk,

www.khanacademy.org/computing/…/internet-routing

I wouldn’t call that “messy and inefficient” but you do you. I’d be curious to know what’s a “clean and efficient” solution for you when it comes to routing packets around the planet :)

wkk,

Long COVID Seems to Be a Brain Injury, Scientists Discover

Bad title maybe

wkk,

I’m not a good comment writer so here’s some text:

Not a teacher, but Python is great to discover various aspects of programming (algorithmic, flow control, I/O, OOP, metaprogramming). It’s also easy to setup.

Java is just painful. The environment setup and the various frameworks available there are just way too overwhelming.

JS is actually close to Python in my opinion, and better suited for getting introduced to functional programming while still using a non-functional language. See anonymous functions/arrow functions. APIs are heavily callback-oriented which is also a great thing to get used to: You can register a bit of computation (a function) to be executed some other time, i.e. when something happens. You are not in control of the execution of that function, someone else is and will call you back. This is something important to learn (imo).

Finding the optimum algorithm is not important in the beginning (imo). When writing code there’s often two pretty different activities that happen:

  1. Defining and organizing your abstractions and flow.
  2. Identify bottlenecks and search for fast enough/memory efficient solutions.

In most real world scenarios, having good program flow and abstractions will be enough. Not everyone works on real-time terabyte-sized data processing. See gamemaking: it’s a very performance sensitive domain yet frameworks allow anyone to make a decent game. Why? Because for most problems, someone already wrote a library that’s fast enough. You just need to wire things properly together.

Teaching something lower-level like C/C++ is great, but you need to spend time deconstructing all the goodies people got used too when dealing with other languages. i.e. Why you can’t create an array with different types/structs inside anymore (not without pointers).

And then just get them to practice writing different bits of software with increasing complexity, over the year(s). The most exposure to writing code the better. Trial and error is how anything is learned, and while you might try to warn your students about common pitfalls it might only really click once they’ll make the mistake. Push them in situations where they’ll make mistakes.

The most important mindset to have (imo) is to constantly challenge yourself and your work: find ways to break your own stuff. Maybe you’ll miss cases but the better you get at anticipating breakage, the better you’ll get at writing robust software.

The second most important thing is to seek to understand every line of code you write and as many implications as possible. A program is supposed to be deterministic, there’s very few surprises to be had when dealing with code (there are some though). What I mean by that is: if someone reports a bug, it can often be enough to read the code with the unexpected result in mind and work your way back to the places that allowed for this bug to occur, just by reading statically.

Lastly one thing that was motivating for me when learning programming was when our programs would run against one another. Competition fosters innovation.

I hope these pieces of opinion help with anything…

wkk,

By “the most exposure to writing code the better” I might have meant to expose people to as many paradigms and patterns as possible and them have dealt with it. i.e. Writing a (shitty) eventloop is what really made it stick for me with async/callback-based programming.

User reports Google Maps proposed a sponsored detour to a trip (paquita.masto.host)

Original toot in Spanish says: “OK, so I need some alternatives to Google Maps, because I just decided seconds ago to stop using it after I got proposed a trip with a completely unnecessary detour which adds two extra minutes just because it pass by a gas station that sponsors this trip.”

wkk,

Please change “added a sponsored detour” to “proposed a sponsored detour” and it won’t be as misleading anymore

wkk,

You’re right that this is not generating monetary gains

But it’s generating outrage towards Google when what you accuse them of doing isn’t the reality, that’s pretty disingenuous

Not defending Google as a whole, but let’s keep honest about the current developments

The day sponsored trips are the default is the day I’m dropping Maps

wkk,

With such a query the first expected result would be hub.docker.com/_/redis, and then blog posts if really that’s what you want.

On my device I cannot find a link to dockerhub at all with the same query.

wkk,

Weapon balance is completely broken, depending on what you use you’ll go from losing every 1v1 to winning them all: BAS-B is the current broken battle rifle.

Then you have people learning maps by heart and prefiring corners, maybe they heard you, maybe there was a UAV, don’t overthink it.

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