sukhmel

joined 2 years ago
[–] sukhmel@programming.dev 1 points 1 year ago

I don't know the answer to your question, but I think that what is needed is just a bit of syntactic sugar, e.g. Rust has ? for returning compatible errors without looking into them. That seems to be powered by Try trait, that may be a monad, but I am not fluent enough to check if it formally is.

[–] sukhmel@programming.dev 2 points 1 year ago (1 children)

The team I'm part of wants to ditch Nix in favour of just about anything, because no one wants to maintain Nix and everyone sees it as just source of problems :(

I agree that it was complicated to learn Nix for me, too, but now I see benefits in it but I can't make them change their mind and tired of trying. Nix could've been much easier to advocate for if the language itself wasn't this esoteric

[–] sukhmel@programming.dev 3 points 1 year ago

I may be too far from Python to tell, but it looks kind of incorrect to equate the author and their product. What if Guido decides to stop contributing, will Python end then? Creators of Rust spoken about the fact that Rust went very much not the way they wanted it to, this doesn't make them not creators, nor does it make Rust not Rust

[–] sukhmel@programming.dev 1 points 1 year ago

That's an interesting read, and his views are more extreme than I thought. But I sort of agree that some unification of terminology and legislation would make situation better (maybe just not in a way he proposes). E.g. age of consent may differ by about 6 years in different places, that's quite awful.

[–] sukhmel@programming.dev 2 points 1 year ago

I was amazed to read that, too. At least, they seem to keep it polite and professional. Kent even agrees that Linus is acting because of the responsibility of the maintainer, not on a whim or out of spite

[–] sukhmel@programming.dev 5 points 1 year ago

And freedoms of speech is why one can badmouth others and act racist /s

No, freedom is not absence of any kind of process or rules

[–] sukhmel@programming.dev 3 points 1 year ago

I wonder if said AI features run locally, but too lazy to check. Because if it's not local, it's a really big security issue no matter the country of origin

[–] sukhmel@programming.dev 1 points 1 year ago (1 children)

I see now, that you were misunderstood in some parts.

even if I got reported a really weird bug related to UB, I should (I am not experienced enough to make a claim) be able to know it's UB since the game's gonna crash when I try to recreate the bug in Debug.

This may be problematic for several reasons: it may be hard to reproduce, the more complicated the state, the harder; bug may rely on some race condition that may be much rarer in Debug because of speed difference; UB is notorious for causing things that should (seemingly) never happen, like returning from infinite loops, proving false statements true, and such, so it may be hard to understand what at all happened and why.

Regarding optimisations, it might still be better to try to profile the code (I will be honest, I don't do that until the moment when I can't go further without optimisation, and I haven't reached that with Rust) and see what are the real hot spots that require optimisations. I hope that someday you will be able to upgrade your machine, and hope that your game will be a good example of something that really runs anywhere

[–] sukhmel@programming.dev 4 points 1 year ago

Ach, well, a known method to create a nice discussion

[–] sukhmel@programming.dev 9 points 1 year ago

I just wanted to advice you against thinking that if there's something in all cases you've tried, there's something every time. When you put something in an optional and then unwrap, it's okay because you can see that the value is there, but even then there are usually better ways to express that. When you expect that since you've run the code thousands of times and it didn't break [in a way that you would notice, e.g. panic in another thread will only affect that thread] means that everything is fine, you may get weird bugs seemingly out of nowhere and will also need to test much more than strictly necessary.

Regarding the borrow checker, it has limitations and there are improvements that I hope will some day find way into upstream, but most of the time it may be better to change the code flow to allow borrow checker to help with bugs, instead of throwing it away completely. The same goes for unsafe, as in most cases it's better to not uphold invariants manually.

[–] sukhmel@programming.dev 1 points 1 year ago

I second @hellofriend, I learnt C++ as practical courses in the University.

I could somewhat understand teaching Java as professional education (although it creates positive feedback loop that doesn't do much good), but not exclusively teaching Java as part of CS degree.

[–] sukhmel@programming.dev 2 points 1 year ago (1 children)

I want to add that getting a degree likely will create a social network and provide experience of working in a team. These days that may be replaced by contributing to open source and going to free conferences (although these seem rare 😢).

So even though I am pro getting at least one first year of CS degree (because it's the most useful one because teaches to think rather than specifics), I agree that it can be fully replaced by a well though out self-education, and from purely CS standpoint self-education might even be of a better quality.

But yeah, I must disclose that I am a European rubbing free education, and I studied in university not college. So my opinion may be influenced by that and I don't know if first year in college would've been as useful as it was in university.

view more: ‹ prev next ›