« first day (973 days earlier)      last day (3966 days later) » 

10:00 AM
and i'm sure they eventually will
 
@redline because it's pretty useless. If you really need typing you can always use typehints and get closure compiler warnings for that, you don't really need to enforce it in runtime.
 
that's retarded
 
@redline It's not new, and in fact they're more and more close to dropping the DLR, they're not really improving it or actively devleoping it.
 
what if i'm making a library for OTHERS
 
Then define a clear API, problem solved.
 
10:01 AM
JS pre-compilers DON'T SOLVE THE PROBLEM
 
that's your solution, the API has all the info?
"oh yea, devs all listen to the API and follow it the way it should be used"
 
24 secs ago, by Benjamin Gruenbaum
Read this: http://stackoverflow.com/a/4439733/1348195
 
this is WHY we need private and protected, and why we need some form of type-hinting
having an API outline everything is never enough
especially in a work environment, people move too quickly and care too little
 
While I would appreciate interfaces in JavaScript, I find stuff like abstract, private and protected pretty useless.
 
10:03 AM
ok but dude, you're not every JS programmer
and A LOT of people would
do you not agree with that?
 
I don't see why the language should cater extremely poor developers over competent ones. I've seen plenty of well structured JS code.
 
please start a company and try to hide 500-1000 competent developers
by my standards competent developers are like unicorns in the real world
 
if i'm at work, and i need to quickly extend the Autocomplete class for an autocomplete textbox to add some stupid funcitonality my boss wants, i shouldn't have to run every function to check if an "extend me" is thrown, and i shouldn't have to go find any documentation to tell me, hell what if it was built internally and the documentation was never maintained...having an abstract class tells me what to implement RIGHT WHEN I COMPILE it
 
@BenjaminGruenbaum didn't you also notice that when you were interviewing? ;P
 
10:05 AM
@redline If you create a library that just does interfaces (that is, take a class and return a polymorphic view of it as an interface) I'll totally use it
@Esailija That's why the sad face :P
 
jTypes 2.2 => interfaces
jTypes 2.3 => type-hint arguments/returns
it's written on the board right next to me right now
 
I don't want to use jTypes. I don't need huge classes, abstract, private, protected or any of that. I just want interfaces.
 
i've already had it planned for a while...jTypes 1.1 => performance is already crossed off
i can always make it a separate package
which plugs in to jtypes
so you can have either or both
i can UNDERSTAND that some guys don't want jTypes classes and only jTypes interfaces
so i will do what is necessary to make both happy, because it's that easy
 
@BenjaminGruenbaum what do you need interfaces for
 
just like adding actionscript-like type-hinting and a few more keywords to JS
 
10:08 AM
That's obvious, interfaces define contracts, they're way more important than classes.
 
jTypes is awful. Over.
4
 
@BenjaminGruenbaum yea what do you need interfaces for? JS is dynamic bro...it shouldn't have that stuff...it wasn't DESIGNED for the language
 
lol
 
/sarcasm
@phenomnomnominal thanks for your awesome contribution
 
    //I really just want something like:
    function Impl(){
        this.x = 15;
        this._y = 10;
    }

    function Iface(){
        this.x;
        //MAGIC!
    }

    var impl = new Impl();
    var iface = Iface(impl);
    // at this point iface just lets me access _x, attempts to access other variables     raises exceptions
 
10:09 AM
@phenomnomnominal at least these guys provide constructive criticism
 
@redline your mother provides constructive criticism.
 
@phenomnomnominal and talk about it, instead of just "it is awful" and "all your hard work is awful and horrible"
 
@redline Interfaces define contracts, they make sense. Like I said, the ruby answer pretty much covers it well.
 
@BenjaminGruenbaum then i'll look into the ruby answer and see what they do to give me ideas
 
the interface construct doesn't define anything and is completely useless in a dynamic language
 
10:10 AM
i've never used it before so i'll have to take a peek
 
the answer's high point is actually that, that interface construct didn't really define any real contract
 
@Esailija Which is why I love it :)
While control modifiers and abstract seem pretty retarded in the context of JS, interfaces would be nice to document.
 
@redline, we've had that conversation, my opinion hasn't changed. I was just cutting to the chase.
 
you can just document it
 
that's fine then, i appreciate that
but we wouldn't have the same conversation over and over, so there is no need for the ending of it every time
@BenjaminGruenbaum wanting interfaces but not abstract seems contradictory to me
 
10:12 AM
@Esailija Which is what I currently do, however interfaces would let me define these contracts in a way that works in teams well. Your 'scaling' problem.
 
@redline, Roger that, I'm having a shitty month. Over.
 
@redline Why?
 
accessing undefined property will just result in undefined
 
they each solve similar problems
 
are you looking for immediate exception?
 
10:13 AM
aka, lack of good documentation
 
@BAUER102 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.
 
@phenomnomnominal understood, i hope whatever is shitty/wrong corrects itself or goes away
 
@Esailija I don't mind undefined, as long as I don't get the property, also, calling the Iface function over the object would raise an exception if it doesn't implement hte contract.
@phenomnomnominal ?
 
Relationship bullshit. Over.
 
@BenjaminGruenbaum well sounds like that can be done with proxies no?
 
10:14 AM
So close to finishing my site, just need to get it done. Over.
 
@phenomnomnominal yea i know how it goes bro...i'm there as well, just want to finish my back-end framework so i can make jtypes.com
 
@Esailija Yes, it's another one of the million things proxies would completely solve. Although it would be very slow. I guess we can have production/debug modes where production just relays and debug uses an interface.
 
@phenomnomnominal i work ALL day and never feel like i got anything done
 
yes all these things do a lot of work at runtime
and if you do these checks at compile-time then you are not stuck with what JS even has
 
@Esailija ?
 
10:17 AM
if you have any kind of preprocessing step and don't just directly use your jsfiles, you can enforce this without any language features
 
no reason for JS not to include optional features that make it more powerful and apply to a larger group of developers, can help significantly from a business perspective, and can provide some really great optimizations at compile-time...simple as that
 
@Esailija Just enforce interfaces with proxies in beta, and relay in production, that seems simple enough.
I still don't think access modifiers are called for, or needed. We're all consenting adults.
 
yes well that's about 1% of the programming population
let's be realistic here
 
true
D
 
most need their hand held
 
10:19 AM
^ truer words have never been said
 
then sometimes god reaches down from the heavens and lets them type something worthwhile...just once
 
You're telling me most programmers are not consenting adults?
 
I have a lot of experience with hand holding
 
i do as well
 
That's a horrible approach, if you hire programmers that are that stupid, it's your fault if you get bad code.
 
10:20 AM
i used to build the internal frameworks for my company in JS
i used to make large libraries that a team of 10 would then use
i know what it takes, and i know what problems you run into
 
but I had to hire someone from the 10
the reality is you can't just hire the competent ones always
just setup your own company and do it
 
@Esailija No, you really didn't. SO and github are crawling with people who would have done the job better.
 
or you're not in a hiring position...lol
 
willing to relocate to finland with questionable salary?
 
you have to take what you can get
 
10:22 AM
If you're paying a questionable salary you're doing it wrong. A good developer is worth more than 2 poor ones.
 
my father is a carpenter, if i give him shitty tools he does a shitty job, but when i give him laser levels and all kinds of other great shit, he isn't half bad
 
I'm not paying anything, I was just assessing technical ability in the interviews
 
Just like that if you don't have testers you're doing it wrong.
@redline Then your father doesn't need his hand held :)
 
@redline, equally often, good tools only demonstrate how bad you are. Over.
 
@phenomnomnominal are you saying good devs don't use good tools?
should i program everything in assembly?
 
10:23 AM
Nope, I'm saying bad devs (and not just in dev) can ABUSE anything. Over
 
and good developers by my standards are worth 10 times the poor ones, not2 :P
 
cause using a compiler is pretty shitty
 
@Esailija Me too, yet I went to my boss and convinced him of the importance of hiring a competent developer, and asked him to wait until we get one.
 
@phenomnomnominal <<<<<<<< THIS
omg there it is
and you think a dynamic language can't be MORE abused?
 
yes like I said they amplify the effect
 
10:24 AM
No, it can't. I've seen horrible C# code.
 
i couldn't even say int i = "blah" in C# if i wanted to
 
Put a bad musician on a amazing instrument, and you will still get awful music.
Put a good musician on a bad instrument, and you will still get good music.
 
@redline no, but you could do var i = "blah" or even dynamic i = "blah"
 
but put a good musician on a good instrument, you get beautiful music
 
but not in java :D
 
10:25 AM
jTypes doesn't do beautiful music though :P
 
@BenjaminGruenbaum ignore the definition, i'm talking about using it later on
output i
@BenjaminGruenbaum lol, i agree...obviously i'm saying it needs to be native, right?
 
NO. Over.
 
i want the functionality jTypes offers without jTypes
 
JavaScript doesn't need it, over.
 
and that's the wrong mentality right there and the reason we are where we are
because the guys in control feel exactly like that
 
10:27 AM
@redline You already have it.
 
and don't think offering more options is a good idea
 
You haven't been able to produce one solid use case. Really :/
 
You have the option. Over.
 
@BenjaminGruenbaum i have it by building it on top of a dynamic langauge which is built on top of a language that does what i am looking for already, and much much faster
 
You have the option to use jTypes, which shows that it's in the language. Over.
 
10:27 AM
jTypes is not what i want, it is what i have out of desperation
since JS is the only language in browsers
i want to do what jTypes does natively so it performs as it should
@BenjaminGruenbaum i don't think i need use cases for classical inheritance
 
@redline You can do structural subtyping, or even strong behavioral subtyping in JS for practically free.
 
define free
 
var a = {x:5};
var b = {x:3,y:6};
// free as in free beer, damn I love beer
type of b structurally subtypes the type of a.
 
i like to hard define my class members so the compiler can actually be smart and use an offset
 
as in you didn't have to specify an elaborate interface somewhere first to make it work?
 
10:30 AM
i don't need to define a property dynamically
i know what properties i need ahead of time
like any good dev
 
and then make 2 classes that implement it
 
@redline compiler still does smart class extraction here.
 
not the kind a real compiler would
it's not using a member offset
 
well it's very close
 
C++/C# would run circles around it
 
10:30 AM
Does anybody know why jquery load:

$('.chat_post').load('/chat_post?disabled=true').fadeIn('slow');

not working in Google cache? You see a empty space then there.
 
of course it still has to do quick checks
 
function TypeA(x){
    this.x=x;
}
function TypeB(x,y){
    var a = new TypeA(x);
    a.y = y;
    return a;
}
 
^ that's god awful compared to a class definition
 
Fine, use a class definition than, like in CoffeeScript.
 
yea but that's NOT A CLASS
just like jTypes is NOT A CLASS
 
10:32 AM
@redline that is a BILLION times better than jTypes. Over.
 
Sure it is, you just have a misconception about what a class is.
@redline define a class.
 
@BenjaminGruenbaum why do you wrote it in such a convoluted way
 
@BenjaminGruenbaum that doesn't respond correctly to instanceof
 
a class is something a compiler recognizes ahead of time and optimizes for...that right there is a dynamic object which has a dynamic class created for it at run-time by V8
 
@Esailija I could use apply/call with this, I know that and we've already had that conversation :P
 
10:33 AM
apply/call is reflection, so I wouldn't use those
 
@JanDvorak we're already have that conversation, that's silly :P
@redline So a class is defined in a programming language by some specific compiler's ability to optimize for it? Do you see what's hugely wrong with that definition?
 
@redline, I'm curious as to what you're doing in JS that requires such high performance demands, over.
 
i understand it is not the right definition
that is what i WANT
 
if you wanted a JIT to infer a class structure there you are making it really hard
just use the normal way
 
2 mins ago, by redline
yea but that's NOT A CLASS
It is a class.
 
10:34 AM
yes technically
but not by my definition of what i want
and what i am talking about
 
Then you don't want a class. Over.
 
^ So define what you want, and don't use incorrect terminology.
 
You want to systematically redefine the language. Over.
 
@Esailija What would be the 'normal way' then?
 
i want to code something that doesn't have to create a dynamic class for it whenever a new property is defined
 
10:35 AM
first of all, so that instanceof works
 
Does anybody know if it it's posiible to work in Google cache?
 
i want to create an object that is fixed, and then remains that way so it is as fast as possible
 
@redline, why exactly, why specifically do you want that? Over.
 
@Esailija I thought we were talking about structural subtyping and not behavioral.
 
define the properties for your type in your constructor
 
10:36 AM
@redline In the specific JS engine V8, at its current version, right?
 
don't take some object somewhere and add dynamically properties to it
 
How would you do the above example?
 
first A was constructed, then you go on and add dynamically more properties to it
 
V8 can infer that.
 
and you never even return a type of B like Jan said
not necessarily
 
10:37 AM
Of course I return a type of B -_-
 
GAWD, I feel like I have to keep repeating myself over and over. The return result of TypeB is a structural subtype of the return result of TypeA
 
no you are not
 
i am an engineer, i didn't go to school for CS, i went to school for engineering, and I studied CFD, which is computational fluid dynamics...so i am really big into simulation software...one day i hope to develop a game engine as well (obviously for all the physics and shit)...and i believe that a big part of that engine will be in JS...so if you take my perspective and background into account
i want to develop JS that is really really fast
and really really structured
technically i don't want JS at all...i want C# in the browser...but i still like a lot of other things JS has to offer which hard languages do not
 
@redline OOP doesn't make that stuff fast. Over.
 
10:39 AM
Making properties slow: Out of object

function OutOfObject() {
    this.initialize();
}
OutOfObject.prototype.initialize = function() {
    this.foo = null;
    this.bar = null;
    this.color = "transparent";
    this.that = "bla";
    this.the_other = "bla";
    this.x = 0;
    this.y = 0;
}
 
and i see a hybrid of the two sitting right in front of me
 
if you die plz write in will that i am allowed to talk in funny chat room
 
@web2students.com There, write there all you want, just don't run around with scissors.
@redline This is what your code feels like. Trying to use language A the same way one would use language B. We've all been there.
 
@BenjaminGruenbaum yes, i know that
 
@redline have you looked at game engine or renderer code? Over.
 
10:40 AM
but that doesn't mean i HATE javascript
i love a majority of the language
i just want to type classes damnit :(
 
Of course it doesn't.
 
REAL classes as i see them
not because i'm stupid and can't figure JS out...but simply because i prefer it
 
@redline You're exactly where Douglas Crockford was 11 years ago :)
 
this is like building cars ALL AUTOMATIC
when they invented AUTO, did they just say...oh well we don't need MANUAL cars anymore
some people PREFER that level of control
 
@redline Which is why we have asm.js :P
Or C++ modules in node.
 
10:43 AM
but that's node.js
 
why does he define a method method
 
i'm talking front-end development
 
@Esailija read it through
 
The method method takes a method name and a function, adding them to the class as a public method.
 
@redline, so use something that compiles to asm. Over.
 
10:43 AM
I hope that in 100 years automatic cars are good enough to replace manual cars, and manual cars will be for hobbies.
 
@BadgerGirl (and guys who wear bras): mentalfloss.com/article/49478/11-geeky-bras
 
wtf is asm.js?
i've never heard of this
 
@redline, that doesn't surprise me. Go Google it. Over.
 
i'm already on the homepage
but it looks really shitty and sketchy
doesn't make me want to move forward
just tell me what it is?
 
10:45 AM
@redline, well it isn't. Over.
 
@redline It's a subset of JS that is typed and runs really fast.
Only works on FF at the moment.
I think it's a horrible idea :P
 
ok
so asm is EXACTLY what i want
but again, only works in FF
 
it's not possible to have integer multiply semantics... that's why asm.js is needed
and v8 cannot do uint32
 
Chrome are working on it. Over.
 
@BenjaminGruenbaum No bro, you wrong. Writing code for the compiler is, like, our job.
 
10:46 AM
i am still RESTRICTED from using that kind of stuff then at this point
 
@Zirak I'm pretty sure @Esailija and @redline actually think that -_-'
 
e.g. (x * y ) | 0 will still have to generate double conversion code
so the dream of not needing asm.js is not possible
 
@phenomnomnominal yea but IE will take forever or probably never implement it
 
@Esailija (x|0 * y|0)
 
@BenjaminGruenbaum doesn't help
 
10:47 AM
Because who cares about expressiveness and good design, if you can have code that runs 1000k ops/s instead of 100k op/s?
 
@Zirak Jesus Christ thank you.
 
@BenjaminGruenbaum You just n00b dude
 
@redline, fuck IE. Everyone does now anyways. Over.
 
!!/stat benjamingruenbaum extended
 
@Zirak Do you know why jquery load page $('.chat_post').load('/chat_post?disabled=true').fadeIn('slow');

not working in Google cache? You see a empty space then there.
 
10:48 AM
@JanDvorak User Elusio proved elusive.
 
@Zirak Apparently, pfft.. expressiveness is so stupid.
 
@phenomnomnominal true, but let's be realistic dude, you can't make an application without considering IE unless it's strictly an internal application
 
@BenjaminGruenbaum there is Math.imul in v8 and spidermonkey now but who wants to write that
 
@JanDvorak Benjamin Gruenbaum has 12084 reputation, earned 75 rep today, asked 28 questions, gave 364 answers.avg. rep/post: 30.82. Badges: 1g 21s 52b
 
!!/stat zirak extended
 
10:48 AM
@redline, BULLSHIT. Over.
 
@JanDvorak ?
 
@JanDvorak Zirak has 5176 reputation, earned 0 rep today, asked 15 questions, gave 164 answers.avg. rep/post: 28.91. Badges: 2g 16s 35b
 
@Arthur uh...no? But I'd wager a guess and say that "google cache" is a bit of an edge case? Also, why did you single me out?
 
@phenomnomnominal why?
 
1 min ago, by Zirak
@BenjaminGruenbaum You just n00b dude
 
10:49 AM
everybody plz close your eyes plz, i wanna see my stats !!/stat web2students.com
 
@redline, because if people seriously want highly performance stuff in the browser, they don't use IE. Over.
ASM.js is just normal JS. It will run as normal in everything. It will run faster in FF. Over.
 
@JanDvorak Rep is a real indicator of expertise. Just look how much rep okok has, almost as much as Zirak which means they're as good.
 
@Zirak because you are the best :P
 
!!/stat web2students.com
 
@phenomnomnominal yes but, when making a site you can't just not account for IE, they still have a large market-share, especially in BUSINESS
 
10:50 AM
@web2students.com web2students.com has 180 reputation, earned 0 rep today, asked 3 questions, gave 48 answers.
 
The thing that will give you the real boost is ALGORITHMS. Not in premature optimization. Over.
 
^
God yes.
 
@redline, ok, but what business tools need super high performance JS? Over.
 
not when my algorithms are running in a shitty dynamic language
 
Yes I'm sure it's the algorithms, that's why it's possible to play mp3 in IE8 or run quake2
 
10:51 AM
The language isn't shitty, you are, you're acting like an ignorant noob again. Over.
 
Also, using documentFragments gives you boost.
 
@phenomnomnominal sorry
my bad
 
@Esailija That's called Reductio ad absurdum
 
for most of the stuff you write O(1) vs O(N²) doesn't matter
and when they matter
then micro perf matters too
 
@redline You wanna see a shitty dynamic language? Try Tcl.
 
10:52 AM
@Esailija Not sure if serious or joking -_-
 
for small N anything is fast
 
Which is the case for most JS. Over.
 
For small N you don't need to optimize. For large N the difference between O(N) and O(N log N) is much more important than some micro optimization or another
 
yes, in these cases we don't even worry about the O(n) shit
 
Of course we worry about O(N) shit -_-'
 
10:53 AM
@BenjaminGruenbaum my point wasn't choosing one or the other
my point was that if you have application where you can ignore performance
 
Replacing native QuickSort with TIMSort can be a much better performance boost than avoiding closures.
 
then it doesn't matter if you use .indexOf vs hash table
 
First of all, in 99.9% of times you can, and really should prefer expressiveness and readability and good design over speed.
 
@web2students.com FUCK OFF. Over.
 
@phenomnomnominal No need to be rude. Just move unfunny messages, over.
 
10:55 AM
...that was probably the most misguided view of how doing things works
 
like let's say I was using indexOf where I should have been using hash table from the start
and now it becomes a problem
I get a very big boost now from using hash table
but then you will likely still need more
see my point?
 
Using a hash table over indexOf is exactly a change in big O notation rather than a micro optimization... You're arguing against your own point.
 
@AnkitZalani 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.
 
Speed is like money, once you want more, you eternally want moooore?
 
I am saying you get huge initial boost
like v8 got initially
 
10:57 AM
I'd argue that you're probably better off reading expressive readable code and buying a faster server.
 
by not interpreting
but that still didn't make quake15 in browser possible
 
@Zirak also, inverse character count is like money.
 
how to get the value of variable by name in jquery
 
@AnkitZalani jQuery doesn't help you here
 
When you are looking the cache from the chatrooms: webcache.googleusercontent.com/… the page redirect or something.
 
10:57 AM
@Esailija If you had your way 10 years ago we wouldn't have v8 today.
 
@AnkitZalani Value of a variable...like...actually referring to it?
 
@Esailija we would all be coding sandboxed C in the browser, because that's theoretically faster.
 
var x = 4;
x; //like this?
 
I am arguing for not stopping at algorithmic changes when you have a performance problem
 
10:58 AM
@JanDvorak "Inverse character count"?
 
@BenjaminGruenbaum nah, we would be writing machine code
 
@JanDvorak Oh, you mean like asm.js ;) ?
 
ohh got it
 
I am saying, you had a performance problem there, why stop at initial boost?
 
@Zirak the fewer characters you have, the even fewer you want.
 
10:59 AM
@Esailija I understand your point, I just disagree with it.
 
@Esailija It depends on how you define it as a problem
 
@Esailija Don't think for one second that I don't micro-optimize my nodejs code. I do that because I must and not because I want to.
 
@Esailija diminishing returns. You get to a point where there is no point. Over.
 

« first day (973 days earlier)      last day (3966 days later) »