• 0 Posts
  • 171 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle




  • Interactive rebase? There’s no GUI that actually does that well, if at all. And it’s a massive part of my daily workflow.

    The CLI is far, far more powerful and has many features that GUIs do not.

    It’s also scriptable. For example, I often like to see just the commits I’ve made that diverge from master, along with the files changed in each. This can be accomplished with git log --oneline --stat --name-status origin/master..HEAD. What’s more, since this is just a CLI command, I can very easily make a keybind in vim to execute the command and stick it’s output into a split window. This lets me use git as a navigation tool as I can then very quickly jump to files that I’ve changed in some recent commit.

    This is all using a standard, uniform interface without mucking around with IDE plugin settings (if they even can do such a thing). I have many, many other examples of scripting with it, such as loading side-by-side diffs for all files in the worktree against some particular commit (defaulting to master) in vim in a tabpage-per-file, which I often use to review all of my changes before making a commit.










  • I dunno, I ended up blocking the instance way before I knew about their reputation (like, when I first joined Lemmy) because all of the users their kept posting the most unhinged shit.

    I have definitely seen blatant apologism for China/Russia from them.

    FWIW, I’m much further left than your average Democrat (I consider myself a leftist/anarchist). I personally don’t consider what I’ve seen from them to be very “left”, just authoritarian.



  • I made this mistake for ages because Haskell is so popular and it’s functional and pure, but it’s not actually a requirement for functional languages to be pure. OCaml isn’t.

    I didn’t say that FP languages have to necessarily be pure, just that FP languages tackle the problem of mutation by arranging programs such that most things are typically pure and side effects typically happen at the periphery (logging is probably the one exception, though). This is true even in FP languages that allow arbitrary side effects in functions, it’s just not enforced by a compiler.

    I agree Rust code has a different feel to OCaml code but that’s because it makes some things easier (e.g. mutation, vectors). You still could write Rust as if it was OCaml (except for the lack of currying), it’s just that nobody does that because it sucks.

    That’s the entire point, though. It’s all about what the language emphasizes and makes easy to do. If it’s unnatural to write a functional program in Rust and no one does it, then it’s not really reasonable to call it a functional language. Writing functional programs is not idiomatic Rust, and that’s okay.


  • Fundamentally it’s a language oriented around blocks of statements rather than composition of expressions. Additionally, it takes a different approach to the mutation problem than FP languages: where FP seeks to make most things pure and push mutation and side effects to the edges of the program, Rust uses its type system to make such mutation and side effects more sane. It’s an entirely different philosophy when it comes to programming. I don’t think either approach is necessarily better, mind you, just a different set of tradeoffs.

    I’m a professional Haskell developer and am very much immersed in FP. When I read Rust code, I have to completely shift my thinking to something much more imperative. Whereas if I read, say, Ocaml, the difference is mostly syntactic. This isn’t a slight, mind you. I quite like Rust. But it’s a very different paradigm.