« first day (907 days earlier)      last day (4036 days later) » 

11:00 PM
primes
 
Damn, ninja'd
That's brilliant
 
my brain is over the walls right now
 
Is that some kiwi phrase?
 
Hahaha
 
user2157210
yay itws 0:00
 
11:01 PM
!!/urban over the wals
 
user2157210
i can start using steam
 
It's 4:31 AM
 
@SomeKittens Y U NO MAEK SENSE!!!???!!?11 No results for over the wals
 
user2157210
i have to wait to 0:00 am
 
@SomeKittens, as in, my mind exploded.
 
user2157210
11:01 PM
so i do not get limited
 
!!/urban "over the walls"
 
@Shmiddty so flat the walls are jealous When a girl is so flat she makes even the walls jealous. The point when a girl cant get any flatter than she was when she was 3.
 
user2157210
in speed when i download over 5gigs
 
@copy My mind is still blown
 
:-P
 
11:07 PM
Seriously. What the fuck?
You should write an explanation on how it works
Because I mainly just ran it and tried to figure it out
@copy!
 
If you run it without the eval, you get a giant wall of text
multiple ternary expressions
 
!!> var s; ((s=Array(719)).join("s[j=++n]?j:"+s.join("s[j+=n]=")+"r+=n+' ';")).split(";")[0]
 
@copy "ReferenceError: s is not defined"
 
Yeah, the eval is clearly important
 
@copy "Exception: too many items"
 
11:11 PM
heh
 
@Shmiddty without looking at anyone elses answer: 107 bytes.
var i=prompt(),a=["r","p","s"][3*Math.random()|0],b={b:"s",a:"r",c:"p"};alert(i+a+(i==b[a]?2:b[i]==a?1:3));
 
@rlemon Strings are better than arrays
 
output is you cpu 1(win) 2(lose) 3(tie)
 
@AmaanCheval It generates code like this: s[j=++n]?j:s[j+=n]=s[j+=n]=s[j+=n].......=r+=n+' '
For every n from 2 to 719
Only if the n isn't in s
 
idk how you guys do it, but I tried to write that golfed already. :/
makes it more interesting :P
 
11:13 PM
@rlemon Also, look at you being cute with vars and semicolons
 
@copy You're sick ...
 
@OctavianDamiean thanks, I guess
 
nah, pretty sure dude's one of them genuine geniuses
 
@AmaanCheval it fills s with every multiple of n
Generating a prime sieve
 
@copy you make me want to be @BadgerGirl....
6
she is so lucky.
 
11:17 PM
Insane
 
So long polling is just putting ajax in an interval? IS that correct?
 
@XCritics Pretty much
 
Is that bad at all?
 
@rlemon I know. <3
 
@XCritics sort of. It is putting out a request and being ok if it takes a while for a response.
 
11:18 PM
But it is really the only way other than websockets?
 
@XCritics There's also normal polling. where the server responds immediately
with long polling, the server doesn't respond to the request until something happens.
which means more server overhead, generally.
 
@Shmiddty I basically just want to set a notification for logged in administrators that when a report is sent to the database, they get a notification of an unread report, so other than web sockets, should I do normal polling or long polling
 
@XCritics How important is it that they get the notification instantly?
 
If I was code, I'd let @copy fork me all night.
7
 
Not really, kinda like reddit, it doesn't have to be instantaneous, but you know, 5 minutes, 10 minutes?
 
11:21 PM
@XCritics Just do normal polling. You can make a call every x minutes, or when the page is refreshed.
 
we scared him away...
 
so just setTimeout(function() $.ajax({});), 50000)?
 
@XCritics pretty much
 
K thanks ^^
timeout or interval, probably interval
 
but I'd do it more like this
 
11:23 PM
@XCritics there is a bit more than that.
 
(function poll(){
    $.ajax...
    setTimeout(poll,1000*60*5);
})();
 
techoctave.com/c7/posts/… I was just reading from here, I don't know how accurate it is
 
275
A: Simple "Long Polling" example code?

dbrIt's simpler than I initially thought.. Basically you have a page that does nothing, until the data you want to send is available (say, a new message arrives). Here is a really basic example, which sends a simple string after 2-10 seconds. 1 in 3 chance of returning an error 404 (to show error h...

 
Why wrap it @Shmiddty instead of just calling setTimeout?
 
That let's you poll on initial page load, and then every 5 minutes afterwards.
 
11:24 PM
oh ok
 
@Menelaos Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
good stuff
 
@Shmiddty 50 seconds *
 
So ajax has its own interval function? So does it matter which way I use it?
 
there you go
$.ajax is a jQuery thing which abstracts XMLHttpRequest object.
 
11:26 PM
Yeah I know that part, but I've never seen the Timeout property
 
@rlemon No, back to productive things
 
no time for the fandom eh?
such a humble guy
 
He let his fame go to his head. Already!
 
We <3 @copy
 
wat
 
11:26 PM
He just wants to be the guy.. And we have to let him..
 
He's mine. Go away.
7
 
4 messages moved to creepy bin
 
Yeah! I out creepied @BadgerGirl B-)
 
Does expecting the unexpected make the unexpected expected?
 
11:40 PM
@rlemon That doesn't actually work.
 
does for me
 
the b object doesn't have r/p/s properties
 
run it
 
so your ternary always returns 3
 
it works
damn closure compiler :/
 
11:42 PM
rr3 is invalid output :P
 
var i=prompt(),c=["r","p","s"][3*Math.random()|0],w={r:"s",p:"r",s:"p"};alert(i+c+(i==w[c]?2:w[i]==c?1:3));
 
that gave me rp2, which is also wrong?
And then rr3 again
 
rr3 is right
3 is tie
 
oh ok
 
11:44 PM
i had the 1 and 2 reversed
 
Ok, it looks good now
golfed: i=prompt(),c="rps"[new Date%3],w={r:"s",p:"r",s:"p"};alert(c+(i==w[c]?2:w[i]==c?1:3))
 
Can anybody recommend a module for sending emails with node?
 
ooo can I use that?
 
go for it
 
new Date%3 .. nice
 
11:48 PM
@Shmiddty is that even JS?
 
It's a trick I learned from anarchy golf
 
I wish I knew what the hell I Was looking at
 
It's rock paper scissors, obviously :P
I removed "user choice" from the output
since it wasn't required
@XCritics My answer makes less sense:
o='LDW'[2*((a=prompt())+(b='prs'[new Date%3])!='ps'&a<b|a+b=='sp')+ +(a==b)];alert(b+o)
 
yeah im going back to do what i was doing lol
 
@XCritics nodemailer
 
11:53 PM
@SomeKittens thanksd
 
fuck you zepto.
 
> This method doesn't have an option for copying data and event handlers over to the new elements, as it has in jQuery.
 
    exports.poll = function(req, res, cookie) {
      var db = require('mongojs').connect('host/db', ['assessments']);

      db.assessments.find({'markedAsRead':'0'}, function(err, foundAssessments) {
        if (err) {
          console.log('We have an error: ' + err);
        } else if (foundAssessments.length === 0) {
          console.log('We have not found any assessments waiting to be read.');
          res.json({'success':foundAssessments.length});
        } else {
          console.log('We found Assessments waiting to be read.');
Sound good :D?
 
Looks fine to me
but I have to run
 
11:56 PM
Alright have fun
 

« first day (907 days earlier)      last day (4036 days later) »