charolastra

joined 1 year ago
[–] charolastra@programming.dev 3 points 2 months ago* (last edited 2 months ago)

Keyword "typically". If I'm overriding dunder methods, then I'll typically need to call the super method as well. It's not like it's forbidden.

Consider the following:

class MyStr(str):
     def len(self):
          return len(self)
          # OR
          return self.__len__()

Both of the above return values are perfectly valid Python.

[–] charolastra@programming.dev 3 points 2 months ago* (last edited 2 months ago) (2 children)

At the end of the day, len(ob) just defers to ob.__len__() so both are correct, just one's more functional and one's more object oriented.

[–] charolastra@programming.dev 4 points 4 months ago (1 children)
[–] charolastra@programming.dev 2 points 8 months ago (1 children)

The second edition was published last Feb (2023) I believe. I read it on my Kindle, having "flicked through" the online version about 6 months prior, and yeah having it page by page with bookmarks etc was almost as good as paper, but far superior to the web version and I was able to read it cover to cover and gain a lot from it. I immediately then read about 4 other books on Rust! Can recommend "Rust Atomics & Locks" by Mara Bos, and "Rust for Rustaceans" by Jon Gjengset for the next level up.

[–] charolastra@programming.dev 2 points 8 months ago (3 children)

Agree. The official book is a really good start though, and available for free. https://doc.rust-lang.org/stable/book/

[–] charolastra@programming.dev 4 points 8 months ago (1 children)

What about figuratively?

[–] charolastra@programming.dev 8 points 8 months ago

Crimean River

[–] charolastra@programming.dev 1 points 9 months ago* (last edited 9 months ago)

Yeah this is generally true in my experience. I have a colleague who is a mathematician, and they write completely uncreative code most of the time, often with logical flaws.

[–] charolastra@programming.dev 1 points 9 months ago

What is this, your only comeback?

[–] charolastra@programming.dev 1 points 9 months ago

Same here. I do think I'm getting over it though, and possibly quicker than the boot campers.

[–] charolastra@programming.dev 8 points 9 months ago* (last edited 9 months ago)

It doesn't embed Chromium, it uses the native webview that already exists on the system. The average app I make using Tauri is less than 15MB, and being Rust on the backend you can go as low level as you like. The Tauri API provides access in your front end code to all the native APIs you can think of.

view more: next ›