/srv/irclogs.ubuntu.com/2015/05/14/#ubuntu-za.txt

barrydkMorning everyone04:28
Kilosmorning all06:06
SquirmMorning07:16
Kiloshi Squirm  07:17
Kiloshi TinuvaMac  07:36
TinuvaMacmorning Kilos07:37
SDCDevhey Kilos08:39
SDCDevI just got back into bed, trying to keep warm :|08:39
Kiloshi there SDCDev  08:39
Kiloslol where are you thats so cold08:40
Kilosi just been outside soaking some UV's for warmth too08:40
SDCDevIm in jbay Kilos09:51
Kilosthats not cold man come try ptown09:51
inetprogood mornings09:52
Kilosmore09:52
kulelu88ping superfly 11:55
Kilosdid he not say 8.30 tonight kulelu88  12:19
Kilosthats after kids are in bed12:19
kulelu88oh yes, I forgot the time12:24
=== Cantide is now known as Can_Cycle
Squirmergh14:03
Squirmbeing load shed14:03
Kiloseish14:04
=== kulelu88 is now known as kulelu88_away
=== Can_Cycle is now known as Cantide
Cantidehi everyone :p15:37
Kiloshi Cantide  hows things?15:38
Cantideawesome~~15:38
Cantidei just cycled around Seoul15:38
Cantidewell, not around Seoul, around my part of Seoul15:38
Kiloslol15:38
Cantideit's 00:38 and i just got home :D15:38
Cantidefeeling energized :)15:38
Kiloswow go sleep man15:38
Cantidehow are you15:38
Cantide?15:38
Cantidenah15:38
Kilosgood ty15:39
Cantidei'll sleep around 1 :p15:39
Kiloswhat time you get up?15:39
Cantidearound 08:3015:39
Cantidenot so early :D15:39
Cantidework starts at 12 noon '-';;;15:39
Kilosah then plenty of sleep time15:40
Cantideyup15:40
Cantidei can sleep in until 10 if i want15:40
Kiloscool15:40
Cantidewhat are you up to?15:41
Cantideit's almost 6 pm there, right? dinner time!15:41
Kilosyeah im bathed and sitting at the pc watching the time go by15:42
Kiloshehe15:42
kulelu88_awayWhat is the cost of living in Seoul?15:43
Cantidehmmmm15:45
Cantidekinda expensive15:45
kulelu88_awayin dollar terms per month?15:45
Cantidemy rent is about R 6 000 a month for a studio apartment15:45
kulelu88_awaythat's all???? 15:45
kulelu88_awaydefine studio apartment?15:45
Cantidefood costs me about R 3 000 a month if i eat just rice lol15:45
Cantidebut usually i spend about R 10 000 on food and drink each month :'(15:46
Cantidehmmm... it's about 20 m^2 - including my kitchen area and bathroom15:46
Cantidefurnished and clean15:46
kulelu88_awayso basically a box. I thought you meant studio as in "top-floor, across the building" apartment15:47
Cantideaha15:47
Cantidei wish15:47
Cantidethat's probably like R 20 000 a month lol15:48
Cantideif you want, you can live in a literal box - about 3 m^2 for probably close to R 1 000 a month and save tons of cash15:48
Cantidelots of options here15:48
kulelu88_awayincluding women?15:50
kulelu88_away:D15:50
Cantidelolz15:50
Cantidethere are plenty of those, too15:50
kulelu88_awaydo they eat squid and smell?15:51
Cantidesome do15:51
Cantidei've seen my ex eat boiled silkworm pupae15:51
Cantideneedless to say she is my ex15:51
kulelu88_awayehh. what are you doing in Seoul? teacher?15:51
Cantidebut mostly they don't smell at all and they're very very sweet :p15:51
Cantideyeah15:51
Cantidenot much else to do15:51
kulelu88_awayI'm assuming you're a young white male?15:52
KilosCantide  did you get married yet?15:52
kulelu88_awayOld people and marriage. Psshhh15:52
Kiloshe is a durbanite15:53
kulelu88_awayindian fellow?15:53
Cantidenot yet :p15:55
Cantidekulelu88_away, not that young, but yes, white male15:55
Kilosvery young man15:55
CantideI've met English teachers here from Ecuador and even Nigeria15:55
Cantideanything is possible15:56
Cantide31 is not so young... -.-v15:56
Kiloslol15:56
Kiloswe had a guy here a few days back that is 7615:57
Kilosjust switched to ubuntu15:57
Cantideo_o;;15:57
Cantideone of my students is 58 and he just built himself a tube amp and some radio transceivers :D15:58
Kiloscool15:58
Cantidebye kulelu88 .-.16:01
Kiloslol16:01
Kiloswb kulelu88  16:14
Cantidewb 16:16
Cantideoh... sleep time! good night~16:17
magespawngood evening16:53
Kiloshi magespawn  16:54
magespawnback again17:06
superflykulelu88: pong17:09
kulelu88hey superfly 17:33
kulelu88I adjusted my algorithm to now use recursion but I am still working on a solution for it17:33
superflyhey kulelu88, I'm just busy getting the kids into bed, I'll be back in about 20/30 minutes17:34
superflyrecursion -_-17:39
superflyrecursion is not the answer... "no" is the answer :-P17:39
smile4everhoi :p18:03
kulelu88lol18:12
superflykulelu88: sorry, got distracted there for a few... what's the problem?18:29
Kiloshi smile4ever  superfly  18:30
smile4ever:D18:30
smile4everhi Kilos 18:30
smile4everhow are you doing, Kilos 18:32
kulelu88superfly: let me show you my original code18:33
Kilosgetting alone ok ty smile4ever  and you?18:33
smile4everyou alone?18:33
Kilosnono getting along18:33
kulelu88https://pastee.org/fwd6818:33
smile4everI'm tired and broke, no money left :p18:34
Kilosim never alone when i am online18:34
smile4ever:D18:34
smile4everthat's the spirit, Kilos 18:34
kulelu88Now I'm trying to make this function recursive18:34
Kilosoh my what did you do?18:34
smile4everkulelu88: for if for?? :o18:34
smile4ever:o18:34
Kiloshuh?18:34
kulelu88smile4ever: this is powerful stuff mate. I can throw in a while there as well ;)18:35
smile4everKilos: check the code URL he posted ;)18:35
smile4everKilos: I did not have a lot to spend, but now I'm fully broke :P18:36
smile4everI ate.18:36
smile4ever;)18:36
smile4everand I parked my car ;)18:36
Kilosat least your tummy is full18:36
superflykulelu88: what's the aim of the script? is the aim to make it recursive, or is the aim something else and you think recursion is the solution?18:36
smile4everKilos: unlike my benzine tank :p18:36
kulelu88superfly: the aim is to check which numbers in the list add up to 3018:36
kulelu88My logic is sound the way I'm doing it, but extending my for loops into a nested structure is difficult 18:37
kulelu88Unless ... I have a complex way of going through the for loop18:38
superflyso you want a list of numbers, which together add up to 30?18:38
kulelu88superfly: let me show you my algorithm in pseudocode that I want to make into a recursive function. I think I've figured it out, but you will understand my pseudocode better18:40
superflyOK18:40
kulelu88superfly: https://pastee.org/5pdtd18:42
kulelu88you probably see it now and have a similar solution to me. Now I'm coding it18:44
superflyhmmm18:46
kulelu88let me code my solution and show you. Unless you're logging out18:46
superflyNot now, so let me see your solution. I'm busy looking at it as well.18:52
kulelu88darn. I can't get the part where the function calls itself and it adds the second, and third numbers18:58
kulelu88superfly: can you tell me what this means: addi(lt2[1:]) ??19:00
kulelu88addi = a list19:00
inetprogood evening19:01
smile4everbye :p19:04
smile4everslaapwel :)19:05
Kilosyou too smile4ever  19:06
Kilosbe good19:06
superflykulelu88: I'm not sure what addi() does19:07
superflynever seen that syntax19:07
kulelu88addi is a list =D19:07
smile4everthanks! :p19:07
superflyI know what lt[1:] does19:08
kulelu88no wait shit sorry19:08
kulelu88addi is the function name19:08
superflyah19:08
kulelu88I think I get it now. I think!! 19:08
superflykulelu88: this *almost* works: http://bin.snyman.info/v7zsg19:09
superflythat while could be a "for"19:09
* Squirm lewks around19:10
kulelu88whoa I've never seen things like enumerate before19:11
superflyslightly neater: http://bin.snyman.info/p6k6q19:13
superflystill not working, but I think it's better than recursion19:14
superflynot sure my algorithm is entirely correct though, to be honest19:15
superflyenumerate() returns a tuple of (index, value)19:16
superflytechnically what you *should* be doing is testing 9 + 8 + 15 + ... then 9 + 15 + ...19:18
superflyand what I'm doing is testing 9 + 8 + 15 + ... then 8 + 15 + ...19:18
superflykulelu88: is this cheating? http://bin.snyman.info/j5utp19:21
superflyfewer iterations: http://bin.snyman.info/pbmad19:23
superflystill not 100% right19:23
kulelu88superfly: not really looking for the code :P just looking for some guidance. So don't stress about figuring it out with code19:24
kulelu88It's a self-challenge19:24
kulelu88I could keep nesting my solution with many for loops and it would work, but that code would be horrible 19:24
superflyIndeed. You can use recursion, but I'm trying to find an iterative way to solve it. 19:28
superflyWithout thousands of nested loops 19:28
kulelu88I don't quite get the else part of recursion when you call the function on itself19:29
kulelu88superfly: in a recursive way, how would you make 9 + 8, 9 + 15, 9 + 10 ?19:30
superflyreturn addi(num, rest_of_array)19:37
superflydepending on how the rest of the function is structured19:38
kulelu88that could actually work. where the array is sliced and an array of all numbers excluding the first is returned and each is added individually to point 0.19:39
kulelu88superfly: this is flawed, but what do you think: https://pastee.org/cujvm19:41
superflykulelu88: getting there19:43
kulelu88My code ran but I got output None :D19:49
superflyja, you have a few issues19:58
superflyfunctions are called with () not []19:59
Kilosnight all. sleep tight20:00
kulelu88I see you can't add a list and int as well20:02
superflykulelu88: maybe try solving fibonacci instead? it's a little easier :-P20:20
kulelu88haha. You know where this challenge comes from? Somebody posted a job posting about it and I want to solve it20:21
kulelu88superfly: Ok I figured out where I went wrong. The algorithm I gave you is wrong :(20:22
superflykulelu88: do you have a link to the original job posting?20:32
kulelu88check the CTPUG for May. It's there20:33
kulelu88Okay so addition of 2 variables is 15 permutations20:34
superflynot really seeing anything21:03
kulelu88superfly: I got it!!!21:20
kulelu88Hold on, coding it out21:20
kulelu88superfly: https://pastee.org/pfr5w21:28
kulelu88how shit is that we were both attempting to write out tools that already exist with the built-in library21:29
superflythere you go21:29
superflytold you there was a better way :-P21:29
kulelu88what a shit google-fu kind of problem and yet the solution is so easy with the built-in tools21:30
kulelu88Well at least it has been coded now. so I'm happy21:34

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!