« first day (970 days earlier)      last day (3972 days later) » 

2:00 PM
ok so you can see
the other is null, undefined and the one is undefined, null
 
What's x y and z?
 
and he wants both to be null, undefined
 
primitives need to preserve order?
 
that cannot be solved with stable sort
they are preserving order
but he doesn't want exactly that
 
The whole concept of sorting a list of things that are not the same type is stupid.
 
2:01 PM
yeah no shit :D
 
You need to define an ordering, if you're not defining an ordering you're doing it wrong.
 
for some reason in firefox the stable sort is always a bit faster
in firefox it feature detects that the native sort is stable and just proxies that
so how can the proxy be faster than just direct call :D
 
Here native is a bit faster jsperf.com/sadoaksdoakdoakosdsako1203/2
My guess is that native performs checks that you don't
 
no, it's a proxy in firefox:
if( builtInSortIsStable ) {
    return function( array, cmp ) {
        return array.sort( cmp );
    };
}
 
How does OP decide which of two objects is bigger?
 
2:07 PM
@BenjaminGruenbaum whats OP?
 
@BenjaminGruenbaum it's basically like this:
function comparer( a, b ) {
    if( a == null ) {
        return 1;
    }
    if( b == null ) {
        return -1;
    }

    var aIsObj = typeof a === "object",
        bIsObj =  typeof b === "object";
    if( aIsObj &&
        bIsObj ) {
        return a === b ? 0 : 1;
    }
    if( aIsObj ) {
        return 1;
    }
    if( bIsObj ) {
        return -1;
    }

    return a>b?1:a<b?-1:0;
}
 
@Connor a faggot XD
 
lol
 
@Esailija :D
 
@BenjaminGruenbaum really lol
 
2:08 PM
@Esailija So given two objects you arbitrarily return for which one is bigger?
 
elegent coding as always :D
 
apparently yes
 
Sorting elements of different types makes no sense in your context. Why would you have an array with "2",1, Object and "undefined" in the first place? Don't abuse the dynamic nature of the language. The fact you get polymorphism for free does not mean that logically array elements should not represent the same type. — Benjamin Gruenbaum 5 secs ago
 
upvoted
 
That just seems like a really dumb question to me -_-
 
2:10 PM
@KurtSpindler 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.
 
Sorting 10K elements arbitrarily quickly
 
hey, quick question: is there a separate word for the 'iteration count' of how long an algorithm takes, as opposed to 'runtime' (which right now i'm thinking of as clock-time). obviously related to the big-o of the two algorithms, but i don't think that's the word i'm looking for
 
also the myth that "it's builtin, it's going to be faster" is so bullshit in v8
 
Step 1, make a map of all objects
Step 2, make an array of the rest
Step 3, sort the rest
Step 4, put the objects back in
Step 5, ???
Step 6, Kill yourself for horrible language abuse
@Esailija asm.js is faster than Java XD
 
@BenjaminGruenbaum I mean doing something in user js vs calling a builtin function that does the same
 
2:12 PM
@KurtSpindler Runtime complexity of the loop?
@Esailija builtins are still probably faster in most cases
 
@Ben Hmm yeah that's
 
I can see why sort is not one of those cases given the optimization, but still
 
@BenjaminGruenbaum yeah that sounds about right, thank you.
 
first of all, only a few builtins can be inlined
secondly, they almost always have to comply to some arcane and ridiculously convoluted algorithm as specified in es5
 
i just want to alert when username is blurred
 
2:14 PM
@udaysagar Format your code! (control+k)
 
why is this behaving wierdly?
 
and thirdly, userland js is not js but can be compiled into optimized assembly
 
ok @BenjaminGruenbaum I have already done that
i done ctrl+k and then submitted
 
Ah, sorry then. Put your code in a $(document).ready( clause
 
Have you seen your code?
something.click()
{
   stuff
}
 
2:16 PM
Oh, didn't even get that far
 
Please pick up a javascript 101
 
btw this is hilarious
// ES5 section 15.2.3.5.
function ObjectCreate(proto, properties) {
  if (!IS_SPEC_OBJECT(proto) && proto !== null) {
    throw MakeTypeError("proto_object_or_null", [proto]);
  }
  var obj = { __proto__: proto };
  if (!IS_UNDEFINED(properties)) ObjectDefineProperties(obj, properties);
  return obj;
}
 
ha
 
it's a one-liner!
 
did anyone get my question?
 
2:19 PM
Yes. And that's what I talked about, 4 messages ago.
 
motion detection
 
This is impossible because your compare function doesn't mostly compare anything so the order is dependent on the way items are laid out in the array initially. You have to define a way to compare everything so that the result will not be dependent on the initial order of the array (except when using unstable sort algorithms but that can be made not the case). — Esailija 11 secs ago
@BenjaminGruenbaum do you have same intuition?
 
I have used $(document).ready(function(){} clause
 
it feels like it would be impossible
 
@yardarrat 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.
 
2:23 PM
then too, its not behaving properly
 
14 mins ago, by Benjamin Gruenbaum
@Esailija So given two objects you arbitrarily return for which one is bigger?
Sounds stable :P
You get an upvote
What he asks for requires an ordering, sorting in general requires a full ordering on the elements sorted
 
@Darkyen check it out: jsfiddle.net/rlemon/jWQZP/2
 
yes, there needs to be 3 results defined for every X and Y comparison
 
is a good way of doing it?
 
Maybe if he just wanted a topological sort, but an actual stable array sorting doesn't sound likely
 
2:24 PM
which is like 13051390 combinations given how many different types he has
 
He needs to define equality and compareTo
 
@Zirak i still get alert irrespective of events......
 
If he does that, there is no problem with giving him a stable sort
 
@udaysagar Because your code makes 0 sense. Read a javascript 101. You'll see why.
 
but look how many combinations there are
compare(undefined, string);
compare(undefined, null);
compare(undefined, integer);
..................
 
2:26 PM
It's up to him to define how to compare them all
 
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#username").click()
{
alert('hey');
}
});
</script>
 
@Zirak to be fair, I don't think many people expect ASI
 
whatz wrong in this?
 
@udaysagar formatting === proper indentation
 
@rlemon It has nothing to do with ASI
 
2:27 PM
@Esailija The bigger issue here is that I can't find a use case for what he's trying to do at all.
 
Look at his code!
He calls .click, then opens a block
 
isn't the click();
 
Why would he even have an array with different types he can't look polymorphically at in the first place? That's the problem.
 
ohh
yea I didn't look to hard.
!!/mute udaysagar
 
@rlemon Please give mute duration, see /help mute
 
2:28 PM
@udaysagar You don't even have to really know javascript. Just look at some documentation.
 
@Zirak I don't like that
default should be forevah!
!!/mute udaysagar 9999999999999
 
That was the final consensus
 
it's stupid
 
@rlemon Muted user 2050594 for 9999999999999m
 
Also, we're not in gallery. And muting him is weird
 
2:29 PM
I know. I just wanted to pre-mute him.
> whatz
^ 'nuff said
 
Stop muting people
Muting is an extreme tool that should only be used when other things haven't worked.
 
I don't get you. How can you complain about grammar and spelling?
 
look, anyone can unmute him
jesus
 
I don't like trolls or assholes, but we should exhaust our other possibilities first.
 
"This would essentially turn the bot into an automated troll (I don't think we want that)." - Jhawin (source) No? :(
 
2:31 PM
No, I would not umute him if you mute him because of my respect for you.
 
and like Zirak mentioned, we are not in gallery.
and I was aware of that
 
@rlemon we were a few days ago
weren't we?
 
I don't like giving users the finger.
 
@BenjaminGruenbaum unmute my mutes all you want. Kindly ping me when you do so when I can return we can talk about it
 
My phone internet has been super spotty lately
 
2:31 PM
^ how I see it working
 
-9
Q: I am coding a site and when I open the page in IE 10, the links are dead. How can I fix this?

Ursula HockmanI am coding a HTML/CSS site and when I open the site in IE 10, the links are dead. How can I fix this?

 
Such a silly mistake! Thanks All!
 
@rlemon just bin, and ignore. Muting isn't for someone bothering you it's for someone bothering the room
 
@BenjaminGruenbaum yes I know this.
point - we are not in gallery
it's like /ban hammer
 
2:32 PM
/ban for like 5 minutes just to say "listen, stop posting the same shit"
 
damn you delete!
 
deleted by Community? Since when Community deletes new questions?
 
Heh, I've seen some pretty funny HTML/CSS questions today. I take it that's a regular occurrence,
 
jsfiddle.net/rlemon/jWQZP/2 I get a lot of artifacts all around where there is motion. Anyone with a better quality webcam wanna try this out?
 
@JanDvorak It's probably a same-IP offender or something. Wonder if there's a meta question about it.
 
2:35 PM
Questions regarding html/css/js/jquery are awful more often than they are good
 
@BenjaminGruenbaum afaik they don't IP ban.
 
Yeah it does seem that people approach what they're trying to achieve in the weirdest and the most over-complicated way possible.
 
They do.
 
at least, I remember reading on meta.
 
IP bans aren't usually a good solution, but they will IP ban if they need to.
 
2:37 PM
@rlemon awesome
 
@KendallFrey yes I guess it was a "we try very hard not to" not a "we don't"
 
very playful :D
 
@rlemon That's pretty sweet.
 
2
Q: When does the community user delete a question?

BergiI just noticed that Community ♦ deleted this question, probably the same time the asker deleted his account (I can see a User was removed for the same timestamp in my rep log). I've seen why does community user delete answers on close of question?, but I don't understand why it happened in this c...

 
@RyanKinal thanks. I'm going to try to do some nice interactive canvas stuff.
 
2:40 PM
cool
 
basically, the poster was nuked
 
@rlemon I've sent myself the link. Might play with it later.
 
it was pretty simple actually. I thought it would have been much more difficult.
 
I'm not going to say "expect a dance video", but... maybe expect a dance video.
 
lol
yea... I never thought of just processing like a youtube stream...
only webcam :P
 
2:43 PM
Oh, I was going to see about screencasting your fiddle with me dancing.
Put some music on top. Might be cool.
 
How to check whether a variable is present in an object?
The object can have nested objects too
 
@Mr_Green example input/output
 
I might have to work out a routine to something first, though.
 
@Mr_Green in operator, hasOwnProperty method, === undefined.... make your choice
 
is this chat run on node?
 
2:45 PM
@Connor I don't think so
 
@Mr_Green as for the "anywhere" part, this might be tricky if your objects have circular structure, and merely a recursive search if they don't.
 
But I could be wrong
 
@Connor There's a new site called google which knows the answer
 
@Zirak really? whats the link?
 
I can't understand "input/output"?
 
2:46 PM
!!what is google
 
@Connor That didn't make much sense. Use the help command to learn more.
 
ok thanks I will go with hasOwnProperty
 
@Mr_Green note they all have slightly different semantics
 
@Connor google (intransitive, cricket) To deliver googlies.
 
ok I will check MDN
 
2:48 PM
Mobile chrome should support audio/video apis
 
@Zirak you should fetch the results from all categories
 
curl can also tell you the answer
 
@BenjaminGruenbaum I can't understand "input/output"?
 
@JanDvorak It fetches the first definition. You are welcome to click the link.
 
What's the proper balance between "it works, don't touch it" and making sure everything is up to date (patches etc)?
 
2:53 PM
@Shmiddty depends on time allocation
and expected project size growth
 
@Shmiddty it's "it works, don't touch it"
 
Well, not enough time to do a full investigation into the side effects, apparently.
 
@BenjaminGruenbaum XP still work. Not worthy of an upgrate, then?
@Shmiddty then don't touch anything you can't easily rollback
 
@JanDvorak Upgrading an OS means a new product
 
@DeniMf 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.
 
2:54 PM
Are are you suggesting Microsoft start doing architecture changes in XP now?
You don't re-factor code that's in production unless you have a good reason. You have to apply security patches and bug fixes, but you don't make substantial changes for the joy of re-factoring.
It's simply not economic in production
Also related:
Very good response to a horrible post by uncle bob imho
 
@jan not in my power to stop them
 
@Shmiddty you asked for a decision, didn't you?
g2g, sry
 
Nah just on my soapbox
 
In particular, that:
> Never underestimate the value of working software.
 
Frustrated that I spent most of yesterday solving a problem that never should have happened
 
2:59 PM
What problem?
@Shmiddty
 
There's a process that imports data from a third party from flat files. It will only do this if the file path/name isn't in a particular table. The problem was that the uri was fully qualified instead of relative. So when they migrated that server to a new domain, the process thought every file from the past however long was new and needed to be imported
 
-_-
Sounds bad :/
 
Hello everybody hope you doing well! Please i need help over here. i have this link lasiestajersey.com and there's a song which auto play and wrapped with html5 audio tag. my question is how can i keep the song continue playing even after navigate to another page. thank you ?
 
@Mahmoud You can't
 
Everything about this app is pretty bad, but this never would have happened if they would have done a full investigation
 
3:04 PM
@Mahmoud load the other pages with AJAX instead of navigating
 
damn, can't figure out how to play youtube videos on the Video tag
 
6 mins ago, by Benjamin Gruenbaum
> Never underestimate the value of working software.
How big is the app?
 
i know that ajax can help. but actually am the client won't do it in ajax :(
 
@Mahmoud FORMAT YOUR CODE (control+k)
 
1 message moved to Trash can
 
3:06 PM
@Mahmoud I's impossible to keep it playing. It'll have to perform a page refresh anyway.
 
@BenjaminGruenbaum it is formatted :/ it's not indented first.
 
@Mahmoud Format your code - hit Ctrl+K before sending and see the faq
 
@rlemon ah
 
there we go-ish.
 
wow
 
3:07 PM
@Mahmoud that still won't help you
 
do i do it right?
:(
 
1 message moved to Trash can
function setCookie(c_name, value, exdays) {
	var exdate = new Date();
	exdate.setDate(exdate.getDate() + exdays);
	var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
	document.cookie = c_name + "=" + c_value;
}

function getCookie(c_name) {
	var c_value = document.cookie;
	var c_start = c_value.indexOf(" " + c_name + "=");
	if (c_start == -1) {
		c_start = c_value.indexOf(c_name + "=");
	}
	if (c_start == -1) {
		c_value = null;
	} else {
		c_start = c_value.indexOf("=", c_start) + 1;
^ @Mahmoud's code
 
@Mahmoud when you navigate to another page (not using AJAX and the history API), the page itself reloads, stopping the music and so on.
 
Tons of logic in stored procedures, a thin server data access layer, ssis packages, automated processes, thousands upon thousands of lines of JavaScript
 
@Mahmoud P.S , websites that play audio without me asking are a horrible user experience. What if I already have stuff playing?
 
3:08 PM
@BenjaminGruenbaum Y U NO EXPECT AUDIO FROM ALL SITES POST WEB2.0 PUSH!? - also, I agree.
 
Signal dropping soon bbl
 
@ben
@benjamin i really understand what you saying. but the client won't listen!
 
any way thanks a lot for reply and have a nice time. Cheers
 
@Mahmoud what does the client have against AJAX?
 
3:10 PM
sounds like it's yelling.
why not ajax?
slow interwebz + 25meg upload === horrible wait.
72 KiB/s
 
the website built in wordpress and the them is badly structured so the do it in Ajax we have to re-build a minor functions and its takes time. and he's not able to pay for this time
 
My internet is slow :(
@Mahmoud So tell him he can't afford it
 
ohh god
my work ISP is horrible.
 
I'm upgrading to 100Mb/s download and to 10Mb/s upload when I'm able
 
I should probably run the test after the upload ;)
 
3:12 PM
once again, thanks. i guess i'll call a Batman to talk to him :)
cheers
 
my home ISP I get ~75 down, ~5 up
@Mahmoud he is batman
 
:)
 
seriously.
 
@BenjaminGruenbaum lmao
 
^ o_O
this is what I get to work with.
 
3:15 PM
Ew
 
What would you need more speed for?
 
May 17 at 9:32, by Zirak
I win at losing
 
@Zirak :( Y U HAVE SUCH SLOW INTERNETS?
@eazimmerman That's decent :)
 
where to get the image from when you have done the test?
 
3:18 PM
@Connor "share this result" > "copy"
 
@copy Plenty of things, streaming faster while downloading, uploading and downloading code faster from/to work. Being able to work faster on online documents. That sort of stuff.
 
mines rubbish
most of it could be depending on how far the server is away?
 
@Zirak nice ping.
 
@mkontakis 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.
 
lol
 
3:21 PM
@FlorianMargaine Was a fluke. Tried again a few times, ranged between 20-30ms
 
really? can you show me?
 
@zirak nazgul, eh?
@kendall that's what I have at home, but lower ping
 
At home we have 5/2
 
I couldn't use 5/2
 
3:29 PM
Hey guys
how do i get a user's tweets with Jquery? I had done it successfully, but twitter is retiring their API. Is there a new way?
 
How do I user firebase with searching nearby object?
use*
 
hey all! so any one up for a discussion related to xpath?
 
@EliteGamer use API v1.1
 
play with sensitivity / currentTime
 
@eazimmerman thanks. Do you know where there documentation is?
oh, thanks ha ha
 
(sorry, I'll be down for a bit. Zirak needs to clean some hardware and fiddle with stuff)
 
@CapricaSix 'fiddle' heh
 
so anyone has any idea about how chrome gives the xpath of a node.. in a simplified way? i mean, say an element has an id, chrome's "copy xpath" gives element[id='whatever'] instead of the who thing.
ok i'll head over to php and see if guys over there know some stuff about this :|
 
@eazimmerman that is also outdated?
 
3:36 PM
1.1?
 
their example request returns bad
yea
 
hmm. hold on
 
@rlemon thats awesome
 
I'm in the midst of breaking it
 
3:40 PM
the song dude
is that supposed to anything else :?
 
obvy
 
okay then u broke it :D
there is a girl who did a demo with webgl and motion detection
 
dude, let me handle Canvas before I jump into WebGL
 
why do php developers say the stupidest shit
"invalid user input is not exceptional"
"why do you need an object model, just use database rows directly"
ok just 2 examples but those were just recently
 
@rlemon dude... adding alpha channel :? to your dots ?
btw still looks awesome :D
 
3:48 PM
@rlemon Fair Play (insane)
 
@eazimmerman i am not authinticated, so...i am nnot really sure.
 
hey @rlemon have you any idea about how chrome's right click > copy xpath gets us a neat xpath instead of lengthy one? by neat i mean this: say a div has id, it give /*div[id='whatever'] instead of a length xpath
 
@EliteGamer that must be the problem
 
how do i get authinticated?
 
@Prasanth once you answer me why you pinged me out of the crowd, I will answer your question.
 
3:51 PM
Can I see a list of users with access to a Gallery room? (I'm an owner)
 
info -> Access tab
@KendallFrey
 
Where on there?
There's only one user, me, in the owner list
 
@eazimmerman what about this?
 
hey so i used to hangout in js room several months back and i remember you from then.. that's all :|
also hey @Esailija
 
also, do i need to use PHP?
 
Hi everybody, can someone help me here? stackoverflow.com/questions/17069391/…
 
@EliteGamer yes
 
3:56 PM
wow, they really mad things hard lol
 
@EliteGamer you can do it with JS, but I believe its super painful.
@EliteGamer Yeah they have. Basically they want you to use the official widgets.
 
well, i used the jquery tweet plugin
it was soooo easy
 
@EliteGamer yep me too, its been a hell of a day.
 
i bet
 

« first day (970 days earlier)      last day (3972 days later) »