Live data from Hacker News

Starship.rs: minimal, fast prompt for any shell

starship.rs

151–160 of 160 posts

Re: Starship.rs: minimal, fast prompt for any shell

#151

Earlier quoted context omitted.

Well, we are arguing about semantics. You say that minimal means that it must be functionally minimal. I say that minimal UX is valid meaning as well.

> Well, we are arguing about semantics. No, we are not. "minimal" has a defined meaning, and "minimal" and "minimalism" as a design philosophy are not the same.

To use your own argument against you, no, a minimal prompt does not look like this:

  $
It looks like this:

Re: Starship.rs: minimal, fast prompt for any shell

#152

Earlier quoted context omitted.

No, don't stop. But it's an interesting observation, don't you think? Why is it that just by adding "... in Rust" you can almost guarantee that people will roll their eyes and think "oh, not another one". Other languages do not carry such stigma, why does Rust have such reputation?

Completely guessing, but the thought comes to mind that Rust was (still is? I don't keep up these days) portrayed as The C Killer. So to specify "written in Rust" was to imply "I wrote something low-level without C/C++" or "I rewrote Popular C Tool in Rust" in the name of memory safety. This is all wild speculation on my part, so please take it with a large grain of salt. I welcome alternative explanations or experie…

> Completely guessing, but the thought comes to mind that Rust was (still is? I don't keep up these days) portrayed as The C Killer. So to specify "written in Rust" was to imply "I wrote something low-level without C/C++" or "I rewrote Popular C Tool in Rust" in the name of memory safety.

As the OP, this is a big part of it. Rust might be a great language, but people announcing they rewrote grep (for example) in rust doesn't mean they've done anything special. The rust language team did something special. The person making the announcement just took somebody else's idea and reimplemented it for very little reason.

Great! You learnt enough to reinvent the wheel. Now do something useful.

Re: Starship.rs: minimal, fast prompt for any shell

#153
post #91
post #58

Am I the only one who is getting tired of "It's X in rust" type projects? It's making me dislike the community. Rust is not a user feature, it's an implementation detail.

It might not be a feature, but it is a selling point. It conveys that it was written relatively recently, is more likely to support modern features in the shell, runs reasonably fast and is reasonably portable. If it was written in JS or python I'd already start worrying about what package manager to install it with in which environment, installing it globally is an anti pattern but symlinking it to .local/bin might…

It's a prompt. Writing anything for that purpose is code gardening, but hey it's in rust so I'm supposed to be excited?

That, in essence is the problem "X in rust" normally means "I've written something of low value IN RUST. Gimmee upvotes". Come back when the project is interesting regardless of the language.

Re: Starship.rs: minimal, fast prompt for any shell

#154
post #52
post #14

Earlier quoted context omitted.

Yeah, it's just a prompt replacement that does all the things that your prompt already does, but it's written in Rust.

Have you tried writing a PS1 which shows all the info that's demonstrated on the linked page? I have. It's a decent chunk of work. It's a whole lot more work to do it well . Did you remember to handle the situation where the git repo is so gigantic that running `git status` takes half a minute? Or the case where there is a .git folder somewhere but permissions are wrong or it crosses a mount barrier so `git status` p…

   It's a decent chunk of work. It's a whole lot more work to do it well.
There's no doubt about that. You might even learn a thing or two about your shell in the process. Is that considered a bad thing nowadays?

Re: Starship.rs: minimal, fast prompt for any shell

#155
post #150

Earlier quoted context omitted.

> I would say it’s because the Haskell community is too arrogant and pretentious. That by itself is only a cause. What's the effect, what's the symptom of this attitude, what are the practical observable results? Gatekeeping? Rude forum responses? (I know OCaml partially suffered from that and they can be fairly elitistic; when you ask something fairly normal nowadays like "what's the preferred package manager?" or "…

It's strange, because many, many times I've heard newcomers say that the Haskell community is the most friendly and welcoming that they have interacted with. By this point I don't have any better hypothesis than that different people prefer different sorts of community. I also think it's unfortunate if someone stops using a language they love because of the community. Ideally a programming language would have multipl…

> I also think it's unfortunate if someone stops using a language they love because of the community.

This really depends. I don't care about some abstract notion of a community BUT if I can't get basic stuff done because documentation is not good and the official forum responses are not helpful then yes, I absolutely will abandon the language.

To this day, languages differ a lot. I.e. in Elixir and Rust I can just add dependencies to a file (Rust even allows you to add the dep via a CLI command) and then reference it in your code a minute later, issue a command and your project is compiled and runs and you see the result.

Now ask me how much time I spent fiddling with OCaml's `dune` and `esy` which are a project manager and a dependency manager respectively. Took me an entire weekend to get one simple code to compile with a singular CLI command, and then run it. And community was not helpful: "check the docs", which I did 15 times probably over the course of that same weekend.

To go back to your point, friendly / welcoming community is just a bonus. The community has to be helpful above everything else. Some people are noobs. Some people like myself are senior BUT are unwilling to start over and are just looking for "how to do X and Y without spending a full day?". Some people are trying to make a presentation to advocate for the technology on an internal meeting. Examples abound.

I am not an experienced moderator (nor I ever want to be) but I've witnessed significant differences in how various programming language (or just a framework) communities act, and how helpful they are. It absolutely isn't identical or even close. Some are downright off-putting.

Finally, I make no claims about Haskell in any way except only one thing: when I saw its huge combinatorial explosion of different compilers, I gave up on the spot. Give me 2-3 options and leave the rest to the enthusiasts.

Re: Starship.rs: minimal, fast prompt for any shell

#156
post #151

Earlier quoted context omitted.

> Well, we are arguing about semantics. No, we are not. "minimal" has a defined meaning, and "minimal" and "minimalism" as a design philosophy are not the same.

To use your own argument against you, no, a minimal prompt does not look like this: $ It looks like this:

Please explain how this "uses my own argument against me", when my argument is that "minimal" prompt doesn't involve calling an external program to build the prompt? Both "$ " and "" can be built by the shell itself.

Re: Starship.rs: minimal, fast prompt for any shell

#157
post #151

Earlier quoted context omitted.

To use your own argument against you, no, a minimal prompt does not look like this: $ It looks like this:

Please explain how this "uses my own argument against me", when my argument is that "minimal" prompt doesn't involve calling an external program to build the prompt? Both "$ " and "" can be built by the shell itself.

Heh oh my bad, I didn't realise you have the privilege of gatekeeping what "minimal" means ;)

I see one dictionary definition is "the least possible". Seems like the least possible prompt is no prompt at all, but it's really just a matter of opinion ;)

Re: Starship.rs: minimal, fast prompt for any shell

#158
post #150

Earlier quoted context omitted.

It's strange, because many, many times I've heard newcomers say that the Haskell community is the most friendly and welcoming that they have interacted with. By this point I don't have any better hypothesis than that different people prefer different sorts of community. I also think it's unfortunate if someone stops using a language they love because of the community. Ideally a programming language would have multipl…

> I also think it's unfortunate if someone stops using a language they love because of the community. This really depends. I don't care about some abstract notion of a community BUT if I can't get basic stuff done because documentation is not good and the official forum responses are not helpful then yes, I absolutely will abandon the language. To this day, languages differ a lot. I.e. in Elixir and Rust I can just a…

Totally agreed with you there. I hope Haskell's community is generally friendly and welcoming, but I guess it isn't always that way.

In case you're interested into how Haskell handles some of the specifics you brought up:

> in Elixir and Rust I can just add dependencies to a file (Rust even allows you to add the dep via a CLI command) and then reference it in your code a minute later, issue a command and your project is compiled and runs and you see the result

This is also true of Haskell using Cabal. Cabal has some rough edges. Perhaps it's not as ergonomic as the Elixir or Rust equivalents (I've never used them) but you can at least do that.

> when I saw its huge combinatorial explosion of different compilers, I gave up on the spot. Give me 2-3 options and leave the rest to the enthusiasts.

This issue has been resolved with the introduction of the GHC2021 language edition. Just use that. No need for any other language extensions as a non-expert, except maybe in very special cases.

(By the way, there was never a combinatorial explosion of compilers. Almost all language extensions simply remove restrictions. But I understand how people could interpret it that way, and GHC2021 is a very simple way of resolving the misunderstanding.)

Re: Starship.rs: minimal, fast prompt for any shell

#159
post #158

Earlier quoted context omitted.

> I also think it's unfortunate if someone stops using a language they love because of the community. This really depends. I don't care about some abstract notion of a community BUT if I can't get basic stuff done because documentation is not good and the official forum responses are not helpful then yes, I absolutely will abandon the language. To this day, languages differ a lot. I.e. in Elixir and Rust I can just a…

Totally agreed with you there. I hope Haskell's community is generally friendly and welcoming, but I guess it isn't always that way. In case you're interested into how Haskell handles some of the specifics you brought up: > in Elixir and Rust I can just add dependencies to a file (Rust even allows you to add the dep via a CLI command) and then reference it in your code a minute later, issue a command and your project…

Thanks for pointing those out. I see that my info is outdated.

Re: Starship.rs: minimal, fast prompt for any shell

#160
post #102

Earlier quoted context omitted.

I agree with the latter point. But I use xonsh as the shell and that has a prompt which can go on the last line of the terminal and does not get repeated each time, so when you scroll back you don't all the information each time. I use that for starship information and the prompt is just the return code p[lus a character.

Oh, that's a great feature, wish it were more widespread

It depends on a library pigments that treats the Terminal as a TUI and not just like plain shells that just treat the terminal as a coloured teletype
Post reply on HN