« first day (762 days earlier)      last day (4411 days later) » 

00:00
Refactoring is so satisfying.
My current project would be so much easier if my college would just let me at their database.
What are you working on?
What essentially boils down to a course search engine
00:17
> "We want you to write our search engine"
Ok Sweet! What is your database credentials.
> "You cannot have them!"
well... don't you think that will make my job a little difficult?
> "Blasphemy! you can twirl your magic programming wand and make it happen!"
here is my face, and here is my hand...... watch as they collide.
@rlemon not quite how it worked
This is for a class project
I'm not actually working for our IT (the horror....)
I'm going to imagine it the other way around, it's more entertaining for me that way.
me too
0
Q: Javascript keyDown - no event approach

Piotr ŁużeckiI'm making game in javascript. I have canvas for drawnings and game loop. I'd like to make method readKeyboard, in game loop, to check if there is any pressed key. I don't want to attach event to canvas, because it does'nt fit game loop design. Maybe i should attach this event? What is best sollu...

00:37
wow... i'm actually bored on the internet.
it's painful.
Doesn't that break some sort of rule?
i think, maybe... probably if I were a bit more sadistic...
Meh. This seems as good a time as any to start Ovid's Metamorphoses.
00:42
!!/define Ovid's Metamorphoses.
Could not find definition for Ovid's Metamorphoses.. Trying Urban Dictionary
@rlemon [Ovid's Metamorphoses.](http://ovid.urbanup.com/807250) An acient Roman poet who wrote the Metamorphoses, a famous epic poem. He was exiled from the Roman empire, and he lived out the rest of his life in isolation. Ovid's Metamorphoses was a major inspiration for the works of William [Shakespeare].
Basically Canterbury Tales for Ancient Rome.
I read the dictionary once... it was after the bible and before the first half of the phone book. I got grounded as a child as ADHD took over and as punishment I was deprived telephone, TV, video games, and friends coming over... I exhausted all other book sources.
.....ouch
sounds sorta like my entire childhood
I've read the dictionary, but not the Bible. I gave it a go, but it just seemed poorly written =P
ouch.....
00:45
Seriously, Noah supposedly lived for over 900 years.
We didn't get cable, I didn't have friends, so books! (and legos. Legos were awesome)
Fuck. That.
Legos are still awesome.
True. Anyone have Meccano?
I read the bible, the qur'an, and a buncha shit on buddhism.. it's all basically the same, but if you ask me the buddhist are the right ones runs now in hopes to not spark religious debate
@CallumMcLean I have like 5 sets of the stuff to this day.
00:47
The idea of a personal god is stupid :P
1 original from when I was like 7 and the rest my gf bought me for Christmas
Buddhism matches my thinking most closely.
@CallumMcLean No, but they look fun
there is no deity in Buddhism
I basically have Minecraft now
00:48
They were, they really were. The miniature nuts-and-bolts were painful to tighten though =P
Buddha is a spiritual leader to self enlightenment
@rlemon, I know - that's why it's easily the best religion
On the note of religion and literature, anyone ever read Dante's Divine Comedy?
agreed.
@CallumMcLean Prepared you for work at Ikea!
00:49
@SomeKittens Ikea is nothing compared to meccano.
Oh dear.
Inferno I liked, Purgatorio was dry, Paradiso was pointless without a working knowledge of 16th century Italy.
don't get me wrong, I'm not a Atheist by all definition. I just don't think organized religion needs to exist. we fight wars over organized religion. spirituality is a special thing. don't taint it with forced oppression and murder. </rant>
I am an Athiest, I see that people have a purpose and a need for religion, but it's a simple cost/benefit analysis...
@SomeKittens Oh dear?
00:51
That sounds dangerous.
What? Meccano?
Something that's worse than Ikea
And to think it's a kids toy.
Like those old chemistry sets
Ikea is easy - all the bits and pieces are normal-sized and you can use screwdrivers and stuff. And yeah, I head one of the chemistry sets too - one of the combinations gave my mother the inspiration for what colour to paint our bathroom =D
00:53
The way i've seen it since I was a little kid is Religion is like a early judicial system. Don't kill or you will go to hell! Don't steal or you will go to hell! .. etc... now we have a real judicial system we don't need organized religion.. there are real consequences for your actions and you will be held responsible in this life. my 2 cents take it or leave it.
Religion does have it's plus points - the things it drives people to do, like architecture, beautiful music and art.
Religion or Spirituality ??
Ok, dumb question:
I've got nested JSON. Do I need to JSON.parse() twice?
Religion, usually. It usually gives people a starting point ;)
00:56
^ what I have accessible.. the rest is in a box I don't feel like digging out.
the top wooden box is also filled with meccano
Yeah, The nested JSON will be parsed to a string, so you need to parse it again.
the taped box is my 80's Risk game... still kicking it! ohh yea!
I wish I still had Monopoly =/
01:00
correction 1991... I just went and checked.
:)
Nevermind, figured it out
PHP array -> JSON -> JS object
bound to be some difficulties
As always.
Despite that, it's nice dipping into both PHP and node to get the best of both
node.js + mongo is my bread and butter
I love it
That's what this project's in (except for some PHP where I needed to do some scraping)
01:06
funny thing about "pictionary" is i tried to sell it twice at yard sales (hence the stickers) and twice a no sell... I'm stuck with it!
Where do I get to apply the strict mode to JS? I'm familiar with node and firefox.
first line of your js should be:
'use strict';
"use strict";
If the platform doesn't support it, nothing happens
eval('"use strict";'); // i hope  you realize..... "trololololol"
!!/tell rlemon eval 'use strict';
01:08
@SomeKittens Command eval does not exist.
nooooo
appliable to both node and the browser engine I surmise.
yep
It can also be used for individual functions
@phenomnomnominal I know JS rocks, but this makes it rock harder IMO.
Strict mode? yeah it's handy
01:10
I like my JS loose as a goose. no "strict mode" for me
@rlemon, you so bad ass.
.. i know :P tee hee
Says the man who posts a picture of "himself" as a unicorn
Lets say I do var stuff="hey"; stuff.myOtherStuff = 4; why is this illegal?
Excuse me while I eat this raw chicken and ride a motorcycle blindfolded through a flaming pit of virgins....... AND NOT HIT ONE!
string !== object (in strict)
01:14
^ this
s'alright. They're vaccinated against salmonella these days.
the virgins?
And the chickens too.
Sweet!
@rlemon That sounds like a very poor "feature" to me.
01:15
Why would you want to set properties on a string?
you enter "strict mode" but don't expect strict type 0_O?
what part of semantic is not semantic?
Extra functions on strings of course. No I don't expect strict typing in JS.
you'll hate ES6 revisions
say hello TypeScript
01:17
Can you add to the String prototype in strict?
Never tried it
!!/google Can you add to the String prototype in strict?
I just love the new, and the frugal additions I can make to any onject.
That's why I've never tried it :P
He'll do something invasive with that String.
01:19
Object.prototype.doThisShitToEVERYTHING = function() {
     return "failship dude.... seriously...";
};
@rlemon Yes, this is it. No seriously, this is why I like it.
@dievardump o/
how did you sneak past me you little devil you! :)
@rlemon I want to make JS contain all the goodies of PERL.
If you want classes and types; go C#/Java or whatever.
01:26
15 mins ago, by rlemon
I like my JS loose as a goose. no "strict mode" for me
@CaptainGiraffe If you want Perl, use Perl
CoffeeScript :)
Ok, I'll leaf you guys to it. Thanks for the answers though, helpful as well polished rubi(:s/i/y/)es. @rlemon thanks.
01:30
http://rlemon.github.com/lememe/ for all your meme needs
@rlemon tagged funniest guy on SO
does lememe have an API?
not yet.
"Lemon Meme" will..
> Lemon Meme: Fresh memes every day bro!
This could really do with an app.
You could really do with an app.
01:36
lol, well responsive design allows me to not need an app.
lemon meme will hopefully work on all major mobile browsers
camera api's allow for some cool shit
!!/google getUserMedia support mobile browsers
I meant the SO site, or at least the chat - the mobile 'experience' isn't great.
battery api - that's cool
yea the SO mobile experience is lacking.
01:43
The David Walsh link was on the Code Project newsletter, if that helps. That's where I found it, at least.
So I'm trying both return false; and evt.preventDefault(). Why is the page still refreshing? jsfiddle.net/QrZ6A
evt.stopPropagation();
?
!!/mdn addEventListener
iirc there is a third argument you are lacking
Nope, was bad AJAX code
didn't have onreadystatechange
01:49
Needs more jQuery.
Needs more Iliad. Lacking that Greek goodness.
@MONNERS USES SPLASH
Anyone here got any idea of how many users don't actually have js enabled?
Someone said 2% the other day
sounds about right
01:53
it was me
2% of desktops
@phenomnomnominal WHAT IS SPLASH
Some dumbass the other day said 2%
!!/google splash
!!/google magicarp splash
01:54
Oh god...
Well ok then
!!/google magikarp is the best pokemon
Maybe they could start a protest - "we are the 2%".
01:57
I was just wondering if all the effort it sometimes takes to make sites accessible without js is really worth it
it's not
IMO
Is it acceptable to just use a splash page that says "Join the 21st century, then come back" instead?
There's probably a library for it
Is it compatible with jQuery!!!
01:59
javascriptWillEatYourChildren.js
I joke. But seriously, I'm getting tired of catering to the tinfoil hat-wearing crowd
What's wrong with request.send('searchBox=Testament');?
I'm not getting any POST data on the server
will that not be GET?
it'll be POST. I'm tired and the internet isn't giving me any answers.
02:06
Oh yeah sorry, haven't used actual AJAX for too long
:P
@phenomnomnominal actual AJAX?
Yeah, I'm a lazy ass mo fo, $.ajax for me
Haha if someone is using a computer that is so old it actually cant handle a browser that supports javascript, and this person actually expects anything on the internet to work for them, please don't do anything to encourage that kind of stupid.

That's my opinion on the subject... haha
The thinking... I don't like it.
@twiz There're a whole bunch of people who disable js for security reasons
I'd say they're probably more in-the-know than regular users
02:13
If by in the know you mean paranoid then sure.
@monners Do people actually do that?
The fact is we live in a time where security isn't guaranteed, with anything
If so, they are smart enough to expect nothing will work though
@phenomnomnominal that's my philosophy. Just try not to do anything stupid and you'll minimize the risks
02:14
so they have no expectation for you to cater to their paranoia
@twiz Actually they do, because their understanding is that the internet is theirs and front-end developers are evil
Well, I suppose the latter part isn't entirely untrue
haha probably a good point
Al Gore probably does have that expectation...
Well, he almost beat George Bush in an election. Wouldn't you be a little paranoid? :P
Imagine how different the world would be
I'd rather not, it's far too depressing
It's ridiculous that the whole world doesn't get to vote for the US president.
!!/google rlemon
@monners No war, no massive crash, US runs a surplus. Yeah. Depressing.
Depressing that that isn't how it is.
02:21
Well there would still be one war at least...
Yeah, North vs South
:P
!!/google George Bush Fail
!!/google holy meat balls
@rlemon [The best of Steve Ballmer - YouTube](http://www.youtube.com/watch%3Fv%3De8M6S8EKbnU) ; [Steve Ballmer During Reid Hoffman Interview: People Are Having ...](http://techcrunch.com/2012/11/14/steve-ballmer-during-reid-hoffman-interview-people-are-having-their-oh-moment-with-surface/) ; [Ballmer on the Windows ecosystem: “The best of both worlds is ...](http://www.neowin.net/news/ballmer-on-the-windows-ecosystem-the-best-of-both-worlds-is-available-to-us)
@tereško [holymeatballs - YouTube](http://www.youtube.com/user/holymeatballs) ; [Online Leadership Program |](http://olpglobalkids.o
Is there a way to change listbox to editable box when i hit the listbox??
03:17
!!/tell albright google change listbox attributes onclick
omg that memerator is awesome
srsly rlemon; I'm hella impressed with your app there!
03:34
lol thanks'
Screw it, I'm using jQuery.
'Atta boy!
...which resulted in more problems. woo.
Fixed!
!!/jquery post
03:43
Bug? Don't you mean feature in disguise?
03:54
your bug is just my undocumented feature
04:20
This is worth watching:
www.ted.com/talks/shimon_schocken_the_self_organizing_computer_course.html/
I kind of feel like my brain is imploding right now...
That happens
For some reason jQuery .remove() and parentNode.removeChild will not work on server but will work locally...
I have no clue what I could be doing
got a fiddle?
Haha honestly, the page is just way too much of a mess
so yea, I'm not really sure why I bothered saying anything in here
04:31
We understand
Well, I don't think its useful, but here is a fiddle of the HTML part and the javascript part that is causing the problem
http://jsfiddle.net/bUVDG/
but obviously it works...
The weird thing is that the code is actually running
with no errors
But yet it doesnt do anything
What's it meant to do?
Just remove the div?
Yep
I put a console.log right before the code to make sure that part was being run
and that worked
and as I said there were no errors.... hence brain implosion...
04:37
is there anything asynchronous going on?
2
yep. The removal code in my fiddle is run in the callback from a post request
in the actual script
can i see it?
function deleteRenewOrder(orderId){
	var conf=confirm('Are you sure you want to delete this order?');
	if(conf){
		$.post("membership/delete_order.php",{orderId:orderId},function(data){
			if(data.success==1){
				//$('#order_row_'+orderId).remove();
				var row= document.getElementById('order_row_'+orderId);
				row.parentNode.removeChild(row);
			}
		},"json");
	}
}
if you put a debugger; in before the var row =..., and wait a second before continuing through, does it work?
Do you mean set a breakpoint?
04:51
debugger; does the same thing
Sets one automatically
was just making sure
oh. I didn't realize that
yeah it's handy
still nothing.
does getElementById actually find an element?
but thanks for making debugger known to me... breakpoints are really annoying to do manually
yep it does
04:56
and if you use jQuery?
shit.....
I just realized how stupid I am...
this probably should have been obvious
No, there was another element with that id
i think...
Ha! Of course
I hate easy problems... they're always the worst...
04:59
Occam's Razor
Always check for the HTML problem first. I still re-learn that one occasionally.
Yea, the page has tabs to open different tables.... so I guess it was a bit of an "out of sight, out of mind" kind of thing too
how many stupid things did Occam had to do before making such a realization?
Well at least it's programming and not politics.
WHAT?!? There's a war going on?!?!
I was thinking office politics. Not so much bullets.
But there's been a war somewhere for all of human-recorded history I believe. I mean.. if you want to be depressed about something.
05:07
yea, but recorded history is a very small portion of human history, if you want be optimistic about something.
There was still war before that
There was war before there was a word for war
It's more fun to point out that we were illiterate for that long though.
well... that kind of depends on how you define war
It is in our nature. Hopefully we outgrow it soon
can you really have a war without a government?
05:08
Especially when a lot of it boils down to "my imaginary friend is better than/said something different to your imaginary friend"
Hatfields and McCoys had a war. Not really a gov involved.
There was government before there was a word for government too
Two things humans like: self-organising structures, and killing one another
I now have a party Jawa in SWTOR. It was all worth it.
say what?
A little jawa with balloons that shoots pyrotechnics out of its butt and flies around my my MMO character's head. If that's not progress, I don't know what is.
05:14
Ah technology, look how far we've come
I guess world peace is inevitable
It would be if everybody could afford the Cartel Coins to buy one.
yea... but then you would be working for the cartel... counterproductive...
in case you're wondering, I have no clue what you're talking about... haha
Oh hey, thumbs up on re-factoring being satisfying. I thought I was the only one.
Star Wars game. Just stupid stuff.
huh? what re-factoring was satisfying me?
05:17
Nah, Phenometc... starred quote on the right.
Ok my brain cant handle anymore SOchat... Thanks for talking me through the process of discovering my own stupidity @phenomnomnominal
Phenometc, I like it
Client-side development is all about throwing your stuff at the wall and seeing what breaks. That is why it is glorious.
I'll be honest, I try to keep the actual DOM stuff to a minimum... I'm much more interested in using JavaScript to do real stuff
That's why it's all getting so exciting for me at the moment
But yeah there is nothing better than deleting lines of code that are now useless
And getting something to the point where it is just completely clean. That is code utopia for me
Non-DOM JS is similar I imagine. It's the flexibility/power to really make a mess that forces one to embrace the breakage as a part of the process.
05:24
It's pretty hard to make too much of a mess really. JavaScript as a language really isn't as broken as everyone makes it out to be. Especially with modern browsers.
But flexibility, hell yeah
I just love that there's pretty much nothing anymore that you can think of, that can't be done in the browser
There's very little wrong with it (well okay parseInt overload just sucks ass but..). It just doesn't try to protect the users from themselves.
If i could add one thing, it would be operator overloading
I was actually thinking exactly that walking back form lunch today.
Getters/setters are basically limited operator overloads. Why don't we get that for all operators?
My honours project was a distributed javascript ray-tracer. You can only write things likes Vector.Add(a, Vector.Multiply(b, c,)) so many times before you want overloading
Which leads to clearly mental questions like this:
0
Q: Javascript Functions using unicode operator signs as names?

phenomnomnominalI was looking at this: Valid Characters for JavaScript Variable Names And I had a thought, and I can't decide if it is a good idea or not... Say you have some object, for example a Vector (x, y, z): Vector = (function() { function Vector(x, y, z) { this.x = x != null ? x : 0; this.y ...

["<whatever>"] It's the stuff other than whatever that takes all the convenience out of it.
Object/method/object-return chaining might be the way to simplify the ray-tracing thing.
 
2 hours later…
07:32
Hello
Hi @Chets
Hey i have three radio buttons in my popup...i need to set first one is default selected using java script
Why does it need to be javascript?
You can do <input type='radio' checked='true'/>?
if i select the another radio button & then close the popup..after i reopen the same then it will not work
It work fine when first time..but fails when i select some other radio button..closes the popup...and reopen popup...it will shows me the previous selected not the default one
@phenomnomnominal
Are you using jquery?
07:41
for what?
In your website, are you using jquery for anything?
yes
If so, you could add a class 'default_checked' to the right radio button. And whenever the pop up is opened, do $('default_checked').attr({checked: true});
I think a simple auto complete=off should be enough
According to developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion, autcompletion=off affects "Session history caching", at least in Gecko. I will test if it works for what I need. — queen3 Apr 23 '10 at 17:24
If that doesn't work for you, use JS
@phenomnom Missed a . in the selector
you're right, my bad
$('.default_checked').attr({checked: true});
07:48
oh hi
@phenomnomnominal gratz for your FYP grade
@Raynos o hai
O HAI
Building webrtc libraries o/
lol :D
@Raynos hey cool :)
@Raynos I wanna build something like this in a non buggy way jsbin.com/egawex/1/edit
basically this in js instead of flash

« first day (762 days earlier)      last day (4411 days later) »