« first day (784 days earlier)      last day (4165 days later) » 

12:00 AM
fbi is close
 
Hi, guys, I have a little trouble. Tell me please, where is syntax error? gist.github.com/4237665
Uncaught SyntaxError: Illegal return statement
 
points at @jAndy - It was him, I've witnessed!
 
@NiLL: SyntaxError: return not in function
I can't find better words
 
@NiLL Most likely somewhere near the return statement? :D
 
there is no java without script.. and there is no return without function
 
12:04 AM
Right.
 
I just need to break for...
 
@NiLL: if that code is located within a function, you can omit the break and just return (the break would be unreachable code anyway)
but if there is no function.. then you just have to call break
 
@jAndy tnx for advices )
 
/test
 
/me
 
12:06 AM
:c
 
/topic flood ^_^
;-(
 
!!/stat
 
lol
 
@jAndy jAndy has 57784 reputation, earned 10 rep today, asked 48 questions, gave 1744 answers, for a q:a ratio of 3:109.
 
/rankstat
 
12:07 AM
:S
/rankstat
!!/stat
 
@Tgwizman That dude sucks
 
lol?
 
She doesn't like you.
 
obviously :p
 
IO.xhr({
    url : '/ws-auth',
    data : fkey({
        roomid : roomid
    }),
    method : 'POST',
    complete : finish
});
@Zirak wat!?
This fkey function is confusing the heck out of me.
 
12:18 AM
new Array( 5 ).join('Life' / 'is' / 'Life');
ahhhhh spelling fail
uneditable ! fuuu
new Array( 5 ).join('Live' / 'is' / 'Life');
 
You know, it's actually Live Is Life. :D
 
rofl
 
Right, now you can help me figure out what the hell Zirak is doing on this line.
I just don't understand how the hell this is supposed to work. :D
 
errr, he is calling a function fkey() ?
 
Well, I got that but I can't find that function anywhere.
It's like coming out of nowhere.
 
12:30 AM
yep seems odd, unless that is located on the global object
 
Why not console.log() it?
 
Never mind ... I'm an idiot.
It is on the global object.
Dis so embarrassing ... I Robot Idiot
 
Don't worry, today I made a Led Zeppelin reference and nobody noticed :-(
 
At least now I understand why the bot can't run as a service.
 
back =3
 
12:45 AM
@OctavianDamiean not without openID... which iirc he is working on... sparingly.
 
@rlemon How does he get a valid fkey from a service?
 
he doesn't. it's the chats way of identifying the room I would suppose.
 
exactly.
no chat API === shifty behaviors
 
12:46 AM
agrees
 
tips glass .... then sips
 
I think we already had that plan (more than once) but anyway, we should write our own chat system. :D
 
go for it
use node on the server ;)
 
and websockets.
 
mhm
 
12:47 AM
and and and
 
Yea, Socket.io
 
unicorns EVERYWHERE!!!!!
 
COMMANDS!!!
YES
 
In the end though I end up playing BF3 instead of being productive ...
 
even if I normally respect eich alot.. this one hurts to watch
 
12:48 AM
commands, specifically: /me, /help, /topic, /etc
 
for me, D3, Just Cause 2, and AwesomeNauts.
 
Fucking games.
 
Psychonauts is better ^.^
 
@jAndy You can tell him that next time he's online. He's always smiling, has a mustache and has the skin color of a lemon.
 
12:50 AM
;)
 
Meh, time to get some sleep. Laters everyone.
 
night
 
1:16 AM
ok after watching like 5 talks from last jsConfEU... GOD AM I GLAD I WASN'T THERE
lmao.. fail after fail
 
 
3 hours later…
4:36 AM
^ This is just incredib-epic , stupidest pic of millenium ;D
 
 
4 hours later…
8:38 AM
@jAndy why? (didn't watch it, I can't hear english on youtube without subtitles)
 
@FlorianMargaine Sound problems or problem with accents?
 
hearing problems
I need subtitles in french too
 
8 hours ago, by jAndy
That has subtitles from YouTube
Click the CC button
It isn't really great, though
 
yeah, it's the automatic subtitles
they suck
"we figured out a way king able snake classes from the middle east there"
really....
 
Hahaha
 
9:22 AM
hey guys
can you help on this ?
please help me if you can :(
 
Sri
Hi
I am using tinymce editor and trying to implement ajaxfilemanager plugin. Now in my case, I can upload the image on server but whenever I double click on the image it is showing undefined in Image Url text field.
 
@OctavianDamiean It's some chat auth stuff. Inspect it in the console.
 
9:44 AM
Guys, I'm trying to experiment if my application can give fall back features for older browsers that do not support HTML5.
I'm just wondering what method do you guys use to do this? Do you have multiple versions of same browser installed on your machine?
 
9:54 AM
@TemporaryNickName absolutely
if you really care
 
I'm trying to rely this on modernizr without actually testing it, do you think it is alright?
 
@TemporaryNickName yeah yeah sure, you can always just test it in production.
 
10:24 AM
@OctavianDamiean It's part of the DOM; see document.getElementById('fkey') so...DOM access is very much needed.
Can anybody invite me to a new room? Want to test something
 
10:43 AM
Fine. Don't. See if I care ;-;
 
user1125394
11:02 AM
Do you know other lib like couchapp.couchone.com/docs/_design/docs/index.html#/topic/… for writing event code?
 
;D
@AmaanCheval where the hell are u ?
 
11:39 AM
@Abhishek Been a little busy
Right now, I'm playing Saints Row
 
@AmaanCheval have fun!\
 
Thanks
What have you been upto?
 
If I may repeat the earlier request, can someone send me a private-room invite?
 
What kind of private room?
The one where only invited people can join?
Or the typical "room for x and y"?
 
Just a "new room with user" thingy
The latter
 
11:45 AM
done
 
Awesome, thanks
Wanted to see how the chat handles it, too add an option for private rooms in the bot or something...part of a general leave-and-join thingy.
 
@AmaanCheval re factoring C++ code and fixing leaks .. yeah being a plumber
@ThiefMaster tips for fixing memory leaks ?
 
delete stuff you created using new. Not much more to say without seeing any code.
If it's a simple program run it through a memory debugger like valgrind which has a memleak detector
That won't do a good job for something like a node plugin though
 
i am not even using new :-| , probably the leak is in the part where libavcodec fills the buffer with the data
 
Check if there are possible dangling references in closures, set null to every big thing after you finish using it to promote GC
 
user1125394
11:54 AM
noone for my question? I'd like to write an ajax js code without all callback indentation
 
Then don't use inline function expressions; create functions, pass them to callback. e.g.:
foo.registerCallback( bar );
function bar () { ... }
(obviously made up, but an example non-the-less)
 
user1125394
@Zirak in my code I have 2 or 3 indented ajax requests, latter wait for former responses
 
And that prevents you from declaring functions and passing those in because...?
 
user1125394
o ok
 
HJV
12:20 PM
hello all
 
is it possible to plug a keyboard into a bluetooth adapter? all the bluetooth keyboards suck, and all the good keyboards have a cable...
 
!!/mdn RegExp
 
@Zirak nailed it , thanks man :D
 
Enjoy
 
12:31 PM
the javascript gc collected off the object , and it was libavcodec ^_^ ... yay so happy now :D
 
user1125394
@Zirak w3future.com/html/stories/callbacks.xml is this a good way to chain ajax calls?
 
Any of you ever used "Table filter"? That JS.
This: tablefilter.free.fr/doc.php

I tried to use it on my page but the properties just won't load. The filter itself appears, but it messes up the layout. So I want to have properties set up... e.g.: make it appear correctly.

This is the code I used to implement it:
<script language="javascript" type="text/javascript">
                //<![CDATA[
                var tf1_Props = {
                    exact_match: true,
                    alternate_rows: true,
 
@Zirak I heard you're working on a chat bot service?
 
Whoops, that became a bit lengthy, sorry.
 
12:42 PM
@cyril That looks like a promise interface (IIRC, jquery has them...maybe called them deferreds or something of that sort). I'm not a big fan, more into pub/sub and events in general, but whatever works for you.
@OctavianDamiean Word gets 'round to your part of town?
 
@Zirak How did you plan to get the fkey from a service? :)
 
2 hours ago, by Zirak
@OctavianDamiean It's part of the DOM; see document.getElementById('fkey') so...DOM access is very much needed.
 
whoa! The chat didn't tell my about mentions!
I knew that it's part of the DOM, which is why I was wondering how you'd get it. Are you going to use Lynx or something like that?
 
user1125394
@Zirak you rather trigger events inside a callback, you mean? and thx
 
Amaan made me consider headless webkit, like Zombie or Phantom
@cyril Yeah, I'm more of an event fan
 
12:45 PM
Mhmm, sounds interesting.
 
I mean listening to events triggered by stuff. If the thing you're latching onto has no event-emittion, then that sucks, but if it does...
 
Anyone halp? :(
 
user1125394
@Zirak and you write a pile of bind / attachEvent ?
 
Something of the sort
 
PhantomJS looks quite promising.
 
12:50 PM
Hey guys
I am having some issues with jQuery $.post with nGinx
 
@HarryBeasant It's just nginx or NGINX, not nGinx.
 
@OctavianDamiean you know octavian , people like Style ;D
// To all in this room , since we already hate jQuery so much lets write a dom-normalizing / wrapper library as a community project of this room ? supporting IE 8+ ? what you say ?
 
Style my ass.
@Abhishek What for? :D
 
@OctavianDamiean for using lol
 
I'd rather write a chat system.
 
12:55 PM
Oh right sorry
 
DomShim looks good
 
Wow. I just managed to make giant functions...just to somehow avoid executing a regexp twice. Fuck speed...I'm executing that fucker twice.
 
Well, i just changed to nginx
and all the $.post are now not working
 
@OctavianDamiean i am already doing one :3 just with rtc
 
Hey guys, if I want to reset my db, I have to start dropping tables from the most descendant tables right?
 
12:55 PM
@Abhishek Matt's DOM Utils look neat
 
@rlemon ^ add that to the chat's site then across with dom-shim
 
@Abhishek with RTC? Isn't RTC and acronym for Real Time Communication?
 
@TemporaryNickName SQL has a DROP DATABASE statement
 
@OctavianDamiean yes my friend
 
i want to avoid using that
 
12:57 PM
Why?
 
user1125394
@OctavianDamiean #ass { font-family: arial;}
 
because it is a part of requirement that which db I am going to use is specified already
 
@Abhishek Well, I sure hope your chat system is going to be RTC because otherwise it'd suck, isn't that the entire purpose of chat systems? I mean to be real time? :D
@cyril Punny.
 
@OctavianDamiean Skype ?
 
I don't understand.
 
12:58 PM
@TemporaryNickName You can use SHOW CREATE DATABASE if you want to duplicate it
 
hmm right
 
@OctavianDamiean dont worry i will give u a demo soon
if u feel like joining , join forces :D , and this time i mean soon (x
 
But sure, you can use SHOW TABLES, iterate & drop.
Just seems silly
 
user1125394
-7
A: Correct usage of addEventListener() / attachEvent()?

KT.As for your question: your first method seems weird. The second and the third are both probably OK. However a more general remark is probably appropriate: the only reasonable cross-browser secure way of doing this stuff (as well as more-or-less any JS stuff in the browser) is by using a javascri...

 
@cyril ass is an element
it should be
 
1:01 PM
@Abhishek What's your communication protocol and persistence layer?
 
ass.OctavianDamiean{ // styled ass for @OctavianDamiean
 border-radius:30px / 50px;
}
 
user1125394
funny how accepted answer is so low ^
 
user1125394
@Abhishek good one
 
user1125394
2500px; :p
 
This ass is very stylish: pastie.org/5498321
 
1:03 PM
@OctavianDamiean Comm. wise [for calls] it uses the native p2p sockets as the webRTC spec , otherwise it falls to tcp based websockets [ yeah this one is crappy but aww well ]
 
@AmaanCheval Just wanted to let you know that it's going to be a Samsung Series 9 13.3" notebook. :)
 
Awesome!
 
@Abhishek Why would websockets crappy?
 
I had a feeling you'd just end up going with both the Samsung and the Dell :p
 
TCP
afaik UDP is better for live video and audio
 
1:05 PM
Wait a minute! I don't want A/V support anyway.
 
user1125394
@Abhishek but not for a multiuser chat
 
Do any of you use laptops primarily?
 
I want a text based web chat similar to this one but better. :D
 
Mine supports text still lol , infact audio and video are just added features , oh and yes on iOS and Android it uses UDP sockets .. Titanium i love u <3
 
I think we're both looking for different things. :D
 
1:06 PM
true :D
 
@Abhishek Android supports websockets, just fyi. ;)
 
@OctavianDamiean I dont wanna use web-view
+ lowest target device is android 2.3.3 le GingerBread
 
user1125394
webrtc is not maybe the best for sharing data / content with reliability, like a multiuser chat
 
@Abhishek Meh, what for? That's just a waste of time.
2.3.x usage is not going to increase but only decrease and that quite rapidly, especially after the holidays when more people will likely get new devices. ;)
 
@OctavianDamiean I myself have like 30 friends who use gingerbread devices and samsung india is bringing more devices with gingerbread in the market , these people are utter noobs dunno if they can upgrade the android [ in most of the cases cheap devices lke galaxy y cant even handle it ]
true that but meh , i want my friends to use that .. they wnt buy new phones .. they are happy with Samsung Galaxy Y
 
1:10 PM
@Zirak did you consider jsdom?
 
It is your time you're wasting, not mine so I'm fine with whatever you wanna do. :D
 
@FlorianMargaine dom.js is a good alternative make sure u see it aswell
 
@FlorianMargaine I haven't considered anything yet, as before I can approach the chat I need to log-in, which is where I'm stuck
 
there are plenty of openid implementations for node.js
oh -- the other side
 
1:12 PM
Really? They must be invisible as well
 
^
 
Wait, that's where you're stuck?
 
Correct
 
@Zirak If you use something like Zombie.js, it'd be easy
 
Are the existing Node.js openid libraries of no use? I mean is something wrong with them?
 
1:14 PM
However Zombie uses JSDOM, and that has a bug where document.write replaces the entire body no matter where it is
 
I know it should be easy
 
@OctavianDamiean They're to let users log in to your website
What we want to do is to log in to another website
 
But "should" and "is" are different words for a reason
 
@Zirak Might wanna do this .. load the page in zombie js and login programmtically ? via zombie but again so creates awesomeness with zombie
 
Oh, right, I forgot.
 
1:15 PM
@AmaanCheval did you report the bug?
 
Yeah, that's the option with a headless webkit. I know what to do in general terms, but I failed in practice.
 
@FlorianMargaine Yeah, it's filed as an issue
 
QT & its WebViews
 
And, right now, it doesn't interest me that much that I'd spend more than the 30 minutes on it
 
I filed it to Zombie's repo, they figured it was JSDOM and will work on fixing it
 
1:17 PM
If you wanna do it, I gladly accept pull requests
 
hey could anyone please help me for stackoverflow.com/q/13770841/1211329
 
2
Q: Single Page Application architecture using asp.net mvc 4 and fallbacks if javascript is disabled

SidPI have started designing my application architecture and want to make it as a single page application based website using mvc4. I have decide to use web api(AJAX/JSON) as service layer between view and data layer (EF code first). Thought to use mvvm pattern for my views this time using knockout.j...

woa, the title sure doesn't make me want to look at it
 
actually this one has many tech. in it
but javascript problem is the 1st point
that I am not able to make d decision
 
Uh ... implementing an OpenID authentication process is so painful. I hate it.
 
Instead of doing boring stuff like making the bot less sucky, I spend time doing THIS:
beer!s/OpenID authentication/anal sex drone/
@Zirak Uh ... implementing an anal sex drone process is so painful. I hate it.
2
 
1:24 PM
@Zirak how's dvorak going?
 
Gave up
 
noob. :<
 
@Zirak I agree, that too is painful.
 
for public facing apis, if being called by javascript/jquery's ajax setup, how one can secure that call so that not anyone can use it. There are some ways to pass encrypted username n password in page header using beforesend(). But is this secure as username and password is written there and also anyone can change it....?
 
@Zirak Did you checkout the official StackExchange JavaScript SDK library thingy which features a full authentication mechanism?
 
1:28 PM
huh.
That may simplify things.
 
WTF is the !== operator?
 
That's a great question. You should ask Google.
 
@Nils Not identical?
 
Or apply what you already know, and how there are == and ===, so there are their brothers != and !==
 
meh it is confusing
 
1:35 PM
Nope.
 
best is to just not use !=
 
Statement or question?
 
do you see a question mark?
 
No, but I've seen questions worded in more twisted ways. Just making sure.
 
0
Q: Alchemy like game for the web, open source. Any ideas for element combinations?

JohnDelI created a web game like the android game alchemy. It's open source https://github.com/johndel/alchemy and in the backend you can create your own elements / your own game. A very simple demo is here: http://78.47.39.124:4100 I was wondering what elements - ideas would be good to implement as a ...

 
1:45 PM
function swap(var a, var i, var j) {
var tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}
How can I make sure that an array is passed by reference (and not by value)?
And is this the way to swap elements in an array in js?
now there is a question :)
 
115
Q: Is JavaScript a pass-by-reference or pass-by-value language?

Danail NachevThe primitive types (Number, String, etc.) are passed by value, but Objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object ...

 
Do I need to write var when defining the function arguments?
 
So if I want to ensure that it is passed by ref I check weather the thing passed is of type object? In this case the pointer to the object is passed by value so I can access the object by ref
 
Shop9's answer is actually spot on.
49
A: Is JavaScript a pass-by-reference or pass-by-value language?

Shog9The variable doesn't "hold" the object, it holds a reference. You can assign that reference to another variable, now both reference the same object. It's always pass by value (even when that value is a reference...). There's no way to alter the value held by a variable passed as a parameter, wh...

 
1:56 PM
yeah
Why says jshint: "Use function form of 'use strict'"?
So I am supposed to pack the whole script into a function?
 
80
Q: JSLint is suddenly reporting: Use the function form of "use strict"

ZhamiI include the statement: "use strict"; at the beginning of most of my Javascript files. JSLint has never before warned about this. But now it is, saying: Use the function form of "use strict". Does anyone know what the "function form" would be?

 
lol
 
anyone willing to help with the filter problem of mine? :/
 
@Shiki Put it in a fiddle if possible and link us to it, maybe someone is willing to.
 
2:02 PM
alright, sec.
there is nothing really to paste, only the javascript snippet that adds the search row
I mean, it's a .js script itself (which you include), and then you have to add an additional row by calling the function with the snippet.

However, the added row won't have the options I set up.
Like... "alternate-rows: true" .. nothing happens.
The script should be initiated like this:
var tf1_Props = {
exact_match: true,
alternate_rows: true,
col_width: ["10px","10px",null,null,null]
};
var tf1 = setFilterGrid( "filtertabla", tf1_Props );


But the "props" have no effects.
 
That's all dandy and stuff but I can't help you without taking a look at supposedly working code.
 
well... if I compress the whole folder with everything and send it to you.. will that do?
I mean, I can't really put the whole PHP site to JSFiddle
or if I upload it to my site, you won't see the source
 
and why do you have to write:

var i;
for (i=0; i<a.length; i+=1) {..}

instead of

for (var i=0; i<a.length; i+=1) {..}

?
 
You don't have to. (there's i++ btw)
But there is no block scope and the second version is less explicit about this
 
ah my book said the first variant
 
2:18 PM
@Nils Your book's author didn't really get it then.
 
Js the good parts is what I have.
 
It's not a matter of defining the variable outside of the loop definition but about fetching the array's length outside of the loop definition.
Interesting that the Crock didn't think about it.
 
Any good interpreter will optimize that anyway.
And "defining the variable outside the loop" just re-enforces the fact that the scope of the variable is the function, not the loop.
 
@RyanKinal Ah, maybe that's why he didn't bother doing it then.
 
humm var i, j; does not make jshint happy
 
2:22 PM
I declare all my variables at the top of the function, because they get hoisted there anyway.
 
Ah yeah I read somewhere you should do this in js..
 
Yea, it's considered good practice.
 
Note that declare doesn't mean define, though. I often wait to define my variables (give them a value) until it's needed.
 
!!/refresh
(let's see how editing looks like...)
 
@Zirak (source) !! s/test/test/
 
2:38 PM
!!/todo
 
@Zirak Could not process input. Error: userCache is not defined
 
2:54 PM
!!/listcommands
 
@rlemon Available commands: help, listen, eval, live, die, refresh, forget, ban, unban, regex, jquery, choose, user, listcommands, purgecommands, define, norris, urban, parse, tell, mdn, beautify, convert, get, google, hang, learn, slap, nudge, ring, roll, spec, stat, todo, undo
 
!!/help get
 
@rlemon get: No info is available
 
!!/get
 
0
A: Javascript, passing on a mouse event

rlemonel1.addEventListener('mousemove', handler, false); el2.addEventListener('mousemove', handler2, false); function handler(e) { // do some stuff handler2.call(el2, e); // pass el2 as this reference, event as the argument. }; not too sure if this is what you are looking for, just name the e...

 

« first day (784 days earlier)      last day (4165 days later) »