Mama told me not to come.

She said, that ain’t the way to have fun.

  • 11 Posts
  • 756 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle

  • Maybe? It depends on what the speed limit is and what enforcement looks like.

    I can get up to 20mph (30+ kmh) on my non-assist bite, faster when going downhill, yet most people cruise at 10-15 mph. If we set it too low, it’ll discourage use for regular transportation, like commuting, and if we set it too high, it doesn’t solve the problem.

    And for enforcement, there’s no way police will be stationed there, and camera surveillance is difficult, so it’s unlikely to happen.

    I just see the whole thing as problematic, so either don’t enforce anything or enforce vehicle types.







  • Anyone have a good solution for projects with multiple sub-projects? My structure is like this:

    • root - no venv
      • project_a
        • .venv
        • app/
      • project_b
        • .venv
        • app/

    To get completions to work, I need to manually switch venvs since each uses imports like app.a.b.c. But I frequently work on multiple projects at the same time, so I’d like it to switch venvs based on where the file lives.

    Anyone know if that’s possible? I’m probably missing something obvious since this seems like a fairly common thing.











  • Then how would you define OOP and FP?

    Wikipedia claims it supports OOP:

    Rust does not enforce a programming paradigm, but was influenced by ideas from functional programming, including immutability, higher-order functions, algebraic data types, and pattern matching. It also supports object-oriented programming via structs, enums, traits, and methods.

    I wouldn’t say Rust is an OOP language though, because that absolutely gives the wrong impression since that evokes ideas of classical inheritance as in C++ or Java. But I do very much believe it supports object oriented programming as a paradigm, since you can model things with objects at the core.

    That said, I think Rust is best used with less emphasis on OOP, since it’s pretty easy to get into trouble modeling things that way when it comes to lifetimes. I use OOP-style in Rust when it makes sense, and the rest is as close to functional as I can get it.

    object orientation is classes done wrong

    I think classical inheritance is object oriented programming done wrong. Go had the start of a good idea with composition and interfaces, and I think Rust’s traits + generics improved on it.