These are chat archives for FreeCodeCamp/Help

26th
Mar 2015
Victor
@pahlsson
Mar 26 2015 00:25
anyone got a good source for learning recursion? I haven't been able to wrap my mind around it thus far
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:26
You'll be able to wrap your mind around it when you wrap your mind around it. <--Joke...
Cristián Berríos
@crisberrios
Mar 26 2015 00:29
hmm
I can't remember a good resource about recursion
it's not so popular either as it's very unsafe to use it in JavaScript
Victor
@pahlsson
Mar 26 2015 00:31
:)
Thanks @AdventureBear, I'll have a read-through.
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:32
cris why unsafe in JS as opposed to another language?
Cristián Berríos
@crisberrios
Mar 26 2015 00:33
because it's easy to cause a stack overflow
other languages are recursion-safe
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:34
fascinating.
how/where did you learn that?
Cristián Berríos
@crisberrios
Mar 26 2015 00:34
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:34
is it due to the event loop off loading things and waiting?
Cristián Berríos
@crisberrios
Mar 26 2015 00:35
it's inherent to JavaScript and the maximum call stack
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:35
well it counted to 4522 in a flash. lol
thanks
Cristián Berríos
@crisberrios
Mar 26 2015 00:35
4525 for me
see?
for others it will be 3000
or less
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:36
huh. why is it different?
Cristián Berríos
@crisberrios
Mar 26 2015 00:36
depending on what''s running "in the background"
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:36
FASCinating!
cool.
Cristián Berríos
@crisberrios
Mar 26 2015 00:36
the stack is unique
Suzanne Atkinson
@AdventureBear
Mar 26 2015 00:36
learn something new every day
I didn't know that the stack was unique to JS
Cristián Berríos
@crisberrios
Mar 26 2015 00:36
no
the stack exists in all languages
but it's a unique "array" of calls stacked one over another
with a maximum memory limit
a better way to do that kind of recursion is simulating a stack using an array
Vince
@Vince33
Mar 26 2015 01:29
So can I install anything using home-brew with the tap command ?
Ammar Ali Shah
@AmmarAliShah
Mar 26 2015 03:34
Good Morning!
Cristián Berríos
@crisberrios
Mar 26 2015 03:34
morning!
thecoderunner
@thecoderunner
Mar 26 2015 03:34
Morning @AmmarAliShah
Suzanne Atkinson
@AdventureBear
Mar 26 2015 04:35
Woohoo, I did it! Made a backgammon board with CSS that behaves positionally just as I wanted it to. Thank's for everyone's suggestions, @chrisdziewa & @ESOComputing & others. http://codepen.io/AdventureBear/pen/wBNaBP?editors=110
thecoderunner
@thecoderunner
Mar 26 2015 04:37
Great work @AdventureBear
Suzanne Atkinson
@AdventureBear
Mar 26 2015 04:39
Thanks @thecoderunner ! Instead of getting frustrated I just took my time and simplified by doing stuff like making 2 boxes in codepen and seeing how the positioning worked. Read a few examples n stuff. Fun project.
tomorrow I'll try to put pieces on the board
Chris Dziewa
@chrisdziewa
Mar 26 2015 05:02
@AdventureBear nice work! :)
Aza Noriega
@MegaGM
Mar 26 2015 14:35
Hi guys
Meow meow meow
Could someone help me to figure out what's wrong here?
Stefan
@worzst
Mar 26 2015 14:39
Hey
in setfirstname and setlastname you join them without a space
fullName = temp.join('');
put a space inside
fullName = temp.join(' ');
Aza Noriega
@MegaGM
Mar 26 2015 14:41
@worzst Thanks! You solve our problem ^_^
Stefan
@worzst
Mar 26 2015 14:41
Youre welcome :)
Aza Noriega
@MegaGM
Mar 26 2015 14:51
@worzst Are you still here?
Could you gimme advice how to solve
http://www.freecodecamp.com/bonfires/map-the-debris
I don't understand what should I do in this Bonfire at all
Kapil Dutta
@duttakapil
Mar 26 2015 15:59
Has anyone here done the learnyounode from Node School?
Suzanne Atkinson
@AdventureBear
Mar 26 2015 18:28
@duttakapil i've done most of it but havn't finished it
Kapil Dutta
@duttakapil
Mar 26 2015 18:49
It's @AdventureBear, I figured it out
@MegaGM did you figure it out yet?
I don't understand the Pairwise Bonfire.
If [1, 4, 2, 3, 0, 5] should equal 15, how is it that [1, 3, 2, 4] should equal 1? Shouldn't it be equal to 4? 3 + 1 = 4?
Harshal
@McQuinTrix
Mar 26 2015 18:52
in that the matching pair's indices are added
Kapil Dutta
@duttakapil
Mar 26 2015 18:52
Oh okay!
Bianca Mihai
@biancamihai
Mar 26 2015 19:00
@duttakapil add the position index not the values so 0+1=1
Kapil Dutta
@duttakapil
Mar 26 2015 19:00
Ya got it @biancamihai
Bianca Mihai
@biancamihai
Mar 26 2015 19:01
sorry, didn't see that you already got an answer:)
Kapil Dutta
@duttakapil
Mar 26 2015 19:02
Which bonfire are you doing @biancamihai ?
Bianca Mihai
@biancamihai
Mar 26 2015 19:05
Well now none :) but I reached
Kapil Dutta
@duttakapil
Mar 26 2015 19:08
I just worked on that one with @storbeck. We pair programmed and solved it.
storbeck
@storbeck
Mar 26 2015 19:08
It was definitely a tricky one!
Kapil Dutta
@duttakapil
Mar 26 2015 19:09
Indeed! But once you get the Math down, it becomes kinda easy.
Bianca Mihai
@biancamihai
Mar 26 2015 19:09
:) I don't understand what It wants from me :))
Kapil Dutta
@duttakapil
Mar 26 2015 19:09
We can help you understand if you want
Bianca Mihai
@biancamihai
Mar 26 2015 19:10
But I'm my mobile phone now :( but I'll take a look
thank you!
Kapil Dutta
@duttakapil
Mar 26 2015 19:14
Thank me when you solve it :D
Bianca Mihai
@biancamihai
Mar 26 2015 19:15
:)) I will!
Tomorrow, tonight I have to work...
storbeck
@storbeck
Mar 26 2015 19:24
unfortunately, it keeps getting harder after that :(
Nathan
@terakilobyte
Mar 26 2015 19:26
not harder
just different patterns
Kapil Dutta
@duttakapil
Mar 26 2015 19:26
^ true
storbeck
@storbeck
Mar 26 2015 19:31
> 76.74 - 20
56.739999999999995
why javascript, whyyyyy
Darryl Dixon - Piece Digital
@piecedigital
Mar 26 2015 19:32
toFixed(2)
storbeck
@storbeck
Mar 26 2015 19:33
Yeah I know how to fix it but it's silly that it even does that
Darryl Dixon - Piece Digital
@piecedigital
Mar 26 2015 19:34
Yeha.
Cristián Berríos
@crisberrios
Mar 26 2015 19:34
not silly, just floating point precision
Oliver
@Dadsaster
Mar 26 2015 19:36
Not silly at all
Danny Fritz
@dannyfritz
Mar 26 2015 19:53
the classic example of IEEE754 not being able to represent a value is 0.1+0.2
Nathan
@terakilobyte
Mar 26 2015 19:57
silly is NaN === NaN
Danny Fritz
@dannyfritz
Mar 26 2015 20:28
@terakilobyte that property makes for some very odd looking polyfills sindresorhus/pretty-bytes@3714122
Bianca Mihai
@biancamihai
Mar 26 2015 22:29
@duttakapil thanks, you were right, once I understood the math formula was not that hard