« first day (810 days earlier)      last day (4121 days later) » 

7:00 PM
aw, fine
 
Input tags are <- not in HTML5
 
I think I start liking JS more every day
 
@ThiefMaster When discussing standards I feel it's only prudent to inform people of the newest standard. If legacy code is needed they can specify that in the requirements :P
 
content.replace(/\!t/,datetime).replace(/!c/,"reset");
vs
content.replace(/\!t/,datetime);
content.replace(/\!c/,"reset");
 
and iirc they are?
 
7:04 PM
@Event_Horizon The two aren't the same.
 
<!doctype html>
<title>meow</title>
<input>
valid html5.
 
@Zirak why wouldn't they be?
 
which makes perfect sense - with all the ajaxy stuff the <form> is often not used anyway
 
In the first, you're replacing !c with "reset", in the second you're replacing it with datetime
 
woops my bad
 
7:05 PM
@Event_Horizon Welcome to awesome
 
Now they're the same.
 
@Zirak fixed
 
@ThiefMaster form tags should still be used.
progressive enhancements :P
advocate this always!
anyways. I remember reading it wasn't. checking the spec you are right they can be outside.
semantically I don't think they make sense outside a form
 
Yeah, depends on the use of course. But a javascript-based search field in a static html page (sphinx-generated docs for example) wouldn't necessarily need one
 
@Zirak whats funny is the second one only replaced !c for me, wouldn't do both
 
7:06 PM
or a better example: inline editing
even though you probably end up creating those elements via DOM methods and thus never validate them
 
@ThiefMaster eh, I would still use them
 
@Event_Horizon oh durr, because replace isn't destructive. It returns a new string (with the changes applied).
 
ah, good to know
 
@ThiefMaster I agree. Here it's IN THE BOX
Inside the router. Default ISP. Incredible.
 
Free wants to kill the web or something?
 
7:14 PM
Some French tech Media are already talking about democratic problems
 
m59
Hello, pros.
 
It's not their kind usually...
 
I dunno @FlorianMargaine
That's weird.
Heum... They already have problems with Youtube and the fact they bride the debit
 
m59
Has anyone ever put a bounty on a stackoverflow question?
 
7:15 PM
Yeah...
how will I earn tons of money with the ads on my blog now?
 
m59
Who wants $10 lol.
 
hrmm... well that almost worked out
 
are you bribing us into putting a bounty?
 
m59
lol. I need a question answered and I'm desperate.
 
This Almost greyscales the page
 
7:16 PM
@m59 link.
 
don't understand the correlation between hsl and rgb enough to make this work right now
 
@rlemon Hum?
Why? it's only a simple calcul
 
m59
@dievardump mind if I talk something out real quick (should be simple)?
 
@m59 link your question, or ask it here. Don't ask if you can ask.
 
m59
I didn't mean to ask to ask. I was just verifying that you gave a crap lol.
So..
 
7:18 PM
This is why next bootstrap will just put css transitions out on next version
 
Sam
Maybe he is not asking if he can ask. He was just asking to ask to ask.
 
ASK YOUR QUESTION!
 
@m59 It's two months I did not really interact with this channel. GIVE ME SOMETHING
 
@rlemon did you mean gray*scale* or gray*page* because the full page is gray for me
 
m59
I've read a lot about programming efficiently and now I've got this plan of how I should write my software, but no one seems to know how to accomplish it. It makes sense to me that I should write my program with a basic function (maybe object?) that can do a few things.
 
7:20 PM
@Event_Horizon almost works.
I claim nothing
 
ah alright
lmao
 
m59
Then another function (probably object) should be able to take that stuff, maybe make some changes, add to it and bam, I have a more complex program
and then a 3rd thing can take that functionality and add to it, maybe change some stuff and so on
 
so you're looking for OOP
 
m59
lol.
 
POOP actually
 
m59
7:21 PM
seems like it
yet nothing ever works.
 
Procedural Object Oriented Programming
 
m59
1
Q: With javascript, how can an object derive from another object, while base objects can be called independently?

m59For example: object1 = function() { console.log('action1'); } object2 = function() { console.log('action2'); } object1(); //should log "action1" object2(); //I need this to log "action1" and "action2" I also need object2 to be able to override object1's methods, so the above is nowhere c...

never heard of it
 
!!/google Procedural Object Oriented Programming
 
hehe... js is kinda fun in the sense that it allows for multiple programming patterns
 
m59
7:22 PM
^ am I getting trolled?
<-- too noobish to know the difference lol.
 
m59
None of this refers to POOP which REALLY sounds trolly lol
lmao
 
Hahahaha
 
m59
I hope I'm not a help vampire. I read and tried about 40 articles of stuff and am getting nowhere quick.
It's not my lack of progress that is killing me on the inside, it's that this seems like the most obvious and easy way to accomplish what I'm doing, but it seems unheard of.
 
I'll try to have a look later tonight @m59
 
m59
7:28 PM
@SimonSarris suhweeeet
I'll try to not rip my hair/scalp off between now and then lol
 
Sam
Btw, @m59 maybe this will (not) be useful phpied.com/3-ways-to-define-a-javascript-class
 
@rlemon I know you've been playing a lot of Civ lately, so tell me what I should be getting store.steampowered.com/sale/…
@SimonSarris You may be better at helping me decide ^
 
m59
@Sam I think I understand the article, but I don't know how it could change my current issue.
I'm a programming rube.
 
Civ 5 + Gods and Kings expansion
the rest of the expansions are fun (my bro has them and says they are worth it) but for getting a taste for the game Gods and Kings is all you need
Kingboom4.... am I to understand there were three previous Kingbooms before you?
Seems unlikely...
 
Civ 5 and Gods and Kings, then?
 
7:35 PM
^ yup
 
GOTY edition or not?
 
All 4 Cradle of Civilization Map Packs (Mediterranean, Asia, Americas, Mesopotamia)
Civilization Pack: Babylon (Nebuchadnezzar II)
Double Civilization and Scenario Pack: Spain and Inca
Civilization and Scenario Pack: Polynesia
Civilization and Scenario Pack: Denmark - The Vikings
Explorer’s Map Pack
Official Digital Soundtrack (Soundtrack not available on the Mac)
for $5 you can just buy the 'upgrade'
 
That'll be only there for today
 
so do the math. will it be cheaper to get civ 5, gods and kings, and then the $5 content? or get the package then buy gods and kings on it's own
 
It's $29.99 usually
 
7:37 PM
minimal you only need civ 5 and gods and kings
it's all I have.
 
Cool, thanks
 
^ recommended buy as well.
fun little semi-casual game
 
what is it (work blocked)
 
Awesomenauts
 
it seems fun
I enjoyed Scribblenauts myself this Christlemas
 
7:40 PM
I don't think they're similar
 
no, but still fun
 
awesomenauts is like a 2d dota
but reminds me of games that were like these from the SNES days
so I instantly was hooked
Been buying a lot of cheap games too lately. Hunting games used to be so fun.... now they're just all shitty (even the ones I used to like)
Steam purchasing is addictive..... so many games.... so much discount!
 
@AmaanCheval game of the year addition
and korea
and gods and kings
 
Hahaha, so everything? :p
 
those 3 = everything
 
7:44 PM
ofc simon says everything
 
I think
 
here is a humm dinger...
 
Yeah, I think I'll go with what the lemon suggested. If it's worth the upgrade, I can buy it later.
 
why does hi-def card + monitor make text so painful to read?
is there a one touch option (app) I can install on windows to dumb down the display?
text is "too crisp"
1 message moved to recycle bin
 
Y U MOVE MY PUDDING?
 
7:47 PM
2
Q: Need a good code editor for JS - Recommendations?

user1721135Im looking for a code editor to use for primarily JS, Jquery but also for HTML,CSS and some php. JS is the most important though. So far im using notepad, and was told i could do better, but not sure if i should go use eclipse right away, and trying notepad++ didnt really impress me. Features i...

 
@Feeds ...
 
@m59
 
m59
@dievardump what's hood?
 
You're kind of looking for the inheritance equivalent
It's not a good practice in JavaScript before ES6. But there is implementations
John Resig's one is well known. I do not really like it and did mine, wich is a mix between this one and MooTools one
 
m59
7:53 PM
I've read that so many time...I'll give it another shot.
times**
 
ugh, please don't muddy js with classical inheritance.
 
@Zirak That's what they are doing with the class keyword
 
Adding more reasons to my "why I oppose Harmony" bag
 
m59
....but then is there a better way? I'm so lost guys/
I kinda wish I had never imagined there was a better way. I used to be able to write plugins all day long. Then I started caring about efficiency :(
 
Well, if object 2 always depend of an object one, and object 3 always depend of an object 2 yes.
 
m59
7:57 PM
by depend, you mean that object 1 must exist?
 
!!/ tell m59 google object oriented dependancy
 
No that you must do things with an object one for that
But... what you described on your post is for me inheritance
So...
Hum not really
You just need to callback
I said bullshit.
I would not make 3 objects thought.
Wait... 2 minutes
 
m59
k
 
8:04 PM
!!/ learn IHateLanaDelRey "I Fucking Hate Lana Del Rey"
 
@phenomnomnominal Command ihatelanadelrey learned
 
m59
@Zirak I think I can wrap my head around this one...
 
!!/ tell everyone ihatelanadelrey
 
@everyone I Fucking Hate Lana Del Rey
 
@m59 It's the simplest, nicest model. It doesn't have any magic, no weird properties, only the pure manipulation of objects, which is a great part of js.
@SOChatBot Wonder who starred that
 
m59
8:06 PM
@Zirak I'm digging it so far. Let me mess with it a few minutes so I can screw it all up lol.
 
@Zirak You still effing crazy
 
I just had a fun convo with a citi chat rep :-)
 
Shipping Costs $6.95 <- America to New Zealand? I call shenanigans.
Shipping Costs: $34.95. That's more like it
 
m59
@Zirak and @phenomnomnominal, to you both, I must say
HOLY CRAP YESSSSSSSSSSSSSSSSSSSSSSSSSSS
 
8:16 PM
What did I do?
 
m59
You just made this your theme song, that's what. youtube.com/watch?v=Cq-NShfefks
Your help the other day and Zirak's just now solved something that has been literally driving me crazy for months.
 
Glad I could help
 
m59
for (method in display) {
display[method]();
}
@Zirak does that make sense for the end?
 
you need to check that it's a function*
 
Well, assuming method was declared beforehand, and that there's no outside intervention to mess up the for..in, and that every property on display is a function...then yeah
 
8:21 PM
posted on January 03, 2013 by Victor Rodriguez

From the pampas to the stars IRIS 9000 Voice Control Module for iPhone & Siri from ThinkGeek Neil Armstrong’s family reveal origins of 'one small step' line

 
for (var method in display) {
  if (Object.hasOwnProperty.call(display, method)) {
    if (typeof display[method] === "function") {
       display[method]();
    }
  }
}
 
m59
yep thanks!!!
I'm kinda freaking out. This is awesome.
Want sum munny?!
 
that's what she said.
 
m59
LOL great one
How do you format code like that? I hit ctrl+k and it tabs over but doesnt show up differently.
 
just ctrl+k
 
m59
8:23 PM
code
Well whaaaaat
that never works
 
!!/ tell m59 format
 
@m59 Format your code - hit Ctrl+K before sending and see the faq
 
0
Q: external js file calling external json file gets 404 not found response

VoidKingThis is my very first question here on Pro Webmasters, so I greatly apologize if this is a question better suited for StackOverflow, but I decided to ask it here, because it's meant for use in a website. I have never called a json file before, and thought this code looked right, but i just can't...

 
!!/info
 
m59
I did that exact thing above and it didnt work.
 
8:24 PM
@Event_Horizon I awoke on Wed, 02 Jan 2013 18:57:53 GMT (that's about 1 day ago), got invoked 103 times, learned 14 commands, but forgotten 1 commands, teleported 6 goats
 
ctrl+k works for me
 
Not enough goat teleporting.
 
m59
hey...I tried googling Object.hasOwnProperty.call and can't figure that one out.
 
!!/choose "Leave job early" "Play flash games" "Work on code"
 
@Event_Horizon Play flash games
 
8:25 PM
Good choice @SOChatBot
 
!!> Object.hasOwnProperty
 
@phenomnomnominal "function hasOwnProperty() { [native code] }"
 
!!/learn fa "Can't get more forever alone than talking to a chatbot"
 
@Event_Horizon Command fa learned
 
!!/tell Event_Horizon fa
 
8:26 PM
@Event_Horizon Can't get more forever alone than talking to a chatbot
 
Is a function that belongs to the prototype of the Object class, and checks if an object has a given property
by using .call() we can assign what the value of this is when the function is called
so Object.hasOwnProperty.call(display, method) is functionally the same as display.hasOwnProperty(method).
 
should be Object.prototype.hasOwnProperty.call
 
m59
I'll have to ponder that a bit.
also
@Zirak I might have hit a wall again.
 
Stop being blind
 
m59
@Zirak lol
 
8:30 PM
@Esailija, is there any reason in particular that that's better?
 
Kid: Mommy, pass me those cookies please!
Mom: Get them yourself
Kid: But I have no hands!
Mom: No hands, no cookies!
 
!!/ google :
 
@phenomnomnominal The Google contains no such knowledge
 
m59
8:31 PM
 
Hahaha, what the hell, Zirak?
 
@phenomnomnominal it working vs not working at least
 
@m59 ...?
 
m59
8:31 PM
@Zirak I'm looking for action 1, 2, 3, 4, but getting 1,2,4,3. This would break function 4 in my program.
 
@Esailija, why doesn't it work?
 
@m59 oh, definitely don't rely on for..in going in some order.
Just call them in the order you wish.
 
@phenomnomnominal nvm
 
m59
@Zirak this is exactly the problem I had when using prototypes. I could build the blueprints, but "for" screwed it up.
 
Also, method in your for..in is an implied global, and the indentation is a bit screwy when you re-define action3, and action4 isn't really a function, it's supposed to be undefined
Actually, nvm on that last one
It just doesn't make that much sense
hah
 
m59
8:34 PM
@Zirak lol. I missed a }
 
extend.action2 = function () {
    console.log('actionNOTHING PLAYA!! Action2 got ownt!');
}; //I MATTER
extend.action4 = function () {
	console.log('action4');
};
But really, don't rely on for..in going in any specific order.
 
m59
@Zirak right, because now it is 4,1,2,3
So, how can I dynamically call them based on what's there?
 
One (horrible?) way would be to prepopulate an array with the function names in the right order
 
Yeah, that ^
 
So I've got a lot of forms on my site. I'm doing pretty much the same thing with all of them (Sending form data through AJAX). Is there any particular structure I should use to prevent a directory full of near-identical .js files?
 
8:39 PM
@SomeKittens refactor.
 
Can you be a little more specific? Right now, my only answer is "extract & generalize".
 
Yeah, into what?
 
m59
One js file that you can pass arguments too?
rather the function in it
 
give us some example files
 
All of my form pages have a js file that's basically:
document.addEventListener('DOMContentLoaded', function(){
  document.getElementById('form').addEventListener('submit', function(evt) {
    //AJAX some datums
    evt.preventDefault();
  });
});
Is there any particular model or structure I should use instead to save myself time/space?
 
8:41 PM
Then extract that into a general main file, and each sub-file will only contain the unique information.
 
(Space really isn't the issue, clutter is)
 
so have a file with and object with all the function(evt) { ... } and pass them into that
 
Sounds good.
Basically what I had in mind, wasn't sure if there was a better way.
 
formFunctions = { form1: function(evt) { ... }, form2: function(evt) { ... } } yah?
Fucking Visual Studio in a VM is the worst thing ever
 
m59
this array thing seems disastrous. lol
 
8:44 PM
@m59, thought it might be.
give them names that are in the order you want, extract them out of the object into an array, then use array.sort :D
 
m59
@Zirak @phenomnomnominal is this approach common? maybe there's a standard?
 
no.
I think you need to have some sort of init function.
 
m59
You mentioned that the other day, but I'm not sure what you mean.
 
That calls all the right functions on the object, and the init function of it's parent, but then it does start becoming more inheritancey again, which I think you're trying to avoid at this point?
 
m59
I'm all for inheritance. I just haven't gotten it to work.
It's like a paradox to me.
 
8:49 PM
Inheritance is ok if it's not raped into the language, but if you want some order, you need an array
 
m59
If object1 can do anything at all, it does it all when object 2 inherits from it (before object 2 even exists).
if it can't do anything (the stuff is in the prototype) then making a new object1 does nothing lol
 
for loading apis and ajax calls you will have to use callbacks
 
m59
gotta go for now. Someone posted something else on my question. I'm going to check it out, too.
 
Just something I quickly hacked together, but words.
 
m59
not ba
bad*
 
8:52 PM
Schrödinger's cat applied to web development: If I don't look at it in Internet Explorer then there's a chance it looks fine.
 
@Zirak No, no there isn't.
 
I really wonder why the hell Uint8Array etc. don't have .indexOf methods...
 
m59
@Zirak pretty much
 
Ah well, [].indexOf.call(...) works..
 
@Zirak whats no-www.org thing for, whats the reasoning?
 
8:56 PM
!!> Uint16Array instanceof Array
 
@phenomnomnominal "ReferenceError: Uint16Array is not defined"
 
m59
ok really gotta go for now
thanks so much
 
Silly @SOChatBot
 
@Event_Horizon ...?
@phenomnomnominal I'll add them in. What other kinds are there?
 
Uint32Array, Uint8Array, Uint8ClampedArray
Int16Array, Int32Array, Int8Array
 
8:58 PM
@Zirak I mean whats better about removing www from before domain.com etc
 
!!> ArrayBuffer
 
@phenomnomnominal "ReferenceError: ArrayBuffer is not defined"
 
!!> Blob
 
`"ReferenceError: Blod is not defined"`
:6993635 `"ReferenceError: Blob is not defined"`
 
Float32Array, Float64Array
 
8:59 PM
@Event_Horizon See the bottom
 

« first day (810 days earlier)      last day (4121 days later) »