« first day (1712 days earlier)      last day (3461 days later) » 

05:04
@AwalGarg Not bad at all! If every language I learned should not die, we'd be in a very tough world. Like drawing with Logo.
I have a doubt
so wasm is similar to javascript.. I mean a client side script language.. right?
@Mr_Green web assembly? no way!
I am reading the 13 starred link here. most of the parts are going top of my head
It is specifically not a programming language. It is binary bytecode. Like the machine code generated by assembly. Assembly is the language. Machine code is not.
maybe because I am not from computer science field
05:08
it should be a binary and compilers and transpilers should generate that unique bitcode
can someone please tell me the shortest differentiation and understandeable of wasm and js?
@Sheepy My first language was Logo
@Mr_Green you write code in some (likely statically typed low level language like C/C++), then pass it to a compiler like emscripten, and it converts it into "bytecode" called wasm. browsers can interpret that wasm code.
I don't know about the future of wasm. If Chrome could do without bytecode (so to speak), I am not convinced the parsing time is so important out of benchmarks that we need a new bytecode.
this is basically a simplification of what happens
05:12
@Sheepy You're thinking about it wrong. Put it into the context of hardcore data-crunching and webGL-type stuff and wasm makes a whole lotta sense
@Mr_Green Let's see. JS is the code. Something turns it into exe (wasm). Browser runs the exe.
@AwalGarg so browsers can understand js as well as wasm then..
@Mr_Green yes. but unlike js, you don't write wasm directly.
a compiler writes it for you.
ahh got it thanks awal
Imagine Java applets, except not shit
05:13
@monners wasm should not affect runtime performance, should it? I had the impression that quick parsing and high compression was the selling point.
@Sheepy asm brings runtime performance. wasm adds quick parsing to it.
so both of them, yes.
So, wasm is a new feature or was it already?
A proposed feature.
@Mr_Green it is way too much in alpha. hardly any implementation right now.
so still in draft?
ohh ok
05:14
Worse than draft, I would say..
But getting close.
what alpha?
@CSᵠ there are two prototypes described in Eich's blog post.
When programmers say "alpha", they mean "it kind of works for a certain, limited kind of working".
Which commoners would translate to "it doesn't work".
exactly
I think that would be awesome, having wasm
05:17
offtopic: commoners can translate pretty much all the things to "it doesn't work". linux installation media didn't boot? linux doesn't work!
Not really, if you ask me. It is something the browsers are already doing. Problem is each browser is doing it differently, so we are adding a new system that they need to 100% agree on and which they can survive without.
(Because the browsers would not change what they are doing now)
!!xkcd standards
relevant
This xkcd appears so frequently in this room that it has lost its entertainment value to me sigh
05:19
but it is sooo much true! :P
(cry)
add a zero to each of those numbers :)
@CSᵠ won't work
A zero? Our life is closer to two zeros.
why?
05:21
@CSᵠ 140 standards + 1 !== 150 standards :P
and there can't be 10 universal standards :P
140 + 10 (each!)
</nit>
:))
I used to list on my resume the apis, libraries, standards, etc. that I used (and still remember). I gave up when, in a revision some years ago, it reached three digits midway.
05:22
but yea, would be strange developing ten standards :))
Yeah, ten standards just won't cut it. We need thousands.
of course!
finally !!! someone who understands
we need exactly 42 standards duh
42 living standards.
that's only if someone asks a question about the number of standards
how many extra standards do we need? 42 !,,, how many standards should there be? 42 !,,, where is France? 42...
05:26
I was shocked when I learned that most web devs don't know HTML5 is not HTML version 5. Not the one that the browsers implements. The implemented one is just HTML, Living (no "5" at all).
And it is indeed living...
and breeding
And bleeding. Yes. That is a good one. :)
Tonight I dine on sweet, sweet alpaca meat
05:43
This is my second 10 minute stab at C and this time I am liking it.
06:00
@SomeGuy you around?
@AwalGarg Why C!?
@Neil want to learn a low level language to understand the shit I use.
I suppose that's a fair point
well put
also the php-src is written in C and I want to contribute
06:02
Though I have a hard time thinking of a scenario for using C over C++
That's one such scenario though :P
@Neil microcontrollers
"Because I have to" is a reason to use C, but not necessarily a reason to learn it in general
It is all quite low level in C++ anyway though
I have no desire to learn C
At least you can write classes with C++
The whole OOP thing appeals to me, even if it has faded from fashion these past few years
@SomeKittens What's up?
06:05
@SomeGuy you do big data 'n Python and such?
I try to learn, yeah
@SomeGuy Will you be around this weekend? I need an "AAAHHH I DON'T KNOW WHAT I'M DOING" guy
Yeah, I probably will, but I can't be sure since I've got my vacations
Regardless, it's not like I'm particularly good with those things. I'm still trying to learn, as I said
Just warning you :P
How hard could it be? Input/Output. Bam! Done. Next?
vamping the python room is usually fruitful
Those look interesting
i am converting an application from global scope to use browserify,I have a question regarding the use of lodash,the application has lodash chains everywhere,should i import the entire library or just smaller modules
Frontend for re:dash is all Angular \o/
@vamsiampolu you should require it in every file
any way to stop video autoplay in chrome, already tried with autostart, autoplay false jsfiddle.net/w7tamtef
@nlper 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.
06:21
yeah, @SomeKittens I have gone crazy ever since i discovered _.tap and _.thru,my chains just get longer and longer,also do i need handlebars.runtime.js if i use hbsfy??
@nlper You cannot, if it is an iframe.
@SomeKittens yesterday's idea of setting the profileId in a service worked fine. :) thanks.
@Sheepy thanks, is that chrome related issue?
@argentum47 glad I could help
@Tushar that's not a good question for SO
06:25
@nlper Nope. You don't have control over non-html iframe, in any browsers. Checkout <video>.
@SomeKittens Can you explain why?
It's too broad.
@SomeKittens Something I can start with, tutorials newsletter books, etc
@SomeKittens is there a module for making requests that uses promises?
@Tushar Google's got tons
@vamsiampolu In Angular, or in general?
THE
THE
06:28
var myNameSpace = {};

myNameSpace.Utils =   {
          a : function () {  // do something... },
          b : function () {  // do something... },
}

window.onload = function () {
            myNameSpace.Utils.a();
}
    _.flatten(vm.grouped_profiles).forEach(function(profile) {
      if(data.id == profile.id)
        profile.hidden = true;
      return profile;
    });
THE
THE
why it isn't calling my function ?
previously this was updating the view, now this doesn't work .. XD
THE
THE
for this,

myNameSpace.Utils.a();

it's not calling it, without any error
@SomeKittens in general,not using angular,if i was i would $q.when($http.get...)
06:29
15
Q: How do I promisify native XHR?

SomeKittensI want to use (native) promises in my frontend app to perform XHR request but without all the tomfoolery of a massive framework. I want my xhr to return a promise but this doesn't work (giving me: Uncaught TypeError: Promise resolver undefined is not a function) function makeXHRRequest (method,...

@argentum47 Use triple equals. Not that this will solve your problem, but it is good habit.
for TypeSaftey!! ok
THE
THE
these namespaces are ignorantly confusing
I need some help on mousedown/mouseenter events - JSFiddle
Right now clicking the grids will paint/remove them, but I want dragging to work too.
Guys nevermind I'm stupid. 'mouseenter' should be 'mousemove'
06:48
Just curious, how much time will it take to have all es6 features in chrome and firefox? (approx.)
THE
THE
@SomeGuy 7 years
months or years?
No, 7
THE
THE
decades Oo ?
06:50
score years?
milliseconds, seconds, minutes, hours, days, weeks, fortnights, months, or year?
what is the unit for it?
I am presuming as months though
you forgot seasons
06:54
can dirty checking thing be achieved with Object observe!
hey
why this one is not working
1 message moved to Trash can
@winresh24 Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
if(document.getElementById('villa-check').checked)
    {

       $("#land-form").addClass("land-hide");
        $("#area-form").removeClass("land-hide");
    }
    else if(document.getElementById('land-check').checked)
    {
		$("#area-form").addClass("land-hide");
		$("#land-form").removeClass("land-hide");

    }
Morning
I have a question. How can I access PHP function when I fire an AJAX request ?
@winresh24 Nothing looks suspicious in the script... check the rest of you code, like id and class names?
07:04
Hello
@Mr_Green firefox already implements most of the stuff, nightly has classes as well. I think only the reflect api and polishing of error messages etc. is left. and some debugger work.
the __nosuchmethod__ and other spidermonkey specific stuff might be removed later on
ok what about chrome how much time will take approx?
no idea. chromium is pretty closed and I don't watch it's development. they are working on some turbofan thingy right now.
chromium is only technically open source.
@ZahidSaeed Call the function in the ajax's target PHP script.
hello guys i need help in removing class of a DOM element when using .each()
07:13
@Mr_Green As long as the V8 team want to take. They do not implement asm.js optimisations, they are the last to migrate DOM to prototype chain, they say implementing es6 make V8 slower and disable it by default. Go figure.
@PreetiMaurya And the problem is?
I am asking here because the current project which I am working on needs to support only chrome and firefox
it took them 4 ship-revert iterations to implement arrow functions.
there might be rows of same class-name but when I use each() I use $(this) to find related other classes
Although the v8 api and some internal debugging facilities are quite strong in comparison to spidermonkey
@Mr_Green just use jspm with babel
suppose my calculation and everything is right then I want the class to be removed in only that row.. but isn't happening so right now
07:16
@Mr_Green I am not optimistic that Chrome will finish and enable ES6 this year. It is possible, but I will definitely not count on it.
@MadaraUchiha ?
@BenjaminGruenbaum Choke on node_modules
(At least it did for him)
Not here it doesn't
maybe it is windows choking on a super nested long path
any help her @sheepy @mada
07:18
@PreetiMaurya Sorry I don't get the "I use $(this) to find related other classes" part.
@AwalGarg jspm is just an module loader right? not es6 compiler..
@MadaraUchiha I don't think opensource.stackexchange is going to be big, the direction it's being taken (licensing) is pretty uninspiring.
or am I wrong?
@PreetiMaurya Please don't ping random people begging for help.
!!welcome PreetiMaurya
@PreetiMaurya 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.
07:18
@PreetiMaurya And don't say "suppose my logic is correct". If you are seeking help, chances are it isn't.
@Mr_Green es6-module-loader is a module loader. jspm is a package manager with hooks for transpilation, bundling and minification.
@PreetiMaurya So... can you rephase your problem? What are you trying to do?
@MadaraUchiha I don't think I'll participate in that community, I don't think they figured out what they want from it.
@PreetiMaurya create a short simple fiddle on jsfiddle.net illustrating the problem with minimal code
How can I print specific number of characters and then replace the others with ...
07:22
okay sorry .. will be back with a fiddle link
@BenjaminGruenbaum Of course they haven't, it's been less than 24 hours
Give it time through public beta for a little while
For example: I want to replace "This is a very long sentence" with "This is a ver..."
How do I do it ?
@ZahidSaeed You use CSS and not JavaScript
But how ?
!!tell Zahid mdn text-overflow
07:23
Any example ?
@Jhawins im good, im married though! that scares me!
@ZahidSaeed Not specific enough. What are you trying to do?
Thanks I got it now :)
07:25
but @Sheepy is right. please state the context as well next time.
for instance, if you want to do it server side (maybe store the data in a db), css won't help
@AwalGarg The answer in that case would be "don't do it"
You save raw data in your database, you apply manipulation on your way out.
Well, it would still be server side if it is long to short like article summary. Apparently it is not.
@MadaraUchiha yeah I just meant to tell him that he needs to be more specific...
@Sheepy Why?
@ZahidSaeed str.substr(0, stringLength).concat('...')
07:27
Why do I care about the length of the article? Why would I want to cut it server side?
Just paste the whole thing on the front page, and use text-overflow: ellipsis
if you want to provide a summary maybe :?
@MadaraUchiha but that uses a lot of time and cycles in comparison
@MadaraUchiha If the article is 10k words, and you want to display the first sentence of 20 articles, when you do it on client side (CSS) you would be pumping 200k words to the client only to display 20 lines.
@Sheepy And when you don't, you'll be wasting your time and cycles to handle all the edge cases of sentence ending, word ending, punctuation, whatnot
At the very least, add a "summary" field to each article, and do it by hand.
It would be easier for everyone, and make for better results.
(Like fonts look very bad bolded or italicized if there isn't a specific font version for those variants)
@MadaraUchiha If it is a new system and the requirement is known early, and the client is happy with copy pasting summary, sure.
07:32
@MadaraUchiha also just default to the first n characters normalized when no summary is provided
> 42 ways to die....(t successfully)
Anyway, my point is, code is there to serve people. We aim to do it the simplest way possible, but we must weight the cost.
Yeah, I can totally see that working out.
JavaScript can't parse English
It cannot successfully determine when is a good point to cut the word/sentence
And if you try, your head will hurt.
Developer time and cycles cost more than CPU time and cycles
07:34
Guys but text-overflow is not working with td :(
@ZahidSaeed Well, that's because if you need text-overflow on a td it probably means you want something other than a td
@MadaraUchiha But you are not wasting CPU by making humans write summary. You would be wasting user time.
@ZahidSaeed use max-width property
somewhere some random programmer sitting in a dark office room would have figured some method to solve this through when his manager would have said "oh you did it, cool. now tell me why this android app is not working on my lumia".
here is the link.. what I need to do is on a json success the selected quantity which was used or sent in the jQuery each() only should have its class 'changed' removed. Currently what's happening is it removes all
07:35
or maybe min-width also works
@Sheepy Yes, but the user has an interest to write that summary, to provide an ultimate experience.
Now let me ask you this
What happens if I want a fluid width for my article boxes?
|The quick brown|
|fox ju...      |
@MadaraUchiha Are we assuming a responsible user who have and is willing to spend the time and brain juice here?
vs
|The quick brown fox ju...                                                |
Do you see the problem?
07:37
Not really. The text is the same. Looks like layout problem which is strictly CSS.
@Sheepy I would want more of the text to fill the box if it's wider.
And less if it's narrower
Responsive layout, I get it now.
isn't it by default?
How do you handle screens with increased text size?
How do you handle mobile?
How do you handle 5k screens with insane resolution?
5k?
07:38
I'm not saying you must answer for all these cases
isn't 4k enough today?
it didn't even reach mainstream
@PreetiMaurya replacing the selector with this doesn't help?
@MadaraUchiha stiil it doesn't make sense to send to the client 10k article just for the first few bytes. You can save a summary and then just use CSS to manipulate it
@CSᵠ What if you want to video edit a 4k video?
*auto generated summary
07:39
@AwalGarg sorry didn't get?
@MadaraUchiha lolwow, but maybe stitch a few monitors...
@MadaraUchiha resize and check this fiddle. jsfiddle.net/venkateshwar/548db3de
@PreetiMaurya jsfiddle.net/0cmd9ub4/1 check the change on line 42, does that help?
1 message moved to Trash can
@THE Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
07:40
@MadaraUchiha I can attack these questions specifically, but perhaps you were taking my point too far. I mean sometimes the server have to cap data to whatever is useful / meaningful to the client, and not blindly dump whatever is in database. I did not mean the server should do all processing. Client and server can share the load.
But this assumes I didn't cut my text on the server-side, which is what being suggested here.
THE
THE
var myNameSpace = myNameSpace || {};

myNameSpace.Utils =   {
          a : function () {  // do something... },
          b : function () {  // do something... },
}

window.onload = function () {
            myNameSpace.Utils.a();
}
@AwalGarg I will see. Thanks
THE
THE
is it okay to call several methods in window.onload
am i doing it right
@Sheepy Of course, I won't send 200kb of data to the client so that only the first 100 bytes would be used.
07:41
@THE yes
Figure out the maximum width your container would ever have, take a 100/200% safety margin, and send that
But you still save the full text to the database, and do this kind of processing on the fly
@MadaraUchiha ohh why? :|
You don't save the cut text
truncate from backend to the maximum possible text to fill the area, and the rest from client side
@MadaraUchiha even if the screen is 10k, summary should not be the entire article
@AwalGarg sorry it didn't help... the class didn't get removed
Something like that. Or dynamically request more data if you want to go that far. We are developers. We convenience users.
@AwalGarg If the box's width is fit to display 10k words, you have a different problem.
and.. decide (based on statistics) how much you wanna support, maybe 4k, ok but further should be below 0.x%
However that seems appropriate. but in this case have no idea why it isn't working..i mean it works for finding and getting anyother value
07:44
@PreetiMaurya oops sorry. I forgot it is in jqXhr context. try this instead: jsfiddle.net/0cmd9ub4/3
2 mins ago, by Madara Uchiha
But you still save the full text to the database, and do this kind of processing on the fly
That's my only point here.
You do processing on raw data
true!
You don't store processed data
lol, of course not
@CSᵠ Microsoft's solution would be to scale the app all the way up. A full screne Skype on a 5k monitor should definitely look beautiful. Think how fine the text's anti-aliasing will be
07:45
@Sheepy damn, that was something i... it... left me... WTF WTH M$
@PreetiMaurya note that the change is not only on line 44 now but also in the initialization of the function.
@MadaraUchiha so maybe you should keep in your DB the first 1k of your article
and then i installed the "old" skype
so no processing will be done on the fly
the skype program and not the skype "app"
07:46
sure @AwalGarg.. thanks
@yarden.refaeli Why?
Are you hurt for storage?
You can store gigabyte upon gigabytes for pennies today.
You're talking about a 100k difference tops
I mean aside from your full article, keep the 1k first (raw) bytes of the article
@yarden.refaeli Why?
TBH, I don't see any problem in just sending the first n characters. thinking about super edge cases of summary looking funny at some random occasion is moot.
that way you don't have to send the client 100k article only for the 1k summary. no processing is done on the fly (only when editing/creating)
07:48
You don't have to send them the entire data, though
@yarden.refaeli What you're saying is called premature optimization
@AwalGarg it did work..but a bit weird.. it seemed to remove the last of the element with class changed and not the one
Taking a chunk of data out a string will not be the processing bottleneck.
!!google premature optimization
07:49
the first result says its the root of eval haha
they didn't hear about eval?
@MadaraUchiha even when you have a lot of requests?
@yarden.refaeli Yes, even when you have a lot of requests.
might be better to just load the data for each request instead of re-calculate it, just another form of caching
I assure you, if you have a useful application that attracts that many of requests, you will do something heavier than string manipulation.
@yarden.refaeli Again, premature optimization.
the bottom line is: you should suck up all and any data you (or your users) get your hands on (send to you)
You're thinking about how to optimize for a future you cannot predict.
07:52
@CSᵠ That's smart. In fact Microsoft has decided to retire the Skype app, and will soon direct them to install the desktop program.
@MadaraUchiha so you are saying you just wait till you have performance issues and then address them?
@yarden.refaeli I'm saying that I measure my bottlenecks before I try to address them.
@Sheepy what part is smart there?
There's no point spending 500% of your time optimizing EVERYTHING, when you could have gotten 99.8% of the speedup effect had you just measured and optimized 1 or 2 components
Also, optimization more often than not comes at a price of code readability
If I had to choose between the two, readable code trumps performant code.
@CSᵠ You using the program not the app :)
07:57
max-width is still not working on td :(
The width is never forced to change
@MadaraUchiha Just curious, how readable is this on your readability scale? github.com/Sheep-y/ufoafterlight-db/blob/master/res/…
@MadaraUchiha so... you're not writing much nuclear reactor code?
:P
@ZahidSaeed No they don't. Table has its own layout model.
that's kinda condensed @Sheepy
@CSᵠ From what I've seen of nuclear reactors, they're written in Java 4. If you're lucky.
07:59
nooooooooooooooo

« first day (1712 days earlier)      last day (3461 days later) »