« first day (1337 days earlier)      last day (3606 days later) » 

12:03 AM
@monners What'd you want to submit?
 
@VedaadShakib 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:25 AM
@RUJordan lol nice
> wtf is this magic/!
 
12:39 AM
@SomeKittensUx2666 Tale from the interview
 
oooh
care to share?
 
It's pretty long
But after a lot of bad noise I got up, said thanks and good luck, to which this asshole said Mate, I don't need your luck!
He was like the coked up son in the movie Horrible Bosses
I walked out thinking "So those TDWTF stories really do happen"
I think he drove one of these...
 
1:01 AM
hah thats awesome
 
Angular question: jsfiddle.net/ujFW8
 
Hi guys, anyone have any idea how to send XHR in another thread in javascript? :)
 
1:18 AM
where does one get glyphicons? I need some representing instruments (bass, guitar, vocals, etc)
 
@Martin hey man
really sorry about that
:X
 
1:40 AM
@Meredith google crawls over webpages, not your angular template
 
So it wouldn't read it?
Didn't google recently start running javascript with their crawler though?
 
why is answers.com interface so weird?
 
@Meredith no, that's what I meant
angular template is with all the curly braces
and since google now executes javascript
it sees your page (with the strings) rather than the template
 
Ok I thought you meant that it would act like the template didn't exist, so it wouldn't see the final result
That's good news
@Crow Not sure, but it actually looks pretty good with the right column taken out
 
2:13 AM
'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' ') Found this in the angular source. Not sure why they chose to do that
 
Quick question, how many of you don't wear a watch because it gets in the way of typing?
That is, the band gets in the way
 
@EricGoldberg 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.
 
2:51 AM
@totlmstr 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.
@user2248702 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.
 
3:21 AM
@Runemoro 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.
 
 
1 hour later…
4:22 AM
@Nick 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:32 AM
@Meredith - see this question: stackoverflow.com/questions/7519837/… - the answers say split isn't faster, but if you go to the jsperf link, it shows that it's much faster in most browsers (including in mine). I don't know why the optimization works that way though
 
5:11 AM
@Nick Where are you seeing that it's faster? I'm getting that split is 96% slower
 
Morning
is there a tool to automatically convert all my php and mysql code to node.js and mongodb code?
And it should be asynchronous finally...
 
There might be an sql->mongo one (but I'm not aware of one)
PHP and node are completely different paradigms though
 
then is there any technique I can do that manually, but fast enough?
I mean, duplicating the complete code and editing it line by line to convert all functions and everything?
Will it help?
 
It'd be just like translating anything else
 
even if something like that was possible
different languages have different tools and paradigms
so the code should often be quite different
don't be lazy
 
5:24 AM
@Mosho so it is not possible now, you mean?
 
It's possible, but if two languages have completely different paradigms, translating them is probably going to take a lot longer than just rewriting the code
 
it is
but only for very specific things, I would assume
so you will probably spend as much time patching it together as rewriting
and still have bugs out the ass
but google "php to javascript converter" and see for yourself
 
Worst case scenario you can also compile then decompile into another language
 
!!google php to javascript converter
 
But good luck with that
 
5:27 AM
I remember the day I translated an algorithm that draw 3D boxes from TI BASIC to the C langage, I had to rethink the algorithm because tools were completely different.
 
1
A: Need to convert my php app in node.js

schaermuYou can't even remotely compare node.js to something like PHP. Node.js was designed to provide a full-stack high-performance IO framework, not a scripting language based on a web-server of your choice. First of all, you HAVE to make sure you fully understand the node.js paradigm and it's event-b...

^this guy broke my heart
 
The first google result for php->javascript was really easy to break
 
converting it to JS is one thing
 
I think it just replaces "->" with "." and stuff like that
It doesn't do much logic
 
converting it to node.js is another
it doesn't even make sense
 
5:33 AM
^would anyone recommend this to me?
 
5:54 AM
@JoelBartlett 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.
 
@AwalGarg I would not recommend PHP to you
 
@JanDvorak well, I am done with learning most of the php already... and I have no intentions of learning it more :P
 
good :-)
 
@JanDvorak indeed it is good, but the problem is, I can't find a very good way to start learning node. With PHP it was like just start doing the code, and I can collect the rest on the way. Node.JS is not very happy with me...
 
@Meredith What browser are you using? In Firefox on multiple computers, split comes out a couple hundred times faster. It looks like I misread the chrome results that came out before and that it's much slower in Chrome (though not as much slower as it is faster in FF, if that makes any sense as a basis of comparison). Apparently far from universal.
 
6:00 AM
I'd say, "set a goal, open the documentation, try something (hello world, primitive chat room using websockets...), find out why it doesn't work, learn from your mistakes". Node.js is just Javascript + some server-side APIs.
 
@JanDvorak I dunno why, but I even client side JS doesn't suit me very well.
 
@AwalGarg I'd start there
 
@JanDvorak you mean client side JS?
I tried to learn the RegExp mechanism, I put in a week, and still, I can't make a simple one. I tried RTFM, MDN and a blog post... vain
 
@AwalGarg define "RTFM, MDN". MDN is the documentation
 
@JanDvorak rtfm - the official one, mdn - the mozilla one
 
6:05 AM
@AwalGarg define "the official one". The W3C spec is very hard to read.
 
@JanDvorak yep, the W3C one...
 
w3schools != w3c
 
w3resource.com @JanDvorak
^this one is what I tried
 
let me check...
 
it seems a lot like the official one
 
6:08 AM
that's what w3schools pretend to be as well
 
is it not good then? Which one will you recommend me?
 
from "about":
> w3resource.com is not related with W3C by any means except some of the topics taught by w3resource follows standards maintained by W3C. - See more at: w3resource.com/about.php#sthash.SQax1469.dpuf
 
o.ow... I didn't read that!
 
so, not the official one. I haven't checked the quality, but the name trickery smell to me already.
 
I guess you make sense, cus the php tuts there are outdated as well... but they did help me start. After that, just any php thing goes straight inside me. Thats what I am looking for js and node.js
 
6:12 AM
 
if they tell you to use mysql_ - go away. They are outdated. If they don't even show mysql_real_escape, run away. They don't care about security.
 
@JanDvorak oh, I know. even mysqlI are outdated. I have long since migrated to PDO :)
 
@AwalGarg are they? Link?
 
@JanDvorak link for what?
 
that mysqli_ is outdated. Is it deprecated or pending deprecation, or just superseeded?
 
6:16 AM
@Nick Yeah I'm using chrome
 
The recent php versions come with PDO by default... and they come with mysqli as well. it is just like when mysqli came out and mysql was about to be deprecated... @JanDvorak
 
umm... w3res... saying that "Cannot automatically write to hard disk." for both Java and Javascript is extremely confusing... especially since you're saying that Java is [primarily] a server-side language.
 
bye... power is out. bbiab
 
@AwalGarg Noted. I'll start recommending PDO only from now on.
 
I don't trust a website with urls ending in ".php"
2
 
6:19 AM
"Every web page is a collection of several individual elements[,] which are called objects" -- err...
 
w3resource[at]yahoo[dot]com or when they do this
makes me want to send their email to a spammer
 
lol
shadiness level over 9000
 
Discussion powered by Disqus. Is that a good thing?
It is a good thing they have a means of feedback
 
Well, it is good that they let you use feedback
But when a site about web development doesn't trust its developers to make a good feedback system
I guess I get a little concerned
 
@Meredith Wow. Yahoo.com is a dinosaur by itself, but it is a long time since I've last seen people try to trick the email spiders
@Meredith the choice could be due to development time constraints.
 
6:23 AM
Yeah, but let's be honest here
It really doesn't take that long
Especially if you're an expert in web development.
 
@JanDvorak from personal experience yahoo.com is more solid than outlook.com for emails
 
@Meredith they're experts in eeeverything :-D
@WalleCyril that's like saying "I'd rather be hit by a train than by a car"
 
Are email spiders not a thing anymore?
I don't have any sites where I need to put an email anywhere so it's never been something I've worried about
 
@Meredith the primary means of collecting emails is to put up a login form
"mouse over on a link to change the appearance of the link" -- should be done by CSS, not Javascript
 
Oh god
Where is that?
 
6:27 AM
Why the hell do they append " - See more at: w3resource.com/javascript/introduction/… " to everything I try to copy/paste from their page?
 
They think people won't delete it when they paste
visitor whoring
guys please look at my website please please learn javascript please
 
I think I won't delete it. It's a stupid way of attributing a quote, but it's the one they chose.
 
I also don't trust any javascript reference that isn't at least partially wikified
 
> JavaScript ... is enable to display various formatting of date-time through it's internal date object. - See more at: w3resource.com/javascript/introduction/…
The grammar has strong with this one. Also, the internal date object isn't very good at formatting.
 
Probably the thing I hate most about javascript is the date object
I have a tendency to always output dates that are a few hours off
 
6:32 AM
if you need to work with dates in javascript, pick moment.js
 
Ehh not really anything hardcore
just going from unix time stamp -> formatted time
 
The way I work with dates in Javascript - timeLeftWaiting = MS_IN_DAY - (Date.now() % MS_IN_DAY)
BTW, I like that time in ruby uses fractional seconds instead of integer miliseconds
 
I don't have much experience with ruby
 
loop{repaint; sleep 1/60}
@Meredith do learn it.
 
I'll learn ruby eventually
At this point though I think it's uglier than php
I've done a lot of work to make php prettier
 
6:37 AM
@Meredith Why? I like the ability to omit parentheses
 
I actually prefer some structure
Throw an error if I do something wrong
 
You can
number divided by a string is a type error
Parsing non-numeric strings to numbers fails miserably. PHP just ignores the string from the first non-digit on.
 
I built a small library to make php more strongly typed
 
PHP is a thin wrapper around a bunch of C libraries
 
Yeah
 
6:40 AM
Ruby is strongly typed by itself
Oh. You're trying to fix PHP. Please check out this site: failblog.cheezburger.com/thereifixedit
 
Not fix so much as make it possible to work with without wanting to commit suicide
 
The best way to fix PHP is with heavy chains to a basement wall.
 
I really don't see ruby as any better than php though
 
@Meredith why?
 
no parentheses no brackets no love
 
6:43 AM
You can use parentheses and brackets
 
You can but you don't
 
it's better style to use do...end for multiline blocks, but curlies work just as fine.
 
how is that better style
would you use that for javascript if you could
 
or rather - the recommended style for Ruby
 
Also ruby has a million asinine keywords
In ruby you "raise" an exception
 
6:46 AM
The keywords are different from those in C-like languages but there are not more of them
 
Yeah that wasn't what I was trying to imply
 
If you don't like unfamiliar keywords, just wait until you see Haskell :-D and Haskell is an awesome language.
 
JavaScript can be used to validate form data ... before sending the data to a server." -- Uh oh. "If you want to validate the said data in server side ..." -- FAIL @ w3resource
@Meredith strict separation of side-effect-free code is a great thing.
 
@JanDvorak sorry, we are having random power cuts every now and then...
 
6:50 AM
In order to do something, you must say that that something is (a part of) the action that should happen when the program runs.
@AwalGarg check out the faults I have pointed out already. And I'm still on the first page...
 
alright, I will read the transcript...
 
Wow I'm so glad w3resource taught me how to validate data with javascript
 
their paragraph about cookies is extremely confusing concerning how javascript is concerned
 
Now I don't have to validate anything on the server anymore
 
lol
 
6:53 AM
@Meredith see? They never tell you you still have to.
> Sometimes it is difficult to create pages that are displayed identical on different browsers or even operating systems. JavaScript can detect the visitor's browser and load the appropriate page for that specific browser. - See more at: w3resource.com/javascript/introduction/…
What the absolute f**k???
 
If you want to validate the said data in server side you have to wait while the information is sent up to the server for checking, using JavaScript you can detect the error and prompt the user immediately.
Seems like they're implying that validating with js replaces serverside validation entirely
 
First off, browser detection should be a last-resort when creating cross-browser pages
 
Never do browser detection
Ever
Feature check if anything
 
hmm, reading the transcript, I feel I missed a lot of lol points... :(
Jan, so what is a good resource for a n00b like me to learn JS and node?
 
Does this site have a form anywhere
 
6:55 AM
Second - if you do want to browser-detect, you do it by applying small changes to existing pages, not by switching to an entirely different page
 
Since they don't validate things on the server...
 
Third - if you do want to switch to an entirely different page, you do it on the server to save a round trip and a bunch of code
 
I tried to xss their search form but it just does a get request to google
 
@AwalGarg learn.jquery.com has a part with javascript 101
 
6:57 AM
@Meredith click on the name field, don't enter anything, click out, try to switch to another tab or something, and you are screwed... thanks to the prevent alert option..
 
@AwalGarg codecademy.com has a tutorial that goes quite slow and does frequent evaluation. I'm not sure it goes very far, though.
 
@AwalGarg Haha you pinged me and I was trying to see what you said but the damn alert kept me away
 
lol
 
They don't let you have + in your email
 
finally, MDN has some tutorials themselves: developer.mozilla.org/en/docs/Web/JavaScript
@Meredith That happens way too often.
 

« first day (1337 days earlier)      last day (3606 days later) »