« first day (1032 days earlier)      last day (3930 days later) » 

6:02 PM
!!are you awake?
 
Canada
 
!!how about now?
@SomeKittens That didn't make much sense. Use the help command to learn more.
Room: While @Zirak's taking a year dead for tax reasons, I'm running the bot. Don't get me banned.
2
 
user1596138
Also, anyone want to translate PHP to JS for me?
 
user1596138
Why don't arrays work the same.
 
@ShannonStrutz 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.
 
user1596138
6:11 PM
Basically what I want to do in JS... But somehow it gets fucked up?
 
user1596138
Got it.
 
8 messages moved to Sandbox
 
6:25 PM
!!help echo
 
user1596138
@SomeGuy Command echo does not exist.
 
user1596138
@SomeGuy Command echo does not exist.
 
Two copies of the bot?
 
user1596138
Oops
 
!!help
 
user1596138
6:26 PM
The bot is down... A couple of us were playing with it. Now it's off.
 
Bot's back on, switching rooms killed it.
!!are you still there?
@SomeKittens Probably
 
!!will you stay?
 
@JanDvorak Nuh-uh
 
:-(
 
@IvoWetzel sweet man!
Im definitely going to mess with this
thinking of making a leapmotion game
 
6:30 PM
@Loktar You should use context replies. I don't know what you're talking about!
Make it easier for people to stalk these chats.
 
user1596138
!!reply !!learn loop '<>!!loop'
 
!!learn loop '<>!!loop'
@SomeKittens Command loop learned
 
user1596138
!!loop
 
!!loop
 
user1596138
@SomeKittens That didn't make much sense. Use the help command to learn more.
 
6:32 PM
> Don't get me banned.
 
user1596138
Not working :/
 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1.html [L]
kk so I have this ^
 
!!loop
@Jhawins Please don't post the same thing more than once in a short period of time. If it's a question, try again in a few hours.
!!loop
 
it takes example.com/foo/bar.html and gives me example.com/index.php?url=foo/bar.html
 
user1596138
Fuck it.,
 
6:34 PM
@HeyHey 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.
 
why is it trying to look for images and resources then from /foo/ and not /
WHYYYYY
@SomeKittens I can put the bot back up - but I don't have the localStorage
 
user1596138
How's the PHP script setup?
 
(I do have the bots login)
if( isset( $_GET['url'] ) ) {
  $url = $_GET['url'];
} else {
  $url = '404.html';
}
$content = file_get_contents($url);
require('template.php');
@Jhawins ^
 
@rlemon Yeah, boot it up. Better than me running it.
 
shit, what is the bots email address :/
I'm onto you NSA
 
6:39 PM
On Twitter, you follow NSA
 
@Loktar The doc parser is in the grunt files, I'm currently working on making that thing standalone and "intelligent" enough to figure out module patterns and node.js code so it can be used for other projects too. Also it will be quite modular, so you can plug in "detectors" for custom exports / classes patterns etc. and it will not worry to much about the doc format, we'll just provide the nodes it finds along with the doc that is related to them. Then you can run you fav doc parser on that
 
Do I work in IE?
 
user1596138
@rlemon wtf
 
probably not eh?
 
@CapricaSix Do you WANT to work in IE?
 
6:41 PM
@Jhawins what?
it's pretty much what i'm doing
 
brb in FF
 
@TriNguyen 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.
 
user1596138
That doesn't make any sense.
 
!!are you alive?
 
@rlemon Of course not
 
6:42 PM
@rlemon Certainly
 
@SomeKittens you can kill yours now
 
!!are yu still alive?
 
@JanDvorak By all means
 
!!he's dead, Jim
 
@SomeKittens That didn't make much sense. Use the help command to learn more.
Attention room: Until my master returns to fix me rlemon has booted me up - I am running but without any of my memory. No user commands, no ban/mute lists, and all welcome information is reset
 
6:44 PM
!!welcome
 
@JanDvorak 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.
 
@Jhawins what doesn't?
that it is looking in /foo/ or my code
 
user1596138
Yeah.
 
lol
helpful...
 
user1596138
Did you try phpinfo() to check?
 
6:45 PM
A or B, yea.
the only page being run is index
i'm pulling the contents of the content pages and including them on the index.
why would it look relative to a content page?
 
user1596138
Where did phpinfo say you were at if run within index?
 
user1596138
Right. That's how we do it and it works fine.
 
says i'm where I should be. /
example.com/foo/bar
turns into
example.com/index.php?url=foo/bar
and I can die( $url ) and see that (from index)
however the content pages i'm get_file_contents on and echoing on the page are looking relative to foo/
so if the content page has an image ../img/foo.png it is looking in foo/img/foo.png
 
user1596138
Hmm...
 
and I have no bloody clue why
 
user1596138
6:48 PM
Try using include instead of get_file_contents, just for shits and giggles.
 
well then I would need to move the include into the template file.
isn't a big deal, but the other way should work no?
file_get_contents is... changing the relative linking?
 
user1596138
Just make $content = file_get_contents($url); $content = include($url);
 
you can do that with include ?? cool
I thought it just included the file contents inline that file and parsed them
 
user1596138
I don't see why it would change the directory though still.
 
like require('foo.php')
 
user1596138
6:50 PM
Yeah, include is just like require except for it not killing the script if it fails. It'll just throw an error.
 
also, you are incorrect in using include where I would have used file_get_contents
> include returns FALSE on failure and raises a warning. Successful includes, unless overridden by the included file, return 1.
hrm... I think I got it
.htaccess is not being respected by the browser (which it wouldn't be)
so even though on the server I see one thing (properly) the client will always think i'm in a new path.
 
user1596138
include wouldn't be the correct way to do it, unless it was a php script. But it would work. I just wanted to see if it changed the directory.
 
user1596138
I can't recreate the error you're having.
 
@Batman 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.
 
user1596138
Definitely .htaccess.
 
6:58 PM
0
Q: Create own game engine or use existing?

GrowlerI'd like to build a web single player 2D top-down RPG (similar to old school zelda). Project goals: Learn game development Sharpen JavaScript skills I actually have a decent idea for a game, so I want to build it for people. So far (see WIP game here), I've been able to get a hackish camera...

 
Anybody have a good place to learn the side of javascript that uses the .init(), it seems more advanced than regular web development uses of javascript and It would be nice to learn
 
@ShannonStrutz I'm not entirely sure what you mean. .init() is just the name of a function.
Are you speaking in relation to object oriented programming?
Or just... some random function called init?
 
@RyanKinal Sorry, I haven't been exposed to it entirely so I'm not sure how to word it. Yea, it seemed kind of like javascript OOP
 
@doubleswirve 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.
 
@SomeGuy ok I feel like an idiot ... how do I do a context reply?
 
7:01 PM
@ShannonStrutz Try this (and maybe the previous article as well)
 
@Jhawins no I figured it out
problem is the client doesn't see the 'modified' url
I was just being silly.
 
@RyanKinal Hey hey That is exactly what I was looking for! Thanks!
 
so the client will see I am in /foo/ and I am requesting the relative resource bar.png
 
@Loktar Click the "reply" button on the right of the star button on a message.
 
user1596138
Weird....
 
7:05 PM
Or if you use the little modal dialog thing to star. In which case, click the "reply to this message" text.
 
user1596138
Apparently I've been driving about 2K miles/month for 3 months on a suspended license. And I had no idea.
 
@SomeGuy ah well Ill start doing that if I remember :P
 
Haha, okay.
 
@Loktar if you don't remember, you will get cancer.
 
7:07 PM
Off to bed. See you guys later!
 
it's a serious thing.
 
Hahaha
 
try to remember...
 
shit.. well.. Ill try to remember
 
I hate PHP
just saying...
php arrays are key => value yes?
yup
 
7:09 PM
@ShannonStrutz No problem :-)
 
I wish I could give rep in chat rooms
 
user1596138
@rlemon Had that problem earlier today...
 
!!write my own routing or spend the rest of the day porting this over to CodeIgniter
 
@rlemon write my own routing
 
user1596138
What are you fucking with PHP for?
 
7:10 PM
eh, this time i'm not listening Caprica
 
*Why are you fucking with PHP?
 
@Jhawins back end for companies website
they delivered a dirty diaper filled with rotting indian food.
now I have to try to clean it up -> rewrite the backend and fix the front end while the content team re-writes all of the content
 
user1596138
That one you waited months and months for?
 
then figure out a way to fuck over the company that fucked us over
@Jhawins the very same.
 
user1596138
Sounds great.
 
7:12 PM
not just technical issues - all of the content needs re-writing
we got flossed
stupid fuckers.
/rant
 
user1596138
Did you pay them anyway?
 
payed up front, contract and shit
 
user1596138
Sue them?
 
user1596138
If I order a prime rib and the waitress comes back with a fucking McChicken (and we are in fact not at a McDonalds) I'm not going to pay her for it...
 
!!google ThomasNet reviews
 
read the ones that are not obviously by them
pissedconsumer gives you an idea
they are a large corporation based around fucking the small companies.
!!refresh
!!are you alive
@Zirak when you return and boot up the bot, if I'm not around to disable my version - run !!refresh and she will die on my end.
I ran the bookmarklet and not the userscript - so a refresh will kill me
 
@eazimmerman 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.
 
Good afternoon, Caprica. Nice to see you up and running again.
 
my butt smells like death.
 
wash it
or you could go show goats how its done
 
7:27 PM
!!gradient 1b9e77 d95f02 7570b3 e7298a 66a61e
 
!!LoL or open mic
 
@RyanKinal open mic
 
Probably a good choice
 
@Shmiddty That didn't make much sense. Use the help command to learn more.
@nsawaya 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.
 
7:33 PM
"We even have W3Schools certified programmers here!" this is considered sarcasm??
 
user1596138
No one ever pulled gradient...
 
user1596138
@nsawaya Yes?
 
user1596138
Who would brag about that?
 
@nsawaya No. w3schools certs are serious business.
 
hehe
 
7:36 PM
You act like you don't have one.
 
my mother told me "don't mess with the w3schools guys" so I figured.....
 
I mean, sure, mine is drawn in crayon and stuck to my mom's fridge, but still. I have one.
 
@user2114177 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.
@vzhen 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.
 
well, it's a thought, but I think being w3schools certified is in fact being de-certified in js if such word exists
 
@nsawaya agreed
 
7:38 PM
is there a jQuery cert?
if there is, I would argue that would be the cert.
 
@Ryan Kinal everytime I read your name I get Ryan Dahl and then I freeze
 
My return data is object. How can i get this 3 things
- the size of object.
- the first object
- and the last object?
 
@Scottux 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.
 
@vzhen keys in an object are not sorted
 
this reduces the question to one
the size of the object
let's check w3schools
 
7:40 PM
@JanDvorak that mean I MUST use array object?
 
or an array of objects
 
so favorite JS author? JS library or toolkit or whatever they call them? JS editor?
 
Editor: SublimeText
 
@vzhen you can get the size by iterating over the object
var key, count = 0;
for(key in data) {
if(data.hasOwnProperty(key)) {
count++;
}
}
 
Author: Ummm... Simon Sarris?
Library: VanillaJS
 
7:43 PM
Author: Nicholas Zakas
Editor: VIM / N++
library: n/a
Simon is my second favorite author
 
Wait, scratch that. My favorite author is me.
 
lol
 
;-)
 
Author: Zakas, I guess, if I can't choose me
Editor: ST2
Library: Knockout
 
this guy is freaking amazing
 
7:44 PM
!!help
 
!help
 
@Scottux Object.keys(obj)
 
yep Zakas is my reference for everything JS (I only look for Crockford if I need a slideshow)
 
Crockford has some great reads as well
crockford.com/javascript/inheritance.html and javascript.crockford.com/prototypal.html were some of the best resources I read on the subject
 
7:45 PM
Yeah, Crock is a classic.
 
lol fucking bullshit
> The .size() method is functionally equivalent to the .length property; however, the .length property is preferred because it does not have the overhead of a function call.
!?!?!1
OMg
 
ROFL
 
this is worse decision than stuff like $.inArray
 
jQuery.fn.size = function () {
    return this.length;
};
 
@rlemon it will be inlined so the decision is completely off base
:(
 
7:48 PM
why if you are using jQuery, would you care about this kinda fucking 1 op crap
 
I want to call methods
I love the ()
 
yea, style aside. There note leads me to understand .length is better performance.
 
maybe if you don't use the () it won't look like the Query part in jQuery, just saying
 
however if performance is key, the #1 gain will be to not use jBloaty
 
*their
 
7:49 PM
@rlemon but my point is that IT IS NOT
 
just passing see the rage
 
it is same performance
because of inlining
the sentence would have made sense 10 years ago in IE4
 
their is something that bugs me when they're is someone who thinks there grasp of grammar is better than mine.
F U
 
I exaggerate for effect
 
@Esailija I just don't see why they touch on any sort of shit optimization like this
 
7:50 PM
yes that is my second point
 
jQuery.length === 2 ; // true ?
eh, crazy jQuery
 
user1125394
function sync(a1, a2){
	var a1h=[], a1t=[], a2h=[], a2t=[];
	for (var i=0; a2[i][0]<a1[0][0]; i++){
		a1h.push([a2[i][0], a1[0][1]]);
	}
	for (var i=0; a1[i][0]<a2[0][0]; i++){
		a2h.push([a1[i][0], a2[0][1]]);
	}
	for (var i=a2.length-1; a2[i][0]>a1[a1.length-1][0]; i--){
		a1t.push([a2[i][0], a1[a1.length-1][1]]);
	}
	for (var i=a1.length-1; a1[i][0]>a2[a2.length-1][0]; i--){
		a2t.push([a1[i][0], a2[a2.length-1][1]]);
	}
	a1 = a1h.concat(a1).concat(a1t);
	a2 = a2h.concat(a2).concat(a2t);
}
 
Why would anyone ever use .size() over .length. it makes absolutely no sense imo.
 
because if you want behavior you can add it without breaking compatibility with ie8
 
user1125394
can it be improved a bit, knowing a1, and a2 are big, and a1h,.. small
 
7:54 PM
using external data properties directly is just WTF
 
why are you using nested arrays? it appears that you're only using 0 and 1 for the nested arrays.
 
99 little bugs in the code, 99 little bugs. Take one down, pass it around, 107 little bugs in the code.
 
> take one down, fix the bug, compile it and send it to QA....
ftfy
 
user1125394
> $.length
2
 
ohh my sweet jesus
function.length tells you the number of arguments for the function
o_O
learn something new every day
 
user1125394
7:56 PM
o
 
true
 
!!> (function foo(a,b,c,d,e,f,g){}).length
 
@rlemon 7
 
I never knew this before
 
it's not totally useful imo
 
7:58 PM
sure it is.
maybe
hides
 
user1125394
!!> Array.prototype.length
 
@cx 0
 
it can be used to enforce callback signature
 
@OctavianDamiean yay pics
 
but that's restrictive
 
7:58 PM
I didn't get my postcard :/
 
@rlemon They sent it to me
 
but Canadian post is pretty bad.
so that might not have been on purpose
 
@rlemon That's weird. :(
 
wow i didnt know length worked on function either... cant imagine theres ever a need :P
 
@Loktar have you got your postcard?
 

« first day (1032 days earlier)      last day (3930 days later) »