« first day (895 days earlier)      last day (4039 days later) » 

12:00 AM
lol :)
 
this is the correct place to talk about node :S
 
You nailed it dude
and I'm catching fish
cheerio, chaps!
 
Good bye
 
Cheerio is a really good node.js package...
 
:D
 
12:01 AM
So can anyone assist me in making calls in nodejs
 
think i see my problem but i dont know why its happening
 
@HarryBeasant on second thought this sounds fun
 
every request animation frame is needing more memory =/
 
I'll have one smoke .... speak
 
12:02 AM
@MatthewDean I think there's an npm package named for every word in 2011's Oxford Dictionary
the pocket sized one
 
I have this if statement with a slider so if (sliderData.length > 0) { superbox.append(sliderData); } but when I close the parent to hide it and reshow it its no longer there. am I doing something wrong?
 
I wonder if there's chucknorris.js
stallone.js
just.js?
 
see?
i did not know that
 
user2157210
@met.lord has something to do with the removing of the position style
 
12:05 AM
@bryanlewis this place is not suitable for posting code, imo
it all looks like spam
.js
use notepad.cc or a make a fiddle
and get a jewish guy to play it on his roof
 
Anyone know why JavaScript is function-scoped instead of block-scoped?
 
haha sorry
 
@MatthewDean maybe because it's intended to be dynamic?
 
user2157210
@met.lord hmm or not let me investigate
 
@skopp Explain please.
 
12:07 AM
oh no
I just took a jab... okay
 
@skopp pastie.org/7156572 -> is that better?
 
but if I get murdered, its on you, Dean
 
@bryanlewis I recommend pasting your code in jsbeautifier.org first
 
@Nexxpresso Yeah, I noticed that if I remove the line where I remove styles it works "better" but then the styles are all wrong
 
@bryanlewis jsbeautifier will auto-indent your code correctly so it's more readable
 
12:08 AM
 
I mean... JS was developed initially when programmers wanted to make things that could go with their static code
 
looks like i found the cause of my lag
 
@Nexxpresso here's my other fiddle jsfiddle.net/LPWhc/3
 
imagine it's 1992
 
12:09 AM
@Dave that slick!
 
And Perl is the shizznal
 
I try a function like this;
 
(not that it isn't still)
 
what is postload.js :S
 
@MatthewDean that is slick!
 
12:09 AM
		function test() {
		$.get(
    "URL",
    function(data) {
      console.log(data)
    }
);
}
 
is that a chrome thing ?
 
And i just get data is not defined
 
to me a function is as it is in mathematics
f(x)=y
at least one dependent variable
if lucky, or if need be... you have definitions
 
@skopp I still don't understand why function scoping is preferable. Let's say you want to declare a local variable in a loop. In JS, that's a pain.
 
wtf
i mean constants
 
12:11 AM
@MatthewDean, it's just a part of the language
 
golly im tired
 
@phenomnomnominal I know it is, but I wonder why it's preferable to how other languages do it.
 
@MatthewDean I hate that too
 
Who said it's preferable
 
I like python syntax
 
12:12 AM
it will most likely be included as part of ES6
 
he meant preferred
above
others
 
GC event is garbage collector right ?
 
Have a look at let
 
@MatthewDean jQuery, IMO, sort of rectified JS' early pitfalls
 
@skopp, no it doesnt...
 
12:14 AM
o_O
skopp you are crazy
 
well, I made a vague statement
 
any one know what this is in Chrome: (include.postload.js)
 
You didn't make a vague statement, you made an incorrect statement
And will now probably get pissy about us pointing that out
 
lol
 
It rectified the amount of typing you have to do for simple selection...
Who comes up with these method names? addEventListeenr?
 
12:15 AM
I laugh, I don't get.. pissy
why am i wrong
@MatthewDean NO IT DOESNT
 
oh lord not jQuery talk again
 
@skopp Explanation?
 
none.
youre just wrong
now get pissy
 
It provided a way to manage the inconsistencies with the DOM
 
@phenomnomnominal you know, I was typing that out
 
12:17 AM
It has nothing to do with JavaScript. A library can't change the language it is written in...
 
the thing i like most about jquery is that when people ask me questions i don't want to answer i just say 'go use jquery' and then they leave and usually don't come back
 
And now unskilled developers can actually develop web pages.. What horror!
 
but didnt get a chance to finish
 
At skopp ^ that is an example of you getting pissy.
 
the thing i hate with jQuery is many newbies don't know how to write things in the standard JS syntax first.
 
12:18 AM
That really has nothing to do with jQuery itself, more its effects...
 
@phenomnomnominal do you realise that your tone is usually very condescending?
 
well try ask a JS question on SO you will get a Jquery reply from at least one person :P
 
Am I wrong?
 
I'm trying to be condescending.
 
you can hear him skopp ?
 
12:18 AM
I am assuming of course
@Dave yup
like he can hear that I'm pissy
 
"How do I open a new tab in jQuery? In pure JS it's window.open, but how do I do that in jQuery?"
 
not sure he said he could hear your tone :p
 
tone doesn't only have to be aural
 
if jQuery vanished tomorrow many js programmers would be lost and have no clue how to do it any other way xD
 
user2157210
@met.lord hmm if i add the position in the css it works better but not perfect
 
12:20 AM
How exactly would this vanishing occur? Would all instances of the source code be erased from memory? What about modified versions? What if someone pulled a single method from the jQuery source?
Perhaps I am overthinking this.
 
it was a hypothetical example >.>
 
@phenomnomnominal Thank you.
For admitting it.
 
It would happen if your '4' key fell off the keyboard
 
You're being wrong, and misleading others.
And then not being happy about it.
 
@david jQuery('#id') works just fine
 
12:21 AM
35 rep - not misleading me :P
 
@MatthewDean you're not
 
@skopp I'm not overthinking it?
 
nope
look there --->
at what gets starred here
 
"NO U RONG IDIOT"?
 
what is this, primary school?
 
12:23 AM
@skopp Why did you direct me to the starred posts?
 
no THIS IS JS ROOM! /me does sparta kick
 
haha
I hope you didn't kick SO bot down the hole
 
!!/dance
 
@david * nmp3bot dances :D-<\n* nmp3bot dances :D|-<\n* nmp3bot dances :D/-<
 
you know how github hosts pages by default on gh-pages branch
does bitbucket have a similar thing?
actually, I should RTFM
 
12:26 AM
@Zirak I just kinda broke bot with a ridiculous backtracking regex. Dunno if there's much you can do to circumvent this but you could maybe look for really obviously contrived malicious ones?
 
I admit
 
(in PHP room, not your instance)
 
user2157210
php room hm
 
Is there a direct relationship between how well someone knows how to code:how much of an asshole they act (on average) ?
I'll leave you people with that
CHEERS :D o/
 
how knowledged are you at code?
 
12:33 AM
@Nexxpresso how exactly did you do it?
 
user2157210
@met.lord doesnt work really good still thinking it messes up the class when moving
 
@Nexxpresso may be you have another idea about how to get the same effect doing it differently?
 
user2157210
so it is just allowed in those two boxes?
 
@Nexxpresso yep
 
@dave about half
 
12:43 AM
@DaveRandom eh?
Link to regexp?
 
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".match(/(x+x+)+y/) :P
 
Well, event in general
 
oh
without the ys
 
in PHP, 35 mins ago, by DaveRandom
bot> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".match(/(x+x+)+y/)
 
Thanks, I'll look into it
 
12:44 AM
It still hasn't responded to me or any command since
And presumably it's melting PeeHaa's CPU
 
!!> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".match(/(x+x+)+y/)
 
@Zirak Maximum execution time exceeded
 
user2157210
@met.lord Ok got it
 
Interesting, obviously his hacking has broken that element of it
 
^ that should happen. I don't know if PeeHaa changed anything there or how he runs it, but the main instance shouldn't be affected by a clogged worker
 
user2157210
12:45 AM
@met.lord jqueryui.com/droppable/#revert sourcecode in here is WRONG
 
Maybe if it actually ran full speed ahead, eating 100% CPU, the termination event doesn't respond? I dunno. Maybe he runs single-core.
 
user2157210
!!> "valid" == true
 
@Nexxpresso false
 
He's done a bit of playing with the sauce, not sure exactly what though
 
@Zirak On MS-DOS, maybe
 
12:47 AM
@Zirak Doubt it, he's been running it on his actual PC I think. He's gone to bed, I'll work through it with him tomorrow. Presumably the max execution time is configurable?
 
@Nexxpresso wrong how?
 
user2157210
you do not put in revert: "valid"
 
Even if he changed it, the bot continues running while code is executed
 
user2157210
but rever: true
 
user2157210
revert: true
 
12:48 AM
@copy WebWorker?
 
user2157210
they state themselves its a bool thats why i wondered what they did there
 
@DaveRandom yeah, it's configurable. Maybe it's a browser bug. Do you know what browser he runs it on?
 
Chrome canary
 
Looking at his fork, he hasn't changed either the evaluator or evaluatee
 
@DaveRandom Yes
 
12:49 AM
ah, that may be a problem. Canary isn't known for stableness
 
@Nexxpresso hmmmm thanks...let me try it out
 
user2157210
@met.lord jsfiddle.net/Pck8G/18 put position relative in css file and changed the revert
 
Quite. It was throwing up about a perfectly serviceable plugin before. Meh, it's clearly not a problem in core, forget about it :-)
 
Sorry, I don't have any trick for bringing it back to life
 
user2157210
Another reason to not like jquery
 
user2157210
12:51 AM
who the fuck shows a working example and seems to display wrong code underneath
 
user2157210
@met.lord jsfiddle.net/LPWhc/4 should work too
 
@Nexxpresso thanks for your help!
 
user2157210
no problem good night folks
 
!!work or watch a movie
 
@Zirak work
 
1:03 AM
damn you
 
!!yolo or yolmultipletimes
 
@david yolo
 
fuck yeah
 
How do you make a plumber cry? Kill his family
 
0
Q: Javascript Backbone model design

GantengXFairly new to JavaScript so it might be a noobish question. At the moment for my project I'm using NodeJS for my server and Backbone for the client. The client will send a request to the server and the server will send list of files in the server, my aim was to simply return the list of files an...

 
1:17 AM
@rlemon Which library am I reimplementing? gist.github.com/Zirak/b4a1f0ad9cfd53f8a152
...forgive me. I shouldn't be working on this now. But the hounds. They beckon.
 
1:36 AM
user image
8
 
Any EventSource experts in the room?
 
m59
2:03 AM
I accidentally didn't ask you guys something and took someone else's advice first.
I probably messed up lol.
 
Hey guys
 
m59
With OOP, should I always (or at least usually) use a base class that doesn't itself do anything, but has the shared functionality of objects that will do things, or is it ok to use a bass class that has some specific behaviors that all children will have to overwrite?
 
Quick question, i am making a call with $.post and am wondering whether that call is made by the server or user
 
@Zirak seriously. I thought it's be about fitness
 
As on the page i am calling to has a script to determine whether there is an active session
But it always returns false, even though there is
Its also cross domain
 
m59
2:07 AM
@HarryBeasant $.post is basically like the user's browser going to whatever page you are posting to.
 
yeah, thats what i thought, however, it always returns false, that the user has no session set, there is
I.E i visit the page directly, outputs true
visit page via POST, returns false
 
m59
I don't really get what session has to do with $.post.
Oh I see.
 
Basically
YOu see?
 
@m59 There are many flavours of OOP. OO languages already have a bare base class, usually called Object. In class-based OOP like java, people usually write abstract->concrete, so the base class is some miles up in the sky (do remember practicallity, though). In prototypical OOP, you want the overriding behaviour (composition over inheritance).
 
what's a verb for causing cancer?
 
2:10 AM
So its basically not recognising the session or something
or its not actually being called by the user
and the server is
 
m59
@Zirak I made a base object able to deal with youtube and do some cool stuff and have an object that derives from it to deal with vimeo. So, that is good? rather than a base class that kinda sucks and both derive from?
 
Okay, ive gone ahead and echoed the IP from the remote script, and its mine not the servers
So not sure whats going on here
 
m59
@HarryBeasant have you google'd about it a ton?
 
Yes
I'm not sure what sort of error this is
cross-domain sessions or something
 
m59
You're at the mercy of the wise people here (I am not one of them lol)
 
2:12 AM
@m59 I'd say it's fine. If you feel like you could achieve cleanliness and nicer logic through deriving a more abstract thing, then go for it.
 
m59
My guess is it's a security issue.
Cool man, thanks.
 
I guess, just tried echoing a cookie that was set on the website, doesnt recognise that either
This is a right pain
 
m59
So, you're on site A trying to access a session from site B?
My (probably noob) intuition tells me that sort of thing isn't allowed. Just sound unsafe like a boss.
@Zirak So, youtube thumbnail object extends into vimeo thumbnail object. Youtube thumbnail object extends into youtube lightbox object. Now, how do I get a vimeo lightbox object, since it would extend from the vimeo thumbnail object AND the youtube lightbox object. Something is definitely wrong there!
 
I guess
However its just loading a page
this works when calling locally
I guess just not cross domain
 
m59
Yeah, I've run into a lot of problems there. Come to think of it, I remember it being specifically with post. I had to use GET instead.
 
2:20 AM
GET might work? that would make sense
hmpph, nope
 
m59
Well, it was really odd. IE wouldn't let me AJAX youtube with POST, though the other browsers could.
 
Still returns false
Odd
maybe if i set a cookie on it
 
m59
Which, I'm glad about, since I was noobishly trying to use synchronous ajax.
 
For the second domain
nope
that didnt work
wont even set the cookie
when i call it via 2nd website
 
m59
Your question is specific enough, maybe you would have some good luck with posting it on the site.
 
2:24 AM
Yeah
cheers for the help :)
 
m59
I bet someone could answer it pretty quickly. A lot of the people in here probably know, but they are afk or don't care right now lol.
I wish I could do more, dude.
Hey, can you let me know what you're doing this for? Maybe there is another way to do it?
I wish I could do more, dude.
 
Basically
I'm creating a chat box using NodeJS
And i want to validate the users, which are members of another website
mainwebsite.com
mainwebsite.com:8080 -> chat
Differents ports, still count as cross domain
So i make a POST call to verify the username, to assign it in the chat box when they join
However the calls comeback false
 
m59
I guess you could access the database directly from where you are, right?
 
Correct, i had thought of that, but its a shame to keep making them log in
 
m59
Ohhh.
 
2:29 AM
However, after one login i could set a cookie, unique hash or something
 
m59
That makes a lot of sense.
That reminds me of how I am logged in with google, but SO knows this and logs me in.
or maybe it does that...
 
YEah
Google uses cookies
Can I use PHP within nodejs?
Any idea?
 
m59
No clue at all.
I don't know anything about nodejs
 
Alright, no worries
 
@HarryBeasant, why would you want to do that?
 
2:32 AM
Do what?
 
Use PHP
 
They have nodeJS connectors/
 
Yes, but why would you want to use PHP, it sucks
 
PHP is my baby
Its amazing
 
So I have this issue with what I believe is a java script issue with twitterboot strap and prettyfy, I posted a question here: stackoverflow.com/questions/15696318/… was wondering if any one wnats to help me out
 
2:35 AM
Whats wrong with it
It displays as it should/
 
no it doesnt.....theres no line numbers, the code is not where it should be...
 
uh starting to hate js
 
if you look at the code example of the site: twitter.github.com/bootstrap/scaffolding.html it should look like that, how ever mine does not....
 
ROT13 is sufficient encryption
 
@bryanlewis GTFO
 
2:45 AM
@phenomnomnominal don't be a dick. I'm just frustrated.
 
m59
hey @phenomnomnominal could you scroll up just a touch and see if you have any ideas about my object problem? I use the initializer pattern like from RyanKinal's article. I'm not sure if I should be deriving from two objects in my case or re-thiking what I am trying to do.
 
Haha, why's that?
 
I'm learning.... can't figure out my issue.
 
@m59, so you have a youtube class which handles videos from youtube, and a vimeo class which overrides properties from the youtube class to handle vimeo?
 
m59
@bryanlewis When you obtain a certain level of skill in js, you develop groin powers, the likes of which simpletons cannot fathom.
simpletons like me as well.
lol
Yes. @phenomnomnominal
 
2:48 AM
Why not have a 'VideoHandler' class, with common functionality and then a subclass for Youtube and Vimeo?
 
haha
some day!
 
m59
i discussed that with Zirak, and he thought I was on the right track so long as the code looked nice. In other words, I just debated that and think it's ok.
 
That would allow you to design for a common interface and it wouldn't really matter what sort of video you have
 
m59
I'll consider rolling that way...
 
Yeah, that makes the most sense to me
 
m59
2:49 AM
nonetheless, how do I handle the drastic change in format....from a thumbnail oriented sort of thing to a lightbox one...
End product: youtube_thumbs, youtube_lightbox, vimeo_thumbs, vimeo_lightbox
 
@bryanlewis, where is your click handler for the drop down?
 
m59
I was thinking of taking the youtube_thumbs and extending it into the lightbox (which is much more complicated....adding a lot more features altogether) and overwriting the few things that need to be removed.
 
hello, anyone knows if there is a JS library that can re-write URL's in a page after the page has been loaded?
 
m59
I can handle that no problem. It's when I try to do the same for vimeo that I get confused.
 
@xybrek it's called the History API
 
2:57 AM
An Irishman, a homosexual and a Jew walk into a bar. What a fine example of an integrated community
 
@phenomnomnominal $('.superbox').on('click', '.superbox-list', function() {} is my click handler
 
So in the handler function, just reinitiate the slider?
 
well thats what I need to do yes.
that if statement is showing both the slider and the image for some reason
and I have no Idea how to make reinitiate work in the click event
 
@phenomnomnominal I mean, re-write URL in the HTML...
 
@xybrek, and do what with it?
@bryanlewis, make a JSFiddle
 
3:11 AM
@phenomnomnominal I need to do it for my site, re-write the URLs of the page upon loading...
 
That explains nothing.
What do you mean by rewrite?
Simply print out the url?
Or replace it
And either change the page or not?
 
can I add 2 different libraries in a jsfiddle
 
yes, go to add external resources
 
oh good idea!
 
@phenomnomnominal well, example: URL in html is: /somepic.jgp then it will be <proxy + domain>/somepic.jgp
phenomnomnominal you get the idea ? ^_^
 
3:16 AM
Well it's just a string
So just get the image
get the src attribute
modify it
then put it back
 
yah... i've done that
but there's just to much are where URL can reside in an html
 
an whats the issue?
 
@phenomnomnominal am I linking the external js right? jsfiddle.net/3hjsy/1
 
@phenomnomnominal i mean, if there's a js library that can extract Links and rewrite them as needed
 
@bryanlewis, no, i'll fix it for you
 
3:19 AM
@xybrek You want to change all links in a document?
 
@xybrek, I don't know. It seems like whatever you're doing is yucky.
 
@phenomnomnominal in java there's Jsoup library that can do this
 
@phenomnomnominal ugh... sorry
 
@phenomnomnominal why yucky? haha
 
If so, check out the document.links html collection and document.images
Basic DOM manipulation from there
 
3:21 AM
@bryanlewis, fixed: jsfiddle.net/3hjsy/2
Now make it so it works like the other page and I'll look at it
 
@zirak good idea
 
jsbin.com/evusix/1/edit as a proof of concept
 
As soon as we started programming, we found to our surprise that it wasn’t as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs. — Maurice Wilkes discovers debugging, 1949
 
Trying to figure this out!
@phenomnomnominal much closer. jsfiddle.net/3hjsy/6
still no gallery though for some reason
 
Sorry dude, haven't got time to look at it now
 
3:36 AM
dang okay no worries.
 
3:47 AM
0
Q: How to execute a function from function.php in a javascript?

JPollockI have created a custom menu function in functions.php, but I need to execute it in a container that is created by a javascript. Is this doable? The js is outputting a container called "album-info-text" that i'd like to replace the content of with my menu. This is the code that (I think) is outpu...

 
do you have to append child to parent before you can append to that child with more elements?
 

« first day (895 days earlier)      last day (4039 days later) »