Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMPORTANT ANNOUNCEMENT: About viddy v1.0.0 #117

Closed
sachaos opened this issue Jul 2, 2024 · 30 comments
Closed

IMPORTANT ANNOUNCEMENT: About viddy v1.0.0 #117

sachaos opened this issue Jul 2, 2024 · 30 comments

Comments

@sachaos
Copy link
Owner

sachaos commented Jul 2, 2024

Hello everyone,

I am the owner of this project. I am currently working on the development of viddy v1.0.0, which is almost complete and will be released soon.

In a very bold decision, I am going to replace the current viddy, which is written in Go, with Rust. There are several reasons for this, but the main one is that I will be more motivated to maintain it. Additionally, I have been dissatisfied with some aspects of the current implementation of viddy. This is not because of Go, but because my initial implementation was poor. This has led to some of the bugs currently being reported, but I believe a reimplementation will resolve some of them.

Fortunately, viddy has been integrated into many package registries. If a build is required, Rust will be needed, so changes are expected. I apologize for the inconvenience and appreciate your understanding.

In viddy v1.0.0, the following features are planned to be discontinued. If you need these features, please contact me. I will do my best to include them. As for other compatibility, I am making every effort to maintain it as much as possible.

  • -c, --clockwork option
  • --pty option
    • I've found better way to handle terminal size.

The Rust version of Viddy will be managed in this repository. I apologize to all contributors, but I plan to delete all Go code (it will remain in git). If there are strong objections, I will consider separating the repository or keeping the Go code. Please let me know.

@sachaos sachaos pinned this issue Jul 2, 2024
@sachaos
Copy link
Owner Author

sachaos commented Jul 2, 2024

By the way, if I switch to Rust, will I have to change this Gopher logo? I really love this logo and don’t want to change it.

@rrotter
Copy link

rrotter commented Jul 6, 2024

Wow, that's a big change. Thanks for giving the community a heads up! Do you have any plans to make your rust branch public here before the 1.0 release? That would help package maintainers prepare.

@sachaos
Copy link
Owner Author

sachaos commented Jul 7, 2024

@rrotter Thank you for your comment!
Yes, I can do that!

@sachaos
Copy link
Owner Author

sachaos commented Aug 15, 2024

I've released viddy v1.0.0-rc.1 🎉
https://github.com/sachaos/viddy/releases/tag/v1.0.0-rc.1

@sachaos
Copy link
Owner Author

sachaos commented Aug 17, 2024

I've released viddy v1.0.0-rc.2 🎉
Now, viddy can save and load history!
https://github.com/sachaos/viddy/releases/tag/v1.0.0-rc.2

@avamsi
Copy link
Contributor

avamsi commented Aug 17, 2024

Big change indeed! I’ll check out the release candidates soon, but as someone who defaults to Go these days for simple programs, I’m curious about your experience with rewriting from Go to Rust. I understand this is somewhat unrelated to the main issue, and you might not be planning to discuss it, but if you are, I’d love to read about it. Thanks!

@avamsi
Copy link
Contributor

avamsi commented Aug 17, 2024

Just got a chance to check out v1.0.0-rc.2, seems to work well other than the following --

  1. Doesn't seem to handle tabs correctly
    • viddy 'echo "1\t2"' prints 12
  2. Doesn't seem to handle escape sequences correctly
    • viddy 'echo "\e[34m blue \e[39m default \e[0m all"' prints default in blue
  3. Doesn't seem to support arrow keys for scrolling like the Go version
  4. Horizontal scrolling seems to move by 10 columns instead of 1 like the Go version (I don't necessarily think this is worse, just reporting a difference I observed)

@sachaos
Copy link
Owner Author

sachaos commented Aug 18, 2024

@avamsi Thank you so much!
That's very helpful!

@sachaos
Copy link
Owner Author

sachaos commented Aug 18, 2024

@avamsi

Horizontal scrolling seems to move by 10 columns instead of 1 like the Go version (I don't necessarily think this is worse, just reporting a difference I observed)

Yes, this was an intentional change. The small scroll width was inconvenient, so I will also consider mouse support. Thank you.

@sachaos
Copy link
Owner Author

sachaos commented Aug 18, 2024

@avamsi

Doesn't seem to handle escape sequences correctly

I couldn't reproduce that.
When I run the command, the output is like following.
The same issue occurred with both the watch command and go viddy.

Can you share the backup file (the feature is included in rc.2)?

スクリーンショット 2024-08-18 11 57 02

@avamsi
Copy link
Contributor

avamsi commented Aug 18, 2024

I couldn't reproduce that.

Oh. This is what the Go Version prints for me --
Go Version

And this is what the Rust version prints --
Rust Version

watch doesn't work for me though --
watch


Can you share the backup file (the feature is included in rc.2)?

Looks like I can't upload sqlite files here directly, I put it on Google Drive for now -- https://drive.google.com/file/d/11U-kjxFHC1glvlDpCToNZe2myWUc-uXt/view?usp=drive_link.

@avamsi
Copy link
Contributor

avamsi commented Aug 18, 2024

Ah, looks like I was supposed to do watch --color, which works fine --
watch --color

@sachaos
Copy link
Owner Author

sachaos commented Aug 18, 2024

@avamsi Thank you! What is the using OS?
Are you changing the shell in configuration files?

@sachaos sachaos mentioned this issue Aug 18, 2024
@avamsi
Copy link
Contributor

avamsi commented Aug 18, 2024

What is the using OS?

I'm currently on a Chromebook running Debian (via Crostini), I could test on a MacBook if you want.

Are you changing the shell in configuration files?

Nope.

Are you unable to reproduce? What does just echo '\e[34m blue \e[39m default \e[0m all' print for you?

@sachaos
Copy link
Owner Author

sachaos commented Aug 18, 2024

@avamsi

It seems like depending on shell.

  • bash → fail
  • sh → fail
  • zsh → success
スクリーンショット 2024-08-18 14 21 30

I reproduced that issue by using zsh.

$ viddy --shell zsh 'echo "\e[34m blue \e[39m default \e[0m all"'

@avamsi
Copy link
Contributor

avamsi commented Aug 18, 2024

Ah, I see -- yes, I use Zsh.

@avamsi
Copy link
Contributor

avamsi commented Aug 18, 2024

Looks like echo -e '\e[34m blue \e[39m default \e[0m all' should do the trick in Bash.

avamsi added a commit to avamsi/viddy that referenced this issue Aug 18, 2024
sachaos#117 (comment)

viddy currently breaks alignment for commands like `echo '1\t2\n\t3'` as
it always adds 4 spaces, this fixes that. One workaround for this is to
plumb the command via `expand` (`echo '1\t2\n\t3' | expand`).

Go version has the same issue, so this is not a regression.
@sachaos
Copy link
Owner Author

sachaos commented Aug 18, 2024

@avamsi I think we have fixed the reported issues 1.
Thank you for your contributions (PR and issue reporting)! 🙏

@avamsi
Copy link
Contributor

avamsi commented Aug 18, 2024

My pleasure! Thanks for fixing these quickly and in general, your work on viddy -- big fan!

@sachaos
Copy link
Owner Author

sachaos commented Aug 18, 2024

I have released viddy v1.0.0-rc.3 https://github.com/sachaos/viddy/releases/tag/v1.0.0-rc.3

@slashburygin
Copy link

Hi. Thank you very much for your project. Today I try new release v1.0.0-rc3 on centos7 forked system, but it requires new versions of glibc.
[centos@bootstrap build]$ viddy
viddy: /lib64/libc.so.6: version GLIBC_2.29' not found (required by viddy) viddy: /lib64/libc.so.6: version GLIBC_2.32' not found (required by viddy)
viddy: /lib64/libc.so.6: version GLIBC_2.33' not found (required by viddy) viddy: /lib64/libc.so.6: version GLIBC_2.34' not found (required by viddy)

Maybe is there a way to compile the program for a less recent version of glibc ?

@sachaos
Copy link
Owner Author

sachaos commented Aug 19, 2024

I have released viddy v1.0.0-rc.5 🎉
I believe most of the problems have been solved. (Yes, there are still some issues and feature requests remaining.)
I'm planning to release v1.0.0 in a few days.

https://github.com/sachaos/viddy/releases/tag/v1.0.0-rc.5

@sachaos
Copy link
Owner Author

sachaos commented Aug 19, 2024

@slashburygin Thank you for the report!
I've released musl binary by v1.0.0-rc.5.
If you have time, please try it.

https://github.com/sachaos/viddy/releases/tag/v1.0.0-rc.5

@slashburygin
Copy link

Now all is ok, thank you very much.
Small diff between versions: now interval option is integer, not float.

error: invalid value '1.8s' for '--interval ': invalid float literal

@slashburygin
Copy link

Oh, sorry, now I can set interval without s, for example 1.8

@sachaos
Copy link
Owner Author

sachaos commented Aug 19, 2024

@slashburygin Thank you!
That behavior is not the same as the old version.
(The go version of Viddy can handle 1.8s)

However, it is a bit difficult to fix because the crate being used cannot handle it.
So I don't fix it now.
I'm planning to fix that in the future. #131

herbygillot added a commit to macports/macports-ports that referenced this issue Aug 22, 2024
The viddy project has switched from Go to Rust:

    sachaos/viddy#117
@sachaos
Copy link
Owner Author

sachaos commented Aug 22, 2024

I released viddy v1.0.0.
https://github.com/sachaos/viddy/releases

I submitted a PR to homebrew-core.
Homebrew/homebrew-core#181977

@sachaos
Copy link
Owner Author

sachaos commented Aug 22, 2024

I close this announcement issue because v1.0.0 released.
If there are some problems, feel free to create a new issue.

We will track the status of the package registry in a separate issue.
#136

@sachaos sachaos closed this as completed Aug 22, 2024
@sachaos sachaos unpinned this issue Aug 22, 2024
@sachaos
Copy link
Owner Author

sachaos commented Aug 22, 2024

@avamsi

I’m curious about your experience with rewriting from Go to Rust.

I've written the blog post about my experience of migrating from Go to Rust.
If you are interested in, please read that!

https://dev.to/sachaos/release-of-viddy-v100-migration-from-go-to-rust-2g41

@avamsi
Copy link
Contributor

avamsi commented Aug 23, 2024

Thanks for the writeup! Matches my experience / expectation trying out Rust here and there but more importantly, it's encouraging to see someone else go through the learning curve / trade offs etc. (and come out the other side)! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants