6 ms·
Show HN: pkgname, choosing good package names
- borntyping 12y agoSeems to be broken, the list of reasons for a bad package name are blank: http://i.imgur.com/0U06IGS.png http://i.imgur.com/0U06IGS.png
- AYBABTME 12y agoDo you have more details? Is JS enabled? Which browser?
- chrismorgan 12y agoCommon-or-garden Firefox Beta for Android for me, same effect.
- alexcoco 12y agoSorry! It should be okay now.
- alexcoco 12y agoOops, sorry. It was `innerText` on firefox that was breaking.
- stephenr 12y ago"Don't put hyphens, that's ugly" This is highly subjective, and quite frankly makes me think the whole thing is pointless
- NateDad 12y agoWell, in the actual package name, you can't include hyphens. I presume they're talking, then, about the directory name, which would have to differ from the actual package name, and that's a no-no. Their reasoning may be wrong, but the rule is still correct.
- 4mnt 12y agoDo you mean a directory name cannot contain a hyphen (-)? Or perhaps you did mean a slash (/)? I have never heard nor encountered about a package manager or filesystem that does not allow the use of hyphens.
- NateDad 12y agoThe Go package name, which is potentially different than the manner if the directory it resides in. Go package names badly include hyphens (only Unicode letters)
- NateDad 12y agoArg, stupid phone. Should say: The Go package name can be different than the name of the directory in which the package resides (although this is strongly discouraged). The directory may certainly contain hyphens, but the package name - the thing you see in the Go package foo statement - cannot contain hyphens... that's the actual package name, which can only contain unicode alpha-numerics.
- stephenr 12y agoPackage for what? It doesn't specify a particular type of package its "rules" are meant for.
- stephenr 12y agoRight so its only by going to the Github repo and looking through the readme that I discovered > tells if your idea for a Go package name is shit and yet nowhere else does it mention about being Go specific.
- AYBABTME 12y agoBeing Go specific is implicit. If it was about something else than Go, we should have made _that_ explicit. Go is absolute and infinitesimal.
- cranium 12y ago"aaaaaaaa is not a shit pkg name" Ok, let's use that then!
- daGrevis 12y agoGit and foo works too! :)
- collinglass 12y agoI like the concept. It is subjective so it needs tweaking.
- thefox 12y agoWhat's the algorithm? If I use "abc" or "aaa" it prints "is not a shit pkg name".
- AYBABTME 12y agoThe algorithm is very simple and not meant to be exhaustive or correct. You can see how the filters for validation are done: https://github.com/aybabtme/pkgname/blob/master/filters.go https://github.com/aybabtme/pkgname/blob/master/filters.go Overall, this project is meant as joke/smoke test, not a canonical reference. It was pretty fun to build =)