argp
is a Go library providing a GNU-style command-line argument parser. It supports features like short and long options, flags, subcommands, required arguments, default values, and generating help text automatically. The library aims for flexibility and correctness while striving for good performance and minimal dependencies. It emphasizes handling POSIX-style argument conventions and provides a simple, declarative API for defining command-line interfaces within Go applications.
This 2010 essay argues that running a nonfree program on your server, even for personal use, compromises your freedom and contributes to a broader system of user subjugation. While seemingly a private act, hosting proprietary software empowers the software's developer to control your computing, potentially through surveillance, restrictions on usage, or even remote bricking. This reinforces the developer's power over all users, making it harder for free software alternatives to gain traction. By choosing free software, you reclaim control over your server and contribute to a freer digital world for everyone.
HN users largely agree with the article's premise that "personal" devices like "smart" TVs, phones, and even "networked" appliances primarily serve their manufacturers, not the user. Commenters point out the data collection practices of these devices, noting how they send usage data, location information, and even recordings back to corporations. Some users discuss the difficulty of mitigating this data leakage, mentioning custom firmware, self-hosting, and network segregation. Others lament the lack of consumer awareness and the acceptance of these practices as the norm. A few comments highlight the irony of "smart" devices often being less functional and convenient due to their dependence on external servers and frequent updates. The idea of truly owning one's devices versus merely licensing them is also debated. Overall, the thread reflects a shared concern about the erosion of privacy and user control in the age of connected devices.
Summary of Comments ( 18 )
https://news.ycombinator.com/item?id=43452525
Hacker News users discussed
argp
's performance, ease of use, and its similarity to the C library it emulates. Several commenters appreciated the library's speed and small size, finding it a preferable alternative to more complex Go flag parsing libraries likepflag
. However, some debated the value of mimicking the GNU style in Go, questioning its ergonomic fit. One user highlighted potential issues with error handling and suggested improvements. Others expressed concerns about compatibility and long-term maintenance. The general sentiment leaned towards cautious optimism, acknowledgingargp
's strengths while also raising valid concerns.The Hacker News post about
argp
, a GNU-style command line argument parser for Go, has several comments discussing its merits and drawbacks.One commenter points out that while they appreciate the effort, they generally prefer using Go's
flag
package for simpler cases and moving to a more powerful library likespf13/cobra
when the needs become more complex. They feelargp
sits in an awkward middle ground. This sentiment is echoed by another user who adds thatcobra
also handles things like help text generation and subcommand management effectively, making it a more complete solution.Another commenter expresses concern over the dependency on C code, viewing it as a potential disadvantage. They also question the long-term maintenance of the project and suggest exploring pure Go alternatives.
Several users discuss the specific GNU style of argument parsing, with some appreciating its familiarity and others finding it overly complex and verbose. One commenter specifically mentions the lack of positional argument support as a drawback, preferring libraries that offer more flexibility in this area.
There's a discussion about the "batteries included" philosophy of Go and whether a project like
argp
fits into that ecosystem. Some argue that the standard library'sflag
package is sufficient for most use cases, while others appreciate the availability of external libraries likeargp
for those who prefer a different style.One commenter mentions that while they're not currently using
argp
, they're keeping an eye on it for future projects, particularly those that require close compatibility with existing C codebases.Finally, the author of
argp
chimes in to clarify some points. They explain that the library aims to provide a familiar experience for developers coming from a C/GNU background and addresses the concerns about C dependencies, stating they're minimal and primarily for parsing GNU-style options. They also acknowledge the existence of other argument parsers but emphasize thatargp
fills a specific niche for those who prefer the GNU conventions. They further explain that POSIX-compliant short and long option parsing is available, but GNU extensions are the project's focus. They acknowledge positional arguments are currently missing and are open to considering them for the future. The author also details their motivation: they needed GNU-style parsing in a project and, unhappy with existing Go options, createdargp
and subsequently open-sourced it.