I like programming and anime.

I manage the bot /u/mahoro@lemmy.ml

  • 9 Posts
  • 48 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle

  • Dude, if you’re being obtuse on purpose because you have an ax to grind against Rust, try a different approach. You’re not getting anywhere, clearly by the fact that no one agrees with you.

    If you don’t like that Rust has a restricted trademark, then call that out instead of trying to label the software and it’s license as non-free. It’s literally called out in my source that name restrictions ipso facto does not violate freedom 3.

    But if you genuinely believe that the implementation of the Rust language and it’s trademark is burdensome to create a fork, and you want people to believe you, then you gotta bring receipts. Remember, the benchmark that we both quoted is that it “effectively hampers you from releasing your changes”. It being “not a piece of cake” doesn’t cut it.

    Hint: Google Rust forks since their existence also undermines your claim.

    Good luck.






  • Just because you can get part of your education remotely or through self-learning didn’t mean “anything can be learned online”.

    And if you were hiring a math tutor for your kid, would you prefer a self-proclaimed expert from watching YouTube videos or would you want someone who got a degree from a credentialed university? And even if you don’t care, why are you surprised that others would be skeptical of the YouTube expert?

    Remote learning can be fine for some things, and self learning through informal channels are also fine, but it’s not a full on replacement for formal education in all cases.




  • The first way to use it is with any type annotation: you just use it for documentation.

    # int annotation
    def add_1_to_number(x: int) -> int:
        return x + 1
    
    # callable annotation
    def printer(x: int, func: Callable[[int], int]) -> None:
        results = func(x)
        print(f"Your results: {results}")
    

    These type annotations can help document and make editors parse your code to make suggestions/auto-complete work better.

    The second way to use it is by creating a callable. A callable is an abstract base class that requires you to implement the __call__ method. Your new callable can be called like any function.

    class Greeter(Callable):
    
        def __init__(self, greeting: str):
            self.greeting = greeting
    
        def __call__(self, name: str):
            print(f"{self.greeting}, {name}")
    
    
    say_hello = Greeter("Hello") # say_hello looks like a function
    say_hello("jim")  # Hello, jim
    






  • This doesn’t help for Gmail. I moved to a different part of the country and I have a spam email account that isn’t connected to a phone or second email. Even with the right password, it wouldn’t let me log in because I was trying to sign in from a different location and no secondary way to authenticate.

    Luckily it was a spam email so it was just annoying to recreate some accounts I used for that email, but yeah ve warned.