On Thu, Sep 20, 2012 at 8:23 PM, Ben Scott <dragonh...@gmail.com> wrote:

> On Thu, Sep 20, 2012 at 2:29 PM, Alan Johnson <a...@datdec.com> wrote:
> > 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.  :)
>

Even that compared to our loopy efforts...


> > 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> 
> urls
>
> ... 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".
>

Good to know.  Thanks!


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

Yep. =)


>
>   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.
>

Nice!  And more readable than either your one liner or my use of seq.


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

Yep, and it probably expands similar, to be confirmed with set -x


> > 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.  :)
>

Yeah, the click and drag was the main thing that annoyed me.  Zooming made
it much less painful, but removed a lot of that joy of discovery that comes
with wondering at a constant scale.  I really want some kind of press and
hold option.  Maybe as you move the mouse around it moves in that direction
with speed relative to the distance from the center.  Even just hook up the
arrow keys.  Oh, then if there were a little avatar with occasional things
to shoot or jump... no wait, then I'd have to call my game-o-holic sponsor
if I want to read the whole thing...


>
> > 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?  ;-)
>

It's on the Internet.  Just download the whole thing and grep it.  It is
kind of big, so -F would be a good idea.  I've heard people call it "meat
space" too, so then the question becomes to regex or not to regex and fgrep
it twice...
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to