« first day (1418 days earlier)      last day (3528 days later) » 

11:01 AM
@AdamBarak There's no shame in being wrong about something once.
 
@Sippy You're right, but look what I was wrong about, a simple type setting I should have remembered.
 
There's a shame in being wrong about the same thing twice though
 
Wait, today I was wrong twice
 
@AdamBarak QUOTE YOUR DAMN ATTRIBUTES
 
@SecondRikudo Damnit you're right xD
 
11:04 AM
Lol
I noticed that but I figured it was done on purpose
 
It's three times now
 
I am but a simple noob.
 
@Sippy I actually put quotes on the "button" but forgot about that other one
I'm getting little sleep and too much coffie
 
@AdamBarak: What IDE are you using?
 
Sublime Text 3
It's wonderful, I used to use Gedit because it resembled Window's Notepad++ back when I was still on Windows
 
11:06 AM
Nevermind, I just noticed Visual Studio doesn't complain about unquoted attributes, either
 
Unquoted attributes are valid
But bad.
 
@Cerbrus Sublime Text sometimes complains about unquoted attributes and other times doesn't
But the bad thing really is that I spent 2 days debugging code server side as it was submitting the wrong form when the issue was that I forgot the </form> ending tag
 
Yay, consistency
 
Wish there was a warning or something noticeable telling me a tag was missing
 
@SecondRikudo not so when they get complicated like ones in onclick attribs etc... ofc we shouldn't use onclick attrs any more but...
 
11:09 AM
You see a lot of questions on SO that turn out to be missing tags for example
 
@AwalGarg Are you sure?
 
@SecondRikudo 100%
 
<a href=# onclick=function(){alert('evil');}>Valid</a>
 
@SecondRikudo how is that complicated?
 
@AwalGarg: Then you're 200% wrong
 
11:10 AM
Methinks needs to build a plugin someday or another
 
@Cerbrus then you are 400% wrong!
 
@AwalGarg It's spaces which break unquoted attributes.
 
> when they get complicated like ones in onclick attribs etc...
 
@SecondRikudo absolutely!
 
It doesn't even have to be complicated.
 
11:11 AM
He just showed you something "complicated" like a onclick
 
<a class=one two>Whoops</a>
 
Silence silence, the judge is coming here! :D
 
!!afk brb in a while
 
Yea, run xD
 
@SecondRikudo That one got me in troubles too one time
 
11:12 AM
@AdamBarak It's simple really. Always quote attributes. Always close tags explicitly.
 
while(true) { brb() }
@SecondRikudo Yes yes I should "drill" myself into doing it more often.
 
@SecondRikudo @AwalGarg unqouted attributes have more restrictions
 
@KonstantinLikhter 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.
 
Meh, restarted the machine, database works now.
Must've done something to the server process.
 
11:17 AM
w3c :P
 
@KonstantinLikhter ..?
Never use unquoted attributes. Take that as a general rule.
If your minifier is smart enough to determine which attribute it can omit the quotes to save a couple bytes, let it. But in your dev code, always have everything quoted.
 
www.freeformatter.com/html-validator.html
 
@SecondRikudo heh, I do not using them ;) it's reply to your "Unquoted attributes are valid. But bad."
@SecondRikudo I mean they may be used since HTML5 standard allows them
 
@KonstantinLikhter They're valid, as in, they're allowed. But you should never use them.
 
@SecondRikudo however in general case they lead to mistakes ;)
 
11:20 AM
Yeah just let the minifier handle the final production code.
It will save a lot of headaches.
 
I treat both my HTML and CSS as compiled code.
I never modify the code that the user sees. That's always minified and uglified
 
Heh, minified HTML
That's funny
 
How so?
 
It's really trivial to de-obfuscate that
 
the point is not obfuscating
it's reducing bandwidth usage
 
11:22 AM
The idea is not to hide something but make it load faster
 
@Cerbrus I honestly don't give a damn about whether or not you can read it
 
Is the difference really that significant?
 
I only care about saving that extra 10~20% file size to serve over the network.
 
it's like... in css, you can omit the last semicolon and it works. But never do that in dev, it hurts maintainability. CSS minifier? Go for it.
 
With my level of commenting? Yes, it is.
 
11:23 AM
@Cerbrus yes
well, if you have 10 users a month, it might not matter.
 
minifiying is like removing final html tags like body, head, list markup etc.. removing quotes where not needed
 
Normally, it would save you about 10~20%, in my apps it can generally save 30~40% due to lots and lots of comments
 
Css / JS minimization, sure, I can understand
 
But HTML?
 
11:24 AM
@Cerbrus then why not html?
the html page is another resource like css/js
 
@Cerbrus Because it's nearly free, and it doesn't hurt.
 
@Cerbrus not my habbit. now wait...
 
If you want to restart a local instance of SQL Server 2008 can you just restart the service?
Or is there a more elegant way to do it?
 
Hm, fair enough. Then what about the uglification?
 
of html?
how do you uglify html?
without breaking css/js?
 
11:25 AM
Excactly.
 
hmmm it could be a nice minifier: a general one replacing all the classes/id with something smaller, could save some characters
 
Or am I misunderstanding:
 
@Cerbrus Class names like widget-button_active are reduced to a
 
@BenjaminGruenbaum What ?
 
@Cerbrus minifying html is just removing spaces and the likes
 
11:26 AM
5 mins ago, by Second Rikudo
I never modify the code that the user sees. That's always minified and uglified
 
Yes, also what said Florian
 
That
 
@dystroy not sure what that video is about
 
@SecondRikudo really? You break your css/js when doing that...
 
Of course you can (and should) minify HTML
 
11:26 AM
@FlorianMargaine Not if the same minifier does those too :P
 
It removes excess spaces and comments for example.
 
@BenjaminGruenbaum @dystroy The video is about attempting to send a message in Miaou and failing.
 
I don't know of a minifier who can do that
 
@FlorianMargaine He might edit the css/js code accordingly
 
I feel so safe in this room xD
 
11:27 AM
@FlorianMargaine That could be one hell of a project
 
yeah... and impossible
 
How so?
 
the js is usually shared between pages; you can't guess what goes what
same for css
 
@Cerbrus @SecondRikudo I meant this
 
@FlorianMargaine You don't have to
 
11:27 AM
some js might be included in a page, other not
etc etc
 
Assuming you can parse CSS and JS for a second
 
yes.. ?
 
@SecondRikudo oh yes, Royi gave me the link to that video, I'll look at it as soon as I can boot my computer with a flash player
 
You go through all of your CSS files, and map all classnames/ids to new, minified names
You do the same with JavaScript
 
FlorianMargaine It doesn't take much to heuristically determine where those js functions are executed, look where they're used and change Javascript, CSS and HTML code. Maybe it would run the app in the process before determining that
 
11:29 AM
@AwalGarg: straw man. Why would you declare a var in a onClick attribute?
 
After that, you go over the HTML source, and replace according to the mapping from before
 
@Cerbrus that was what I meant by "complicated".
 
Oh, and I made it work
Sure, anyone can write senseless code to break something, @AwalGarg.
 
@Cerbrus you changed the way...
 
11:30 AM
Assuming all JavaScript would already be minified, the syntax for getElementById, getElementsByClassName, querySelector and querySelectorAll should be quite predictable
 
If all objects inhert from Object.prototype then can you access a method of a object by just doing this ?

Object.prototype.SomeObjectsMethod
 
Yea, because declaring a var in a inline onclick is simply stupid.
 
(Even without it, if you can parse JS freely)
 
@Cerbrus declaring an inline onclick itself is simply stupid, actually.
 
@FlorianMargaine what do you think? Doable?
 
11:32 AM
@CustomizedName why don't you try it? Hit F12 and then Esc. You will get a console... REPL type of console for JS.
 
@AwalGarg: then why did you even mention inline onclicks in the first place?
 
@Cerbrus ain't sure... maybe cus @SecondRikudo generalized the validity of unquoted attributes in HTML.
 
@AwalGarg Unquoted attributes are perfectly valid.
That doesn't mean that they'll work correctly.
 
That's how you switch subject in 12 seconds.
 
But they are indeed valid.
<a class=one two>This is valid!</a>
It's an A with a class of one and a second attribute two with no value.
It's valid, it just doesn't do what you expect.
 
11:35 AM
@AwalGarg: You're just trying to invalidate unquoted attributes based on one single (stupid) use case
That just doesn't fly with me xD
 
@Cerbrus I am...
 
@Cerbrus To prove an hypothesis wrong, all it takes is a single case against it.
 
<div class=%test$></div>
 
Just because unquoted attributes don't work in all use cases, doesn't mean they're invalid all the time.
 
Maybe that's the only case where unquoted attributes should be used
not sure though
 
11:37 AM
Since we are now not confined to the list of things likely to happen, we can also say that unquoted attributes can make a book which can tell you how to be a millionaire in 1 day!
WAT ON EARTH?
 
... wat
 
You're looking at this wrong
 
I am no more looking at this.
 
www.startofhappiness.com/how-to-become-a-millionaire-by-investing-5-a-day/
 
@SecondRikudo: "You" being Awal or me?
 
11:39 AM
Me?
My use case was about a validator. I think, though I'm not sure, that a validator would trip on a value surrounded by quotes
I can't find the reference now
 
@AdamBarak you give my 2 minutes BACK RIGHT NOW!!!
 
@SecondRikudo this'd work in a dream environment. In real world, classes and the likes are in templates all over the place, and CSS/js addition is dependent on business logic
 
@AwalGarg huh?
 
Anyone aware of that ECMA Script 6 going to have classes....
 
@AdamBarak you linked to that worthless article for which I spent 2 minutes of my life... now give them back to me.
 
11:42 AM
If your app is structured in a messy way, sure. But I never found problems minifying like that. And I had big projects.
 
@CustomizedName yes, everyone, but it doesn't look like a big change
 
We know es6 have classes since like 2 years
 
"classes"
 
And I'm afraid I'll see more and more js looking like java
 
11:43 AM
@Cerbrus @AwalGarg my hypothesis is that in HTML5, all unquoted attributes are valid.
 
@AwalGarg ta
 
@AwalGarg hahaha you actually read that xD
 
@dystroy hmm, gonna read about it
 
Valid does not mean "Works as you expect it to"
 
@AdamBarak no I looked at it for 2 minutes.. maybe less.
 
11:44 AM
There are ways to become rich, not like they say in that article though
 
It means that an HTML validator won't choke on it.
Your example with the onclick might be invalid, because there are characters there which aren't valid as attribute names.
 
@AdamBarak Why ? I found it to be a good presentation. Any problem in it ?
 
@SecondRikudo yes, valid means it is not invalid.
@dystroy he is talking about something else.
 
if I have a parent directive A & and a child directive B, with directive A having a isolated scope , how can you broadcast events to the child directive? Putting scope: true doesn't seem to do anything
 
!!afk
 
11:47 AM
 
@dystroy First, you won't get rich with $5 a day. That makes for $35 a week, $150 a month and $1800 a year. Even he says that After just 30 years, you’ll have $206,792. Seriously, 30 years? I'd already get retired anyway. That alone won't make you rich. What will make you rich is saving money and starting your own startup, build support with that money and go on from there, maybe even starting another startup
 
@KendallFrey O_o
 
@AdamBarak I have no idea what you're talking about
 
4 mins ago, by dystroy
@AdamBarak Why ? I found it to be a good presentation. Any problem in it ?
10 mins ago, by Adam Barak
www.startofhappiness.com/how-to-become-a-millionaire-by-investing-5-a-day/
 
I thought you were commenting on the previous message...
7 mins ago, by Awal Garg
@CustomizedName https://speakerdeck.com/rauschma/ecmascript-6-whats-next-for-javascript-august-2‌​014
 
11:50 AM
I thought the two were linked...
lol
 
Personally I become a millionaire by spending a few days coding a freeware, I wouldn't dare investing 5-a-day (what does that even mean "5-a-day" ?)
 
@dystroy Sure, that gets you community support for a latter business investment.
Well, he meant cutting on coffie and some other "superfluous" things..
 
Who gives a fuck about being a millionaire when you're 60
Seems a bit late to me.
 
@Sippy Yes, that's what I'm saying
 
Aye.
 
11:53 AM
I'd rather be a millionaire at 60 than never.
 
Only thing I can see it useful for is when I have kids and want them to take it when I die and hopefully do something good.
 
When I'm 60 I doubt it will matter, to myself or perhaps also in general.
 
So you don't care about a nice car? Not having to worry about vacation expenses?
 
At 60? c'mon..
xD
 
Sure, money doesn't equal happiness, but it helps a lot.
 
11:56 AM
I care about that now.
When I'm 60 what left do I have to care about?
 
Your kids and grandkids?
:P
 
Oh ye of little imagination
 
> Money isn't the secret to happiness, but all I ask is a chance to prove it.
 
Meh. I will give my kids their start, send them to college/uni whatever
 
Well there's one thing that old people like to do. Travel. You may have a point there
 
11:57 AM
After that, they make their own way.
That's what I did.
 
Yeah, that's also a way to do that
 
Travel / vacations, same thing
My point being: "Who gives a fuck about being a millionaire when you're 60" is such an ignorant thing to say
 
In your opinion.
 
There is so much you can do with that kind of money
"Even" at that age
Heck, donate it to charity, feel good about yourself
 
Donate. Donate directly in the country you want to donate to, so you're sure it really ends up to that people. Travel/Vacation+Charity
 
11:59 AM
Charity doesn't make me feel good.
 

« first day (1418 days earlier)      last day (3528 days later) »