Shameless plug: I am the author.

  • dinckel
    link
    fedilink
    1179 months ago

    Golang puts shit specifically in $HOME/go. Not even .go. Just plain go.

    Why is it so difficult to follow industry standards

        • @Laser@feddit.org
          link
          fedilink
          109 months ago

          It makes it insofar better to me that you have the option to change it. You can’t change Mozilla programs to use anything but .mozilla (apart from modifying the source code of course) so for me seeing the folder is at least a way of telling me that the variable is unset.

          The better question is which folder is suited the best to store the stuff that goes into $GOPATH

          • fmstrat
            link
            fedilink
            English
            79 months ago

            Just because something is worse, doesn’t make the other thing good. A sane and standard default, as others have mentioned, is a small bar to meet.

      • dinckel
        link
        fedilink
        209 months ago

        Of course, but that’s not the point. There should be a sane default, and there isn’t one

    • @atzanteol@sh.itjust.works
      link
      fedilink
      English
      12
      edit-2
      9 months ago

      Go pisses me off with that. I separate projects the way I want but go wants every project written in go in one big directory?

      • dinckel
        link
        fedilink
        29 months ago

        I really didn’t like this either. It’s quite surprising, because the rest of Go tooling is quite nice. Not having a venv, or at least something like pnpm-style node_modules is weird

        • @jollyrogue@lemmy.ml
          link
          fedilink
          19 months ago

          Why would go have a virtual environment or dep tree like node_modules equivalent, it’s not interpreted or dynamically linked.

          With modules, dependencies can be vendored.

          • dinckel
            link
            fedilink
            19 months ago

            Obviously it’s not, but you have to download all this shit somewhere before compilation. That’s the whole point

    • Eager Eagle
      link
      fedilink
      English
      59 months ago

      off the shelf go was too annoying for me

      Nowadays I set GOENV_ROOT to an XDG location and use goenv instead.

    • PureTryOut
      link
      fedilink
      119 months ago

      Strange that some apps allow configuring it rather than just doing it automatically…

      • @Lifter@discuss.tchncs.de
        link
        fedilink
        18 months ago

        That’s the usual open source way. The config probably came later so they just added the option without changing the default because that would break backward compatibility.

        And there would be too much boring work to build a migration.

    • @ZeroHora@lemmy.ml
      link
      fedilink
      English
      19 months ago

      After running it and properly configure the paths I once again came to the conclusion: I fucking hate Google.

  • @Wispy2891@lemmy.world
    link
    fedilink
    38
    edit-2
    9 months ago

    100% agree and I also despise devs who do this on windows, instead of using %appdata% they’re using c:\users\username\.myappisimportantandtotallydeservesthisdir

    • @xan1242@lemmy.dbzer0.com
      link
      fedilink
      39 months ago

      Not to mention - this isn’t necessarily the correct place for Windows anyway. That is exactly why they standardized stuff around Vista.

      Plus - what about apps that store an ungodly amount data in there? Personally, I only keep the OS and basic app data (such as configs and cache) on the partition and nothing else.

      Then something like Minecraft comes along and it’s like “humpty dumpty I’m crapping a lumpty” and stores all its data in “.minecraft” right there in your user directory.

      Then you gotta symlink stuff around and it becomes a mess…

    • @conorab@lemmy.conorab.com
      link
      fedilink
      39 months ago

      I think that also causes issues for roaming profiles and folder redirection. If roaming is turned on then everything in the %appdata%\roaming folder is synced to a server. %AppData%\Local is not. So if your app is using %AppData%\Roaming for temporary data then you are causing a whole bunch on unnecessary IO. Same for using Documents since that if often synced.

    • Tlaloc_Temporal
      link
      fedilink
      19 months ago

      To be fair here, appdata is technically a hidden folder and there are lots of reasons an app would want it’s data accessable by the user.

      • @Wispy2891@lemmy.world
        link
        fedilink
        89 months ago

        Yes but then just spam the documents folder like anyone else, don’t hoard the home root for no reason except that is a lazy cross platform port

  • @Telorand@reddthat.com
    link
    fedilink
    289 months ago

    I didn’t know about this (and thankfully, haven’t written anything public). I’ve been trying to fix an install script for an OSS project that doesn’t work on immutable distros, and using the XDG Base Directory specs might just be the panacea I was looking for!

  • @MonkderDritte@feddit.de
    link
    fedilink
    22
    edit-2
    9 months ago

    Where did i read this… basically, the .file being hidden being a bug in the early unix filesystem, which got misused to hide configuration files.

    Offenders despite XDG-variables set and with no workaround:

    • .android: hardcoded in adb and i guess something in mtp too
    • .pki: some tool/library Firefox and Chromium sometimes use.
    • .steam: yes, that

    Btw, https://wiki.archlinux.org/title/XDG_Base_Directory

  • dohpaz42
    link
    fedilink
    English
    149 months ago

    Here is a more concise way to achieve the same thing:

    ls -ACd ~/.??*/ | sed -e "s#$HOME/##g"
    
    • palordrolap
      link
      fedilink
      5
      edit-2
      9 months ago

      I think that can be boiled down to only cd; echo .*/

      Maybe throw a ;cd - on the end if the change of directory is unwanted.

  • Mactan
    link
    fedilink
    99 months ago

    there’s no place like 127.0.0.1

    there’s no place like XDG_CONFIG_HOME.

  • The Doctor
    link
    fedilink
    English
    59 months ago

    BRB, putting in a PR to make /etc mode 1777 by default.

  • wvstolzing
    link
    fedilink
    59 months ago

    vim now has an option to put the .vim folder in ~/.config; though I’m not sure if the default plugin/package & syntax folders can be set under ~/.local/share.

  • @sfera@beehaw.org
    link
    fedilink
    19 months ago

    Are there abstractions available around the XDG specifications to resolve the proper paths?

    • @MonkderDritte@feddit.de
      link
      fedilink
      7
      edit-2
      9 months ago

      What language? Python has PyXDG.

      In shell it’s simply

      XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME"/.local/share}"
      XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$HOME"/.config}"
      etc.
      
      • @sfera@beehaw.org
        link
        fedilink
        19 months ago

        I do. But you might have misunderstood my question. I was not asking for assistance. I was just curious if there are libraries available which allow easy adoption of the XDG specification. I imagine that such abstractions would be useful for multi-platform software and generally to lower the bar for adoption.

        • @dan@upvote.au
          link
          fedilink
          29 months ago

          Depends on the programming language. In C# for example, there’s an API to get special folder paths that works in all supported environments (Windows, Linux, MacOS, Android, and I think iOS too). On Linux, it includes fallbacks in case the environment variables aren’t set.