Live data from Hacker News

Facebook PathPicker

facebook.github.io

41–50 of 168 posts

Re: Facebook PathPicker

#43

Earlier quoted context omitted.

Oh wow, thanks! I was just thinking about this today - how I'm always cut-and-pasting file paths from ag (silver surfer) results at the console. One thing I noticed: FPP gets confused by filenames with multiple dots. If a file is named for example "dev_backup.ldif.gz", FPP thinks that "ldif.gz" is the entire file name.

Yep, this is where our regexes start to fall short. Mind opening a github issue for this? We can likely add another option in our "fallback" regex, but it's a fine line to draw between overmatching and undermatching. For instance, we currently match on "add/remove" output from git status which is less than fortunate. For performance reasons we don't actually go check if each of those files exists (since sometimes you…

    [pierce@plo-pro team15]$ time (find . -print0 | xargs -0 stat -f '%N' | wc -l)
        4901
    
    real	0m0.079s
    user	0m0.043s
    sys	0m0.060s

Re: Facebook PathPicker

#44
post #43

Earlier quoted context omitted.

Yep, this is where our regexes start to fall short. Mind opening a github issue for this? We can likely add another option in our "fallback" regex, but it's a fine line to draw between overmatching and undermatching. For instance, we currently match on "add/remove" output from git status which is less than fortunate. For performance reasons we don't actually go check if each of those files exists (since sometimes you…

[pierce@plo-pro team15]$ time (find . -print0 | xargs -0 stat -f '%N' | wc -l) 4901 real 0m0.079s user 0m0.043s sys 0m0.060s

@ploxiln -- edited my comment explaining a lot of devs here use network mounts (in which case checking for existence takes a lot longer). I'd love to explore this though, either behind a config setting or eventually as the default behavior! What do you think?

Re: Facebook PathPicker

#45
post #32

Hey everyone, I'm in the main engineer on this project if anyone has questions. Facebook has a large codebase, so naturally we have a lot of long filenames and paths. It's a pain to type these out by hand, so I'd see a lot of (new) engineers select the text with their mouse before pasting it into the command line. This is pretty inefficient and I knew there had to be a better way, so a few of us started hacking on a…

Very cool tool. Just curious as to why directories are not selectable. I did "ls | fpp" and everything got listed (directories and files) but only the files were selectable.

Yeah, we don't match on directories since the regex would overmatch other results (we would basically have to match anything that is words with a slash). However if we added support for checking for file / directory existence we could definitely add support for that

Re: Facebook PathPicker

#46
post #25

Some people, when confronted with a command line problem, think "I know, I'll use my mouse." Now they have two problems. I'm joking, and this looks neat, but the optimal solution is almost certainly to keep your hands on the keyboard while in the shell.

Couldn't agree more staunch! I silently weep every time I have to use the mouse during development

Re: Facebook PathPicker

#47
post #38

Earlier quoted context omitted.

@andyl We are working on getting a linuxbrew recipe working. There's shouldn't be anything blocking this from working on linux systems (assuming Python 2.7 is installed). In the meantime you can try the manual installation method listed in the README: https://github.com/facebook/pathpicker/ @itsbits Why do you say that? curious if you found anything

If it's pure python why not use pip?

@rmc we have a dependency on a bash script as well, since we need to redirect stdin to tty input and such. So getting the bash file to distribute with PIP and symlink as well was slightly complicated.

I only recently realized that the entire program could be ported over to python (the stdin redirection is supported in python as well) but I still think homebrew is slightly more popular than having pip installed, especially with all the JS development going on today

Re: Facebook PathPicker

#50

A while back I wrote a similar tool in go to scratch my own itch and use it every day: https://github.com/robbiev/numberwang

Surprisingly, I rarely see reference to that show the programming/IT world. That made my day, thanks.
Post reply on HN