« first day (971 days earlier)      last day (3977 days later) » 

7:00 PM
By 'driver' I meant my brain
 
like if i built webkit.framework for mac with v8 js and did LD_SHARED=/path/to/webkit /path/to/safari/MacOS/Safari and loaded a different webkit into safari, would it use JSC or V8
 
ah right
I get it now
 
sometimes it doesn't pipeline correctly
 
if you are only making like 10 elements no big deal
 
get the manufacturer driver @JanDvorak
 
7:01 PM
if you are making thousands of elements via jQuery... probably a big deal
 
1 min ago, by Jan Dvorak
By 'driver' I meant my brain
 
@TrevorRudolph I use the official parts only
 
@rlemon ok, thanks
 
Shmid, thats why its funny
 
just all depends on what you need. but be aware that making elements via jQuery is pretty slow. not to mention there is like 18 ways to do it and they all have new exciting performance penalties.
 
7:04 PM
@rlemon what about just dumping HTML to jQuery?
 
that used to be pretty slow as well. I'll check it
 
@JanDvorak lol u mean like <div id="sidebar">text</div> ?
 
@rlemon is that test saying that jquery is 75% the speed of pure js?
 
@Connor yep
 
k
 
7:06 PM
@JanDvorak jsperf.com/make-elements slowest
 
@BenjaminGruenbaum (to continue our very slow asynchronous conversation) - How is onclick not the devil? And I mean that in the context of <a onclick="someJavaScript()">
 
iirc it checks everything possible before passing to innerHTML
 
@RyanKinal Would you say AngularJS ngClick attributes or KnockoutJS data-bind="click:.." bindings are evil?
 
@rlemon whats vanilla?
 
It's pretty impressive that the difference between HTML+JQ and JQ is less than the difference between JQ and Vanilla
 
7:07 PM
@TrevorRudolph it's saying that jQuery is magnitudes slower than vanilla... which normally isn't an issue unless you are doing performance critical things. I am just showing Connor the difference.
@Connor javascript without any third party libraries or frameworks.
 
@BenjaminGruenbaum Probably, yes. Though I have very little experience with them.
 
@rlemon <a onclick="someJavaScript()"> is fine. <a onclick="ten lines of code"> isn't.
 
@JanDvorak it's never fine!
 
@RyanKinal Your view on the web is deprecated. We're not building dynamic documents any more, we're building web application. The HTML is our view, not our model.
 
I still dislike inline events period
imo they are never fine
 
7:09 PM
The HTML shouldn't be stupid, it's our view.
@rlemon You never used AngularJS have you? :)
 
@canon reason? Apart from separation of concerns?
 
nope
 
It's reason enough.
 
I find it less maintainable as well.
I need to now look in my html for a event attribute
 
Why shouldn't views be stupid? Aren't views normally pretty stupid?
 
7:10 PM
@rlemon Yeah, looking at the button to see what happens when you click on it is so much harder than going through thousands of selectors -_-
 
@JanDvorak because <a onclick="someJavaScript().bind(this)"> is generally what we actually want.
 
i've trained myself certain ways
 
@RyanKinal They're stupid. They don't contain the logic to what happens when you click the button. That doesn't make them less views.
 
I dislike inline events and styles
I never will advocate them, I will always re-write them to not be them
iz jus me
 
@rlemon Styles are another issue.
 
7:11 PM
@Shmiddty semantics. someJavascript(this)
 
Unobtrusive JS works for documents
When the HTML is your model
It completely fails when building web apps.
 
@BenjaminGruenbaum yea, styles have many caveats when inline
 
You end up with some horrible backbone code, trying to make your static document dance.
Using stupid shit like query selectors
 
But with most "apps" aren't you building the HTML DOM tree through JS anyway?
 
You're separating the wrong concerns, stupid :)
 
7:12 PM
@BenjaminGruenbaum changed now
 
@web2students.com link?
@RyanKinal So your alternative is to do the design process in JavaScript?
 
-2
A: Client-side JS code snippet for chat application

web2students.comSuggestion for coding, First separate php, html, javascript while coding. Don't mix all these and make mess. Don't trust client-side js, it is not secure. Don't try to develop server at client-side (browser). Your code is php code so it will run where server-side is php. You want platform in...

 
@RyanKinal You can't design bit applications in JavaScript, you want a markup language but you want a mark up language that works for applications and not documents
 
@BenjaminGruenbaum I'm not sure what this has to do with the design process
 
@JanDvorak iirc they first check if the passed argument is a element, so the element will always be super fast. then selectors are checked, then html strings
but that was a while ago I looked
 
7:13 PM
@rlemon what about jQuery's parseHtml method?
 
@RyanKinal You almost never build your entire DOM tree with code. what would you do if you (or wose, a designer) want to change something in the structure?
 
The structure, sure, but not the functionality.
 
@BenjaminGruenbaum now answer has any mistake?
 
generally html for collections is generated through js
 
A click event is part of the view.
 
7:14 PM
And there are plenty of ways to handle events without "thousands of selectors"
I disagree
 
anything more than that is probably asking for trouble
 
What happens when a click occurs is not
A view should update the model on state change.
@web2students.com I un-downvoted.
 
A click event is part of a controller.
 
@JanDvorak wow, that is impressive but a mess at the same time :/
 
I agree that the event itself is part of the view - and that's handled by the DOM (not our code).
 
7:16 PM
reading the source now
 
But the handler is likely, as @loading... said, part of a controller.
 
Is there a JSHint flag to suppress 82,18: Expected '{' and instead saw 'return'. on code like: if (err) return cb(err); (I don't like it, but it's company code style).
Couldn't determine if such from the docs.
 
'MVC. Separating concerns since 1980.'
 
@RyanKinal Right, that we agree on.
The handler is on the controller (or view model, whatever you're doing), but the click itself is part of the view.
Gah, if only I had a KO example ready here
 
@JanDvorak I was wrong, they now handle strings first, then dom elements.
however passing over a if statement is a non issue
 
7:18 PM
Maybe in KO this is different. In fact, I'm fairly certain you're forced into things like this with KO.
 
        // HANDLE: $(DOMElement)
    } else if (selector.nodeType) {
        this.context = this[0] = selector;
        this.length = 1;
        return this;
 
@rlemon dat regex, however
 
@RyanKinal You're not 'forced into' it. That's the thing
You're separating the right concerns.
 
But in my line of thinking, the view doesn't have anything to do with what happens when a UI event occurs. In this line of thinking, onclick="code" is incorrect.
 
The AngularJS tag line is "HTML, as it would have been written had it been design to build web applications"
 
7:19 PM
@BenjaminGruenbaum ok, my question is, is it possible that 2 people can chat with each-other without server. like, only once js is downloaded and then imagine server is down even then people can chat without server, java, c++ any such technology?it was not possible but don't know new socket html5 ,etc
 
why is this not changing the src on the img for the gridrow3 trs

$('TR.GridRow3 img').each(function(i, img) {
img.src = images/oro.png;
});
 
@RyanKinal The view what what what??!? The view has everything to do with what happens when a UI event occurs.
@web2students.com Yes, google WebRTC
 
@JanDvorak credit where credit is due, that is a hella lot of work / testing to make sure it is right.
 
Again, maybe in KO
 
...my coworker was passing booleans as the string '0' or '1'.
 
7:19 PM
No, we're talking about MVC
 
@RyanKinal what about `onclick="onPlusClick()"?
 
The view isn't just graphics.
 
@sebas syntax error?
 
@Shmiddty where
 
7:20 PM
@sebas img.src = "images/oro.png";
 
where you have no ""
$('tr.GridRow3 img').each(function(i, img) {
	img.src = "images/oro.png";
});
 
@JanDvorak Better handled by delegation, I think.
 
!!/tell sebas format
 
@sebas Format your code - hit Ctrl+K before sending and see the faq
 
ouch
 
7:20 PM
and how many GridRowN classes do you have?
 
@sebas <3
 
@RyanKinal I'm not saying onclick is a good idea (it behaves really bad, unlike KO's or Angular's or Ember's solutions). I'm saying it's not the devil.
 
also, wouldn't it be .each(function(img, index){...?
!!/jquery each
 
Unobtrusive JavaScript is pretty much a deprecated concept, from the days we were working on documents. Good for wikipedia, not for SPAs
 
7:21 PM
onclick="summonDevil().bind(this)"
 
@BenjaminGruenbaum Alright, fair enough. Maybe I was over-exaggerating (because that never happens here)
 
@rlemon risky click
 
nevermind
 
But I'd say it's still bad practice.
 
@Meds 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.
 
7:21 PM
@Shmiddty yet another reason I fucking hate that API
lets confuse the shit out of everyone
 
it works now thanks
 
@BenjaminGruenbaum thanks :) such technology i wanted since long time, it's really good to develop such things without server load
 
this computer has been 'downloading updates - 91% complete' for over an hour
ffs
 
@sebas in the future, check your javascript console for errors before turning to the internet for help, or @rlemon will hurt you.
 
omfg I am so bored of server-side code.
 
7:23 PM
i know sorry, please dont shoot
 
I just cookie monstered all over myself
 
user1596138
How are these guys able to get away with this? stackoverflow.com/posts/17094467/revisions
 
user1596138
Looks to me like they're editing repeatedly swapping back and forth between 2 things for rep.
 
!!urban cookie monster
 
@JanDvorak COOKIE monster A furry blue monster from Sesame Street who takes out his sexual frustration on baked goods.
 
7:25 PM
@Jhawinsss You get rep for editing?
HOW WAS I NOT AWARE OF THIS
 
@RyanKinal It can be a horrible practice depending on context. I agree that in 95% of times it's bad practice, and honestly I haven't used it myself for years. I'd say that it has use cases though.
 
user1596138
@RyanKinal Yes.
 
@Jhawinsss rollbacks don't affect rep
 
user1596138
@JanDvorak Ah!
 
@Jhawinsss Heehee! Looks more like a fight to me.
 
7:26 PM
I just made the most noobish mistake by the way. Had a 30 minutes bug caused by passing funcName() instead of funcName as a parameter -_-' (in Python)
 
user1596138
@loading... They're in the PHP room talking about who has the bigger e-penis.
 
@RyanKinal you get 2 rep for each accepted edit that goes through the review queue if you're under 1k rep
 
Ah, I see
 
@Jhawinsss PHP room is swell. I wouldn't insult them so quickly.
 
I need to write some CSS. I miss it.
 
7:27 PM
@Jhawinsss I'd be there too if I could fit through the door.
 
user1596138
@BenjaminGruenbaum Explain to me how I insulted them.
 
user1596138
I wasn't making fun of them. I was being serious.
 
user1596138
in PHP, 3 mins ago, by Carrie Kendall
its an epic battle to find out whose e-penis is larger
 
@BenjaminGruenbaum I lost 30 minutes because of sed today
 
7:28 PM
Win7 Pro SP1 + updates + the gigabyte drivers === 40gb ???
 
lol
 
user1596138
@rlemon Microshaft FTW!
 
5 hours ago, by Florian Margaine
@Alnitak what obvious thing did I miss? http://pastebin.com/ZXXPVqaf
 
with all of that you would think it would be better....
 
I lost NaN minutes today because of undefined
3
 
7:30 PM
92%!!!!!!!!!!
 
I lost 0 minutes today because of and.
 
it's not dead!
 
any german around
Ruhe sanft = RIP?
 
gf and boss are german
 
I'd guess 'Saint street'
 
7:31 PM
I lost -9007199254740992 minutes today due to overflow.
 
google images it and you get porn
 
I want a translation
 
@rlemon we were having problems with HBOGO last night. It would get stuck on "optimizing video", she kept insisting it was HBOGO, so I go and close out some of her other stuff, reload the browser, it works fine.
 
damn
there's always some german speaking around
 
@FlorianMargaine That's not sed's fault.
 
7:32 PM
and not today...
 
@FlorianMargaine I'll get it
let me go ask the boss
 
i lost appox. 5 seconds because of writing this line
 
@FlorianMargaine Ruhe in Frieden
But yours works too
 
I lost -0.05ns due to my recent field trip with a neutrino
 
7:33 PM
@FlorianMargaine cat will do the same thing for example
 
@loading... ?
 
he says "quiet (soft|gentle)"
 
^ lol
 
@rlemon as in "shhh, just let it happen"?
 
7:34 PM
echo 'foo' > bar ; cat bar
< bar > bar cat
cat bar
 
user1596138
6 mins ago, by Jhawinsss
@rlemon Microshaft FTW!
 
@RyanKinal I see you're not using my us... oh, it's a facebook post.
 
@loading... got it, this shall not bite me again.
 
at stackoverflow there should be option like, ask question beta, question version 1, 1.11, 1.2, 2.1 so on
 
I'll just use perl now anyway.
 
7:35 PM
@web2students.com it's called notepad.
 
:-)
perl ftw
 
don't post it till it's good.
 
user1596138
@web2students.com There should be a rule against you.
 
perl is executable line noise
 
@FlorianMargaine No, wait. Yours is used for telling someone to sleep well
 
7:36 PM
I should've learnt perl when it was fashionable.
 
may be "RIP" in austrian then
 
I mean... how could my boss get it wrong. He's 100% german (born in Germany) - his name is wolfgang for petes sakes
 
@JanDvorak Perl got things right too. hop.perl.plover.com
 
@rlemon @copy is 100% german too afaik...
 
user1596138
@RyanKinal I just hope everyone sticks to what they're saying. If this xbox is just as popular as before they won't care that they've destroyed an entire market at all.
 
7:37 PM
@Jhawinsss Indeed
 
Python is executable pseduocode
JS is executable DOM
Java is executable design documentation
PHP is executing freshman
 
@FlorianMargaine yea, and I'm believing him over my boss on this - hence my confusion on how he could get it wrong :P
 
@FlorianMargaine It works for RIP, too. But mine is way more common
 
user1596138
!!stat Mahmoud
 
isn't a language like riding a bike... once you are fluent you are fluent for life?
 
7:38 PM
!!tell mahmoud format
 
@Jhawinsss [Mahmoud](http://stackoverflow.com/users/2271670/mahmoud) has 67 reputation, earned 0 rep today, asked 0 questions, gave 14 answers.
@mahmoud Format your code - hit Ctrl+K before sending and see the [faq](http://chat.stackoverflow.com/faq)
 
@copy maybe in germany, @GNi33 said that on his fb
 
@rlemon bikes don't come out with new apis
 
1 message moved to Trash can
 
@rlemon if you practice it, yeah
 
7:38 PM
Well, don't listen to Austrians when it comes to language
Actually, never listen to Austrians
 
$("#menu-primary-menu li a").on('click', function() {
  var link = $(this);
    $.ajax({ url: link.attr("href"),
            dataType: 'html',
            data: {post_loader: 1},
            success: function(data){
                $('#wrap > .row-fluid').html(data);

    }});
    return false;
});
 
@rlemon I haven't used my French for 10 years. I can't really speak any of it now.
 
@eazimmerman neither do spoken languages
@RyanKinal but were you bi-lingual?
 
@Mahmoud now, what's the question?
 
I know french but am far from being bilingual
 
7:39 PM
@JanDvorak now i will write answer in better way, my second version will come (it's in beta now )
 
@rlemon I'm not sure I'd go that far, but I could carry on a conversation with actual French-speaking people.
 
user1596138
@rlemon Putain
 
So... kind of.
 
for me the distinction is when you can think in said language.
you no longer consciously translate.
 
user1596138
I've never known more than a few words in another language.
 
7:40 PM
Right right. There were some things I still had to think about. But all-in-all, it was pretty natural.
 
it's the language in which you swear when you get hit in the nuts
 
my content is wrapped by #wrap > .row-fluid and i wanna load the other pages content in it not header or footer, when i click to navigate another page the content loads find, but the header is duplicated. I've spent all the day with this sh*** and i can give no more :) so this why am here
 
man, I wish I could have the patience / drive to learn a new language.
 
any help i will be thankful
 
user1596138
I wish I did too.
 
7:41 PM
I keep telling myself I'll get back to French. But I'm not sure it'll ever really happen.
 
@Mahmoud look into $().load. It has this kind of functionality built in
 
user1596138
I wish I had the initiative to leave this country and start over.
 
$('#wrap > .row-fluid').load(page + " #container");
 
@RyanKinal Je peux t'aider si tu veux.
 
@Mahmoud if you want a manual approach, that would be $("#target").empty().append($(response).find("#target"))
 
7:43 PM
@Jhawinsss come to Canada - just learn how to say please and thankyou and start loving hockey.
also, beer.
bacon
and flannel
 
and poutine
 
pft, who doesn't.
that is just expected.
 
haha
never ate that
 
@FlorianMargaine Je peux comprendre cette [sentence], mais je ne peux pas repondre tres bien.
^ omg so bad
 
that was actually pretty good
 
user1596138
7:44 PM
@rlemon Got all of those but hockey. Flannel is the best!
 
It took a lot of effort :-)
 
you only missed "phrase", but it's not an easy word
 
@rlemon thanks but kindly would you tell me that line should be inside the $.ajax function?
 
there should be human independent language like java :P
 
@FlorianMargaine Hooray! :-D
 
user1596138
7:45 PM
@web2students.com You should stop thinking.
 
are programming languages the same in different languages?
 
user1596138
^^^
 
Yes
 
@Mahmoud you should add $($) in your code it'd totally make it awesome. Also, use the supa jquery plugin to make your code awesome
 
are core variable names just translated?
 
7:46 PM
@web2students.com How old are you?
 
user1596138
So everything is still english? Like, function is still function and not some other languages word for it??
 
@eazimmerman yes except comments /*comment in english */
 
@eazimmerman they're not
 
fonction
 
@SomeKittens 33
 
7:47 PM
I've seen a few french programming languages though
it's... really weird
 
I should start naming my variables in French. var ce = this
 
So you're the new @Neal.
 
@Jhawinsss sometimes variables aren't, but I've not seen this very often
 
user1596138
3 hours ago, by TheSnooker
$('#pants').on('fire', function(){ alert('liar, liar')});
 
Is polymorphism basically the exchange of messages between objects, and the objects can thus behave differently based of what data was sent to them?
 
7:48 PM
fonction disqueDurAuFormat() {...}
 
@SineLaboreNihil No. Polymorphism is an OO concept that says a child (inheriting) object doesn't have to be the same as its parent (basically).
 
@SineLaboreNihil no. Polymorphism means they react to the same messages but they react differently.
 
So Ryan Kinal it's like inheritance?
 
user1596138
I feel like it'd be harder to learn JS if you didn't know any english then. Because most things are a literal english words. Like function, document, parentNode and so on.
 
@SineLaboreNihil It's part of inheritance. And relates to what @JanDvorak said too.
 
7:50 PM
@SineLaboreNihil you can have inheritance without polymorphism. Inheritance + virtual functions = polymorphism
 
!!/tell Mahmoud jquery load
 
@Jhawinsss there aren't that many keywords. Lisp has weird shit like car, cadr, and caddr.
 
@rlemon Invalid /tell arguments. Use /help for usage info
 
Jhawinsss, I think you're right about that. My native language is Serbian and it would be so much harder to learn any programming languages if I didn't know English.
 
There are more difficult concepts to learn.
 
7:51 PM
 
Also, you can have polymorphism without inheritance: {a:1}, {a:"hello"}
 
@Zirak command names should not be case sensitive
or can you add title case aliases for things like jQuery
 
I am still not clear on the exact difference between inheritance and polymorphism. Could someone please give me an example?
 
@SineLaboreNihil inheritance: a car is a vehicle. A taxi is a vehicle.
 
Polymorphism is where you can substitute one 'type' for another.
 
7:52 PM
Ok, I understand that. :)
 
var parent = {
    myFunc: function() {
        console.log('stuff!');
    }
}

// Inheritance
var child = Object.create(parent);

// Polymorphism
child.myFunc = function() {
    console.log('different stuff!');
}
 
@SineLaboreNihil polymorphism: you drive a car by turning its steering wheel. You drive a taxi by telling the driver your destination.
 
@JanDvorak you drive a screw by rotating it and applying forward pressure.
 
@JanDvorak So it's the use of different methods within the same object interface?
 
@eazimmerman that's the problem of ducktyping
 
7:54 PM
@eazimmerman You could throw stones at it, but it wouldn't be very performant.
 
!!s/problem/huge win/
 
@BenjaminGruenbaum @eazimmerman that's the huge win of ducktyping (source)
 
@SineLaboreNihil rather, different implementations of the same Interface by different objects
 
Your mom circulates like a public key,
Servicing more requests than HTTP.
She keeps all her ports open like Windows ME,
Oh, there's so much drama in the PhD.
 
@RyanKinal Basically what I just replied to Jan Dvorak.
@RyanKinal Right?
 
7:55 PM
Pretty much, yeah
Sometimes, I think JS has completely ruined me for other languages.
 
first-class functions and closures?
 
user1596138
I ask our host to change one Goddamn line in applicationHost.config and he crashes the fucking server.
 
Same method, different objects.
 
other languages should be more like js
 
@JanDvorak Oh, ok, so if I use the same method within two different objects, and apply one method in two different ways in those two different objects, that would be polymorphism?
 
7:56 PM
hides
 
user1596138
Dammit. I'm trying to do my job...
 
Except that JS doesn't really have methods.
 
!!s/Windows/Win/
 
@SineLaboreNihil example?
 
@SomeKittens Your mom circulates like a public key,
Servicing more requests than HTTP.
She keeps all her ports open like Win ME,
Oh, there's so much drama in the PhD. [\(source\)](http://chat.stackoverflow.com/transcript/message/9978192#9978192)
 
7:57 PM
@JanDvorak That's definitely a big part of it. But I also forget about classical OO concepts like function overrides. And also static typing.
 
but.. the song (and rhyme scheme) requires Windows ME
 
@JanDvorak I was basing my observation on Ryan Kinal's answer and example.
 
@SineLaboreNihil polymorphism = caller treats objects of different types the same. Callee decides the behavior.
 
Function overrides are a form of polymorphism as well, I believe.
I just forget that they exist.
 
And yeah, in statically typed languages, polymorphism requires type inheritance
@RyanKinal they are
 
7:58 PM
@JanDvorak Whether the caller or the callee decides on the behaviour, depends.
 
@JanDvorak I'm glad I'm using JS then. :) Thanks for clearing that up for me Jan Dvorak and Ryan Kinal. :)
 
@rlemon Works better with the flow from HTTP
 
When I'm writing PHP or VB, I definitely miss functions as first-class values.
 
@RyanKinal Both PHP and VC have functions as first class values -_-
 
Also object literals. I miss object literals a lot.
 
7:59 PM
@loading... they are, at the very least, two different types of polymorphism. In the caller-decides, the caller needs to know the expected types in advance
 
@SomeKittens monzy.com/intro/drama_lyrics.html listen to the song
windows ME works well
 
@BenjaminGruenbaum Meeeeehhhh... but they suck
 

« first day (971 days earlier)      last day (3977 days later) »