« first day (969 days earlier)      last day (3995 days later) » 

11:00 AM
maybe
 
df = object.defineproperty.call.bind(object);
df(object, prop, desc)
 
you can just use df = Object.defineProperty
 
@redline ...and what's the first argument to .bind ?
 
and it will only be faster in unoptimized code
 
yea it doesn't matter, it's irrespective of the test i'm talking about
i'm talking about removing the property access on Object
 
11:01 AM
if you use JSPerf normally you will not get useful results
 
in the timed loop
 
!! 1%8
 
@Mr_Green That didn't make much sense. Use the help command to learn more.
 
!!\ !%8
 
@Esailija you're suggesting i don't use jsPerf?
 
11:01 AM
@Mr_Green !!> executes code.
 
@Mr_Green That didn't make much sense. Use the help command to learn more.
 
no, but you need to be aware of how to use it
 
kk thanks
 
enlighten me
 
!!> 1%8
 
11:02 AM
@Mr_Green 1
 
if you use it the normal way, then you are usually testing unoptimized code speed
which is useless
you don't care about unoptimized speed because only cold code will be unoptimized
and the performance is inverted usually when running in opitmized mode
so the results are misleading as hell
 
well i want unoptimized code speeds in this case
 
@Esailija Hell's performance benchmarks are often put into question.
 
why
 
this isn't for node or anything if that's what you mean, or am i misunderstanding?
 
11:04 AM
your code will only be unoptimized in real applications if 1. it's cold or 2. it uses with or direct eval or etc
that's the ideal anyway
 
no with, no direct eval, always cold
 
@Esailija Doesn't JSPerf warm code up for a few seconds before benching?
 
lol
i know i've never called it "cold" before
that felt so awkward
 
@BenjaminGruenbaum well consider something like defining a function in the Setup
 
That's the accepted cold, JITs 'warm up'
 
11:06 AM
and once it's cached, it's JIT
correct?
 
@Esailija I thought that it does benching for a few seconds on each, and deletes and redefines (iframe probably?) all setup stuff
 
that function needs to be reoptimized everytime a sample starts
cos it's a different function
 
i did a console.log and it did like 2 or 3 tests before the big loops
 
although that's 2 years old lol
 
11:08 AM
Oh gosh ... CSS specificity just bit me.
 
when benchmark.js creator saw that post
he went out of his way to disable optimizations in github.com/bestiejs/benchmark.js/commit/…
 
random line to jump upfront
 
@BenjaminGruenbaum I don't understand that at all
it's ridiculously counter-productive to benchmark code in unoptimized mode
because everything is like in an alternative universe where everything is the opposite
 
@Esailija so if i'm just running some jQuery tests or something, do you suggest i do it locally or something or what?
 
11:14 AM
@redline make a global function for each test
then in the test code, just call that test's respective global function
 
jsPerf doesn't automatically handle that for me with the Benchmark prototype?
 
So jsperf test cases are

test1()

test2()

test3()

and do not contain any other code
 
@Esailija I'm not a huge fan of micro benchmarks to begin with. I'm more into just writing my code and optimizing/rewriting things in a quicker way when I need to do that.
 
and the functions there are global (not defined in Setup)
 
I have to manually separate out each test case in the setup myself?
 
11:15 AM
to define global function, just write in the HTML section
<script>
function global(){}
</script>
 
oh you're not talking about setup, you're talking literally global using the HTML section?
 
@BenjaminGruenbaum, I want for i = 0 to 10 in CoffeeScript
 
yes, that's important
 
@phenomnomnominal for i in [1..10] ?
(or [1...10] depending on what you to means)
 
man that's such a pain, it defeats most of the purpose of why i'm using jsPerf :(
 
11:16 AM
what is your purpose of using jsperf, making false conclusions?
 
@BenjaminGruenbaum, yeah I know you can do that, I just don't like how it looks haha
 
to simplify my testing and make it really really easy to add and remove tests, cause that's what i do most, i tinker
if i was just going to write a big code block to do that, i could have done that myself
 
!!s/ode bl//
 
 // @phenomnomnominal
Number.prototype.times = function(action){
   var num = +this;
   for(var i=0;i<num;i++){
       action(i);
   }
}
 
it's not any different
 
11:18 AM
@phenomnomnominal if i was just going to write a big cock to do that, i could have done that myself (source)
 
5.times(function(elem){
   //rubbeh
}
 
instead of writing your code in the test case, you write it in the script tag
what is the difference in convenience?
 
@BenjaminGruenbaum Impending SyntaxError!
 
well i mean, if you write up a big test case or many many test cases, the editor sucks and it becomes instantly hard and annoying to separate out
i don't understand how that is not apparent...
 
@phenomnomnominal ...I find it odder that you looked at "big code block" and saw "big cock". And now I can't unsee it.
 
11:19 AM
yeah I don't really write code in html textareas in the first place
my workflow is just to copypaste it from a real editor
 
@Zirak Yeah Yeah, .. right back to you
 
if i'm going to use an external editor, i could setup benchmark myself and do this locally just as easily now, jsPerf was providing me a convenience, and now you're pretty much saying it's useless to me
 
@phenomnomnominal what about [1...10].forEach ?
 
setting up benchmark entirely manually is far more work
you have to write loops and Date.now
 
@Zirak, it's a gift, I know.
 
11:20 AM
and the math for OP/s
and the error margin
 
@BenjaminGruenbaum, nah, in this case I need the actual i
 
but they already have a benchmark class on jsPerf that does all that
I can just use it locally
 
Oh yeah duh.
 
@phenomnomnominal You still get it, don't you ?
 
so I still don't get the point
 
11:21 AM
but then you can't link it to people ?:P
 
But still, I just don't like how any of them look
 
@Esailija It's not too complicated for anyone who did a probability course in college :P
@phenomnomnominal Write a macro then :P
 
@BenjaminGruenbaum writing Date.now is not complicated either, the point is it's tedious
:P
 
yea well that's not my fault now, i had every intention of using it the right way...but if it's useless data and making it harder, then why the hell would i go out of my way for that and most likely mess up my tests and then they're useless anyway
 
your tests are not messed up if you just use it the way I told you
 
11:23 AM
Yeah, fuck them for making it a bit harder to get more accurate result! I want to consistently get wrong ones, so that it'll be more comfortable!
 
ok yea i'm wrong here...a testing site that separates the tests for you but doesn't implement the tests globally so you get accurate results and have to type all the tests in a single textarea to actually get the right results makes a ton of sense here...i'm just fucking crazy
2
 
haha
 
@redline :)
2 messages moved to Java
 
i know right, he's telling i'm fucking wrong here like i'm asking for something crazy
i'm using the site to simplify my testing, not make it fucking harder
 
@redline He's trying to help you :)
 
11:25 AM
Really, even read the question @BenjaminGruenbaum ?
 
yes this is actually yet another reason for making a new jsperf
I'm thinking it will have option to show assembly for each test
 
@BenjaminGruenbaum if you mean like how you help vamps, then yes
 
jspef doesn't show stdev and a lot of other info, it's near useless
 
0
Q: Upload file to j2ee spring, file is null

Anders MetnikI'm trying to upload a file to my J2eE spring backend. But if I set file required then it does not recognize, so therefor i conclude that it must be the way I try to send it from the front end. HTML definition: <form id="filesUploadForm" action="spring/uploadFile" method="post" enctype="multipa...

 
challenge accepted
 
11:26 AM
Problem is javascript
 
@AndersMetnik Either it's about Java, or it's about JavaScript, isolate on which side the problem is.
 
aka the javascript tag in the question
and why I am posting it here
 
@Esailija Updated: gist.github.com/Zirak/3373067
 
@AndersMetnik Then why is there are java and j2ee tags in there?
 
It's becoming a piece of art
 
11:26 AM
@AndersMetnik Also, what did you expect?
 
@Zirak lmao
 
Because it might be relevant to java as well ?
 
@AndersMetnik stackoverflow.com/questions/4545081/… What did you expect to happen?
@AndersMetnik doing a file upload in AJAX isn't automagick
 
almost like silly silly cousins
 
11:28 AM
This is one of my favourite lines: gist.github.com/Zirak/3373067#file-helloworld-js-L294
 
:P
 
New JSPerf:

- Easy to just quickly test something, no need to invent a title, make 2 test cases and publish
- Will do its best to make sure that your tests run in optimized mode
- Has option to show the assembly for each test function (I want this!)
- ?
 
@Zirak LOL
 
@Zirak looks a little like Crockford's code
 
agreed
 
11:29 AM
@BenjaminGruenbaum I expect that the chosen file should be uploaded, have used this another time but now it doesnt work somehow.
 
@Esailija agreed
 
Apart that you don't break the indentation with your comments
 
@Esailija Show stats, like stdev, variance, error margins, ...
 
@BenjaminGruenbaum Well the other time were with a submit button, this time i can't have a submit button
 
Just the mean ops/second isn't enough to tell if something is good
 
11:29 AM
cool
Also
Math.random() is overidden with a pre-seeded implementation for stable results
 
@AndersMetnik You can't automagically 'serialize' file uploads with jQuery, use a plugin, or write vanilla JS code
 
I assume your boss is not a programmer then
 
okay thanks :) removing jquery
 
11:31 AM
@Esailija if you do that you should make it an option defaulted to disabled IMO
 
@redline noted
 
i wouldn't overwrite anything native without making it optional and disabled by default, just for good measure
 
Reminds me of certain people. You know, those who had a thought once, 4 years ago, and since have been under the impression that they're God's gift to the earth.
 
@Zirak Except, if O[k] is not ok, then isn't that a bit like #define TRUE FALSE in C++?
 
!!c> ok
 
11:33 AM
@phenomnomnominal "ReferenceError: ok is not defined"
 
@Zirak I never had a thought yet :( I wish I was one of those people :/
 
Silly Coffee. Y U HAVE yes & no but not ok
 
@BenjaminGruenbaum I'd give anything to be an arrogant dick.
4
 
@Zirak do you need help ? How much is anything ?
 
ahaha
 
11:35 AM
@redline one problem that probably cannot be solved automatically is dead code elimination fooling
 
@Zirak who are those people ? I want to meet gods gifts some day :/
 
I found out recently that my brother believes in creationism.. I've never felt so embarrassed in all my life
 
spidermonkey and ie10 are more aggressive about it
 
@Esailija not without more regex than anyone would ever want to type
 
hi,How to select a folder using javascript?
 
11:36 AM
Any of you guys playing with OS X 10.9 website push notifications too?
 
you can't
 
the average user will see 800 million operations per second and not realize his whole code was eliminated by the compiler
 
We were talking about that and he says, "Well the earth is only 4000 years old"..
mfw
 
@BenjaminGruenbaum thanks for the help :)
I had the form data like this: var formData = new FormData(form);
Earlier, but don't know why i changed it the other way, maybe I have read something on jquery doc and misunderstood.
 
@charan you have to become a member of the anonymous elite hacker group...if you search for their page on google you can go request to be a member
 
11:37 AM
@Esailija You can warn about it, run some code at the start that benchmarks how fast it's with nothing.
 
I have tried like this <input type='file' multiple/> It is not working
 
@Neil oh my ...
 
@redline you start messing with OS X 10.9 website push notifications?
there kind of cool
 
@OctavianDamiean I thought he was kidding at first, I really did :(
 
now u dont even need to be on the website or in safari to get a notification
 
11:38 AM
@Neil Your profile doesn't precise it : Are you American ?
 
@dystroy I am American and Italian
 
An Alian ?
:P
 
But I am a natural-born American
 
@BrandonGelfand you're not going to like what i'm about to say, but i'll just quietly vomit at the mention of apple...the closest i've ever been was when my roommate was being forced to use one for work cause he had to write objective-c
 
@Neil You should have printed this and gave it to him.
 
11:39 AM
@BrandonGelfand, is that going to be in iOS7 as well?
 
@OctavianDamiean I just need an equivalent "Brother, I am disappoint"
 
Unfortunately no, I am pissed about that, that and I can't put Siri with my applications :(
 
@redline Ah, a Microsoft lover not liking Apple. I'm sure he's shocked :P
 
@BenjaminGruenbaum well i was helping him earlier and i didn't want to be rude
 
@BrandonGelfand BUT you can put Siri in your underpants! :D
That's something.
 
11:40 AM
i was talking about it earlier with florian and didn't give a crap
 
@redline lol
 
My father doesn't even believe in creationism, and he's like, hardcore tea party supporter
 
@BenjaminGruenbaum I take no offense to it, and am not shocked the least, certain things of microsoft I like, certain things of apple. I use both OS, mostly OSX though
I do have to say though, Mavericks is looking nice, no iBooks on it yet though
I wanted to read a story :/
iOS 7 is awesome too, I am loving the radio service
 
@Neil :/
 
Man I am seriously gagging over the new Mac Pros
 
11:42 AM
unfortunately my iPhone is hotter then the stove using iOS 7, some bug probably, happened with the beta of iOS 6 too
 
new rMPB when they come out, or Mac Pro...?
 
@phenomnomnominal I like the new design of em
 
@BenjaminGruenbaum here's some context: chat.stackoverflow.com/transcript/message/9920503#9920503
 
@BrandonGelfand you know what's cool? Radio applications were available even on Symbian.
 
Me too, I think it's beautiful
And it's not just for the sake of it
@OctavianDamiean, it isn't just radio haha. It's like spotify
 
11:43 AM
I am gonna go for a MacPro and get a display or something and sell my iMac
I really like it
 
@phenomnomnominal Meh, get Spotify.
 
All of those things are so bad for artists
 
@OctavianDamiean IK but its nice its built in now
 
They get like 4 millionths of a dollar per play
 
I have something of an incendiary question ... we have an existing webapp on the LAMP stack and we need to add some heavy client side stuff; is there any of the thousands of JS MV* frameworks that work best with an app that's already pretty server-side heavy?
 
11:44 AM
Siri isnt handling commands to operate the radio yet though, I think it will soon though
 
client heavy and server heavy, sounds fun
 
@BrandonGelfand Siri, taking over the world, one functionality at a time
 
@BenjaminGruenbaum sounds like you ^
 
"Siri, turn off the sun"
 
iOS 7 also has face detection i think, if I move my head the screen moves with it, lol
either tht or its my glasses doing tht, i just got em...
 
11:45 AM
"Siri, make me a son"
 
well the guy who's working on it seems to have arbitrarily chosen Backbone.js, but none of us know it so I'm just curious if there's a reason to avoid that
 
"Siri, love me."
 
"Siri, turn off the son and make me a sun"
 
AVOID BACKBONE
 
I have a new default SO answer here...
 
11:46 AM
I am gonna make a proxy server with my lights tomorrow :D Siri will be able to control em
 
@Neil even better
 
@phenomnomnominal why is that?
 
 
We0
hey guys
livequery was deprecated
 
11:46 AM
oh no
 
so now it's deadquery?
 
We0
so i would go $("#element").livequery (function(){alert("qwe");});
now i have to use "on"
 
undeadquery
 
@ExplosionPills, it doesn't really do separation of concerns very well. You end up with gross looking code, and it's not that fun to maintain
2
 
what's wrong with .on?
 
11:47 AM
aww, you have to use on
 
it has too much ryhmes
 
so sad
 
i asked siri if she loved me, she replied back "Does Apple make iPhones?"
 
@Zirak I love the "Ctrl-C Ctrl-C" :D
 
I called siri a bitch and she said that, that was uncalled for
xD
 
11:48 AM
@CapricaSix, Make me a sun.
"Siri, I'm drunk." - "Let me call you a taxi."
 
We0
what event i when element becomse live
so $("#the_element").on("what Event?", function(){alert("qwe");})
 
@phenomnomnominal from looking at it I wasn't too impressed, although it seems to be very popular. The whole $(el) and building HTML strings in the JS code with views just seems .. wrong to me. I'm not used to client-heavy apps at all though. Do you have an alternative recommendation? I've read Ember.js is good, and I've done some work with Handlebars (I like it
 
Holy crap, my Phone just flashed screens and restarted
xD
After i told her i was drunk
xD
 
We0
hello
 
@jAndy should be this
 
11:49 AM
I think she is f;ing with me
 
@We0 RTFM
 
We0
what on event is the equilavent of live
 
oh, I guess I didn't understand what .livequery did
 
!!/tell We0 jquery live
 
We0
11:49 AM
rtfm?
 
@FlorianMargaine nah thats old and too insulting anyway
 
On there it tells you how to replace it.
 
@We0 Speak proper english so I can understand ur question
lol
 
@BrandonGelfand *your
 
11:50 AM
Lol ur question
 
thank you @JanDvorak ....
 
!!urban rtfm
 
@FlorianMargaine [RTM](http://rtm.urbanup.com/2577122) Release To Manufacturer
In computing, RTM means "release to manufacturer." It usually refers to a "final" version of software that the development company releases to the manufacturer for CD / DVD pressing. Can also loosely mean the "final" version of any particular piece of software, regardless of medium, and may also refer to hardware, depending on context.
@FlorianMargaine [RTFM](http://rtfm.urbanup.com/357542) Read The Fucking Manual
 
@BrandonGelfand ^
 
Brandon aren't you like 14 what are you doing getting drunk son
 
11:51 AM
IDC I can talk retarded, its 5 am and I haven't slept in two days.
 
We0
$("a.offsite").live("click", function(){ alert("Goodbye!"); });
what is the click event
 
this room is getting crowded
 
We0
for when something goes live
 
@BrandonGelfand it's*
 
!!tell BrendanGelfand ultimateinsult
 
11:51 AM
 
@Gacnt my parents don't have a lock on the liquor cabinet :D
 
That thing just misspelled my name....
how do you f that up?
 
MutationObserver() will be the replacement for mutation events and its already well implemented across modern'sh browsers
 
@We0 $(document).on("click", "a.offsite", function(){ alert("Goodbye!"); });
 
11:52 AM
@FlorianMargaine huh, I'll see if I can make it so two commands were sent by the same message, in a very short time distance, only the later ones will be taken. You can already execute several commands in a message, so it shouldn't be a problem (for the user)
 
God, it shouldn't be that hard to link an image nowadays
 
@Zirak cool
@Zirak don't you have more important goals in your life?
 
No. You're the only reason I'm alive.
 
Lollllll
 
So does this room have a preferred JavaScript MV* framework?
 
11:53 AM
You're my sun, my stars and my dreams. You're my snickerdoodle.
 
!!/google snickerdoodle
 
LO FUCKING L
 
@JanDvorak U having fun correcting my grammatical errors?
It is txt talk deal with it :D
 
@BrandonGelfand *are you
 
11:54 AM
!!/mute BrandonGelfand 2
 
@OctavianDamiean Please give mute duration, see /help mute
 
I wish I could be so cool and tough like Zirak :(
 
@Zirak how does it feel to be u
don't say old :P
 
@OctavianDamiean Muted user 1762305 for 2m
 
11:55 AM
Pretty fucking A.
 
@BrandonGelfand We no liek text talk, deal with it.
:D
 
we use Zirak's MV* framework
 
What was the unmute command? unmute?
 
@BrandonGelfand I do, and I started when you requested proper english from We0
 
You can find the source here gist.github.com/Zirak/3373067
 
11:56 AM
Correct
 
!!help unmute
 
@OctavianDamiean unmute: Unmutes a user. /unmute usrid
 
!!unmute 1762305
 
@OctavianDamiean Unmuted user 1762305
 
"YOU DICK Y U NO PROVIDE EXPRESSIONS AM I TOO FAT NOW FOR " +
"YOU AS WELL!?!?" Lol
 
11:57 AM
Ok, I am sorry
 
@Esailija I forgot about it :D
 
WOW, it actually works :-)
2
 
@ExplosionPills, maybe angular
 
I hate it when you people teach me lessons, although they do sink in.
 
I know this is blasphemy and madness, but I hate the code styling there @Esailija :p
 
11:57 AM
"WHY ARE THERE NO UNIT TESTS?
WHY IS YOUR AGILE DRAWING BOARD BLANK!?
BLANK I TELL YOU!
YOU UNGRATEFUL PIECE OF MOTHERFUCKING TURDWAT
I GIVE AWAY MY LIFE TO GIVE YOU AGILE CARDS, AND THIS IS HOW YOU REPAY ME?"
ahahaha
absolutely perfect
 
@phenomnomnominal thanks; I'll check it out
 
throw new TypeError( 'PPPEEEENNNNIIIIISSSS' );
 
@redline where is that from? @JanDvorak please don't correct me...
 
@pheno I fall for you more and more each day
 
it is the best MV* framework, amazing design patterns
 
11:59 AM
Esailija's link to Zirak's Git a few messages ago
 

« first day (969 days earlier)      last day (3995 days later) »