Live data from Hacker News

Show HN: I made an SSH tunnel manager to learn Go

github.com

11–20 of 72 posts

Re: Show HN: I made an SSH tunnel manager to learn Go

#11

Nice project! I would advise to use $XDG_CONFIG_HOME instead of $HOME for storing the configuration file though :)

I hate XDG stuff so much. I just wish every app had their own folder in which they can put whatever they want. If home directory clutter is the issue, then just ~/crap/.{app1,..n} can be standardised. Basically, I want app/kinds-of-data and not the other way around.

The reasoning behind historical convention of kinds-of-data/app in Unix is so you can partition the disk easily and apply policies based on type (like backup /etc, tmpfs on /tmp, mount /usr read-only)

Although I'll never forgive XDG for renaming etc to config and var to state. Would be so convenient to set PREFIX=~/.local for some things

Re: Show HN: I made an SSH tunnel manager to learn Go

#12
post #9
post #2

The title was so confusing to me, the reason I opened the link was to understand how you made the SSH tunnel manager learn the GO programming language

I don't think the title is confusing, if that were the desired meaning then it'd say "I made an SSH tunnel manager learn Go" i.e. no "to". I don't think "I made X to do Y" ever means "I made X do Y" does it?

Not for native speakers, but I've heard non-native speakers use "I made X to do Y" in that way.

Re: Show HN: I made an SSH tunnel manager to learn Go

#13
post #10

Earlier quoted context omitted.

I hate XDG stuff so much. I just wish every app had their own folder in which they can put whatever they want. If home directory clutter is the issue, then just ~/crap/.{app1,..n} can be standardised. Basically, I want app/kinds-of-data and not the other way around.

as someone who works on 3 different machines regularly and likes to have the same environment on all of them... i would LOVE if applications would stop cluttering my .config with cache data and other bullshit i keep having to exclude from sync.

`rsync` should have something like `.nosync` akin to `.nomedia`, and the directory should be added explicitly if one wants it to be synced. Or something like a `--profile` option where `.nosync` then can contain an allow/disallow filter for profiles.

I have the same issue with the scripts which trigger `rsync` getting confusingly complex because of all the include/exclude arguments.

Re: Show HN: I made an SSH tunnel manager to learn Go

#15

Earlier quoted context omitted.

I hate XDG stuff so much. I just wish every app had their own folder in which they can put whatever they want. If home directory clutter is the issue, then just ~/crap/.{app1,..n} can be standardised. Basically, I want app/kinds-of-data and not the other way around.

$XDG_CONFIG_HOME is usually "~/.config/{app1,...n}" so, it's close? Plus it allows a user to redirect it to a path of their choice, if all apps used it to begin with. Don't get me wrong -- some of the choices made by the XDG/FreeDesktop folks rub me the wrong way too ...

No, not quite. XDG-compliant programs end up storing stuff in one or more of the following places:

~/.cache and ~/.config and ~/.local/share and ~/.local/state and ~/.local/bin

I used to get annoyed by non-compliance to XDG. Now I wonder if I'd actually prefer apps to reverse the hierarchy (eg, ~/.apps/nvim/{cache,config,state}).

Re: Show HN: I made an SSH tunnel manager to learn Go

#17
Well done.

The ease of use and high quality of the Go SSH libraries (golang.org/x/crypto/ssh) is a killer feature of Go, imho.

Also, there is a high level abstraction, github.com/gliderlabs/ssh, which makes it completely trivial to embed an ssh server into an application, giving you a nice way to inspect counters and flip feature flags and tuneables.

Re: Show HN: I made an SSH tunnel manager to learn Go

#19
post #15

Earlier quoted context omitted.

$XDG_CONFIG_HOME is usually "~/.config/{app1,...n}" so, it's close? Plus it allows a user to redirect it to a path of their choice, if all apps used it to begin with. Don't get me wrong -- some of the choices made by the XDG/FreeDesktop folks rub me the wrong way too ...

No, not quite. XDG-compliant programs end up storing stuff in one or more of the following places: ~/.cache and ~/.config and ~/.local/share and ~/.local/state and ~/.local/bin I used to get annoyed by non-compliance to XDG. Now I wonder if I'd actually prefer apps to reverse the hierarchy (eg, ~/.apps/nvim/{cache,config,state}).

I would definitely prefer this. I've never wanted to see the "cache" stores for all (XDG-compliant) apps, but often want to see everything for a single app.

Re: Show HN: I made an SSH tunnel manager to learn Go

#20
post #15

Earlier quoted context omitted.

$XDG_CONFIG_HOME is usually "~/.config/{app1,...n}" so, it's close? Plus it allows a user to redirect it to a path of their choice, if all apps used it to begin with. Don't get me wrong -- some of the choices made by the XDG/FreeDesktop folks rub me the wrong way too ...

No, not quite. XDG-compliant programs end up storing stuff in one or more of the following places: ~/.cache and ~/.config and ~/.local/share and ~/.local/state and ~/.local/bin I used to get annoyed by non-compliance to XDG. Now I wonder if I'd actually prefer apps to reverse the hierarchy (eg, ~/.apps/nvim/{cache,config,state}).

I find it obnoxious when apps make me hunt for all of their cache directories. Just put all the cache data in one place.

Make it clear what needs to be backed up, what is ephemeral, and so on. Just put everything in ~/.cache. Chromium in particular is bad at this and has many types of cache.

Post reply on HN