« first day (968 days earlier)      last day (4202 days later) » 

user1596138
00:07
I see you guys had to deal with web2students...
user1596138
He/she thinks they are in a position to teach others for some reason when they don't even know the most basic things themselves.
lemonmeme.com/demos/blob alright. didn't have time to 'clean it up' like I had wanted to. but here is a new song! :P
@rlemon How bout you fix the god awful audio lag homie
not my fault homie
doesn't lag for me
can't debug something I don't get
might be dsp.js ? idk
i'll not use it when I clean shit up
Be a man
00:12
yeah it is probably the fft
@phenomnomnominal lag for you?
nah it's good now?
Did you change anything?
Might be this sick ass work computer I got when google started to sponsor me
nope
At the end of tomorrow I'll have 1 more get up then off for 7 woooooooooooooooooo get to go play in my new tooyyyy
I CANT FUCKING WAIT
00:14
@rlemon, you should use web workers
we will have to discuss how I can improve this tomorrow - or later tonight.
I want to make it so much more than it is
this is just a start :P
@Jhawinsss I think it's out of an attempt to help, then again people who don't know are fine. The problem is with people who don't know that they don't know, those are risky
user1596138
@BenjaminGruenbaum Exactly.
user1596138
@Gacnt Very nice. I was cruising around in a 2013 Can Am Maverick the other day!
user1596138
00:19
1000cc V-Twin!!!
@Gacnt Where do you live?
@Jhawinsss I was looking at those, but I like the compactness of this Rzr
@copy Alberta Canada, why?
Too far
Nevermind
Were you gonna come, as the people in the ghetto say, 'Jack me?'
00:23
Boom
^ Just like that
@copy Now I'm curious -.-
^ That reminded me of McDonalds
@BenjaminGruenbaum lol what did
@Gacnt I want to drive with your maschine
haha
00:25
Awesome song (I love dire straits, and Mark Knopfler, but it's about McDonalds if you listen carefully)
I need to get the roof they make for it, the tires are actually massive irl, and it flicks mud up and over if you're going slow
3 messages moved to Trash can
God this songs been stuck in my head allll fking day
The bass player just jerks it the whole time
jamie burnett 1 week ago
This has been flagged as spam hide • Not Spam
The original by Muse was so much better than this crap
Most boring bass ever.
The guitar player keeps that riff going like a boss, the piano player has a solo, and that drummer is doing a good job not fucking up that repition, the bass players like, jerk jerk jerk BUNG jerk jerk jerk
@Esailija Do you know a way to find out if an object is currently represented by a hidden class or a hash table?
run code with --trace_normalization
00:33
unrecognized flag --trace-normalization ... probably because of Chrome
@copy That's an interesting question.
I think it's a relatively new flag... I am running v8 from 2 days ago
@copy How would you feel about remaking this game
and you need to build the debug version
00:35
I REMEMBER THAT GAME
NOSTALGIA OVERWHELMING
That game was THE game when I was growing up
@copy it then works like this
norm.js:

function Cat( age, name ) {
    this.age = name;
    this.name = name;
}

var a = new Cat(13, "missy");
delete a.age;
$ d8 --trace_normalization norm.js
Object properties have been normalized:
26719761: [JSObject]
 - map = 1D20F859 [FAST_HOLEY_ELEMENTS]
 - prototype = 26719739
 {
 #name: 1491A191 <String[5]: missy>
 #age: 1491A191 <String[5]: missy>
 }
@Esailija The cat is lost in negative space.
@Gacnt I have things to do, but it looks interesting
@copy Did you ever play the original of that game?
00:38
Nope
You have not lived...
@BenjaminGruenbaum Ask SO if you find it interesting
@copy You find it interesting, you ask.
It's your question first.
You collect the keys, to open doors, and use the different shoes (which you get to with keys) to cross different terrain, and the green wavy lines force you in a direction so you gotta choose your path wisely
00:40
-
@phenomnomnominal Alice in Chains?
Having more than one representation of my class in Chromium's heap snapshot might be a bad sign
what are you doing to cause that?
I don't know. No delete for sure
can you show the constructor function
00:44
Fixed
My bad, forgot to set one property in the constructor
There are still two representations, but one of them is empty
would probably be easier to track this if you used prototypal
but I am not seeing anything form just doing new LifeCanvasDrawer
Different file
ok I found it
drawer.border_width = parseFloat($("border_width").value);
if (isNaN(drawer.border_width) || drawer.border_width < 0 || drawer.border_width > .5) {
    drawer.border_width = .2;
}
00:52
Yeah
you are initializing it with an integer
but now you change it to float
Oh
I wonder if 0.0 is enough to signal a float
That sounds like a micro optimization to me though
this is not enough to make it a hash map though
but integer and float are different types
so it's like saying first a.value = true and then suddenly saying a.value = "string"
I.E. changing types
00:57
The heap snapshot says number
Size 12
boxed double
Is that bad?
well if you need it to be double there is no other way
Oh, right
@phenomnomnominal you there?
No?
@phenomnomnominal ?
Well, could anyone else help me then?
I mean with JS Validation to check if email exists.
01:46
Who wants to pick a subtle pattern for me?
me me me
So damn nice
@Esailija Can I call you? :)
damn
trying to figure something out. Do you guys know how to add different delay timing of a certain css3 keyframe animation for different divs?
trying to find a way via js.
@phenomnomnominal I have the JSFiddle
01:53
@DemCodeLines that's great news!
Show us!
Its functional, but there are still somethings messed up
@phenom sometimes your over exaggeration of excitement makes me giggle
@BadgerGirl ? :P
Fee-Fee for short now kaaaay?!
Sometimes the size of your penis makes me giggle, because it's so small.
02:02
@Esailija Is that a yes?
I'm glad you had to clarify the joke hahahaha
call me what?
@phenomnomnominal so...?
@phenom I thought you were gonna say it makes you giggle when it pokes you in the sides
@DemCodeLines, give me a second.
02:04
ok just wrote this script to randomize css animations: window.onload = function() {
    var delay, divs = document.querySelectorAll('div');
    for (var i = 0, l = divs.length; i < l; i++) {
        // set delay up to 1 second:
        delay  = Math.round(Math.random() * 10000) + 'ms';
        divs[i].style.animationDelay = delay;
        divs[i].style.WebkitAnimationDelay = delay;
    }
}
@Gacnt, slut, I'm busy.
@copy if you need to store huge amount of doubles though you should use Float64Array where they don't have to be boxed
call your phone number.
Hahahaha
@phenomnomnominal Ok, by the way, this is the updated one:
02:04
I'm not I'm sitting behind a family of 43 in the subway drive through
Okay well a few things first
Have you even read the docs for validate?
@Esailija Okay, right
As I said earlier, somethings are weirdly messed up. Its working on the site but not here.
@DemCodeLines, because validate does not take an expression as an option.
Like the submit button shouldn't work until the validation conditions in the jquery thing is met.
except it does, as weird as it is
02:06
!!youtube Black Swan - Thom Yorke
!!/hello
@DemCodeLines That didn't make much sense. Maybe you meant: help, tell
!!youtube Ladytron - Ghost
!!/help
@DemCodeLines you need to read the documentation. validation.bassistance.de/documentation
Because honestly, the code you have doesn't look anything like anything that will work with it
lol
$("#commentForm").validate(); not sure what to make of it.
@Dem put the required attribute and use the html5 validate method
Imp
@Gacnt by "html5 validate method," are you referring to the .validate(); thing?
02:11
Yes
jQuery != html5.
NO
YYYEEEEAAASSSS
the html5 validation stuff is <input type='blahblah' required>
When I'm home in 5 ill rip you up with some code
@DemCodeLines, please, read the documentation, it is very clear
02:13
@phenomnomnominal jQuery.validator.addMethod( name, method [, message ] ) ?
yes
It's saying you can create your own functions by calling jQuery.validator.addMethod (or $.validator.addMethod, and pass it the name of your method, the actual method you want to call (a function), and an optional message
@DemCodeLines ok so
@Gacnt ...what?
@DemCodeLines Use the html5 required attribute, as phenom said above, which will automatically do stuff when a field is left empty, also will notify users automatically of what is wrong, you can style it with css to change what happens to the element when it's invalid, you can also call .checkValidity(); on it to do custom JS events for when it's invalid, then use normal js like .length and stuff to see if it's the right length
@phenomnomnominal fart noises
Ok, so we are halfway there, but from here, how would you expect me to check against the database if the thing exists?
02:18
Just hang tight you little shit
@rahstame 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.
@Gacnt What?!
@DemCodeLines hold on you little shit head
02:21
I don't know if this is appropriate but just want to express my sadness. :) I got banned..huhu. *sigh I did not know that if you delete your post you get banned..sorry
@Gacnt for how long? :D
Anyone here familiar with V8?
Oh well. Could have had a v8
@rahstame Your post where?
02:42
@IDWMaster I don't know, sad. I lost hope. Thanks for asking.
0
Q: Using the fat arrow in coffeescript and jquery

Joey Salac HipolitoSo I decided to implement classes in coffeescript for object orientation example: class Foo constructor: () -> @ui.build(); ui: build: -> // do some stuff bar: -> // do bar stuffs bazz: -> // do bazz stuffs bindEvents: $('#elem').on 'click', () =

@Gacnt any time soon?
03:18
@CastleBrav0 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.
@DemCodeLines jsfiddle.net/aKENW sorry, got a shower and ate some food, this is what I was getting at @phenomnomnominal suck on that homie
@DemCodeLines leave the fields blank and try submitting, you'll see it does not let you
@DemCodeLines because of the 'required' attribute, also if you open console, you'll see on key up it's querying google, which obviously does nothing, but you can use that to query your database and on function return do something
Don't you wish your gf was a freak like me, don't you wish your gf could code like me, DONCHA
Now I must sleep
Obviously can be refined and made better, that was just a quick example
@Gacnt Thank You!
Learn from it or ill beat you up
nearly got my entire website down to 1 request per session
03:38
What should a function return when given an unexpected input? Throw an error? null?
error
Use asserts
Remove them from compiled source if necessary
@copy do you use the closure compiler?
Yep
@Feroz 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
04:01
What's everybody doin?
@Jhawinsss Reading failcode
user1596138
??
Discovered a branch for a new feature we were planning on implementing by my coworker. Guy's not known for his get-up-and-go attitude, so I was surprised.
Turns out it's 200 lines of placeholder code. No substancial work at all. I don't want to know how much time was put into it.
user1596138
Hahahaha wow
user1596138
I wish I had a team instead of just working by myself...
user1596138
04:06
You really need another opinion or some fresh perspective sometimes.
absolutely
user1596138
Also wish I had a mouse on this desktop right now. Doing everything with just a keyboard is annoying as piss.
04:25
@Jhawinsss Windows?
user1596138
@SomeKittens yup. Windows 8... Hate it. I'll have nix on the new machine tomorrow probably. No windows at all.
04:49
what flavor?
05:32
@BenjaminGruenbaum - I edited my answer.
@BenjaminGruenbaum - Oh, I also posted a new answer if you're interested:
0
A: No ways to have class-based objects in javascript?

Aadit M ShahAfter reading your edited question I realized that my first answer doesn't directly address your problem. Hence I decided to write a new answer that attempts to provide a feasible solution to your problem. Alright, so your main problem is that you want to use private variables with privileged me...

@Esailija @redline @JonKoops - You might find my new answer interesting.
Morning :)
Excited for E3 anyone?
05:56
Thanks, I'd up vote had I not done so already :) Reading the new answer
@SnakeEater Meh. I'm a PC gamer
most of the buzz will be console-based
good morning
@AaditMShah if you think that's efficient just sigh xD
a bound function takes 400 bytes, a normal function 80
@Esailija Nobody cares in these contexts, you should consider C
@Esailija how come?
well I don't understand it yet, I just ran the tests
The correct answer is to just use objects normally and prefix with _ or __ or whatever just stay consistent, or simply define your API through tests well.
My answer is mainly to say 'well, using object schemas and OOP isn't evil, it's useful, you can do it and you should in cases it's useful, and classical OOP is implicit (or at least should be!) in JS'
well if you have say an object with 15 methods, that's 6 kB per instance
That's what I never got, people are anti classical OOP because they feel that means they need the new keyword, and extending and stuff, in a dynamic language it's pretty simple to implement like the code in my answer, and it's pretty fast.
now you need to list 50 cars
that's 300 KB
now you have 10 people using your app at relatively same time
06:12
Ooh, 300kb, that's going to be my limiting factor
your 100 000 concurrent connections becomes more like 10
Why 10? 10,000 , that's still just 600MB
Don't get me wrong, I'm all with you on this, I have a lot of 'written for v8 optimization' code at work, I just don't think it's the focus for the most part
this is 300kb for something that normally takes under a kb
When I'm prototyping, I write node code the way I'd like, I optimize later. Like I said, if you're sensible in your coding practices you shouldn't end up with 50 objects with 15 methods in memory in the first place.
you are not seeing the big picture there
06:15
I think I am :)
your app will have to do a lot of other stuff as well, not just hold 50 Car instances in memory
You're saying 'write all JS like you'd write optimized memory performance node.js code' and I disagree.
well yes if you don't have an object model or anything then it wouldn't matter
I'm not saying 'memory optimization is dumb', I'm saying 'coding for performance should be considered over coding for readability only when performance is an issue'
Which is not the case in most cases, even in node. I agree that if you have 50 cars per user in memory in nodejs and each have 15 methods something went horribly wrong though.
I've always agreed that developing node takes a much higher degree of discipline and understanding than developing most other sorts of JavaScript.
And in practice, I use objects much like one would use structs, and not objects. Often not having any methods at all. The ones that do don't access closures anyway.
I see
06:18
However, I don't think this is what we should teach someone that wants to know how code sharing and modeling works in JavaScript.
Is there a way to push the previous object in the array?
@SnakeEater you mean like unshift ?
Yeah but make a duplicate of the item below it
you think the people who are worried about private fields code procedurally though?
@SnakeEater arr.push(arr[arr.length-1])?
06:20
@Esailija I think people who work on projects using the nodejs framework become aware of how they need to code to please node quickly.
Cool, I'll try that, I'm working with a backbone collection and my knockout data-binds aren't working with the latest object @JanDvorak
"cool I'll try that" always makes me nervous
2
I mostly use nodejs for RESTful APIs where most it does is fetch and query, with some basic processing. The other use cases are mainly sockets, also with nothing but pretty trivial back-and-forth. I do code mostly procedurally there because my objects usually map pretty smoothly to JSON (from the server to the client) and have a pretty smooth transition through an intermediate form making the round trip.
I wouldn't use node to do really heavy lifting even-though I know probably drive it pretty well (probably don't know the quirks nearly as good as you, but I know enough to write performant node)
Also, I (and I think most node devs) never have to actually scale above the C10K. I just git deploy my project to the Azure cloud, and it just works.
@mathi 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.
This question has been closed and deleted. Do you think it's normal ?
06:24
@JanDvorak thanks for that BTW :) I was going to prob spend an hour on Backbone documentation... Still a hack but pressed for time :P
@dystroy I voted to undelete, but I suggest that as soon as it opens you change the title to something more reasonable, as it's currently phrased it's borderline too localized
I'm surprised it was closed as "not a real question"
undeleted
@BenjaminGruenbaum well I don't really have a problem with it, many applications can get away with gratuituous waste of memory .. but general purpose can't and especially if one says "as efficient as it gets" then I just can't sit by and watch :P
The title and text aren't great, it's not one of the best question, but with those criteria half SO questions could be deleted...
Thanks
06:26
@dystroy it didn't get many views, however
@dystroy changed title
@Esailija I know you can't :P
@BenjaminGruenbaum you made a typo
@JanDvorak fix it
Yeah, I just saw (functionality)
shortan
wow
-_-
Haven't had morning coffee yet
@BenjaminGruenbaum Thanks. Was editing too but your title is better.
So room, I'm meeting with Microsoft and Nokia in 25 minutes about developing a Windows Phone App. They're very interested in helping us out with it. What should I ask for?
06:29
var ww = window.open();
    	// Added to ensure there is a body element
    ww.document.write("<html><head><title></title></head><body></body>");

Why ww is null???
(We need a dev phone for starters, and someone to call when stuck, but what else?)
A free Xbone
@phenomnomnominal We're serious :P
@MirkoCianfarani popup blocker?
@JanDvorak so after duplicating the object, the new object is directly proportional to its clone... lol. Data-binds are freaking out :P
06:29
@BenjaminGruenbaum, oh in that case as for a PS4
@BenjaminGruenbaum you should ask for coffee (sorry, no useful idea on this topic)
@SnakeEater the object is not duplicated, only the reference to it
ADblock Plus in function... mmm now I stopped @JanDvorak
@JanDvorak yeah well its contents. I wonder if this has to do with the foreach data-bind or something...
@SnakeEater I mean, my code makes no effort to clone the object
06:32
page.viewModel.selected_movement().components.unshift(page.viewModel.selected_m‌​ovement().components[page.viewModel.selected_movement().components.length-1]);
@SnakeEater That's horrible, your Knockout code is bad and you should feel bad.
I always feel bad ^^ I know it is, I'm hacking at the moment. We need to get things done asap
"I'm hacking, we need to get things done asap" always makes me nervous.
and im using knockback
why the post being reopened when it got solution? I think it is not necessary
06:33
@Mr_Green Why do you think posts are closed?
now work @JanDvorak thx!!!
lack of explanation
or description
ya you got point
@Mr_Green It means "As it currently stands, this question can not be reasonably answered"
@Mr_Green I don't think it needs to be reopened. I voted to reopen because I don't like this closing reason. This being said, this isn't important, this deletion didn't even cost me rep, that's just that I felt it wasn't right.
That question can be reasonably answered, alternative solutions are useful.
06:35
Hey, could anyone else help repro this: if you visit this page and click one of the menu items, does the text of all the menu items disappear?
hmm yup
@dystroy Rep is meaningless after being able to see deleted posts.
voting to reopen then
@BenjaminGruenbaum Any game score is meaningless :)
@BenjaminGruenbaum rep is meaningless after being able to delete answers
06:37
@JanDvorak That's as much rep isn't it?
So you also set the threshold at 10K ?
Does anyone else use Brew?
10k to delete questions, 20k to delete answers
I stopped answering questions that I don't think are interesting, or people sent me specific links to. I still answer from time to time but a lot less often.
0
Q: Requirejs: jQuery is undefined

AlexBSomehow I always receive this error: Uncaught ReferenceError: jQuery is not defined I have the impression that jQuery (loaded via CDN) takes more time to load (confirmed by the network tab on Chrome). I run this locally on my PC, so that's why the CDN call will always be longer then the lib...

06:41
@AaditMShah Your solution is complicated
This is a rectangle {width:15,height:40}, simple ain't it? If I want its area I can do var getRectanleArea = function(a){ return a.width*a.height;} , if I want it on rectangle I can even bind it there, but there is not much point.
also, var private would likely throw an exception in strict mode
If I want width and height of a rectangle to be private, I have bigger problems XD but if I really wanted to do that for some off reason because I want my rectangle to have non-transparent internal state, I simply don't have to tell you about width and height.
I like how you implement what OP asked for, but you're missing the point you've made in your first answer
var x = {x:5};
var y = {x:5,y:5}; // y extends x here, see how classical inheritance is easy?
@BenjaminGruenbaum no type-documentation in code as far as the eye can see. One nice thing about explicit classes is that you've got a place where you can stick your documentation.
Does any one else shudder slightly when they see _/$/$$/whatever.extend?
@JanDvorak I agree! Which is why I use functions that construct the objects often!
@phenomnomnominal It's ok as long as you know it's a mixin :)
$$ - a little bit though after yesterdat
Anyway, I'm off to a meeting, ttyl
@JanDvorak also, that's a pretty big emphasis in my answer :)
@Luis 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.
Hey guys! Just a quick question please.
var myObject = function ( ) {
var value = 0;
return {
increment: function (inc) {
value += typeof inc === 'number' ? inc : 1;
},
getValue: value
};
}( );

myObject.increment(3);
console.log(myObject.getValue);
06:53
!!/welcome luis
@luis 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 does it disply 0? shouldn't be 3?
@Luis Please use ctrl-K to format your code
Oh
And don't name getX a simple (writtable) property
Why would getValue change ? It's not a pointer, it's 0 as you set it to 0
Maybe you want
getValue: function(){return value}
06:55
Yes. 'return value' worsk. but when should I use as I wrote before?
never, that makes no sense
@Luis please wrap immediately invoked function expressions (IIFEs) in parentheses. They are sometimes needed and they indicate you are going to call the function immediately
I was going to point that
It's hard to remember the exact cases when those parenthesis are superfluous, so just like the ";", always put it
Ok. I got all now. thank you.
@dystroy parentheses are needed whenever it would look like a function declaration instead
06:58
We use 'closure' when we want to define the 'properties' as private, right?
@Fasilkk 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.
@JanDvorak I know, but it's not immediate
more importantly, they are neccessary for the programmers to parse that correctly
@Luis We use a closure when we refer to a property declared in the outer scope. Isolating a variable and setting it private is one of the less useful reasons to use a closure.
@HendryH. 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.

« first day (968 days earlier)      last day (4202 days later) »