Jless – a command-line JSON viewer (written in Rust)
jless.io
jless.io
But I was also pretty confident that I made something useful, and, in hindsight, I don't think I should have preemptively felt bad about using some "cheap" form of marketing to get people to see it. I have really conflicting thoughts about marketing and self-promotion from my experience trying to show people my other project, plaintextsports.com [1] (live sports scores in plain text with no ads or trackers so it loads instantly! I think the HN crowd would love it!). There's a weird line between marketing and advertising and self-promotion, where one is "ok", but the other is frowned upon. It's also a tale as old as time that the better marketed but technically inferior product wins out. (AC vs DC initially, Betamax vs VHS!) How much of success is being brazen enough to ignore those norms and shamelessly promote something? Should it be considered shameful to promote it in the first place?
In this case, being written in Rust is definitely a feature, as least when comparing tools! fx [2], a similar tool that made the front-page a couple months ago runs using Node, and I'm sure jless can handle bigger files and uses less memory (though admittedly I haven't actually verified this).
I like reading posts touching on Rust which lead to thought-provoking and civil discussions — especially when the choice of Rust is germane — and I appreciate knowing that Rust is involved from the titling/marketing. Thanks for your good work!
> Linux
> Homebrew
> Arch Linux
> pacman -U jless
First, if you have to revert to homebrew as a package manager on gnu/linux you might as well tell the user to just use cargo directly, that way users only have to install the rust toolchain as opposed to the rust toolchain plus an alien package manger. The typical way would be to make cargo compile the thing, place in in ~/.local somewhere and add that path to PATH.
Second, "pacman -U ARG" installs from a file or from a URI. jless is neither. You have to properly package it before pacman will install from a file, which means you have to write a PKGBUILD file with some metadata and build instructions (about 20 lines) and call makepkg, which will then produce the package (a .tar.xz file if I'm not mistaken).
I suggest you first test the instructions you put on your website.
Installing via Linux Homebrew is simply listed as an option because it's available as a Homebrew formula. And the option to install via cargo is also noted.
It works on most distros and for most languages, instead of being tied to, say, rust or arch.
Brew keeps it's packages separate, so breaking is less likely.
A separate package manager is not remotely needed for this and thus poses an unnecessary dependency and burden on users who didn't have homebrew installed. It integrates with the systems package manager in that it takes higher priority (well, or lower, depending on wether PATH was prepended or appended) during application lookup and does nothing else. Without looking at it I'd guess that homebrew does the same.
> I know almost nothing about cargo since I don't do rust
And you don't have to. Git clone, cargo install, add line to .profile (if not already there), done.
For people who already have brew installed (since it works for much more than cargo) these things are already known.
For Rust projects, there really is no need for more than this. It might take a bit longer, but it’s simple and easy.
Go, Rust and Node.js cover a large portion of recent projects, and many others cheat with Docker or the like.
https://github.com/tomnomnom/gron
<pre>$ cat test.json | gron</pre>
gron log.json | grep https
# see a json.log.entries[334].request.url
jq -r '.log.entries[] | .request.url' log.jsonI guess I should explicitly say in the documentation that help would be appreciated in adding support for other package managers. I definitely want jless available through the most standard avenues.
[1]: https://github.com/Homebrew/homebrew-core/blob/master/Formul...
It's just that I never really understood why there even IS a homebrew for linux.
I'm pretty sure you'll find yourself with multo-distro repository presence soon enough since your app is useful indeed.
Apologies if this might take things a little off-topic. But I can recall seeing "written in Rust" in the titles of quite a few HN posts. Is there any relevance to this? From my perspective, the utility of a given project/product could (or even should) be judged independently of the programming language that it was implemented in.
If your interest in jless is about its utility, you are right, language doesn't matter. If your interest in jless is looking at its code, I think language is relevant. And personally seeing it in the title let's me know without clicking that I might want to check out it's code later.
So I for one find it interesting and it affects my sense of how it will play out.
I'm sure it has a lot of corner cases as a feature, but that would be super-useful as companion tool to jq.
I see it's added now, but it's not possible to select and copy. I'm also not sure about the keys, h or ? doesn't bring up any help text.
One thing that would be great to smoothen my use-case is a better resize support. I generally have a bunch of terminals on a screen, and switch to full screen when needed. Currently, the drawing region does not update.
I'm using lxterm.
Nice tool otherwise!
"New software project (WRITTEN IN RUST) (COPS CALLED) (GONE WRONG)"
This holds even if the original reason they enjoyed contributing isn't a good reason!