« first day (2496 days earlier)      last day (2675 days later) » 

15:00
@corvid what is a noop
@TylerH function(){}
Accepts anything, does nothing, returns nothing.
oh, no operation
renderItem({ onClick }) {
  const props = {};
  if (onClick) {
    props.onClick = onClick;
  }
  return <div {...props} />
}
traditionally compiles down into NOP;
I thought he was just typoing 'loop'
15:01
vs just having:
renderItem({ onClick = () => {} }) {
  return <div onClick={onClick} />
}
@corvid React can understand the undefined in this case
So renderItem({onClick}) { return <div onClick={onClick} />; } would work nicely.
Ooo, it filters out properties which have undefined as their value?
{ onClick = Function.prototype } ?
you're not really passing them if their value is undefined
15:02
@ssube No, you are.
Can it can be seen with key in props
in JS it can be present but with a value of undefined
But React doesn't care.
oh, they are?
Why does it bother including them?
0
Q: Stop JSON.stringify from adding escape characters

db2791I have an object, var obj = {}; Where I set a property obj['prop'] = 'This is a "property"' How can I stop JSON.stringify(obj) from returning "This is a \"property\"" and instead return "This is a "property"" Ideally, is there a way to do this where I set the property? i.e. obj['...

@ssube You explicitly pass them
15:03
That's just JS.
I thought react complained about some undefined..
like <Component foo={undefined} />
I can't recall what foo was.
@Luggage Would behave the same as if you hadn't passed it at all
Even when it's technically possible to detect
user1596138
It would detect that as a bool property probably
React won't bork on undefined instead of an event handler for onClick, that's the point.
I know what you are saying, but I half-rememver runing into a case where undefined was not allowed..
user1596138
The same way it complains about prop={false}
15:05
i think .. yes. a bool property, ty
user1596138
It's for sure "allowed" tho
@Jhoverit It doesn't complain about prop={false}
maybe it was just some linter complaining.. i don't recall.
user1596138
@MadaraUchiha Aren't we talking about linters
Linting can complain about prop={true} (can just be prop)
But prop={false} can't be shortened
user1596138
15:06
^ Same for false and undefined and any other constant falsey value
@Jhoverit nope
user1596138
Okay bud.
Because if I check this.props.foo === false then not passing it will fail.
user1596138
We use different linters
I was claiming that react or a linter complained about undefined. It might have been on a boolean property.
I'll look for it later.. I need to go to lunch
user1596138
15:06
@MadaraUchiha That's not true at all
user1596138
props will still be an object
user1596138
You'll be checking undefined === false
@Jhoverit Exactly
It would not behave as expected
user1596138
No you'd be dumb to check it explicitly as false
user1596138
That's what that is lol
15:07
@Jhoverit You don't get to tell me how to code. I might have very good reasons to check for false directly.
user1596138
I don' even know what we're talking about tho
There can be an explicit difference between false and undefined
False could be "I know it's false" and undefined could be "I don't know what it is"
I'm sorry, but what you just said is nonsense.
user1596138
It's a bool prop dude
@Jhoverit If you use TypeScript maybe
Also, a bool prop can be optional
What if the bool prop arrives from the server, and I want to display a spinner in case it's undefined?
15:09
false !== undefined
user1596138
Lol I don't understand this conversation sorry
i agree
user1596138
Like the premise.
There's a huge semantic difference between false and undefined, and throwing a lint warning/error about bool={false} instead of not passing anything is clearly an error.
!!s/TypeScript/Ugly/
15:09
@jAndy @Jhoverit If you use Ugly maybe (source)
user1596138
Ofc there's differences between undefined and false. Not sure what we disagree on other than that prop={false} or prop={undefined} would be absolutely retarded
user1596138
@MadaraUchiha Wait I found the disconnect.
user1596138
You mean bool={variable} and variable was false
@Jhoverit No, I mean bool={false}
user1596138
I thought you meant hardcoding false into a prop
user1596138
15:10
Oh, you dumb
user1596138
Hahaha
I completely disagree.
Here's your case
You have an optional parameter you usually pass like this bool={maybeBoolAndMaybeUndefined}
user1596138
Agree to disagree. I run linter rules that don't allow that.
Now I want to instantiate this in a test
user1596138
I would always default a bool prop to falsey
15:11
How do you differentiate between undefined and false?
user1596138
It could then only be set to truthy
user1596138
It's different arch. Simple as that
user1596138
@MadaraUchiha I don't. I only care if the bool is truthy, there are only two states
user1596138
I have no need for multiple falsey states.
@Jhoverit But what if you did?
15:12
@Jhoverit Fine, you don't, today
but he doesnt
user1596138
I would write my code differently
bool is binary
user1596138
You can't get "stuck" with that. You have to choose to do that
But I just gave you 3 cases where it's completely reasonable for a prop to be undefined
user1596138
15:12
@MadaraUchiha Never. Because that's how I architect my code
user1596138
And there were other ways to do them.
i personally agree, though
user1596138
I'm not saying anything is objectively "wrong", just that this is not a scenario you can ever get stuck with. And I wouldn't make the choice to do it that way.
@Tobiq We all know what a boolean is
user1596138
15:15
His isn't a strict bool by any means
We don't need the Wikipedia article on the subject, thank you
Reading the whole thing, I'm not sure who's right here.
You're both rude to each other, but you make compelling arguments.
user1596138
There isn't a right IMHO
Yeah, I agree.
I can see the argument for treating undefined as "no prop" because that's what the DOM does, and there is a compelling argument for explicit false.
user1596138
15:16
I didn't think anyone was being rude.
@Jhoverit Can there at least be an alt-right?
user1596138
@BenjaminGruenbaum I use defaults tho
All I'm saying is that if there's a possibility of a true | false | undefined situation, that rule will confuse you.
@BenjaminGruenbaum i do now, you should find me through my e-mai
user1596138
So it would be explicit false if it wasn't defined.
15:17
That's all
my skype id was randomly generated.. rip
7 mins ago, by Jhoverit
Oh, you dumb
@bitten great can you send Guy an email about that?
user1596138
I thought that was obviously not srsly
Interesting... arstechnica.com/information-technology/2017/08/… Apple is one company that can definitely afford to throw buttloads of cash toward making TV shows
@BenjaminGruenbaum already have ^^
15:18
@bitten great
@TylerH There are 14 competing standards...
Netflix shows are actually really good
@SterlingArcher which ones?
mostly they're just replacing decent content with their originals
I can't wait for other companies to start churning out good stuff too
@ssube their marvel stuff is good
I'm tempted to drop my netflix subscription and just stick with the others, they have so little stuff now
15:20
Narcos and House Of Cards are Netflix Originals, right?
@SterlingArcher I guess, if you like that
there's others too but i need to see a list to tell you
Orange is the New Black, etc
it's a bunch of "look how edgy" stuff that turns out to be super trite and bland
@MadaraUchiha hey, if they make some good shows, they can be pirated
The whole idea is that I pay to one service provider and get content from everyone
15:21
@GNi33 And Lilyhammer, OITNB, Stranger Things.
The whole Netflix model is kinda moot if I have to pay those $8/mo to 15 different services
can I ask something unrelated to this room-owner-beef
user1596138
4 mins ago, by Madara Uchiha
All I'm saying is that if there's a possibility of a true | false | undefined situation, that rule will confuse you.
Sense8 and Stranger Things are also amazing shows
@Trasiva so basically everything that was watchable the last couple of years?
15:21
@MadaraUchiha Yeah see the thing is with American companies you don't ever get that
apart from GoT obviously
user1596138
@MadaraUchiha no it won't. If you use defaultProps to set false on a bool, and then set a prop to undefined, it will be false
because competition
@TylerH Steam kinda pulled it off
user1596138
Only a truthy value will override the default
user1596138
15:22
Does my reasoning make more sense now?
Kinda
@GNi33 Oh, and Ozarks. I highly recommend that one.
@Jhoverit It does.
still have to compete with Blizzard and Ubisoft though
That was the missing piece
user1596138
15:22
If I had thought to say that at the start... :)
@TylerH Sure, but only for like 10 games out of thousands
@SterlingArcher haven't heard of of sense8, gotta check it out
user1596138
My bad
@MadaraUchiha After a lot of negotiation and revising their DRM for a few publishers
it cost them a ton of money and eventually didn't work (EA and Ubi pulled their inventories)
@MadaraUchiha I think the split will become more and more
15:22
@ssube Never said it was easy, just that they pulled it off.
EA has had its own service for a long time now as well
they didn't, though
@KamilSolecki there's a decent amount of gay sex orgying but the shows concept is great, and very well diversely acted
it was a complete waste of money
@ssube What was?
15:23
@MadaraUchiha courting EA and the other big publishers
@ssube Ah, for sure
they all left anyway, Bethesda might be the only one left
@SterlingArcher I don't mind gay sex thing as long as it fits a good plot and makes sense there
But Steam basically owns the indie market
and pre-Skyrim (for Portal 2) they redid their DRM to try and draw more AAA titles
15:24
@KamilSolecki it does, tl;dr they're all mind connected, so they're all very in tune with one another which apparently leads to gay sex
so it makes sense
@GNi33 I forgot that EA wasn't a partner of Ubisoft
@MadaraUchiha GoG is getting bigger
it's just.. graphic
@MadaraUchiha they do, far more than Netflix owns the shitty TV market or Amazon owns the B movie market
so yeah, GoG, EA, Ubisoft, Steam, and Blizzard
15:25
so I'll see them competing in the future as well
in the indie market
@SterlingArcher I fucking hope that wasn't a spoiler :P
@GNi33 Sure
And honestly, I prefer GoG due to no DRM
but for indie it makes sense to be present on multiple platforms
@GNi33 really? I thought they had mostly died out and been replaced by others.
no lol not in the slightest @KamilSolecki
15:25
@KendallFrey @KamilSolecki can i ask about gravity
the big issue will always be big publishers
There's good action too, like really good
Humble and the other bundle/sale sites have pretty much replaced GoG, everywhere I see.
@Tobiq I don't know, can you?
What I don't want is to have 20+ spyware bloatware crapware launchers for 20+ games
15:26
come to physics room
h-bar
@SterlingArcher Good, since if it was, I'd personally come to US just to break all your golf clubs.
@ssube not that I know of, but I have to add that this statement is subjective
what tools do you guys use for testing?
@Daruchini Mocha, Karma
user1596138
@ssube Yes.
15:26
@KamilSolecki you can break all my clubs, just not my hybrid
@MadaraUchiha on the ball. thanks ;)
@Daruchini what Madara said, + Istanbul and Sinon
it's my favorite club and it only costed me $30
my irons are old, my driver is good but old, and my putter is decent. but god help you if you touch my hyrbid 3
I made my girlfriend promise that if I ever try golfing, she'll execute me
well, you'll never be president
15:27
./GNi33
I think I need to learn to write to a proper design pattern too. My code atm is in modules but the modules are getting pretty big
@GNi33 GNi33.golf().then(GNi33.execute.bind(GNi33))
golf is fun man, you get shitfaced on the front 9 and by the back 9 you're relaxed enough to play well
@Daruchini make em... not big?
@ssube should I just delete some code and call it a day??
15:28
@SterlingArcher I can think of a billion better ways to waste my time tbh
but hey, that's just me
@all please suggest me an online tutorial site for learning javascript
@SterlingArcher if I wanted to drive around and hit stuff with sticks, I'd go hunting mailboxesw
@Sonevol 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.
@ssube I can't wait for the first POTUS who spends their vacation doing something other than golfing
15:29
@Sonevol freecodecamp
I want a gamer POTUS
@TylerH Obama was the closest we ever got
@ssube golf is about that one shot that always brings you back
I still find it amazing that he managed to singlehandedly close a subreddit
15:29
@SterlingArcher lolwut
@MadaraUchiha nah he still golfed
I want one who doesn't play golf at all
like a couple months ago I hit a long iron pin high, and literally hit the pin. Next week, I sunk a long par putt
@TylerH People would flip shit.
@TylerH "President Tyler spent yet another weekend in his Florida residence owning n00bs in SC2 rather than spending time working in the White House! Disgraceful!"
@GNi33 it seems lame if you haven't tried it. But It really pulls you in with the difficulty level
15:30
@TylerH What does that have to do with being a gamer?
user1596138
I'm glad T golfs
@GNi33 Sad!
user1596138
It saves us millions of dollars vs him going to his residences or the Tower
sure does
@GNi33 We have AIs for that now
15:30
@GNi33 :-D
Actually I would be playing Starcraft HD instead
AoE 2 all day long
Considering the high stress level of the presidency job, I give no shits how often any president goes golfing
@SterlingArcher But you're not telling us about the time you putted into the pond.
@MadaraUchiha Nothing, they are two separate wishes
I want one who is a videogamer, but mostly I want one who does not play golf
15:31
@KendallFrey i've never messed up a putt that bad. I've definitely shanked a short chip into the water for sure
@Tobiq It doesn't say that
@KendallFrey every golfer sinks his balls one day
say what
my putting issue is I don't know how to gauge power, so I'm always short on those long putts
15:32
4:00, it's beautiful
in The h Bar on The Stack Exchange Network Chat, 3 mins ago, by AccidentalFourierTransform
it doesnt say only
lol why not reply in hbar
confusing
Because I'm here
fair enough
@SterlingArcher have the same thing. I'm fine with the short putts, but I always undershoot long ones because I'm afraid of overshooting and going off the tee.
15:34
^^ so much that
My big thing right now is my drives
@KamilSolecki you shouldn't be using tees for putts even if they are long
or you're golfing wrong
They're too wild, so I'm working on slowing down and taking a 150yard straight shot vs a 250yard wild right shot
@KamilSolecki Please explain why you're putting from the tee
@SterlingArcher that's the only big thing you got
my short game is pretty good, until it comes to super short chips. I almost always clip it wrong
!!afk vape
15:38
omg, there's a patient at this hospital named homer simpson
naming things is hard
@KendallFrey I missed the Dragon pick up D:
> .length does not work with latest java scripts. – amit_kumar 2 hours ago
flagged for being wrong af
@KendallFrey @TylerH yeah I did mean green
If I've found a bug with a specific combination of babel-plugins, but I can't figure out exactly which plugin is at fault (if there's a single one at fault), is it appropriate to open a github issue against the plugins?
Not until you figure out the exact condition that causes it.
eh, only if you can consistently recreate it.
with a very small sample
15:54
Yeah, I've got a minimal reproducible example.
Then I'd say go ahead.
Make sure it's not the plugin's order, first.
That's bitten a few people here.
0
Q: Is it possible to install and run postgres from NPM?

ShorelineI know there are postgres packages which allow nodejs to connect to the database if it is already up and running, and I know there are ORMs. Are there any npm packages which act as a wrapper to starting postgres? Basically I'm trying to find a way to keep all my setup within 'npm install' and '...

not really a good SO question, but is this possible?
15:56
@SterlingArcher totally
there are a bunch of Go packages that distribute themselves with NPM because they didn't want to set up something else
There is an order component to it, it only blows up if one plugin is before another
tons of binary-only packages on npm
@Retsam I'm curious to see this issue, if you've posted it anywhere yet.
@ssube what about using npm scripts to create the environment as well -- e.g. running shell commands? Seems like another viable option
Short enough to paste
@Retsam Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
15:57
"Starting" postgres? Couldn't you use child_process?
@SterlingArcher npm scripts start to suck as soon as you triple escape a variable inside of an env var inside of the JSON
{
    "plugins": [
        "transform-es2015-spread",
        ["espower", {
            "patterns": ["t.true(value, [message])"]
        }],
        "lodash"
    ]
}
they're worthless for anything big and not great for smaller stuff, tbh
That babel config causes a problem with this code
import _ from "lodash";

t.true(_.isEqual("foo", "bar"))
no shit? so how would you trigger those go packages to do the (for example) db or key store servers?
Like if I wanted SU to be distributable, I'd need to package mysql and redis with it
15:59
@SterlingArcher I haven't seen anybody using npm to package or launch environments, that's more of a docker compose thing
The actual blow up is on "transform-es2015-spread", but only blows up if I'm using both the "lodash" and the "espower" plugin, and only if "espower" comes before lodash.
now, you can totally put the compose file in your package and have npm kick off a make task or something to launch it
@ssube makes sense I guess, it's not really node's cup of tea to do that

« first day (2496 days earlier)      last day (2675 days later) »