« first day (3259 days earlier)      last day (1689 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
I have no context to what you're talking about
 
I smell toast
 
Did you ever replace your setTimeout with a setInterval?
Did you use event delegation for the elements with events your replacing?
 
@KevinB i'm trying that
 
orly
 
but i don't know whow to implement thays my problem
 
4:05 PM
Sounds like it might be a good time to figure out what you want, design how you want things to behave, then try to code it.
 
Hello everyone, i have a question with a react app. i have a single page app(spa) with redux . Now i want to add a functionality wherein the user clicks on a icon, the particular component opens in new tab. is there any way to do it??
 
@narasimhasriharshaKanduri Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
Yeah, look up anchors.
 
<a href="/foo/bar/baz/" target="_blank">Open other component in new tab</a>
 
@KevinB Delete that, make him google.
 
4:08 PM
will the new component have access to the redux store?
@Travisa i will look up anchors
 
it will be a new page
 
@Cereal how?
 
open the file
 
what i was thinking was if it is a new page, there will be no memory of redux store. that means i have to save the data to local storage and then write componentDidMount to read from local storage , update the redux store for that component and voila!! am i in the right path??
 
eh, that wouldn't keep them in sync in realtime
if you're ok with that, yea sure
 
4:14 PM
@kevin are there any other solutions?
 
possibly
You could also use StorageEvent to detect when it is changed and update the state accordingly. but you'd also have to look out for recursion.
 
should we use unfetch or just rely on the existing fetch api?
 
Do you need the features it provides?
 
(it depends on which platforms I want to support, I know, but generally, for 2019 web application I mean)
@KevinB if I knew the answer I wouldn't be asking
 
then you're not ready to ask
lol
 
4:25 PM
I am very ready
 
How can we possibly know?
If you don't know what features you need how would we know what features you need?
 
I would not be ready if I knew already if I knew I needed the features
I am not alking about features
 
Ok then, what other metric would you use to determine if you need it?
 
I am asking for a general web application like facebook
would you use unfetch or not?
 
what is unfetch?
 
4:26 PM
or just rely on broswers?
 
If you're asking if you should provide a polyfill for fetch, that's again, up to your requirements
 
If you want to support users who use a browser that doesn't support it, you don't have much choice but to either use a polyfill or not use fetch.
 
my requirements would be the same as a facebook clone
 
that doesn't answer my question
lol
 
4:28 PM
a website for the masses
 
If you want to base your requirements on facebook's requirements, go look up facebook's requirements.
 
facebook is closed source
 
Maybe so, but what browsers they support is not.
You have to also realize that your requirements change based on the size of your audience
A site like facebook, that gets an absurd amount of traffic, can get by with alienating a portion of the population that refuses to upgrade from IE9
 
@KevinB okay thanks
Supported: supports IE8+ (assuming Promise is polyfilled of course!)
does this means that I also need to install another polyfill for Promises?
 
You can look up the support matrix for things like promises and fetch and determine which things you can use, which things you can polyfill, and which things you should avoid, based on your requirements.
 
4:37 PM
Material-UI supports the latest, stable releases of all major browsers and platforms. It also supports Internet Explorer 11. You don't need to provide any JavaScript polyfill as it manages unsupported browser features internally and in isolation.

IE	Edge	Firefox	Chrome	Safari	Googlebot
11	>= 14	>= 52	>= 49	>= 10	✅
I am using material UI an they support this stuff
so since it seems that fetch is not support by any internet explorer, just for the version 11 I would need to install it
if I want to match material UI support
anyway, they say that I don't to provide any polyfill, does that mean that fetch and promises are already polyfilled?
@meagar thank you very much
 
dunno
I wouldn't expect material-ui to polyfill something it doesn't use
 
can you please also help me decypher this
Be aware that some CSS features require an additional postprocessing step that adds vendor specific prefixes. These prefixes are automatically added on the client thanks to jss-plugin-vendor-prefixer.

The CSS served on this documentation is processed with autoprefixer. You can use the documentation implementation as inspiration. Be aware that it has an implication with the performance of the page. It's a must do for static pages, but it needs to be put in balance with not doing anything when rendering dynamic pages.
does that mean that I need to add autoprefixer or not?
they say they add the prefixes on the client but still proceed to add autoprefixer for their website
@KevinB okay thanks, maybe they mean for other things that material ui's components use
 
5:13 PM
!!afk
 
5:30 PM
is there any technology where I can connect to myself and learn all the algorithms? :)
 
yes, the internet
 
It's slow, I needed to be in my brain at a given time.
 
 
wat
That comic is like the ramblings of a coked up basement dweller
So disjointed
Makes no sense
 
5:48 PM
Makes sense to me
 
makes sense to me
 
Maybe you're just out of touch
 
Don't make sense.
 
I don’t get it
 
Makes cents for author.
 
6:10 PM
I'm looking to run apt-get install -y lamp-server^ but not have the terminal prompted for a password for the root user in mysql -- is it possible to set the intended password as an environment variable or otherwise pass it to the installer script directly?
The mysql installation prompt seems to start as soon as the source is installed
 
7:05 PM
I'm modularizing the shit out of my code
 
uhoh
 
@duhaime Store it in your os's password manager
Keychain for macOS
 
7:19 PM
Possibly stupid question
Would it be stupid to store many of the static functions for a class in separate files, and then require them into the class declaration file and include them in the class by going .prototype.functioName = require('functionName')?
Is that a bad pattern?
Class.prototype.functioName = require('./functionName.js')
 
I haven't seen that done before
I don't see any problem with it though
besides your code maybe being a bit scattered
 
If you're going to reuse the function, then it makes sense, but I don't see any benefits to doing so otherwise, but I also don't think it's a terrible thing
 
Hmm. Its a bit untraditional, but it will be organized. A folder for the class. Idk if its necessary. I don't think I will reuse the function.
thanks guys
 
8:07 PM
spectacular
 
8:46 PM
 
8:56 PM
Hi Jordan
 
9:09 PM
anyone have any creative ideas for inlining a debounced function
 
9:22 PM
HI Forrest. Some update for you, you liked my demo. Enhanced with menacing sound :-) Enjoy... dysonbelt.x10host.com/25-10.html
 
9:58 PM
@AlexH neat!
 
thanks. Quick question... Can you target GPU rather than CPU (like in CSS) when doing / chosing between pre-build JS functions? Example: maybe RequestAnimation frame targets more GPU and, say, SetInterval CPU (which is not true probably).
...looking at it from the point of view of JS animation
 
10:16 PM
GPU and CPU have different functions
@AlexH
 
well, when animating, the plan is to shift as much to GPU as poss I would have thought?
 
thanks Forrest :-)
 
sure, good luck
 
10:51 PM
How do you convert developer errors to friendly errors?
So you aren't telling the user "TypeError: [...]"
 
err
don't
 
wdym?
 
catch them then return the user to an app state where they can try again after giving them a non-descript error message like "Sorry, something didn't work quite right. Please try again."
leaving the actual error message in the console, or sending it off to some remote service to track them
 
Yeah, but I want to be more descriptive than "oops"
I guess use validation and only throw when its a dev issue
 
user11867329
11:25 PM
@StephanS Basically, the candies sold are somewhat random. They can't select 1 candy * #unit. Also, the percentage boost is only applied on $10 (cause its bigger than $5) and $20.
 
user11867329
and they are already split up in categories, so it's basically just knowing which amount of which category to put in a container... as a combination.
 
user11867329
the thing is
 
user11867329
all containers must be fair, from the first to the last, regardless of which container was ordered the most, they still need to be fair.
 
user11867329
So I'd need either to calculate all possible combos (on max bag 610) and how to properly divide them preemptively so that all possibilities are covered. Or find an algo, but I don't think it's really possible... accurately
 
00:00 - 16:0016:00 - 00:00

« first day (3259 days earlier)      last day (1689 days later) »