Page 3 of 2687

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:28 am UTC
by LuthorAstarael
I got one of her lying down. Think she's bored now? I don't think I've seen anyone post this one yet:

cdcc6b46b32c53f8596cd0106958b42c4260b9cbc022e6d94054147aa6554960(dot)png

By the way, reading this discussion made me smile this morning when I got into work.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:29 am UTC
by TemporaryLife
She's lying down, now.

Image

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:31 am UTC
by LuthorAstarael
And another:

49b69c39cdd429cdf367e215a878f536dc566862ae00b91814adfbd264753d89(dot)png

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:33 am UTC
by murrow
If it is, indeed, coming in half hour increments, I'd expect no more than 24 hours of it. That's a lot of sketches.

Is it just me or is that speeding up quite a bit?

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:41 am UTC
by TemporaryLife
murrow wrote:Is it just me or is that speeding up quite a bit?


I definitely think it is. It seems to be coming every 5-10 minutes. I've been refreshing every few minutes, and it has been changing.

Am I the only one that feels the same sense of discovery that came with "Click And Drag"? When I refreshed and found her laying down, I was taken aback. It's all so simple, but it's so strange.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:44 am UTC
by eidako
The punchline is going to be "I just wasted (large number) man-hours of it."

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:45 am UTC
by phlip
No, I'm still only seeing it change every half hour.

Some other people are seeing it switch back and forth between recent and older panels, sometimes, though... which I think is the result of weird caching behaviour, not it actually changing.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:50 am UTC
by silverkitty
glasnt wrote:I can't see any javascripty auto-image changing,...

DSDM wrote:... no javascript wrapped around it,...

Poohblah wrote:... no javascript or other client-side functionality, ...


No one thought this: <script type="text/javascript" src="http://imgs.xkcd.com/static/time02.min.js"></script>
which appears right below the img src, looked like the javascripty image changing magic??

Be warned though: it's not just minified, it was clearly pretty obfuscated before it was minified.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:55 am UTC
by phlip
silverkitty wrote:No one thought this: <script type="text/javascript" src="http://imgs.xkcd.com/static/time02.min.js"></script>
which appears right below the img src, looked like the javascripty image changing magic??

Be warned though: it's not just minified, it was clearly pretty obfuscated before it was minified.

Huh, that's new. Definitely wasn't there when the strip first went up.

[edit] However, pulling it apart, it looks like it doesn't actually contain any information that'll help us find future panels - that's still all serverside. I think this is just some fanciness to make it automatically change if you just leave the page open, so you don't have to keep refreshing.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 8:57 am UTC
by taoistpage
Honestly I'm loving this. Though I do think it is simply changing on the half hour.

I previously pointed out that I have a cron job collecting and dumping them into a dropbox folder here: dropbox(dot)com/sh/lkddoimlwidux4b/_BweKh8LPL

So far I have 9 images. I might be missing the first one from being late on the uptake. If anyone has the permalink to it (or if could tell me for certain that I've caught them all), I would appreciate it.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:02 am UTC
by moeffju
The script is using HTML5 Server-Sent events to update the image programmatically. So the timing could change at any time.
Clever.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:02 am UTC
by Gerino
http://imgs.xkcd.com/static/time02.min.js

You guys have seen this, right? IMHO it just doesn't work:

Code: Select all

Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_start
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_error
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_start
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_error
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_start
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_error
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_start
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_error
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_start
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_error
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_start
Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_error

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:05 am UTC
by Eutychus
It's broken for me now :(

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:06 am UTC
by Beidah
She's back up... Wasn't expecting to stay up all night watching XKCD slowly change.

I wonder what they're talking about.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:07 am UTC
by murrow
(function(e){"use strict";function t(){this.data={}}function n(){this.listeners=new t}function r(e){setTimeout(function(){throw e},0)}function i(e){this.type=e}function s(e,t){i.call(this,e),this.data=t.data,this.lastEventId=t.lastEventId}function g(e,t){var n=Number(e);return(n<1?1:n>18e6?18e6:n)||t}function y(e,t,n){try{typeof e[t]=="function"&&e[t](n)}catch(i){r(i)}}function b(t,r){function B(){L=d,N!==null&&(N.abort(),N=null),C!==0&&(clearTimeout(C),C=0),S.readyState=d}function j(e){var t=L===p||L===h?N.responseText||"":"",n=null;if(L===h){var r=f?t!==""?N.getResponseHeader("Content-Type"):"":N.contentType;if(r&&v.test(r)){L=p,T=!0,x=u,S.readyState=p,n=new i("open"),S.dispatchEvent(n),y(S,"onopen",n);if(L===d)return}}if(L===p){t.length>k&&(H=!0,T=!0);var o=0,a=t.indexOf("\r",k),l=t.indexOf("\n",k);while(a!==-1||l!==-1){a===-1||l!==-1&&l<a?(o=l,l=t.indexOf("\n",o+1)):(o=a,a=t.indexOf("\r",o+1));var m=t.slice(k,o),B=D;D=t.slice(o,o+1)==="\r",k=o+1;if(!B||m.length!==0||D){_.push(m);var j=_.join("");_.length=0;if(j!==""){var I="",q=j.indexOf(":",0);q!==-1&&(I=j.slice(q+(j.slice(q+1,q+2)===" "?2:1)),j=j.slice(0,q)),j==="data"?A.push(I):j==="id"?O=I:j==="event"?M=I:j==="retry"?(u=g(I,u),x=u,b<u&&(b=u)):j==="retryLimit"?b=g(I,b):j==="heartbeatTimeout"&&(w=g(I,w),C!==0&&(clearTimeout(C),C=setTimeout(R,w)))}else{if(A.length!==0){E=O;var U=M||"message";n=new s(U,{data:A.join("\n"),lastEventId:O}),S.dispatchEvent(n),U==="message"&&y(S,"onmessage",n);if(L===d)return}A.length=0,M=""}}}k!==t.length&&(_.push(t.slice(k)),k=t.length)}H&&P===0&&(H=!1,P=setTimeout(F,80)),L!==p&&L!==h||!(e||k>1048576||C===0&&!T)?C===0&&(T=!1,C=setTimeout(R,w)):(L=c,N.abort(),C!==0&&(clearTimeout(C),C=0),x>b&&(x=b),C=setTimeout(R,x),x=x*2+1,S.readyState=h,n=new i("error"),S.dispatchEvent(n),y(S,"onerror",n))}function F(){P=0,j(!1)}function I(){j(!1)}function q(){j(!0)}function R(){C=0;if(L!==c){j(!1);return}if(navigator.onLine===!1){C=setTimeout(R,500);return}if(m&&e.document&&(e.document.readyState==="loading"||e.document.readyState==="interactive")){C=setTimeout(R,100);return}N.onload=N.onerror=q,N.mozAnon===undefined?N.onprogress=I:N.onreadystatechange=I,T=!1,C=setTimeout(R,w),k=0,L=h,A.length=0,M="",O=E,_.length=0,D=!1,N.open("GET",t+((t.indexOf("?",0)===-1?"?":"&")+"lastEventId="+encodeURIComponent(E)+"&r="+String(Math.random()+1).slice(2)),!0),N.withCredentials=o,N.responseType="text",f&&N.setRequestHeader("Accept","text/event-stream"),N.send(null)}t=String(t);var o=Boolean(a&&r&&r.withCredentials),u=g(r?r.retry:NaN,1e3),b=g(r?r.retryLimit:NaN,3e5),w=g(r?r.heartbeatTimeout:NaN,45e3),E=r&&r.lastEventId&&String(r.lastEventId)||"",S=this,x=u,T=!1,N=new l,C=0,k=0,L=c,A=[],O="",M="",_=[],D=!1,P=0,H=!1;r=null,n.call(this),this.close=B,this.url=t,this.readyState=h,this.withCredentials=o,R()}function w(){this.CONNECTING=h,this.OPEN=p,this.CLOSED=d}t.prototype={get:function(e){return this.data[e+"~"]},set:function(e,t){this.data[e+"~"]=t},"delete":function(e){delete this.data[e+"~"]}},n.prototype={dispatchEvent:function(e){var t=String(e.type),n=this.listeners,i=n.get(t);if(!i)return;var s=i.length,o=-1;while(++o<s){var u=i[o];try{u.call(this,e)}catch(a){r(a)}}},addEventListener:function(e,t){e=String(e);var n=this.listeners,r=n.get(e);r||n.set(e,r=[]);var i=r.length;while(--i>=0)if(r[i]===t)return;r.push(t)},removeEventListener:function(e,t){e=String(e);var n=this.listeners,r=n.get(e);if(!r)return;var i=r.length,s=[],o=-1;while(++o<i)r[o]!==t&&s.push(r[o]);s.length===0?n["delete"](e):n.set(e,s)}},s.prototype=i.prototype;var o=e.XMLHttpRequest,u=e.XDomainRequest,a=Boolean(o&&(new o).withCredentials!==undefined),f=a,l=a?o:u,c=-1,h=0,p=1,d=2,v=/^text\/event\-stream;?(\s*charset\=utf\-8)?$/i,m=/AppleWebKit\/5([0-2][0-9]|3[0-4])[^\d]/.test(navigator.userAgent);w.prototype=n.prototype,b.prototype=new w,w.call(b),l&&(e.EventSource=b)})(this),function(){function e(e){(new Image).src="http://xkcd.com/events/"+e}function t(){location.hash=="#verbose"&&console.log.apply(console,arguments)}try{var n="http://c0.xkcd.com/stream/comic/time?method=EventSource",r=new EventSource(n);t("connecting to event source:",n),r.addEventListener("open",function(t){e("connect_start")},!1),r.addEventListener("error",function(t){e("connect_error")},!1),r.addEventListener("loadtest",t,!1),r.addEventListener("comic/time",t,!1),r.addEventListener("comic/time",function(e){var n=JSON.parse(e.data),r=document.getElementById("comic").getElementsByTagName("img")[0],i=Math.round(Math.random()*n.spread);t("waiting",i,"seconds before displaying comic",n.image),setTimeout(function(){r.src="http://imgs.xkcd.com/comics/time/"+n.image},i*1e3)},!1)}catch(i){e("js_error")}}();

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:07 am UTC
by Synthetica
At the end of the JS it says /comics/time/something, could anyone take a look at it?
It's just that I don't know JS enough to figure out what exactly it does

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:07 am UTC
by shashwat986
I refreshed the page after clearing the cache. It's gone back to image 1. Has that happened to someone else?

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:08 am UTC
by MauranKilom
Indeed quite astonishing so many missed the javascript (i now see somebody posted it above).
Just ignore the random stuff at the beginning, start at the end: It waits for an event (which probably comes from Randall), then JSONs a new hash and changes the shown image.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:08 am UTC
by LuthorAstarael
Ok, well they are now definitely moving of their own accord. The page must be auto refreshing somehow because they have moved a few times for me in the last half hour or so without me refreshing the page myself.

Or is it starting to drive me insane to the extent that I am seeing things?!

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:09 am UTC
by TemporaryLife
shashwat986 wrote:I refreshed the page after clearing the cache. It's gone back to image 1. Has that happened to someone else?


Me too. I wonder if it's done? It feels a little too simple for it to be done now.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:10 am UTC
by phlip
I haven't pulled it all apart, but I recognise a couple of the pieces... it's a way for the JS to connect to the server and wait for the server to tell it when there's a new panel up, so it can automatically load it up. So you can just leave the comic page open and it'll automatically load the new panel, rather than having to refresh it constantly. The bit that tells you what the next panel is is still serverside, so that doesn't help us find the new panels faster... it just hopefully reduces the server load somewhat.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:11 am UTC
by hanoc
Guys first post here. I couldn't just lurk this out.
The meta-narrative in this piece is so great.
And by piece I'm including all of you fans. I mean, all of us.
There are so many levels that are only possible by XKCD having a so particular fandom.
I could layer level of fascination uppon level on fascination but I will only say that Munroe said "time, you have to wait for it" and all of us are instantly trying to beat time.

It's so nice. :'-)

Going back to lurking mode. It's only a matter of time for everything to unfold.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:12 am UTC
by Synthetica
phlip wrote:I haven't pulled it all apart, but I recognise a couple of the pieces... it's a way for the JS to connect to the server and wait for the server to tell it when there's a new panel up, so it can automatically load it up. So you can just leave the comic page open and it'll automatically load the new panel, rather than having to refresh it constantly. The bit that tells you what the next panel is is still serverside, so that doesn't help us find the new panels faster... it just hopefully reduces the server load somewhat.

At a random interval?

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:13 am UTC
by Degeim
The image data the JS fetches is formatted like this:
id: 49348c7c-9528-11e2-8001-1c6f659cb250
event: comic/time
data: {"spread":5,"image":"49b69c39cdd429cdf367e215a878f536dc566862ae00b91814adfbd264753d89.png"}

Perhaps the hash is somehow based on the id? Anyway, I think we can just give it up right now -- I suspect Randall didn't want us to break this, and the easiest way to do that would be to simply not let the hash be systematic.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:14 am UTC
by murrow
Yeah, I think having the usual traffic multiplied by our eagerness may have melted his server a bit. JS a late addition to prevent unnecessary loads?

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:14 am UTC
by cdxf6465
And how long has this text been on the front page:

Code: Select all

BTC 14FHqYSgAi39CEJksUJJsK8JzJzyqFpLVk


Looks to me like Randall is setting something up for this year's April 1.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:14 am UTC
by hanoc
Guys first post here. I couldn't just lurk this out.
The meta-narrative in this piece is so great.
And by piece I'm including all of you fans. I mean, all of us.
There are so many levels that are only possible by XKCD having a so particular fandom.
I could layer level of fascination uppon level on fascination but I will only say that Munroe said "time, you have to wait for it" and all of us are instantly trying to beat time.

It's so nice. :'-)

Going back to lurking mode. It's only a matter of time for everything to unfold.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:15 am UTC
by shashwat986
I while back I had written this AutoIt script to take screenshots of a given window every few seconds and keep checking if something changes. Time to run it, then...

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:17 am UTC
by shashwat986
cdxf6465 wrote:And how long has this text been on the front page:

Code: Select all

BTC 14FHqYSgAi39CEJksUJJsK8JzJzyqFpLVk


Looks to me like Randall is setting something up for this year's April 1.


That's apparently Randall's BitCoin address.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:18 am UTC
by murrow
Oh, and 9a047f93c3da13dea6f46816cb32a7e45d4a8318205cdd9233102f42efe3ada9

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:20 am UTC
by muzzle
This has prompted me to listen to Pink Floyd's The Dark Side of the Moon again. Thanks Randal!

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:20 am UTC
by dominikh
The JavaScript really isn't exciting, neither is the data the event stream is sending us.

The ID is just a UUID used for the SSE (Server-Sent Event) protocol, so not related to the image file name. The JavaScript isn't obfuscated but just minified. Most of the JS is boiler plate/library support. In essence, it's allowing the server to send new image paths to the browser. The "spread" in the message gets multiplied by a random value between 0..1 and interpreted in seconds: The browser will wait that long before loading the image. Probably to avoid spamming the server with all requests at once.

The file names still get determined on the server, as well as the interval at which new images get displayed.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:20 am UTC
by TemporaryLife
cdxf6465 wrote:And how long has this text been on the front page:

Code: Select all

BTC 14FHqYSgAi39CEJksUJJsK8JzJzyqFpLVk


Looks to me like Randall is setting something up for this year's April 1.


I'm glad I'm not the only one who noticed that. I thought I just didn't remember, because the text is so damn small. The full thing:

Code: Select all

BTC 14FHqYSgAi39CEJksUJJsK8JzJzyqFpLVk

We did not invent the algorithm. The algorithm consistently finds Jesus. The algorithm killed Jeeves.
The algorithm is banned in China. The algorithm is from Jersey. The algorithm constantly finds Jesus.
This is not the algorithm. This is close.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:23 am UTC
by Zecrag
interesting bit of code:

It is waiting for the comic/time function to show a new image, that bit is clear... But I don't understand that use of the random element function... Anyone can clear that up? I mean, they're just waiting for us to crack the code!

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:32 am UTC
by murrow
It changed, subtly.
109fc96e2c07e50da5c4d0ec77b0722241aa32c494791e7627c52e8f9f773329

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:32 am UTC
by taoistpage
0530: 109fc96e2c07e50da5c4d0ec77b0722241aa32c494791e7627c52e8f9f773329

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:33 am UTC
by phlip
Zecrag wrote:interesting bit of code:

It is waiting for the comic/time function to show a new image, that bit is clear... But I don't understand that use of the random element function... Anyone can clear that up? I mean, they're just waiting for us to crack the code!

It's just a random delay between there being a new image, and it loading the new image... so that it doesn't result in everyone trying to load it at the same time.

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:33 am UTC
by Beidah
Her hair is thinner, I guess. Are they growing old?

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:41 am UTC
by JordanTheProgrammer
id: 4e54f0bc-952c-11e2-8001-1c6f659cb250
event: comic/time
data: {"spread":5,"image":"9a047f93c3da13dea6f46816cb32a7e45d4a8318205cdd9233102f42efe3ada9.png"}

Re: 1190: "Time"

Posted: Mon Mar 25, 2013 9:43 am UTC
by murrow
I was hoping to learn some c tonight, not bang my head against hashcat for 3 hours.