News for hackers. Stuff that matters.
Re:Show HN: A url-based API for images (my weekend project) by r4vik on Saturday April 27, 2013 @02:50PM (#5618691)
seems a lot like jpg.to http://optimus_prime.jpg.to/
Re:Show HN: A url-based API for images (my weekend project) by TazeTSchnitzel on Sunday April 28, 2013 @04:48AM (#5620642)
Wait, since when could hostnames have underscores?

EDIT: Hey, IDNs seem to work! http://café.jpg.to/

EDIT 2: Or maybe not. http://schlüssel.jpg.to/

(Schlüssel means "key" in German. Google Image Search it and you get pictures of keys. Search for "Schlussel", though, and you get that girl. So presumably it searched for the punycode, something like --schlussel-blah.)

EDIT 3: Wait. the IDN for "Schlüssel" is xn--schlssel-95a. If I Google that, I don't get pictures of Ms. Schlussel. It must be decoding it and stripping the accents? That said, searching for schlssel does yield pictures of her.

EDIT 4: café is --xn-caf-dma. Google Image Search "caf" won't find cafés. Nor will "--xn-caf-dma". So it must understand IDNs but strip or be accent-insensitive

Re:Show HN: A url-based API for images (my weekend project) by nolok on Sunday April 28, 2013 @08:02AM (#5620934)
They always could have underscore. But beware of browser issues (cookies will fail in IE - at least pre 9 versions, for example).
Re:Show HN: A url-based API for images (my weekend project) by TazeTSchnitzel on Sunday April 28, 2013 @08:46AM (#5621045)
Well, thing is hostnames are supposed to only contain letters, digits and hyphens, although other DNS names can contain underscores. So it shouldn't work. You should be able to have a TEXT record with an underscore, but really shouldn't be able to have an A or AAAA record.
Re:Show HN: A url-based API for images (my weekend project) by imechura on Sunday April 28, 2013 @09:04PM (#5623568)
In this case optimus_prime is a sub domain. The actual DNS entry is likely *.jpg.to so DNS does not have to know how to resolve the URI section with underscore.
Re:Show HN: A url-based API for images (my weekend project) by TazeTSchnitzel on Monday April 29, 2013 @12:06PM (#5627011)
I'm not sure wildcard entries are actually a feature of DNS, I thought they were something done server-side by the DNS server.
Re:Show HN: A url-based API for images (my weekend project) by mintplant on Saturday April 27, 2013 @03:54PM (#5618857)
Re:Show HN: A url-based API for images (my weekend project) by iSloth on Saturday April 27, 2013 @02:57PM (#5618715)
Re:Show HN: A url-based API for images (my weekend project) by pfig on Saturday April 27, 2013 @02:53PM (#5618700)
Re:Show HN: A url-based API for images (my weekend project) by navs on Sunday April 28, 2013 @04:14AM (#5620573)
Ah this one actually works. Thanks. I just wasted a good hour placing the nicks of every one in the irc channel I frequent into jpg.to. Hilarity ensued. Productivity diminished.
Re:Show HN: A url-based API for images (my weekend project) by subleq on Saturday April 27, 2013 @03:56PM (#5618863)
Re:Show HN: A url-based API for images (my weekend project) by amccloud on Saturday April 27, 2013 @04:10PM (#5618899)
Re:Show HN: A url-based API for images (my weekend project) by egonschiele on Saturday April 27, 2013 @11:16PM (#5620037)
Whoa this is cool!
Re:Show HN: A url-based API for images (my weekend project) by flippyhead on Saturday April 27, 2013 @03:03PM (#5618733)
heh, never heard of that til now. Sweet!