[04:28] Morning everyone [06:06] morning all [07:16] Morning [07:17] hi Squirm [07:36] hi TinuvaMac [07:37] morning Kilos [08:39] hey Kilos [08:39] I just got back into bed, trying to keep warm :| [08:39] hi there SDCDev [08:40] lol where are you thats so cold [08:40] i just been outside soaking some UV's for warmth too [09:51] Im in jbay Kilos [09:51] thats not cold man come try ptown [09:52] good mornings [09:52] more [11:55] ping superfly [12:19] did he not say 8.30 tonight kulelu88 [12:19] thats after kids are in bed [12:24] oh yes, I forgot the time === Cantide is now known as Can_Cycle [14:03] ergh [14:03] being load shed [14:04] eish === kulelu88 is now known as kulelu88_away === Can_Cycle is now known as Cantide [15:37] hi everyone :p [15:38] hi Cantide hows things? [15:38] awesome~~ [15:38] i just cycled around Seoul [15:38] well, not around Seoul, around my part of Seoul [15:38] lol [15:38] it's 00:38 and i just got home :D [15:38] feeling energized :) [15:38] wow go sleep man [15:38] how are you [15:38] ? [15:38] nah [15:39] good ty [15:39] i'll sleep around 1 :p [15:39] what time you get up? [15:39] around 08:30 [15:39] not so early :D [15:39] work starts at 12 noon '-';;; [15:40] ah then plenty of sleep time [15:40] yup [15:40] i can sleep in until 10 if i want [15:40] cool [15:41] what are you up to? [15:41] it's almost 6 pm there, right? dinner time! [15:42] yeah im bathed and sitting at the pc watching the time go by [15:42] hehe [15:43] What is the cost of living in Seoul? [15:45] hmmmm [15:45] kinda expensive [15:45] in dollar terms per month? [15:45] my rent is about R 6 000 a month for a studio apartment [15:45] that's all???? [15:45] define studio apartment? [15:45] food costs me about R 3 000 a month if i eat just rice lol [15:46] but usually i spend about R 10 000 on food and drink each month :'( [15:46] hmmm... it's about 20 m^2 - including my kitchen area and bathroom [15:46] furnished and clean [15:47] so basically a box. I thought you meant studio as in "top-floor, across the building" apartment [15:47] aha [15:47] i wish [15:48] that's probably like R 20 000 a month lol [15:48] if 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 cash [15:48] lots of options here [15:50] including women? [15:50] :D [15:50] lolz [15:50] there are plenty of those, too [15:51] do they eat squid and smell? [15:51] some do [15:51] i've seen my ex eat boiled silkworm pupae [15:51] needless to say she is my ex [15:51] ehh. what are you doing in Seoul? teacher? [15:51] but mostly they don't smell at all and they're very very sweet :p [15:51] yeah [15:51] not much else to do [15:52] I'm assuming you're a young white male? [15:52] Cantide did you get married yet? [15:52] Old people and marriage. Psshhh [15:53] he is a durbanite [15:53] indian fellow? [15:55] not yet :p [15:55] kulelu88_away, not that young, but yes, white male [15:55] very young man [15:55] I've met English teachers here from Ecuador and even Nigeria [15:56] anything is possible [15:56] 31 is not so young... -.-v [15:56] lol [15:57] we had a guy here a few days back that is 76 [15:57] just switched to ubuntu [15:57] o_o;; [15:58] one of my students is 58 and he just built himself a tube amp and some radio transceivers :D [15:58] cool [16:01] bye kulelu88 .-. [16:01] lol [16:14] wb kulelu88 [16:16] wb [16:17] oh... sleep time! good night~ [16:53] good evening [16:54] hi magespawn [17:06] back again [17:09] kulelu88: pong [17:33] hey superfly [17:33] I adjusted my algorithm to now use recursion but I am still working on a solution for it [17:34] hey kulelu88, I'm just busy getting the kids into bed, I'll be back in about 20/30 minutes [17:39] recursion -_- [17:39] recursion is not the answer... "no" is the answer :-P [18:03] hoi :p [18:12] lol [18:29] kulelu88: sorry, got distracted there for a few... what's the problem? [18:30] hi smile4ever superfly [18:30] :D [18:30] hi Kilos [18:32] how are you doing, Kilos [18:33] superfly: let me show you my original code [18:33] getting alone ok ty smile4ever and you? [18:33] you alone? [18:33] nono getting along [18:33] https://pastee.org/fwd68 [18:34] I'm tired and broke, no money left :p [18:34] im never alone when i am online [18:34] :D [18:34] that's the spirit, Kilos [18:34] Now I'm trying to make this function recursive [18:34] oh my what did you do? [18:34] kulelu88: for if for?? :o [18:34] :o [18:34] huh? [18:35] smile4ever: this is powerful stuff mate. I can throw in a while there as well ;) [18:35] Kilos: check the code URL he posted ;) [18:36] Kilos: I did not have a lot to spend, but now I'm fully broke :P [18:36] I ate. [18:36] ;) [18:36] and I parked my car ;) [18:36] at least your tummy is full [18:36] kulelu88: 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] Kilos: unlike my benzine tank :p [18:36] superfly: the aim is to check which numbers in the list add up to 30 [18:37] My logic is sound the way I'm doing it, but extending my for loops into a nested structure is difficult [18:38] Unless ... I have a complex way of going through the for loop [18:38] so you want a list of numbers, which together add up to 30? [18:40] superfly: 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 better [18:40] OK [18:42] superfly: https://pastee.org/5pdtd [18:44] you probably see it now and have a similar solution to me. Now I'm coding it [18:46] hmmm [18:46] let me code my solution and show you. Unless you're logging out [18:52] Not now, so let me see your solution. I'm busy looking at it as well. [18:58] darn. I can't get the part where the function calls itself and it adds the second, and third numbers [19:00] superfly: can you tell me what this means: addi(lt2[1:]) ?? [19:00] addi = a list [19:01] good evening [19:04] bye :p [19:05] slaapwel :) [19:06] you too smile4ever [19:06] be good [19:07] kulelu88: I'm not sure what addi() does [19:07] never seen that syntax [19:07] addi is a list =D [19:07] thanks! :p [19:08] I know what lt[1:] does [19:08] no wait shit sorry [19:08] addi is the function name [19:08] ah [19:08] I think I get it now. I think!! [19:09] kulelu88: this *almost* works: http://bin.snyman.info/v7zsg [19:09] that while could be a "for" [19:10] * Squirm lewks around [19:11] whoa I've never seen things like enumerate before [19:13] slightly neater: http://bin.snyman.info/p6k6q [19:14] still not working, but I think it's better than recursion [19:15] not sure my algorithm is entirely correct though, to be honest [19:16] enumerate() returns a tuple of (index, value) [19:18] technically what you *should* be doing is testing 9 + 8 + 15 + ... then 9 + 15 + ... [19:18] and what I'm doing is testing 9 + 8 + 15 + ... then 8 + 15 + ... [19:21] kulelu88: is this cheating? http://bin.snyman.info/j5utp [19:23] fewer iterations: http://bin.snyman.info/pbmad [19:23] still not 100% right [19:24] superfly: not really looking for the code :P just looking for some guidance. So don't stress about figuring it out with code [19:24] It's a self-challenge [19:24] I could keep nesting my solution with many for loops and it would work, but that code would be horrible [19:28] Indeed. You can use recursion, but I'm trying to find an iterative way to solve it. [19:28] Without thousands of nested loops [19:29] I don't quite get the else part of recursion when you call the function on itself [19:30] superfly: in a recursive way, how would you make 9 + 8, 9 + 15, 9 + 10 ? [19:37] return addi(num, rest_of_array) [19:38] depending on how the rest of the function is structured [19:39] that 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:41] superfly: this is flawed, but what do you think: https://pastee.org/cujvm [19:43] kulelu88: getting there [19:49] My code ran but I got output None :D [19:58] ja, you have a few issues [19:59] functions are called with () not [] [20:00] night all. sleep tight [20:02] I see you can't add a list and int as well [20:20] kulelu88: maybe try solving fibonacci instead? it's a little easier :-P [20:21] haha. You know where this challenge comes from? Somebody posted a job posting about it and I want to solve it [20:22] superfly: Ok I figured out where I went wrong. The algorithm I gave you is wrong :( [20:32] kulelu88: do you have a link to the original job posting? [20:33] check the CTPUG for May. It's there [20:34] Okay so addition of 2 variables is 15 permutations [21:03] not really seeing anything [21:20] superfly: I got it!!! [21:20] Hold on, coding it out [21:28] superfly: https://pastee.org/pfr5w [21:29] how shit is that we were both attempting to write out tools that already exist with the built-in library [21:29] there you go [21:29] told you there was a better way :-P [21:30] what a shit google-fu kind of problem and yet the solution is so easy with the built-in tools [21:34] Well at least it has been coded now. so I'm happy