« first day (1526 days earlier)      last day (3416 days later) » 

8:01 PM
@Makerimages well, the general rule for small games is to have two loops - one for game logic on a setInterval and one for drawing set on a requestAnimationFrame. If it's possible make the entities in the game objects and you can have objects implement a draw method for instance.
@copy the messages don't have to be deterministic - it's important that the execution order is though.
@m59 enjoy your new badge on stackoverflow.com/questions/25877704/… :)
 
K, I'm giving this engine idea of mine a go..
 
@copy I don't know, I wouldn't bother with naming it too much.. after all every object access in OOP is conceptually message passing. You just use shorthand .property() syntax where you are in fact passing a message of the object and it chooses to act on it.
Sort of - that's how OOP theory sees things - calling methods on other objects is message passing.
So I'd just call it RPC :P
 
It's not really RPC because the procedure doesn't need to exist (as in, there doesn't need to be a listener for an event type)
 
8:22 PM
Can someone access 14.98.74.228:8788 and tell me what it says?
 
@copy so?
@AwalGarg browser_not_supported
HTTP/1.1 200 OK
Host: 14.98.74.228:8788
Connection: close
X-Powered-By: PHP/5.5.9-1ubuntu4
Content-type: text/html
 
@BenjaminGruenbaum what browser are you using?
 
Ditto that for Opera
 
User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
 
8:23 PM
:(
 
@BenjaminGruenbaum Doesn't RPC somehow imply that the remote procedure exists?
 
I think I should just use a lib :(
 
@copy well, with message passing languages like objective C it is often common to allow it but to ignore the request and often return nil (I hate nil)
@AwalGarg what are you trying to do?
 
@BenjaminGruenbaum parsing user agents
 
Why are you doing that?
There is this but it's generally a bad idea to parse user agents.
 
8:27 PM
Because I saw that a lot of websites give different HTML according the user agent string, and I was wondering how efficient it would be.
 
It's actually considered an anti pattern.
 
Any recommendations on good books about node?
 
You always want to feature detect instead of browser detect and then perform graceful degradation in older unsupported browsers.
@DemCodeLines nodebeginner.org is a good start
 
@BenjaminGruenbaum Alright (I like Connection or Pipe more though :P)
 
Connection pipe or socket also work :P
 
8:30 PM
@BenjaminGruenbaum I know, but it could be useful for serving a lighter and faster website on mobile devices, no?
@DemCodeLines Are you fluent with core/client javascript?
 
To be fair - I'm not sure how the market looks like in India nor do we target it so if you're targeting locally YMMV. We mostly target smartphones and smartphone users expect high quality websites - certainly not much worse than the desktop version.
 
A lot of people in India use Opera Mini -_-
and yeah, I am targeting locally.
 
In that case I have no idea what I'm talking about, all the best practices I know target smartphones and not feature phones.
 
Opera Mini should be removed from all app stores.
 
It's still probably a better idea to detect screen size but idk, I'm sure there are good articles on targeting these.
 
8:36 PM
ok
 
Opera Mini is an awesome browser
 
K, Imma gonna pop off now, gnight
 
Good night
 
I use Opera Mini on my phone
 
@copy Not necessarily, you have things like method_missing in Ruby or doesNotUnderstand in Smalltalk (which started/popularized it all) as a blanket.
 
8:38 PM
So today at the cinema the automated ticket machine got stuck
It was all laggy and did weird thing so my friend started blaming windows instantly.
 
But there's the eternal question of "what's the value which means no value"
 
"Windows is so bad, it takes so much memory, look how slow this is"
 
Suddenly, Linux Mint
 
lol
 
Suddenly, raccoons
 
8:39 PM
Suddenly, Opera Mini
 
@Zirak ARCH actually
It was pretty funny to watch him squirm :D
 
hah, how'd you find out?
 
It crashed and went to a status panel
 
Lame
 
Naa... it was all worth it for the look
 
8:43 PM
that looks like the default conky config to me :/
 
16d of uptime though :P
 
5.73gigs HDD. ??
 
It's just a machine that sells tickets.
I'd just use a galaxy s1 with android and write an app if I were them :P
 
m59
@BenjaminGruenbaum thanks!
 
wouldn't an arduino be enough?
 
8:55 PM
Just probably not much cheaper
 
ah yeah? maybe yeah
 
@BenjaminGruenbaum oohhhh, it has a wlan nic
 
regex101.com added unit tests :O <3
 
m59
wow only 124 questions for ractive stackoverflow.com/questions/tagged/ractivejs
looks like knowledge of that library won't be earning me any rep lol
 
regex101 is awesome! luv it.
 
8:57 PM
@m59 that's backwards IMO.
 
m59
@BenjaminGruenbaum hmm?
 
I answer promise questions because they're not very popular so by answering them I promote a technology.
If you want to promote a library or tool then answering (and asking) questions about it is a big part of how you do it.
 
m59
Oh! Don't misunderstand, rep (no longer) influences my actions at all, I was just being funny (trying)
 
Then again there's also the fact rep is meaningless above a 10k threshold :P
 
@BenjaminGruenbaum 20K
 
9:00 PM
Why?
 
m59
You do get the last bit of mod privs at 20k
 
last privilege is at 20K
There's also one at 15K
 
hello I am trying to load CSS and Js on runtime with javascript. The issue I am facing is sometimes it doesnot load the requested files and status keeps on pending. Same is the case when I try to load things with ajaxload(). Is there a way to put timeout and reinitiate the request if data doesn't return request.
 
9:13 PM
If the server is right configurated you will have a timeout from the server
Just check error and restart the loading
 
are you talking about execution time on server?
 
yep
or service time
if a ressource is too long, the browser will skip it, no ?
 
In ajax call I can easily set the timeout but not able to set it for ajaxload() or $.getScript("js/js.js");
yes I am being a victim of skiping
that's what happening, the request gets skip very rarely but that does happen
any idea how to fix this?
 
you must have an error handler
if the loading resource failed than the error handle should recall the loading
But if you have loading problems, that might come from the server
 
So someone emailed me about an error in a guide I wrote several years ago. I'd normally fix the error, but I don't have access to said game (and even if I did, it's about a boss halfway through, not gonna play through it again). He also said my guide was helpful...so I really want to help and fix...but...well...obvious reasons against it.
merph
 
9:21 PM
an someone pls tell me stackoverflow.com is not working i m getting alert in browser that
For Security Reasons Framing is not allowed press ok to remove frames
 
@user3233280 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.
 
thanks can someone pls help me its general error of stackoverflow.com i m facing from previous 2 days
 
@dievardump for loading a new page with ajax. Do you think following is the right way of doing it?

ajaxLoad = function(html) {
				document.title = html
				.match(/<title>(.*?)<\/title>/)[1]
				.trim()
				.decodeHTML();

				init();
			},

			loadPage = function(href) {

				main.load(href + " #main_wrapper>*", ajaxLoad);
				if (href.indexOf('music') != -1)
				{
					$('#music-slider').load(href + " #music-slider>*", ajaxLoad);
				}
			};
 
!!tell user3027531 format
 
@BenjaminGruenbaum Don't be annoying, drop the @, nobody likes a double-ping.
 
9:23 PM
For Security Reasons Framing is not allowed press ok to remove frames
@CapricaSix @BenjaminGruenbaum
 
format?? @BenjaminGruenbaum What do you mean by that?
 
@CapricaSix omg, Caprica is awesome.
 
@user3027531 Format your code - hit Ctrl+K before sending and see the faq
 
@user3027531 don't parse HTML with regex :O
I'm afraid to ask what's .decodeHtml?
 
Why are you loading the whole page with Ajax ?
 
9:26 PM
Site is full ajax based. Cannot relaod the page else the music will get stop
 
HAMMERTIME!
 
@BenjaminGruenbaum

String.prototype.decodeHTML = function() {
				return $("<div>", {html: "" + this}).html();
			};
 
Oh god no. Why do you do that?
 
than serve you content otherwise
don't serve HTML
Serve JSON that you transform into DOMElements client side
 
You know, you can use native XHR to get a documentFragment you can attach to your DOM directly.
Also, it's better to first put it in an element and then get its title with the dom parser and not regex.
Also, don't put stuff on string's prototype.
 
9:27 PM
^ I disagree with that, as long as you know what you're doing
 
All I am trying to do is to get the entire html page then its title and then that content from the container which is common among all pages and display the output accordingly.

Also using html5 history api with that
 
I am from the few who think that's ok to modify prototype of native Objects.
 
var xhr = new XMLHttpRequest();
xhr.responseType = "document";
xhr.onload = function(){
    var doc = this.response;
    var title = doc.title;
    // work with document anywhere...
};
xhr.open("GET", url);
xhr.send();
Meh,
Just don't put stuff on prototypes unless you have a really good reason.
 
9:32 PM
Object.prototype is pretty bad
 
LOL, I just googled for something and found my question.
 
so guys any suggestions? I shared the code above of how am i trying to do all that...
 
Or just serve JSON and use a client-side templating thing
or even something like Angular
 
@BenjaminGruenbaum will look into it. Plus the code you shared is pretty much simple too. How can I put the timeout to reinitiate the request onto that?
 
9:36 PM
@Zirak Dude was right, there's a Japan-only version of the game where shit's different
 
Normally you wouldn't need to
@Zirak what guide?
 
@BenjaminGruenbaum Baaah
 
@BenjaminGruenbaum can you kindly let me know how can I get the input from your code like following `Getting all the data present in the response where id = main_wrapper`

main.load(href + " #main_wrapper>*", ajaxLoad);
 
user image
7
 
createTreeWalker + complexWhileLoops = AWESOME RESULTS
 
9:46 PM
> he’s listened to the account of that little shit Zacchaeus probably a hundred fucking times now
 
Why they deprecated NodeFilter.SHOW_ATTRIBUTE? :( Too bad.
They just like to deprecate every fun thing from the spec :( Like <blink>.
 
Does SO keep stats of the quality of questions vs times/timezones?
Would be interesting I guess
 
10:01 PM
lol, found this classic again.
 
hehe
 
10:16 PM
@BenjaminGruenbaum just one star away on that message from half a century :D
 
.
...and! @Zirak did the need full! \o/
I m writing a hacky client side template engine for development lol evil grin
 

« first day (1526 days earlier)      last day (3416 days later) »