« first day (1039 days earlier)      last day (3907 days later) » 

11:03 AM
so I just need to adjust the variable initialization
 
you need to edit my test so that it doesn't throw
I expect after a call to concat or push, that length is 5
 
@BenjaminGruenbaum That's the typical Austrian bread.
 
@Florian I bitched about the light as well
 
I'll just bring the variables into the testcases
pretty even now
 
@jAndy I read that as testicles. :/
Was quite confused.
 
11:05 AM
thats scary :>
 
Why u thinking bout those jNuts
 
problem is now that the array creation can eclipse actual differences, although I am pretty sure it doesn't
 
@rlemon could you already convince your boss that it's a good business model to let you play BF3 while in office?
 
that test is still buggy @jAndy
 
the
 
11:06 AM
I got 7% variance in the results for push, which is huge
 
game
@Octavian nay, I'll work on it today
 
LOL nevermind
 
@Esailija I actually expected push to be much slower
 
I was looking at wrong %...
 
but variance is not good at all of course
oh okay
 
11:07 AM
@jAndy it could be, the array creation can eclipse the relative differences
like lets say I want to find the performance of semicolon (ok this is bullshit in the first place)
and I write in the test code call to jQuery.html()
 
the battle field 3 game is pretty bauce.
 
The hell you guys talking about? Sounds almost like rocket science ...
 
then that call will eclipse any relative differences and show same results
 
Kerbal space program?!
 
like say, you can call html 5000 times per second
but you can call something else 5 billion times per second
 
11:09 AM
semicolons can actually make huge impact on performance
 
and something else 50 billion times per second
if we add the 5000 times per second to a test that is comparing 5 bill vs 50 bill
 
@Esailija yea, but.. the variance / "eclipse" for variable instantiation should be around <1%
 
we will actually see that they are almost equal
instead of the 10x difference
because the relative difference was eclipsed
making a new array object is non trivial code
(that is when the contents are shared)
 
@basti1302 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.
 
returnSlowFunction()
(1 + 2) * 3
 
11:11 AM
I hate Hollywood for making me angry when I hear the word eclipse.
 
but why are you expecting push to be much slower
 
@OctavianDamiean not Bonnie Tyler?
 
0
Q: Converting a JavaScript Module into Lua executable code

MustafaThe JS file that I'm trying to convert it into Lua is found here: http://praytimes.org/code/v2/js/PrayTimes.js You can tell from Lua code I wrote that I'm not a Lua expert but this is as far as I can go and I'm sure I have made something wrong here and there: http://pastebin.com/6BpC0ZPB it is...

 
btw the call about jQuery.html is true story
actually it's many true stories
people doing microbenchmarks and adding call to jQuery.html
has been happened at least twice
 
@Esailija because of the invocation of apply which is necessary to accomplish the specific result
.apply() is still implemented pretty purely in most engines, including v8
same story for .bind()
 
11:13 AM
push and concat are both built-ins in v8
 
I guess its around 20x slower than .call() or somewhere around that corner ?
 
if you add .call to something it can be 1-100000x slower
it cannot be predicted
if the function could otherwise be inlined, .call makes that not possible
 
@JanDvorak Thankfully I don't know her song. Just googled that there is one.
 
not talking about push or concat, .apply should be the bottleneck
 
@OctavianDamiean the literal video version is great, though
 
11:15 AM
thats why I would have expected .concat() to be way more superior in this specific situation
but its almost even, which is strange
 
there is nothing about .apply that makes it shit that wouldn't apply to .push and .concat in the first place
 
!!youtube bonnie tyler total eclipse of the heart literal video version
 
they are both builtins which cannot be inlined
 
only very small amount of builtins will be inlined.. like Math.pow
or charCodeAt
.apply or .call will show a 1x - 100000x difference in situations where it is used on a function that could have otherwise been inlined
but .push couldn't be inlined in the first place
 
 
foo can be inlined because it is userland function
I will show what I mean in the other jsperf
 
My entire car is full of boiled egg now ...
 
user1125394
@JanDvorak random lyrics generator :)
 
still much slower @Esailija
.apply is the sux
 
@cx nope, music with lyrics changed to match the video
s/match/mock/gf
 
11:21 AM
funny part ? .call is actually faster than a direct call
lol ?
 
where the "f" flag stands for "future"
 
@jAndy maybe it's because call bypasses context resolution
 
Oh god, who posted that jsperf article yesterday? I lost the link
@Esailija was that you?
 
@TomDwyer 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.
 
11:22 AM
@jAndy I said 1-100000x
 
@OctavianDamiean yeah
 
that is, they could be the same or not
but look at my jsperf
 
Want to repost it pretty please?
 
you can't judge .call .apply that way at all
the dynamics are incredibly complicated
 
11:23 AM
it's like testing semicolon performancce
completely useless
 
I'm not convinced, in all situations so far .apply was significantly slower than anything else
worse with .bind()
but I'll keep it in mind
 
@BenjaminGruenbaum Ah great! Thanks.
 
for example, v8 recognizes the pattern .apply( this, arguments )
 
cool
 
it is even public knowledge from a presentation
held in 2012
 
11:26 AM
you're basically saying any performance penalty only happens because of inlining code or not ?
 
not only because
but the results of inlining can be massive
(it has nothing to do with removing function call overhead)
it has to do with the fact that the inlined function body can be now considered as part of the function that is being optimized
otherwise it's a black box for the optimizer
 
complete with loop unrolling and stuff
 
"it's like testing semicolon performancce
completely useless"
LOL
I like that
 
@JanDvorak there is no loop unrolling in v8 though :P
it's such a minor optimization that JIT should not waste time on
 
@Esailija uhh... what?
not even if the loop count is known at compile-time?
 
11:31 AM
it is incredibly minor
in loop unrolling all you are doing is saving not having to do the check and increment so much
 
@Saurabh 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.
 
@Esailija if I loop around three times, then not unrolling that costs me one or two branch mispredictions
 
@CapricaSix ok
 
ok?
Lol
 
what do you mean loop around
 
11:33 AM
1
Q: What is the best way to use AJAX?

CarpetfizzI'm really interested in AJAX for creating modern web applications. However, whenever I read about the term it is used pretty abstractly. Of course, since it is a way of using Javascript, I can only expect it to be abstract. With that abstraction comes some confusion. There's so many different wa...

 
for(k=0; k<3; k++){/*not writing to k*/}
 
Afternoon!
 
oh you mean tiny loops like that should be completely unrolled?
 
yep
 
I was thinking what CLR did
let me find the link
 
11:35 AM
with the body being 9 lines of float fused-multiply-add and dereference
 
fucking SO is down?
xD
 
no?
 
@Feeds I hate how mystical "ajax" is.
 
5
A: for-loop performance oddity in .NET x64: even-number-iteration affinity?

EsailijaWell here are the disassemblies: 00000031 xor eax,eax for (var i = 0; i < 1000000001; ++i) 00000033 inc eax 00000035 cmp eax,3B9ACA01h 0000003a jl 0000000000000033 0000003c movzx eax,byte ptr [rbx+18h] 00000040 test eax,eax 00...

finally
@JanDvorak I was thinking about loop unrolling like that.. would be very wasteful in JS for the JIT to do that
 
How can i concat javascript variable to a image src in designer code? (asp.net)
 
11:37 AM
CLR only JITs once without any runtime information
 
@Zirak Did you know what AJAX was made out of unicorn hair originally?
 
it's totaly different from how V8 works
(since doing that to javascript is impossible in the first place :D)
 
Later they decided to write it in jQuery instead.
 
actually, jQuery is woven from unicorn hair strengthened by adamantium fibres
the so called Google Fibre
 
hehe
adamantium, you made it wolverine stuff :D
Immortal
 
11:39 AM
OH MY GOD!
Did you guys read that AJAX question feeds posted? :D
 
Isn't it also an Adamantium alloy?
 
You totally should.
 
early versions used mithril instead, but it didn't flex enough
 
> There's so many different ways AJAX is implemented, and used with a variety of other languages such as Python, PHP, XML, Json ...
 
Adamantium doesn't exist
 
11:40 AM
WAT!?
 
I've been here for like 5 minutes and heard some of the best quotes ever
"jQuery is woven from unicorn hair strengthened by adamantium fibres"
 
@Mr_Green they say the same about unicorns
 
hehe what is this with unicorns
I heard that word in Harrypotter
and it is also a bike name here in India
 
@Zirak You retard, you thought "mythril", why did you write "adamantium"?
 
@TomDwyer Oh you're new here? I'm bound by law to warn you of the potential latent damages you may suffer from if you stay here.
 
11:43 AM
llooool
I use Neowin for everything.
 
@Mr_Green A "unicorn" is corn with a unicycle.
 
Obviously.
 
k thanks zirak for helping me out :D
 
Do people actually never bother looking up technical terms and acronyms?
I mean seriously, he's talking about AJAX and then mentions Python and PHP in the same sentence.
 
loool
 
11:46 AM
@Krasimir 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.
 
Because I bet he'd be surprised if he does.
Anyway, commented.
Like, what exactly are you asking, because AJAX is just an acronym for asynchronous JavaScript and XML, so asking about implementations of AJAX in Python and PHP makes close to zero sense. — Octavian Damiean 1 min ago
What a horribly outdated term if you think about it ...
 
It's a horrible name to begin with. Completely hides what it actually is.
 
Well, AJAJ r sounds like you are anxious for AJ's attention
 
We could totally rename it
 
11:54 AM
@Zirak the HTTP API might have been nicer
 
0
Q: Make StackOverflow Explode (bookmarklet)

FakeRainBrigandSometimes people get frustrated on the StackExchange network (specifically SO). Your task is to create a bookmarklet that causes StackOverflow to explode/implode/destroy in some fashion. This will provide a nicer way of dispersing our frustrations. The rules it must be in the form of a boo...

 
JSHTTP or something, less catchy though
 
We could just rename it to HTTP request ... oh wait ...
 
@IngvarSnow 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.
 
"XMLHttpRequest" is a bit better, but the "XML" part is also misleading. So...why not "http request"?
 
11:55 AM
NO, acronyms are all the rage
 
Hr?
 
@Zirak What's wrong with request ? request.create("/resource",{type:"GET"}).send().onload = ...
 
HR.
There acronym.
 
NOT FLASHY ENOUGH
 
UHR
Unicornic HTTP Request.
 
11:56 AM
The constant influx of AJAX atrocities, and their punishment, was prophesied in AJAX 25:17
 
AJHR - asynchronous javascript HTTP request
 
Lowercase r makes it look less like "human resources", and fits the weird chemistry memes floating around.
 
I like how jQuery handles promises, I like it even better in how Angular handles resources
 
11:56 AM
i agree that the asynchronous is important
 
How else would you do I/O?
 
AJHR isn't pronounceable
 
JAFHR - Just a Fucking Http Request
 
well, you can do synchronous AJAX requests
 
Pronounce it like Jafar
 
11:57 AM
hahah
 
POHR
 
Love Zirak's version.
 
plain old http request
 
request.create returns a new Request object, which is also a promise (so you can use .then and stuff), has events like load and error so you can use events, and has .get() which returns an empty object to later be populated with the request content.
That satisfies pretty much everyone.
 
How about HIITY - HTTP IS IT THERE YET?
 
11:58 AM
@Paul you're trying too hard.
 
var r = Request.create("www.google.com").get();
object.textContent = r; // will update the text content when the request is done.
 
Server Url Client Kall System?
 
That's impossible afaik with normal JS, but in Angular that's how it's normally done
 
And Angular is abnormal JS!?
Like totally funky hipster JS or what?
 
12:00 PM
Yes, it is.
What I meant by "normal JS" is "the native DOM API without the proposed data binding extension, in a single assignment"
 
@OctavianDamiean Angular has privileged access to browser API that normal code is not allowed to call
 
Also that ^
 
Zinc Induced Request Activation Krumbs, or ZIRAK. I fully expect it to catch on.
 
It's built into Blink
 
So what does it use that for?
 
12:01 PM
@Paul trolling newcomers mostly.
 
Also to give away your code to the NSA
 
Not my code, my precious javascript codez!
 
it's worse. It opens a persistent connection that even survives temporary power downs
 
don't forget the cookie it stores in your brain for advertising purposes
 
12:04 PM
at least, that's what zara... err... zirak said.
 
I suggest at least 5cm Al or Cu plate between the house paneling and the wall studs.
 
note to self: Don't get on chat.SO when surfing on your laptop in public places, people will not understand why you are constantly laughing.
 
Check the ground connection because sometimes an agent will pull it out at night.
 
@Paul that's useless if you also have windows or doors
 
I was going to answer a question to try to go over 2k, then I read this:
0
Q: javascript random image with "undefine"

user2699714When I apply the following script, it randomly appear "undefined" in output. I've checked and it should be caused by the javascript. May I know what may be the error? <div id="changeImgNews"></div> <script language=Javascript> var countNum = <{$block.countNum}>; var checkRepNews = 1; var ranNu...

 
12:06 PM
You just need a mesh for the windows and doors, like on a Microwave's window.
And besides, you should still be wearing your tinfoil hat.
 
@phenomnomnominal Oh my.
 
@Zirak I don't want to live on this planet anymore
 
@Paul no, you need four meshes, one on each side of each glass pane
This would gain me a nice answer on code review for sure. So much to fix. — Jan Dvorak 55 secs ago
I resisted the obvious acronym
 
Time for B-B-B-BACON.
 
stackoverflow is drowning in bad questions ! And anwsers ! stackoverflow.com/questions/18334421/…
 
12:12 PM
@Blowsie Oh my goodness, this is completely new! Up until now everything has been pristine!
 
@Zirak true, but its making me want to give up helping others
 
lmao
 
that code is formatted beautifuly.
he should get a medal for it.
 
@TomDwyer this is after an edit
 
12:18 PM
LOLWUT
 
12:38 PM
WUTLOL
 
@asifa 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.
 
hi
can someone please help with this stackoverflow.com/questions/18335279/…
 
@EgorKonovalov 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.
 
12:58 PM
How come box-shadow is the only CSS property that doesn't support like individual values like box-shadow-blur?
 
because W3
 
@asifa your in the Javascript room my friend. Try the PHP room
 
@MostafaAdly 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.
 
wat!
 
@MostafaAdly she's a bot.
 
1:06 PM
@Connor sh...
 
@MostafaAdly Only joking. How would a robot know your name? that's just dumb
 
I am a robot and I also have a name
roboception
(ง'̀-'́)ง
4
 
@Esailija Wow, just wow...
 
codepen.io/rodaine/pen/KmyAG not as clean as it should be
but <3 because... well...
is awesome
 
1:19 PM
It's kind of scary that Node.js doesn't parse the method of HTTP requests correctly.
 
@rlemon Is that supposed to be soap?
 
If it doesn't even do that, I don't want to know what else it is doing wrong... xD
 
@rlemon nice man! But the first rule...
 
@mikedidthis I always suspected you were bitch tits bubba
 
1:23 PM
@mikedidthis And the second.
 
@rlemon what can I say, I am open to my feelings. Plus titties are always bonus.
 
posted on August 20, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Hey Coloradans! My favorite astronomer/nerd dis aficionado, Phil Pla

 
holy wow, that comic is awesome.
 
@BenjaminGruenbaum you around ?
    <div ng-app="pixter">
        <Authorization></Authorization>
    </div>
 
dem bots! @Connor
 
1:32 PM
var pixter  = angular.module('pixter',[]);

pixter.directive('Authorization',function(){
	return {
		restrict:'E',
		link:function(scope,element){
			console.log("woot?");
		}
	}
});
any idea why this fails ?
 
@Darkyen Maybe the capital letter
 
could be
 
@Darkyen Just a guess, because it uses camel case
 
@Connor yeap it was that... wtf moment for me but okay
 
@Darkyen cool
 
1:36 PM
@anvoz 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.
@HarshalMahajan 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.
@ChonneOfthedead 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.
 
join-spree
 
posted on August 20, 2013 by Peter Beverloo

1,621 commits were made by 417 authors to the Blink, Chromium, v8 and Skia repositories last week. Within Chrome DevTools, work continues on implementing the new Layer panel. The <Cmd/Ctrl>-<\> shortcut has been added as a shortcut to pause and continue the debugger. Mike has been busy with improving messages shared by Blink for errors […]

 
When I clone an image element, the browser sends out an HTTP request to obtain the image data again. WTF?
 
@DMase05 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 doesn't the request size come in as 0, due to the img already being cached?
I am more than likely mistaken.
 
1:43 PM
nope. It sends out a full-blown HTTP request and gets a full-blown 304 not modified response. I'll check in fiddler, though.
 
@JanDvorak I still think it will use the cached copy iirc.
 
@mikedidthis sure, but the CDN won't be happy
 
@JanDvorak true true.
 
Right, and when I tell y'all that browsers do that, no one listens.
 
@OctavianDamiean but whyyy?
 
1:47 PM
@OctavianDamiean I listened, well I must have done to remember that!
 
That's something that you should ask the browser implementors.
 
in PHP, 4 mins ago, by Gordon
Java is the same as JavaScript! Thousands of tech recruiters can't be wrong.
LOL
 
canvasContext.drawImage(img); newImg.src = canvas.toDataURL(); tee hee
 
@BytesOracle 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.
 
1:51 PM
Can someone please explain what this does?
url = url.replace(/^\s+|\s+$/g,'')
 
@rlemon cute, genius, I love that. Compatibility sucks, though. But, there's an issue with the image being cross-domain
 
yea
 
@user784637 It removes leading and trailing spaces.
 
Ah thank you
 
/^\s+|\s+$/g
well the first and last // just tell you it is a regular expression literal the 'g' at the end says match global. ^ at the beginning says "from the start" \s is space and + tells you any number of them. the pipe says match either side of it. and the $ at the end says start from the end of the string.
@user784637
 
1:55 PM
I'd rather avoid image element pooling
 
How do I convince my boss that we need another web dev?
 
quit
 
lol
naaah
 
@IvoWetzel "Generic sourc and documentation parser for JavaScript"
missing an 'e' on source
 
@Neal You should answer, "I can poop while I pee, but that doesn't make me a better developer."
 
1:57 PM
@OctavianDamiean doesn't everyone
 
@rlemon Not sure, I thought I'm special because I do.
 
pooping and peeing are like drinking and smoking. I can smoke and not drink, but I can't drink and not smoke.
 
@OctavianDamiean ha
 
@rlemon also, when i'm done drinking i try my best to squeeze off a little smoke one last time
 

« first day (1039 days earlier)      last day (3907 days later) »