« first day (1107 days earlier)      last day (3826 days later) » 
01:00 - 14:0014:00 - 00:00

1:05 AM
I'm trying to implement Vex dialog/alert replacement. Dependencies are loaded via requirejs. As I build a theme for Ghost, I have the problem that Ghost already loads jQuery and now $ isn't defined as function and I can't add it as dependency myself. Now the first of the if/else if/else switches is triggered and results in undefined is not a function. How would I go fixing that?
if (typeof define === 'function' && define.amd) {
    define(['jquery'], vexFactory);
} else if (typeof exports === 'object') {
    module.exports = vexFactory(require('jquery'));
} else {
    window.vex = vexFactory(jQuery);
}
Hope someone still is in the mood to invest some brain into that :P
 
o/
Is it dead ?
 
@Raynos What do you mean "is it dead"?
The problem is that I use requirejs, so the first if returns true. Then it assumes the common standard of jquery as a string/name identifier for jQuery. But I can't include jQuery a second time as it's already included by Ghost :/
 
1:27 AM
@Raynos hi
 
@Raynos \o
 
1:54 AM
@BenjaminGruenbaum The type system as in how to create prototype chain hierarchies?
Ah yes, the redline guy. He was stalking me ever since I wrote that answer. After that he commented on every single answer I wrote on inheritance in JavaScript.
Thankfully he stopped now. I think has was embarrassed being in this room.
 
hi @kaiser
hi @AaditMShah
 
Hi @BadgerGirl.
How's the weather in Mexico?
 
Warm and perfect
 
Speaking of warm and perfect I need to get a glass of milk. Good morning.
 
hi @SomeKittens
 
2:02 AM
BTW @BadgerGirl I mentioned you yesterday but I don't think you got a notification. Please commit to the Relationships and Dating StackExchange site: area51.stackexchange.com/proposals/44577/…
 
I will
 
Plus I get +5 rep for every person that commits. So that's awesome.
 
@copy commit to it.
Our relationship needs more feelings.
 
I already have a perfectly working relationship
No need for support from people on the internet
 
Not enough feelings.
Oh, @SomeGuy is also committed.
 
2:07 AM
He is and so are two of my friends from Mumbai: Meterbuchus and his girlfriend Manna. I'm trying to rope in as many couples as possible. @copy I am looking at you.
 
But Someguy is 13!
 
That is not my URL anyway.
 
@copy Now commit.
 
2:15 AM
It's your responsibility not to link epicsomething.com unless the content is, in fact, epic
 
We are dying from drunkness.
 
Next time I'll link you to Fingolfin maiming Morgoth for the kicks you get out of the best character in popular literature to ever die a heartbreaking, soul-ripping, tear-jerking death.
 
@AaditMShah It's like Yahoo answers, but modern!
 
With moderation, reputation, badges and all the awesome things that Stack Exchange sites offer.
 
2:31 AM
> What is the best way to go about getting my girlfriend's ring size in preparation for my proposal?
 
2:44 AM
 
 
1 hour later…
3:51 AM
Captain James Cock! ^
 
4:13 AM
o/ again
Does anyone know which events (addEventListener events) are cheap to delegate and which are expensive
I'm making a global delegator thing
and I want to pre-emptively delegate the cheap events
I'm avoiding all the mousemove & friends things
@SomeKittens o/
 
0
Q: How do I make rock-paper-scissor program more javascriptese?

Anand PatelI have implemented my first program in javascript. It is http://en.wikipedia.org/wiki/Rock-paper-scissors. I request javascript developers to help me make this program more look like javascript program by following the idioms of the language. Also, I am open to any suggestions related to simplifi...

 
4:38 AM
If I have a stack over flow post that did not get much traction, am I allowed to post the link here?
 
@TimLambert if it's not about a jQuery plugin.
 
lol
:) the html5 audio api has these neat features... but i was wondering if it was possible to use these features in the html5 video api
2
Q: Using HTML5 Audio API abilities in HTML5 Video API player

Tim LambertThis widget allows you to use the HTML5 Audio API to detect the wavelength amplitude of an audio file. On this page, http://codepen.io/datanity/pen/gaweb you will see a dot that changes color, as evidence of this detection. I am trying to keep this amplitude detection ability, but instead of us...

 
@Raynos On what browsers? This sounds like something that shouldn't be too hard to profile
@TimLambert @SimonSarris @rlemon @Loktar will probably know
I think he even built something like what you want. Lemme check.
Probably just put the audio of the video in a different audio tag :P
 
oh wow
 
5:29 AM
hey guys i am using spring mvc i have a session variable and i would like to pass the value into a javascript function on my jsp page whats the best way to do this?
 
@devdar There are many options. You can statically pass it as the template is built, you can retrieve it via ajax, you can set it as a cookie, to name a few.
 
You can simply do it like
<script>
var urstuff = ${mysession.myvalue};
</script>
This will generate script that actually has myvalue value assigned into a variable.
 
^ That would be the static option
 
@Shea thanks
@EnglishMaster thanks going to try this
 
@devdar You're welcome. Personally, I would set it as a cookie, and retrieve it from there, since you are likely to set session data as a cookie anyways.
 
5:38 AM
@Shea Well, it depends on how you want to retrieve your variable. But why don't you just get every necessary data in a single request instead of doing it through multiple times using Ajax
 
@Shea i actually saw where you could use EL to pull this data from the session
@Shea how good is that?
 
@EnglishMaster Doesn't that kind of go against the spirit of MVC?
 
Not sure, but it's just generating a view. Javascript is just a part of view as well.
 
@devdar Not sure I've ever heard of it. Then again, I don't use Java
 
What's EL?
English Learners?
 
5:41 AM
@Shea ok thanks
@EnglishMaster Expression Languare
@EnglishMaster Language
 
oh
Well, there are many options to retrieve session data in JSP
 
@Shea i think i am going to try setting a cookie in the controller and then retrieve it in the js function
 
It makes sense to me
@FlorianMargaine I just got 8/10, not realizing it was a quiz, and randomly clicking
 
@devdar You will write more code =(...
 
fuuuucuuck
im so drunk
christ
 
5:51 AM
+1
time to code
drunk coding FTW
 
hah I wish
I cant code anything
its hard to even type
:( I joined T
*TS
 
Are you typing in the dark?
 
eait
 
For extra challenge, type in the dark
 
*wait im on the wrong server
yeah its dark
 
5:53 AM
Oh, you're good then. lol
 
but I have a back lit keyboard
 
Those are awesome /obviously
 
whats the SO ts server?
lol wow I see a stared message by me
I seem so intelligent
when not retarded intoxiccated
lol wait nm that message was directed at me
damn found the ts server
no one is on
 
Can I be on your level?
 
nice badass man
 
6:05 AM
Thanks
Some kids beat an old woman's mailbox up with a baseball bat, so we put this in for her
 
.. wtf
 
Idk either. Maybe they watched that Stand By Me movie, and decided to reenact it...
 
well thats badass man
im about to head out i dont feel awesome
see ya
 
See ya, feel better lol
 
6:23 AM
0
Q: Is my JS/Jquery methodology good?

absentxI always struggle with which of the stack sites is best to post "questions of theory" like this, but I think programmers is the best, if not, as usual a mod will move it etc... I am seeking critique on what has become my normal methodology of writing javascript. I have become heavily reliant on ...

 
6:37 AM
would anyone be willing to upvote this question? stackoverflow.com/questions/19613656/…
it's a new API so there is no info about this anywhere on google
and I think it's a real good question... but it wont be answered unless the community comes together and gives it some up votes
loktar, btw, i loved your canvas game
 
@TimLambert Generally we don't accept requests for upvotes
 
excuse me, i wont ask again
i didnt know
 
Yeah, it's just considered bad form
understandable, you're new here
What time zone?
 
PST
 
Nice, me too (San Francisco)
 
6:41 AM
im trying to make a real cool open source plugin that does canvas animation surrounding videos... but, can't without getting this step
LA :)
 
Dunno if that helps
 
@TimLambert Maybe you can do it with createMediaElementSource for webkit
 
I'm going to check out both of them. thank you guys.
if you want to see something totally weird. codepen.io/datanity/pen/myJdz jsbin.com/iYOkOza/2/edit same exact code... but in chrome, the canvas is not full screen in codepen. I think that codepen.io is glitched.
 
these links are great shea
really appreciate it!
 
6:59 AM
No problem
 
popcorn.js is cool too, i will play w/ it tmrw
 
No problem, that's what we're here for
 
gnight
:) g2g to bed
thx again!
 
Sweet dreams
 
@BrendanGelfand any time in the next 10 hours is great
 
7:11 AM
@rlemon @octavien @zirak You guys should join my skyblock island in minecraft
 
@Shmiddty Zirak is afk: hurricane
 
!!afk sleepytime
 
@Shmiddty Why are you leaving me!?
 
8:04 AM
!!afk
 
@BasicBridge Just go already!
@JohnLim 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.
 
Whats'up guys !
 
8:27 AM
Not my penis.
 
8:52 AM
0
Q: chrome.history.getVisits not listing all URLs

chanchal1987I am trying to list all the links which are not visited yet from a list of URLs (Array) in Chrome Extension. But my below function is returning only one URL. Where I am doing wrong? function remove_visited(urls, fn) { var links = urls, unvisitedUrls = [], done = false; console.lo...

 
@chanchal1987 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.
 
9:07 AM
@ManojNama 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.
 
Hi, Can anyone please help me to resolve this issue? stackoverflow.com/q/19616204/395703
 
user1125394
!!google .gif with sound
 
9:26 AM
haha, of course, you say penis or vagina and you get flagged. I wish some people would grow up already.
 
9:50 AM
@OctavianDamiean lol
 
We shall dub them nono and dodo from now on.
 
10:03 AM
Good morning.
Is it okay to ask TypeScript question here? :)
 
10:14 AM
!!tell Robik welcome
 
@Robik 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.
 
There ain't no link to those rules in room desc ;)
 
huh, you're right, someone changed that ... let's fix it.
room topic changed to JavaScript: Welcome to ECMALand, the promise(d) land! Please review the room rules. rlemon.github.com/so-chat-javascript-rules [ecmascript] [enterprise] [javascript]
 
So back to question: In typescript I have a file with some interface only(IFoo.ts), which gets referenced by Bar.ts AMD module. But problem is that IFoo.ts requires module Event.ts. If I import Event.ts from IFoo.ts it will be generated as empty AMD module, if I <reference path="Event.ts"> in IFoo.ts identifiers are not propely found.
 
Keep in mind, you're asking on a Sunday, most of our users are either gone or just chilaxing.
 
10:21 AM
I know, IRC is dead too :(
 
So @kaiser you're from Vienna? That's cool.
 
@Robik Create an IEvent interface?
 
We're 4 or 5 Austrians then.
Oh wait, I think 6.
 
@BenjaminGruenbaum Oh, this might work. Thank you!
 
@Robik No problem, generally if you're working with interfaces in TS it's to create a uniform API and to create a documentation point for consistency. If you do that it means your code is outwards facing in which case you want interfaces for the types it returns anyway so you can enforce they don't use internal methods that are not ready for release yet (unless they explicitly need to).
 
10:34 AM
@BenjaminGruenbaum Well, the key problem was AMD Module depending on Reference file depending on AMD Module. If I would import in reference file it would be compiled as module which is not the case.
 
@Robik I hate the fact modules in TS don't work well yet, they're fixing it though. 1.0 will have proper modules.
 
Yeah, pretty much. But I hope when all problems are fixed they will be more enjoyable to work with.
 
Hello, stackers, I have strange behaviour with JS. Creating "subclass", where in "class" members are private throwing me "Cannot read property "privateproperty" of undefined". I don't get it what happening
 
Also I would be happy if they added support for something like declare class Foo<T>. Where you can make declarations for TypeScript modules.
 
This private members are also defined in subclass, and subclass is defined setting subclass.prototype = new Class();
 
10:42 AM
@AlanKis live examples please, fiddle or something like that.
 
@OctavianDamiean Link is here, don't laugh, I'm trying to learn JS. pastebin.com/Z2ziFL1t
This prototypal inheritance is killing me obviously
 
user1125394
github.com/yusugomori/DeepLearning do you have a good feeling about this lib?
 
user1125394
it seems quite good
 
Yea well, I'm sorry, I can't be arsed to convert that to a live example myself, put it in a fiddle or something and then we'll have a look, or maybe someone else will take a look.
 
@OctavianDamiean do you know what you have to install in arch to see APL fonts and the likes?
 
10:47 AM
Sorry, Octavian. jsfiddle here jsfiddle.net/7v9Uu
 
@FlorianMargaine mhmm, I'm not quite sure what APL fonts are, so I guess I don't know. :/
 
@OctavianDamiean well just unicode fonts generally speaking
there for example I don't see all the characters codegolf.stackexchange.com/questions/11232/…
@AlanKis SubProduct.prototype = new Product();
doesn't work since you provide no product object in Product constructor
 
@FlorianMargaine You mean that I have to return Product object itself?
 
@FlorianMargaine I'm afraid I don't know either.
 
I mean that in your Product function, you expect an object with a title key as an argument. You're not providing it there
@OctavianDamiean k... I'll look.
 
10:53 AM
God, I forgot how horrible PHP Was
just had to use it, felt like I could kill someone
wth were they thinking?
 
@FlorianMargaine I don't get it...
 
function Product(product) {
    // You use `product.title` there
}

Subproduct.prototype = new Product(); // You're not passing `{ title: '' }` there
@AlanKis ^
 
this.render = function () {
        setTimeout( function(){this.render}, 50);
        renderer.render(scene, camera);
	controls.update();
	stats.update();
}
Why is this not calling itself again? Because of the This ?
 
I see that in constructor var title is set argument title (e.g. object title)
 
@AlanKis yeah, and you're not passing argument title, so it can't find it
 
10:57 AM
Wait, I'm dumb
 
@OliverSchöning depends
uh, no
doesn't depend
this is undefined in strict mode there
maybe you want this
setTimeout(this.render, 50);
your code has no way of working since you weren't calling the function anyway
 
I am. Just not in that part
app.render();
 
setTimeout( function(){this.render}, 50);
in the setTimeout, you're not calling this.render
and btw, this is not the object in this case
if you were calling it, it'd be setTimeout(function() { this.render(); }, 50);
@OliverSchöning and fix your spaces...
 
Hm.. I think I am doing something really wrong.
TypeError: Object [object global] has no method 'render'
Lemme hastebin it
 
@BenjaminGruenbaum heh
@OliverSchöning yeah, this is window when called in a free function
and undefined in strict mode
which is why I proposed setTimeout(this.render, 50);
I guess I'm bad at explaining...
 
11:07 AM
@FlorianMargaine So odd. I put in a console.log. and with that line it does run the function an additional time. and thats it
with this line: setTimeout(this.render, 50);
 
yeah indeed
dunno why
this.render = function render() {
        setTimeout(render, 50);
this works
 
Hey! You're awesome @FlorianMargaine :)
Any idea why ?
 
not sure there
I know why your original example doesn't work
but dunno why setTimeout(this.render, 50) doesn't work
 
Sebastian Vettel, 4 time Formula 1 World Champion!!
 
11:13 AM
@FlorianMargaine First one didnt work because the THIS was pointing to the wrong object right ?
 
@OliverSchöning yeah
@OctavianDamiean any idea why this doesn't fire more than twice? jsfiddle.net/FYSnA
 
Cool. Cheers mate. I can go to bed happily now
 
user1125394
Logistic Regression seems to be more a qualitative classification than a continuous regression, if anyone ever used that?
 
@BenjaminGruenbaum ^*3
@cↄ I never tried continuous regression, sorry.
 
user1125394
you certainly did a linear regression at school, at least once
 
11:16 AM
ah, I thought this was related to continuous integration. My bad.
english maths don't always translate well in french :)
 
@FlorianMargaine I'm not sure why it should fire more than twice.
 
@OctavianDamiean this does jsfiddle.net/TtgM7
 
Oh wait, now that I think it through, of course it should call itself every second.
 
11:19 AM
yeah :)
but I don't see why the first example doesn't.
 
This is interesting though.
Maximum call stack exceeded.
I really don't see why it wouldn't do the same.
 
@FlorianMargaine I think the problem is that in the second call this.f is undefined.
Because the context isn't the object o anymore.
This code works.
 
11:35 AM
@ComFreek I'd guessed that, but why?
 
@FlorianMargaine Why? setTimeout() calls the callback function without a context.
 
@OctavianDamiean in your fiddle it's normal for the max call stack
@OctavianDamiean no that's for the code in a callback function
 
You can also wrap it in another function: jsfiddle.net/FYSnA/4
 
@ComFreek why does the 2nd call work then?
If you bind, there is no need to wrap
this.f.bind(this) is enough
If you wrap, it's simpler to do var that = this
 
11:43 AM
@FlorianMargaine You're right. The second call works because:
- o.f(): triggers the first call and logs `f`
- the first timeout will trigger the second call and log `f`
- then setTimeout() fails initializing because this.f is undefined
Example with more logging: jsfiddle.net/FYSnA/7
 
Gawd dammit.
First time I'm seriously stuck myself.
 
!!> console.log('42');
 
@ComFreek "undefined" Logged: "test"
@ComFreek "undefined" Logged: "42"
 
Uhm, yea. Well, I'm writing a userscript for a browser game. Now that browser game has inline event handlers on certain elements.
 
11:53 AM
What's the problem, now?
 
The problem is, that they didn't just define which function to call, they also added all parameters including a shitload of HTML into it.
Now, it contains the double and single quotes.
Kinda like mixed.
dlt('<br> Inhaber: <b>-keiner-</b><br>PlanScan: <font color="#FF0000" size="-2"><strong>-nie-</strong></font><br><table border=0 cellpadding=0 ><tr align=right><td><font size=-3>Rohst.:</td><td><font size=-3>Vork.:</td><td><font size=-3>Bebauung laut Scan:</td><td><font size=-3>Bestand:</td></tr></font><tr align=right><td><img src="/static/img/research/ress_ore_small.gif"> </td><td width="15%">50 %</td><td rowspan=5 width="140px" align=right><img src="/static/img/planets/planet61_s.jpg" height="100"></td><td><font color="#999999"></td></tr><tr align=right><td width="10%"><img src="/static/i
That's an example.
I just can't do anything with it.
 
Wondering whether this is from an incompetent developer or from a very good developer doing obfuscation here :D
 
If I convert it to a string, it obviously fails.
@ComFreek rather incompetent.
The entire website appears to be done with Dreamwaver.
I'm not sure how to approach this.
 
Why does converting it to a string fail?
 
@ComFreek Last line, there's a line break.
 
11:57 AM
Just get the onclick attribute content
 
I can't get rid of that line break because, well if I convert it to a string it is illegal.
 
Extract the inner contents of the function call
 
@ComFreek Uhm, what are you talking about?
I mean this is the element it's set on.
<a href="?op=planet&amp;index=57271" onmouseover="dlt('&lt;br&gt; Inhaber: &lt;b&gt;-keiner-&lt;/b&gt;&lt;br&gt;PlanScan: &lt;font color=&quot;#FF0000&quot; size=&quot;-2&quot;&gt;&lt;strong&gt;-nie-&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;&lt;table border=0 cellpadding=0 &gt;&lt;tr align=right&gt;&lt;td&gt;&lt;font size=-3&gt;Rohst.:&lt;/td&gt;&lt;td&gt;&lt;font size=-3&gt;Vork.:&lt;/td&gt;&lt;td&gt;&lt;font size=-3&gt;Bebauung laut Scan:&lt;/td&gt;&lt;td&gt;&lt;font size=-3&gt;Bestand:&lt;/td&gt;&lt;/tr&gt;&lt;/font&gt;&lt;tr align=right&gt;&lt;td&gt;&lt;img src=&quot;/static/img/research/re
Yes, that ugly.
Ah, crap wrong copy button.
 
@FlorianMargaine ?
 
getAttribute("onmouseover") should get you the whole string. Then extract the inner contents (starting with '&lt; and ending with ;)
 
11:59 AM
@FlorianMargaine Still an issue?
 
@ComFreek No.
 
@BenjaminGruenbaum kinda.
 
this becomes window on the second iteration
 
What you see here is not like that in code. It is just how the dev tools copy it.
 
12:00 PM
Why? It's called from an object context
Oh no, setTimeout calls it... brain fixed
 
Never mind, if it would be that simple, I wouldn't be asking.
 
@OctavianDamiean fiddle
@BenjaminGruenbaum I know about the bind, don't worry
 
@FlorianMargaine Yeah :) Arrow functions would fix that
 
12:29 PM
thanx,yes it is being run in a loop and about id's being unique ,i have specified css rules for the id "suggestion", and i need every div produced by the loop to have the same id,so that i don't have to specify rules for every id the loop produces — Kiran Gopalakrishnan 2 hours ago
.......................................
 
New definition of unique: only one ID in the entire document, used multiple times
 
0
Q: Optimizing concept before going into production - isotope jquery

Parallel 2neI have been updating the search UX on my site and have developed a new concept which uses the isotope plugin. This was used to help show the users that the search results move when the filters menu is opened. I currently limit the search results to 20 results but would like to show upto 50 but ...

 
Never mind, I forgot about window.escape.
Now I can work with it.
 
12:49 PM
@ThiefMaster Why did you get a downvote there? (+1 btw)
 
i have no idea. maybe "it doesn't answer the exact question so -1" even though it does solve the OP's problem in a cleaner way
 
This code makes me want to cry. This is abad solution to the problem that keeps the code unmaintainable and unclear. — Benjamin Gruenbaum 5 secs ago
That whole question makes me want to cry.
@BadgerGirl I think I can find yours before you can find mine :) Wanna bet?
 
1:06 PM
posted on October 27, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Emails about how wrong I am in 3... 2... 1...

 
1:23 PM
@BenjaminGruenbaum No, don't start searching!
 
@BadgerGirl Didn't take long. Anyway, back to work :)
2
 
That was so long ago! I'm not that fat anymore. :(
 
1:36 PM
Should've thought of that before taking those pictures
 
1:50 PM
@copy is quite blunt there.
 
am home
and feeling how bad of a decision was to remove windows :-/
Ubuntu friken disables the whole process to networking in sleep mode and it never comes back .. have to reboot ... what is this windows xp ?
 
01:00 - 14:0014:00 - 00:00

« first day (1107 days earlier)      last day (3826 days later) »