« first day (2676 days earlier)      last day (2273 days later) » 

10:00 AM
What's up?
@Gilad "returns a div" - you mean "whose render returns a div"?
That package looks silly, use CSS :D
 
my god
this professor tries so hard
xkcd in lectures
memes
> Weak Entity Sets. Weak entity sets are not entities that do not even lift.
 
@BenjaminGruenbaum yes, my component returns a div
 
@Mosho ouch
 
@Gilad what problem are you actually trying to solve? That library looks like it's solving the wrong problem.
If two components need to be the same height you can just do it in CSS
 
@Mosho that's so 2012
 
10:03 AM
@BenjaminGruenbaum i'm building something that consumers can use, i want to give them an option to make all their components the same height
automatically
 
@BenjaminGruenbaum my exact thoughts
 
@Neoares DYEL is much, much older than 2012
 
but it was more popular by that time
 
i'm trying to swap the divs with the refrenecs to my component
 
10:05 AM
Looks like it's time for you to learn flex :)
 
flex is good
flex is love
 
i wish i could edit CSS but its out of my zone
 
Making elements the same height should be done in CSS, not in JS, it's trivial - will work with server-side rendering and will be easier to maintain.
@Gilad what do you mean "out of my zone"?
 
lol
 
i'm contributing to patternfly
 
10:06 AM
it means it's in another country
 
That's like a plumber saying "I wish I could fix the plumbing but the toiler is my zone"
Then contribute CSS :D
They already have awful inline style there - you can use the opportunity to clean it up and put it in a css module and add the class names for even and uneven heights
Then have a prop either selecting the even or uneven className
 
sounds good, thanks Benjamin
not sure they gonna like it in the PR
 
So apparently the owner of the teeny tiny shop/newsstand nearby my cafe is really bad at planning
In the time I stood in the queue
 
@Gilad you should explain the reasons - adding a third party dependency (and a buggy one) for something browsers do anyway doesn't make a lot of sense to me
 
10 customers got turned down because he said that after they collect money on Sunday, they only give them a bill of 50 pln for start on Monday, so they have literally no change
That is 10 customers they just lost
 
10:10 AM
not a great policy, unless your objective is to make as little money as possible
 
I'm pretty sure the owner may not realize
 
All they need to solve that is to sell multiple coffee tickets
 
@KamilSolecki he'll realize when he can't pay his rent on time
 
how store object in redux store and access in another routed component ?
 
@KamilSolecki you stood in a queue for a newspaper? are you in 1992?
 
10:12 AM
@Mosho no I buy cigarettes there
 
aren't you like 15
 
!!stats 111663
 
@DenysSéguret priyanka.sarkar (https://stackoverflow.com/users/111663/priyanka-sarkar) has 10401 reputation, earned 0 rep today, asked 299 questions, gave 144 answers, for a q:a ratio of 299:144.
avg. rep/post: 23.47. Badges: 28g 90s 144b
 
@Mosho no I'm like 23 in May :P
 
yeah I know
 
10:13 AM
So stats don't show what part of the rep comes from questions ?
 
Smoking cigarettes is like one of the the worst thing you can do to your body, like as bad as excessive alcohol and getting fat
 
smoking is bad
listen to @BenjaminGruenbaum
 
@DenysSéguret stats just scrapes the profile page, how would it?
 
@BenjaminGruenbaum I didn't look at the implementation of the bot (but you can get this info using queries, I did that when I have a copy of SE DB)
 
he barely ever drinks
and almost never sets up a bar in the back of buses
 
10:13 AM
smoking sucks, beer is good
that's my thing
 
I really don't drink a lot, I drink a beer maybe twice a week, I only do binging when on holiday which is like 3 times a year.
 
smoking is horrible, but beer shouldn't be abused too. It's not so healthy
 
Weed is better than alcohol, Tobacco is worse than alcohol, alcohol is overall awful for health and the more you drink at once the worse, although I drink, smoke hookah occasionally.
 
yeah, of course
 
@BenjaminGruenbaum is it possible to rewrite that example as a map function
 
10:15 AM
It's important not to make it into a habit
@mibbit what?
 
the problem with beer isn't just the alcohol
 
rather than a for loop, can't seem to get the setTimeout working in an array.map of data
 
I rarely drink nowadays, but when I do, I have to try to stay below 4 beers
when I order my fourth beer of the night, I know I lost the fight
 
I don't drink often, and when I do it's pretty much exclusively parties
 
We shouldn't consider all alcoholic beverages as equal, that's just like considering orange juice the same as coca-cola
 
10:16 AM
Or a bar trip
 
but I only drink beer, nothing else
 
@DenysSéguret they are the same though
 
@GNi33 yeah here we differ :P
 
@Mosho not a all. For once you can't unclog toilets with orange juice
 
@BenjaminGruenbaum i'm a student, new to react/js, how would you add the flex here? jsfiddle.net/jjLxy70c
 
10:17 AM
@DenysSéguret source?
 
@DenysSéguret yeah the orange pulp just adds to the clog
 
@Mosho some scientific facts from Kamil
 
anyway, they are both basically water with sugar
 
@mibbit you cannot use await with an array of promises
 
for all nutritional intents and purposes
 
10:18 AM
@Gilad you just copy-pasted your class there, make the fiddle run :P
 
Well not like this anyways
 
As in, render something, also look at the fiddle I sent you
 
@Mosho that's a little excessive.
 
I also recommend flexbox froggy
 
@DenysSéguret how so
 
10:18 AM
1 message moved to Trash can
@mibbit Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
@DenysSéguret I think a lot of it is the alcohol
 
@BenjaminGruenbaum k ill play with it
 
in fact, orange juice might be worse
fructose is poison
 
@CapricaSix I don't use this chat a lot but maybe you should make the markdown function like all other webapps
 
@DenysSéguret yeah, but the Alcohol itself is bad, even in red wine - which just happens to have some good properties too which aren't great. All drinking is "bad" but that's fine I do a lot of unhealthy stuff.
 
10:19 AM
If you want to await an array of promises, use promise.all
 
@Mosho fructose isn't poison, let's not get ridiculous
 
@Mosho you can eat an apple or drink a glass of orange juice every day. It's not poison, only the excess would be nocive
 
hmmm
 
not poison poison
can't I be a little dramatic on the internet
 
10:20 AM
but it's the worse kind of sugar
 
High glycemic index foods aren't poison, you just need to consume them moderately.
 
eating a fruit is fine, juice is the worst part of the fruit
 
@Mosho the problem is if you conclude from that that all beverages are identical
 
Unlike Alcohol or arsenic which are poisons mostly
 
distilled
 
10:21 AM
@Mosho just like raw legumes and processed ones
 
@BenjaminGruenbaum alcohol at small doses is probably not just a poison
 
Or wild basmatic rice vs. sticky rice, processing often increases the glycemic index a lot - that's not necessarily a bad thing.
 
it's not just glycemic index
 
Humanity during most of its history was craving for more sugar (and the likes). Only the current excesses are a problem
 
fructose spikes blood sugar levels
all sugar does
 
10:22 AM
@DenysSéguret it dilutes the blood a little, so if you drink and have high blood pressure and don't take medication then it has some beneficial effects - but you get the same effects by eating less cholesterol most of the time and clinical studies found no significant gain from drinking alcohol (and a lot of negative effect). If you'd like I can dig that up for you.
 
but fructose does it more than cane sugar
 
what would be the promise pattern equivalent
 
@DenysSéguret I took a course on nutrition that basically said: humans ate whatever they could get their hands on - there was no "human diet".
@Mosho citation required
 
generally, not about blood sugar
 
@BenjaminGruenbaum every two days there's a new study either saying that alcohol is bad at small doses or that maybe it can be good. And of course it's more complicated because you rarely drink just alcohol (you drink wine or beer for example, which are very different beasts)
 
10:24 AM
@Mosho that's why coca-cola zero is shittier than normal one probably
 
@Neoares hmm?
 
it has no sugar
 
@Mosho Read the study they cite, it literally just shows that people got fatter and people are consuming more fructose. All it's claiming is that those two facts might be related but it shows no evidence :)
 
but it has something even worse
 
and?
@BenjaminGruenbaum it's common knowledge for me, that was just the first google result :P
 
10:26 AM
@DenysSéguret I worked at a lab studying Fetal Alcohol Syndrome, so I have a lot of biases - but I think it's very well known that alcohol isn't great in the scientific community. There is a lot of research that's not funded at this point. That said I still drink alcohol.
 
I think it's pretty much fact that fructose is the worst sugar
I never saw anything arguing the opposite
 
Just because something isn't healthy doesn't mean I don't do it lol :D Also smoking lowers parkinson's desease (don't smoke!) - having some clinical merit doesn't mean it isn't awful
 
I think everyone agrees that high fructose corn syrup is pretty much poison
 
@Mosho I never heard that claim, but I'm pretty sure it's false (about fructose), I don't think sugars break into "good" and "bad" like that and I want to see research.
@Mosho yeah, it's definitely not good since it has a very high glycemic index.
 
@BenjaminGruenbaum I was a little too short. There are of course many proven detrimental effects of alcohol (for example on the neurones), even at small doses. But most big problems come with important quantities (or things you drink along alcohol) and there seems to be some (small) good effects too (e.g. alzeihmer)
 
10:28 AM
I'm just not sure it's worse than other things with similar glycemic index scores.
Also, cooking oils are the processed sugars of the fat family - which is why I always find it funny when people tout things like olive oil - it's hyper processed.
 
@BenjaminGruenbaum I never read about it in terms of glycemic index
anyway
 
@DenysSéguret alzheimer's benefits from Alcohol? Alcohol raises the risk for Alzheimer's from what I know.
@Mosho I'd be interested in learning
 
@BenjaminGruenbaum hardened fats is what gets ya
 
disclaimer: I haven't read it. I'm a little fed up in fact of reading every two days some headlines about the positive or negative effects of alcohol
 
10:31 AM
Lemme find the paper
 
(being in France I've seen so many titles about how good vine is for you during the years...)
 
@DenysSéguret it's really pretty clear cut - I had to suffer through learning how to read research and have my dad pick on me - but once you understand the terminology, how impact factors work, where to look for who funded what - it gets better. It's very very hard to actually get recommendations since the truth is usually unknown though for most questions.
Here is the research it cites in alzinfo.org - ncbi.nlm.nih.gov/pmc/articles/PMC3157490
 
(but yes even French people think alcohol is bad for your brain)
 
@DenysSéguret you mean wine?
 
@Neoares yeah. sorry, I'm very tired this morning....
 
10:33 AM
I always heard that 1 cup of wine a day is good
 
@BenjaminGruenbaum flex makes my columns bigger, but the card itself still stays the same, just takes more space. i need to make a component inside the card higher, can i let the container know which component to enlarge?
 
Although you'd want research that shows an interventional placebo-controlled study for alcohol (changing the nutrition for people in the same risk group for Alzheimer's and then seeing if there is a difference)
@Gilad you need to go through a flexbox tutorial and churn through it :)
 
@Neoares I've heard this but I still didn't read anything conclusive on how a glass of wine every day would really be good. I think it's plausible but still unsure.
 
@DenysSéguret it's supposed to have nutritional benefits
it seems
 
10:34 AM
thanks
 
(anyway I still drink my glass of wine every two days)
 
it's made out of grapes so...
or maybe it's just fake marketing
 
> Figure 5 shows the risk of cognitive impairment was similar to that for All and Dementia, but the risk for cognitive decline, which was measured in only 21 ratios from seven studies, did not remain significantly less than 1.0 (see CogImp [0.78] and CogDec [0.96]). The recent meta-analysis by Peters et al11 also failed to find a significant benefit of alcohol use against cognitive decline (RR = 0.89; 95% CI: 0.67–1.17).
 
> Dementia
 
@DenysSéguret the paper it cites claims differently from the article
 
10:35 AM
fuck
 
@Neoares Alzheimer's is a form of dementia from what I know
 
sounds scary
 
All this is made more complex by the fact that during the recent centuries wine might have been safer than pure water regarding bacteria, which might partially explain its popularity
 
This is interesting
Analysis also showed the presence of the APOE ɛ4 allele eliminated the benefit of moderate drinking.
 
@Neoares and vodka can be made out of grains, which by themselves ain't bad either :P
 
10:37 AM
The segment under "Comparison with other cognitive risk reducers" is nice, since it shows that if you eat healthy the minor benefits of drinking a little go away
@DenysSéguret yeah, but the moment we're born we start dying, might as well have fun
I'm definitely pro drinking as long as it isn't daily and you don't binge too many times a year
 
@BenjaminGruenbaum I would consider one binge a year as too much. But I'm older than you...
 
I'd consider 3 drinks a day as "too much", but I'm fine with doing "too much" every once in a while.
As long as it's not the norm, I'd rather not tell myself I'm not allowed to do these sort of things
 
@BenjaminGruenbaum in my experience people around me who eat healthy are the ones who pay attention to what they eat and so are the ones (moderately) drinking wine. I would be very cautious with any statistical study conduced in France
 
@DenysSéguret (good) studies obviously account for that. Here is how you'd test this sort of question: you'd take 1000 people with similar risk factors, split them randomly into two groups, you'd give one group a glass of wine every day and for the other group you'd give a glass of a wine-like substance (wine with the alcohol removed) and you'd make both taste about the same (and pretty bad)
- you don't tell the groups which are getting what and the scientists themselves don't know either (double blind)
Studies that ask people what they've been doing and explain things in retrospect are usually bad.
 
@BenjaminGruenbaum I know that of course. But do you really think you can build a double blind with wine involving French people ? We're not even able to imitate a good wine with wine so without...
Elimination of biases isn't always possible
 
10:45 AM
French wine is amazing, stop that :P
 
BTW I drink French wine every two days...
 
@KamilSolecki notice the difference in alcohol %
 
You'd tell people they're drinking wine-like and you'd add a strong taste into it since taste isn't the point. In order to get people to drink it you'd a) tell them it's safe and b) you'd pay them
 
Are we talking about poisons like alcohol and dihydrogen monoxide?
 
@DenysSéguret that's a long time to be drinking wine
 
10:47 AM
@Sheepy Shaun!! :)
:gives grass:
 
Hi Neo! Long time no see :p (Munch)
 
@Neil as long as I'm not stopping drinking wine, you won't have any well written sentence from me
 
@Sheepy That stuff is everywhere.. it's a main component in pesticides you know
 
@Sheepy yes, we're talking about drugs
 
@Sheepy mostly aldehyde dehydrogenase
 
10:48 AM
and then people add it to wine
 
@Sheepy the dihydrogen monoxide joke won't work here
 
Well guess I should try hydroxyl acid next time.
 
it's a troll joke where everyone is in on the troll
i suppose there is the 1 in 10,000 still
 
Hi,
 
@huncyrus Welcome to the JavaScript chat! Please review the room 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.
 
10:51 AM
Anyone has experience with readable & writeable streams? (i know , it's node related....)
 
uuuuh node in the JS room... get out boi
 
/me pretends to be busy after hearing the question.
 
/me is busy after hearing the question
 
@huncyrus That said, what are you trying to do with streams and what's the problem you are facing?
 
There is a legacy code at my company. So the point, there is two endpoint, one for feed (receive) stream from a 3rd party device, and another endpoint to consume it. (audio stream).
There is a readable object, what get the data. Seems it get it, the data stored in the object. But at the moment on the other endpoint, when it try to consume, it seems, the data is just repeat the version of the cached data, as it was at the moment when the endpoint was hitted.
I made an entry on stack for this, with some code as well
0
Q: Nodejs readable stream pipe to response

huncyrusI have to maintain a legacy code. The basics: it should handle incoming stream (audio and/or video). The 3rd party device send the stream when it's requested. Then a client should consume it. The code was unfinished, but for me, seems good. NodeJS version is the latest (atm): 8.9.4 // init.js (...

Since I don't really have experience with node & streams (i only worked with socket.io related stuffs) I have no clue, why its not working. The entire code was implemented for node 4.x originally
 
10:59 AM
@huncyrus You should try to make it more obvious what you're actually asking
 
Okay, I try.
 
Maybe it's just me, but I'm having a hard time seeing what your actual problem is
 
If there is an incoming stream, how could I temporary keep it in a readable stream object to let consume someone else. (One feeder - multiple consumer).
 
Ok, having some code is good. I understand the question but as I hinted I'm not familiar enough with the internals of Stream to be sure what is wrong. Have you tried to rewrite it so that it doesn't use Stream?
Got to go. Miss you all~
 
@huncyrus You probably have to write the data to a buffer
But I have very little experience with streams
 
11:02 AM
I am looking for a function which randomly check a checkbox
anyone here who know how to do that
 
@Front-endDeveloper randomly?
 
yes i have a button when someone clicks on it, the entire list with checkboxes will be loaded
but i want to add some function
that adds a random checkbox to another list
every 5 second
 
And how is this a problem?
There is Math.random()
 
I really don't see the relevance of the checkboxes in your question
And I still don't see what your problem is
 
11:16 AM
users could now add the jokes to the favorite list manually
but I also want to add auto add function
with setinterval so it will randomly add a joke to the favorite list as well every 5 second
 
That's your goal, I understand your goal. What I don't understand is what is keeping your from achieving your goal
 
i do not know how to get that checkboxes and implement them so it would randomly checked one joke
 
As I said, there is Math.random()
 
do I have to iterate through the checkboxes
and then push it into an array first?\
 
I don't know. It depends on how you have written your code
 
11:19 AM
If you have an array of checkboxes, you can access the 5th one by doing arr[4]
Arrays are nice like that
In other words, no iterating required
 
evertime the user clicks
mmm.. maybe I will experiment with it now
 
you could select a random element out of the NodeList (by using document.querySelectorAll('input[type="checkbox"]')[Math.floor(Math.random() * document.querySelectorAll('input[type="checkbox"]').length)] for n number of times
 
@SaitamaSama you can put a random element with :nth-child :D
 
also, that ^ :B
@SaitamaSama also, put that selector's value in a variable and do operations on it
 
CSS selectors look so foreign now...
It's like... weird that I'd have to query my presentation layer to find stuff I put there
Instead of just React's View = f(Model)
 
11:36 AM
I like how we moved from "You don't need jQuery for that. Use Vanilla!" to "What? You're not using React?"
 
no framework in spare time
only way to become a javascript pro is to build in vanilla :P
 
well. when I have a look at all the job ads that SO throws to my face, I think that there's no non-react job in JS today
 
@DenysSéguret Shocking. It's almost like they target ads
 
@OliverSalzburg I don't know react so they're clearly not tailored to me
 
i know lot of devs who are afraid of vanilla js
pretty funny when you realise they have more experience than you have hahah
 
11:42 AM
And I've come to think that if I decide to switch jobs I'd better advert as a rust or go dev if I want to avoid working on react (or worse)
 
so experience does not mean anything
 
@Front-endDeveloper Denys has been a developer for... 25 years now?
 
if you have 5 year experience in emberjs or jquery
you are still a horrible dev
i prefer devs who have 2 years experience in vanilla js
 
I have over 5 years of experience with reactjs
 
@FlorianMargaine to be a real pro you need 10 years experience with react and es6 at least
 
11:45 AM
reactjs is good
 
Afternoons o/
 
@Front-endDeveloper react didn't exist 5 years ago ;-)
 
but they use vanilla ;)
 
I just looked it up, first release was on May 2013.
 
maybe you were an insider user? :smugpepe:
 
11:47 AM
@Front-endDeveloper you should have added only in these
 
someone who would like to join my slack community
 
since if someone has been a JS dev for 5+ years there is pretty much no way that he has no jQuery experience
 
just look frontenddudes.com
and sign up
840 members already
;)
 
for front-end dudes, that thing might want a better facade and faster load times :P
 
@KamilSolecki I've developed in JS for 10 years before jquery was released
 
11:50 AM
yes it is quite basic, but the main point is slack community itself ;)
people could discuss everything in this community
 
still, its like a hairdresser with bad hair :D
@DenysSéguret oh boy, mind if I ask how old you are?
 
i assume 15 years old
 
@Front-endDeveloper more or less
 
@KamilSolecki At least 12.
 
11:53 AM
@DenysSéguret and yeah, I was just invalidating frontenddev's weird statement
 
@BenFortune nudge to fix the backup
 
@MadaraUchiha thats what I always say when buying a PEGI-12 game :Nutella
 
:Nutella
 
www.frontenddudes.com
see you there people ;)
 
what is :Nutella? :Nutella
 
11:54 AM
@rlemon ^
 
yes, we have seen it, thank you.
 

« first day (2676 days earlier)      last day (2273 days later) »