News for hackers. Stuff that matters.
Re:Very nice Color Schema Generator by lifthrasiir on Monday October 21, 2013 @02:28AM (#6583703)
Looking at news.arc in the Arc distribution (I think that is a source code of the HN or at least a basis of it, right?), it just misses this kind of URLs:

    (def parse-site (url) 
      (rev (tokens (cadr (tokens url [in _ #\/ #\?])) #\.)))
It basically tokenizes the URL "http://example.com/foo/bar?quux#woah" into a list "http:", "example.com", "foo", etc. (no "" since tokens uses consif internally) and takes the second element as a domain name. (It has a prior knowledge of url starting with either "http://" or "https://".) Obviously "#" is missing in the list of separators.

Edit: I filed an issue to the HN issue tracker. https://github.com/HackerNews/HN/issues/35

There are no comments on this comment yet.