-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change main client to tldr-cpp-client #1056
Comments
Is it available on major Linux distros' package repositories? If not, would you be willing to set that up and ensure it's updated? or perhaps offer an in-app update feature, if that's at all possible (similar to evergreen browsers' auto-update mechanisms)? |
To be clear, I'm fine with promoting the C++ client more, as I mentioned in #1057, but I wouldn't make it the main client for the tldr project unless it was easily installable using a package manager in the main unix-y platforms. |
Good point. It's probably quite impossible to get tldr into the Linux distros main repositories, it's to niche for that. Still, I think it's a huge bonus to promote a native client, which can be installed without the huge dependencies npm and nodejs bring to the table (I for one would turn away, when someone told me to install a cli tool via npm, and I know a whole bunch of people who think similarly). |
Agree with @waldyrious here. I am fine with promoting native clients without dependencies, but unless we have a platform independent solution to it, I wouldn't prefer it. |
We could provide binary builds for both Windows and Linux. Requiring npm is a pretty huge dependency, presumably, lot's of people do not have installed and / or do not want to have it installed. |
I beg to disagree! The only people (using unix-y systems) for whom this is too niche are those who haven't heard of it :P seriously, I'd put this at the level of manpages in terms of relevance for the day-to-day CLI usage. If you would like, we can certainly offer to maintain the packages in the distros' repositories, but I'd ask you to at least initiate the process to set that up. It's fine if you'd rather not, but in that case I'm afraid it just isn't fair to change our primary client from an easy-to-install-anywhere (albeit bulky) node.js-based tool, to something that requires downloading and installing a custom binary, or building from source -- especially for a project so keen to remain friendly to beginners. |
Yes, while you might think it's important, others might not (others will probably include all Linux Distro maintainers). From my past interactions with the package maintainers on famous Linux distros, this is way too tiny to be in there main repositories. Keep in mind, that even Node.JS is still not in the main repositories. What I could simply do is create a PPA for Debian/Ubuntu/Mint (or whatever distro using apt-get). I will try to get tldr into the repositories. Edit: They actually added node.js recently, but it's 0.10. That's why the official node site is still recommending the use of there own repository. |
Whoa, I would never guess. It would be nice to be able to verify this sort of thing automatically. I guess this would be a good opportunity to resurrect my unix-manifests project :P What you propose sounds reasonable, so please go ahead. In the meantime, I'll mark this issue with the "waiting" label until we get some progress in that front. As for Windows, I believe Chocolatey would be a nice counterpart to Homebrew on OS X :) |
Just found this by accident: http://linuxbrew.sh/ Might be an easy way for Linux users to get tldr. |
Nice :) that still requires ruby (I believe python is now included by default in most repos), but it's a good alternative. of course, the usual channels (the package repositories or at least PPA-like workarounds to them would be preferable, if possible. |
Absolutely yes. I would love it if someone can create a PPA and maintain a debian package for tldr ! |
My comment, copied over from #1115:
I still believe we should reduce the general amount of clients, changing the default client to an easy to install multiplatform client is only the first step. |
I come here to say that I agree with @Leandros, and it's got nothing to do with his github username being equal* to my first name.
A From then on we could automate the maintenance of the PPA and things should be fairly smooth. |
That sounds neat! I'll look into this and set it up for tldr-cpp-client. This will provide an easy way to get OS X / Linux builds. I'll look into a solution for Windows. |
I approve of the idea of portable code without huge dependencies, but just to be sure: are we talking about "installing" by downloading a binary and manually placing it in the search path? If so, I'm not sure that's a good user experience. The tool should be easily installable (easy from the perspective of a beginner to the command-line world!), even if we by means of a two- or three-command one-liner that downloads, marks as executable and copies the binary into the proper place. Additionally, we need the tool to be easily updatable. There are two options for this:
Finally, the tool's source code should be readable and well documented, so as to make it easily hackable and encouraging contributions from its users (this is one of the points in favor of tools built using higher-level languages such as javascript or python). What are your thoughts/plans regarding these points, @Leandros? |
Those are some very good points and a great client should satisfy all of those. Easily InstallableIsn't tldr target to more tech-savvy and already existing command line users? Where possible, the native package manager[1] can easily be used to distribute a binary build while also providing those as a simple download via the Github repository for easy self-installation (if preferred). Windows could be served via a dedicated installer, but I believe this is absolutely and totally overkill, since it would only install one single binary. Most developers would probably prefer a single binary in a zip which they can put in the path on their own. To still serve lazy or less tech-savvy people we could bundle the download with a .bat file which will automate all the steps for you, while being a lot lighter than an installer. Easily UpdatableShould not be of concern to the client, since this will be handled by the package manager (where possible, see [1]). It'll be some kind of an issue for Windows users, though. Implementing a self-updater isn't exactly super complicated (if kept really simple), but since only Windows users will be affected, a simple, polite message telling that an update is available should be more than enough. Regarding Chocolatey: How does this solve our issue? I think it's horrible user experience if we would require the user to install some big third-party program just to put a 5kb executable somewhere? Easily HackableC is a widely used and well understood language, I don't think that should create any issues. [1]: apt-get on debian based Linux, Pacman / yaourt on Arch based Linux, Yum on CentOS based Linux, brew on macOS |
I'd love a dockerized version as well, sometimes people just want to run things. |
Docker? For a single executable? Don't you think that's a tiny bit overkill? (Apart from that, I'll not support Docker in any way for ethical reasons) |
Not really. From CONTRIBUTING.md: "When in doubt, keep new command-line users in mind. Err on the side of clarity rather than terseness.". Arguably, documentation (especially clear and concise as tldr-pages aims to be) is much more valuable to beginners than to experts, who can figure their way around man pages and other sources of information.
I thought you had said that getting an app included in the native package managers was quite hard? How do we handle this? My suggestion to use Snap, Homebrew and Chocolatey was precisely to bypass the default package managers' stricter app inclusion / updating procedures.
For a command-line tool (which wouldn't e.g. be called in a stand-alone GUI or custom shell by clicking on an icon or Start menu entry), this makes sense.
Agree with the first part, but I think it's important to use the platform's standard package installation infrastructure -- e.g. place the binary in a folder in C:/Program Files, or wherever binaries need to be placed to be accessible in the command line. The latter may be something to be set by editing the PATH instead of changing the location of the binary -- I'm not very acquainted with this type of deployment on Windows -- but in any case I wouldn't want to put the burden of this setup on the users by default (expert users can always do it manually if they prefer).
Fine by me, as long as it follows the platform's infrastructure as mentioned above.
Agreed, but will we actually be able to use those channels?
Agreed, but if we can't use the other system's package managers, it would make sense to include the self-updater in the tool itself so that all platforms could benefit from it.
They would always have the option of copying the binary manually. The idea is that if they already had Chocolatey set up, they could use it to install/upgrade tldr. The other option is to provide the self-updating mechanism.
So is Javascript and perhaps to a lesser extent Python, so I don't think this factor makes much of a difference.
Are you saying that by being domain-specific, JavaScript is less accessible than C? I think most people would say the fact that JS is a higher-level language has more bearing on its accessibility than its original purpose as a web scripting language. Node.js is pretty generic and used for a wide range of non-web tools (tldr-node-client being a case-in-point). My focus with the "easily hackable" was not so much on the language itself, but on the readability and documentation of the code. ps - Although I am disagreeing with some of the things you say, I want to make sure my words aren't taken as discouragement. I fully support moving to a leaner default client, just not at the expense of the user experience. |
This is correct, but as far as I know, any of these have some way to add custom repositories (like we used to do with homebrew).
I agree, we should stay true to the platform. I'm not big of a Windows users myself, but as far as I know, most command line tools are installed by putting them into some directory of their (or users) choice and amending the path. Some do this via installers, some via .bat, some expect the user to do it on their own.
No, but I expect the intersection of developers interested in working on a native client and people knowing C is bigger than people knowing JavaScript, and Node.js and are interesting in client development.
Is it? I've never seen or used a non-web based Node.js tool before. Good to know!
I probably misunderstood you, but how can the user experience get worse than with the current client? Requiring the user to install node.js, npm to install tldr is the worse it can get in my opinion. Node.js 6.7.0: 3,669 files, 40.8M vs tldr-c-client: 1 file, 36K That is a difference of 4815 files and 48.3M. |
I really just want a client that
This would mean:
I don't care what it's built in or on as long as I can get this flow:
BUT we need to understand some things, good and bad:
Considering this, I suggest we take a good look at ourselves (tm), in particular how we wrote the node client, and figure out how to strip it down to the bare minimum code necessary. IMO we can build it using node's stdlib, and keep itself updated through npm/git. Once we've migrated to a git based content management flow, and properly defined an experience that we'd like to detach from it's biggest dependency (node/npm), then let's talk about making a binary build. Too much shit to deal with at once 😅
[0] for the lack of a better label, and because "the people who invest their into making these tools what they are, for good and bad" was quite a mouthful |
Pardon? A semi-fast and portable string search is easy to build. We don't have to build the next grep/ack/ag, that obviously requires a lot more effort.
Just keeping the node dependency is way to much, in my opinion. I suggested tldr to a handful of friends over the past year. Guess how many installed it by just going to the landing-page? Zero. Not a single friend of mine wanted to install Node.js for a simple command line utility. That's 60MB of glorified junk. Few settled for a client installable via brew, some used python, many simply used the web client once and forgot about it.
You literally suggested the only feature which requires, one way or the other, the use of a c library: libgit2. Adding this to the node client adds another layer of dependency: a working c compiler. I don't see a single point speaking in favor of a Node.js client. (keep in mind I'm also not suggesting the client would have to be written in C. C++, Fortran, Go or whatever language can use C libraries and be compiled to a binary). |
I am pretty comfortable in Go. Now I feel that I should have taken ownership of the Go client instead of the node client 😞
That is really interesting. That means none of your friends had The All that being said and done, I have no qualms with a native client. As long as they fulfill the "easy install" and "easy update" criteria mentioned above. I would like the emphasize that copying the binary and placing it in the system path is NOT an option and will easily put off beginners(Heck, even I don't like un Just my 2 cents 😄 |
Again, we don't need no platform specific git client. We can access git like everyone else: |
What? Git is definitely not a syscall. |
Yup. Calling the git executable directly. |
I will comment later with more time, but I am wondering why do we have to choose/provide a single official client at all? If we ensure all clients featured in our documentation follow the UX/features spec we define (#1065), then we can let each user pick the (endorsed) client that is most compatible with their environment/experience/preferences, without imposing any particular prerequisites setup. On a related note, let's keep in mind that the node client wasn't specifically elected to be the official client; it merely was the first one included by @rprieto himself when he first created the tldr-pages project. In fact, by adopting several clients under the organization (the python one, the cpp one, the elixir one), I believe we can interpret his original intent as not endorsing the node client as the main one to the detriment of the others. (This probably means that to be consistent, we should remove the "default" installation instructions in the README to not refer to a specific tool (as suggested by @ericbn in #1057 (comment)). |
We need not provide an official client. But we should point users towards the most mature and actively maintained client(s). Otherwise how is the user going to know which client to install given there are so many options ? Obviously, not all of them equally support all of the requirements that we define. |
There doesn't have to be just a single client, but it's pretty common to have one reference implementation which is then "ported" by the community to different languages / environments. The issue is, we're currently "suggesting" way to many clients on the landing page. Examples for projects having one reference implementations and many "ports": Those were just the projects I could come up while writing, there are obviously many more. |
Hey, I myself have a port of scrypt in golang 😄 ! |
Hence the proposal to only feature in our documentation those clients that do support all the requirements that we define. We can consider those "the most mature clients", and do so with a concrete, objective measure.
Agreed. Defining the spec and removing those that don't follow it should address this issue.
Well, if we have several clients following the same spec, then users can refer to any of them to start a new project. Or they can simply refer to the spec itself. This has the benefit of allowing people to pick a reference implementation in a language (programming or natural) they're already comfortable/familiar with. |
That won't solve the problem, it'll simply reduce it. |
I came across this nifty visualization of node packages' dependencies, and thought it could be interesting to share here tldr-node-client's tree. Interactive version: http://npm.anvaka.com/#/view/2d/tldr
|
Hi everyone! Sorry I haven't been active in a long time for many different reasons :( I was pinged above so I'll explain my initial reasoning on having a single client :) I don't know if I'd say TLDR is a tool for which the end users probably don't mind what technology is used. To me it would be similar to Git providing command line tools called |
I see no mention of bash here, but it is very platform independent, has only one dependency (bash) that is likely available everywhere people are interested in using tldr as a commandline client, and the single 'binary' is very small. That said, I don't see the advantage of trying to push one client over others. |
Is this issue resolved yet? I think @pepa65's response sums everything up nicely.
|
There has been no consensus so far. It is one of those issues which is stuck in limbo. |
The cpp client hasn't been touched in years. Partially because I stopped seeing a reason of developing it as one of many. I'm still under the impression that it's actively harmful to have so many clients. They should've all been consolidated into a single client (whichever that would've been). |
In that case @Leandros, I'm not sure that it's worth keeping this issue open. While I don't exactly agree that consolidating into a single client is the right answer here, either way you look at this I'd suggest that would be a separate issue. To that end, I propose we close this issue. |
It's a waste of resources to focus on developing multiple clients when neither the project's core nor the most used client (node) are completely developed. I agree with @sbrl this should be closed. |
Agreed. |
Just to set the record clear, there seem to be two separate issues discussed in the last few comments:
Neither is the reason this issue is being closed (which makes sense because there's no decision either way); it's closed because it proposes applying (1) to this client, but that's not an option as it is no longer being developed due to (2) currently defaulting towards keeping multiple clients, by virtue of that being the status quo, with no consensus to change that. (Is that a fair assessment, @sbrl?) |
Yep, that's a pretty accurate way of putting it. Those issues there should really have their own issues for discussion purposes. IIRC, we do have some a related issue: #1410 (move everything into 1 repo; personally I'm against that). I can't find one about multiple client though (which I'm also against). Edit: To clarify I'm against having a single client. |
I'm still in favor of having a single client which works on all platforms and removing the promotion of multiple clients. |
:-D Preferably one binary then..! |
@Leandros Are you still in favor of it being the C client? It seems user consensus is on Node / Python due to the popularity of those technologies. |
@zdroid Not really. Use the most mature and most portable client. Although the C client is probably the most portable one, it's by no means the most mature one. |
How would a single client work in your terminal, in a web browser, on Android and iOS phones, and via a smart speaker all at the same time @Leandros? Also edited my previous comment to clarify that I'm against having a single client. |
Do we have a client for a smart speaker? If not, we definitely need one! 😉 Now that I see @sbrl's comment, I have to say my mind is on her side aswell. We could focus on one CLI-based platform, but that's the most we can do. Developing portable clients is community's job, and the community has been doing it great. |
(@zdroid: I hope you don't mind, but I've edited your comment to correct my pronouns) |
@sbrl I don't mind of course. 😉 Just an idea on top of my head: perhaps a web(site) client could be the default one? |
@sbrl I don't really see the need for a tldr client on a smartphone, to be honest. But, if you want to be completely pedantic, C runs on all the platforms you mentioned ;) |
Neither do I, but I'm sure some people would find it useful - potentially if you're working with an air-gapped machine? It should perhaps be noted that the output medium is completely different for a smart speaker, the web, and the terminal though. Speaking of smart speakers, I've seen mycroft.ai but haven't yet played around with it. Perhaps that would be a good candidate for developing a tldr-pages plugin? :P tldr-pages everywhere |
The
tldr
c client is now in the homebrew core available, and can simply be installed viawithout any taps required.
What's your opinion on promoting it more?
The text was updated successfully, but these errors were encountered: