« first day (2354 days earlier)      last day (2594 days later) » 

12:01 AM
@Rolf that's the whole point of webpack
it has to run against node modules to bundle them with your code
 
isn't that browserify?
 
browserify is just mediocre webpack
they do the same things
 
true
now that I think of it
 
 
1 hour later…
1:20 AM
Hey, I'm running into a weird issue with Jquery slideUp and slideDown where it only works on second hover. On first hover there is no animation
 
Is there any reason that once I started using Webpack the same $.load() jQuery function would give a warning Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
 
@NateMathews Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
@NateMathews Can you reproduce it in a jsfiddle?
 
@Alesana The issue is when the screen is not resized. jsfiddle.net/4od3ofbg
Not sure if there's a way to view it fullscreen in jfiddle
 
You can use two function parameters with Hover
One for mouseenter, the other for mouseleave. Try that and see if it still happens. Note that I have console.log(...); twice in there to show you when the two functions are called, you might want to remove those
 
1:42 AM
does anyone work from home a fair amount?
 
@ngnewb full time
 
on occasion
shitty upload speed means it lags to connect to various services I need
 
@ngnewb I used to work from home at a call center, now I program from home but I'm not employed
 
2:14 AM
ouch, i'm sorry @Alesana
 
bunch of prudes
 
@derp That's okay, like I said I'm not employed now lol
 
I said $10
 
congrats on getting your sanity back
 
Can you chew the olives?
 
2:15 AM
I guess
 
I'd probably do it for $100
 
how big is the jar?
 
mix the olive juice 50:50 with vermouth and you have the best possible martini
 
That's like $50 an olive
 
if they were nice olives you probably can't buy the jar for 10 bucks
 
2:17 AM
^^
[Violation] Handler took 333ms of runtime (150ms allowed)
[Violation] Long running JavaScript task took 493ms
[Violation] Long running JavaScript task took 242ms
[Violation] Handler took 307ms of runtime (150ms allowed)
[Violation] Long running JavaScript task took 314ms
Is that bad?
 
nah man, computers that double as space heaters are totally in
 
people turning down free candy like what the fuck
 
I'd do that for a four foot rope for black licorice
 
more than just free
 
I would pay for that
It only started happening when I started using webpack
 
2:19 AM
The next one was a whole bath tub of bleu cheese
I'd never do that
 
a bathtub is a lot
 
Yeah
 
$10,000 is a lot too
 
heh compile it as a mobile app and then sell it as a hand warmer app
 
Do you think you could eat your body weight in kale?
 
2:20 AM
genius
 
Like I like kale and all but even eating a pound of it would be a challenge
$100 is $100 though
 
I think a bathtub of cheese would defeat me
so the remuneration is irrelevant
 
I don't understand though my page doesn't have that much JS
Lol I don't know if I can use webpack on mobile
 
Wait whats wrong
 
@Meredith You're asking me?
 
2:22 AM
Yeah
 
[Violation] Handler took 333ms of runtime (150ms allowed)
[Violation] Long running JavaScript task took 493ms
[Violation] Long running JavaScript task took 242ms
[Violation] Handler took 307ms of runtime (150ms allowed)
[Violation] Long running JavaScript task took 314ms
Getting that in the console
 
Well that's not good
 
Only when I started using webpack though
It makes a lot of requests for pictures maybe that's why?
 
What did you use before?
 
Inline script tags
lol
So, nothing
 
2:26 AM
What happens if you use browserify or something lol
You're probably going to have to do more detailed profiling to figure out what's wrong
 
@Alesana What do you mean?
 
this is just the development build right?
 
Right just development
@littlepootis What do I mean by what?
 
What do you mean by now knowing if you can "use webpack on mobile"?
 
Oh I was only joking
I meant you can't use webpack for mobile app development
I have 3 different functions that load ~20 pictures, I would think maybe that is what is causing it?
 
2:28 AM
what does react native use under the hood lol
 
That is probably causing it
 
But isn't that normal loading time for that? it's a carousel.
 
Webpack is probably doing something funky with them
 
@Alesana depends on what you mean by mobile app development.
I'm pretty sure you can use webpack for that.
> depends [...] pretty sure
DataGrip is nice.
 
@littlepootis Well I understand you can make web apps that work on mobile but I was thinking more along the lines of an app in the app store
 
2:31 AM
yeah just did a bit of googlefu, a lot of react native projects use webpack for build pipeline stuff
 
What is everyone's opinion on ranch dressing
 
@Alesana what if i told you you could make a web app that compiles to native mobile code that you could push to the app store?
 
@Alesana I'm talking about them too, not web apps that work on mobile.
 
:O I had no idea
 
2:33 AM
Don't be so hateful, Meredith
 
which one of them?
 
Wait so are those violations including the time it takes to make http requests for images?
 
Have you seen barefoot contessa?
 
sbs cooking show?
why?
 
I can't see, I'm blind
 
2:35 AM
I can't stand her
 
I can't sit her
 
she's apparently a former White House nuclear policy analyst
 
Well I made it so it doesn't load the images and it gave 2 less violations :|
 
fewer
 
Also since I started using webpack I am getting...
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
Maybe it's related o.o
 
2:45 AM
Don't do synchronous ajax
 
You should have mentioned that
 
Yeah I realized that I probably should have haha
That's the thing is I never do synchronous ajax, I don't know why it is doing it with webpack
All my ajax requests are made through jQuery and I don't specify anything with async anywhere
 
waits for jquery hatred
 
jquery > ina garten
 
Lol
Does webpack make synchronous requests by default?
 
2:52 AM
It could
I've never used it
Anyone know what jquery's approval rating is?
Gotta be higher than 37%
 
there's a LOT of legacy sites out there
 
If so that wouldn't make sense that so many people use it
 
msot of the time you don't get to choose
 
webpack doesn't handle making requests, and there's no way it would try to make them synchronous
 
Would node.js?
 
3:03 AM
Sure
 
no
 
Hmm the problem started when I started using node.js and webpack
 
You probably did a 3rd thing too
 
I'm trying to think
I deleted all of my plugins and and installed them via NPM but that shouldn't do it
 
!!urban clunge
 
3:17 AM
@monners clunge Vagina
 
Well I'll be damned. Boy am I out of touch
 
I went ahead and put...
$.ajaxPrefilter(function( options, original_Options, jqXHR ) {
    options.async = true;
});
right after requiring jQuery and it fixed that problem... but I am still getting the violations with Long running JavaScript task took 417ms
I don't know what the problem would be but it doesn't take too long to load the page so I guess I will just keep it as is :|
 
what about over a 3g connection?
 
Does the script time have to do with internet speed?
The page is 2.3mb
 
you have a loop somewhere that's causing problems
rather than setting an ajaxPrefilter, you should see if the debugger can tell you what's broken
 
3:32 AM
It gives me 7 different violations on page load, would that be 1 single loop?
 
could be
 
I was messing around with the debugger but I couldn't find anything out from it
A loop would make requests synchronous?
 
no, that makes no sense
 
Yeah that's where I got confused
Maybe I will try using Browserify instead of Webpack and see if it still has the problem
 
you need to find the code that is making the requests
and work backwards from there
browserify won't work any better if you choose not to debug
 
3:39 AM
All of my ajax requests are causing it
Would it be caused by using the jQuery $.load("../file.html") on a file that has script tags linking to js files?
Ahhh that was it
It isn't causing violations with the time but it is causing the synchronous request
 
4:02 AM
Whatever you're doing, it sounds wrong
jQuery is a little like when you're trying to do a mission in an open-world game. You know there's probably a correct way to do it, but you're soooo close to hacking through it your way.
 
Lol well even if I were to not use jQuery I think that the same thing would happen
I have navigation.js which works based off of the #something value in the url bar, and it then loads an html (or php) page into main div based off of that, and the page it loads has it's own js page.
 
Why though?
That sounds like ajax for the sake of ajax
 
So it doesn't have to reload the whole page and looks pretty
 
It also means the browser can't cache your subsequent page scripts
 
and the sidebar doesn't reload
 
4:11 AM
there's such a thing as iframes
 
Maybe an iframe would be better
 
Also, if it's just a static site with no real backend logic other than pathing then refresh should be blazingly fast
 
True I just liked the idea of the #page
 
Would be more impressive if you used a proper frontend routing solution
 
I started using $.getScript() to get the script that a page needs but I feel like something's not right with that
Heh
Bleh I scripted my whole app that way it is going to be a pain to switch it
 
4:16 AM
Well then you can't really ask us for help, can ya?
 
Why is that? o.o
I am changing it to use iframes as @ssube suggested I'm just saying it's going to be a pain :P
 
this is why you shouldn't invent complicated things
it's a code smell
 
Yeaahh I thought it was pretty clever. It worked well too
Now I am realizing the inner page uses the same libraries as the sidebar so now it would have to make twice the http requests. I am just going to say screw it and make it reload each time
Is there a good simple client side routing system that someone could suggest that would achieve what I'm trying to do?
 
4:34 AM
morning
 
I dont understand whenever I use bootstrap container and I try to set and image on the background there are always white spaces on the both edges . How to even remove that
 
Hey I just realized that pretty much all pages show violations for JS runtimes
 
volation
violation
 
4:51 AM
voilation
 
Voliation
 
where should I look for if I want more icons , than the ones in font awesome and bootstrap?
 
@FlyingGambit icons8.com
 
@Alesana Thanks, I was looking for vector images but I will keep this as a backup
Also is there any desktop client which allows me to access stackoverflow chat ?
 
nope
 
4:58 AM
Really need that , as my office has blocked SO chat
 
I think they have SVG vectors
Ah the PNG files are free but the vectors are premium
 
ah I see
 
Well they have icons8.com/web-app/category/all/Very-Basic that contains a lot of icons and the ones in that category are free SVGs
 
wait your office has blocked the stackoverflow domain?
 
5:03 AM
@sscube do you know how to set background image inside a bootstrap container , covering the white spaces on left and right as well
 
@derp not SO doman , only the chat
and I really need SO chat and ur guys help as I am working on a new project from scratch
 
 
1 hour later…
6:19 AM
@MJH Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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 guys,
Need some inputs over NodeJS deployment. Anybody in ?
 
6:39 AM
@FlyingGambit That's smart, blocking only the chat.
 
i just guess that the chat is filtered due of the availability of "chat" in the url
 
6:56 AM
Hello folks...I am always getting a PromiseRejectionHandledWarning: Promise rejection was handled asynchronously warning in node (v7.4)
and I am pretty sure I not doing anything async there... (code follows)
 
I feel that I am old when I see a piece of QR code chocolate sticking on top of my ice cream cone.
I feel that it does not belongs to the ice cream. And I feel compelled to scan it @_@
 
  upas.ready.then(() => {
    console.log('Connection with upas...ok');

    drm.ready.then(()=> {
      console.log('Connection with drm...ok');
      app.listen(port, cb);

    }, (e) => {
      console.log('Connection with drm...failed');
      // console.error(e);
      // cb(e);
    });
    // app.listen(port, cb)
  }, e => {
    cb(e)
  });
whats wrong here ^
 
@Sheepy Did you scan it?
 
@Shrek Yes. Send me to a [event website](shop.hdlovelife.com). No I didn't play the event.
 
:D
I realized I'm scared of crowds almost phobic of crowds.
 
7:07 AM
@deostroll Google tells me that you get that warning whenever you have a Promise but does not handles its rejection. I see you have two then() (which only happens if you are doing anything async) but zero catch().
 
@deostroll You can simply attach an event listener for unhandledRejection and check the stack trace or whatever
 
@deostroll IMHO Promises aren't for synchronous operations. Only use them if you work async
 
To be fair, I don't think there is a choice in coding style... everything has to be async in node because as soon as you don't, you block the single thread.
 
and then you weep softly because you were fired
 
isn't the pattern for then like .then(successFn, failureFn)
 
7:16 AM
@deostroll yes
 
I've clearly provided the failure function
 
you can also do
.then(
.then(
.then(
.catch(
 
@deostroll Ah yes. Hmm curious.
 
what if your failure function is failing?
 
even inside the first then there is another async call that I've written properly
there is nothing inside the failure function except invoking a callback
which simply logs to console
I've read you simply have to put an empty .catch() call to ignore this warning...
that is fine...but I still don't get what I am doing wrong...
 
7:21 AM
Well, have you tried putting the catch in? XD
 
@deostroll Set a global unhandledRejection handler to help you debug.
 
@Sheepy are you going to use app.listen in an async way ? :P
 
how do you do that in node?
 
14 mins ago, by Shrek
@deostroll You can simply attach an event listener for unhandledRejection and check the stack trace or whatever
 
the info is in the doc that madara has linked
 
7:25 AM
@KarelG app.listen is async
 
@KarelG app.listen() is async
 
oh my bad...thought I'd find the mdn article...
 
@deostroll It's a node specific API, not JS.
 
@KarelG I don't really write node or express. I am too comfortable with old technologies like ThreadPoolExecutor...
 
ThreadPoolExecutor xD
wow such name!
 
7:31 AM
Try making it Scheduled, for ScheduledThreadPoolExecutor. Which you can use with stuff that implements, say, RunnableScheduledFuture.
So it is understandable why w3c designed DOM like that.
 
HAHAHA
> RunnableScheduledFuture
OH MY GOD, I'm gonna die
 public class CustomScheduledExecutor extends ScheduledThreadPoolExecutor {

   static class CustomTask<V> implements RunnableScheduledFuture<V> { ... }

   protected <V> RunnableScheduledFuture<V> decorateTask(
                Runnable r, RunnableScheduledFuture<V> task) {
       return new CustomTask<V>(r, task);
   }

   protected <V> RunnableScheduledFuture<V> decorateTask(
                Callable<V> c, RunnableScheduledFuture<V> task) {
       return new CustomTask<V>(c, task);
   }
   // ... add constructors, etc.
 
/me grimace as memory resurfaces
 
8:14 AM
i have used this in dev console var a=[],i=0,l=5000;while(l-->0){a.push(i);i=(++i-10?i:0);};document.getElementById('‌​formID')['description'].textContent=a.join(''); which works
however, if i use it again without refreshing the browser, it fails to populate the textarea
( .value ... )
 
when you can't tell if something is java or typescript, you know the world is rotting
or maybe I should actually try to properly learn both
 
Just take a good sleep. Solve most things. Except my baby. When I wake up he is still in his crib and crying for milk.
 
8:29 AM
you have a baby? Poor baby :/
 
He has already learned to press the spacebar. It scrolls the screen when we are shopping for his clothes and, recently, rice powders.
 
please don't teach him how to type. We don't need more little yous around the web :P
how old is he?
or she he
 
Five months.
 
can he double click?
omg I just realized. Since I've been using i3, I don't remember having ever needed to double click anything
don't teach him to double click, teach him linux
 
8:45 AM
So far he seems to be a lot more interested in phones than pc.
 
tell him he's wrong
if you present good enough arguments, he might listen to you
I've been a baby once, I know
 
Hi. How can I know if it's safe for me to remove all carets in package.json in order for npm-update to update all packages ? what if a package version is not compatible with other updated one ?
"core-js": "^2.4.1",
    "gzip": "^0.1.0",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
 
actually wow, I probably remember being a baby much more than any of you do
that's scary
 
o_O
 
for some reason I'd have intuitively thought that you'd know more about your time as a baby... because you've lived more and know more things, but nope
 
8:48 AM
@Royi You never know. Good luck~
 
@Royi you try
 
@Royi Removing the carets would affix the version
Although, it doesn't affix the versions of the dependencies of your dependencies
Which is usually the real issue when running npm i several times a day.
For that you'd need shrinkwrap.
 
@towc I do know more about my time as a baby now, since my family members would talk about the past baby me when we talk about the present baby me.
 
but would you be remembering?
 
I remember the alphabet song. Does that count? :)
 
8:54 AM
fair enough
 
Hi guys, is there anything official about the Browser back button's behavior?
 
it goes back
there's usually the history API
but not much other than that
 
^
 
how about form data state, js execution?
is it in the spec, or browser specific?
 
some browsers may implement an event like "onback", but not really
 
8:57 AM
@TrungDQ No spec. Some browsers may keep the DOM but none keep js state.
 
look into the history API
you may still be able to do something with that
and if you aren't aware of it yet, learn about localStorage/sessionStorage/IndexedDB
 
So maybe I have to figure it out myself on each browser to see what "goes back" really do with DOW, form state and js scripts.
really... no spec?
 
@TrungDQ Please look into history api.
 
or into sheepy's eyes
and tell him you love him
and then the history api
 
looking at it...
I can see it mentions Browser back button === history.back()
 
9:01 AM
 
but what I'm trying to figure it out is what is history.back() doing. Obviously it's not a full-page load.
someone mentioned that "Modern browsers implement something known as back-forward cache (BFCache). When you hit back/forward button the actual page is not reloaded (and the scripts are never re-run)." in this link: stackoverflow.com/questions/8861181/…
 
@TrungDQ Ok... I can understand why you would go read that... try history.pushState
 
could you help me out with a link?
oh, you edited your msg, so never mind
I think you are not understand my question, Sheepy.
anyway, thank you for your input
 
the history works like a stack, and the implementation of that is browser-specific, and that's good because it leaves space for the vendors to adapt to UX and optimizations in their own philosophy and research team
that's a pretty common similarity of features like that
 
9:08 AM
that's browser-specific
ya know, webkit
 
@TrungDQ The only way to keep everything in control is to use pustState, replaceState, and popState. This way you keep both the DOM and js in your total control.
@TrungDQ Back/forward handling have varied with time even in same browser, so I don't advise counting on present behaviour.
 
thank you
 
Baby wakes up again. Crying. I am going offline. Bye~
 
@Sheepy Thats why I wouldn't get one right after release
I'd wait til they fix the release bugs
 
10:06 AM
-2
Q: Detecting network speed with JavaScript

nickbortiI have been making a JavaScript Multiplayer Gaming Application, where I need to detect user's internet connectivity. At first I was thinking about letting the system play on behalf of the user when his internet connection goes down and letting the user once again when his connection comes up. Bu...

what's wrong with this question? :/
already downvoted but I wanted some opinion or something about it.
 
C4u
11:06 AM
Anyone ever used this slider eyecon.ro/bootstrap-slider/# ? Cant find a way to set its size...
 
11:43 AM
Hello, anyone here can give me advice on selecting JS scrpt that can be used managing browser storage? If much like ember data.
I am using reactJS. So I need to have a library that can do http requests and also data management.
 
@Sisir fetch, mobx
 
I would buy it if it wasn't on kickstarter
I ordered some underwear
fucking 8 months wait
 
Onkyo are brilliant, love my amp
Don't get what the "sensors" are though
 
11:58 AM
noise cancelling?
 

« first day (2354 days earlier)      last day (2594 days later) »