2014-10-10T00:03:37Z kongtomorrow joined #scheme 2014-10-10T00:24:50Z Stunt123 joined #scheme 2014-10-10T00:34:26Z pjb: lrs: don't despair, you can still learn and make progress! :-) 2014-10-10T00:35:44Z alexei_ quit (Ping timeout: 260 seconds) 2014-10-10T00:44:56Z kongtomorrow quit 2014-10-10T00:49:16Z tcsc quit (Quit: bye!) 2014-10-10T00:58:37Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-10-10T01:01:14Z pera joined #scheme 2014-10-10T01:03:15Z _tca: adhd is the best i love it 2014-10-10T01:05:22Z _xinix_ joined #scheme 2014-10-10T01:05:42Z leo2007 quit (Read error: Connection reset by peer) 2014-10-10T01:10:19Z mrowe is now known as mrowe_away 2014-10-10T01:10:56Z emma quit (Read error: Connection reset by peer) 2014-10-10T01:15:24Z BossKonaSegwaY joined #scheme 2014-10-10T01:16:36Z cdidd quit (Ping timeout: 250 seconds) 2014-10-10T01:20:01Z c107 joined #scheme 2014-10-10T01:21:58Z jusss joined #scheme 2014-10-10T01:22:18Z ivan\ joined #scheme 2014-10-10T01:26:29Z cdidd joined #scheme 2014-10-10T01:32:42Z tobik quit (Ping timeout: 245 seconds) 2014-10-10T01:32:53Z leo2007 joined #scheme 2014-10-10T01:35:17Z tobik joined #scheme 2014-10-10T01:37:04Z jusss quit (Remote host closed the connection) 2014-10-10T01:42:28Z davexunit joined #scheme 2014-10-10T01:43:19Z lrs quit (Ping timeout: 272 seconds) 2014-10-10T01:43:51Z kvda joined #scheme 2014-10-10T01:45:03Z pjb: ADHD is not a learning disability. 2014-10-10T01:50:49Z theseb quit (Ping timeout: 258 seconds) 2014-10-10T01:55:05Z ivan\ quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-10T02:03:27Z Stunt124 joined #scheme 2014-10-10T02:03:52Z pera quit (Ping timeout: 240 seconds) 2014-10-10T02:04:52Z Stunt123 quit (Ping timeout: 260 seconds) 2014-10-10T02:05:26Z theseb joined #scheme 2014-10-10T02:07:33Z Stunt123 joined #scheme 2014-10-10T02:07:42Z Stunt124 quit (Ping timeout: 246 seconds) 2014-10-10T02:07:45Z Stunt123 quit (Client Quit) 2014-10-10T02:11:48Z kvda: I imagine it wouldn't help with learning... 2014-10-10T02:28:48Z ivan\ joined #scheme 2014-10-10T02:48:37Z jeapostrophe quit (Ping timeout: 245 seconds) 2014-10-10T02:53:29Z davexunit quit (Quit: Later) 2014-10-10T02:54:45Z emma joined #scheme 2014-10-10T03:19:11Z Dasyatid1 joined #scheme 2014-10-10T03:28:51Z acarrico quit (Ping timeout: 244 seconds) 2014-10-10T03:32:28Z vinleod quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2014-10-10T03:36:16Z sheilong quit (Quit: Konversation terminated!) 2014-10-10T03:38:17Z _xinix_ quit (Ping timeout: 260 seconds) 2014-10-10T03:49:33Z MichaelRaskin quit (Quit: MichaelRaskin) 2014-10-10T03:51:49Z _xinix_ joined #scheme 2014-10-10T03:58:51Z zacts quit (Ping timeout: 272 seconds) 2014-10-10T03:59:19Z zacts joined #scheme 2014-10-10T04:03:57Z zacts quit (Ping timeout: 260 seconds) 2014-10-10T04:05:04Z zacts joined #scheme 2014-10-10T04:09:30Z zacts quit (Ping timeout: 246 seconds) 2014-10-10T04:10:47Z zacts joined #scheme 2014-10-10T04:16:26Z kongtomorrow joined #scheme 2014-10-10T04:17:01Z zacts quit (Ping timeout: 260 seconds) 2014-10-10T04:17:44Z zacts joined #scheme 2014-10-10T04:22:04Z zacts quit (Ping timeout: 244 seconds) 2014-10-10T04:23:30Z zacts joined #scheme 2014-10-10T04:28:15Z zacts quit (Ping timeout: 272 seconds) 2014-10-10T04:29:00Z zacts joined #scheme 2014-10-10T04:29:04Z zacts quit (Changing host) 2014-10-10T04:29:05Z zacts joined #scheme 2014-10-10T04:33:49Z zacts quit (Ping timeout: 260 seconds) 2014-10-10T04:34:42Z zacts joined #scheme 2014-10-10T04:39:22Z zacts quit (Ping timeout: 245 seconds) 2014-10-10T04:40:30Z zacts joined #scheme 2014-10-10T04:45:21Z zacts quit (Ping timeout: 272 seconds) 2014-10-10T04:46:15Z zacts joined #scheme 2014-10-10T04:48:53Z atomx_ quit (Ping timeout: 272 seconds) 2014-10-10T04:50:48Z zacts quit (Ping timeout: 246 seconds) 2014-10-10T04:52:06Z zacts joined #scheme 2014-10-10T04:56:44Z zacts quit (Ping timeout: 250 seconds) 2014-10-10T04:57:58Z zacts joined #scheme 2014-10-10T04:59:51Z mrowe_away is now known as mrowe 2014-10-10T05:00:57Z kongtomorrow quit 2014-10-10T05:02:22Z zacts quit (Ping timeout: 250 seconds) 2014-10-10T05:03:42Z zacts joined #scheme 2014-10-10T05:04:22Z oleo__ quit (Quit: Verlassend) 2014-10-10T05:04:59Z kongtomorrow joined #scheme 2014-10-10T05:11:51Z karswell` joined #scheme 2014-10-10T05:13:10Z MichaelRaskin joined #scheme 2014-10-10T05:13:14Z karswell quit (Read error: Connection reset by peer) 2014-10-10T05:15:54Z theseb quit (Ping timeout: 258 seconds) 2014-10-10T05:19:51Z ananna quit (Ping timeout: 246 seconds) 2014-10-10T05:21:27Z mornfall quit (Ping timeout: 245 seconds) 2014-10-10T05:23:52Z mrowe is now known as mrowe_away 2014-10-10T05:33:50Z kazimir42 quit (Remote host closed the connection) 2014-10-10T05:47:44Z mornfall joined #scheme 2014-10-10T05:54:22Z mornfall quit (Ping timeout: 240 seconds) 2014-10-10T05:57:15Z hiroakip joined #scheme 2014-10-10T06:00:16Z mornfall joined #scheme 2014-10-10T06:08:38Z sigjuice: SICP exercise 3.38 asks what different values can 'balance' end up with if these three operations execute concurrently. balance += 10, balance -= 20, and balance -= balance/2 2014-10-10T06:10:13Z sigjuice: I have a test program that sometimes produces 25. Any ideas on how 25 is possible? 2014-10-10T06:13:59Z sigjuice: https://gist.github.com/khirbat/9ee7004f10ee0884ac2d 2014-10-10T06:15:45Z c107 quit (Remote host closed the connection) 2014-10-10T06:17:22Z Dasyatid1 left #scheme 2014-10-10T06:18:08Z fizzie: sigjuice: As 80-110/2. Have both Peter and Paul read the initial value of 'balance' (so they do (+ 100 10) and (- 100 20), respectively) and then have Paul first set balance to 80, arrange for Mary to evaluate one 'balance' so she has (- 80 (/ balance 2)), have Peter set balance to 110, and end up with (- 80 (/ 110 2)). 2014-10-10T06:18:52Z masm joined #scheme 2014-10-10T06:19:31Z rtra` joined #scheme 2014-10-10T06:19:40Z fizzie: (Writing it as "balance += 10" and "balance -= 20" instead of "balance = balance + 10" and "balance = balance - 20" makes the operations look overly atomic.) 2014-10-10T06:22:00Z hiroakip quit (Ping timeout: 260 seconds) 2014-10-10T06:22:48Z sigjuice: is considering each operation as two operations still overly atomic? e.g. balance += 10 is "1. read balance 2. set balance to balance - 10" 2014-10-10T06:22:56Z rtra quit (Ping timeout: 260 seconds) 2014-10-10T06:23:16Z rtra` is now known as rtra 2014-10-10T06:23:38Z kvda quit (Quit: x___x) 2014-10-10T06:24:32Z fizzie: That would depend on your concurrency model, really. But at least breaking it down to those two operations (you could use a different name in 2. -- e.g. "1. read balance as balance'. 2. set balance to balance' - 10" or something) is enough to explain the 25. 2014-10-10T06:29:07Z fizzie: (As long as Mary's case is written "1. Read balance as balance1. 2. Read balance as balance2. 3. Set balance to balance1 - balance2/2." with the caveat that steps 1 and 2 can occur in either order.) 2014-10-10T06:33:39Z sigjuice: thanks fizzie. I was working this out on paper as an interleaving of 3 threads where each thread has two operations (read balance and set balance). 2014-10-10T06:34:12Z sigjuice: and I failed to see that Mary's thread is actually three operations 2014-10-10T06:38:43Z _xinix_ quit (Ping timeout: 272 seconds) 2014-10-10T06:41:27Z sigjuice: Is this how many interleavings are possible (2 + 2 + 3)!/(2! * 2! * 3!) ? Assuming Peter and Paul are two operations each and Mary is three operations. 2014-10-10T06:42:22Z jusss joined #scheme 2014-10-10T06:48:52Z pjb: Hence the complexity of multithreaded programs. 2014-10-10T06:52:24Z sigjuice: Of course. That is exactly what SICP says in the next section. 2014-10-10T06:53:31Z ananna joined #scheme 2014-10-10T07:07:07Z DGASAU quit (Read error: Connection reset by peer) 2014-10-10T07:07:51Z DGASAU joined #scheme 2014-10-10T07:18:37Z psy_ quit (Ping timeout: 272 seconds) 2014-10-10T07:22:29Z vinleod joined #scheme 2014-10-10T07:29:45Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-10-10T07:31:00Z MichaelRaskin quit (Ping timeout: 250 seconds) 2014-10-10T07:31:57Z drdanmaku quit (Quit: Connection closed for inactivity) 2014-10-10T07:33:07Z przl joined #scheme 2014-10-10T07:36:46Z robot-beethoven joined #scheme 2014-10-10T07:38:48Z przl quit (Ping timeout: 250 seconds) 2014-10-10T07:41:24Z stepnem joined #scheme 2014-10-10T07:44:01Z psy joined #scheme 2014-10-10T07:44:14Z wingo joined #scheme 2014-10-10T07:44:24Z fridim_ joined #scheme 2014-10-10T07:45:03Z BossKonaSegwaY joined #scheme 2014-10-10T07:53:14Z jusss quit (Quit: ERC Version 5.2 (IRC client for Emacs)) 2014-10-10T07:56:58Z robot-beethoven quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-10T08:10:00Z fzappa joined #scheme 2014-10-10T08:24:14Z kongtomorrow quit 2014-10-10T08:31:55Z przl joined #scheme 2014-10-10T08:42:54Z lewis1711 quit (Ping timeout: 258 seconds) 2014-10-10T08:44:52Z pnkfelix joined #scheme 2014-10-10T08:54:15Z pnkfelix quit (Ping timeout: 272 seconds) 2014-10-10T09:04:11Z pnkfelix joined #scheme 2014-10-10T09:05:22Z Riastradh joined #scheme 2014-10-10T09:27:22Z bjz joined #scheme 2014-10-10T09:28:35Z vinleod quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2014-10-10T09:41:35Z lrs joined #scheme 2014-10-10T10:00:11Z atomx joined #scheme 2014-10-10T10:00:18Z atomx quit (Remote host closed the connection) 2014-10-10T10:00:29Z lrs quit (Ping timeout: 244 seconds) 2014-10-10T10:00:44Z atomx joined #scheme 2014-10-10T10:08:55Z vanila joined #scheme 2014-10-10T10:13:27Z Riastradh quit (Ping timeout: 264 seconds) 2014-10-10T10:15:16Z Riastradh joined #scheme 2014-10-10T10:18:58Z lrs joined #scheme 2014-10-10T10:27:21Z vanila: what are the methods to determine when you can stack allocate a closures environment after CPS? 2014-10-10T10:27:36Z vanila: 0-CFA seems extremely difficult 2014-10-10T10:29:48Z lrs quit (Ping timeout: 260 seconds) 2014-10-10T10:40:12Z atomx quit (Ping timeout: 245 seconds) 2014-10-10T11:05:45Z acarrico joined #scheme 2014-10-10T11:11:56Z davexunit joined #scheme 2014-10-10T11:16:00Z przl quit (Ping timeout: 260 seconds) 2014-10-10T11:27:44Z jeapostrophe joined #scheme 2014-10-10T11:27:44Z jeapostrophe quit (Changing host) 2014-10-10T11:27:44Z jeapostrophe joined #scheme 2014-10-10T11:28:05Z lrs joined #scheme 2014-10-10T11:30:40Z vanila quit (Remote host closed the connection) 2014-10-10T11:36:51Z Riastradh quit (Ping timeout: 264 seconds) 2014-10-10T11:38:12Z civodul joined #scheme 2014-10-10T11:53:57Z bjz quit (Ping timeout: 245 seconds) 2014-10-10T12:01:10Z bjz joined #scheme 2014-10-10T12:12:50Z gravicappa joined #scheme 2014-10-10T12:19:27Z jeapostrophe quit (Ping timeout: 272 seconds) 2014-10-10T12:21:48Z stepnem quit (Ping timeout: 260 seconds) 2014-10-10T12:23:25Z stepnem joined #scheme 2014-10-10T12:30:59Z przl joined #scheme 2014-10-10T12:39:58Z fantazo joined #scheme 2014-10-10T12:41:31Z jeapostrophe joined #scheme 2014-10-10T12:50:50Z oleo joined #scheme 2014-10-10T12:54:14Z wbooze joined #scheme 2014-10-10T12:59:28Z wingo quit (Ping timeout: 250 seconds) 2014-10-10T13:10:07Z drdanmaku joined #scheme 2014-10-10T13:10:12Z pnkfelix quit (Ping timeout: 245 seconds) 2014-10-10T13:14:07Z przl quit (Quit: leaving) 2014-10-10T13:14:12Z wingo joined #scheme 2014-10-10T13:20:47Z DGASAU quit (Read error: Connection reset by peer) 2014-10-10T13:21:21Z DGASAU joined #scheme 2014-10-10T13:23:08Z vanila joined #scheme 2014-10-10T13:24:48Z vanila: Hi 2014-10-10T13:24:53Z vanila: Repeating my question from earlier: what are the methods to determine when you can stack allocate a closures environment after CPS? 0-CFA seems extremely difficult 2014-10-10T13:33:44Z pjb: vanila: I don't know in particular with CPS. In general, you perform an escape analysis. 2014-10-10T13:34:13Z pjb: I don't know more specifics. 2014-10-10T13:37:17Z atomx joined #scheme 2014-10-10T13:41:51Z taylanub quit (Disconnected by services) 2014-10-10T13:42:43Z taylanub joined #scheme 2014-10-10T13:54:32Z pnkfelix joined #scheme 2014-10-10T14:05:41Z gravicappa quit (Remote host closed the connection) 2014-10-10T14:14:18Z aking quit (Ping timeout: 246 seconds) 2014-10-10T14:14:24Z aking joined #scheme 2014-10-10T14:14:39Z ozzloy quit (Ping timeout: 246 seconds) 2014-10-10T14:14:39Z tessier quit (Ping timeout: 246 seconds) 2014-10-10T14:16:08Z tessier joined #scheme 2014-10-10T14:16:37Z ozzloy joined #scheme 2014-10-10T14:19:47Z finnrobi quit (Ping timeout: 272 seconds) 2014-10-10T14:20:46Z FracV quit (Changing host) 2014-10-10T14:20:46Z FracV joined #scheme 2014-10-10T14:22:17Z lolcow joined #scheme 2014-10-10T14:22:18Z leppie quit (Read error: Connection reset by peer) 2014-10-10T14:32:27Z fzappa quit (Remote host closed the connection) 2014-10-10T14:33:28Z hiroakip joined #scheme 2014-10-10T14:46:50Z finnrobi joined #scheme 2014-10-10T14:49:11Z c107 joined #scheme 2014-10-10T14:56:45Z iterrogo joined #scheme 2014-10-10T15:00:25Z arthurgleckler joined #scheme 2014-10-10T15:04:32Z _xinix_ joined #scheme 2014-10-10T15:14:24Z _xinix_ quit (Quit: Leaving) 2014-10-10T15:14:56Z fantazo quit (Ping timeout: 260 seconds) 2014-10-10T15:15:23Z cheater joined #scheme 2014-10-10T15:15:53Z juanfra quit (Quit: juanfra) 2014-10-10T15:16:34Z arthurgleckler quit (Remote host closed the connection) 2014-10-10T15:18:45Z theseb joined #scheme 2014-10-10T15:18:53Z juanfra joined #scheme 2014-10-10T15:54:09Z jkraemer quit (Ping timeout: 272 seconds) 2014-10-10T15:54:36Z psy quit (Ping timeout: 260 seconds) 2014-10-10T15:57:08Z BossKonaSegwaY quit (Ping timeout: 250 seconds) 2014-10-10T15:57:24Z psy joined #scheme 2014-10-10T16:06:18Z jkraemer joined #scheme 2014-10-10T16:11:45Z BossKonaSegwaY joined #scheme 2014-10-10T16:13:07Z atomx quit (Ping timeout: 245 seconds) 2014-10-10T16:28:18Z alexei_ joined #scheme 2014-10-10T16:32:32Z hiroakip quit (Ping timeout: 272 seconds) 2014-10-10T16:33:03Z jlongster joined #scheme 2014-10-10T16:37:08Z Fare joined #scheme 2014-10-10T16:37:41Z civodul quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-10T16:39:55Z fantazo joined #scheme 2014-10-10T16:41:10Z Beluki joined #scheme 2014-10-10T16:41:14Z pera joined #scheme 2014-10-10T16:53:58Z daviid joined #scheme 2014-10-10T16:55:35Z psy quit (Disconnected by services) 2014-10-10T16:55:56Z psy_ joined #scheme 2014-10-10T16:59:51Z vanila: http://research.microsoft.com/en-us/um/people/akenn/sml/CompilingWithContinuationsContinued.pdf 2014-10-10T16:59:52Z rudybot: http://tinyurl.com/p9dhqtr 2014-10-10T17:28:44Z aranhoide joined #scheme 2014-10-10T17:35:48Z wbooze quit (Quit: Client Quit) 2014-10-10T17:38:29Z Beluki quit (Quit: Beluki) 2014-10-10T17:41:22Z pnkfelix quit (Ping timeout: 240 seconds) 2014-10-10T17:53:34Z cheater__ joined #scheme 2014-10-10T17:56:57Z cheater quit (Ping timeout: 245 seconds) 2014-10-10T17:56:57Z cheater__ is now known as cheater 2014-10-10T17:57:23Z MichaelRaskin joined #scheme 2014-10-10T17:58:21Z lolcow quit (Ping timeout: 258 seconds) 2014-10-10T18:00:31Z _leb joined #scheme 2014-10-10T18:02:34Z leppie joined #scheme 2014-10-10T18:08:04Z alexei_ quit (Ping timeout: 260 seconds) 2014-10-10T18:09:22Z Fare quit (Ping timeout: 245 seconds) 2014-10-10T18:16:43Z ehaliewicz joined #scheme 2014-10-10T18:26:36Z oleo is now known as Guest29532 2014-10-10T18:28:12Z oleo__ joined #scheme 2014-10-10T18:29:40Z Guest29532 quit (Ping timeout: 250 seconds) 2014-10-10T18:31:07Z alexei_ joined #scheme 2014-10-10T18:36:02Z kongtomorrow joined #scheme 2014-10-10T18:37:28Z iterrogo` joined #scheme 2014-10-10T18:40:08Z iterrogo` quit (Client Quit) 2014-10-10T18:40:34Z iterrogo` joined #scheme 2014-10-10T18:41:23Z gravicappa joined #scheme 2014-10-10T18:41:27Z iterrogo quit (Ping timeout: 245 seconds) 2014-10-10T18:41:57Z drdanmaku quit (Quit: Connection closed for inactivity) 2014-10-10T18:41:59Z iterrogo` quit (Client Quit) 2014-10-10T18:42:23Z iterrogo joined #scheme 2014-10-10T18:43:59Z theseb quit (Quit: Leaving) 2014-10-10T18:56:13Z kongtomorrow quit 2014-10-10T18:57:22Z oleo__ quit (Quit: Verlassend) 2014-10-10T19:01:31Z oleo__ joined #scheme 2014-10-10T19:01:36Z oleo__ quit (Read error: Connection reset by peer) 2014-10-10T19:02:00Z oleo joined #scheme 2014-10-10T19:05:10Z bars0 joined #scheme 2014-10-10T19:13:46Z civodul joined #scheme 2014-10-10T19:15:55Z Nizumzen joined #scheme 2014-10-10T19:16:11Z cheater quit (Ping timeout: 272 seconds) 2014-10-10T19:17:10Z developernotes joined #scheme 2014-10-10T19:19:34Z _leb quit (Quit: Computer has gone to sleep.) 2014-10-10T19:27:31Z bars0 quit (Quit: leaving) 2014-10-10T19:31:45Z Sgeo_ quit (Ping timeout: 246 seconds) 2014-10-10T19:35:40Z Shadox joined #scheme 2014-10-10T19:37:06Z lrs: Im trying to create a procedure 2014-10-10T19:37:14Z lrs: (define f (cubic a b c)) 2014-10-10T19:37:26Z lrs: That represents f(x)=x^3+ax^2+bx+c 2014-10-10T19:37:35Z lrs: ANyone have any ideas 2014-10-10T19:37:48Z cheater__ joined #scheme 2014-10-10T19:37:51Z cheater__ is now known as cheater 2014-10-10T19:43:02Z vanila: (define (f a b c) 2014-10-10T19:43:04Z vanila: (lambda (x) 2014-10-10T19:43:08Z vanila: ...)) 2014-10-10T19:43:12Z vanila: You can fill in the ... 2014-10-10T19:45:13Z untrue joined #scheme 2014-10-10T19:45:50Z lrs: vanila, THats what I have problem with 2014-10-10T19:45:51Z lrs: :S 2014-10-10T19:45:57Z _tca: but thats the easy part 2014-10-10T19:46:09Z _tca: just turn the math into prefix 2014-10-10T19:46:20Z lrs: Hmm 2014-10-10T19:46:21Z vanila: x^3+ax^2+bx+c is (+ (* x x x) (* a x x) (* b x) c) 2014-10-10T19:51:46Z lrs: define f (cubic a b c) 2014-10-10T19:51:50Z lrs: You cnat write it like that right 2014-10-10T19:53:51Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-10-10T19:55:24Z vanila: in lisp you start with an open bracket 2014-10-10T19:55:28Z vanila: (define 2014-10-10T19:55:31Z vanila: rather than 2014-10-10T19:55:31Z Aiwass joined #scheme 2014-10-10T19:55:32Z vanila: define 2014-10-10T19:57:54Z bars0 joined #scheme 2014-10-10T19:58:04Z aranhoide quit (Ping timeout: 250 seconds) 2014-10-10T20:03:05Z lrs: Weird 2014-10-10T20:03:12Z vanila: What? 2014-10-10T20:03:21Z lrs: In the instructions it says (define f (cubic a b c) 2014-10-10T20:03:26Z lrs: Its wrong right 2014-10-10T20:03:28Z vanila: Did you understand my advice 2014-10-10T20:03:48Z lrs: ? 2014-10-10T20:03:53Z lrs: YEs 2014-10-10T20:03:56Z vanila: good 2014-10-10T20:04:22Z vanila: (define (cubic a b c) 2014-10-10T20:04:26Z vanila: (lambda (x) 2014-10-10T20:04:30Z vanila: ...)) 2014-10-10T20:04:44Z vanila: If you do this you can define a function called 'cubic' 2014-10-10T20:04:48Z vanila: later you can use it 2014-10-10T20:04:53Z vanila: (define f (cubic a b c)) 2014-10-10T20:04:57Z vanila: (f 3) 2014-10-10T20:05:05Z Aiwass left #scheme 2014-10-10T20:05:17Z lrs: I cant 2014-10-10T20:05:22Z lrs: (define f (cubic a b c)) 2014-10-10T20:05:22Z lrs: (lambda (x) 2014-10-10T20:05:25Z lrs: Doesn work 2014-10-10T20:06:42Z vanila: Have you defined cubic? 2014-10-10T20:07:27Z lrs: (define f (cubic a b c)) 2014-10-10T20:07:27Z lrs: (lambda (x) 2014-10-10T20:07:27Z lrs: (+ (* x x x) (* a x x) (* b x) c)) 2014-10-10T20:07:32Z lrs: I cant add an last ) at the end 2014-10-10T20:07:34Z lrs: For some reason 2014-10-10T20:07:36Z _tca: you misread lrs 2014-10-10T20:07:37Z vanila: (define (cubic a b c) 2014-10-10T20:07:37Z vanila: (lambda (x) 2014-10-10T20:07:37Z vanila: ...)) 2014-10-10T20:07:41Z vanila: define cubic this awy 2014-10-10T20:07:49Z _tca: notice there is no f 2014-10-10T20:07:52Z lrs: Yeah 2014-10-10T20:07:55Z lrs: Thats why I said 2014-10-10T20:08:00Z lrs: In the instructions it says (define f (cubic a b c 2014-10-10T20:08:08Z lrs: Its wrong right 2014-10-10T20:08:09Z _tca: you are misunderstanding 2014-10-10T20:08:17Z _tca: that is for when you use it 2014-10-10T20:08:19Z _tca: this is for defining it 2014-10-10T20:08:31Z _tca: first you define cubic 2014-10-10T20:08:36Z _tca: then you define f using cubic 2014-10-10T20:08:40Z lrs: Oh 2014-10-10T20:10:45Z _tca: (define (cubic a b c) ...) (define f (cubic n1 n2 n3)) (f n4) 2014-10-10T20:12:42Z lrs: + ) 2014-10-10T20:13:37Z lrs: Now I did > (define (cubic a b c) (f c)) 2014-10-10T20:13:55Z vanila: no 2014-10-10T20:14:01Z vanila: 0 (define (cubic a b c) 2014-10-10T20:14:02Z vanila: (lambda (x) 2014-10-10T20:14:02Z vanila: ...)) 2014-10-10T20:14:10Z lrs: (+ (* x x x) (* a x x) (* b x) c)) 2014-10-10T20:14:19Z lrs: Thats what I got in the terminal window 2014-10-10T20:14:23Z lrs: (define (cubic a b c) 2014-10-10T20:14:23Z lrs: (lambda (x) 2014-10-10T20:14:23Z lrs: (+ (* x x x) (* a x x) (* b x) c))) 2014-10-10T20:14:31Z lrs: And input 2014-10-10T20:14:31Z lrs: > (define (cubic a b c) (f c)) 2014-10-10T20:14:33Z vanila: tthat looks good 2014-10-10T20:14:35Z vanila: that does not 2014-10-10T20:14:48Z fantazo quit (Ping timeout: 244 seconds) 2014-10-10T20:15:26Z lrs: hm 2014-10-10T20:15:32Z lrs: :S 2014-10-10T20:16:21Z wingo quit (Ping timeout: 244 seconds) 2014-10-10T20:18:30Z fridim_ quit (Quit: Leaving) 2014-10-10T20:18:48Z lrs: vanila, Whats the correct way? 2014-10-10T20:18:53Z _tca: lrs: take the last line i said and replace ... with (+ (* x x x) (* a x x) (* b x) c) 2014-10-10T20:19:06Z _tca: ignore that 2014-10-10T20:19:12Z vanila: (define (cubic a b c) 2014-10-10T20:19:12Z vanila: (lambda (x) 2014-10-10T20:19:12Z vanila: (+ (* x x x) (* a x x) (* b x) c))) 2014-10-10T20:19:14Z vanila: this is correct 2014-10-10T20:19:25Z _tca: replace it with (lambda (x) (+ (* x x x) (* a x x) (* b x) c)) 2014-10-10T20:19:46Z lrs: Yeah, I got that covered 2014-10-10T20:19:51Z lrs: Im wondering about the input 2014-10-10T20:19:53Z lrs: How do I call it 2014-10-10T20:20:19Z _tca: (define f (cubic n1 n2 n3)) 2014-10-10T20:20:26Z _tca: n1 n2 and n3 are the numbers of your choice 2014-10-10T20:20:43Z lrs: f undefined 2014-10-10T20:20:44Z lrs: ;_; 2014-10-10T20:21:00Z _tca: yes you have to define f with that line i just gave you 2014-10-10T20:21:11Z lrs: . 2014-10-10T20:21:14Z _tca: if you paste it directly in it will tell you n1 n2 and n3 are undefined 2014-10-10T20:21:17Z lrs: (define f (cubic 1 2 3)) 2014-10-10T20:21:20Z _tca: there you go 2014-10-10T20:21:25Z _tca: now f is defined 2014-10-10T20:21:28Z _tca: now you can call (f 1) 2014-10-10T20:21:31Z masm quit (Ping timeout: 244 seconds) 2014-10-10T20:21:37Z lrs: Nope 2014-10-10T20:21:40Z lrs: ;_; 2014-10-10T20:22:00Z lrs: f: undefined; 2014-10-10T20:22:34Z _tca: rudybot: (define (cubic a b c) (lambda (x) (+ (* x x x) (* a x x) (* b x) c))) 2014-10-10T20:22:34Z rudybot: _tca: Done. 2014-10-10T20:22:41Z _tca: rudybot: (define f (cubic 1 2 3)) 2014-10-10T20:22:41Z rudybot: _tca: Done. 2014-10-10T20:22:46Z _tca: rudybot: (f 1) 2014-10-10T20:22:46Z rudybot: _tca: ; Value: 7 2014-10-10T20:22:56Z _tca: :) 2014-10-10T20:23:30Z lrs: Ugh 2014-10-10T20:23:34Z lrs: Forgot to run I think 2014-10-10T20:23:42Z lrs: Cool 2014-10-10T20:24:06Z karswell` quit (Remote host closed the connection) 2014-10-10T20:24:20Z karswell` joined #scheme 2014-10-10T20:24:46Z lrs: BTW 2014-10-10T20:24:54Z lrs: If you guys remember the next-highest function I wrote 2014-10-10T20:25:03Z lrs: Apparently it doesnt work if you have pairs of the same number..! 2014-10-10T20:31:13Z bars0 quit (Quit: leaving) 2014-10-10T20:32:12Z CaptainRant joined #scheme 2014-10-10T20:33:16Z untrue quit (Quit: WeeChat 1.0.1) 2014-10-10T20:33:38Z CaptainRant: Why does hash-table-for-each take the table as a first arg, while normal for-each takes a list as the last arg ? 2014-10-10T20:35:45Z cheater quit (Ping timeout: 272 seconds) 2014-10-10T20:35:59Z taylanub: CaptainRant: no Scheme standard defines `hash-table-for-each' 2014-10-10T20:36:07Z CaptainRant: Oh 2014-10-10T20:37:25Z taylanub: other than that, I would actually ask the question why map and for-each take the procedure argument first. when it's a lambda expression, it tends to be annoying to have the list argument dangling at the end... 2014-10-10T20:37:50Z cheater__ joined #scheme 2014-10-10T20:37:55Z cheater__ is now known as cheater 2014-10-10T20:38:00Z turbofail: well for map and for-each it's because you might pass in several lists 2014-10-10T20:38:15Z turbofail: and it'd be awkward to have a list, then a lambda, then more lists 2014-10-10T20:38:17Z taylanub: oh, good point 2014-10-10T20:38:34Z turbofail: although you could in theory make it take the function argument last 2014-10-10T20:38:38Z taylanub: well it could just take the last arg as a procedure... 2014-10-10T20:38:43Z mario-goulart: CaptainRant: I suspect it is to be consistent with the rest of the SRFI-69 API 2014-10-10T20:38:58Z CaptainRant: I never grasped this. I hoped this is the "scheme way" which should enlight me but, nah 2014-10-10T20:39:00Z mario-goulart: All them expect the hash-table as the first argument. 2014-10-10T20:39:09Z CaptainRant: ok, thanks :D 2014-10-10T20:39:31Z taylanub: CaptainRant: Scheme tries to be clean and consistent even on minor things, but it's difficult not to ever make such small mistakes... 2014-10-10T20:41:21Z taylanub: you'll find some small warts here and there even in Scheme APIs. on the other hand, Scheme can probably be proud to tend to not bikeshed very much. other languages will flame over superficial syntax and comment syntax, whereas Lisps just go with sexprs and be done with it :P 2014-10-10T20:50:50Z theseb joined #scheme 2014-10-10T20:52:00Z gravicappa quit (Ping timeout: 244 seconds) 2014-10-10T20:56:34Z civodul quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-10T21:01:34Z asumu: Scheme just bikesheds about what module/macro system to use for 20 years. 2014-10-10T21:02:05Z vanila: answer: R7RS library system 2014-10-10T21:02:14Z vanila: it took only 20 years! 2014-10-10T21:02:56Z offby1: I still wish they'd painted it tan. 2014-10-10T21:02:58Z asumu: Yes, painting the bike shed a new color after choosing a color several years earlier... 2014-10-10T21:04:50Z vanila: asumu, what happened several years earlier? 2014-10-10T21:06:20Z jeapostrophe quit (Ping timeout: 260 seconds) 2014-10-10T21:08:04Z vanila: I don't know what you refer to 2014-10-10T21:08:37Z hjolt quit (Remote host closed the connection) 2014-10-10T21:17:24Z leif joined #scheme 2014-10-10T21:17:52Z cheater quit (Ping timeout: 240 seconds) 2014-10-10T21:19:09Z theseb quit (Quit: Leaving) 2014-10-10T21:19:54Z cheater__ joined #scheme 2014-10-10T21:19:58Z cheater__ is now known as cheater 2014-10-10T21:23:05Z duncanm_ is now known as duncanm 2014-10-10T21:26:40Z cheater quit (Ping timeout: 255 seconds) 2014-10-10T21:26:46Z developernotes quit (Quit: Textual IRC Client: www.textualapp.com) 2014-10-10T21:28:31Z drdanmaku joined #scheme 2014-10-10T21:37:17Z taylanub: R6RS 2014-10-10T21:37:52Z taylanub: the R7RS-small library syntax is surprisingly more useful though 2014-10-10T21:38:26Z taylanub: and I've seen jcowan's proposal for the -large library syntax and it basically seals the deal IMO 2014-10-10T21:38:58Z taylanub: (of course, it's a strict extension of the -small library syntax) 2014-10-10T21:46:38Z Riastradh joined #scheme 2014-10-10T21:56:03Z Riastradh quit (Ping timeout: 264 seconds) 2014-10-10T21:57:44Z Riastradh joined #scheme 2014-10-10T21:59:39Z guampa quit (Ping timeout: 264 seconds) 2014-10-10T22:01:35Z guampa joined #scheme 2014-10-10T22:10:53Z iterrogo quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-10T22:11:21Z CaptainRant quit (Quit: WeeChat 0.4.3) 2014-10-10T22:24:50Z jeapostrophe joined #scheme 2014-10-10T22:24:50Z jeapostrophe quit (Changing host) 2014-10-10T22:24:50Z jeapostrophe joined #scheme 2014-10-10T22:29:24Z Gyps joined #scheme 2014-10-10T22:30:30Z Gyps quit (Client Quit) 2014-10-10T22:32:45Z jlongster quit (Ping timeout: 244 seconds) 2014-10-10T23:03:06Z jlongster joined #scheme 2014-10-10T23:13:20Z mrowe_away is now known as mrowe 2014-10-10T23:14:39Z wilfredh joined #scheme 2014-10-10T23:23:04Z mrowe is now known as mrowe_away 2014-10-10T23:23:37Z c107 quit (Remote host closed the connection) 2014-10-10T23:25:59Z Gyps joined #scheme 2014-10-10T23:29:36Z Sgeo joined #scheme 2014-10-10T23:45:42Z bjz quit (Ping timeout: 245 seconds) 2014-10-10T23:53:53Z Sgeo_ joined #scheme 2014-10-10T23:57:56Z Sgeo quit (Ping timeout: 255 seconds) 2014-10-10T23:59:48Z vanila quit (Quit: Leaving)