

Google Isn't Just Reading Your Links, It's Now Running Your Code - mlinsey
http://blogs.forbes.com/velocity/2010/06/25/google-isnt-just-reading-your-links-its-now-running-your-code/

======
Locke1689
To be fair, while the halting problem could come into play here, it really
shouldn't in practice. When Google is running the code there shouldn't really
be a functional difference between a script which takes 20 seconds to run and
one which takes forever -- kill the process either way.

~~~
dododo
a Turing machine has an infinite tape. a typical computer has finite memory.
therefore, it's tape is upper bounded by a constant function. this is a kind
of linear bounded automata:
<http://en.wikipedia.org/wiki/Linear_bounded_automata>

linear bounded automata don't have a halting problem. it's perfectly
decidable. this doesn't detract from the fact it may take a long time to
decide, but it is a far easier problem than halting on a TM.

~~~
jules
The Javascript spec probably doesn't specify a fixed memory limit, so limiting
the space arbitrarily to X mb is not that different from limiting the time
arbitrarily to Y s.

~~~
alextp
Except verifying termination with a bound in the seconds of computation can be
done in O(n), where n is the maximum number of seconds allowed (you can see
that trivially by just waiting n seconds and killing the program if it doesn't
terminate). On the other hand, if you try to limit a program's memory usage,
it can take up to O(2^n) time to detect that a program with budget of n bits
terminates (it might seem easier than that, but the program can go into an
infinite loop without overflowing memory, like "while (1) {}"). You must
consider that such a program can never have more than one state for each
possible configuration of its allowed memory space (which is 2^n) and you can
tell that it is in and infinite loop only when it repeats a previously used
state. To do that correctly, then, takes a long time.

Incidentally, this is why PSPACE (the class of decision problem decidable in a
turing machine with polynomially limited space) seems a lot more powerful than
P (the set of decision problems decidable using a polynomial amount of time).

------
ck2
Yeah google has been following my javascript obfuscated links for quite some
time now.

It's actually a tad annoying because there's no way to do a "nofollow" in
javascript.

~~~
Niten
I just hope they don't start caching and displaying obfuscated links, since
JavaScript obfuscation is how I currently manage to display a working mailto:
link on my personal web page while simultaneously giving myself nominal
protection from address harvesters. Is this no longer a viable strategy for
protecting one's email address on the web?

~~~
JoachimSchipper
To the extent that it ever worked, it still works - Google doesn't index
mailto: links.

~~~
mootothemax
Do you know that for a fact? Just because something's not publically available
doesn't mean it's not in the back-end.

~~~
JoachimSchipper
I don't know whether or not they are in Google's data center somewhere; but to
the best of my knowledge, they cannot be extracted from that data center,
which means it's largely irrelevant as far as spam is concerned.

------
jrockway
Now you know what V8 is _really_ for.

------
paulgb
You know when programmers write blog posts about business and finance? I
wonder if finance people cringe at those as much as we did while reading that.

------
postfuturist
"--- it's quite the accomplishment."

There is a severe technical misunderstanding here.

------
risotto
V8, Chrome, and the Developer Tools do run my code, just when _I_ ask it to.
Guess it makes sense Google is asking it to too.

So what, they must be able to query and manipulate the dom, only after
Javascript has run.

jsdom -- DOM in Javascript (V8 via Node.js) -- is a nice little hack and mind
bender. Why can't the document be a javascript object that you manipulate??

Javascript all the way down. and up.

------
tocomment
Wouldn't it be interesting if google tried to run all the code snippets and
full applications found on the web and tried to automatically figure out what
they do?

Maybe that would be the first step to automated programming?

