philm

joined 2 years ago
[–] philm@programming.dev 2 points 2 years ago (2 children)

Behold, Rust is blazingly fast in approaching the most popular language :)

Also, in comparison to Python you can do pretty much everything throughout the stack, which would be the reason I would go for Rust (not mentioning all the other niceties it has to offer).

Also learning Rust nowadays is much more approachable compared to say 7+ years back (ecosystem got way better)

[–] philm@programming.dev 4 points 2 years ago* (last edited 2 years ago) (15 children)

but effectively it's bash, I think /bin/sh is a symlink to bash on every system I know of...

Edit: I feel corrected, thanks for the information, all the systems I used, had a symlink to bash. Also it was not intended to recommend using bash functionality when having a shebang !#/bin/sh. As someone other pointed out, recommendation would be #!/usr/bin/env bash, or !#/bin/sh if you know that you're not using bash specific functionality.

[–] philm@programming.dev 3 points 2 years ago

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)

[–] philm@programming.dev 3 points 2 years ago (2 children)

Funny, I switched from neovim (after a decade of use) to helix...

[–] philm@programming.dev 5 points 2 years ago

People use the most convenient way to collaborate, and that's for me currently Github. Really hope, some day a better alternative with ForgeFed becomes reality.

[–] philm@programming.dev 2 points 2 years ago

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.
[–] philm@programming.dev 5 points 2 years ago

Drew Devault’s Hare language

Ok, they say "use your distros package-manager", that's basically asking for the same disaster as C or C++. I think cargo is one of the selling points of Rust.

At least say something like we use "Nix" for default package-management (which does a lot of things right)...

[–] philm@programming.dev 2 points 2 years ago* (last edited 2 years ago) (1 children)

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...

[–] philm@programming.dev 3 points 2 years ago (2 children)

Not him, but I much more like the type-system of rust (e.g. enums).

[–] philm@programming.dev 3 points 2 years ago

Yes, and Rust with incremental compilation is pretty fast to iterate as well, as long as you don't use massive libraries/build-scripts etc.

[–] philm@programming.dev 3 points 2 years ago

Yeah the strict type-system of Rust is great at finding issues.

I think when understanding, that bash is basically only programs with parameters ([ is a program that takes all kinds of parameters and as last parameter ]) then bash is quite ok for stuff that doesn't need a lot of algorithms, i.e. passing the in and out from one program to another. But as soon as there's basic logic, You'll want to use a fully-fledged programming language.

Also the maintainability aspect: You can just start using fancy stuff you never want to use in bash and it can slowly grow into a library or application or something like that.

Btw. I have started a syntax-sugar library/crate that creates typing information for all kinds of programs via the builder-type-state-pattern, so that you don't always have to look up man etc. and that it should be more convenient to execute programs (not open sourced yet, and low priority for me as I'm working on various other exciting projects currently)

[–] philm@programming.dev 3 points 2 years ago

Yeah as weird as it sounds to use a "low"-level systems programming language such as Rust. Rust works surprisingly well as "script" language. (And you don't have to deal with the ugliness of bash, admittedly though, that bash is quite a bit more concise when using a lot of program executions and piping the results etc.)

view more: ‹ prev next ›