2016-06-10T00:02:52Z sethalves quit (Remote host closed the connection) 2016-06-10T00:02:52Z andrewvic quit (Quit: andrewvic) 2016-06-10T00:04:27Z mokuso joined #scheme 2016-06-10T00:04:28Z mokuso quit (Changing host) 2016-06-10T00:04:28Z mokuso joined #scheme 2016-06-10T00:07:33Z wasamasa: spoiler: for game development you'll want to reuse as many libraries as possible, so unless you're doing text adventures or are jonathan blow, don't invent your own programming language 2016-06-10T00:09:44Z andrewvic joined #scheme 2016-06-10T00:10:24Z wasamasa: and if you've been unhappy with the existing implementations targeting the CLR, you'll have even worse tooling (read: none) if you start your own 2016-06-10T00:10:40Z andrewvic quit (Client Quit) 2016-06-10T00:12:03Z taylan: noethics: by compiling the expression on the fly 2016-06-10T00:15:34Z noethics: taylan, does that mean that a scheme that conforms to rnrs necessarily has to bundle a compiler with executables it produces? 2016-06-10T00:17:52Z emmanueloga quit (Ping timeout: 264 seconds) 2016-06-10T00:18:22Z andrewvic joined #scheme 2016-06-10T00:18:28Z samth quit (Ping timeout: 264 seconds) 2016-06-10T00:18:28Z greghendershott quit (Ping timeout: 264 seconds) 2016-06-10T00:18:28Z nowhere_man quit (Ping timeout: 264 seconds) 2016-06-10T00:18:45Z nowhere_man joined #scheme 2016-06-10T00:19:04Z makufiru quit (Ping timeout: 264 seconds) 2016-06-10T00:20:43Z taylan: noethics: yes 2016-06-10T00:20:46Z andrewvic quit (Client Quit) 2016-06-10T00:20:58Z taylan: well, it could statically determine whether they use eval 2016-06-10T00:21:26Z taylan: (and omit the compiler if they don't) 2016-06-10T00:21:34Z emmanueloga joined #scheme 2016-06-10T00:21:39Z greghendershott joined #scheme 2016-06-10T00:21:48Z noethics: taylan, i see, thanks 2016-06-10T00:21:59Z taylan: noethics: some implementations have both a compiler and interpreter 2016-06-10T00:22:10Z makufiru joined #scheme 2016-06-10T00:22:24Z samth joined #scheme 2016-06-10T00:26:00Z rsully quit (Ping timeout: 240 seconds) 2016-06-10T00:33:54Z rsully joined #scheme 2016-06-10T00:37:13Z Shadox quit (Quit: Leaving) 2016-06-10T00:38:49Z _sjs joined #scheme 2016-06-10T00:41:52Z davexunit joined #scheme 2016-06-10T00:42:42Z grublet joined #scheme 2016-06-10T00:44:36Z _sjs quit (Ping timeout: 276 seconds) 2016-06-10T00:49:29Z benwbooth quit (Ping timeout: 250 seconds) 2016-06-10T00:52:53Z Menche\demiC quit (Quit: Leaving) 2016-06-10T00:55:53Z benwbooth joined #scheme 2016-06-10T01:18:33Z makufiru: wasamasa: yeah that's half the reason I'm targeting the CLR so I can use all the monogame libraries too. Just need strong FFI 2016-06-10T01:24:45Z marrenarre quit (Quit: byeeeee) 2016-06-10T01:32:43Z _sjs joined #scheme 2016-06-10T01:39:11Z noethics: makufiru, how about chez? 2016-06-10T01:57:25Z taylan quit (Ping timeout: 252 seconds) 2016-06-10T02:02:34Z ArneBab joined #scheme 2016-06-10T02:04:00Z acarrico quit (Ping timeout: 240 seconds) 2016-06-10T02:05:50Z fugastrega quit (Quit: Leaving) 2016-06-10T02:06:30Z ArneBab_ quit (Ping timeout: 276 seconds) 2016-06-10T02:09:54Z grettke joined #scheme 2016-06-10T02:38:33Z annodomini quit (Quit: annodomini) 2016-06-10T02:38:51Z makufiru @noethics seems interesting in terms of studying the source code, but not having a JIT or the ability to cross-compile with xamarin :/ 2016-06-10T02:39:07Z makufiru: i don't know why my message looks like that? lol 2016-06-10T02:40:08Z noethics: makufiru, who needs a JIT when it compiles to native code ._. 2016-06-10T02:40:16Z makufiru: it compiles to C right? 2016-06-10T02:40:21Z noethics: machine code 2016-06-10T02:40:51Z makufiru: oh 2016-06-10T02:42:20Z annodomini joined #scheme 2016-06-10T02:45:14Z Menche\demiC joined #scheme 2016-06-10T02:47:09Z jlongster quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T02:49:52Z jlongster joined #scheme 2016-06-10T02:50:20Z jlongster quit (Client Quit) 2016-06-10T02:59:04Z ArneBab_ joined #scheme 2016-06-10T02:59:34Z daviid quit (Ping timeout: 252 seconds) 2016-06-10T03:00:23Z grettke quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T03:03:42Z ArneBab quit (Ping timeout: 276 seconds) 2016-06-10T03:04:23Z sethalves joined #scheme 2016-06-10T03:07:33Z andrewvic1 joined #scheme 2016-06-10T03:07:49Z mokuso quit (Quit: leaving) 2016-06-10T03:10:00Z pierpa quit (Ping timeout: 260 seconds) 2016-06-10T03:13:58Z jao quit (Remote host closed the connection) 2016-06-10T03:15:36Z galex-713 quit (Ping timeout: 246 seconds) 2016-06-10T03:16:28Z jao joined #scheme 2016-06-10T03:27:21Z andrewvic1 quit (Quit: andrewvic1) 2016-06-10T03:29:42Z jao quit (Ping timeout: 276 seconds) 2016-06-10T03:34:55Z jlongster joined #scheme 2016-06-10T03:36:02Z leot quit (Remote host closed the connection) 2016-06-10T03:48:34Z cemerick quit (Ping timeout: 240 seconds) 2016-06-10T03:48:35Z annodomini quit (Quit: annodomini) 2016-06-10T03:55:31Z mbuf joined #scheme 2016-06-10T04:14:47Z AlexDenisov joined #scheme 2016-06-10T04:30:32Z jlongster quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T05:26:03Z mastokley quit (Ping timeout: 276 seconds) 2016-06-10T05:37:43Z noethics quit (Quit: Leaving) 2016-06-10T05:49:41Z lambda-11235 quit (Quit: Bye) 2016-06-10T06:05:30Z AlexDenisov quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T06:26:03Z leot joined #scheme 2016-06-10T06:34:23Z tmtwd joined #scheme 2016-06-10T06:48:31Z stepnem joined #scheme 2016-06-10T06:56:11Z civodul joined #scheme 2016-06-10T06:59:18Z webshinra joined #scheme 2016-06-10T06:59:40Z webshinra: hello world 2016-06-10T07:00:27Z ecraven: hey webshinra 2016-06-10T07:07:44Z aries_liuxueyang quit (Quit: No Ping reply in 180 seconds.) 2016-06-10T07:09:08Z aries_liuxueyang joined #scheme 2016-06-10T07:17:32Z ASau quit (Read error: Connection reset by peer) 2016-06-10T07:21:30Z AlexDenisov joined #scheme 2016-06-10T07:24:41Z alezost joined #scheme 2016-06-10T07:26:18Z tmtwd quit (Ping timeout: 276 seconds) 2016-06-10T07:29:08Z bjz joined #scheme 2016-06-10T07:37:04Z AlexDenisov quit (Read error: Connection reset by peer) 2016-06-10T07:37:36Z AlexDenisov joined #scheme 2016-06-10T07:45:46Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2016-06-10T08:00:06Z bjz joined #scheme 2016-06-10T08:07:14Z przl joined #scheme 2016-06-10T08:15:16Z Muir joined #scheme 2016-06-10T08:27:05Z ASau joined #scheme 2016-06-10T08:33:12Z tmtwd joined #scheme 2016-06-10T08:44:39Z greatscottttt joined #scheme 2016-06-10T08:46:42Z przl quit (Ping timeout: 260 seconds) 2016-06-10T08:50:19Z przl joined #scheme 2016-06-10T08:52:07Z AlexDenisov quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T09:08:42Z alezost quit (Quit: I live in GuixSD and Emacs ) 2016-06-10T09:11:30Z AlexDenisov joined #scheme 2016-06-10T09:20:47Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2016-06-10T09:20:52Z nilg joined #scheme 2016-06-10T09:21:09Z tmtwd quit (Ping timeout: 258 seconds) 2016-06-10T09:24:30Z przl quit (Ping timeout: 260 seconds) 2016-06-10T09:31:55Z lritter quit (Remote host closed the connection) 2016-06-10T09:37:44Z bokr joined #scheme 2016-06-10T09:47:29Z bjz joined #scheme 2016-06-10T09:49:33Z ASau quit (Ping timeout: 240 seconds) 2016-06-10T09:51:19Z bjz_ joined #scheme 2016-06-10T09:52:03Z bjz quit (Ping timeout: 240 seconds) 2016-06-10T09:52:37Z madmuppet006 joined #scheme 2016-06-10T09:56:55Z edgar-rft joined #scheme 2016-06-10T09:57:34Z przl joined #scheme 2016-06-10T10:07:15Z manumanumanu quit (Read error: Connection reset by peer) 2016-06-10T10:18:04Z bokr1 joined #scheme 2016-06-10T10:19:01Z bokr quit (Ping timeout: 252 seconds) 2016-06-10T10:21:33Z madmuppet006 quit (Remote host closed the connection) 2016-06-10T10:22:22Z manumanumanu joined #scheme 2016-06-10T10:26:38Z nilg quit (Remote host closed the connection) 2016-06-10T10:31:20Z przl quit (Ping timeout: 240 seconds) 2016-06-10T10:42:39Z AlexDenisov quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T10:53:42Z AlexDenisov joined #scheme 2016-06-10T11:05:36Z davexunit left #scheme 2016-06-10T11:09:27Z annodomini joined #scheme 2016-06-10T11:22:43Z AlexDenisov quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T11:29:04Z masoudd joined #scheme 2016-06-10T11:29:25Z marrenarre joined #scheme 2016-06-10T11:32:08Z AlexDenisov joined #scheme 2016-06-10T11:41:07Z ijp quit (Quit: brb writing War and Peace and Zombies) 2016-06-10T11:42:54Z annodomini quit (Quit: annodomini) 2016-06-10T11:46:21Z AlexDenisov quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T11:49:49Z przl joined #scheme 2016-06-10T11:55:12Z AlexDenisov joined #scheme 2016-06-10T11:55:41Z bokr1 quit (Quit: Leaving.) 2016-06-10T11:56:00Z edgar-rft quit (Quit: edgar-rft) 2016-06-10T12:04:22Z jao joined #scheme 2016-06-10T12:10:49Z AlexDeni_ joined #scheme 2016-06-10T12:10:59Z AlexDenisov quit (Read error: Connection reset by peer) 2016-06-10T12:31:05Z badkins quit (Remote host closed the connection) 2016-06-10T12:35:03Z przl quit (Ping timeout: 240 seconds) 2016-06-10T12:37:05Z annodomini joined #scheme 2016-06-10T12:37:05Z annodomini quit (Changing host) 2016-06-10T12:37:05Z annodomini joined #scheme 2016-06-10T12:40:12Z przl joined #scheme 2016-06-10T12:42:06Z grublet quit (Ping timeout: 244 seconds) 2016-06-10T12:43:13Z grublet joined #scheme 2016-06-10T12:50:55Z cemerick joined #scheme 2016-06-10T12:53:10Z edgar-rft joined #scheme 2016-06-10T12:58:54Z groscoe joined #scheme 2016-06-10T13:00:17Z mbuf quit (Remote host closed the connection) 2016-06-10T13:01:37Z edgar-rft quit (Quit: edgar-rft) 2016-06-10T13:12:21Z taylan joined #scheme 2016-06-10T13:14:30Z grettke joined #scheme 2016-06-10T13:27:27Z leppie quit (Read error: Connection reset by peer) 2016-06-10T13:28:04Z leppie joined #scheme 2016-06-10T13:32:02Z nowhere_man quit (Read error: Connection reset by peer) 2016-06-10T13:36:55Z badkins joined #scheme 2016-06-10T13:37:33Z nowhere_man joined #scheme 2016-06-10T13:42:33Z cemerick quit (Ping timeout: 244 seconds) 2016-06-10T13:52:19Z taylan quit (Disconnected by services) 2016-06-10T13:52:31Z lambda-11235 joined #scheme 2016-06-10T13:52:32Z taylan joined #scheme 2016-06-10T13:56:52Z przl quit (Ping timeout: 264 seconds) 2016-06-10T13:57:01Z AlexDeni_ quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T14:04:27Z TCZ joined #scheme 2016-06-10T14:17:23Z AlexDenisov joined #scheme 2016-06-10T14:19:08Z DerGuteM1 is now known as DerGuteMoritz 2016-06-10T14:19:11Z przl joined #scheme 2016-06-10T14:29:06Z Muir quit (Quit: Leaving) 2016-06-10T14:34:17Z cemerick joined #scheme 2016-06-10T14:38:24Z grublet quit (Quit: Leaving) 2016-06-10T14:43:52Z cemerick quit (Ping timeout: 272 seconds) 2016-06-10T14:51:07Z TCZ quit (Quit: Leaving) 2016-06-10T14:59:59Z marrenarre quit (Quit: marrenarre) 2016-06-10T15:04:00Z marrenarre joined #scheme 2016-06-10T15:07:16Z cemerick joined #scheme 2016-06-10T15:07:37Z _sjs quit (Ping timeout: 260 seconds) 2016-06-10T15:09:48Z jlongster joined #scheme 2016-06-10T15:10:24Z przl quit (Ping timeout: 276 seconds) 2016-06-10T15:13:41Z marrenarre quit (Quit: marrenarre) 2016-06-10T15:13:58Z marrenarre joined #scheme 2016-06-10T15:15:38Z AlexDenisov quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T15:15:44Z marrenarre quit (Client Quit) 2016-06-10T15:16:00Z marrenarre joined #scheme 2016-06-10T15:19:28Z marrenarre quit (Client Quit) 2016-06-10T15:23:32Z GreySunshine joined #scheme 2016-06-10T15:24:44Z GreySunshine: Hello all I am Vasanth. I am new to scheme and I need some help debugging some code. Please take a look at this http://pastebin.com/qfrfXtu5 2016-06-10T15:27:26Z badkins quit (Ping timeout: 244 seconds) 2016-06-10T15:42:06Z GreySunshine: Well I was able to debug! 2016-06-10T15:42:19Z GreySunshine quit (Quit: leaving) 2016-06-10T15:42:27Z _sjs joined #scheme 2016-06-10T15:43:50Z sethalves quit (Remote host closed the connection) 2016-06-10T15:52:12Z civodul quit (Remote host closed the connection) 2016-06-10T15:54:16Z benwbooth quit (Ping timeout: 250 seconds) 2016-06-10T15:57:19Z cemerick quit (Ping timeout: 250 seconds) 2016-06-10T15:58:00Z benwbooth joined #scheme 2016-06-10T16:00:03Z benwboot_ joined #scheme 2016-06-10T16:02:48Z benwbooth quit (Ping timeout: 246 seconds) 2016-06-10T16:03:26Z greatscottttt quit (Quit: leaving) 2016-06-10T16:07:12Z mejja joined #scheme 2016-06-10T16:13:03Z galex-713 joined #scheme 2016-06-10T16:13:56Z dsp joined #scheme 2016-06-10T16:20:09Z noethics joined #scheme 2016-06-10T16:21:44Z badkins joined #scheme 2016-06-10T16:36:50Z narendraj9 joined #scheme 2016-06-10T16:45:07Z karswell quit (Ping timeout: 244 seconds) 2016-06-10T16:57:51Z noethics quit (Ping timeout: 244 seconds) 2016-06-10T17:01:43Z noethics joined #scheme 2016-06-10T17:03:56Z nilg joined #scheme 2016-06-10T17:05:45Z cemerick joined #scheme 2016-06-10T17:06:21Z narendraj9 quit (Remote host closed the connection) 2016-06-10T17:08:46Z pjb joined #scheme 2016-06-10T17:09:21Z edgar-rft joined #scheme 2016-06-10T17:15:25Z sethalves joined #scheme 2016-06-10T17:19:32Z ec joined #scheme 2016-06-10T17:20:56Z badkins quit (Ping timeout: 272 seconds) 2016-06-10T17:28:05Z badkins joined #scheme 2016-06-10T17:46:24Z AlexDenisov joined #scheme 2016-06-10T18:08:54Z pierpa joined #scheme 2016-06-10T18:09:38Z nilg quit (Read error: Connection reset by peer) 2016-06-10T18:12:46Z leot quit (Quit: BBL) 2016-06-10T18:15:17Z cmatei_ joined #scheme 2016-06-10T18:15:51Z cmatei quit (Ping timeout: 244 seconds) 2016-06-10T18:17:01Z mastokley joined #scheme 2016-06-10T18:28:25Z jao quit (Remote host closed the connection) 2016-06-10T18:42:53Z edgar-rft quit (Quit: edgar-rft) 2016-06-10T18:44:46Z nilg joined #scheme 2016-06-10T18:48:01Z _sjs quit (Quit: leaving) 2016-06-10T18:49:42Z rjnw joined #scheme 2016-06-10T18:58:09Z gravicappa joined #scheme 2016-06-10T18:59:02Z ijp joined #scheme 2016-06-10T19:01:52Z daviid joined #scheme 2016-06-10T19:08:53Z sethalves quit (Remote host closed the connection) 2016-06-10T19:09:33Z jao joined #scheme 2016-06-10T19:12:03Z ReductioAdAbsurd joined #scheme 2016-06-10T19:14:24Z groovy2shoes quit (Remote host closed the connection) 2016-06-10T19:14:54Z groovy2shoes joined #scheme 2016-06-10T19:16:12Z Opodeldoc joined #scheme 2016-06-10T19:38:29Z edgar-rft joined #scheme 2016-06-10T19:38:42Z pjb quit (Remote host closed the connection) 2016-06-10T19:45:26Z badkins quit (Ping timeout: 244 seconds) 2016-06-10T19:51:44Z mastokley quit (Ping timeout: 258 seconds) 2016-06-10T20:02:18Z civodul joined #scheme 2016-06-10T20:03:41Z mastokley joined #scheme 2016-06-10T20:04:46Z groscoe quit (Ping timeout: 252 seconds) 2016-06-10T20:10:04Z masoudd quit (Ping timeout: 240 seconds) 2016-06-10T20:11:36Z AlexDenisov quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T20:15:05Z gravicappa quit (Remote host closed the connection) 2016-06-10T20:18:58Z civodul quit (Read error: Connection reset by peer) 2016-06-10T20:23:12Z cemerick quit (Ping timeout: 260 seconds) 2016-06-10T20:27:10Z jcowan quit (Quit: Leaving) 2016-06-10T20:30:44Z edgar-rft quit (Quit: edgar-rft) 2016-06-10T20:54:05Z badkins joined #scheme 2016-06-10T20:54:35Z sethalves joined #scheme 2016-06-10T20:55:51Z cemerick joined #scheme 2016-06-10T21:19:25Z jlongster quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T21:22:23Z mastokley quit (Ping timeout: 244 seconds) 2016-06-10T21:29:48Z nilg quit (Ping timeout: 244 seconds) 2016-06-10T21:31:10Z Riastradh joined #scheme 2016-06-10T21:33:34Z strykerkkd joined #scheme 2016-06-10T21:38:42Z cemerick quit (Ping timeout: 272 seconds) 2016-06-10T21:38:53Z mastokley joined #scheme 2016-06-10T21:39:21Z edgar-rft joined #scheme 2016-06-10T21:44:45Z ASau joined #scheme 2016-06-10T21:48:36Z benwboot_ quit (Ping timeout: 246 seconds) 2016-06-10T21:51:55Z benwbooth joined #scheme 2016-06-10T21:52:18Z benwbooth quit (Max SendQ exceeded) 2016-06-10T21:52:23Z jcowan joined #scheme 2016-06-10T21:53:11Z benwbooth joined #scheme 2016-06-10T22:00:19Z n_blownapart joined #scheme 2016-06-10T22:04:32Z n_blownapart: hi this is Binet's formula for calculating fibonacci numbers. I guess the author uses an alias, but what is acc (accumulator?) I don't follow the recursion from line 9-14. please explain - thanks: https://www.refheap.com/120126 2016-06-10T22:05:08Z wasamasa: acc is the traditional name for an accumulator, yes 2016-06-10T22:05:55Z ijp: n_blownapart: if you can understand the usual recursive definition of exponentiation, this one is only slightly different 2016-06-10T22:05:56Z n_blownapart: excellent wasamasa thanks. what about line 14? 2016-06-10T22:06:09Z wasamasa: what about it? 2016-06-10T22:06:18Z bokr joined #scheme 2016-06-10T22:06:37Z n_blownapart: thanks ijp its at the end why put it there wasamasa ? 2016-06-10T22:06:41Z wasamasa: looks like a fairly standard pattern to recursion 2016-06-10T22:06:52Z ijp: incidentally this is the second time I've seen binet's formula in as many hours 2016-06-10T22:07:13Z wasamasa: well, the thing is that you typically can't use recursion on the function as is to have it tail-recursive 2016-06-10T22:07:14Z n_blownapart: really ijp ? its part of sicp in my case 2016-06-10T22:07:26Z groscoe joined #scheme 2016-06-10T22:07:36Z wasamasa: so you typically write a helper function that takes an accumulator, then invoke it with a neutral starting value 2016-06-10T22:07:47Z wasamasa: in scheme this can be done by nesting a define 2016-06-10T22:08:19Z ijp: you could explicitly pass around the base argument in *^ and pull it out of ^ 2016-06-10T22:08:25Z wasamasa: these days you'd probably just use a named let instead 2016-06-10T22:08:28Z benwbooth quit (Ping timeout: 272 seconds) 2016-06-10T22:08:49Z wasamasa: or the appropriate higher-order function 2016-06-10T22:08:56Z ijp: named let isn't always clearer 2016-06-10T22:09:14Z n_blownapart: ok please hold on wasamasa ijp 2016-06-10T22:09:28Z ijp: if you call the recursion multiple times in a form, people expecting a loop get confused 2016-06-10T22:09:47Z n_blownapart: ^ is already defined by scheme, right? 2016-06-10T22:09:56Z wasamasa: nope 2016-06-10T22:09:58Z ijp: we call it expt 2016-06-10T22:10:05Z n_blownapart: ok 2016-06-10T22:10:14Z wasamasa: I have no idea who came up with these silly symbols in your example 2016-06-10T22:10:21Z groscoe quit (Remote host closed the connection) 2016-06-10T22:10:59Z ijp: wasamasa: the phi here is the golden ratio 2016-06-10T22:11:25Z n_blownapart: so the acc gets passed around with the recursion ? also what's the difference between a base case and a "neutral " starting point ? 2016-06-10T22:11:26Z wasamasa: I'm speaking of *^ 2016-06-10T22:11:30Z ijp: the use of psi is more arbitrary, but psi usually comes with phi for whatever reason 2016-06-10T22:11:49Z ijp: oh right, well sicp wouldn't have 2016-06-10T22:11:57Z n_blownapart: psi makes fairly accurate calculations very accurate. 2016-06-10T22:12:15Z ijp: I have no idea what you could possibly mean 2016-06-10T22:12:48Z n_blownapart: phi works alone, the addition of psi makes the code dead accurate 2016-06-10T22:13:56Z ijp: I'd have assumed it was for alphabetic reasons, if χ wasn't in the way. I presume it is for euphony 2016-06-10T22:14:14Z n_blownapart: I'm a beginner I don't follow that ijp 2016-06-10T22:14:34Z ijp: euphony (n) the quality of being pleasing to the ear 2016-06-10T22:15:30Z n_blownapart: nice ... could you guys walk me through the recursive part? the "neutral case" is confusing, I'm used to reading base cases at the top. 2016-06-10T22:16:13Z n_blownapart: btw these are the best solutions for sicp I've found so far, so I am subject to them for now 2016-06-10T22:16:19Z wasamasa: the inner function almost reads like plain english 2016-06-10T22:16:30Z wasamasa: if the argument is zero, return what's been accumulated 2016-06-10T22:16:31Z benwbooth joined #scheme 2016-06-10T22:16:37Z n_blownapart: ok 2016-06-10T22:16:41Z n_blownapart: .. 2016-06-10T22:17:06Z wasamasa: otherwise repeat with the argument decremented by one and the accumulator times the base 2016-06-10T22:17:47Z ijp: working through an example looking at the arguments to the recurrence is probably more helpful than a prose explanation 2016-06-10T22:18:07Z n_blownapart: 9-14 can pretty much function without the phi / psi part , correct? 2016-06-10T22:18:09Z wasamasa: so, assuming that the power (= argument) is a positive number, it will eventually reach zero and the accumulator will be multiplied every time with the base 2016-06-10T22:18:31Z ijp: 9 - 14 doesn't depend on them at all, only fib~ does 2016-06-10T22:18:35Z wasamasa: now all that's needed is to kick it off with suitable starting values 2016-06-10T22:18:57Z wasamasa: for multiplication that happens to be 1 2016-06-10T22:19:24Z n_blownapart: ok thanks kindly. one thing... 2016-06-10T22:19:52Z n_blownapart: something general about binet's formula .... 2016-06-10T22:19:54Z wasamasa: I'd instrument the definition with some print/newline things 2016-06-10T22:20:28Z n_blownapart: like display ? I sort of can use it , wasamasa 2016-06-10T22:20:28Z ijp: it's not a practical algorithm if that's what you are going to ask 2016-06-10T22:21:05Z n_blownapart: ijp the gist of the exercise was to do a formal proof. this is just the code for binet's 2016-06-10T22:21:18Z n_blownapart: but still... 2016-06-10T22:21:21Z wasamasa: just to understand that the recursion happening here is of loop-like nature 2016-06-10T22:21:29Z n_blownapart: cool ok 2016-06-10T22:21:56Z n_blownapart: this is my first exposure to programming except a brief foray with ruby 2016-06-10T22:21:56Z wasamasa: display prints strings with quotes, so not quite like C's printf 2016-06-10T22:22:21Z n_blownapart: C ? no clue 2016-06-10T22:22:34Z n_blownapart: tho I see 2016-06-10T22:22:40Z wasamasa: it's the same in ruby 2016-06-10T22:23:01Z galex-713 quit (Ping timeout: 244 seconds) 2016-06-10T22:23:25Z ijp: afaict "binet's formula" mostly gets used as a 2nd example of how to use generating functions 2016-06-10T22:23:33Z galex|713 joined #scheme 2016-06-10T22:24:00Z n_blownapart: ok that 's a lot to digest. here's the thing : 2016-06-10T22:24:01Z bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2016-06-10T22:24:10Z wasamasa: and as a lazy way of generating small fibonacci numbers 2016-06-10T22:24:33Z n_blownapart: wasamasa: you mean not valid for larger nums . ? haven't tried it. 2016-06-10T22:24:43Z wasamasa: n_blownapart: IIRC that was the downside of that method 2016-06-10T22:24:44Z ijp: it's valid, it just won't work on a computer 2016-06-10T22:24:58Z ijp: but this is all background 2016-06-10T22:25:18Z n_blownapart: the first example is the real slow one. you mean that one? I'll post it if you want to see it. 2016-06-10T22:25:55Z aries_liuxueyang quit (Quit: No Ping reply in 180 seconds.) 2016-06-10T22:25:56Z n_blownapart: psi is - 0.618 .... 2016-06-10T22:26:20Z n_blownapart: phi is 1.618 2016-06-10T22:27:22Z aries_liuxueyang joined #scheme 2016-06-10T22:27:30Z n_blownapart: at first I thought phi minus psi gave some sort of identity. but its negative to the addition would not create an identity. what is going on with the math here? 2016-06-10T22:27:44Z n_blownapart: so* 2016-06-10T22:27:52Z ijp: wasamasa: you could adapt it by having arithmetic in Q(√5), like jordigh posted in emacs earlier, but it'd probably be about the same efficiency as the matrix exponentiation method 2016-06-10T22:29:31Z n_blownapart: oh I see .. 2016-06-10T22:29:36Z ijp: i.e. [[0,1],[1,1]]^n * [[0],[1]] 2016-06-10T22:30:26Z ijp: spoilers for another sicp exercise btw 2016-06-10T22:31:10Z ijp: n_blownapart: are you familiar with proof by induction? 2016-06-10T22:31:37Z n_blownapart: It's my first experience : http://www.billthelizard.com/2009/12/sicp-exercise-113-fibonacci-and-golden.html 2016-06-10T22:31:38Z rudybot: http://teensy.info/DYJpjQ4BVL 2016-06-10T22:31:54Z n_blownapart: I like spoilers ijp ! 2016-06-10T22:32:34Z n_blownapart: hold on I'm getting bogged down. it turns out it is an identity so I have to look closer at the math .. 2016-06-10T22:32:43Z zv: it is described in detail in sicp 2016-06-10T22:32:53Z zv: not just of the fibonacci sequence, but it's generalization as well. 2016-06-10T22:33:08Z n_blownapart: zv really ? that book seems to skip around. that is good news 2016-06-10T22:33:10Z zv: (that is to say, f(n-x) 2016-06-10T22:33:37Z zv: that is to say f(n)+f(n-1)...f(n-x) 2016-06-10T22:33:49Z n_blownapart: yeah the post above has the full proof, but seeing it in code is confusing. my math is weak but I generally follow it. 2016-06-10T22:34:46Z n_blownapart: (f n) + (f (- n 1) = (f (+ n 1) << that? 2016-06-10T22:35:09Z galex|713: you forgot parenthesis 2016-06-10T22:35:17Z n_blownapart: correction (fib n) 2016-06-10T22:35:25Z n_blownapart: word galex|713 2016-06-10T22:36:03Z edgar-rft quit (Quit: edgar-rft) 2016-06-10T22:37:44Z n_blownapart: ((- phi^n psi^n) / sqrt 5 ) is 1 / sqrt 5 , is that right? 2016-06-10T22:38:57Z ijp: that's fib n 2016-06-10T22:42:18Z n_blownapart: that is fascinating. what I cannot grasp is that it resolves to an identity in the numerator. btw , are there more identities than 1 in mathematics? 2016-06-10T22:42:55Z n_blownapart: the definition of an identity is always just 1 , right ? 2016-06-10T22:43:13Z ijp: sure, 0 is the identity for +, "" is the identity for string concatenation, ... 2016-06-10T22:43:25Z ijp: the identity function is the identity for function composition 2016-06-10T22:43:49Z n_blownapart: ijp please explain that if you have time. 2016-06-10T22:44:20Z n_blownapart: or is it a joke. I'm a bit saturated. 2016-06-10T22:44:23Z ijp: there isn't much to say 2016-06-10T22:44:25Z wasamasa: it's basic algebra 2016-06-10T22:44:35Z ijp: (+ 0 x) = x = (+ x 0) 2016-06-10T22:44:49Z ijp: (string-append "" x) = x = (string-append x "") 2016-06-10T22:45:16Z bjz joined #scheme 2016-06-10T22:46:48Z n_blownapart: so phi^n / sqrt 5 is less accurate for our purposes than the binet scenario ? ( 1 / sqrt 5 ) 2016-06-10T22:51:10Z ijp: no, the question is really saying that the (+ psiⁿ / √5) stays within 1/2 in either direction 2016-06-10T22:52:17Z bokr quit (Quit: Leaving.) 2016-06-10T22:52:18Z ijp: so since that term is there to make it an integer, you can instead just round to the nearest integer 2016-06-10T22:52:28Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2016-06-10T22:52:49Z n_blownapart: sorry which term is referred? 2016-06-10T22:52:53Z n_blownapart: to 2016-06-10T22:54:23Z ijp: the + ψⁿ/√5 2016-06-10T22:55:06Z ijp: (aside for other people: here is an even more opaque and amusing way to generate the fibonacci numbers https://paulhankin.github.io/Fibonacci/) 2016-06-10T22:55:46Z n_blownapart: you mean - ψⁿ/√5 ? ijp 2016-06-10T22:56:00Z ijp: er, yes 2016-06-10T22:56:11Z groscoe joined #scheme 2016-06-10T22:56:46Z n_blownapart: ok . btw are you using shortcuts for those characters or cutting and pasting? 2016-06-10T22:57:01Z ijp: emacs input method 2016-06-10T22:57:06Z n_blownapart: sweet 2016-06-10T22:59:04Z strykerkkd quit (Quit: Leaving) 2016-06-10T23:00:02Z n_blownapart: the question is asking to be within 1/2 in either direction , but the author of the solution decided to add the psi business. I haven't read ahead in sicp obviously. I mean, staying within 1/2 , it must be gearing up to give the binet solution or similar, correct ? 2016-06-10T23:00:23Z bjz joined #scheme 2016-06-10T23:00:25Z n_blownapart: author on 'bill the lizard ' blog meaning.. 2016-06-10T23:02:27Z lambda-11235 quit (Ping timeout: 246 seconds) 2016-06-10T23:05:59Z n_blownapart: cool paulhankin gives the same method 'closed form' 2016-06-10T23:06:05Z ijp: you just need to glue together everything that's been covered so far. The binet formula tells us that fib(n) = (φⁿ-ψⁿ)/√5 = φⁿ/√5 - ψⁿ/√5. |ψⁿ/√5| < 1/2. So fib(n) - 1/2 < φⁿ/√5 < fib(n)+1/2. fib(n) is an integer, so fib(n) is the only integer in that range, i.e. the one closest to φⁿ/√5 2016-06-10T23:11:36Z grettke quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-06-10T23:12:32Z n_blownapart: very kind of you, thanks ijp , wasamasa . I need to work on it. more drama later ! 2016-06-10T23:18:09Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2016-06-10T23:20:47Z lambda-11235 joined #scheme