• 0 Posts
  • 34 Comments
Joined 2 years ago
cake
Cake day: July 1st, 2023

help-circle

  • Well the project never left its roots, it’s a still a simple system-f implementation, and a lot of ideas. I’ve put it on ice, after seeing how much involved there is with questionable outcome (and I need to dedicate a good amount of time to get the theory right, it’s not that I have year long research experience background in type-theory etc.). There’s more concrete problems than designing yet another language… Maybe I’ll come back to that project at some time.

    Anyway the idea was to have something like Nix but more general (including derivations, possibly controlled side-effects). Closest to that currently would be typescripts object type, Haskell (overall static typing), crystal-langs union type and nickel (which is less ambitious (probably for good reason)).


  • “Faster/easier/less mental overhead” is indeed exactly what I mean by “convenient”.

    How different the conception of convenient is :P

    I think it’s super convenient to just do cargo new , start hacking, have superb tooling/expressiveness/performance etc. And it works remarkably well and fast if the problem space is not self-referential etc. or a lot of mutability is in play (I’m probably faster in Rust now than in python, but that probably has to do with the amount of time I’m spending with it…). But I get your point, and I think there’s certainly better languages for certain problems (and I even started one myself some time ago, because I wanted something like Nix but with strong typing (anonymous sum/union types/sets etc. similar as typescript))


  • Box

    Now try to do that with a trait that isn’t object-safe…

    I get your point, these things make fighting with the borrow-checker a little bit less annoying, but Rust is complex. I’ll happily accept that because I value high code-quality (to that point that I rather invest more time to get things right) but when that is not the goal and you want something higher-level and strongly-typed there are alternatives that work better (I’m just talking about the language itself, ecosystem alone for me is yet another pro-Rust thing)


  • What is a convenient language exactly?

    Although I think the arguments are not exactly pro-Rust (they already show complexity with something like Box).

    Sure hacking something quickly together with python is quite a bit faster/easier/less mental overhead.

    But long-term and IDE experience IMO Rust is the most convenient language (mind you I programmed in ~10-20 languages, and the whole DX is best with Rust IMO (cargo, rust-analyzer etc.)), as it forces you to write a clean architecture and the strong type system keeps it maintainable. While refactoring can feel cumbersome, I almost always had a clean and working/correct (often without tests) code afterwards (when all the compiler errors are fixed).

    That said Rust is of course not perfect, all the strong-typing, zero-cost (async is certainly not something I would recommend beginners) systems-programming features make it complex at times (and the type-system can get in the way at times, e.g. trait-object-safety, or not “simple” higher-kinded types). So when that is annoying and control over the exact memory is not that important, something like OCAML or Haskell may be better.


  • have an even cleaner architecture

    Although I’m fully in camp functional, I doubt that. There are problems that are inherently stateful and rely on mutability. Modelling that in Haskell often results in unnecessary abstractions. I think Rust hits a sweet spot here (when you’re that experienced to write idiomatic Rust, whatever that exactly is). Also being lazy by default has its own (performance) implications, strict + lazy iterators (like Rust) is a good default IMO.





  • True, Python has a very big userbase and a lot of cool libraries and is nice to quickly hack something together.

    Though the title of the post is

    If you had to choose one programming language that you had to use for the rest of your life, what would it be?

    So TMU I want to predict the future in a way that it positively affects me, and find a language that fulfills this role best (throughout the stack, so that I’m not limited). And honestly I wouldn’t want to touch Python with a long stick, if the project is moderately complex (and isn’t easily off-loadable to native libraries that Python builds upon) and say > 5000 LOC, the super dynamic nature of python is a curse in this regard.




  • Well I was spending too much time with configuration, and (this is the main reason I guess) configuration was very often broken, because plugins have changed too often, so I was continuously fixing the plugins, which was time-consuming and annoying. To be fair that was when lua support slowly stabilized, I think the situation got a little bit better, but even more so for helix (I’m using helix now for 2 years I think).

    And also helix is fast, very fast (this was also a reason: instant feedback), you really feel, that everything there is done in the core implementation (no plugin system yet unfortunately, but I have almost everything I need currently with helix, unlimited undo + persistent session would be cool, but otherwise I’m happy).

    Also after using it a little bit more, the kakoune inspired visual/selection first makes more sense IMO, it’s feels more intuitive (“darn, I miscalculated 3fs, so I’ll just press v and go to the next s manually”, or multiple cursors as selections, you see exactly what you’re doing, no cgn or stuff like that)




  • Yep this sums up my experience quite well too.

    I want to emphasize two things here:

    • Learn reading code (by reading code…) of high quality open source projects. It helps getting new concepts and actual creative coding patterns for concrete problems (unlike learning all these “design patterns” in books that IMHO are often just boilerplate generation (hard take I know…)).
    • Start coding (open source) projects, especially challenging ones, and keep pushing your limits, by trying to learn new smart things, how to achieve problem X. I stagnated in my workplace for quite some time, got unhappy (around COVID), scaled down working hours significantly (I have quite a spartan life, so I can fortunately afford it), and am coding a lot more open source since then. I think I almost learned more in the last 2-3 years until at least to the years of university (quite some time ago), maybe even more than in university, and have a lot more fun while coding. I think going in depth with a programming language comes automatically, when the project is fancy enough, I learned a lot of limitations of Rust (and thus basically reached the deepest level of (parts of) the language) while designing smart APIs.


  • I think it’s not that bad yet, when comparing with npm. Usually the dependencies I use are of very high quality. But I’m also very selective with dependencies. I’m rather writing a simple part myself, than using a not-really maintained low-quality dependency…

    Btw. I have not looked into the Hare language yet (will do that now), but if it’s similar as deno, I won’t like it. You want to have some kind of package management IME…