fruitcantfly

joined 2 years ago
[–] fruitcantfly@programming.dev 3 points 12 hours ago

I did enjoy this comment:

C code with a test suite that is run through valgrind is more trustworthy than any Rust app written by some confused n00b who thinks that writing it in Rust was actually a competitive advantage. The C tooling for profiling and checking for memory errors is the best in the business, nothing else like it.

In other words, a small subset of C code is more trustworthy than Rust code written by "some confused n00b". Which I would argue is quite the feather in Rust's cap

[–] fruitcantfly@programming.dev 3 points 12 hours ago

IMO, variables being const/immutable by default is just good practice codified in the language and says nothing about Rust being "functional-first":

Most variables are only written once, and then read one or more times, especially so when you remove the need for manually updated loop counters. Because of that, it results in less noisy/more readable code when you only need to mark the subset of variables are going to be updated later, rather than the inverse. Moreover, when variables are immutable by default, you cannot forget to mark them appropriately, unlike when they are mutable by default

A single underscore is just a naming convention, but double underscores triggers automatic name-mangling of the variable in question:

$ cat test.py
class foo:
        def __init__(self, x):
                self.__x = x

f = foo(1)
f.__x
$ python3 test.py
Traceback (most recent call last):
  File "/mnt/d/test.py", line 6, in <module>
    f.__x
AttributeError: 'foo' object has no attribute '__x'

However, much like private/protected variables in java, this is pretty trivial to circumvent if you want.

But I don't believe that you can argue that access modifiers are required for OO not to be shoehorned into a language, not when influential OO languages like Smalltalk didn't have this feature either. Java just happens to be closer to C++, where public/private/protected is much more rigidly enforced than either Java or Python

[–] fruitcantfly@programming.dev 7 points 1 week ago (3 children)

In what way does OOP feel shoehorned in with Python? I ask since that is not my own impression of the language.

Would you also be willing to share what language(s) you feel do(es) OOP without it being shoehorned in?

[–] fruitcantfly@programming.dev 8 points 4 weeks ago (1 children)

While there are legitimate grievances in this lawsuit, they do also complain that Valve doesn't let developers generate as many Steam keys as they want, and then sell them on other stores at lower prices than on Steam (see p. 35, "Valve Distorts Competition Through The Steam Key Price Parity Provision").

Keeping in mind that Valve lets developers generate keys for their games for free, this amounts to Wolfire complaining that they cannot offload the costs of hosting/services to Valve, while at the same time minimizing how much Valve earns. And that just sounds ridiculously entitled to me.

If Wolfire somehow were to win the right to undercut Valve in this manner, then I would not be surprised if Valve responded by charging developers for keys, or otherwise limited the ability of developers to generate keys. Which would have wide reaching consequences for PC gaming

[–] fruitcantfly@programming.dev 2 points 1 month ago* (last edited 1 month ago)

Linux supports BitLocker encrypted partitions. You just have to specify the BitLocker recovery-key in your fstab file or on the command-line. I've been dual-booting with disk encryption enabled on both Linux and Windows for several years, using that functionality