« first day (1232 days earlier)      last day (3941 days later) » 
00:00 - 17:0017:00 - 00:00

00:02
@Zirak One of those looks FREAKY close to a girl I know. Like, scary.
You've given me the goosebumps.
THE PLOT THICKENS
If a and b are expected to be strings of 1 or more characters, is there any difference in their handling in this snippet?
function foo( a, b ) {
  a = a || "default";
  b = ( typeof b === "undefined" ) ? "default" : b;
}
I've seen so many different handling approaches for default values of optional arguments, I'm getting a bit confused lately :P
Yeah, a will be "default" for more values. Look up "falsy values"
@Zirak Aren't those "", false, null, ...?
00:16
The very same
b will be "default" for passing no second argument, or undefined
Would it be safe to assume that using ( typeof b === "undefined" ) is usually what I want in such a case?
eh, they're both good. Choose whichever.
Because I really hate being inconsistent, and a || something is so short and sweet :D
00:44
@pyStarter 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.
All the cofounders have been in a meeting for the past two hours
!!should I be worried?
@SomeKittensUx2666 Of course!
@OliverSalzburg typeof b === "undefined" is stupid.
@BenjaminGruenbaum Why?
Just use b === undefined , why would you want a reflective type check there?
00:46
@BenjaminGruenbaum It's just something I've seen
@OliverSalzburg Oh, typeof something is used with === "undefined" when you want to check if a variable is declared, not if it's defined.
TypeScript uses that for optional arguments
Since you already have a reference to b (it's a parameter) you shouldn't perform the typeof check.
As if it makes a difference
@OliverSalzburg Well, if TypeScript does it...
00:48
It's conceptually incorrect code.
@Zirak I just assumed that the people who wrote the TypeScript compiler have a better understanding of JS than I do
So it's something to think about for me
@copy I sent you a cat gif on skype and you haven't seen it. >:(
It's quite possible that TypeScript people did it because they preferred code reuse, or because IE optimizes for it in the specific case it's the first thing that appears in the function body in the exact same way it appears, or for a million other transpiler reasons you don't care about.
Oh yeah, @BenjaminGruenbaum, will Microsoft have me by the cahonies if I log in to Skype?
@BadgerGirl NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
00:51
@Zirak they already do.
I'm actually a bit impressed. The default music and video players aren't so horrible at first sight (i.e. they're better than Media Player's launch)
Okay, so, just so that I get the complete picture, could you point out an example of the difference between typeof a === undefined and a === undefined?
I feel like there's something I'm not really understanding about this
//file.js
typeof foo === "undefined"; //no error
foo === undefined; //reference error
Oh. So it's like a var foo = void 0; kind of thing
Not at all
00:55
Oh :P
@OliverSalzburg you know C++, it's exactly the difference between declaring and defining.
You can't use === on a variable that doesn't exist yet. You can however pass it to typeof
In JavaScript, if you declare something - you also define it as undefined implicitly until you put something in it.
If it's not declared, in C++, you get a compile error. In JS, you get a ReferenceError.
The typeof operator goes around that, since it's an operator - it gets to have special semantics and you can pass undeclared references to it and it'll spit "undefined" and work.
Okay, this is slowly sinking in
It's all a bit convoluted.
There is really no case where you'd actually want to have undeclared variables. Generally, I rarely use typeof
00:59
Well, thanks for your input guys. This was very helpful
Sure thing.
I still owe you like, 10 hours for that button :P
Heh
I really hate it when I'm working in a new language/framework/whatever, and I don't really understand what I'm doing and am just copying stuff from people I assume are more knowledgeable about the subject :P
That's life though - the fact I get to work with many technologies means I have to work with a lot of code in languages I don't understand 100% - I take it as a positive thing.
I'm just happy that I get to learn new things :D I'd take it that way if I were you.
You want to use the windows registry editor to replace everything except the month? — Benjamin Gruenbaum 3 secs ago
Yeah, I guess it is a positive thing. It doesn't hurt to stay fresh. But a couple of years ago I was maintaining a large digital signage application that was built almost entirely in C# and was interfacing with a proprietary 3D engine. At that time, I felt like I had a pretty good grip on C#. Now... I've barely written any C# in 2 years :P
stackoverflow.com/q/22108691/1348195 If someone actually figures a way to use the registry editor to do this - they're my hero.
@OliverSalzburg not to be a bummer - but C# is evolving fast :P
01:04
@KatieH 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.
Yeah, I like C# still. But right now I'm working on projects that are entirely built on JS
...and I don't even know when to use typeof ;D
:D lol. The most important thing to 'get' in JS is concurrency.
Please elaborate
I did here but in general, the fact you don't write sequential code when performing any I/O.
Things happen re-actively, that's somewhat of a paradigm shift.
Especially for people who have never done a lot of UI before. I mean, first order functions and closures are tricky, but IMO async I/O is the hardest barrier people pass when they learn JS. Of course if you already know how to write asynchronous code flow you're good to go.
> You are currently browsing the web with Google Chrome
I hate when people do this.
No, not when they tell me what browser I'm using.
When they get it wrong.
That is all, good night.
01:11
night
!!afk hockey :D
@BenjaminGruenbaum One aspect I'm currently really interested in is, we have a Node/express application with a MongoDB database on our backend and, so far, this application was used on a closed network with maybe dozens of clients. Now we're scaling up and we're expecting hundreds of clients. I keep reading that Node is single-threaded and you're supposed to handle these cases by "simply" running multiple instances of your applications.
This really seems non-trivial if you didn't plan for it right from the start
It's pretty easy if you use Node's thread pool
@OliverSalzburg Not really, NodeJS apps can pretty easily scale to thousands of clients on a single computer.
The performance is really sick compared to what you might be used to from most threaded server side technologies.
hi
I'm sorry to ask here, but the "php" room is empty, is there someone good at php here ?
01:23
@Jhawins is really good at PHP, and also @copy
Yes, totally
@BenjaminGruenbaum What scares me is simply the fact that we aren't capable of simulating the workloads we're going to face in production and if we might need to extend our infrastructure horizontally to handle it, I wouldn't know how to do it :P
@OliverSalzburg What sort of server are you running now?
Well, I'm glad we could help you with your "curious about whether or not the JS room contains people who are good with php" have an awesome day! @LeSam
@SomeKittensUx2666 We use virtual machines rented from a VPS provider
01:25
@copy I have an array inside another array. I use foreach to change the value of a key that is inside the last array. how to change this value ? it doesn't works with the foreach
2
What kind of horsepower?
So if we need "more power" that would mean getting additional cores assigned to our instance
@SomeKittensUx2666 I can't really tell. We just purchase a given number of CPU cores and GB of RAM
@LeSam I have to go
ahahha
@OliverSalzburg generally, in production you always want to serve static files from nginx and use Node behind a reversed proxy if you're doing this yourself. We host node as PaaS in Azure - I type 'git push' and it's there - if I want to scale it I move a slider.
01:26
ok ok
I can also set it to auto scale :P
@copy your avatar is from I wanna be the guy ? no ?
waits for copy to post a link to his video
steady
steady..
@BenjaminGruenbaum For our current application everything goes right to the core. Any caching is only done on the client side. So, yeah, I guess that would be a sensible first step in optimization
But we don't really have any static content. It's all communication with a centralized data store that has to be synchronized between all clients at all times. It's basically like a chat
Ah, node does that pretty well in a pretty simple way.
01:57
@rlemon never played it.. that looks awsome!
Hi.
Can someone help me with typewriter script?
want all my text within a div to be type writted.
No 2001 jokes please.
@RahulKhosla HEY 2000 CALLED
Thanks
@Loktar I saw this earlier, I couldn't get the click to start to remove
Also no datatext :S?
Weird
come on and slam and welcome to the jam.
All I really have to say about that.
02:06
@Loktar Sorry I know thats some sort of pun, but I don't understand it.
Can you help?
lol I was just being dumb
sorry thats the best I have
Ok thanks anyways.
Can you not edit it ? I pro suck at JS.
what do you need to edit?
the click to type?
thats just an anchor tag with some text that has an event on it that starts the typing
I want it to start onload to ALL text within my certain div
02:32
I want a toilet made out of solid gold. some times it just isn't in the cards mate.
seems like it is something up your alley
> Earlier today, Broadcom announced the release of full documentation for the VideoCore IV graphics core, and a complete source release of the graphics stack under a 3-clause BSD license. The source release targets the BCM21553 cellphone chip, but it should be reasonably straightforward to port this to the BCM2835, allowing access to the graphics core without using the blob.
> As an incentive to do this work, we will pay a bounty of $10,000 to the first person to demonstrate to us satisfactorily that they can successfully run Quake III at a playable framerate on Raspberry Pi using these dri
really ties the room together don't you think?
@phenomnomnominal Aw, was hoping for some cool story about a JS failure during a live-fire exercise or something.
@SomeKittensUx2666 Yeah, not quite that cool!
02:50
hi
@rlemon Hah, love it
I have an chrome extension witch are running in background, how can I make the js code to repeat after 1 sec? thank
setInterval(function() { /* code */ },1000);
^ loops
setTimeout(function() { /* code */ },1000);
^ will call only once after a delay
I tried this, but my code is http request... can be this the problem?
I am clicking on login button every 1 sec
in that loop
02:53
why are you clicking a login button every second?
I am trying to crack a password :D
@tziuka for what gain?
oo nothing special, it is something about student grade... at university ;))
i doubt it will work
I manage to do that, but I need to click every time to extension
on extension*
02:56
and I've flagged your messages for a moderator because you are trying to do a unlawful and unethical thing (//cc @ThiefMaster)
ok
thank you
now kindly leave.
,,, yeh
I was just honest
I could lie, instead
doesn't change the fact.
If you are programmer, you try those things at least once...;)
02:58
I don't try to brute force my school.
no, that I can say I haven't done.
:D
It's just for fun
mhm.
see ya
!!fun or illegal
@eazimmerman fun
Just so you know, they can probably kick you out for doing that...
03:00
also, probably press charges
If they are not secure..
hacking in most countries is a federal crime, in the USA and Canada (afaik) it is also considered a form of terrorism
I mean even if you technically don't break the law, it probably still violates something you signed...
they allow to try how much password you want :)
there is nothing important...
Is all hacking seriously considered terrorism?
03:03
@twiz depends if you embarrassed someone important.
I don't know,,,
haha probably about right.
may be if you hack some seriously
Cyberterrorism is the use of Internet based attacks in terrorist activities, including acts of deliberate, large-scale disruption of computer networks, especially of personal computers attached to the Internet, by the means of tools such as computer viruses. Cyberterrorism is a controversial term. Some authors choose a very narrow definition, relating to deployments, by known terrorist organizations, of disruption attacks against information systems for the primary purpose of creating alarm and panic. By this narrow definition, it is difficult to identify any instances of cyberterrori...
Does ipinfo.io not support ipv6 addresses or something?
03:04
I am against real hacking too ...!
Interesting how the use of the word "terrorism" has become a form of terrorism.
@rlemon thanks for informations
@tziuka are you implying this doesn't constitute as real hacking?
what this?
@tziuka brute forcing a university log in?
03:08
!!mute
surprisingly not on there already
If you're using git to deploy to a server, how do you deal with things like SASS? Since I only want to send the actual CSS files to the server, should I just keep the SASS out of the repo?
@twiz I commit my LESS/SASS files to repo so that its still there as a backup.
@twiz Is sending data over the wire that bad?
03:18
Ok, that makes sense. I think I was just overthinking things...
I'm going to have to rearrange things to do that, but not that big of a deal.
@twiz I use LESS with asp.net mvc but link my .min.css in the template. so only this file goes to the client.
I think I just had one of those moments where I was trying to figure out how to do something, but had forgotten what my original problem even was... haha
even better...no problem to worry about now :P
 
2 hours later…
05:04
anyone play starbound?
06:00
@Gopal 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.
06:17
ok... in what order does haskell's permutations generate the permutations? It seems like a weird kind of "take the list from both ends alternately, use as the last digit, and recurse" except the second element (from the end) isn't even always grouped consecutively.
Anyone had a play with Atom Editor?
I'm trying to figure out how to fix the funky newline indentation behavior
Thinking about creating a new room for Atom. Anyone interested?
For anyone who's interested...
06:33
hockey. fuck yea!
@MamaWalter 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.
@kwak thanks for the link. That doesn't seem to be the order I observe, though.
I'm going to look at the source code now.
Hi, i just notice that the phaser tag dont referer to the young javascript game engine framework phaserjs but to a java class. Or people starts to use it for javascript issues. i'm wondering if maybe someone (who can do it) could create a seperate tag for the javascript framework and retag some posts.
@kwak ew. That source code seems pretty complicated. I think I'll write my own.
@MamaWalter never heard of either. Time to post to Meta Stack Overflow, I guess?
06:52
ok will try that, thanks
user1642018
hi
07:25
numbers greater than 10^1000 have 1001 digits, not 1000 digits.
Hi everyone!
anyone farmiliar with cross domain requests in chrome applications?
07:44
0
Q: Get contents of a tag with a particular class from a remote url in a different domain

indagoI am trying to get the current english premier league table from http://www.premierleague.com/en-gb.html but i dont want the whole website, i just want the league table only, if you look keenly at the page source the <table> tag which has the league table doesnt have an id but has the class .leag...

 
1 hour later…
08:46
@UriahSanders 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.
09:18
@JordanFitz 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.
09:35
@appubala 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.
10:07
why might it be a bad idea to do something like options || (options = {});?
10:19
@Zirak Ooh, nice. I like that it incorporates music that way
@Zirak Ooh, yay! That was a fun game
Aww, come on, have a good ending!
I found the accident funny, though
I was kind of hoping killing yourself on the last level showed some message, at least
@rlemon Haha, wow, that is so strange
@Zirak That was quite good!
The related article after that one has an amazing picture, by the way medium.com/startup-reviews/585c3bc9211
Super duckface
10:50
@SomeGuy You ruined the song :(
Hahaha, don't blame me!
I was on a walk with my dog, enjoying some music, and then... notification sound
On your phone?
No, in my head
Aww, I'm so sorry!
10:51
My brain has LTE
@Zirak When do you leave?
@SomeGuy Take a wild guess
7th
Tonight or tomorrow morning?
Tomorrow morning, same as every other week
Cool
10:58
I'm playing Dust btw, so if we have a TS server up I'm mouth free
Hahaha, "mouth free" seems to imply something different to the pervert in me
How are you liking Dust?
Love it
Is it the only one you've played from the bundle so far?
Also played Guacamelee. It was good, but I'm not the target audience.
I've also downloaded Antichamber, but need the dust to settle first.
Hahaha, well done
11:01
Also, my memory sucks - isn't it mainerror.com ?
That was it, but it was down the last time
I think the other one was rlemon's
Yes it is
@joker 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.
Trying to resolve hostname mainerror.com
Failed to resolve hostname 'mainerror.com'
...a minute later...
Trying to resolve hostname mainerror.com
Trying to connect to server on mainerror.com
Cool
I'm on, so join me so I won't be alone
Hahaha, alright
Give me 5, my laptop needs to charge and then boot up
11:06
I was reading an article which states that bind function actually adds the bound method to the object....I believe it's rubbish , am I right ?
at the bottom...
quote : One problem with this example is that we are adding a new method (showData) on the cars object and we might not want to do that just to borrow a method
?
@SomeGuy You guys on teamspeak?
Is it a private party?
o.o
Join us!
MainError.com
@RoyiNamir they never said that, they just explicitly add the function to cars
11:21
@Mosho they didnt add it they just bind it
cars.showData = user.showData.bind (cars);
they assign the returned function from bind to a new attribute in cars
oh yes youre right
tnx @Mosho.
np
@Mosho so how will apply will solve it ?
I mean borrow method without override
bind just returns a function, apply invokes it but sets this to whatever you give it
so you can do user.showData.apply(cars,args)
11:29
I could also do user.showDta.bind(cars,args) and then execute it....no ?
but you have to assign it to something
then yeah, that's the difference
I was just curious that he said : it is best to borrow methods with either the Apply or Call methods.
I mean , what's wrong with bind ?
(except for the extra executing)
yeah, maybe not the best wording
if you have to use it a lot then you may as well use bind, if only to short how much you need to type
11:34
oh.....so im ok
bind is useful for callbacks too
yes. future bounded functions
thank you
oh, and you can do currying with bind too, also useful
yes im about to read about partial & currying
11:48
@GreenWizard 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.
12:01
@Loktar I wept
12:39
Happy birthday @jAndy - also the game.
Hi everyine ;)
Hi, morning
@BenjaminGruenbaum I'm thinking of prepaid master cards (about the problem I mentioned earlier)
@MostafaShahverdy you can try - but at the end of the day they can still seize it. What exactly are you planning to use it for anyway?
@BenjaminGruenbaum I need it to pay my university
12:51
You need a prepaid cc for that?
@BenjaminGruenbaum I think maybe I can sell it in the black market
@BenjaminGruenbaum no, a friend is giving me money
@BenjaminGruenbaum But I can't receive it :(
hey guys!
remember that old crappy bad coded and non-working snake minigame I made?
well, it's still old crappy and bad coded, but it is working! copot.eu/matei/games/snake
Good job!
still need to add some tweaks (as: it detects if you died, but it doesn't tell you)
13:15
Poll: Do you use i++ or i += 1?
I use ++ too
Zirak and monners use +=
@rlemon Hop onto TS
Just woke up. Gimmie time
Cool
You have 2 minutes
You know my pooping routine.
Gonna be longer than that
Hahahaha
@Zirak You might like this
@SomeGuy I use ++i
@Smillification 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.
13:48
welcome
14:05
@rlemon Get on TS, man!
Who's all on?
what are you guys playing so early?
Nothing
Zirak and Monners are on
He just wants to hear my voice. He misses me
lol
14:09
@rlemon Why do you do this to me?
posted on March 01, 2014

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) {}

Abscense makes the heart grow fonder.
@martynas 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.
14:25
Hey guys, I was wondering if anyone knows how to rip a video where there is no direct link to the file in the page source. globalconnections.hsbc.com/global/en/articles/…
14:38
@Spedwards 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.
Hey guys, does anyone have some good guides for Javascript? I'm not new but I'm certainly no expert. Cheers.
14:56

Javascript Resources.

Sep 4 '12 at 13:36, 2 minutes total – 8 messages, 1 user, 1 star

Bookmarked Sep 4 '12 at 13:40 by rlemon

Cheers
15:30
@Octavian Where have you been?
@Spedwards jstherightway.org
check it out ;)
15:55
@AbhishekHingnikar get on ts nao
@KendallFrey ?
We're on TS
i can't
sorry
16:17
> My biggest fear is that if I woke up as a donut. I wouldn't even know it
- @rlemon
My bad
16:36
@mhsekhavat 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.
any suggestions for choosing a framework for a single-page app with very complicated models and logic and dynamic views?
(client side)
dear guys :D
16:52
1
Q: "Top of Page" link in javascript

user3363795Using php in a webpage and struggled with anchoring to the top, so I'm using a line of javascript to accomplish what I want. The code is: <script language="JavaScript" type="text/javascript"> <!-- document.write("<a href= \"" + document.location + "#top\" >Top of Page</a>"); // --> </script> O...

:(
Monners: I don't have a driver's licence to drive a proper car
Zirak: So you drive a clown car?
00:00 - 17:0017:00 - 00:00

« first day (1232 days earlier)      last day (3941 days later) »