« first day (587 days earlier)      last day (4360 days later) » 

6:02 PM
@rlemon haha I dont want to use canvas
just pure unadulterated js
 
no no i was showing you for inspiration :P
always nice to see a few other approaches when figuring out a problem / or just creating new things.
 
Hi All
Need some suggesion
 
@kumar 42
 
I am little confused with all the javascripts libraries around
 
@rlemon well what do u think of my code so far?
@kumar dont use one ^_^
 
6:05 PM
looks ok
 
i mean, i would have to see the finished game :P
 
@rlemon hehe but do u like my functions within functions approach?
 
@kumar javascript libs are generally abstractions of the DOM API with some shims and polyfills
so instead of using abstractions (Which are not maintainable unless the new dev is using the same lib or has used it) lets polyfill the DOM API and use that.
 
@Neal, @rlemon : code organization point of view, JQuery is not that standardised compared knockout.js or backbone.js
 
6:07 PM
then once you understand the DOM API and how it related to JS and the browser and the code you're writing - you'll likely understand the libs a bit more.
none are, this is what we are saying
they all have their own ideals on how js DOM APIs should be
but not how it is.
 
@rlemon: absolutely agree with your point
but , now i don't have much time to explore DOM API of all the modern browsers
 
so DOM shim or ES5 shim and just use plain ol ES JS
@kumar SHIM
and you don't have to
just the ES5 specs.
which, is not unlike learning a new lib
 
what is ES5 specs?
 
ECMAScript
 
ahh ok
 
6:09 PM
 
^ this is what web browsers are all working towards (minus a few)
this is what we should focus on.
 
@Neal: is this new version of Javascript?
 
abstractions === bad
shim/polyfill === good
 
^Great news
 
@kumar ECMAScript is the language... Javascript, JScript, Actionscript are all variants of it.
 
6:11 PM
yeah.. Understand
 
the DOM API is provided to you by the browser, and is defined by an organization of standards or something like that
I don't know what it's actually calling itself.
w3c
 
Again back to my old question
 
commity?
 
commies
 
meh, regardless... if you are confused by the libraries i am going to take a stab that you are also fairly new to JS?
 
6:13 PM
As a best practice - for server side we have architectural patterns like MVC, MVVM..
 
or don't use it much.
MVC exists pretty much everywhere (or variants of it)
 
what would be the best pattern for client side development?
 
small footprint
allusion of fast code
no errors
 
MVC in JS is a mess (imo)
 
I know Knockout.js is base on MVVM
 
6:15 PM
Just treat JS like any other OOP and you'll be fine. organize your code into as many reusable objects and classes as you can
 
@rlemon: Lets say the project is very large having n number of modules
 
ignore these people who tell you js is not oop and cannot support classes... where they are technically correct, we can use it this way.
 
in that case i need to follow some kind of standard pattern.
 
for what purpose? maintainability?
 
i know , javascript supports classes
 
6:16 PM
not really, but we wont get into that.
 
yeah.. maintanablity
 
you can use a class like object to achieve almost anything you can with traditional oo classes
 
interms of acceptance of change without breaking lot of places
classes are base for object oriented design
 
create your own... for a large project with many modules... some kinda dependency / module injection is what you're looking for?
 
all the patterns MVC, MVVP, MVP are built on classess
i am talking about highlevel picture
MVC, MVP and MVVM has lot of benefits ..
 
6:19 PM
yes... but JS does not implore the class structure like a traditional oo language... lots of people will just rage and say "NO JS DOES NOT HAVE CLASSES" - all I was saying is ignore them, they are correct, but we can use a class-like object to achieve all the same things... so really, they are just trolling you.
MV* is just buzz words to me.
 
for server sdie development we have tools from Microsoft
 
separation of concern / workflow / and priorities is all you need.
 
I would like to know is there any java script libraries which are follwoing tgheser pattersn
yes
correct
 
^ if you plan this out well, you'll look back and say "shit, I just built a MV*"
 
:)
 
6:20 PM
@kumar i guess all i'm saying is, because in the client you wont be implementing anything standard, it will all have to be customized for your class objects and modules... you should just create your own.
 
have you heard any time about Knockout.js
 
Hasn't Knockout been superseded by Ember (or was it Backbone)?
 
Rather than having these n number of javascript libraries
 
6:23 PM
why can't all the browsers support statndars javascript
 
just look through Raynos github and i'm sure you'll find something
he's all about that crap in node.
 
^sure
 
and he does have the DOM shim, which is pretty solid.
 
Hoho, the Dragon has docked with the ISS!
 
ohh man i'm getting fat.
I can pinch an inch :(
 
6:39 PM
Your gc doesn't collect the fat particles with circular references.
 
no a week of Diablo III beer and pizza pockets has made me put on 5 lbs
 
poor sad boy
 
5 lbs means nothing to me ._.
How do you even manage to figure out that system.
 
~ 2/2.5 kg
 
a scale :P i usually take my average. Between any given day i'm 150-155lbs.. now i'm like 155-165lbs.
 
6:41 PM
a pound is just less than 0.5kg
 
so I can safely say i gained 5lbs
 
>_> kilograms are so much better
 
1kg is 2.2lbs
^ just convert using that
 
It's what i said
 
you used approximations.
 
6:43 PM
When are you switching to kg, lbs guys?
 
I switch when i'm at the gym. always having to do conversions there
some machines are metric, some imperial
 
you too, 2.2 pounds = 997.903214 grams
Not 1kg
 
Math.round(997.903214); // 1000
well not quite
but you get me
unless you're dealing with a tonne or more the discrepancy is not enough to effect whole kg values.
 
I lived 23 years with metric system, then i came here in Canada and... i was lost the first days. 'lb' and inch everywhere
fffffffffffuuuuuuuuuuuuuuu
The worse is that i heard in Quebec ( i don't know for the Canada ) the metric system is the official one
 
metric is defacto in most of the world outside the US
British are metric
Metric makes sense. Imperial is effed out the arse
only thing I do like is ft vs m
but that is mostly due to conditioning in recognizing ft and in vs m and cm
 
6:50 PM
I like the Japanese Yen.
There are no cents.
A Yen is a Yen.
 
s/cents/sense and you're onto something
lol 95% of the world runs on metric :P
thats saying something
 
anyone want to contribute to my boredum? jsfiddle.net/maniator/H5LKy
 
Array.prototype.randomize booo
 
'ut the US appears to be an anti-metric stronghold. Judged solely upon the 'metrication battles' raging at internet fora, the opposition against the 'European socialist metric plot' sneaking 'commie units' into God's own country'
olol
 
@Oleg haha how else would u do it?
 
6:54 PM
function oc(a) { < whoever is going to debug this will wonder "What the hell is oc??"
 
@Oleg what is the problem ? Why can't i had features to a prototype if it does not provide it to me.
 
@Oleg object converter.
 
Why not just function randomize() {}?
@Neal oh rite, do I need to ask you that personally every time?
 
@Oleg haha bc then I cant change the array by reference
I added a comment
 
Why don't use the prototype when it is here to provide me the fact to enhance possibilities ?
 
6:56 PM
Why not just call it "convertObject" or "ObjectConverter"?
 
@Oleg oy.... IGNORE THE DANG NAMES...
or fork it and make ur own
 
@DieVarDump Because someone else might have the very same idea.
 
I want contributers lol
 
I am contributing...
But you shout at me.
So I'm not going to contribute anymore.
 
@Oleg lol oy
haha i meant coding style. nothing to do with names
or anything i should fix
etc
 
6:57 PM
@Neal coding style = everything to do with names
 
ok, right : Array.prototype.randomize = Array.prototype.randomize || function...
 
@DieVarDump aha, and what if the implementation differs?
 
It will randomize, no ?
 
How do you know?
 
@Oleg oy...
nitpicky pplz :-P
 
6:58 PM
Maybe it's throwing an exception when there are > 10 elements?
 
because the name is explicit. Don't play this game.
 
@DieVarDump anyeays do u have any useful comments? :-)
 
The green makes my eyes sick ?
 
lol
 
for (var i = 0; i < a.length; i++) { try linting this
 
7:02 PM
Oleg, 'messing' with prototype, if it's intelligently done, is not a problem.
 
@Neal I can assume you are also working on a canvas wheel or a html/css wheel for me to spin?
 
7:18 PM
Have a good evening (or whatever it is in your neck of woods)!
 
I wish it were evening here ;\
It's friday, It's pay day.. and I should be at home lounging by the pool!
 
7:34 PM
hello, what's the best way to create variables dinamically and assign it? I was trying this but it says undefined.

window[$(this).attr('name') + "Empty"] = true;
I have 3 variables already declared, nameEmpty, usernameEmpty, passwordEmpty, and the inputs has the names, name, username, password
so I'm fetching the elements getting it's attr('name') and trying to concatenate with "Empty" so I may form that variable name and assign it with true.
what's the best way to do that?
 
7:56 PM
0
Q: JSLint says "unexpected function" doCalc, also please help refactor

JustinSee the full calculator with HTML -> https://gist.github.com/1861120 You should be able to drag that html file from github into a browser and start using it. I'm only putting the js below. The calculator works fine but JS Lint is telling me I have an unexpected 'function' doCalc line 9 character ...

 
note : on dnode, never forget the client.on('ready' )...
 
@DieVarDump could u help me with the issue I've posted above?
 
My idea is you must NEVER bip someone to have an answer. AND NEVER edit your message when you have an highlight in it...
The best way is to not populate window.
 
how could I do that then?
 
not with the window object
because it's bad to populate the window object
(function() {
    var myNameCollector = {};
    $('input, textarea').each(function(i, obj) {
        if (obj.name) {
            myNameCollector[obj.name + 'Empty'] = 1;
        }
    });
    console.log(myNameCollector);
})();
that works
So you have an error somewhere.
 
8:08 PM
lemme try
is it good to use $.globalVariables = { value:v, ... } to hold global variables?
BTW your solution worked..
 
I think it's here to host global variables. But i don't like/know jQuery so... i can not be trusted on that
 
8:28 PM
I personally don't use the globalVariables in jquery at all (I use it for certain things)... But what you can do is use the namespace in jquery...
$.mynamespace = {
myVar : "something",
myVar2 : "somethingElse"
};
 
:(
 
what @david
 
nothing, just... nothing
 
I dare anyone to find me a real good reason to use global variables with the flexibility js allows you with closures.
(except for single-app namespacing)
 
yeah -- i don't use globals myself -- no reason to... (in my resp above i meant i use jquery for certain things)
 
8:41 PM
> I would suggest jQuery, it's not hard to learn, in fact I find it much easier than basic javascript
orly?
@Justin even your method seems silly
 
JSONP is the only reason I can find...
and that's only for the callback, which .... meh.
 
@FlorianMargaine could be silly, in the appropriate situation it could come in handy... I don't know the situation that requires him to use globals or whatever -- but the namespacing is at least better :) I've used the namespace like twice, usually when picking up a legacy project and I don't want to spend a week or two re-writing the entire thing...
 
@JayC good point x)
 
but yes, definitely better to learn Native JS before you start utilizing jQuery.. sure JQ is easier, it's kinda like a race car driver/mechanic.. It's one thing to know how to strap aftermarket parts to your car -- but it's a whole other thing to know how everything works together
 
that's a terrible analogy
jquery is more like putting training wheels on the race car.
 
8:54 PM
the analogy still works... jQuery is the guy who only knows how to bolt stuff on... Learning your native JS first -- you become the guy who knows how the parts work...
 
When does proto appears ?
 
v.v
 
__proto__
 
Sam
9:10 PM
Hey guys
 
my goodness, AskUbuntu is on a debate right now whether or not to continue to allow question pertaining to past releases... that is just absurd. So I can't ask or get help on 11.04? or 10.04? man is that site ever going to suffer.
Linux and Unix will get more popular for ubuntu questions.
 
troll What is Linux ? /troll
 
Linux is that thing that most of the world runs on every device aside from their desktops
but it's not important.
 
Oh ok. Windows is Linux ?
 
nope, it's what's waiting for you when you stop viewing life behind windows, and open a door.
 
9:18 PM
Like black screen with withe inscriptions and a man myCommand every 5 minutes just to open the configuration panel ?
(this one is better)
 
also, Linux is a chick magnet.
 
I do guys.
 
Linus gets TONNES of ass.
why do you think they call them man pages
we cater to you as well.
 
windows is what i use to load up my linux vm
and to play games...
 
^ just that
 

« first day (587 days earlier)      last day (4360 days later) »