« first day (1912 days earlier)      last day (3036 days later) » 
00:00 - 22:0022:00 - 00:00

12:10 AM
Are you guys still using iojs
 
No
 
Ok thank you
 
12:56 AM
Yahoo.com - Oh dear 2000's
 
1:52 AM
What can I use instead of Object.observe to watch for changes on a non-DOM object? Seeing as how Object.observe was removed from the spec
 
Make it explicit
Explicit is better than implicit
 
what?
 
Does the data(o.name) related to this block sits in DOM?
     <div ng-controller="emp as o">
        hello {{o.Name}}
    </div>
 
When something changes, you make the updates explicitly rather than implicitly
 
Well yes, that would be ideal, but I'd rather do this cleverly instead of make some silly function like, "updateProp"
 
2:06 AM
I want to add a "div" tag randomly in a "section" element
 
I want to win the lottery; what's your actual problem?
 
lets say I have 5 div tags to append to the section element... I want to append them in a random order. 5 2 3 1 4
Right now I use appendChild
 
@ndugger It's not silly, it's the right way to do it
 
@ndugger Does that make sense? I'm showing a list of articles, i just want to randomize how they show up.
 
Aye, just randomize them in memory, then loop through and append to dom. Should be pretty simple. Your first step should be to figure out how to randomize an array.
 
2:17 AM
already skipped ahead... dumped it down and found my solution. :)
@ndugger thanks
 
@copy Yeah, I just have an object that is tied directly to a DOM element, and I want the change the dom element when someone changes a property of the object. You're right, though, it would be proper to change it in a function call. I just wish I didn't have to
 
2:36 AM
a setter
either that or some kind of polling like angular
in the future, Proxy
 
2:48 AM
AngularJS. I learnt that scope sits in DOM attached to the element. How do I access that memory thru DOM?
         <body ng-app="sample">
            <div ng-controller="emp">
                Hello {{Name}}
            </div>
        </body>
How do I access Name thru DOM?
 
So my array shuffler works on [1,2,3,4,5] but doesnt work on childNodes ???
element.childNodes
 
childNodes is not of type Array
it is of type NodeList
 
3:04 AM
oh.... what do I do? how can I get the nodelist to be an array or get the child elements as an array
or maybe rewrite this to work with NodeLists jsfiddle.net/hd9hsedv
YES! I built a small array conversion function it works!
 
3:33 AM
9
Q: Pass Angular scope variable to Javascript

JPNI am having a Angular scope variable streetName. <script type="text/javascript"> angular.module('addApp').controller('add', ['$scope',function($scope) { $scope.streetName = "Bonita Ln"; }]); </script> How can I access streetName in a javascript defined under this controller ...

protip: don't
do whatever you need to do in the controller. you can access the dom via that, and it's easier/better practice
 
 
2 hours later…
5:08 AM
How do I let users set my page as the home page, quickly? any javascript to ask users if they want to do that?
 
No
 
protip: users don't want to set your website as their homepage
 
They do when it's my excellent website about ponies !
 
lol
what would make inline-block elements work differently on mobile browsers. It appears to be leaving gaps all over what was my perfect grid :(
 
6:12 AM
github.com/iefserge/eshttp also a good project to contribute too :D
 
!!s/nie/rno/g
 
@copy That didn't make much sense. Use the !!/help command to learn more.
@copy They do when it's my excellent website about pornos ! (source)
 
6:30 AM
Anyone has ever had this problem jsfiddle.net/9y51z9ro/1
When using ng-checked the model doesn't change
 
 
2 hours later…
8:21 AM
@ndugger is that even still possible?
 
it is
at least for porn sites
@feniixx don't think that's supported
 
9:26 AM
!!abhishekpornfreak
 
Jan 21 '14 at 16:46, by Abhishek Hingnikar
they love there work like i love p***. maybe i should do a p*** site !
 
Hi everybody
Is it possible to call debugger from Chrome Developers Tools on the hosted website? So, I can insert debugger in the .js file, but it's already loaded and that line (that I need) doesn't execute again (so debugger doesn't start)
 
@Evghenii you can just add breakpoints to a hosted site.
 
so breakpoints are kept after reloading the page, yeah?
the script is obfuscated, and breakpoints can be added only for a single line of code...
Ok, there is scripts.min.js file (that is loaded), but there is also scripts.js (that is not obfuscated version of the first one). Can I switch them in Developer Tools?
 
9:47 AM
Morning
 
morning
@argentum47 ping me on hangouts when you come
 
@MadaraUchiha yaaay
 
@Evghenii Yes
@Evghenii Not necessarily, read about source maps
Awal Garg moved to Trash can
 
@MadaraUchiha wait a minute you can move meta messages? :o
 
@AwalGarg Can delete them too.
Imagine a rouge RO spamming the room with immovable "1 messaged moved to other room"
But that's about it, we don't normally move meta messages because they're flagposts for context
 
9:59 AM
@MadaraUchiha o/
 
when is the next room meeting? I won't be as active as before, but I have got some points to raise related to recent events.
 
I had some really good Oysters the day after we went to Romano as compensation for my suffering :D
@AwalGarg room culture is dead, there are no meetings, when we tried to schedule them no one showed up.
 
@BenjaminGruenbaum here is the best way really using a mutable counter?
Feels a bit dirty :P
 
@AwalGarg Pretty much just pin whatever suggestion you have and people will talk to you about it.
@MadaraUchiha well, I could do an Observable.from on an array and flatMap on that I guess.
 
@BenjaminGruenbaum it is related to a specific RO (you should have guessed by that), so not sure about publicizing it.
 
10:02 AM
@AwalGarg ping me on hangouts?
 
@AwalGarg Well, is it OK to publicize it during the meeting then?
 
Observable.from(lines).flatMap(l => rp(BASE_URL + line)) would probably be a lot cleaner.
 
@MadaraUchiha on miaou, yes
 
Fair enough
 
flatMap(...) ?
 
10:03 AM
rx
 
ok
 
@Luggage I just thought about something reaaaaally stupid. To push to a git repo, you need write access.
 
@MadaraUchiha, thankx. I got it to work
 
this makes using zed on github pretty useless for public repos.
 
10:25 AM
-+
 
10:45 AM
> Since June, researchers have found and reported several dozen serious flaws in antivirus products from vendors such as Kaspersky Lab, ESET, Avast, AVG Technologies, Intel Security (formerly McAfee) and Malwarebytes. Many of those vulnerabilities would have allowed attackers to remotely execute malicious code on computers,
> to abuse the functionality of the antivirus products themselves, to gain higher privileges on compromised systems and even to defeat the anti-exploitation defenses of third-party applications. source
i was like "wtf ?"
and happy that i don't use AV's from these vendors
 
10:59 AM
also @BenjaminGruenbaum did you miss my question at chat.stackoverflow.com/transcript/17?m=27992073#27992073? :(
 
replying in es room
 
11:35 AM
@Zirak Welcome back! :D
How long do you plan on staying? :p
 
crl
12:19 PM
Guys, what's the instance of document? hmm Document :)
 
12:31 PM
OK, so there was inline javascript in HTML. Now we can go deeper:
0
Q: node.js: calling js function in server response

SaadHI have a js file, where I am creating a server, and in the response message, I am displaying a text area with a button. I am trying to call a function on the click of the submit button, but have been unable to do so. Can you tell me where I am doing the mistake? var http = require('http'); http...

 
crl
12:51 PM
!!i‬‬‬‬‫s it Sunday today?
 
Yes.
 
crl
!!i‬‬‬‬‫s yes your only possible answer?
 
Yes.
 
crl
!!i‬‬‬‬‫s 1+1=2?
 
Yes.
 
12:53 PM
Ugh, I just started the coffee maker without a cup in it.
!!forget is
 
@rlemon Command is does not exist.
 
crl
no don't please it can be useful :)
!!tell Cap i‬‬‬‬‫s it useful?
 
@Cap Yes.
 
That porn api link made me learn about Mashape. Is that thing good ?
 
1:30 PM
Anyone else seeing syntax errors when trying to join rooms?
> Uncaught SyntaxError: Unexpected token * : line 332
 
doesn't occur at me
 
Close this as duplicate or not ?
3
Q: How toString().call() on object prototype is fetching the type of Array in Javacript

Tech SolvrI am looking at the code of finding whether an object is an array on not, so I came across this link - http://stackoverflow.com/a/4775737/639406. The code is working fine, but I am not able to get how it is comparing with [object Array] I tried to get the typeof Array but its throwing an objec...

 
trailer of a new game i'm interested in the concept.
 
1:54 PM
Good catch, should probably be Observable.from(lines).map(x => rp(BASE_URL + line)).flatMap(x => x) instead of that explicit construction. — Benjamin Gruenbaum 3 hours ago
@BenjaminGruenbaum You should probably edit that into your answer ^
 
2:10 PM
it would be confusing if he wrapped that literally in the answer. Maybe as an alternative
 
If anyone with ui-router experience could check out my ticket github.com/angular-ui/ui-router/issues/2451 and tell me if I just fucked up the code, that'd be nice
 
crl
2:33 PM
Node.ATTRIBUTE_NODE == 2 ( node attribute ) hmm someone ever dealt with that? node types
 
@crl What's your problem ?
 
crl
knowing what's an attribute node
 
An attribute, no ?
 
crl
you mean the attributes attached to a Node?
 
In fact it needs checking, I don't really know if attributes appear as nodes in the dom
doesn't seem so
so I'm clueless
Somebody less lazy should write a 3 lines function to iterate on nodes and list the one of type attribute...
 
crl
2:38 PM
document.createAttribute('id') // id="" wow, seems weird to call put them as nodes
 
It looks like they're nodes, but not iterables like other nodes...
 
crl
yea
 
are these not a ... property of a node ?
meh, your link directs me to the french MDN which sets the language on fr >.>
had to switch back
 
(cc @BenjaminGruenbaum)
 
2:54 PM
Upvoted, but I'll remove my vote if Ben explains it's lame ;)
 
@MadaraUchiha mini review: TL;DR
decent answer i would say
 
Why does the question use setTimeout ?
 
@DenysSéguret it's fine, but verbose
upvoted too
 
@MadaraUchiha retries === 0 XD. Also, OP's code delays retrying, so your function could take a retryDelay parameter, but I guess leaving it as an exercise for the reader is a better option.
 
crl
Guys, I'd be very grateful if you could upvote wpdev.uservoice.com/forums/257854-microsoft-edge-developer/…
 
3:10 PM
@DenysSéguret - this is already built in to mongoClient, the default number of retries is 5, and the default timeout is 5 seconds, and it can be easily changed like this
MongoClient.connect(url, {
    db: {
      retryMiliSeconds : 5000,
      numberOfRetries  : 3
    }
}
 
crl
people (OP) don't read docs :)...
 
crl
not crazy high joke level
 
3:38 PM
old joke. A belgian presenter did the same using french fries and mayo
 
crl
I just hope they didn't waste that bread :p
 
would you eat a slice of bread which got dropped on the ground ? :o
 
crl
I eat worst things :p
 
the most dirtiest food i ate was a just dropped candy on the sidewalk, with some earth around it.
 
crl
3:42 PM
yeah, I knew some people who could take chewing gums on the floor :p
 
keh
 
crl
they were too young to realize yet I guess, but seriously the digestive system doesn't really mind it
 
How can we improve the Microsoft Edge developer experience? -- By using Chrome?
People should really stop developing more than one browser
 
crl
Jon ... Edge is for replacing IE
and it's quite solid, except their buggy debugger
 
Yes, and support wise it's quite good
but still...
Chrome is open source right? Why not work on that MS
 
crl
3:53 PM
but right, I'd happy if there were only chrome and ff
 
@Jonathan concurrency ?
 
crl
MS never really does OS except rare cases, their culture
 
also, one browser isn't good. That leads to a monopoly. And I know that having a monopoly of something (here a webbrowser) isn't a good thing.
 
If it's open source, why not
 
crl
please still upvote :)
 
3:56 PM
Sure why not
 
@Jonathan Easy said than done.
 
crl
isn't their JS engine OS?
 
4:17 PM
 
Netflix and program in between episodes
 
crl
netflix bugs... lame
 
Got netflix yesterday, UI is so shitty I am tempted to write a userscript for it
Popcorntime UI was much better
 
their UI is a hell of a lot better than it used to be, but yeah, it could still use work
 
@rlemon Could you help me out a bit with some microcontroller stuff?
 
4:23 PM
Does this implementation of inheritance make sense: jsfiddle.net/uLqe4b59
I'm reading some stuff on Object.create but I don't really see how that is better
 
crl
class Shit{}
 
@Jonathan Aye, that's how we used to do it.
Object.create was made because some of the JS community is upset about OOP in js, lol
 
crl
wasn't it with prototypes rather?
 
Ok, but how should I implement inheritance in the current era?
 
crl
class Diarrhea extends Shit{}
 
4:26 PM
Object.extend?
 
@Jonathan with classes
 
ES5
 
crl
he doesn't seem to get it
 
ES5 isn't the current era
 
No crl, that's why I am asking :(
@ndugger ok point taken
 
crl
4:27 PM
basically ES6 class is a polyfill for that struggle, if you want to gain time
 
hmm, class is only supported by FF and Edge. You'll probably say I need to use Babel in my project now?
 
Yes
 
crl
chrome sucks yeah
 
Whoo Allison Scagliotti in an episode of Bones--she's cute
 
crl
4:38 PM
makes sense :)
 
How many pennies?
I think it held 2.4kg
 
forgot the amount i've entered :o
but it's hard to guess accurately if you don't know how big a penny is. That pig thing is a standard pigs for children to spare money. The volume isn't hard to get
 
A film/series where I can learn stuff about encryption while lazily chilling in my bed?
 
crl
how do you guys stop the context menu from opening? trying to see google docs dom and their dom is quite deep (the editor content isn' tin iframe), didn't manage to find it back in Elements view, but can't do right-click>see element
should kill the mousedown event handler
 
4:56 PM
window.addEventListener( 'contextmenu', function(e){ e.preventDefault(); } );
that should work. Pretty sure you could have googled it :P
@crl ^
 
I think I guessed 2500 pennies
 
crl
yeah, sawit but doesn't work
 
wait... I don't remember now
 
@ndugger lawl... you could have counted the number of paper wraps opened...
it was about 765 pennies
 
Actually, I remember now, I guessed 1250 pennies
I guessed 25 rolls were used
 
4:59 PM
nah nah nah... much less
 
Says you
 
actually, can you find the picture?
 
no
 
fine >:(
hope your child marries your wife then kills you
and that obama isn't a reptilian
 
crl
woah, that's crazy google docs has a gigantic overlay, that covers each words, with many things
 
5:01 PM
0
Q: Is my PHP code vulnerable to XSS?

Vasile Alexandru PesteUsers in this website use a tool that build a JavaScript object with custom settings. Every time they change something in the input elements i want to execute this javascript code with their own settings and show a preview. So i put an iframe that send a request with the settings in the url. <...

 
move it to review
 
Hey everyone.
 
@KarelG Thou shalt not move crap.
 
Ha!
 
crl
5:04 PM
?
 
I swear. I'm going to kill myself D:
I hate SocketIO sometimes
 
then don't use it
 
crl
socketIO is the jquery of websockets, no longer needed
 
The problem is. I'm trying to connect to a SocketIO server. And I didn't develop it. So yeah. D:
I just need to get the events and messages. (their chat runs through it too)
 
@crl yes and no
socketIO abstracts broadcasting
Which you might or might not need.
Regardless, I'm fairly sure that there are better solutions out there
 
5:07 PM
wooh...... Javascript in pace with Java 8
 
crl
that's a for loop :)
 
@curiousUser 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.
 
broadcast ? that's rarely used
 
Also adds rooms and namespaces
 
unless for core network protocols. Use multicast instead
 
crl
5:08 PM
you do that code logic of subscription yourself, pretty easy
 
You don't need any abstraction. But for RAD and in tight team environments they are nice.
 
whoa, thank you for mentioning namespace.
You just made me think of something
But it's useless for now. It just reminded me to look at something for clarification.
 
Image.FromFile("../../../images/PlateWith0.jpg");
tss
 
i.imgur.com/gALjcww.jpg so I fucked up my foot.
 
Yeah, I just can't do this. Shit
 
5:12 PM
Who needs skin anyways
Amirite?
 
@rlemon Did you have another fight with a piece of wood?
 
This time a patch of ice
It was in cahoots with the driveway.
 
@rlemon lol, so that means that there's a patch of ice out there with a piece of your skin on it, like a trophy.
 
Yes
 
Okay, maybe you guys can help me out with this.
 
5:13 PM
> I fought the ice, and the ice won.
 
Two, my knee got skinned as well
Not as painful.
 
5:25 PM
a 4k wide screen at -40% :o
 
5:38 PM
^ TROLOL
 
crl
what's the joke :)?
 
Its just funny
 
Your weird Indian sense of humour is showing again
3
 
5:59 PM
Nah, he admits it sometimes
 
@KarelG hisense is a crappy TV brand, dont do it!
 
6:34 PM
english question: when a clock gains a second every hour, does it mean that the revolution of the hour hand will be 1 second less or 1 second more than usual?
 
crl
it means it goes too fast I guess so it will be 1 sec more
 
crl
a sort of (ugly) fibo?
 
6:57 PM
In angularJS world, View data is driven by $scope variables. But what are these variables? <div ng-init="name='abc';">
Is view maintaining the data?
 
crl
from what I rememeber it's a way to put some initial scope code inline, usually you don't use it
 
If we can maintain data using ng-init, then why to place data as members of $scope?
 
crl
same reason you try to avoid inline js code in html
is it ok to do? :
!!> var x=1, y=1; /*...*/ x=2, y=2; [x,y]
 
7:13 PM
@crl "2,2"
 
crl
double assign with , instead of ;
(destructuring not yet on Chrome)
 
7:31 PM
quick Q: why this regex don't match any whitespace character on the start of the line? regex101.com/r/cY2fL7/1
/^\s/m
 
crl
!!tell PDK google parsing html with regex
 
Okay, thanks guys :C
 
crl
DOMParser
or Range, or Node api
 
I found another solution for this :D
thanks, anyway, have a nice day :)
 
7:57 PM
Excellent talk about immutability in database, for anyone doing backend ^
 
@MadaraUchiha thanks
 
8:18 PM
Oh yeah, don't bother watching the latest JSConf Asia talks. They were all pretty boring.
 
9:01 PM
I'm back(:
 
crl
hi back
 
O.o
Well okay then haha
you have any experience with SocketIO?
 
crl
Is there a reason to prefer node.isEqualNode(node2) to node===node2?
 
Not really.
but I never heard of the first one you said.
But it seems like essentially they're the same
 
Guys, why babel (both 5 and 6) treats this code as syntactically incorrect

```
const field = {children: []};

let z;
{ children: z } = field;
```
It says Unexpected token and refers to the = on the last line
 
crl
9:13 PM
because it is
 
what's wrong with it?
 
crl
{ children: z } = field;
 
and what's wrong with it?
{a, b} = {a:1, b:2}
how this code is different from mine?
 
crl
there's a : not ,
 
well, they destructure properties, I only do one
 
crl
9:14 PM
so just {children}
 
but I want a different variable
let { children: z } = field; - why this works?
 
crl
can't do that I thnk
 
hm, that's weird
 
crl
it must be the same than the object's name for object destructuring, but I hope someone can confirm this
!!> var o={a:1,b:2}; var {a}=o; a
 
@crl "1,2"
 
9:17 PM
With declaration you can do either
var {a: c, b: d} = o
would work
 
@crl "SyntaxError: missing variable name"
@crl 1
 
crl
@zerkms show me a full working example
es6fiddle
 
crl
oh. deep destructuring, ok, that's not renaming the keys, that's different
 
yep, and a brief look on the standard does not give a hint that the initial assignment must fail (not the standard guru here though)
 
crl
9:20 PM
usually destructuring is meant to be with an initial assignement (let,const), but I may be wrong
 
yep
Asking a proper question on SO then
 
crl
ok
 
any one used video in canvas much as means to reduce frame rate for things like repeated animations / backgrounds? or are videos also going to slow the rest of frame rate and thus make no real difference
 
0
Q: Destructuring assignment into a declared variable

zerkmsBoth babel 5 and babel 6 cannot transpile the following code const field = {children: [42]}; let z; { children: z } = field; console.log(z); With the Unexpected token (4:16) error that points to the = on the destructuring assignment line. With no doubts adding explicit declaration right bef...

 
crl
but in that example what stops you to just let {children: z}= ...?, you should show an example where you are reusing the z variable, so it's more meaningful
 
9:27 PM
because it's a minimal viable example that reproduces the problem, not the original case
 
crl
hmm ok, still good to explain why you want to do that, me things
 
oh gosh, check the comment
that should have been obvious
 
crl
wrap in parens, yeah
it's because js think it's an expression maybe
like let lambda = x => ({key:x})//parens needed
 
yep, exactly
    In my case the code looks like

    let field = rawErrors;
    for (const chunk of path) {
        ({ children: { [chunk]: field } } = field);

        if (!field) {
            return undefined;
        }
    }
 
@zerkms Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
@zerkms Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
crl
9:34 PM
nice, there are maybe other ways to do that
since you're always treating the children key of field, you could work with field.children
!!i‬‬‬‬‫s it ok to use one char vars?
 
Yes.
 
crl
thanks Cap
well, will put 2 chars, more readble
 
@crl yep, with this it's possible to set default values, not sure if I will though
 
crl
9:51 PM
function switchTags(elements, tag, els){ // els are elements that may be replaced by this function
	for (var i=elements.length-1;i>=0;i--){
		var b=elements[i], s=elem(tag);
		var idx=els.indexOf(b);
		if (idx>=0) els[idx] = s;
		while(b.firstChild) s.appendChild(b.firstChild);
		b.parentNode.replaceChild(s, b);
		Object.assign(s.style, b.style);
	}
	return els;
}
Madara, you won't like it :) a function that switch all elements tagName to tag, and modifies the last parameter
 
@ndugger Native South Asian* you racist POS
 
@crl In your effort to prove whether or not you could, you never stopped thinking about whether or not you should.
 
00:00 - 22:0022:00 - 00:00

« first day (1912 days earlier)      last day (3036 days later) »