[-] fruitcantfly@programming.dev 3 points 2 weeks ago* (last edited 2 weeks ago)

On windows if you don’t disable bitlocker, then login at least once to your outlook.com account so it can backup the key.

That's not a bad idea, but if you are going to be using Linux then I'd recommend exporting the key and, for example, saving it in your password manager and/or on a USB stick (preferably after encrypting it). That way you can easily decrypt the partition using dislocker. Also, personally, I do not want to my encryption keys to shared with Microsoft, but that's just me ¯\(ツ)

[-] fruitcantfly@programming.dev 4 points 2 weeks ago

"Free" and "libre". But this has only ever referred to the software itself, not to the hardware needed to use it.

That should be obvious, since otherwise almost no OSS would be FLOSS. After all, you have to buy a PC or another device to run it

[-] fruitcantfly@programming.dev 2 points 1 month ago

What does reminding Windows involve? I also dual boot btrfs, but Windows never sees my btrfs since it's on a LUKS encrypted partition, so I am not familiar with needing to do this

[-] fruitcantfly@programming.dev 3 points 1 month ago

To be honest, they didn’t make it easy to find

[-] fruitcantfly@programming.dev 2 points 1 month ago

While WinRAR is pretty great, it has also had several severe security vulnerabilities over the years, including one last year:

https://en.wikipedia.org/wiki/WinRAR#Security

Which isn’t quite what you’d expect from “perfect” software

[-] fruitcantfly@programming.dev 2 points 1 month ago

I use Mega(sync) to keep my various PCs in sync. Before that I used SpiderOak for a number of years, but the service started degrading at some point, which forced me to switch.

While committing to a git host is not a bad idea, it doesn’t cover all the stuff you might want to sync in my experience

[-] fruitcantfly@programming.dev 2 points 3 months ago

The way to really optimize Python code, is by reducing the amount of Python code in your program, since Python itself is dog slow. Instead, you want to offload as much of the work as possible to modules written in compiled languages. So completely switching to Rust, or another compiled language, is simply taking that strategy to its logical conclusion

[-] fruitcantfly@programming.dev 2 points 3 months ago

I believe that it is useful in a few places. cppreference.com mentions templates as one case:

Trailing return type, useful if the return type depends on argument names, such as template<class T, class U> auto add(T t, U u) -> decltype(t + u); or is complicated, such as in auto fpif(int)->int(*)(int)

The syntax also matches that of lambdas, though I'm not sure that adding another way of specifying regular functions actually makes the language more consistent, since most code still uses the old style.

Additionally, the scope of the return type matches the function meaning that you can do

auto my_class::my_function() -> iterator { /* code */ }

instead of

my_class::iterator my_class::my_function() { /* code */ }

which is kinda nice

[-] fruitcantfly@programming.dev 3 points 5 months ago* (last edited 5 months ago)

Astral clearly are using semantic versioning, as should be obvious if you read the spec you linked.

In fact, one of the examples listed in that spec is 1.0.0-alpha.1.

ETA: It should also be noted that ty is a Rust project, and follows the standards for versioning in that language: https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field

[-] fruitcantfly@programming.dev 2 points 7 months ago

Thanks! And yeah, with Markdown you need an empty line for it to actually add a paragraph break.

Though I just learned that you can also end a line with two spaces or an \ to get a line-break

[-] fruitcantfly@programming.dev 2 points 7 months ago

Please consider adding paragraph breaks to your posts; a wall of text like this is not pleasant to read

[-] fruitcantfly@programming.dev 2 points 8 months ago

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

view more: ‹ prev next ›

fruitcantfly

joined 2 years ago