
World - bpierre
http://aem1k.com/world/
======
parasj
Here this is, formatted so it is more readable.

    
    
      p = "<" + "pre>";
      for (y in n = "zw24l6k\
      4e3t4jn`t4qj24xh2 x42kty24wrt413n243n\
      9h243pdxt41csb yz43iyb6k43pk7243nm\
      r24".split(4)) {
        for (a in t = parseInt(n[y], 36) + (e = x = r = []))
          for (r = !r, i = 0; t[a] > i; i += .05) 
            with(Math) x -= .05, 0 > cos(o = new Date / 1e3 + x / PI) && (e[~~(32 * sin(o) * sin(.5 + y / 7)) + 60] = -~r);
        for (x = 0; 122 > x;)
          p += "   *#" [e[x++] + e[x++]] || (S = ("eval" + "(z=\'" + z.split(B = "\\\\").join(B + B).split(Q = "\'").join(B + Q ) + Q + ")//m1k")[x / 2 + 61 * y - 1]).fontcolor /\\w/.test(S) && "#03B");
        document.body.innerHTML = p += B + "\\n"
      }
      setTimeout(z)
    

* Edited for formatting

~~~
rosser
Personally, I find your comment _less_ readable than TFA.

~~~
ebilgenius
[http://pastebin.com/P3eXCg07](http://pastebin.com/P3eXCg07)

------
zwegner
Reminds me of the old 1992 winner of the IOCCC by Brian Westley (who
consistently entered some of the most impressive programs in that contest). It
doesn't spin, but it prints a map of the provided lat/long.

[http://www.ioccc.org/1992/westley.hint](http://www.ioccc.org/1992/westley.hint)

    
    
                   main(l
              ,a,n,d)char**a;{
          for(d=atoi(a[1])/10*80-
         atoi(a[2])/5-596;n="@NKA\
        CLCCGZAAQBEAADAFaISADJABBA^\
        SNLGAQABDAXIMBAACTBATAHDBAN\
        ZcEMMCCCCAAhEIJFAEAAABAfHJE\
        TBdFLDAANEfDNBPHdBcBBBEA_AL\
         H E L L O,    W O R L D! "
           [l++-3];)for(;n-->64;)
              putchar(!d+++33^
                   l&1);}

~~~
russellsprouts
There is another program arranged in a similar circular shape that calculated
pi experimentally using it's own source code as the circle to test.

~~~
ZirconCode
Found it here
[http://www.cise.ufl.edu/~manuel/obfuscate/pi.c](http://www.cise.ufl.edu/~manuel/obfuscate/pi.c)
That's awesome.

~~~
jerf
There's a lot of talk about scalable code floating around, but it's rare to
see anything as scalable as this code. Do you want more precision in your pi
approximation? Then you _literally_ scale the code up. There's few people who
can truly claim to have written scalable code like that.

~~~
justin_
Speaking of "scalable code", there is another interesting obfuscated piece of
code that can scale itself. akari.c[1] is an obfuscated ASCII art downsampler.

The neat thing is that the program itself is ASCII art, and downscaling the
program source code will generate valid programs for 3 iterations![2]

[1]
[http://www.ioccc.org/2011/akari/akari.c](http://www.ioccc.org/2011/akari/akari.c)
[2]
[http://www.ioccc.org/2011/akari/hint.html](http://www.ioccc.org/2011/akari/hint.html)

------
mistercow
That was a wonderful experience of multiple moments of realization. "Oh, it's
an ascii globe; it looks like it just scrolls a map through the circle. No
wait, it's warping as it shifts across. Wait, is it using asterisks for
antialiasing? What is all of this stuff around the outsi- ... oh. Oh."

------
nikcub
It's spinning in the wrong direction!

~~~
wavesounds
This is one of the most beautiful pieces of art I've ever seen!

... and the top comment is typical negative nitpicking!

Why HN? Why?! There must be a better way!

~~~
TeMPOraL
Why do we keep calling it "typical negative nitpicking"? How about calling it
"feedback"? Or maybe even "the most useful type of feedback"?

We're encouraged here to post things that add value. But that pretty much
implies either criticism or going off-topic ("hey, I've seen something similar
here:", etc.). There is no practical value in "positive" comments, no matter
how elaborately you can write "I liked it". Yes, it will make everyone feel a
little bit better, but it hardly contributes anything of value to anyone.

Not every criticism is a valuable feedback, but every valuable feedback is a
kind of criticism. And I think the best thing about HN is that it has lots of
civil nitpicking (usually followed by interesting discussions), instead of
circle jerks and compliments.

ETA

> _Why HN? Why?! There must be a better way!_

There is: it's to stop taking criticism so personally and instead extract as
much value from it as one can, and discard the rest. I find it to be a good
attitude for life in general, not just HN.

~~~
GrinningFool
I agree with much of what you said - there is significant value in negative
feedback.

But here is where I disagree:

>... but it hardly contributes anything of value to anyone...

>... every valuable feedback is a kind of criticism...

Valuable feedback includes positive as well as negative. Negative is
_actionable_ feedback, but positive has just as much value in a different way.

Most people are aware that their own perceptions, thoughts, and ideas may be
flawed. Negative feedback points out those flaws and should always be
accepted. Positive feedback says that in spite of the flaws, there is
something fundamentally worthwhile there.

And while upvotes can certainly serve as a form of positive feedback, words
are even better.

I'm not suggesting that we should all post meaningless words of encouragement
to everything that comes along. But if you're impressed by something you see,
saying so only helps.

~~~
TeMPOraL
> _Negative is actionable feedback, but positive has just as much value in a
> different way._

I guess "actionable feedback" was the phrase I was looking for.

> _I 'm not suggesting that we should all post meaningless words of
> encouragement to everything that comes along. But if you're impressed by
> something you see, saying so only helps._

Agree 100%. It's always nice and reassuring to get some positive feedback :).

------
scarmig
Brilliant.

What I'd love to see is a step by step description of how this was
constructed. If I have an end goal in mind, it's simple enough to hammer some
characters into something a machine can use to do that end goal while still
being readable by a human. But this? It floors me, and I can't even imagine
where to start. I can understand the code with a bit of thought, but getting
from an empty text editor to that seems beyond me.

~~~
meemoo
He gave this step by step presentation at JSConf.eu today. It was really well
done... I could almost follow!

I hear there will be video in a couple weeks.

------
mathrawka
Inspired by "The Qlobe", written in Ruby
[http://mamememo.blogspot.de/2010/09/qlobe.html](http://mamememo.blogspot.de/2010/09/qlobe.html)

~~~
raldi
Hmm, that one says, "Copyright(C).Yusuke Endoh, 2010"

The author of this one apparently forgot to give credit.

~~~
pavpanchekha
Doesn't look like the code is that similar. Doesn't look like copyright has
anything to do with it. Does Endoh have a patent? That would of course be a
different matter.

~~~
raldi
I'm not alleging a law was broken -- just that the author should have given
credit for inspiration.

~~~
mathrawka
The author did give credit for the original in his presentation.

~~~
raldi
Huh? Where?

------
kunai
If you look closely you'll see that there's a parallax effect, where the lines
near the equator move faster than the lines at the top, giving it a sense of
depth and motion that you wouldn't expect from any ASCII art animation.

This was brilliant, just absolutely fantastic.

------
sylvinus
Saw the talk by Martin at JSConf.eu today explaining how he did it. Just
brilliant! [http://2013.jsconf.eu/speakers/martin-kleppe-1024-seconds-
of...](http://2013.jsconf.eu/speakers/martin-kleppe-1024-seconds-of-js-
wizardry.html)

~~~
RBerenguel
I have to remember to check their YouTube channel for the talk!

~~~
brianpgordon
If anyone finds the video, post it here please!

------
josephagoss
Can someone explain this really simply for me?

I understand that the whole thing is actual source and its manipulating the
center commented area. But I am having trouble following the code.

~~~
lutusp
> Can someone explain this really simply for me?

Imagine that you had to write it yourself.

First, you would create some strings approximately representing latitudes on
Earth and their associated land masses -- one string for maybe 10-20 degrees
of latitude, from some southerly latitude to a northerly one.

Nest, you would figure out a way to print substrings of the strings, at
specific points within the strings that you would choose.

Next, you would arrange that the substring printer would wrap around to the
beginning of the string in the event that it was asked to print a greater
length than the remaining characters available from the specific starting
point to the end. By wrapping around, you create the illusion of a circle of
characters, like on a globe.

Next, you would think of a way to write into a specially formatted executable
text file having a roughly circular central section that is commented out,
i.e. not executable.

Next, you would arrange that the specially formatted text file be the running
program, and the central comment area represent the display of the earth.

Next, just to blow minds, you would print the current form of the program text
file on the console, after each animation cycle filled the comment area.

Finally, you would create the illusion that the earth is rotating clockwise as
seen from the north pole (the opposite of reality) just to provoke people who
know a bit of astronomy.

------
sparist
This is the first animated quine I've ever seen. It may be a first.

More on quines:
[http://en.wikipedia.org/wiki/Quine_(computing)](http://en.wikipedia.org/wiki/Quine_\(computing\))

------
RBerenguel
My jaw literally dropped, I had to check the source to make sure this was just
it... Really impressive. I love these kind of works of art

------
cstigler
A heavily refactored version of this code, for those curious how it works:

[http://pastebin.com/uUvDGzrb](http://pastebin.com/uUvDGzrb)

(note that it will not work like the original and make a pretty globe, because
it's dependent on the exact character positioning)

------
nine_k
I see Perl's fashion of poetic source code is being replaced by JS's fashion
of animated source code! 8-)

------
morgante
My first thought was that's kinda cool.

Then I viewed the source. Amazing.

------
billforsternz
Amazing stuff. One quibble; There's a XXXXX in the middle of the South
Pacific, midway between Australia and Chile. Whatever it is supposed to be,
it's way too big.

------
electic
Kudos, this is amazing.

------
patrikr
Wow, it even works in Opera Mini!

------
diericx
Someone should make a version that spins in real time :O

~~~
rplnt
View the source code for that. Just don't look at it for too long.

------
icpmacdo
Inspecting the elements in chrome wont let me open the any of the code. Once
you get past the body tags the <pre> tags just keep on flashing.

~~~
mannix
Go to the Sources tab and click the || button to pause javascript. If you're
wondering where the code is, just curl the URL :) (or, with Web Inspector
open, refresh the page, go to the Network tab and select the only request.

~~~
jhuckestein
You can just look at the source (Ctrl+Alt+U in Chrome). It's an HTML document
with a single script tag in it.

~~~
dgudkov
Just Ctrl+U

------
pdenya
That's adorable but I wouldn't have bothered clicking if I had known what it
was from the title.

~~~
mhartl
Take another look. It's not just an ASCII animation; _it 's the source code
that produces the animation_.

------
scrrr
There's a bunch of these globe animations already. But always nice. ;)

------
smoyer
You made me eval() ... Don't be eval.

Excellent piece of code though!

------
sidcool
Making the code look like the output!! Super cool.

------
cyberscrawler
You chopped off the Indian subcontinent

------
salimane
it's not an accurate map, showing north america as the same size as Africa :)

------
cburgmer
aemkei delivered an awesome presentation yesterday at JSConf EU.

This was his final slide.

------
Techasura
Can someone explain this?

~~~
arikrak
View the source. Usually there would be a separate script that creates the
animation.

In this case, the page is the source. The animation and page are one with the
source.

------
frozenport
Is the UK on the map?

------
kul_
it hypnotized me to upvote!

