The sound distributed version control system

#157 Use minus as the new pager

Opened by arijid79 on December 3, 2020
arijid79 on December 3, 2020

So as I told about minus which I was working for the last few weeks. There’s some good news. Yes! It’s ready for use. I think we should use the tokio feature of minus. This would also require some refactoring. But I can definitely say, It is really worth the effort. It’s threaded, asynchronous and most importantly cross platform

Here’s the GitHub link

What do you think @pmeunier

pmeunier on December 3, 2020

Wow, that was fast! I think this is really cool. I want to try it out, is it on already?

pmeunier on December 3, 2020

How do you handle memory when the input is reaaaally long? Does it start displaying right away? I’m super excited.

arijid79 on December 3, 2020

No it’s not in But I will publish it after a few hours.

Also I did some testing with the tokio version and things went fine.

arijid79 on December 3, 2020

The output is inside a Arc>. It only displays untill all visie rows in the terminal is not filled and stops to put output after that. Whenever the user presses any Up/Down keys. It re outputs everything + 1 line at the bottom and - 1 line at the top

arijid79 on December 3, 2020

Hello @pmeunier. I just wanted to inform you that I have uploaded minus on You can now get it directly from like this

minus = { version = "1.0.1", features = "tokio_lib" }

EDIT: I have updated the version number, since 1.0.1 fixes a bug where output would get weird when terminal is resized

loewenheim on December 4, 2020

I’m super excited to try out this crate!

pmeunier on December 4, 2020

Fantastic! Do you want to submit a change to use it here?

Also, I checked the source code of Cargo, they’re using libgit2 instead of calling git, so unless someone makes a generic “VCS” lib, Pijul won’t get integrated very soon. One thing I’d love from Cargo is to be able to call cargo publish without --allow-dirty.

arijid79 on December 4, 2020

Since we are using tokio, the run() function in Log would require a rewrite using async/await. I don’t understand everything, so I am leaving it up to you

Also I am kinda busy fixing any bugs with minus

pmeunier on December 5, 2020

Hi! I just looked into this, and I’m not sure what to do, since it depends on Tokio-0.3, and the Hyper crate is forcing us to stay on Tokio-0.2.

This has been a little bit annoying for Thrussh, for example, where I’m maintaining two versions at the same time, and porting fixes to both channels in parallel (fully utilising change commutation there, btw).

loewenheim on December 5, 2020

hyper 0.14, which updates to tokio 0.3, is in the works.

arijid79 on December 5, 2020

Hey @pmeunier. You don’t have to wait for hyper .0.14, I have added the support for tokio 0.2.23 also. Use feature tokio2_lib and not tokio_lib with minus 1.0.3

pmeunier on January 7, 2021

I tried today, it doesn’t work. I copy-pasted code from the examples, it doesn’t compile.

arijid79 on January 7, 2021

Could you tell me which version are you using and what is the exact error message. I don’t recommend compiling directly from the master branch, but rather from one of the versions

pmeunier on January 8, 2021

I’m using the latest version from (2.1 I think).

I can’t writeln! into x.lines, and the locks aren’t awaitable (they seem to be plain old std::sync::Mutex).

arijid79 on January 8, 2021

I see your problem. You followed the examples written in the GitHub page which I have updated with the new API. I recommend that you follow the instructions which are correct.

pmeunier on January 8, 2021

I first tried to follow the instructions from , they don’t work either.

arijid79 on January 8, 2021

I don’t know what code you followed and wrote. But I am going to release a new major version of minus today or tomorrow. You should now probably use the new one

arijid79 on January 11, 2021

Hey @pmeunier, I have released minus 3.0.1, which should compile correctly and work as expected