Hacker Newsnew | past | comments | ask | show | jobs | submit | micouay's commentslogin

thank you!


thank you! YouTube has a player API for controlling embedded videos with JS


unfortunately it's not. please try it on your computer!


I did something similar but based on matching abbreviations:

https://github.com/micouy/kn

For example

    kn pho/eutri
to enter photos/europe_trip. It doesn't track frecency or anything, just matches strings. My algorithm is also used in nushell's cd command.

kn also supports multiple dots:

    kn ..  # enters parent
    kn ... # enters grandparent
etc.


you gotta agree the age addiction is the worst by far


I'm an age addict. I would like to stop aging, but the only alternative seems much worse.


https://github.com/micouy/kn - Like `cd` but with abbreviations. Or like `z` but based on string similarity, not on location history.


https://github.com/micouy/kn - `cd` alternative like `z` but based on comparing abbreviations against paths with https://crates.io/crates/powierza-coefficient, not on frecency. I've completely replaced `cd` for over a year. A while ago nushell reimplemented this functionality using my Powierża coefficient.


`rg` has only one version, and one line of code:

    println!("You meant to install ripgrep: type `cargo uninstall rg` followed by `cargo install ripgrep`");


Seems like it would be better to contain:

    compile_error!("You meant to …");
so that the install would fail and `cargo uninstall rg` wouldn't be needed.


Can always-failing-to-compile crates be deployed to the registry?


crates.io doesn't try to build crates. It couldn't do that anyway. Crates can require arbitrary C library dependencies, only run on some specific targets, etc. That's why docs.rs has to make some effort to be able to build crates, and even it doesn't get all of them.


Yes, `cargo publish` has the `--no-verify` flag if you want to force this. I think all the verification is client-side.


There is some server side verification, mostly around checking that the dependencies all exist, the file isn't too large, etc. But 99% of the testing happens on the client.

Eg:

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...


Yes


Yeah that sounds much nicer.


What does "--thor" mean?


Looking at the linked script, it indicates which cow orker to credit.

To the OP: You might be able to simplify the script by using `git commit --trailer …`. Or maybe you tried that and it didn't display the message in the editor window satisfactorily?


Thanks for the hint, `--trailer` is a nicer solution than overriding the commit template!

For some reason `--trailer` is not available on my system, so I'd need to upgrade git, it seems.


Probably an example of a name, so that the added commit comment line has “Coauthored-by: Thor”


Note that it was published in June 2021.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: