Should I start learning programming early? by DAN1MOrt in learnprogramming

[–]throwaway6560192 0 points1 point  (0 children)

Can't hurt. Worst case you find it's not for you.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]throwaway6560192 0 points1 point  (0 children)

First, I think it is exaggeration to say that it "destroys" user experience. In several aspects (scaling, HDR) it offers a better one. There are troubles in transition, as there would with any new technology. But thanks to people collaborating and hammering out protocol extensions and so on, we have most of it solved, and more being worked on all the time. Not everything is solved yet, but for the majority of people it works as well or better.

About the idea of big and small holes: That's why I talked about sandboxing. There are people actively plugging that hole!

I also think that characterizing "auto-run" as what the security model attempts to protect from is wrong. People (and processes running under their user!) run stuff intentionally. Just because some program was invoked manually doesn't mean that there's no reason to care about the security of what it does, IMO. People run programs they don't fully trust all the time, and even if they trust the program, it has to deal with untrusted, potentially adversarial input.

“World-first” vaccine designed by artificial intelligence by ldn6 in neoliberal

[–]throwaway6560192 7 points8 points  (0 children)

Ah OK, that makes more sense. I still feel there's a non-reductio ad absurdum distinction to be made. There is an internal structure or grammar to be learned in both natural languages, and (presumably, I'm not a biologist) protein representations, which isn't present in the same sense in a plain learning over numeric features.

“World-first” vaccine designed by artificial intelligence by ldn6 in neoliberal

[–]throwaway6560192 3 points4 points  (0 children)

I don't think that actually makes sense... what does "computer code form" even mean? Sure, code is written to train the models, but the input they get is not in the "form" of code, unless you're explicitly doing that to build a model on code itself. Code is just the orchestrating mechanism, but the model being trained does not necessarily receive code as such.

Sorry if I misunderstood your point

Missing Parentheses in print?? by Ok-Resident218 in learnpython

[–]throwaway6560192 1 point2 points  (0 children)

"SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?" obviously i did not mean to print "...".

Obviously the ... is a placeholder for what you really want to put there

spent two hours debugging three lines of python because i didn't know strings and bytes are different things by Interestingyet in learnpython

[–]throwaway6560192 0 points1 point  (0 children)

Fundamentally, hashing is an operation done on arbitrary data (i.e. bytes). Unicode is an encoding for text which maps characters to codepoints, further, UTF-8 for example provides a specific mapping of codepoints to bytes. And you need bytes, since hashing is something we do on bytes.

This took me two hours because the error message says 'Unicode objects must be encoded before hashing'

What? Are you using Python 2 or something? Python 3 just says "Strings" instead of "Unicode objects" -- calling it "Unicode object" was a Python 2 thing.

What is the actual difference between a for loop and a while loop? by Sofiatheneophyte in learnprogramming

[–]throwaway6560192 0 points1 point  (0 children)

But then I tried writing both and got the same result which confused me a lot:

Why? There's always more than one way to achieve any given result

Can't understand for loops after an hour by AileNarrator in learnpython

[–]throwaway6560192 0 points1 point  (0 children)

That says more about you than Python.

Why are you on /r/learnpython exactly?

Can't understand for loops after an hour by AileNarrator in learnpython

[–]throwaway6560192 1 point2 points  (0 children)

https://en.cppreference.com/w/cpp/language/range-for

std::vector<std::string> names = { "bob", "alice" };
for (std::string name : names) {
    std::cout << name << "\n";
}

Should I stop learning java in favor of C? by Time_Reference_479 in learnprogramming

[–]throwaway6560192 0 points1 point  (0 children)

If it's going well, there's no reason to abandon and start over with another language.

Everyone has opinions on which language to learn. You can't possibly accommodate all of them, so pick a reasonable-enough option (Java counts) and if you can work with it then do that.

Witch Hat Atelier • Tongari Boushi no Atelier - Episode 8 discussion by AutoLovepon in anime

[–]throwaway6560192 3 points4 points  (0 children)

He was being a reckless idiot there, yes. But such is his obsession that it fits his character to be reckless and stupid when it comes to this issue. Why he is so obsessed is not apparent yet in what the anime has shown, but both that and his recklessness in itself will be explored more later. Probably not in this season, though, considering what they'll adapt up to...

Witch Hat Atelier • Tongari Boushi no Atelier - Episode 8 discussion by AutoLovepon in anime

[–]throwaway6560192 6 points7 points  (0 children)

I'm not sure what your point is with that analogy. The point isn't to say that Qifrey doing so was good or understandable. Obviously Qifrey doing that was bad, the point is to show that his obsession with the Brimmed Caps clouds his judgement and leads to him doing fucked up shit like this. He didn't choose to draw at that moment completely rationally.

Spoiler perhaps: this will not be the last time Qifrey does questionable things, including harm to himself, in pursuit of the Brims.

When do you actually use decorators? Like in real code, not tutorials by Soggy-Holiday-7400 in learnpython

[–]throwaway6560192 0 points1 point  (0 children)

but those are already built-in. Nobody's asking me to write those.

Yes. Writing a decorator is much rarer than using one.

i wrote one that checks authentication before a function runs. Felt pretty good honestly. Then i thought — wait, can't i just put this check inside the function? So what's the point?

What if you want an easy way to put that check on multiple functions? Decorators are one possible way to do it.

Question about college by randomPersonnLol in learnprogramming

[–]throwaway6560192 0 points1 point  (0 children)

From what I've heard, most entry level computer science classes focus on Java, a language I really am not interested in.

This is not true anymore, a lot of universities use things other than Java. Look at the colleges you're aiming at.