These are chat archives for FreeCodeCamp/Help

4th
Jan 2018
lalith77
@lalith77
Jan 04 2018 02:11
Anyone know how to join data from two different excel sheets with 1 common coloumn? like we would do an sql join.
akosuadenell
@akosuadenell
Jan 04 2018 03:01
am I doing something wrong with this function? using python 3 but its not returning anything. I am trying to check if a given number is a power of 2
Screen Shot 2018-01-03 at 9.58.28 PM.png
Gersho
@Gersho
Jan 04 2018 03:02
your code stops on line 2, return stops code execution
Kyle Holm
@thekholm80
Jan 04 2018 03:02
not sure about python, but most languages return halts execution
Gersho
@Gersho
Jan 04 2018 03:02
there's a room for python bt
btw
akosuadenell
@akosuadenell
Jan 04 2018 03:13
thank you, I like to ask anywhere I can get help
I updated the function
its saying y isn't defined but I did define it. I am trying to create a function that checks for powers of 2
Screen Shot 2018-01-03 at 10.08.54 PM.png
Kyle Holm
@thekholm80
Jan 04 2018 03:17
it's not defined when you call the function
doing just
def powercheck (x, y):
  if x**y == 2:
    print("true")
  else:
    print("false")

powercheck(32, 1/2)
will print 'false'
but i don't think this is accomplishing what you're setting out to do
you said you wanted to check to see if a number (i assume x in your function) is a power of two
akosuadenell
@akosuadenell
Jan 04 2018 03:20
the number when plugged into x^(1/2) should equal two giving me an answer of 2
I am not sure why that doesn't work
why would it give me false 32^(1/2) equals 2 which should give me 2🤔
Kyle Holm
@thekholm80
Jan 04 2018 03:21
strange
I really don't know how python handles math and doing it in javascript Math.pow(32, 0.5) gives me 5.6568
and doing
def powercheck (x, y):
  if x**y == 2:
    print("true")
  else:
    print("false")

powercheck(2, 1)
returns true
Kyle Holm
@thekholm80
Jan 04 2018 03:33
@akosuadenell i think the problem may be that you want 32^(1/2) to equal 2 and that's not going to happen
Abhijeet Kumar
@arcticOak2
Jan 04 2018 09:40
D:\trx>karma start --reporters trx,dots
 10% building modules 1/1 modules 0 active04 01 2018 15:06:24.608:ERROR [reporter]: Can not load reporter "trx", it is not registered!
  Perhaps you are missing some plugin?
04 01 2018 15:06:26.901:WARN [karma]: No captured browser, open http://localhost:9876/
04 01 2018 15:06:26.917:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
04 01 2018 15:06:26.917:INFO [launcher]: Launching browser Chrome with unlimited concurrency
04 01 2018 15:06:26.917:ERROR [karma]: Found 1 load error
How to resolve this
Olapri
@Olapri
Jan 04 2018 10:43
@Gersho thanks!
CamperBot
@camperbot
Jan 04 2018 10:43
olapri sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 556 | @gersho |http://www.freecodecamp.org/gersho
Olapri
@Olapri
Jan 04 2018 11:31
Hello.
Could you pls explain why in FCC challenge "Get Geolocation Data - https://www.freecodecamp.org/challenges/get-geolocation-data" I don`t see actually my current Geolocation as intended to be shown. I am trying to implement this part to the project "Show the Local Weather" . That is why I came back to that challenge. And in Codepen the same stuff does not work...
Stephen James
@sjames1958gm
Jan 04 2018 11:52

@Olapri I copied the code from the instructions into the script tags in the editor and the lat / lon were shown

  if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    $("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
  });
} else { $("#data").text("No geolocation")}

you could try adding else to see if possible your browser doesn't support geolocation?
You can also run the code in the devtools console to see

Olapri
@Olapri
Jan 04 2018 11:55
after several attempts I have got the notification from FCC whether I do allow FCC to get my Geolocation. I have confirmed it. And now the question remains - how to confirm the same to codepen . With "else" statement I don`t see geolocation either. I should have some block on my pc. Any ideas?
Stephen James
@sjames1958gm
Jan 04 2018 12:13
Do you have a codepen link?
I really don`t understand : in this link codepen shows it. But in my separate page - does not show...
Stephen James
@sjames1958gm
Jan 04 2018 12:20
What do you mean by separate page?
Realize that for chrome geolocation will not work from a page loaded with http:// only from https://
Olapri
@Olapri
Jan 04 2018 12:26
I mean in this link I have shared here 2 minutes ago - I see my geolocation. But in my opened web-page "codepen" - I don`t see. I have tried both - http and https. And I have allowed gelocation i chrom... But it does not help ((
Aiben Wu
@AibenWu
Jan 04 2018 13:06
These two class are set on the width, will there be an impact
Gersho
@Gersho
Jan 04 2018 13:55
:wave: fCC/Help !
Ken Haduch
@khaduch
Jan 04 2018 13:57
Hello everyone!
@Gersho :wave:
Bjorn van de Peut
@bjorno43
Jan 04 2018 13:58
Hello :)
Ken Haduch
@khaduch
Jan 04 2018 13:59
@bjorno43 hello 👋
Gersho
@Gersho
Jan 04 2018 14:26

Someone got a good guide about environmental variables ?

Hi, i'm having trouble setting up environmental variables for my django project, i understand i should use os.environ.get to call for them but i don't know how/where to store them (and point to them ?)

Kyle Holm
@thekholm80
Jan 04 2018 14:27
i set my env variables via the command line in linux
i imagine it's the same in windows
Gersho
@Gersho
Jan 04 2018 14:28
so that's something you need to re-do when going prod ? (it's not a setting you set in a file and export with your project ?)
Kyle Holm
@thekholm80
Jan 04 2018 14:28
right
Gersho
@Gersho
Jan 04 2018 14:28
i use linux too (both local and my prod VM)
oh ok, guess my OS related knowledge is lacking then
Kyle Holm
@thekholm80
Jan 04 2018 14:28
heroku's cli has a whole thing just to set envs
Gersho
@Gersho
Jan 04 2018 14:28
thanks @thekholm80
CamperBot
@camperbot
Jan 04 2018 14:28
gersho sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1650 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Gersho
@Gersho
Jan 04 2018 14:29
so far i haven't used "remote" server, i do my stuff on a VM (because my project is meant to be used on local network only, the point is to have the whole thing in a VM and run it as need be)
but i do everything via ssh to act like it's distant
Kyle Holm
@thekholm80
Jan 04 2018 14:31
I've seen some folks use a file called .env in javascript, i'm not sure how it works and what the security issues would be, maybe there's something similar in django?
Gersho
@Gersho
Jan 04 2018 14:32
that's kinda my problem, i can't seem to find the good guide about it, they all assume i know how to do that specific part, so i'm googling more generic stuff about env var
but since i've done some pretty stupid stuff when i started using virtual env, maybe it's not so bad to be forced to learn about env variables
Kyle Holm
@thekholm80
Jan 04 2018 14:50
@Gersho my morning meeting is done now, i'll see if I can find anything on the old google
Altin Rrahmani
@DevKosov
Jan 04 2018 14:50
@thekholm80 :wave:
Kyle Holm
@thekholm80
Jan 04 2018 14:50
@DevKosov hey buddy
digitalocean has some nice "going to prod" guides
Kyle Holm
@thekholm80
Jan 04 2018 14:52
oh good deal
yozhikvtumane
@yozhikvtumane
Jan 04 2018 15:57
excuse me, I can't visit FreeCodeCamp room
Ken Haduch
@khaduch
Jan 04 2018 16:19
@yozhikvtumane - do you mean https://gitter.im/FreeCodeCamp/FreeCodeCamp that one?
or some other room? Look at the navbar on top of the GITTER window and there is a globe icon - that will give you a list of rooms.
Darren
@DarrenfJ
Jan 04 2018 16:21
morning fCC
Gersho
@Gersho
Jan 04 2018 16:21
:wave: @DarrenfJ
yozhikvtumane
@yozhikvtumane
Jan 04 2018 16:21
@khaduch
404. This is not the chat you're looking for. Sorry. :(
Kyle Holm
@thekholm80
Jan 04 2018 16:21
@yozhikvtumane you should talk to @mstellaluna about that
@DarrenfJ :wave:
Darren
@DarrenfJ
Jan 04 2018 16:23
@thekholm80 looks like yer getting kudos on yer chicken rogue-like rogue game
haven't checked it out for a while.. you got a link? I wanna see this spiffy new weapons :D
there's nothing new there, it is all that it ever will be lol
Gersho
@Gersho
Jan 04 2018 16:24
what ? no level 5 ? sad
Darren
@DarrenfJ
Jan 04 2018 16:24
ha!
Kyle Holm
@thekholm80
Jan 04 2018 16:25
i'd have to roll back my node version to do anything with the code, or update all the libraries
that's a lot of work and i'm lazy
Gersho
@Gersho
Jan 04 2018 16:27
haven't tried node yet, but isn't that why we have virtual environments ?
Kyle Holm
@thekholm80
Jan 04 2018 16:28
i'm too lazy to set all that up, too lol
i use NVM to make node versioning easy, but it still requires effort to change node versions
Gersho
@Gersho
Jan 04 2018 16:29
the first time i went to prod i didn't know about building requirement files and simply copy/pasted my venv on my server xD
Ken Haduch
@khaduch
Jan 04 2018 16:30
@DarrenfJ - hey there, Darren - how are you doing?
Gersho
@Gersho
Jan 04 2018 16:30
i'm still not up to speed to using actual tools, so i just used whatever was the last version when i started my project
Darren
@DarrenfJ
Jan 04 2018 16:32
@khaduch another cold snap.. been chilly since end of nov... kind of like the winters i remember as a kid.. and you?
Ken Haduch
@khaduch
Jan 04 2018 16:32
@yozhikvtumane - what URL are you trying to open / how are you trying to get to that room?
Gersho
@Gersho
Jan 04 2018 16:32
did you build a snowman ?
Darren
@DarrenfJ
Jan 04 2018 16:33
too cold.. the snow is soft and doesn't compact.. more like tiny shards of ice
Gersho
@Gersho
Jan 04 2018 16:33
so you tried :D
Ken Haduch
@khaduch
Jan 04 2018 16:34
@DarrenfJ - we have had really cold weather the past few weeks, and having some "killer storm" today here with (supposedly) lots of snow and high winds. Definitely seems like a colder winter than we've had in a while... the storm is just getting started so it remains to be seen how bad it gets.
Gersho
@Gersho
Jan 04 2018 16:36
hang on guys ;) on my end i have pretty nice weather today
Ken Haduch
@khaduch
Jan 04 2018 16:57
@Gersho - :D
Gersho
@Gersho
Jan 04 2018 16:57
actually i jinxed it :/
Kyle Holm
@thekholm80
Jan 04 2018 17:03
we're in the 50s this week here, thinking about dusting off the motorcycle
that's around 10C for you folks that aren't stuck with imperial measurements
Gersho
@Gersho
Jan 04 2018 17:04
i was goolging that yeah
only thing i know about F° is -40° F = -40 °C
Kyle Holm
@thekholm80
Jan 04 2018 17:06
212 F = 100 C i think?
and 32 F = 0 C
Darren
@DarrenfJ
Jan 04 2018 17:08
@khaduch i hear they've named that coming storm something apocalyptic
Gersho
@Gersho
Jan 04 2018 17:08
US: let's choose a value for when water turns to ice...32 ? yeah 32 seems nice
Kyle Holm
@thekholm80
Jan 04 2018 17:08
i think it was England
they probably had some King set it all up
or Queen
Ken Haduch
@khaduch
Jan 04 2018 17:09
Yeah, I think it was England, too... We keep using it, though, because the Celsius temps seem so much colder... :D
Gersho
@Gersho
Jan 04 2018 17:09
worse is how you measure lengths, it's like you're trying to confuse people on purpose
Kyle Holm
@thekholm80
Jan 04 2018 17:09
I think Jimmy Carter tried to get us switched to metric but gave up
Ken Haduch
@khaduch
Jan 04 2018 17:09
@DarrenfJ - I haven't heard a name, I haven't even heard them use the term "snowpocalypse" although I have to admit I haven't been listening to or watching the news...
I do like the metric measurement units - much nicer to use, I especially like the weights....
Kyle Holm
@thekholm80
Jan 04 2018 17:11
the metric system is so much easier to use
Ken Haduch
@khaduch
Jan 04 2018 17:11
I guess that we just like a challenge here... :)
Gersho
@Gersho
Jan 04 2018 17:12
if only it didn't lead to crashed sattellites because half was coded in imperial and the other in metric >.>
Kyle Holm
@thekholm80
Jan 04 2018 17:12
lol
Gersho
@Gersho
Jan 04 2018 17:12
and yes it happened
funny thing too is since you have different unit, what is considered an usual amount is different, in guadeloupe we get some stuff imported from the US, but relabeled, so we can find bottles of 0.591 liter xD
that's 20oz
Kyle Holm
@thekholm80
Jan 04 2018 17:16
lol
Gersho
@Gersho
Jan 04 2018 17:18
btw are you still calling coca cola "coke" ?
Kyle Holm
@thekholm80
Jan 04 2018 17:18
yep
Gersho
@Gersho
Jan 04 2018 17:18
because it always feel weird when i say i consume unhealthy amounts of coke >.>
Kyle Holm
@thekholm80
Jan 04 2018 17:19
yeah lol
I had a boss that would always say "I like my Coke with a straw"
never knew which coke he meant
Gersho
@Gersho
Jan 04 2018 17:19
lol
Gersho
@Gersho
Jan 04 2018 17:21
you guys always have a sense of the dramatic
Darren
@DarrenfJ
Jan 04 2018 17:27
that's gonna be the name of my speed metal band
Gersho
@Gersho
Jan 04 2018 17:30
Achievement Unlocked: Slap 2 mosquitoes at once
Kaz Baig
@kbaig
Jan 04 2018 18:22
@DarrenfJ oh yeah well my band's name is gonna be Nuke Cyclone
Albert Cardona II
@daddycardona
Jan 04 2018 18:32
good after noon all you awesome FCC people here on gitter :)
@kbaig LOL
Ken Haduch
@khaduch
Jan 04 2018 18:37
@DarrenfJ - oh, I wanted to read about that, my daughter mentioned that to me yesterday, but they said that it was not a new term... I've never heard it before, though. Thanks for the link!
CamperBot
@camperbot
Jan 04 2018 18:37
khaduch sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2338 | @darrenfj |http://www.freecodecamp.org/darrenfj
Gersho
@Gersho
Jan 04 2018 18:39
@daddycardona :wave:
Ken Haduch
@khaduch
Jan 04 2018 18:40
@daddycardona - howdy! How are things with you?
@Gersho :point_up: January 4, 2018 12:30 PM :clap: :clap: - I'm hoping that our mosquitoes are frozen solid... :)
Kyle Holm
@thekholm80
Jan 04 2018 18:42
@daddycardona :wave:
Gersho
@Gersho
Jan 04 2018 18:45
@khaduch where i live mosquitoes are here all year around :|
Kyle Holm
@thekholm80
Jan 04 2018 18:45
eww
back when I was a smoker I never had trouble with mosquitoes but since I quit I get eaten alive
Gersho
@Gersho
Jan 04 2018 18:47
i smoke and they're here
but most of the time they don't bite me too much
Kyle Holm
@thekholm80
Jan 04 2018 18:47
Maybe I'm just getting more delicious as i age
like cheese
Gersho
@Gersho
Jan 04 2018 18:48
like wine
with cheese be careful you get more smelly as you age too ;)
Kyle Holm
@thekholm80
Jan 04 2018 18:49
i like my smell, it keeps people away
Gersho
@Gersho
Jan 04 2018 18:49
free sitting spots in public transport, yay
Albert Cardona II
@daddycardona
Jan 04 2018 18:50
all these waves i feel like a movie star lol
Kyle Holm
@thekholm80
Jan 04 2018 18:51
@daddycardona you're like a bald Julia Roberts
Albert Cardona II
@daddycardona
Jan 04 2018 18:51
I hate those hungry bastards lol
LOL
like a bald Bruce Willis
oh he already bald LOL :)
Gersho
@Gersho
Jan 04 2018 18:51
isn't he bald already ?
like since 1980
Albert Cardona II
@daddycardona
Jan 04 2018 18:51
LOL
Kyle Holm
@thekholm80
Jan 04 2018 18:51
I should watch RED again. best Bruce Willis movie ever
Albert Cardona II
@daddycardona
Jan 04 2018 18:52
did you like red 2
Kyle Holm
@thekholm80
Jan 04 2018 18:52
I liked it, but not as much as the original
Albert Cardona II
@daddycardona
Jan 04 2018 18:52
yeah me either but I watched Red so long ago now lol
Kyle Holm
@thekholm80
Jan 04 2018 18:52
I don't care for Catherine Zeta Jones
Albert Cardona II
@daddycardona
Jan 04 2018 18:52
have you watched Goon
Gersho
@Gersho
Jan 04 2018 18:52
i really loved bruce willis movies, but kinda stopped watching after the 90's
Kyle Holm
@thekholm80
Jan 04 2018 18:52
I've never heard of Goon
Albert Cardona II
@daddycardona
Jan 04 2018 18:53
WHAT? Gersho that is blasphemy lol
Gersho
@Gersho
Jan 04 2018 18:53
but Die Hard are the bests ones (5th element is cool if you ignore the silly fashion choices)
Kyle Holm
@thekholm80
Jan 04 2018 18:53
both are great
Albert Cardona II
@daddycardona
Jan 04 2018 18:54
5th element is my favorite bruce willis movie
Gersho
@Gersho
Jan 04 2018 18:54
in french they had renamed die hard 1 as "piege de crystal" (crystal trap)
Kyle Holm
@thekholm80
Jan 04 2018 18:54
I thought Gary Oldman was amazing in 5th Element
Albert Cardona II
@daddycardona
Jan 04 2018 18:54
Goon)
Gersho
@Gersho
Jan 04 2018 18:54
I thought Gary Oldman was amazing in 5th Element
googling
Albert Cardona II
@daddycardona
Jan 04 2018 18:54
he the bad guy right
Gersho
@Gersho
Jan 04 2018 18:55
oh zorg
Kyle Holm
@thekholm80
Jan 04 2018 18:55
yeah
Gersho
@Gersho
Jan 04 2018 18:55
i felt a bit trolled that he had a fancy french name
Kyle Holm
@thekholm80
Jan 04 2018 18:55
he's one of my favorite actors
Gersho
@Gersho
Jan 04 2018 18:55
but yeah he was fun, i like his talks with the priest
Albert Cardona II
@daddycardona
Jan 04 2018 18:56
lol
Gersho
@Gersho
Jan 04 2018 18:57
if you miss stupid action movies from the 80-90's you should check Kung Fury
Albert Cardona II
@daddycardona
Jan 04 2018 18:57
I love that movie lol
so stupid lol
Kyle Holm
@thekholm80
Jan 04 2018 18:57
I never saw that, either
Gersho
@Gersho
Jan 04 2018 18:57
it's like the perfect parody, even comes with fake vhs flaws
Albert Cardona II
@daddycardona
Jan 04 2018 18:58
however the expendables were the redo 90's movies and had all the main characters too lol
and 80's
Kyle Holm
@thekholm80
Jan 04 2018 18:58
my favorite cheesy 80s movie was Big Trouble in Little China
Stephen James
@sjames1958gm
Jan 04 2018 18:58
@thekholm80 :+1:
Albert Cardona II
@daddycardona
Jan 04 2018 18:58
however I get this when I do my code
blob
that is an awesome movie too kyle show down in little tokyo too ;)
the dark crystal anyone?
Kyle Holm
@thekholm80
Jan 04 2018 18:59
i was really young when that came out, it gave me the creeps
Gersho
@Gersho
Jan 04 2018 18:59
a for loop inside a reduce ? man you're too high level for me
Albert Cardona II
@daddycardona
Jan 04 2018 19:00
function pairwise(arr, arg) {
    // console.log(arg, arr);
    var bla = [];
    var newArr = arr.reduce((a, n, i, ar) => {
        //a == accumulator, n == next, i == index, ar == array
        for (var index = 0; index < ar.length; index++) {
            if (n + ar[index] === arg) {
                console.log(a);
                if (a) {
                    console.log(a);
                    bla.push(a);
                }
                return i;
            }
        }
    }, 0);
    console.log(bla);
    return bla.reduce((a, n) => {
        console.log(n);
        return a + n;
    }, 0);
}
//pairwise([1, 3, 2, 4], 4);

pairwise([1, 4, 2, 3, 0, 5], 7);
that is what a reduce method is to me lol a loop I don't know why I return anything lol
Kyle Holm
@thekholm80
Jan 04 2018 19:00
why are you storing the result of your reduce in newArr but never using it?
and reduce returns a single value lol not a new array
Albert Cardona II
@daddycardona
Jan 04 2018 19:01
I was thinking the same thing I would need to put },[]);
Kyle Holm
@thekholm80
Jan 04 2018 19:01
map() returns an array
it's pretty neat
Albert Cardona II
@daddycardona
Jan 04 2018 19:02
man I get so confused with which one to use map reduce filter
Kyle Holm
@thekholm80
Jan 04 2018 19:02
all 3 are awesome
Gersho
@Gersho
Jan 04 2018 19:02
honestly i don't even understand the code
Kyle Holm
@thekholm80
Jan 04 2018 19:02
i probably way over-use & abuse map()
Albert Cardona II
@daddycardona
Jan 04 2018 19:02
so where would I use map in this case
don't feel bad I wrote it and don' t understand it lol jk
Gersho
@Gersho
Jan 04 2018 19:03
map is more about modifying individual values in the array rather than doing calculation that checks multiples values in the array at the same time
Kyle Holm
@thekholm80
Jan 04 2018 19:03
if you return inside of map() instead of pushing to an outside varaible (bla in your code) maybe?
Albert Cardona II
@daddycardona
Jan 04 2018 19:04
I was going to use reduce to return and push the acc or a.push(i,index); return a; but that did not work either
Gersho
@Gersho
Jan 04 2018 19:05
for this challenges i used nested for loops and exported the relevant data to a variable then made the sum
Albert Cardona II
@daddycardona
Jan 04 2018 19:06
yes I saw that but I was trying to get my coding skills to use what JS gives us that is suppose to be easier. lol
brb
Gersho
@Gersho
Jan 04 2018 19:09
to me reduce doesn't really seem the best solution, we need more opinions to see how they did it
Stephen James
@sjames1958gm
Jan 04 2018 19:09
@Gersho I used reduce, but only on the array of entries I had culled from the original array
I didn't use nested loops (other than I used indexOf inside my loop which is in essence another loop)
Albert Cardona II
@daddycardona
Jan 04 2018 19:11
oh so I should try indexOf
Gersho
@Gersho
Jan 04 2018 19:11
oh yeah i used reduce at the end too, but i meant for the first part (indexof is a loop too ? damn i have even more loops then)
Albert Cardona II
@daddycardona
Jan 04 2018 19:12
one of my issues is that exactly
Stephen James
@sjames1958gm
Jan 04 2018 19:12
I used indexOf to search for the next value that was arg - current value then I whacked (set to null) the value I used so it wouldn't get used again
Albert Cardona II
@daddycardona
Jan 04 2018 19:14
mmmmm that makes sense :)
:thumbsup:
Gersho
@Gersho
Jan 04 2018 19:15
i used index of inside my loop to check if the index wasn't already in my usedIndex array (that serves both as already used, and stored for final calculation)
Albert Cardona II
@daddycardona
Jan 04 2018 19:15
:thought_balloon: back to the drawing board
Stephen James
@sjames1958gm
Jan 04 2018 19:27
@Gersho By removing the match from the array I didn't need the inner loop, because there could only be one later match
Gersho
@Gersho
Jan 04 2018 19:47
@sjames1958gm sounds so obvious when you say it :D but since i had started with for loop i took care not to alter the array
Albert Cardona II
@daddycardona
Jan 04 2018 19:48
@Gersho that is how I feel when people talk to me about coding all the time lol
Gersho
@Gersho
Jan 04 2018 19:49
i prefer it that way, the other way being "i don't understand a thing you just said"
Albert Cardona II
@daddycardona
Jan 04 2018 19:50
to me it is a combination of them both, 'that sounds so obvious when you put it like that, but what are you talking about '
so @sjames1958gm you did reduce and indexOf? without a for loop?
Kyle Holm
@thekholm80
Jan 04 2018 19:57
i don't understand why python needs arrays and lists
in my day we had one or the other, and we were glad to have it
Gersho
@Gersho
Jan 04 2018 19:58
isn't one of the 2 immutable ?
Henry
@GitHub-Henry
Jan 04 2018 19:58
@thekholm80 i remember when i had to walk to school as a kid, up hill, going to, and coming home
Kyle Holm
@thekholm80
Jan 04 2018 19:59
@GitHub-Henry exactly!
Gersho
@Gersho
Jan 04 2018 19:59
Tuples
Kyle Holm
@thekholm80
Jan 04 2018 19:59
I wish JS had tuples
makes life so much easier
Gersho
@Gersho
Jan 04 2018 19:59
what's so great about them ?
Kyle Holm
@thekholm80
Jan 04 2018 20:00
a, b = b, a

vs

let temp = a;
a = b;
b = temp;
Albert Cardona II
@daddycardona
Jan 04 2018 20:00
that basically did the same thing?
Kyle Holm
@thekholm80
Jan 04 2018 20:00
yeah
switches the values of a & b
Albert Cardona II
@daddycardona
Jan 04 2018 20:01
oh so that is a Tuple lol
Henry
@GitHub-Henry
Jan 04 2018 20:01
@daddycardona in the database world, i recall a tuple is a row
Kyle Holm
@thekholm80
Jan 04 2018 20:01
well, the tuple is a list of things separated by commas
Gersho
@Gersho
Jan 04 2018 20:01
to me a tuple is like an array but () instead of [] , yes my python is minimal xD
Albert Cardona II
@daddycardona
Jan 04 2018 20:04
@thekholm80 try coffee script
I never even truly tried python lol
according to stack overflow it is basically the same
thing your looking for ;)
Kyle Holm
@thekholm80
Jan 04 2018 20:05
i've only dipped my toe into python
but I'll probably learn it at some point
I don't understand that chart, anyone using react is using javascript
probably the same for angular?
Gersho
@Gersho
Jan 04 2018 20:08
anyway i'm starving, afk refill
Albert Cardona II
@daddycardona
Jan 04 2018 20:14
okay I am will try to complete this challenge today I hope my headache don't come back about to take some drugs known as dayquille
Kyle Holm
@thekholm80
Jan 04 2018 20:14
you got this
Albert Cardona II
@daddycardona
Jan 04 2018 20:14
It is something I am being silly about maybe I will try to fix the reduce() or maybe map I don't know lol
Kyle Holm
@thekholm80
Jan 04 2018 20:15
i'd just try to make it work, first, then worry about getting fancy
Albert Cardona II
@daddycardona
Jan 04 2018 20:16
well I find learning how to do it with those great functions make it easier for the next project lol okay maybe not lol
Gersho
@Gersho
Jan 04 2018 20:19
when i have troubles like that i sometimes try to junk everything and start over (after a break, so you're not thinking about your previous version)
Albert Cardona II
@daddycardona
Jan 04 2018 20:21
I will try that if I don't get it this time lol
you know what I will do that now good night
Gersho
@Gersho
Jan 04 2018 20:24
haha good night
Stephen James
@sjames1958gm
Jan 04 2018 20:30
@daddycardona I did, in very pseudo code style:
for loop {
   indexOf
}
reduce
artbohr
@artbohr
Jan 04 2018 22:05
@gersho @alpox https://codepen.io/artbohr/full/RxpPpY/, how does it look now? The movement still looks laggy as hell xD added some timeout, atleast it helps to prevent teleporting
Gersho
@Gersho
Jan 04 2018 22:08
nice job, i think now you just need to find the good balance in your timeout
artbohr
@artbohr
Jan 04 2018 22:13
@Gersho I tried many, I don't think there is any good options or atleast I didn't find any xD
option*
Gersho
@Gersho
Jan 04 2018 22:18
say it's on purpose to give an oldschool feel
it's not a bug it's a feature
artbohr
@artbohr
Jan 04 2018 22:22
haha, this whole project feels like a big bug ^^
Gersho
@Gersho
Jan 04 2018 22:23
then it's a hacker game about beta testing and fixing it
artbohr
@artbohr
Jan 04 2018 22:24
I changed the timeout to 5ms, feels better, because it moves faster ^^
@Gersho thank you for the kind words, haha, I should call it like that
CamperBot
@camperbot
Jan 04 2018 22:24
artbohr sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 557 | @gersho |http://www.freecodecamp.org/gersho
Gersho
@Gersho
Jan 04 2018 22:25
capitalism says it's all about how you sell it