Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by tectonic on Monday December 03, 2018 @04:19PM
(#18593153)
Also, my first Rust project!
[ Parent
| on HN ]
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by bhargav_ on Monday December 03, 2018 @06:22PM
(#18594214)
This is such a cool project! Plus a pretty awesome example of using Rust for CLI's. I'm curious about the neural network though. Is that also written in Rust? Or are you embedding something else?
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by tectonic on Monday December 03, 2018 @06:58PM
(#18594457)
Thanks! It is written in Rust. It's a very simple NN with one hidden layer and back propagation.
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by bhargav_ on Monday December 03, 2018 @07:19PM
(#18594610)
Just saw the implementation. It's goes a little over my head unfortunately, but I am curious about the affects of it. Did you compare the non-neural net version with the neural net version? If so what differences did you find?
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by tectonic on Monday December 03, 2018 @07:25PM
(#18594644)
I found that the neural network does a little better than a simple linear regression function for weighting the parameters. I train it on a few months of my own shell history to predict, based on the last commands, what I'll type next.
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by 2bitencryption on Monday December 03, 2018 @10:07PM
(#18595756)
are the default weights I see in the code the result of your own local training?
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by tectonic on Monday December 03, 2018 @10:21PM
(#18595872)
Yup
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by the_jeremy on Monday December 03, 2018 @06:27PM
(#18594253)
Minor nitpick: probably better to append to PROMPT_COMMAND, rather than overwriting it.
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by tectonic on Monday December 03, 2018 @06:57PM
(#18594450)
I do actually append to it:
PROMPT_COMMAND="__last_exit=\$?;history -a \$MCFLY_HISTORY;mcfly add --exit \$__last_exit --append-to-histfile;history -cr \$MCFLY_HISTORY;${PROMPT_COMMAND}"
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by faitswulff on Monday December 03, 2018 @10:46PM
(#18596026)
What made you choose Rust? And what were your impressions of it for this project?
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by tectonic on Monday December 03, 2018 @11:00PM
(#18596102)
I wanted a fast, safe systems language. I enjoyed it! The learning curve is steep but then you start to get it.
Re:Show HN: McFly, a smart Bash history search CLI in Rust w...
by darkjedi_emacs on Thursday December 06, 2018 @02:51AM
(#18616193)
haha Feels same. My first program in rust was https://github.com/AkshayIyer12/advent-of-code/blob/master/2... .
Felt good finally writing some code in Rust after the rust lang book.