Live data from Hacker News

What Anime CLI?

github.com

31–40 of 62 posts

Re: What Anime CLI?

#31
post #10

Earlier quoted context omitted.

The file names are ingested as a string so there is no way they’re being interpreted by the Go runtime (and in fact, Go being a AOT compiles language rather than a dynamic one means it wouldn’t be possible for file names to conflict like described in the readme). This suggests to me that the author is misunderstanding why ‘&’ causes POSIX shells to do weird things. I think what’s happening is the author tried a web U…

No, I think the author doesn't understand how to urlencode parameters as the image URL is passed to the API like so: curl -s https://trace.moe/api/search?url=https://foobar/baz.jpg And in the project the URL is simply appended: https://github.com/irevenko/what-anime-cli/blob/main/cli/lin... The API provides both GET and POST methods of passing the image file or URL and the author has somehow mangled them both into on…

Good catch and that's definitely true as well but there's no way the author could have passed an ampersand into a Go string (ie as a parameter in said tool) without understanding the need to escape it in the first place. The shell would have parsed the ampersand as a reserved token out before the URI encoding bug was exposed.

As first project though, it's a great learning exercise for the author. We all have to start somewhere.

Re: What Anime CLI?

#32
post #10

Earlier quoted context omitted.

The file names are ingested as a string so there is no way they’re being interpreted by the Go runtime (and in fact, Go being a AOT compiles language rather than a dynamic one means it wouldn’t be possible for file names to conflict like described in the readme). This suggests to me that the author is misunderstanding why ‘&’ causes POSIX shells to do weird things. I think what’s happening is the author tried a web U…

> I think what’s happening is the author tried a web URI that had an ampersand in, Bash then background the process and the author panicked thinking the Go runtime was parsing the ampersand rather than his or her $SHELL. Yes, this is exactly what happened. The author says this is one of their first Go projects, which explains their misunderstanding. They still have a lot to learn, not only about Go but Bash as well.…

I remember a couple of years ago, one project also took file paths as a parameter and supported multiple parameters. In the readme the author stated that they hadn't yet written support for wildcards (globing) so each file needed to be included manually. There were surprised and pleased when I raised an "issue" pointing out that actually they get globing for free with their $SHELL.

That experience really made me appreciate just how varied developers experiences were with the command line and also appreciative that people are still writing tools and happy to share them with the community even when they're not 40+ year old UNIX grey beards. It's good to see fresh folk adopt TUIs.

Re: What Anime CLI?

#33

The message >NOTE: MAKE SURE THAT YOUR LINKS ENDS WITH .IMAGE_FORMAT AND DOESN'T HAVE ANY & CHARS AFTER BECAUSE THIS SYMBOL IS RESERVED BY GOLANG Makes me a bit uncomfortable with it. Shouldn't input sanitization be one of the first things to consider when doing user-facing applications?

Even if you sanitize inputs, you still have to sanitize outputs. And as the comments below show, the real problem here is that outputs weren't sanitized.

Creating URLs or command line arguments without proper escaping is going to fail in so many ways, even on data that isn't malicious.

Re: What Anime CLI?

#34

Earlier quoted context omitted.

Is it really silly though? The author of trace.moe has to label and store each anime episode somewhere, and use CPU power provided for free to search through these indexes. Adding regular TV series and movies to this dataset could really dirty what gets returned when the service is just about letting someone find out what anime some screenshot is from. The FAQ says they've indexed most of post-2000 anime and very lit…

> Is it really silly though? The author of trace.moe has to label and store each anime episode somewhere, and use CPU power provided for free to search through these indexes. Adding regular TV series and movies to this dataset could really dirty what gets returned when the service is just about letting someone find out what anime some screenshot is from. I simply quæstion the sanity of delimiting the search to animat…

>so it's really not about “animation from Japan” but about specific art styles, it seems.

Yes, the one colloquially known as anime.

Re: What Anime CLI?

#35
post #4

Earlier quoted context omitted.

I used to think that about Shazam. I had no reasonable idea about how it worked, so much so it really felt like magic (there's a quote to be put here, which I can't find the author here. HN help me). My 2c of an advice: uncover the magic, learn the innerworkings of such methods. It is a much stronger and more powerful feeling than the "wow" effect you're having right now.

> so much so it really felt like magic (there's a quote to be put here, which I can't find the author here. HN help me). "Any sufficiently advanced technology is indistinguishable from magic." Arthur C. Clarke :)

ha ha, thanks, I knew the HN crew couldn't disappoint on this :)

Re: What Anime CLI?

#36
post #34

Earlier quoted context omitted.

> Is it really silly though? The author of trace.moe has to label and store each anime episode somewhere, and use CPU power provided for free to search through these indexes. Adding regular TV series and movies to this dataset could really dirty what gets returned when the service is just about letting someone find out what anime some screenshot is from. I simply quæstion the sanity of delimiting the search to animat…

>so it's really not about “animation from Japan” but about specific art styles, it seems. Yes, the one colloquially known as anime.

If only the reality weren't that most sources using that ridiculous term are highly inconsistent about the meaning and use it with two different meanings in the same paragraph.

If “moe art” be what one means, then simply use that word; — there is already a perfectly good word for it.

Re: What Anime CLI?

#39
Cool! A few of my friends have dragged me back into watching anime, so anime related side projects are fresh on my mind. This seems like a great use case for a discord bot too.

My big want is a fluff eliminator API. Like a service where people can define timestamps of where the actual good stuff is on a per-episode basis. Then a wrapper service that displays just the slimmed down episode portions chained together. But I don't know if the YouTube API or others even support stuff like that.

Re: What Anime CLI?

#40
post #34

Earlier quoted context omitted.

>so it's really not about “animation from Japan” but about specific art styles, it seems. Yes, the one colloquially known as anime.

If only the reality weren't that most sources using that ridiculous term are highly inconsistent about the meaning and use it with two different meanings in the same paragraph. If “ moe art” be what one means, then simply use that word; — there is already a perfectly good word for it.

A phrase that essentially nobody else uses to mean what you want it to mean is hardly a perfectly good word for a concept.

Feel free to popularize it on its merits first, then we can talk.

Post reply on HN