On Thu, Sep 20, 2012 at 2:29 PM, Alan Johnson <a...@datdec.com> wrote:
>> > ... thwarted by the unholy amount of hole-iness in the map:
>> > you can't just start at the center, walk until you hit `the end'
>> > of the world ...
>>   Why not?
> Your suggestion does not disprove his claim that you can't walk to the end
> since their are several false ends.

  Ah.  Well, yes, from that POV, you're right.  But assuming one knows
the "real" end (or is willing to find it through persistence), it's
possible.  :)

> Personally, I don't think something
> that tries to walk to the end is all that brutish. =)

  It's not so much the walking to the end, but the walking all over
the rest of it.  :)

> I got around the command line issue by dumping a list of generated URLs to a
> file and then feeding that file to wget:

  Oh, good idea!

> ajohnson@helium:~/tmp/xkcdclickdrag$ for v in n s; do for h in e w; do for x
> in `seq 100`; do for y in `seq 1 100`; do echo
> http://imgs.xkcd.com/clickdrag/$y$v$x$h.png; done; done; done; done > urls
> ajohnson@helium:~/tmp/xkcdclickdrag$ wget -qi urls
> How's that for brute?  =)  No where near as elegant as your one-liner, but I
> like to just loop the hell out of things rather than use some more elegant,
> but less familiar, syntax.

  To each their own.  :)  FWIW, one could do this:

        echo http://imgs.xkcd.com/clickdrag/{1..256}{n,s}{1..256}{e,w}.png > 

... to generate the file using shell brace expansion.  On my system,
at least, it works.  Presumably because "echo" is a bash built-in.  An
external command does indeed fail with "Argument list too long".

  FYI, the resulting "urls" file is 11 megabytes.  :)

  As a halfway point, one can also do this:

        for v in n s; do for h in e w; do for x in {1..100}; do for y in
{1..100}; do echo http://imgs.xkcd.com/clickdrag/$y$v$x$h.png; done;
done; done; done > urls

to use a for loop without needing the seq external command.

  (It may be worth noting that {1..100} is still a looping construct,
just a different one.)

> Side note: I was hoping, or expecting, it would wrap at all the edges. =)

  Me too.  :)

> Another side note: All this hacking is fun and all, but the panel is much
> more fun to explore without zooming or mapping.

  I actually found it much more enjoyable with the zooming and a
full-screen display.  I found scrolling around in that tiny view frame
to be quite tedious.  Again, to each their own.  :)

> Or... maybe we will go out and explore the real world a bit. =)

  What is this "real world" of which you speak, and where may I
download it from?  ;-)

-- Ben
gnhlug-discuss mailing list

Reply via email to