These are chat archives for FreeCodeCamp/Help

20th
Sep 2018
Kyle Holm
@thekholm80
Sep 20 2018 00:07
@bjorno43 this is SO
Elias Curran
@eliascurran
Sep 20 2018 00:15
hey can you guys help me with this challenge i'm stuck on.
my code:
class MyComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      itemCount: 0
    };
    // change code below this line
this.handleClick = this.itemCount.bind(this)
    // change code above this line
  }
  addItem() {
    this.setState({
      itemCount: this.state.itemCount + 1
    });
  }
  render() {
    return (
      <div>
        { /* change code below this line */ }
        <button>Click Me{onclick = this.itemCount}</button>
        { /* change code above this line */ }
        <h1>Current Item Count: {this.state.itemCount}</h1>
      </div>
    );
  }
};
by the way its an FCC challenge if you are wondering
Kyle Holm
@thekholm80
Sep 20 2018 00:16
you should put the onclick handler inside the button tag, as an attribute
<button onclick={ ... }>
Elias Curran
@eliascurran
Sep 20 2018 00:17
thanks ill try that.
is this what you meant? i'm not sure
class MyComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      itemCount: 0
    };
    // change code below this line
this.handleClick = this.itemCount.bind(this)
    // change code above this line
  }
  addItem() {
    this.setState({
      itemCount: this.state.itemCount + 1
    });
  }
  render() {
    return (
      <div>
        { /* change code below this line */ }
        <button>Click Me onclick</button>
        <button onclick = {this.handleClick}>
        { /* change code above this line */ }
        <h1>Current Item Count: {this.state.itemCount}</h1>
      </div>
    );
  }
};
Kyle Holm
@thekholm80
Sep 20 2018 00:19
how many buttons do you need?
Elias Curran
@eliascurran
Sep 20 2018 00:19
only one
Kyle Holm
@thekholm80
Sep 20 2018 00:20
how many do you have?
Elias Curran
@eliascurran
Sep 20 2018 00:21
well one, but the screen isn't displaying anything because of a syntax error.
Kyle Holm
@thekholm80
Sep 20 2018 00:21
right. react requires closing tags for all elements
you have opening tag <button>Click Me onclick</button> with a closing tag
then <button onclick = { ... }> a second opening tag
with no closing tag
Elias Curran
@eliascurran
Sep 20 2018 00:22
oh, ok
i'm not sure whether to put the onclick in the first or the or make a second one.
Kyle Holm
@thekholm80
Sep 20 2018 00:25
how many buttons do you need?
Elias Curran
@eliascurran
Sep 20 2018 00:25
only one
Kyle Holm
@thekholm80
Sep 20 2018 00:25
one button is one opening tag and one closing tag
<button attribute='value'>Button Text</button>
Elias Curran
@eliascurran
Sep 20 2018 00:26
ok, sorry im a newbie
Kyle Holm
@thekholm80
Sep 20 2018 00:27
it's the same structure as html
Elias Curran
@eliascurran
Sep 20 2018 00:27
it gets me confused just because there is also java script in the mix as well.
abraham anak agung
@padunk
Sep 20 2018 00:29
react is js. you need to bind your method, not the state
Kyle Holm
@thekholm80
Sep 20 2018 00:29
oh i didn't even notice that
abraham anak agung
@padunk
Sep 20 2018 00:30
and just assign the method in the button onclick event
Elias Curran
@eliascurran
Sep 20 2018 00:30
how do i do that?
Kyle Holm
@thekholm80
Sep 20 2018 00:31
this.method = this.method.bind(this)
not this.method = this.property.bind(this)
use the same names
Elias Curran
@eliascurran
Sep 20 2018 00:32
ok
abraham anak agung
@padunk
Sep 20 2018 00:32
additem is a method
Elias Curran
@eliascurran
Sep 20 2018 00:33

hows this ```

this.handleClick = this.handleClick.bind(this);
```

Kyle Holm
@thekholm80
Sep 20 2018 00:33
there you go
Elias Curran
@eliascurran
Sep 20 2018 00:33
but it repeats " cannot read property of bind x3"
Kyle Holm
@thekholm80
Sep 20 2018 00:34
oh your method is called addItem not handleClick
// this is your method
  addItem() {
    this.setState({
      itemCount: this.state.itemCount + 1
    });
  }
Karma Drukpa
@coderkarma
Sep 20 2018 00:35
?
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:35

@thekholm80 True. Though he's clearly not following any of SO's guidelines:

  • The question doesn't show any research efford
  • The user doesn't show any of his code
  • The user doesn't show anything (s)he tried before asking
  • The user is tagging a datatable because that's where his / her info is coming from, but the question isn't related to it at all

The comment doesn't make any sense at all though

Kyle Holm
@thekholm80
Sep 20 2018 00:35
@bjorno43 the whole thing sums up SO perfectly

How do I X ?

You don't X nobody does X

Elias Curran
@eliascurran
Sep 20 2018 00:37
well the addItem is my method
Kyle Holm
@thekholm80
Sep 20 2018 00:37
yes
that's what i'm saying
so binding handleClick in your constructor is useless because it's not your method
addItem is your method
Elias Curran
@eliascurran
Sep 20 2018 00:38
this.itemCount = this.itemCount.bind(this);
Kyle Holm
@thekholm80
Sep 20 2018 00:38
addItem
not itemCount
Elias Curran
@eliascurran
Sep 20 2018 00:38
woops
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:40
That might be true. But in this case I understand the downvotes. I'm not defending SO as the community has a lot to learn. But if you can't be bothered to read SO's help section and guidelines, which you are clearly told to do when you register, then you shouldn't complain that the community doesn't help you
Kyle Holm
@thekholm80
Sep 20 2018 00:41
lol Bob it's a joke. I'd be surprised if it wasn't photoshopped
Elias Curran
@eliascurran
Sep 20 2018 00:41
im not complaining
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:41
Probably not. I've seen hundreds of questions like that. Lots of em even worse :P
Elias Curran
@eliascurran
Sep 20 2018 00:41
im like 12 so this is very hard on its own
Kyle Holm
@thekholm80
Sep 20 2018 00:41
@eliascurran we're talking about a picture i posted
not your code
Elias Curran
@eliascurran
Sep 20 2018 00:42
oh
Manish Giri
@Manish-Giri
Sep 20 2018 00:42
i'm surprised you aren't a mod yet on SO
you'd make a very good mod.
austinrugraff
@austinrugraff
Sep 20 2018 00:42
Hi everyone, does someone know how I could automate file downloads, or more specifically csv file downloads, to go directly to my google drive?
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:42
@eliascurran Ye no worries. This is actually a community for beginners. It's fine to ask "simple" questions here :)
Elias Curran
@eliascurran
Sep 20 2018 00:42
thanks
Kyle Holm
@thekholm80
Sep 20 2018 00:43
@Manish-Giri i'm sure you mean me, not Bob. Can you even imagine Bob as a mod? scary
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:43
:joy:
I wouldn't want to be a mod at SO. Not even if they asked me to. You'll have to spend at least 2 hours a day there and it still wouldn't be anywhere near enough to deal with all the issues, lol
Manish Giri
@Manish-Giri
Sep 20 2018 00:46
I imagine newbies would be made to read the rules section 10x times, and then write code to print out the rules 20x times, exactly as those rules. Only when that code passes SO's checks, can they actually post their question.
Kyle Holm
@thekholm80
Sep 20 2018 00:46
and they'd have to write that code in php
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:48
Well I was actually one of the few ppl that answered such questions anyway. But I eventually had to stop doing that as you're actually "punished" for doing so. Instead I displayed my email address on my profile so users could privately contact me for help. Which resulted in users threatening me because they assumed I was downvoting their questions while I hardly ever downvote anything. So had to stop doing that as well..
Kyle Holm
@thekholm80
Sep 20 2018 00:49
sometimes you just gotta admit some things can't be fixed
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:51
Yup
Kyle Holm
@thekholm80
Sep 20 2018 00:51
i see @Manish-Giri write extremely well thought out questions, with examples and all the steps he's taken and his eye color and blood type and everything and they just get ignored
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:52
Nah. That's actually the point where you're asking questions that hardly anyone knows the answer to. I've been there myself :joy:
Kyle Holm
@thekholm80
Sep 20 2018 00:52
so everything that people can answer gets marked as a duplicate, everything new just sits ignored
well ... not everything obviously but you get what i mean
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:54
Well it's pretty hard to ask a question that hasn't been asked before, lol. Though I hate the duplicate system. In many cases questions are marked as duplicates while they clearly aren't. Simply because some idiots make assumptions instead of actually trying to understand the question first
austinrugraff
@austinrugraff
Sep 20 2018 00:54
Hi everyone, I really need help with the question I asked above. If no one knows do you know of a good source where i could find that intel?
Kyle Holm
@thekholm80
Sep 20 2018 00:55
@austinrugraff i'd suggest googling
google actually has awesome help docs and a huge community to help with their products
Bjorn van de Peut
@bjorno43
Sep 20 2018 00:57
@austinrugraff That question has nothing to do with FCC's curriculum. It's very unlikely that you'll get an answer for it here. Besides that, you're not providing enough information. Like which language you want to use for this
Kyle Holm
@thekholm80
Sep 20 2018 01:02
dang where's smoot
bob, does c++ require that stupid { and } on their own line? or do people just do that because they want to drive me nuts?
Bjorn van de Peut
@bjorno43
Sep 20 2018 01:05
They just want to drive you nuts :P
Kyle Holm
@thekholm80
Sep 20 2018 01:05
i just don't get it
Bjorn van de Peut
@bjorno43
Sep 20 2018 01:06
It's just a matter of preference. I tend to put my opening brackets on the same line as well. Only my closing brackets are on a new line
Kyle Holm
@thekholm80
Sep 20 2018 01:06
well yeah, that's the way any normal, doesn't-torture-small-animals, kind of person would do it
Bjorn van de Peut
@bjorno43
Sep 20 2018 01:08
Unless I'm hard coding my setters and getters in PHP. Those are so small, it fits on 1 line: public function getVar(){ return $this->var; }
Kyle Holm
@thekholm80
Sep 20 2018 01:08
@Manish-Giri so women are instances of a class?
@bjorno43 that's one thing i love about JS arrow functions. the implicit return means you can skip the { }
looks so clean
Bjorn van de Peut
@bjorno43
Sep 20 2018 01:21
I heard a joke about some shop that sold the "perfect men" for woman. So a woman went inside. On the first floor the sign stated "These men are friendly". She moved on to the second floor. There the sign stated "These men are friendly and good looking". Now intrigued, the woman moved on to the third floor. "These men are friendly, good looking and will always listen to your stories". As excited as the woman was, she moved on to the forth floor. "These men are friendly, good looking, listen to your stories and are more than happy to help out in the house". The woman couldn't be happier! But there was still a fifth floor. So she went up again and found an empty room with only a sign "The fact that you're here is proof that woman are never content with what they can have"
Karma Drukpa
@coderkarma
Sep 20 2018 01:23
@bjorno43 hahahah, why is that ? why women are never content?
Bjorn van de Peut
@bjorno43
Sep 20 2018 01:27
@coderkarma Truth be told, it usually means you simply havent met the right woman yet. There are definitely a lot of woman out there that aren't so superficial
Though a couple of years ago there was an advertisement here for mobile phones. It stated that you're happy with what you have untill you can get something better. I actually used that line in a break up with an ex of mine. Not sorry though. She was a psycho and it turned out she was cheating on me with several others
Karma Drukpa
@coderkarma
Sep 20 2018 02:01
@bjorno43 what the hell? that's bad, sorry for you that you trusted her.
Bjorn van de Peut
@bjorno43
Sep 20 2018 02:05
@coderkarma It's in the past. I've made my peace with it. Found another woman with whom I've been happy with for almost 3 years now :) Though ye, I still have trust issues from time to time. Luckily I'm able to suppress those.
Karma Drukpa
@coderkarma
Sep 20 2018 02:09
@bjorno43 glad that you found your girl and happy with her. but yes I do have trust issue with any girl cause their mind changes like a weather app.
Kyle Holm
@thekholm80
Sep 20 2018 02:34
this show got dark all the sudden
Niraj Nandish
@Nirajn2311
Sep 20 2018 02:37
Which show
Kyle Holm
@thekholm80
Sep 20 2018 02:37
the gitter show with bob and karma
Aditya
@ezioda004
Sep 20 2018 02:40
@thekholm80 { }
Kyle Holm
@thekholm80
Sep 20 2018 02:41
@ezioda004 yes!
lol
Aditya
@ezioda004
Sep 20 2018 02:42
In CS50 your style points would be reduced if you did
int main(){

}
I was like, you win this one David
Kyle Holm
@thekholm80
Sep 20 2018 02:44
lol i'll forgive him though because i love the way he lectures
Karma Drukpa
@coderkarma
Sep 20 2018 02:50
Show is over .
Benching now.
Lance
@texas2010
Sep 20 2018 02:55
umm
Claudio Restifo
@Marmiz
Sep 20 2018 04:09
Someone here has used the new context api from React?
Kyle Holm
@thekholm80
Sep 20 2018 04:14
@Marmiz i have
Claudio Restifo
@Marmiz
Sep 20 2018 04:17

good, I have a doubt.
Imagine:

<RootComponentWithManyChild />

I want to refactor it to Context since some of those sub-sub-child need access to Root - soon to be- state values.

Now imagine I have multiple RootComponent

<RootComponentWithManyChild />
<RootComponentWithManyChild />
<RootComponentWithManyChild />
<RootComponentWithManyChild />

How can I make sure that each has its own context?
Or in other word, if the data would be in state, there would be no problem since each Root will have its own.
How can I ensure that with Context?

context has to be created within each Root? @thekholm80
Kyle Holm
@thekholm80
Sep 20 2018 04:18
i like to create different contexts for each group of uses
then each context will have it's own set of provider/consumers
i think it keeps my code more manageable
Claudio Restifo
@Marmiz
Sep 20 2018 04:19
You have a dummy example to help me visualize it?
Having so will ensure that each Root will have its own provider?
<Root
   createContext=()
/>
Kyle Holm
@thekholm80
Sep 20 2018 04:24
i don't have my vms booted now, so i'm going from memory but imagine
<Root>
  <HeaderWithAuth>
    <AuthContext.Provider>
      <HeaderText />
      <AuthContext.Consumer>
        <LoginModalWithContextData />
      </AuthContext.Consumer>
    </AuthContext.Provider>
  </HeaderWithAuth>
  <NextLevel>
    <AnotherContext.Provider>
  ....
</Root>
for my context i always
/*  AuthContext.js */
import React from 'react';

export default React.createContext();
then i can get the context wherever i need it
import the specific context in the provider file
and i generally have a generic HOC to wrap my consumer components, to simplify that process
export default withContext(Component, context);
makes it nice and clean
Claudio Restifo
@Marmiz
Sep 20 2018 04:27

Yes I got that. So in this case you write the data you want unique into the AuthContext.js file as state?

(better since otherwise each change re-renders all consumer btw)

Kyle Holm
@thekholm80
Sep 20 2018 04:28
in each context provider data is state and methods are normal
the provider is just a fancy class-based HOC
Claudio Restifo
@Marmiz
Sep 20 2018 04:29

Oh gotha. So

  <AuthContext.Provider>

Is just because AuthContext.js is returning {Provider, Consumer} since you are exporting React.createContext()

even easier than I thought
Kyle Holm
@thekholm80
Sep 20 2018 04:29
yep!
i have a codesandbox somewhere, trying to find it
Claudio Restifo
@Marmiz
Sep 20 2018 04:30
no it's good
Claudio Restifo
@Marmiz
Sep 20 2018 04:30
thanks @thekholm80 :sparkles:
Kyle Holm
@thekholm80
Sep 20 2018 04:30
:+1:
that sandbox is old but close to how i do it now
Hall
@channinghall
Sep 20 2018 04:35
blockquote .thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
Claudio Restifo
@Marmiz
Sep 20 2018 04:37
@thekholm80 who needs redux anymore?
unless for timetravel bug tracking
@channinghall the thick-green-border class will be applied only if it's a child of a blockquote element
Kyle Holm
@thekholm80
Sep 20 2018 04:40
i think there's still some benefit if you're using sagas or epics
Claudio Restifo
@Marmiz
Sep 20 2018 04:41
@thekholm80 I think it's probably for really REALLY large projects.
FB - Netflix or similar.
We are slowly moving away from it
Kyle Holm
@thekholm80
Sep 20 2018 04:42
i don't use redux anymore simply because my projects are so simple lol
and built in functionality > importing huge libraries
also, if it wasn't for the context api i'd never have figured out HOCs
Claudio Restifo
@Marmiz
Sep 20 2018 04:48

I got HOC when I started writing components as functions. Then I had to move them to be class...
until realised that they could have stayed as functions, as long as I wrap them with another function...

ding ding ding!

Karma Drukpa
@coderkarma
Sep 20 2018 04:51
@Marmiz @thekholm80 with spread operator, we could copy anything in js
psyperl
@psyperl
Sep 20 2018 04:52
can we copy the entire global function/class and make shadow lib? :trollface:
Claudio Restifo
@Marmiz
Sep 20 2018 04:52
@coderkarma not your creditcard info tho
Karma Drukpa
@coderkarma
Sep 20 2018 04:53
hahahhaha
Karma Drukpa
@coderkarma
Sep 20 2018 05:00
const hobby = { name: "karma",
    age: 40,
    location: "sikkim",
    address: "403 e 19 st",
    game : ["footbal", "volleybal", "cricket"]

}
const {age,location, game} = hobby;
console.log(age, location, game[0]);
@Marmiz is this the way of destructuring things
@thekholm80
psyperl
@psyperl
Sep 20 2018 05:01
const shadow = [...Object.keys(window)].map( e => window[e] )
Aditya
@ezioda004
Sep 20 2018 05:03
@coderkarma Seems fine, though locationis a reserved identifier
@psyperl Why [...]?
You'll get the new array from Object.keys() anyway
Karma Drukpa
@coderkarma
Sep 20 2018 05:04
@ezioda004 how are you man?
Aditya
@ezioda004
Sep 20 2018 05:05
Cant complain
Karma Drukpa
@coderkarma
Sep 20 2018 05:05
sweet.
Aditya
@ezioda004
Sep 20 2018 05:06
How about you? Hows the classes coming?
psyperl
@psyperl
Sep 20 2018 05:07
@ezioda004 because of this :point_up: September 20, 2018 11:51 AM
Karma Drukpa
@coderkarma
Sep 20 2018 05:07
Commut is terrible but class is just fine. basic stuff going on but instructor teaching so randomly.
:confused:
psyperl
@psyperl
Sep 20 2018 05:08
i didn't know 'instructor' is part of the class .. i thought only 'constructor' and 'destructor'
Aditya
@ezioda004
Sep 20 2018 05:09
@psyperl Still doesnt make sense to me :smile:
@coderkarma Yeah I feel ya, I managed to piss off my C teacher on the first day within 30mins, then I realized I'll have to self study and not rely on the classes
psyperl
@psyperl
Sep 20 2018 05:09
@ezioda004 yeah well making shadow copy on it's own doesn't make sense in the first place :p

and not rely on the classes

sounds good let's make function!

is not a C teacher if they teach you to rely on classes .. only C++ teacher would
Aditya
@ezioda004
Sep 20 2018 05:11
But if functions are classes arent you making a callable object :thought_balloon:
psyperl
@psyperl
Sep 20 2018 05:12
now that's JS :D
Aditya
@ezioda004
Sep 20 2018 05:13
Karma Drukpa
@coderkarma
Sep 20 2018 05:18
@ezioda004 yes very true, can't just rely on the class. I have to self study many hours to get better otherwise no chance of getting skills and job overal.
psyperl
@psyperl
Sep 20 2018 05:20
i saw a video of RC conference in EU the other day .. makes me want to have them and play with Wi-Fi protocol to control them.. ( but these are out of my skillset ) RC
putting camera on the driver seat will make it feel like a first person view
Henry
@GitHub-Henry
Sep 20 2018 06:00
Anyone understand Reactjs key codes? I press 'a' and get keycode 97. I thought 'a' was key code 65? Can someone explain why the difference?
image.png
alpox
@alpox
Sep 20 2018 06:04
@GitHub-Henry 'A' is code 65. 'a' is code 97
Henry
@GitHub-Henry
Sep 20 2018 06:04
thanks
Josh Buckland
@buck06191
Sep 20 2018 08:18
Hey, I'm currently trying to run the Information Security stuff using Glitch. I've added Helmet as a dependency and required it. https://vivacious-artichoke.glitch.me/ Can anyone see where I've gone wrong?
I launched a new Glitch instance and it now works. I think I had used a normal Glitch project rather than an FCC one
Bjorn van de Peut
@bjorno43
Sep 20 2018 09:02
That moment someone keeps complaining your "download code" doesn't work and you eventually realise he's trying to download the file through ajax..
Ye. It's not possible to download a file that's being sent with a filereader through Ajax :joy:
It'll be like the returned data actually contains a file. JS be like: The hell am I supposed to with this?!
Claudio Restifo
@Marmiz
Sep 20 2018 09:29
can't you blob the content and then somehow read the binary with fetch?
I hope browser prevent this tho...
Bjorn van de Peut
@bjorno43
Sep 20 2018 09:41
@Marmiz I'm not sure. I've never tried it actually cuz it's pointless. If you're trying to download a file, all you would have to do is location.href = /go/to/file.zip. As it only returns a file, you'll simply remain on the page where you are.
Claudio Restifo
@Marmiz
Sep 20 2018 09:44
ye but that's too easy. Where's the fun :sparkles: and magic :sparkles:
Bjorn van de Peut
@bjorno43
Sep 20 2018 09:44
:joy:
May Kittens Devour Your Soul
@diomed
Sep 20 2018 09:46
I believe it was Benjamin Franklin who said: "You have reached the end of you free trial membership at BenjaminFranklinQuotes.com."
julien Demarque
@JulienDemarque
Sep 20 2018 09:50
Someone can help debug my redux app? I am getting "Cannot read property 'props' of undefined" line 21 of Container: https://github.com/JulienDemarque/simple-redux-todo-app
Bjorn van de Peut
@bjorno43
Sep 20 2018 09:53
@JulienDemarque At least tell us in which file that error pops up. Don't make us dig through all your files and hope for the best
julien Demarque
@JulienDemarque
Sep 20 2018 09:54
line 21 of ./js/containers/Container.jsx
Claudio Restifo
@Marmiz
Sep 20 2018 09:56
@JulienDemarque don't call the action and the action callee the same. They are both addTodo, maybe one is washing the other
I usually call the dispatcher onSomething: dispatch(something)
julien Demarque
@JulienDemarque
Sep 20 2018 09:58
@Marmiz I giving it a try now...
@Marmiz the error is still there... What is strange in the error is that it means "this" is undefined? How is it possible?
Claudio Restifo
@Marmiz
Sep 20 2018 10:01
oh yeah, you have this still bounded to the function and not the class instance
you either convert it to an arrow function or bind(this) in constructor
up to you
Bjorn van de Peut
@bjorno43
Sep 20 2018 10:03
@Marmiz lol, beat me to it. Was just about to say the same. Had that annoying issue myself for a while in a vanilla js object
julien Demarque
@JulienDemarque
Sep 20 2018 10:03
@Marmiz Thanks I just saw it now :)
I was so focused on the redux part that I forgot to bind my method...
abraham anak agung
@padunk
Sep 20 2018 10:09
@JulienDemarque shouldn't it be addTodo = todo => your code on the map dispatch
Aditya
@ezioda004
Sep 20 2018 10:11
Either that or have explicit return dispatch(addTodo(todo));
May Kittens Devour Your Soul
@diomed
Sep 20 2018 10:12
who is this dr. Norman Borlaugh?
julien Demarque
@JulienDemarque
Sep 20 2018 10:16
@padunk @ezioda004 I don't know, I followed the syntax from freecodecamp line 79 : https://learn.freecodecamp.org/front-end-libraries/react-and-redux/extract-local-state-into-redux
Manish Giri
@Manish-Giri
Sep 20 2018 10:27
@diomed :cat:
May Kittens Devour Your Soul
@diomed
Sep 20 2018 10:29
@Manish-Giri out of nowhere :cat:
Aditya
@ezioda004
Sep 20 2018 10:31
@JulienDemarque I'm guessing mapDispatchToProps acts as a container and provides dispatch function, dispatch()dispatches stuff to the reducers so no return statement is required, kinda weird from FP perspective (no return)
ifysucre
@ifysucre
Sep 20 2018 10:32
hello all. Please I have been stuck on a particular task for a bit now & I still cannot tell what I am doing wrong... @psyperl where you at?
psyperl
@psyperl
Sep 20 2018 10:33
@ifysucre i will be here in 15minutes
Claudio Restifo
@Marmiz
Sep 20 2018 10:34

@ezioda004 you don't need to return, the function will return undefined.

const example = int => {
  someCallback(int)
}

It works. example returns undefined (but trigger the callback)

psyperl
@psyperl
Sep 20 2018 10:34
@ifysucre do ask your question anyway.. lots of ppl here could help also
Claudio Restifo
@Marmiz
Sep 20 2018 10:35
there's a name for when a function inside a function access the parent args and variables. Don't remember tho...
hoisting?
Aditya
@ezioda004
Sep 20 2018 10:35
@Marmiz Yeah I reckon, I was expecting Redux to follow pure function
arguments object?
Manish Giri
@Manish-Giri
Sep 20 2018 10:36
Closure
Claudio Restifo
@Marmiz
Sep 20 2018 10:36
@ezioda004 i think it just wants an object. That's all
@Manish-Giri bingo! closure! :sparkles:
Manish Giri
@Manish-Giri
Sep 20 2018 10:37
:thumbsup:
Claudio Restifo
@Marmiz
Sep 20 2018 10:37
can't brain :skull:
Manish Giri
@Manish-Giri
Sep 20 2018 10:37
Lol
@Marmiz help me with threading
Claudio Restifo
@Marmiz
Sep 20 2018 10:39

the reading

ftfy

why you hate yourself that much @Manish-Giri ?
Manish Giri
@Manish-Giri
Sep 20 2018 10:39
:smirk_cat:
ifysucre
@ifysucre
Sep 20 2018 10:40
kitty ipsum.JPG
I can't seem to get it right #newbie
Manish Giri
@Manish-Giri
Sep 20 2018 10:40
Why isn’t there any dog emojis, I’ve always wondered
julien Demarque
@JulienDemarque
Sep 20 2018 10:40
connect function calls mapDispatchToProps with the dispatch function as a argument. mapDispatchToProps returns an object with one key being a function that dispatch the action... the pure function thing is for action creators and reducers if I remember
Manish Giri
@Manish-Giri
Sep 20 2018 10:41
@ifysucre <footer id=“...”>
ifysucre
@ifysucre
Sep 20 2018 10:41
@Manish-Giri aha thank you. let me try that
Manish Giri
@Manish-Giri
Sep 20 2018 10:42
:thumbsup:
May Kittens Devour Your Soul
@diomed
Sep 20 2018 10:42
@Manish-Giri :dog:
Manish Giri
@Manish-Giri
Sep 20 2018 10:43
@ifysucre with plain html elements, they almost all follow the same format..any attributes like id go in the opening tag..
Claudio Restifo
@Marmiz
Sep 20 2018 10:43
#burn :dog: :dog2:
ifysucre
@ifysucre
Sep 20 2018 10:43
@Manish-Giri it did't go still
something aint right
Manish Giri
@Manish-Giri
Sep 20 2018 10:44
@ifysucre post that line, or maybe a screenshot
@Marmiz are you on LinkedIn
Claudio Restifo
@Marmiz
Sep 20 2018 10:45
Yes. Never used it much tho @Manish-Giri
ifysucre
@ifysucre
Sep 20 2018 10:45
kitty ipsum.JPG
Manish Giri
@Manish-Giri
Sep 20 2018 10:45
@Marmiz cool, would you pm me your id/profile link..gonna pick your brain on a few things
May Kittens Devour Your Soul
@diomed
Sep 20 2018 10:46
@ifysucre your id doesnt have a name
Manish Giri
@Manish-Giri
Sep 20 2018 10:46
@ifysucre so every attribute needs to have a value
ifysucre
@ifysucre
Sep 20 2018 10:47
pls show me an example
Manish Giri
@Manish-Giri
Sep 20 2018 10:47
Like <span id=‘doggo’>
May Kittens Devour Your Soul
@diomed
Sep 20 2018 10:47
@Manish-Giri what a nice guy
ifysucre
@ifysucre
Sep 20 2018 10:47
oh okay
May Kittens Devour Your Soul
@diomed
Sep 20 2018 10:47
div id="maybethedingoateyourbaby"
Manish Giri
@Manish-Giri
Sep 20 2018 10:48
Oh wow
Much follow
ifysucre
@ifysucre
Sep 20 2018 10:59
stillaint get it...
<footer id="aguila">"Copyright Cat Photo App"</footer>
@Manish-Giri
Manish Giri
@Manish-Giri
Sep 20 2018 11:03
I think they want the id to be a specific value
@ifysucre
psyperl
@psyperl
Sep 20 2018 11:03
@ifysucre in case if you get confused with the naming term
ifysucre
@ifysucre
Sep 20 2018 11:03
yes yu are right
psyperl
@psyperl
Sep 20 2018 11:03
Screen Shot 2018-09-20 at 17.52.30.png
ifysucre
@ifysucre
Sep 20 2018 11:04
finally cossed that task. Muchas gracias :)
Manish Giri
@Manish-Giri
Sep 20 2018 11:04
Check the last failing test, they want the value of the id to be “footer”
De nada
May Kittens Devour Your Soul
@diomed
Sep 20 2018 11:30
@psyperl ELI5
Bjorn van de Peut
@bjorno43
Sep 20 2018 12:24
Ok I've just lost all hope for SO..
Appearently it's not allowed to help a new user with a bad question. Not even if you're taking them away from SO, because in the end they'll just be back again with a bad question in the hopes of getting help again. The only exception is that you take them to a place where their questions are acceptable so they can stay there in the future
They're gonna receive so my FCC advertisement it's not funny anymore..
Kyle Holm
@thekholm80
Sep 20 2018 13:14
lol
@bjorno43 i think it's awesome that you try
psyperl
@psyperl
Sep 20 2018 13:16
hi @thekholm80 i finally got a chance to put Promise.all in a good use.. nice to know it ahead of time thanks to you.. would have got stuck otherwise on the case of multi parameter requirement promises
Kyle Holm
@thekholm80
Sep 20 2018 13:17
oh sweet
when i discovered it (actually I think Chris told me about it) it was like a revelation. pretty amazing little method
psyperl
@psyperl
Sep 20 2018 13:20
yeah, i almost pass around previous promises data like a session, and that would make the code so ugly
psyperl
@psyperl
Sep 20 2018 13:32
Promises have solved my problem in coding that i've been asking myself since last year.
  1. how to keep the code in a structure in sequence of operation or asynchronous without breaking the code structure.
  2. how to represent complex function calls of a function in a diagram/tools to help me not to get lost in a code.. this makes it easier to draw
Kyle Holm
@thekholm80
Sep 20 2018 13:32
i think they're easier than threading, too
but to be fair i only have a basic understanding of threading
Aditya
@ezioda004
Sep 20 2018 13:33
Threading in JS?
Kyle Holm
@thekholm80
Sep 20 2018 13:33
well no, in any language
Aditya
@ezioda004
Sep 20 2018 13:33
Oh right
Kyle Holm
@thekholm80
Sep 20 2018 13:33
i mean the concept is simple but getting the threads to talk to each other, at the appropriate times isn't simple for me
Aditya
@ezioda004
Sep 20 2018 13:34
Yeah you have to watchout for race conditions etc
I think with Atomics you can share data in more than 1 threads in JS (ex main and service worker)
Kyle Holm
@thekholm80
Sep 20 2018 13:35
does the service worker exist as a separate process?
Aditya
@ezioda004
Sep 20 2018 13:35
Yep, it has its own event loop
Kyle Holm
@thekholm80
Sep 20 2018 13:35
interesting
Ene Catalin
@EneCatalin
Sep 20 2018 13:35
ostrich may be stoopid
psyperl
@psyperl
Sep 20 2018 13:35
what is Atomics?
Ene Catalin
@EneCatalin
Sep 20 2018 13:35
but aren't race conditions pretty much solved ?
Kyle Holm
@thekholm80
Sep 20 2018 13:35
when i use CRA the first thing i do is delete all the service worker code lol
psyperl
@psyperl
Sep 20 2018 13:36
and what is CRA?
Kyle Holm
@thekholm80
Sep 20 2018 13:36
create-react-app
psyperl
@psyperl
Sep 20 2018 13:36
oh
Aditya
@ezioda004
Sep 20 2018 13:36

@psyperl

When memory is shared, multiple threads can read and write the same data in memory. Atomic operations make sure that predictable values are written and read, that operations are finished before the next operation starts and that operations are not interrupted.

psyperl
@psyperl
Sep 20 2018 13:37
@ezioda004 ah thread-safe ?
Aditya
@ezioda004
Sep 20 2018 13:37
So basically a way to sharing data b/w threads
psyperl
@psyperl
Sep 20 2018 13:37
oh like flag?
semaphore flag
ok i thought you mentioned about some library or some such
Aditya
@ezioda004
Sep 20 2018 13:38
Idk flag, my knowledge is limited in this topic, I think MDN can explain better than me
psyperl
@psyperl
Sep 20 2018 13:38
ah is implemented as Object.. thanks yeah
Kyle Holm
@thekholm80
Sep 20 2018 13:39
that's pretty neat
Aditya
@ezioda004
Sep 20 2018 13:39
@thekholm80 I still remember how serviceworker was such a pain the first time I used CRA for production
But in-built PWA is nice
psyperl
@psyperl
Sep 20 2018 13:40
semaphore is one of the way to implement that Atomics.. but that's is old concept.. maybe there are new concepts to deal with them
abraham anak agung
@padunk
Sep 20 2018 13:52
what happen between SW and CRA? I never hv problem in prod with those.
psyperl
@psyperl
Sep 20 2018 13:53
what's with everyone throwing weird abbreviation today ..
what's PWA and SW ?
abraham anak agung
@padunk
Sep 20 2018 13:55
progressive web apps and service worker
Aditya
@ezioda004
Sep 20 2018 13:55
@padunk I believe stuff was being cached which I was sending from express to client, and it made it really hard to debug. One reason was I had no idea what SW was that time
psyperl
@psyperl
Sep 20 2018 13:55
ah thanks @padunk
abraham anak agung
@padunk
Sep 20 2018 13:56
@ezioda004 ah i see, yes that is annoying. @psyperl 👍
anyone know sql here?
psyperl
@psyperl
Sep 20 2018 14:00
i only know how to make it throttle.. but ask away.. someone might help
Eric Weiss
@eweiss17
Sep 20 2018 14:02
DROP TABLE users?
abraham anak agung
@padunk
Sep 20 2018 14:05
just want to learn it, mysql or postgresql? what is the difference?
they have descriptions under, 'MySQL and alternatives' section
psyperl
@psyperl
Sep 20 2018 14:10
i don't think you need to worry about it .. basic sql should be able to be used in any sql compatible engine/servers
May Kittens Devour Your Soul
@diomed
Sep 20 2018 14:11
mother of little Bobby Tables knows sql
psyperl
@psyperl
Sep 20 2018 14:11
@diomed :smile:
that's definitely one mad mom
Eric Weiss
@eweiss17
Sep 20 2018 14:13
You can just do a quick tutorial online to learn the basic sql commands, you get used to them after using them for so much
psyperl
@psyperl
Sep 20 2018 14:20
@thekholm80 will you find my diagram is easier to read/implement? been wondering how to draw this since last year
Screen Shot 2018-09-20 at 21.18.50.png
May Kittens Devour Your Soul
@diomed
Sep 20 2018 14:22
@psyperl are u cooking meth?
psyperl
@psyperl
Sep 20 2018 14:22
:smile:
no, should be cooking something healthy instead
it's just an example of illustrating a mixed sequence and asynchronous operations in a function and not getting confused about the flow
Aditya
@ezioda004
Sep 20 2018 14:27
Seems fine to me, I like the broken lines to broken
psyperl
@psyperl
Sep 20 2018 14:27
that flow usually much longer and during code.. i often lost along the way
This message was deleted
yeah that's special line for exception handling
May Kittens Devour Your Soul
@diomed
Sep 20 2018 14:28
@ezioda004 @thekholm80 - @psyperl is cooking gummybears again
Aditya
@ezioda004
Sep 20 2018 14:29
Lol thats a thing? Awesome
psyperl
@psyperl
Sep 20 2018 14:30
yeah that's convention/standard
Aditya
@ezioda004
Sep 20 2018 14:30
TIL
abraham anak agung
@padunk
Sep 20 2018 14:31
thanks mate @psyperl @eweiss17
psyperl
@psyperl
Sep 20 2018 14:31
@padunk :+1:
Aditya
@ezioda004
Sep 20 2018 14:32
@diomed Whats a :cat: doing in that subreddit?
psyperl
@psyperl
Sep 20 2018 14:32
@ezioda004 that's preparation for next year code challange.. one should follow the drawing and one would code :p
poor gummybear
i should report that for gummybears cruelty
May Kittens Devour Your Soul
@diomed
Sep 20 2018 14:36
@ezioda004 :cat: enjoys explosions and ferrofluids
Aditya
@ezioda004
Sep 20 2018 14:39
During my time, we had to smell test on chemicals: that was far from cool explosions
May Kittens Devour Your Soul
@diomed
Sep 20 2018 14:41
me too, that's how I'm catching up at least visually
Kyle Holm
@thekholm80
Sep 20 2018 15:20
@psyperl I think you have a bright future as a flowchart drawerer
@diomed that is frightening
May Kittens Devour Your Soul
@diomed
Sep 20 2018 15:24
I think it's drawer
what's the name for words that have 2 or more meanings? uhhhh
haha - homonyms
psyperl
@psyperl
Sep 20 2018 15:29
@thekholm80 :smile:
psyperl
@psyperl
Sep 20 2018 15:35
drawings can release the burden in my head
May Kittens Devour Your Soul
@diomed
Sep 20 2018 15:36
best way to get rid of horror in your head is to put it on paper and release it to the public.
that's how Stephen King became famous, I think
Kyle Holm
@thekholm80
Sep 20 2018 15:40
the zodiac killer, too
May Kittens Devour Your Soul
@diomed
Sep 20 2018 15:41
I thought we shall not talk about Ted Cruz here
Kyle Holm
@thekholm80
Sep 20 2018 15:42
rofl awesome
Xarri Jorge
@xarrijorge
Sep 20 2018 15:57
:wave:
May Kittens Devour Your Soul
@diomed
Sep 20 2018 15:59
:ocean: :wave:
Kyle Holm
@thekholm80
Sep 20 2018 16:00
:wave:
Christopher McCormack
@cmccormack
Sep 20 2018 16:08
:wave:
Karma Drukpa
@coderkarma
Sep 20 2018 16:08
:wave:
const  people = [
    {
     name: 'ka', location: "oakland",
     name: 'yangchen', location: 'SF',
     name: "jigmi", location: "LA",
     name : "John", location: "Alameda"
    }
];

const  people1 = people.map((person) => person.name)
console.log(people1);
it suppose to console.log every names right but why that is just giving me John
Christopher McCormack
@cmccormack
Sep 20 2018 16:11
@coderkarma you need to wrap those as individual objects in your array
const  people = [
    {  name: 'ka', location: "oakland" },
    {  name: 'yangchen', location: 'SF' },
    {  name: "jigmi", location: "LA" },
    {  name : "John", location: "Alameda" },
];
Xarri Jorge
@xarrijorge
Sep 20 2018 16:12
Why would have 4 names property in one object @coderkarma
Karma Drukpa
@coderkarma
Sep 20 2018 16:12
oh!! my bad.. thanks for that
@xarrijorge bro, just playing with map thing
May Kittens Devour Your Soul
@diomed
Sep 20 2018 16:16
how else is this being written properly??
psyperl
@psyperl
Sep 20 2018 16:19

it suppose to console.log every names right but why that is just giving me John

who is John??

Kyle Holm
@thekholm80
Sep 20 2018 16:19
John is that guy Karma got
like a gift, i suppose
psyperl
@psyperl
Sep 20 2018 16:19
oh poor Karma
he got Johned
Niraj Nandish
@Nirajn2311
Sep 20 2018 16:26
Johnny Johnny
Karma Drukpa
@coderkarma
Sep 20 2018 16:27
Who is John?
psyperl
@psyperl
Sep 20 2018 16:29
$ whois John
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 0 objects.
%
% You queried for John but this server does not have
% any data for John.
%
% If you need further information please check the web site
% or use -h for help
Karma Drukpa
@coderkarma
Sep 20 2018 16:30
@Nirajn2311 Johnny Johnny yes papa, eating sugar no papa .
Kyle Holm
@thekholm80
Sep 20 2018 16:30
image.png
you tell us, who is John?
Karma Drukpa
@coderkarma
Sep 20 2018 16:31
He is Kyle's brother.
lol
Kyle Holm
@thekholm80
Sep 20 2018 16:31
poor guy
psyperl
@psyperl
Sep 20 2018 16:32
{  name: "jigmi", location: "LA" },
lol where do you even get this data from
Kyle Holm
@thekholm80
Sep 20 2018 16:32
from his phone's contact list
psyperl
@psyperl
Sep 20 2018 16:32
lol
Karma Drukpa
@coderkarma
Sep 20 2018 16:33
hahahahaha
just a pure imagination...
Niraj Nandish
@Nirajn2311
Sep 20 2018 16:34
I wonder if ligma is my imagination
May Kittens Devour Your Soul
@diomed
Sep 20 2018 16:34
no, I am your imagination
diomed @diomed whips @Nirajn2311
go back to css work :smiling_imp:
Niraj Nandish
@Nirajn2311
Sep 20 2018 16:37
Cant do css until tomorrow night as at the moment I am in Queen Elizabeth 2 and with no laptop
So @Nirajn2311 whips @diomed to go back and study css
psyperl
@psyperl
Sep 20 2018 16:39

Cant do css until tomorrow night as at the moment I am in Queen Elizabeth 2 and with no laptop

wew i wouldn't mess around with the Queen

Kyle Holm
@thekholm80
Sep 20 2018 16:40
wait isn't the QE2 a cruise ship?
May Kittens Devour Your Soul
@diomed
Sep 20 2018 16:40
more likely than a royal f....
altho if it sinks it'll also be a royal f...
@thekholm80 did u watch Repo Men, mby?
did any1?
Kyle Holm
@thekholm80
Sep 20 2018 16:41
no
but I love Repo Man (movie) about a guy who's job it is to repossess organs and body parts when people can't pay
May Kittens Devour Your Soul
@diomed
Sep 20 2018 16:45
so u watched v. of 1984???
Aditya
@ezioda004
Sep 20 2018 16:46
Atleast its not about a person who made too many repos on github
Eric Weiss
@eweiss17
Sep 20 2018 16:47
thought people bailed on github when Microsoft acquired
Niraj Nandish
@Nirajn2311
Sep 20 2018 16:52
@thekholm80 yes the qe2 is a cruise ship
At the moment they have only done soft opening and it's docked in Dubai
Kyle Holm
@thekholm80
Sep 20 2018 16:52
oh neat
Aditya
@ezioda004
Sep 20 2018 16:53
@eweiss17 Why'd anyone? The acquisition doesnt happen till the end of the year
Niraj Nandish
@Nirajn2311
Sep 20 2018 16:53
Grand opening is next month
So prices are cheap
May Kittens Devour Your Soul
@diomed
Sep 20 2018 16:54
@ezioda004 apparently some part of devs is fleeing to that other repo provider owned by Microsoft
psyperl
@psyperl
Sep 20 2018 16:56
did you guys read the deep work?
that's so opposite for me ...
psyperl @psyperl is a deep party dev
psyperl
@psyperl
Sep 20 2018 17:02
i used to remove all the distraction while working and close myself from the outside world .. but i realize that that wasn't who i really am
May Kittens Devour Your Soul
@diomed
Sep 20 2018 17:03
now u're just a madman typing frantically in gitter chatroom
psyperl
@psyperl
Sep 20 2018 17:03
i've learnt how to cope with distraction without sending them away and turning distraction into motivation+inspiration
lol @diomed
Kyle Holm
@thekholm80
Sep 20 2018 17:04
i like to be a distraction
psyperl
@psyperl
Sep 20 2018 17:04
distraction is like a error handling in codes
the more you can handle... the better the quality
removing distraction pretty much leaving the catch clause empty :D
Aditya
@ezioda004
Sep 20 2018 17:05
:thought_balloon:
psyperl
@psyperl
Sep 20 2018 17:11

now u're just a madman typing frantically in gitter chatroom

if that is what you called mad.. then i don't want to be sane :smile:

psyperl
@psyperl
Sep 20 2018 17:33
but i do like pomodoro and breathing techniques ... those are awesome
Eric Weiss
@eweiss17
Sep 20 2018 19:01
is iOS 12 worth the install?
psyperl
@psyperl
Sep 20 2018 19:06
i don't think system upgrade is negotiable ( when you could you should )
Aaron
@apalm1341
Sep 20 2018 19:14
hey all..can someone help me with a website making issue?
Eric Weiss
@eweiss17
Sep 20 2018 19:22
@apalm1341 depends.... what is it
Aaron
@apalm1341
Sep 20 2018 19:26
@eweiss17

<!––we need to tell the browser that this is an html file
this tells browser what type of document it is trying to read––>
<!DOCTYPE html>

<html>
<!--head is basically a header...it is code that needs to run before body is loaded but it is not stuff that needs to be shown-->
<head>
<!--title is text that shows up in tab at top of page-->
<title>Demo Website</title>
</head>

<!--body is where all content goes-->

<body>

</body>

</html>

the title here isnt showing up in tab at top of browser page like it is supposed to
Eric Weiss
@eweiss17
Sep 20 2018 19:30
The 'Title' is just what appears in the tab of the page
does it say 'Demo Website' in the tab
by tab i am referring to an internet browser tab
Aaron
@apalm1341
Sep 20 2018 19:31
Demo Website is not showing up for me
@eweiss17
Eric Weiss
@eweiss17
Sep 20 2018 19:32
I do not know what you are seeing
Aaron
@apalm1341
Sep 20 2018 19:33
index.html is showing up in tab for me right now
@eweiss17
Eric Weiss
@eweiss17
Sep 20 2018 19:34
title.png
my title is Eric Weiss Portfolio
and it shows up there
head.png
if you type an h1 in the body, it will show up?
<h1>This is a header</h1>
Aaron
@apalm1341
Sep 20 2018 19:36
should i try putting h1 element in my body?
@eweiss17
Eric Weiss
@eweiss17
Sep 20 2018 19:36
yeah go ahead make sure it shows up
i don't know how you are developing this, with notepad++ using localhost?
Aaron
@apalm1341
Sep 20 2018 19:37
im using notepad++
@eweiss17
i have no idea if im using localhost tho
does it matter where i put the h1 in my body element?
@eweiss17
Eric Weiss
@eweiss17
Sep 20 2018 19:39
no just put it inbetween the <body> tags
did you make sure to give your file the .html extension
assuming the file is .html, you can do Run -> Your favorite browser
to run it
within notepad++
Aaron
@apalm1341
Sep 20 2018 19:42
ah...it is working now for me
i think i know what i forgot to do
i think i just forgot to save the file
Demo Website showed up right after I saved file
Eric Weiss
@eweiss17
Sep 20 2018 19:44
just mash CTRL + S
Aaron
@apalm1341
Sep 20 2018 19:55
by mash i assume u mean type?
@eweiss17
Eric Weiss
@eweiss17
Sep 20 2018 19:57
no just press them together on your keyboard to save
May Kittens Devour Your Soul
@diomed
Sep 20 2018 20:38
@apalm1341 what's with notepad++ ? switch to Visual Studio Code
Aaron
@apalm1341
Sep 20 2018 20:41
@diomed why switch?
Augustas
@AugustasV
Sep 20 2018 20:43
Writing program in javascript console. Want to do unit test and just test cases for example if i enter letters in number field, they show me instantly. Using Mangoose to write to database. I should use specific tool like validate.js or something simpler?
May Kittens Devour Your Soul
@diomed
Sep 20 2018 20:49

u guys ever used a

<samp>

tag?

psyperl
@psyperl
Sep 20 2018 21:57
first time seeing it
anthonygallina1
@anthonygallina1
Sep 20 2018 22:00
:smile:
psyperl
@psyperl
Sep 20 2018 22:01
@anthonygallina1 whello!
anthonygallina1
@anthonygallina1
Sep 20 2018 22:02
Hello good to see you :smile_cat:
I hardly use these
psyperl
@psyperl
Sep 20 2018 22:03
pretty much a useless tag :smile:
anthonygallina1
@anthonygallina1
Sep 20 2018 22:03
kbd looks interesting
<div dropzone="copy"></div> they didnt cover this
lol
How are you @psyperl
Karma Drukpa
@coderkarma
Sep 20 2018 22:06
<aside>stop</aside>
psyperl
@psyperl
Sep 20 2018 22:07
@anthonygallina1 I am good thanks, how's you? so you only shows up on weekend now? :smile:
most of those tags pretty much replaced by css nowadays
anthonygallina1
@anthonygallina1
Sep 20 2018 22:08
move
psyperl
@psyperl
Sep 20 2018 22:08
o wow
moving can be painful
anthonygallina1
@anthonygallina1
Sep 20 2018 22:10
yup change can be hard
adapting though
I miss you guys
psyperl
@psyperl
Sep 20 2018 22:11
good you got passed the surgery i am scared of green man with facemask
wew
i have no idea how it gets there
yeah i've been wondering where you've been too .. saw J-Mag on discord too she suddenly pops up
so everything good after surgery though @anthonygallina1 ?
anthonygallina1
@anthonygallina1
Sep 20 2018 22:14
Doh sry
psyperl
@psyperl
Sep 20 2018 22:14
ah
anthonygallina1
@anthonygallina1
Sep 20 2018 22:14
Yes all good
My GF hid my boots I waas going to walk out of the hosp
psyperl
@psyperl
Sep 20 2018 22:15
Xena?
lol misspelled sorry.. i remember how it pronounced lol
anthonygallina1
@anthonygallina1
Sep 20 2018 22:16
You remembered it isnt a easy name
psyperl
@psyperl
Sep 20 2018 22:17
because is not typical name that's how i remember .. if it's common name i probably forgot lol
yay
anthonygallina1
@anthonygallina1
Sep 20 2018 22:18
YA but I want to be there now
LOL at self
psyperl
@psyperl
Sep 20 2018 22:18
lol
Karma Drukpa
@coderkarma
Sep 20 2018 22:34
@psyperl @kyle @psyperl
@Manish-Giri
Manish Giri
@Manish-Giri
Sep 20 2018 22:37
what's up
Karma Drukpa
@coderkarma
Sep 20 2018 22:38
I get confuse when i see function like this Arrray.prototype.remove = function(parameter)
here is the question, i was thinking to do filter for this
to filter out the value_list
Kyle Holm
@thekholm80
Sep 20 2018 22:40
that's a good idea
also, check out Array.includes()
This message was deleted
Karma Drukpa
@coderkarma
Sep 20 2018 22:55
@thekholm80 so i could filter and see if that value_list is in the arr or not and return ?
Kyle Holm
@thekholm80
Sep 20 2018 22:58
filter takes a callback. the callback should return true or false. Array.includes() returns true or false
the only real trick is remembering that you want to keep the values that are not included in values_list
Karma Drukpa
@coderkarma
Sep 20 2018 23:02
true
can i do somthing like this. got confuse with Array.prototype.remove = function(parameter)
function remove(integer_list, values_list){
    const result = integer_list.filter((ele) => {
        return (!ele.includes(values_list));
    })
}
console.log(remove([1, 1, 2 ,3 ,1 ,2 ,3 ,4],[1, 3]));
I want to filter out the value list
Kyle Holm
@thekholm80
Sep 20 2018 23:05
you're so close
you need to return your result
and you need to add the Array.prototype.remove = back
also, it should be !values_list.includes(ele) since values_list is the array and the method is Array.includes()
Karma Drukpa
@coderkarma
Sep 20 2018 23:09
yeah that's where i was hesitating cause i knew i had to check ele in array
but at the same time i was thinking about valus_list as well which i had to filter it out.
Manish Giri
@Manish-Giri
Sep 20 2018 23:17
when I was first learning these FP style functions, I used to first solve the problem in the regular way - using loops
that helped me to understand what was needed when I replaced those loops with functions like filter(), map() etc
Karma Drukpa
@coderkarma
Sep 20 2018 23:18
Array.prototype.remove_ = function(integer_list, values_list){
const result = integer_list.filter((ele) =>{
        return (!integer_list.includes(ele) && (!integer_list.includes(values_list)))
    })
   return result;
}
Kyle Holm
@thekholm80
Sep 20 2018 23:19
i feel like maybe you didn't read the last thing i wrote
Karma Drukpa
@coderkarma
Sep 20 2018 23:20
@Manish-Giri I was trying that to, since this function types gets bit confusing to me
Manish Giri
@Manish-Giri
Sep 20 2018 23:20
also, this feels somewhat contradictory
integer_list.filter((ele) =>{
        return (!integer_list.includes(ele)
ele is every element in integer_list as you iterate over it one by one, so if you say integer_list should not include ele - not sure how that would work out
Karma Drukpa
@coderkarma
Sep 20 2018 23:21
@thekholm80 sorry, i didn't read it carefully.
sorry kyle, it was my bad
Kyle Holm
@thekholm80
Sep 20 2018 23:22
no worries
Karma Drukpa
@coderkarma
Sep 20 2018 23:22
Array.prototype.remove_ = function(integer_list, values_list){

 const result = integer_list.filter((ele) =>{
        return (!values_list.includes(ele))
    })
   return result;
}
Kyle Holm
@thekholm80
Sep 20 2018 23:22
that should do it
Karma Drukpa
@coderkarma
Sep 20 2018 23:23
yep thanks
I always panic when i see this types of functions.
psyperl
@psyperl
Sep 20 2018 23:28
Array.prototype.remove_ = function(integer_list, values_list){

 const result = integer_list.filter((ele) => !values_list.includes(ele) )
   return result;
}
this might remove confusion ... not tested yet
2 return can look confusing
Kyle Holm
@thekholm80
Sep 20 2018 23:29
eslint was yelling in my head
psyperl
@psyperl
Sep 20 2018 23:29
lol
Karma Drukpa
@coderkarma
Sep 20 2018 23:29
@Manish-Giri Yeah that doesn't work, I was over thinking about ele and array to filter out value_ list, didn't realize until kyle mentioned over again lol
@thekholm80 some 7katas or 8 katas problems are super hard then 6 katas
i have encounter that many times
Manish Giri
@Manish-Giri
Sep 20 2018 23:30
Array.prototype.remove_ = (integer_list, values_list) => integer_list.filter(ele => !values_list.includes(ele));
that should do it too
psyperl
@psyperl
Sep 20 2018 23:30
that's better
Karma Drukpa
@coderkarma
Sep 20 2018 23:31
YEY!!
psyperl
@psyperl
Sep 20 2018 23:31
Array.prototype.remove_ = (integer_list, values_list) => integer_list.filter(ele => !values_list.includes(ele))
even better
Manish Giri
@Manish-Giri
Sep 20 2018 23:31
smh
psyperl
@psyperl
Sep 20 2018 23:31
lol
Manish Giri
@Manish-Giri
Sep 20 2018 23:32
@psyperl did you get the new Xcode update in your macbook
psyperl
@psyperl
Sep 20 2018 23:32
i got no macbook
Karma Drukpa
@coderkarma
Sep 20 2018 23:32
mojave is coming on monday
Manish Giri
@Manish-Giri
Sep 20 2018 23:32
i've been trying to install it since 2 days now, every time it hangs, or freezes or crashes
Kyle Holm
@thekholm80
Sep 20 2018 23:32
Array.prototype.remove_ = (a, b) => a.filter(c => !b.includes(c))
Karma Drukpa
@coderkarma
Sep 20 2018 23:32
Dark mode will be on from monday
psyperl
@psyperl
Sep 20 2018 23:32
but yeah Version 10.0 (10A255)
Karma Drukpa
@coderkarma
Sep 20 2018 23:32
excited
Manish Giri
@Manish-Giri
Sep 20 2018 23:32
@psyperl thought you did Swift/Obj C on Xcode
psyperl
@psyperl
Sep 20 2018 23:33
yeah.. but not on mac book .. i don't use laptop
psyperl @psyperl never had laptop
I was going through this one looking at it says fundamentals and string
Manish Giri
@Manish-Giri
Sep 20 2018 23:34
too much instructions
too much math
psyperl
@psyperl
Sep 20 2018 23:34
@Manish-Giri did you set autoupdates?
Karma Drukpa
@coderkarma
Sep 20 2018 23:34
but it turn out to be nightmares for me especially when it says average stuff
@thekholm80 hate this
for sure hahaha
Kyle Holm
@thekholm80
Sep 20 2018 23:35
math? yeah that's gonna be a no from me dog
Manish Giri
@Manish-Giri
Sep 20 2018 23:35
@psyperl i didn't... coz big updates like xcode (6gb) fucks everything up every time
psyperl
@psyperl
Sep 20 2018 23:35
it takes a while to load yeah
but auto updates only do when network is not busy
it has rate control
pause and resume automatically according to network busy-ness
Manish Giri
@Manish-Giri
Sep 20 2018 23:39
pausing and resuming is a can of worms with apple updates
@thekholm80 much tabs :smiling_imp:
Kyle Holm
@thekholm80
Sep 20 2018 23:41
lol
psyperl
@psyperl
Sep 20 2018 23:43
wew lol
that's what happen when you got used to Java garbage collect
:smile:
release the unused tab/resource @Manish-Giri !
i rarely have 5+ tabs open in a window
Chase Sawyer
@shadowimmage
Sep 20 2018 23:47
but then how many windows do you have?
psyperl
@psyperl
Sep 20 2018 23:47
not that many as well yeah
10-20
that includes other apps etc
browser alone usually 4 maxed
but i do have lots of bookmarks :smile: