« first day (1312 days earlier)      last day (3647 days later) » 

3:00 PM
coolio! I might have made my first Angular app today then :D
 
guys, I already asked this question in the last few days, but here it go
I'm building a hosting company, I want your opinion on the name
I own:

criatweb.com
fivoo.com
webahoo.com

what do you think?
 
(and yes.. that's a bookmark app xD)
 
@Neil RUJordan was cringing a long time ago. buh dum tsh
 
^ LOL
 
I was. I woke up.. and cringed.
 
3:01 PM
then I got out of bed and he was okay
 
Mostly because my ankle hurts like a bitch
 
right im off to the dr's tra
 
HA
 
!!afk until tomorrow!
 
hey @copy do you want my Molehill solution, we can fight the man!
 
3:02 PM
-1
A: Uncaught SyntaxError: Unexpected token ]

ShredderI'm not sure what you mean "modification from javascript to html", but I can try to help you print the alert message. A <button> is not a self closing tag. It should look more like <button buttontype="normal" name="submitAction" className="" method="" id="myFun" onclick="javascript:myFun()">...

this guy
 
@Shmiddty What do you have in mind? I tried regular expressions, but failed
 
@copy you... failed? But you can't fail! You're @copy! @copy never fails D:
triple ping baby
 
@user3558931 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.
 
@RUJordan one message, one ping.
 
Damn. Foiled again.
 
3:06 PM
!!> Array(20).join(' @RUJordan') + ' see';
 
@rlemon " @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan @RUJordan see"
 
@copy I'm out of ideas
 
JOKES ON YOU MY VOLUMN IS OFF
VOLUME
damn.
 
NO JOKE BRO! ONE PING!
 
!!s/@./na/g
 
3:06 PM
@Shmiddty naopy I'm out of ideas (source)
 
for(i=j=0;r=readline()||it[j++];)j?++i&&r==it[j]||putstr(i+' ',i=0):[it[a]+=r[a].trim()for(a in r)]
 
@rlemon have I showed you Iron Maiden's lead singer's son's band?
Rise to Remain
 
^
/me goes for a smoke
 
!!youtube talking in whispers
 
3:11 PM
 
I haven't smoked a cigarette in like 2 weeks
 
@GrigoryKalabin 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.
 
huzzah
 
@Shmiddty that's good man! I'm down to a a pack lasting me 4 days if I don't give any out
 
Nice man
 
3:16 PM
@Shmiddty Good on you, mate!
@RUJordan that's like.. SORCERY!
I manage to make a pack for 2, 3 days tops [being that on the third I do have to buy again]
 
Well, I chain smoke when I'm drinking, and I haven't been drinking lately (too busy) so that helps a lot
And I don't smoke at work anymore, so that's 8 clean hours.
It adds up quickly
 
I was at about a pack a day
and I decided to quit, so I just didn't buy another pack
The first two days were pretty tough
and I still get cravings, but they're bearable
 
I need to get my e-pen back from my cousins place. I just like the habit, and vape pens taste so much better
Plus you get a CLOUD of smoke and you can make rings and whatnot
 
talk to me at 6pm and i'll make you a cloud of smoke
(WHO HAS THE CLOUD->BUTT EXTENSION?!?!?!)
 
I would hope your girlfriend .___.
 
3:24 PM
posted on May 20, 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) {}

 
@Ruzar 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.
@chetan 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.
 
Y U ABUSE ALERT LIKE DEBUG — RUJordan 7 secs ago
Doing this right ^
 
eh, i've had php generate json on page load :/
why load the page and ajax it when it is available at the time of page rendering
 
@rlemon It has several disadvantages.
The main one being that most PHP developers don't know how to escape properly
 
3:27 PM
window.alert = console.log.bind(console); you're welcome — rlemon 14 secs ago
@SecondRikudo "bad programmers" !== valid technical reasonsing
get more competent people
 
@rlemon that's clever, I didn't know you could override those methods
 
@rlemon Also, you're tightly coupling your application with PHP...
@RUJordan Oh, you can override ANYTHING in JavaScript
 
@SecondRikudo except operators ;)
 
@RUJordan of course you can
 
and so? PHP is a clusterfuck anyways
 
3:29 PM
@rlemon All the more reason to not tightly couple the rest of your application with it?
 
if it comes down to what is best for the client. then I would choose whatever gives the better perceived performance.
 
Wait... so if you can override window.alert, why does var status = ["derp","herp"] flatten to a string? I know it conflicts with window.status but I'm confused
 
window.status overwrites itself
 
@jorjordandan 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.
 
it is a string the window can set (iirc)
 
3:30 PM
@rlemon That depends on your priority.
But as my answer says, there are different approaches, with differents pros and cons to each.
 
I still wouldn't go as far as saying it is wrong.
 
@rlemon Never said it is.
 
Hrm, I don't like it >=(
 
> if you need to have PHP generate anything directly into JS for you, you're doing something wrong.
 
It's wrong for most usecases people try to rape it on.
 
3:31 PM
sure did boss ;)
 
@rlemon I meant actual JS code, but whatever.
 
JSON is JS code ;)
pedantic++
 
@rlemon No, it isn't.
factual--
 
yes, it is.
 
Where's @BenjaminGruenbaum?
 
3:32 PM
JavaScript Object Notation. Sounds JS'y to me?
 
pedantic += 10000
 
6
Q: Are all JSON objects also valid JavaScript objects?

Benjamin GruenbaumThe JSON standard defines objects in one way and the ECMAScript (JavaScript) standard defines it in another. It is often said that JSON objects are a subset of JavaScript objects, is this true? Is every JSON object also a valid JavaScript object?

 
Oh duh.. I even read that earlier
 
all thumbs are fingers but not all fingers are thumbs.
not that strong.
 
is there something like bootstrap, but style only (i don't want to make any design, nor css, for this - but i'd like it to be "neat")
 
3:35 PM
@MoshMage That... makes no sense.
 
there are many css frameworks
 
@Mosho I passed your CV to our CTO
 
just google for them
 
@SecondRikudo here
 
What's with all the .io websites lately?
 
3:36 PM
hip
 
ster
 
world
 
@Moray 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.
 
@BenjaminGruenbaum We had an argument whether JSON objects can be considered JavaScript code.
What do you think?
 
that's the name! css frameworks; I was looking for "css scaffolding" and was getting nothing. thanks, @rlemon
 
3:36 PM
Also note that we're in full pedantic mode.
 
@BenjaminGruenbaum thanks a lot man
 
@Mosho You from Israel too?
 
I am
though in Canada now
 
he's faking as a Canadian right now
got his toque and everything.
 
He's a Canabrew!
 
3:37 PM
@Mosho Fun trip?
 
Or a Henadian. Take your pick.
 
.. no not going there
 
@rlemon +1 for the attempt xD
 
^ lol coke had that commissioned
so awesome
 
3:39 PM
@Mosho he asked if you plan to stay longer optionally or not
Asked if you'll be in Israel before Aug so you can come and interview
I vouched for you, so don't blow it up :D
@SecondRikudo that in 99% of the case they can, but not generally because of unicode issue, and because JSON objects include JS primitives.
 
@Mosho make him look bad! do it! do it!
 
!!doge pressure,sweat
 
6
Q: Are all JSON objects also valid JavaScript objects?

Benjamin GruenbaumThe JSON standard defines objects in one way and the ECMAScript (JavaScript) standard defines it in another. It is often said that JSON objects are a subset of JavaScript objects, is this true? Is every JSON object also a valid JavaScript object?

 
@BenjaminGruenbaum NOT PEDANTIC ENOUGH
 
        wow
                        such pressure
so sweat
 
3:40 PM
@BenjaminGruenbaum I will do my best
@rlemon I will do my best
 
@Mosho don't worry about it, we might have an opening for that.
 
@BenjaminGruenbaum For pressure and sweat?
 
@Mosho will you be in Israel before Aug?
 
!!doge moderators, organization
 
    wow
                        very moderators
so  organization
 
3:41 PM
@BenjaminGruenbaum unlikely, but possible
 
;D I can CapricaSix ^^
 
lmao
 
@rlemon :D
 
0
Q: Difference between lazy evaluation and promises/futures

McOmghallWhat's the difference between a promise or future and a lazily evaluated function/object? They both act like a placeholder for a deferred computation, and I understand that the principles that they operate on are different, but what's the actual difference?

 
3:42 PM
Also, ftr, a picture on your resume is a good idea if you're remote, also, what about a skype interview?
 
@BenjaminGruenbaum I like Google Hangouts better
 
@BenjaminGruenbaum - What exactly are JSON objects? "JSON is a lightweight, text-based, language-independent data interchange format" according to the spec, it's not really an (javascript) object, it has to be parsed into one by the language ?
 
@SecondRikudo +1
skype is lame.
 
@SecondRikudo not a trip, I'm a resident
 
Skype sucks.
@Mosho oic, where from originally?
 
3:43 PM
@BenjaminGruenbaum skype is fine
would be nice to interview in hebrew for once
 
@SecondRikudo Israel, moved to Canada 18 months ago
 
Where in Israel? :D
 
Haifa, grew up in Kfar-Saba
 
@Mosho sure
 
3:46 PM
Who the fuck has a donate button on their profile page?

"Want me to keep posting quality stuff? (Donate)"....
Bartek Banachewicz, Gdańsk, Poland
11.7k 3 20 46
 
I'll let him know
 
cool :D
 
Is that against the ToS?
 
@Shmiddty - have no idea, but it looked strange, never seen anyone do that before, but I guess he posts so much quality stuff that he needs to be able to accept donations ?
 
!!joke
 
3:49 PM
 
@BenjaminGruenbaum and about staying longer, it's possible.
honestly, I'm a bit tired of apologizing and talking about the weather :D
 
lmao
Oh Canada..
Holy shit, suddenly the Canadian Nation Anthem just made sense.
 
@Mosho Sorry about the rain today eh? what's that all aboot?
!!afk tossing a salad.. no really. it is lunch time and i'm hungry.
 
I too hunger for sustenance.
 
@Shmiddty Combine with your idea of making a single loop? for(i=[t=d=y=-1];i[++y]=readline(););for(x in i[0]+1)" "<(i[y+=d]+t++)[x]||putstr(t+" ",t=0,y+=d=-d);
 
3:56 PM
@Mosho awesome
I'd love to work with you - gonna be fun
 
I'm just amazed that mods/helpers in this room are actually interviewed.
 
What cases would one use a for loop that isn't the "normal" way? Like i've seen 4 parameter for loops, for loops with no body.. but I don't understand them
 
(now I understand from where this quality comes from!)
 
@MoshMage moderators have blue names, italic names are room owners, and we're not interviewed lol
We're loose cannons mostly.
 
Yes. Yes you are
 
3:59 PM
I don't feel like playing find the syntax error in the code dump, sorry. — RUJordan 7 secs ago
 
Oh, I thought @Mosho and @BenjaminGruenbaum were kind'of doing an interview. But the quality still stands anyway x)
 
@MoshMage I think they're talking about an interview for a real job
Yeah, there is real good quality in this room. It's pretty awesome
 
What's a real job ?
 
@user3649503 those that you get paid in something other than cookies :D
 
My mom gives me a cookie for every 500 lines of code I write
 
4:03 PM
@MoshMage - Is there such a thing? What else would one get paid in.
 
Sex? Drugs? Rock and roll?
 
Keyboards and "Download RAM" codes, ofc.( downloadmoreram.com/download.html )
 
user1596138
Well. Grooveshark didn't return my call.
 
user1596138
They kinda just wasted my time lol. Got me to coordinate a lunch to do a long phone interview with them and then never heard back.
 
user1596138
Oh well
 
4:06 PM
@Jhawins that's fucked up man
 
user1596138
@Loktar ^
 
@BenjaminGruenbaum - The answer posted to your JSON question, I don't really get it?

We all know you can't do

x = "string starts here

and continues here";

As string literals can't have newlines, and 2028 is a newline, but in a JSON string that would be represented as 2028 or \n, which is completely valid, and JSON.parse will eat that just fine, so it's not really a valid point unless you somehow wrote JSON as

var json = '{"key":
"value"}';

in which case you're screwed anyway you look at it, JSON or not ?
 
I answered a C question and I don't even know C. #PowerOfGoogle
 
@Loris 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.
 
4:16 PM
Exactly!
 
@Shmiddty Is timing out with the correct output a correct solution?
 
Cheers for @RUJordan!
 
wow @Jhawins
what a bunch of dbags.
 
!!s/dbags/douchebags/
 
@RUJordan what a bunch of douchebags. (source)
 
4:18 PM
They deserve the full douche.
 
!!s/\douchebags\.\s+(source)/douchebags there at GROOVESHARK!/
 
@jAndy No matching message (are you sure we're in the right room?)
 
user1596138
@Loktar Right :/. I singled them out over a year ago as one of the companies I really wanted to work for. Fuck that
 
@jAndy No matching message (are you sure we're in the right room?)
 
grrr
 
4:21 PM
@jAndy No matching message (are you sure we're in the right room?)
 
!!s/\douchebags\.\s+(source)/douchebags there at GROOVESHARK!/
 
@jAndy No matching message (are you sure we're in the right room?)
 
why would he throw away the escaping for parenthesis
 
@Mosho expect an intro mail tomorrow
 
0
Q: NodeJS Strict Mode

RUJordanAre there any advantages to using "use strict" in NodeJS? For example, a global object is not a good idea to use, as all your requests will mutate said object. In this case, using strict mode would have been a good idea, no? I feel like strict mode is a good idea to pair with Node, but I haven't...

this may attract opinionated answers, but I'm rather curious
 
user1596138
4:23 PM
And they waited exactly 2 months before calling haha just to blow me off?
 
I don't think strict mode has any special meaning to Node, its great regardless where
 
@jAndy well, implicit globals (explicit maybe?) seem to cause issues with multi-user applications at least in my experience
strict mode may have avoided all that
 
strict mode does a ton of good things, so.. any js snippet should use it
 
Strict mode always has advantages... everything from the various this handling to avoiding duplicate property names in an object literal.
 
So why isn't it standard?
 
4:25 PM
it would break existing code
 
Because a lot of older code won't run under strict mode, so it had to be an opt-in.
 
Well that's poor development's fault :P
 
!!s/code/bad code/
 
@jAndy Because a lot of older bad code won't run under strict mode, so it had to be an opt-in. (source)
 
ah damn u
yes but they didn't dare to like break half of the internwebz javascript
 
4:26 PM
In my not-so-humble opinion, all new code should be using strict mode.
 
> "How to break the internet: Inject "use strict" into every government website"
 
@RUJordan
2669
Q: What does "use strict" do in JavaScript, and what is the reasoning behind it?

Mark RogersRecently, I ran some of my JavaScript code through Crockford's JSLint, and it gave the following error: Problem at line 1 character 1: Missing "use strict" statement. Doing some searching, I realized that some people add "use strict"; into their JavaScript code. Once I added the statement, ...

 
@user3649503 I know what it does, I'm focusing specifically on NodeJS here
 
Heck, kick 90% of the websites into HTML (whatever) strict and watch them break.
 
It does the same in Node as in any other javascript enviroment
10
Q: In node.js, how the 'use strict' statement is interpreted?

Harshita NyamanavarI have started to explore the Node.js and wrote many demo webapp, to understand the flow of node.js, express, jade, etc.. But one thing I came across recently, is the statement "use strict" as first line inside every function and every .js file. So, my question is after doing lot of search, I ...

 
4:29 PM
@user3649503 yes, but I want to know if it has server sided pros/cons
 
@RUJordan - There is nothing special about server side -- the code is code.
 
Why would a feature that constricts the language have any special meaning on a server as opposed to in a browser ?
 
@user3649503 Scope
 
Node is just a JS runtime engine with a few IO libraries to make it useful.
 
@Zirak - Does Node have any special scoping mechanisms ?
It's just running V8
 
4:31 PM
"use strict" affects the scope it's in. If you put it in the browser's global scope, it effects all scripts. So my blind faith (I haven't looked at the question) is what scope it affects, since node has "file scope"
 
Node also has function scope, but it has global instead of window, same same but diffelent ?
 
That means a "use strict" in the beginning of a browser script effects the other scripts, while in the beginning of a script run by node only effects the current one.
@user3649503 window is another name for the global object. If you put var a = 4 in the beginning of a js file, in the browser it's visible for other files, in node it isn't
 
Node loads everything as a module, so it only runs inside of function scope -- unless you do something weird, you'll never exec something in the global scope.
 
Weeelllllll
 
@Zirak - It is better to say:

In a browser, the global object has a property called `window` that points back to itself.
 
4:33 PM
Exactly, since require is basically eval(fs.readFileSync(path))
 
var player = require("./player");
player = new Player();
player is now global and will mutate for any client
That was how I learned the hard way
 
@Zirak - that's still function scope
 
Correct
That's the exact difference...
 
@charmeleon 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.
 
Default scope:
Browsers - global.
node - function.
 
4:35 PM
@Zirak so would you say there is a server/client different in strict mode?
 
in a browser you're using global scope when files are included in to the current document, it's the same in node, but require is basically a function, it's not a link tag
so it's not the same, but diffelent.
 
It's not the same in node, since you don't land in the global scope
You have to explicitly say "put me on the global scope" by doing stuff to process
@RUJordan Again, only what happens when you put it in the beginning of the file.
 
user1596138
 
That's all there is to it
 
Gotcha, thanks guys
 
4:37 PM
And it's considered bad practice anyway to put it on the global scope. jshint even warns against it, and there's an option to suppress it for node.
 
user1596138
> When the time came, I was ready for the phone interview, but it had to be postponed due to scheduling conflicts (on their end). And then... there was absolutely no further communication from them. They just stopped responding to emails or calls. Despite them expressing strong interest, suddenly they just stopped answering.
 
user1596138
Sounds like me
 
@Zirak - so what you're saying is that it's exactly the same in Node, but because a require and a link tag works differently it's not the same, but scope is scope, right.
 
If you want to think of it like that, sure
 
What's the best way to compare the end of a string with the beginning of another string in JS? I'm trying to merge 'someurl/with/path/' with '/path/is/here' and want to end up with 'someurl/with/path/is/here'
 
4:39 PM
@rlemon I'll dump the bot's memory in a bit. If you come back when I'm not around, just !!die mine and let yours take over.
 
@charmeleon sounds like you can split("/"), remove the last/first index of the respective arrays, and join("/") them back together after concatenation
 
@RUJ
@RUJordan Thanks! I believe I had a similar thought this morning, I think I'll just run with it
 
Sure thing brah
 
@RUJordan done
0
A: NodeJS Strict Mode

Benjamin GruenbaumWell, clarity and speed. The primary goal of strict mode and the "use strict" directive is to eliminate dynamic scoping in JavaScript which is why changing arguments via arguments and changing arguments itself is not allowed, why with is not allowed, and so on. Clarity Strict mode does not all...

 
@Andi 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.
 
4:45 PM
@user3649503 It's amazing how bad the answers there are, like no one actually read the reasoning the people who added "use strict" had.
Well @SimeVides did :D
 
@BenjaminGruenbaum thanks! I'm about to read those articles
 
worth your time for sure
 
@rlemon ^
@BenjaminGruenbaum Wwweeelll...it doesn't exactly eliminate dynamic scoping
You still can't determine this and arguments at compile time
 
@Zirak they're lexical
 
I might be messing up the terms then
 
4:49 PM
@BenjaminGruenbaum - It's still pretty much a duplicate, and reading the spec and the post by John should tell you anything you need to know about strict mode.

http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/

As for the question, it was about Node specifically, and the answer should be as simple as using strict mode in Node has the same advantages as in other javascript enviroment ?
 
user1596138
!!666
 
ಊ(╰◣▂ ◢╯)Ψ
 
user1596138
Hmm
 
@user3649503 who are you and why do you keep saying these things :(?
This is like the fourth time today..
@Zirak that's not what dynamic scoping means with arguments
 
user1596138
!!inur anas
 
4:50 PM
@Jhawins yo dawg i herd u lik anas so i put sum anas in ur anas so u can anas while u anas
 
user1596138
Man there's some weird stuff in here...
 
user1596138
!!afk subway
 
!!mhm2
 
4:52 PM
 
@BenjaminGruenbaum - Are you saying I'm wrong, if so I'm eager to learn something new ?
 
!!hahano
 
Yeah, I remembered this being here
 
@user3649503 no, just weird :D
No offense dude
 
4:54 PM
Weird is good ...... I think ?
no offense taken!
 
@CapricaSix don't forget me when Zirak dumps your memory :(
 
@user3649503 yeah, I guess :D
 

« first day (1312 days earlier)      last day (3647 days later) »