« first day (1562 days earlier)      last day (3369 days later) » 

9:00 PM
@BadgerCat as the grandma?
 
is that really bartek?
 
Close enough
 
oh XD
 
crl
Can someone golf some code to check if a sentence contains all letters in alphabet, maybe a regex can do that
 
9:10 PM
@crl you can!
 
crl
I'm trying ;)
 
for(i in x=prompt(y=0))y|=1<<x.charCodeAt(i);alert(y<<5==-64)
Needs some more checks, but you get the point
for(i in x=prompt(y=1))y|=1<<x.charCodeAt(i);alert(y<<5==-32)
prompt().split("").sort().reduce(/* remove duplicates and non characters */).length==26 could also work
 
arr.filter((el, index) => arr.indexOf(el) === index) is pretty freaking sweet
 
O(n^2)
 
9:25 PM
Hm, so weird why this JavaScript isn't working.
 
@BenjaminGruenbaum Sorry, I meant to submit something to the challenge, but now I won't actually finish it by the end of January :(
 
@Zirak Which challenge?
 
@copy what is the shortest way to sort in js ?
 
.sort()
 
9:28 PM
That's cool.
 
the other way :-/
 
.sort().reverse()
 
Can someone clarify or explain something to me?
 
@Greg We can sure try.
 
@SecondRikudo yes
 
9:30 PM
.sort((a, b) => b - a)
 
Haha
^ that is why we want es6 :P ?
 
@darkyen00 It's just sugar
.sort(function(a, b) { return b - a }); works just the same.
 
I know but pita to write
especially after knowing (x,y) => y - x
 
@darkyen00 The main advantage of => is not the small shorthands
It's the fact that this comes already bound
 
I know ^ (I have been using => for a while now)
 
9:31 PM
Okay, so if you do:

var agent = '/Android/i';

Then do, if(window.navigator.userAgent.match(agent)) { return true; }  It will fail, be false.  But if you manually type match(/Android/i);
 
@Greg That's because regex literals are not strings.
 
Obviously I simplified the implementation for explanation.
 
var agent = /Android/i;
No quotes.
 
@SecondRikudo That is what I thought
But does JavaScript not parse or handle literal conversion?
 
@Greg Not from strings to regex objects, no.
 
9:34 PM
new RegExp(string, flags)
 
It's either /pattern/flags or new RegExp('pattern', 'flags')
 
string minus the // ofc
 
Okay, that explains that.
 
That second form is good if you have a dynamic pattern being computed elsewhere and isn't constant
 
crl
!!> "How razorback-jumping frogs can level six piqued gymnasts!".toLowerCase().split('').sort().reduce(function(a, b){return a.indexOf(b)==-1 && b.match(/[a-z]/)?a.concat(b):a}, []).length
 
9:45 PM
@crl 26
 
Thank you for the clarification.
 
Browser detection is so 2000
 
@sazzy4o 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.
 
@sazzy4o too bad the resources don't get index'd
 
@sazzy4o It's not proper etiquette to post something in every room you can find, which is why you were flagbanned.
 
9:54 PM
dude..
i flagged for mod with that pic
 
It's not quite spam though
 
sure it is
he's spamming it acrossed the network
 
Er, not spam as in he's not gaining anything fiscally from the link.
Spam as in shotgunning a link, absolutely.
 
> This user has been automatically suspended for posting inappropriate content and cannot chat for 3 hours 55 minutes.
that might be the longest organic ban I've ever seen
 
10:03 PM
yeah I have that bookmarked
pretty cool little bit of code
 
@BenjaminGruenbaum with (DATA) return eval(value.substring(1)); heh
 
RESTfully speaking, what sort of call is validation?
GET, because it's idempotent?
specifically address validation in this case
 
crl
10:18 PM
!!mdn with
 
good question
dunno how to represent validation in a RESTful way...
 
As in, ask if something is valid and get back the result?
 
Right
 
Sounds like GET, but I don't know for sure
 
10:23 PM
sounds like a question worth asking on programmers.SE
 
@FlorianMargaine feel free to do that, I don't participate there anymore.
 
@SomeKittens validation is not RESTful to begin with
The idea of REST is to have resources you access and manipulate via a URI and a verb
Validation is not a resource, it has no URI, and you can't really manipulate one.
So requesting for validation doesn't really make sense in the context of REST
However, from an HTTP perspective, a GET request would be most semantic, since, as you said, it's idempotent.
 
works for me
 
@copy cool film
 
userscript people, how do I force head execution of a script?
 
10:36 PM
@towc Why are you watching movies when you could be coding?!?
 
I'm getting sick of a site not fixing their JS (they didn't include a lib) and wanna fix it so I can proceed
 
@rlemon more context? what's broken?
 
They didn't include a lib.. I just said that.
 
@towc Did you see Bartok?
 
Oh, sorry @require directive to a CDN is what I do
 
10:39 PM
@copy yeah, kinda looked like him
is he like that IRL? XD
 
I hope not
 
@jdphenix and will that execute prior to my code, or their code
 
@rlemon What do you mean?
 
@SecondRikudo they have a bunch of jQuery/$ calls that fail on load and further on because no jQuery inclode
 
You want to execute code before their code loads?
 
10:40 PM
so just including it after the page loads doesn't fix anything
 
@argentum47 don't remember either :(
 
I've put in a ticket, just don't feel like waiting
 
@towc I hope he is
 
hi people
 
10:41 PM
there has to be someone like that somewhere
 
Hey does anyone know about how to delete nested data mongo
 
Well, you can clone the script nodes, remove the originals, include jQuery and append them again
 
I was getting really strange response, but i was so close
 
@AwalGarg hi person
 
It's a bit convoluted but I don't think you can control the order of execution here (and I'm not sure when a userscript operates)
 
10:42 PM
@SecondRikudo yea, I was really hoping for a simple userscript or other kinda chrome dev tool trick to just include jQuery before their page is parsed
 
Maybe if you inline jQuery into the userscript it would load before other scripts get pulled?
Worth a shot
 
@rlemon tampermonkey allows to change position of inserted script
 
but if it is any more than that, I told them what was wrong. if it takes more than a weekday to fix. jesus.
 
JP's face not used as a common meme?
 
10:42 PM
I've never had need to do what you're doing but that may do it
 
@towc wait, your avatar... is that real? you are a human?? :O
 
@AwalGarg nah, it's my 3D simulated human
 
@jdphenix That looks like it, actually.
@rlemon ^
 
I miss your pixel avatar! It looked so much real.
 
Alright
 
10:44 PM
@SecondRikudo i'll check it out
thanks @jdphenix
 
!!afk Bedtime. Don't lose the game!!
 
@AwalGarg yeah, decided to go a few steps back in the simulation: this is a non perfect version of the end result, but reminds me of the good old times when it just started
 
:D
 
dang, I just gave out the result of the simulation...
the pixel thing was definitely the real me
 
@argentum47 anyways that room froze (or so I think), so I can't remember what exactly was that about :P and I have been at some academic class banging my head with some drama that they call education.
 
10:47 PM
Man, I remember when classes were a Big Deal
 
You know, here, they are the only deal, big or small.
 
class IDontKnowHowToSayThis extends KindaOfABigDeal {}
 
oh also, @SomeGuy @argentum47 @darkyen00 guys, those absolute idiots... I heard they are blocking all tech sites in India including github? (I seem to have access to github, but not pastebin)... how exactly is the reason ('terrorism promotion on those sites') justified?
 
Nevermind sorry
 
11:36 PM
@SomeKittens I'm being a complete noob and can't work out how to only include ngMock when I'm running tests.
 
@AwalGarg you wud believe that there are guys who study (M.C.A)CS for 5 years and can't tell the difference between Class and Object, maybe some of them put github on the list.
 
11:51 PM
@BenjaminGruenbaum that's good to hear, I hope you got some insights there
 
@argentum47 If only I had some kind of nuclear destruction weapon....
 

« first day (1562 days earlier)      last day (3369 days later) »