2014-09-28T00:08:22Z alexei quit (Ping timeout: 240 seconds) 2014-09-28T00:09:13Z sbwhitecap joined #scheme 2014-09-28T00:13:34Z jao quit (Remote host closed the connection) 2014-09-28T00:14:15Z visualshock quit (Quit: Leaving) 2014-09-28T00:28:08Z jjjj2_ quit (Quit: Ex-Chat) 2014-09-28T00:38:30Z jusss joined #scheme 2014-09-28T00:40:45Z Rodya_ joined #scheme 2014-09-28T00:55:10Z lrs joined #scheme 2014-09-28T01:03:29Z Elzair joined #scheme 2014-09-28T01:03:46Z jusss quit (Remote host closed the connection) 2014-09-28T01:06:03Z Elzair quit (Client Quit) 2014-09-28T01:45:53Z tobik quit (Ping timeout: 240 seconds) 2014-09-28T01:46:36Z tobik joined #scheme 2014-09-28T01:53:46Z klltkr joined #scheme 2014-09-28T01:59:06Z jeremyheiler quit (Quit: Computer has gone to sleep.) 2014-09-28T02:02:01Z jeremyheiler joined #scheme 2014-09-28T02:02:22Z jeapostrophe quit (Ping timeout: 240 seconds) 2014-09-28T02:04:27Z BossKonaSegwaY quit (Ping timeout: 245 seconds) 2014-09-28T02:14:19Z atomx joined #scheme 2014-09-28T02:20:22Z ehaliewicz joined #scheme 2014-09-28T02:21:33Z hiyosi quit (Ping timeout: 260 seconds) 2014-09-28T02:21:50Z BossKonaSegwaY joined #scheme 2014-09-28T02:47:48Z hiyosi joined #scheme 2014-09-28T02:52:22Z hiyosi quit (Ping timeout: 240 seconds) 2014-09-28T02:54:01Z klltkr quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-28T02:54:18Z rainbyte joined #scheme 2014-09-28T03:02:11Z rainbyte quit (Quit: Leaving) 2014-09-28T03:02:32Z rainbyte joined #scheme 2014-09-28T03:02:58Z ehaliewicz quit (Remote host closed the connection) 2014-09-28T03:08:17Z b4283 joined #scheme 2014-09-28T03:16:57Z atomx quit (Remote host closed the connection) 2014-09-28T03:22:52Z hiyosi joined #scheme 2014-09-28T03:42:17Z atomx joined #scheme 2014-09-28T03:43:39Z mutley89 joined #scheme 2014-09-28T03:54:41Z daviid quit (Ping timeout: 272 seconds) 2014-09-28T04:00:58Z Rodya_ quit (Quit: Ex-Chat) 2014-09-28T04:01:05Z davexunit quit (Quit: Later) 2014-09-28T04:04:13Z mutley89 quit (Ping timeout: 260 seconds) 2014-09-28T04:05:41Z kongtomorrow quit 2014-09-28T04:20:39Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-09-28T04:22:37Z BossKonaSegwaY joined #scheme 2014-09-28T04:23:49Z Saeren_ quit (Ping timeout: 260 seconds) 2014-09-28T04:26:51Z sbwhitecap quit (Quit: Leaving...) 2014-09-28T04:26:58Z jeremyheiler quit (Quit: Computer has gone to sleep.) 2014-09-28T04:29:29Z Saeren joined #scheme 2014-09-28T04:35:31Z Shadox quit (Quit: Leaving) 2014-09-28T04:39:09Z b4283 quit (Ping timeout: 272 seconds) 2014-09-28T04:48:02Z vukcrni quit (Remote host closed the connection) 2014-09-28T04:48:07Z kongtomorrow joined #scheme 2014-09-28T04:51:58Z vukcrni joined #scheme 2014-09-28T05:02:44Z b4283 joined #scheme 2014-09-28T05:08:48Z b4283 quit (Quit: Konversation terminated!) 2014-09-28T05:11:00Z drewc quit (Read error: Connection reset by peer) 2014-09-28T05:11:59Z arrdem quit (Quit: Changing server) 2014-09-28T05:12:11Z arrdem joined #scheme 2014-09-28T05:12:28Z arrdem quit (Client Quit) 2014-09-28T05:13:17Z arrdem joined #scheme 2014-09-28T05:13:21Z drewc joined #scheme 2014-09-28T05:13:53Z arrdem quit (Client Quit) 2014-09-28T05:22:44Z arrdem joined #scheme 2014-09-28T05:22:57Z arrdem quit (Client Quit) 2014-09-28T05:23:07Z arrdem joined #scheme 2014-09-28T05:46:45Z arrdem quit (Quit: leaving) 2014-09-28T05:49:37Z arrdem joined #scheme 2014-09-28T05:59:00Z jusss joined #scheme 2014-09-28T06:14:46Z aftershave joined #scheme 2014-09-28T06:19:03Z tcsc_ quit (Quit: computer sleeping) 2014-09-28T06:29:00Z pnpuff joined #scheme 2014-09-28T07:22:18Z kobain quit (Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/) 2014-09-28T07:40:45Z kongtomorrow quit (Ping timeout: 260 seconds) 2014-09-28T07:57:16Z vanila joined #scheme 2014-09-28T08:38:28Z wingo joined #scheme 2014-09-28T08:39:50Z kazimir42 joined #scheme 2014-09-28T08:40:34Z alexei joined #scheme 2014-09-28T08:41:38Z drdanmaku quit (Quit: Connection closed for inactivity) 2014-09-28T08:45:51Z Riastradh quit (Ping timeout: 264 seconds) 2014-09-28T08:46:29Z b4284 joined #scheme 2014-09-28T08:59:36Z bjz quit (Read error: Connection reset by peer) 2014-09-28T08:59:53Z bjz joined #scheme 2014-09-28T09:00:28Z tobik quit (Ping timeout: 260 seconds) 2014-09-28T09:02:03Z tobik joined #scheme 2014-09-28T09:02:32Z stepnem joined #scheme 2014-09-28T09:15:24Z wingo quit (Ping timeout: 260 seconds) 2014-09-28T09:22:41Z robot-beethoven quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-09-28T09:29:23Z BossKonaSegwaY quit (Ping timeout: 240 seconds) 2014-09-28T09:35:17Z civodul joined #scheme 2014-09-28T09:36:10Z oleo is now known as Guest55852 2014-09-28T09:37:47Z oleo__ joined #scheme 2014-09-28T09:38:53Z Guest55852 quit (Ping timeout: 240 seconds) 2014-09-28T09:40:25Z jusss quit (Quit: ERC Version 5.2 (IRC client for Emacs)) 2014-09-28T09:46:21Z BossKonaSegwaY joined #scheme 2014-09-28T09:52:53Z kongtomorrow joined #scheme 2014-09-28T09:56:47Z gravicappa joined #scheme 2014-09-28T10:08:06Z alexei quit (Ping timeout: 272 seconds) 2014-09-28T10:16:06Z pnpuff quit (Ping timeout: 256 seconds) 2014-09-28T10:17:36Z pnpuff joined #scheme 2014-09-28T10:18:06Z kazimir42 quit (Remote host closed the connection) 2014-09-28T10:19:30Z kazimir42 joined #scheme 2014-09-28T10:23:46Z alexei joined #scheme 2014-09-28T10:52:01Z kongtomorrow quit 2014-09-28T10:58:19Z hiyosi quit (Ping timeout: 258 seconds) 2014-09-28T11:05:58Z pnpuff quit (Ping timeout: 256 seconds) 2014-09-28T11:07:19Z oldskirt joined #scheme 2014-09-28T11:12:40Z hiroakip joined #scheme 2014-09-28T11:19:02Z leo2007 quit (Ping timeout: 272 seconds) 2014-09-28T11:21:10Z klltkr joined #scheme 2014-09-28T11:24:17Z hiyosi joined #scheme 2014-09-28T11:28:57Z hiyosi quit (Ping timeout: 260 seconds) 2014-09-28T11:36:24Z alexei quit (Ping timeout: 272 seconds) 2014-09-28T11:43:18Z alexei joined #scheme 2014-09-28T12:01:57Z alexei quit (Ping timeout: 258 seconds) 2014-09-28T12:09:52Z Nizumzen joined #scheme 2014-09-28T12:12:04Z davexunit joined #scheme 2014-09-28T12:14:40Z kongtomorrow joined #scheme 2014-09-28T12:16:07Z masm joined #scheme 2014-09-28T12:21:13Z lrs: pjdelport, There? 2014-09-28T12:23:10Z hiroakip quit (Ping timeout: 244 seconds) 2014-09-28T12:25:03Z hiyosi joined #scheme 2014-09-28T12:27:44Z atomx quit (Remote host closed the connection) 2014-09-28T12:27:57Z atomx joined #scheme 2014-09-28T12:29:58Z hiyosi quit (Ping timeout: 250 seconds) 2014-09-28T12:30:18Z hiroakip joined #scheme 2014-09-28T12:39:54Z Neet joined #scheme 2014-09-28T12:40:17Z oldskirt quit (Ping timeout: 260 seconds) 2014-09-28T12:52:33Z BossKonaSegwaY quit (Ping timeout: 258 seconds) 2014-09-28T13:00:59Z jusss joined #scheme 2014-09-28T13:02:03Z MouldyOldBones quit (Ping timeout: 264 seconds) 2014-09-28T13:04:52Z hiroakip quit (Ping timeout: 240 seconds) 2014-09-28T13:05:42Z bjz quit (Read error: Connection reset by peer) 2014-09-28T13:05:42Z bjz_ joined #scheme 2014-09-28T13:13:22Z ilammy joined #scheme 2014-09-28T13:15:23Z MouldyOldBones joined #scheme 2014-09-28T13:15:28Z BossKonaSegwaY joined #scheme 2014-09-28T13:23:04Z Elzair joined #scheme 2014-09-28T13:25:52Z hiyosi joined #scheme 2014-09-28T13:26:12Z bars0 joined #scheme 2014-09-28T13:28:13Z Elzair quit (Quit: Elzair) 2014-09-28T13:29:33Z Elzair joined #scheme 2014-09-28T13:30:00Z Elzair: Hey, does anyone know what happened to the Scheme wiki? 2014-09-28T13:31:09Z hiyosi quit (Ping timeout: 272 seconds) 2014-09-28T13:36:21Z taylanub: community.schemewiki.org seems down 2014-09-28T13:37:50Z Elzair: I know. It has been like that for several days now. 2014-09-28T13:41:24Z taylanub quit (Disconnected by services) 2014-09-28T13:41:53Z taylanub joined #scheme 2014-09-28T13:42:43Z kongtomorrow quit 2014-09-28T13:48:08Z leo2007 joined #scheme 2014-09-28T14:02:33Z Elzair: Can anyone help me with the following problem? 2014-09-28T14:03:31Z Elzair: I am trying to write a FOSS IF-authoring system similar to ZIL http://xlisp.org/zil.pdf 2014-09-28T14:04:59Z Elzair: I was trying to use define-syntax to create a procedure to define a room object like the following: (room living-room (loc rooms) (desc "Living Room") (etc .)) 2014-09-28T14:06:29Z Elzair: The code is (define-syntax object (syntax-rules () ((object name prop prop* ...) (begin (define name '(prop prop* ...)))))) 2014-09-28T14:07:12Z Elzair: However, I would like to add it to a global alist (define objects '((objects))') 2014-09-28T14:07:41Z Elzair: To be more specific I want to add its name to the objects list. 2014-09-28T14:07:46Z Elzair: What is the best way to do that? 2014-09-28T14:08:01Z vanila: you could have a macro (PUSH! list object) that does (set! list (cons object list)) 2014-09-28T14:08:04Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-09-28T14:08:15Z vanila: and then use push! instead of define 2014-09-28T14:11:36Z hiroakip joined #scheme 2014-09-28T14:13:49Z lrs: Can anyone help me with this problem? Im trying to create a point P_1 2014-09-28T14:13:56Z lrs: Which is the midpoint of a line 2014-09-28T14:14:37Z lrs: I use the forumla (x1+x0/2, y0+y1/2) 2014-09-28T14:14:53Z vanila: careful, it's ((x1+x0)/2, (y0+y1)/2) 2014-09-28T14:14:58Z lrs: Right 2014-09-28T14:15:48Z leppie quit (Ping timeout: 244 seconds) 2014-09-28T14:16:00Z lrs: http://pastebin.com/DGxQKppg 2014-09-28T14:16:16Z lrs: There 2014-09-28T14:16:18Z lrs: Edited a bit 2014-09-28T14:16:19Z lrs: Now its done 2014-09-28T14:20:33Z leppie joined #scheme 2014-09-28T14:20:53Z Elzair: vanila, I like your answer. However, when I tried to incorporate it into my code I got a syntax error. 2014-09-28T14:21:12Z uselpa joined #scheme 2014-09-28T14:21:16Z Elzair: (define-syntax push! (syntax-rules () ((alist obj) (set! alist (cons obj alist))))) 2014-09-28T14:21:20Z jeremyheiler joined #scheme 2014-09-28T14:21:31Z Elzair: (define-syntax room (syntax-rules () ((room name prop prop* ...) (let ((x '(prop prop* ...))) (push! (cadr (assoc x 'loc)) x))))) 2014-09-28T14:21:44Z vanila: (define-syntax push! (syntax-rules () ((push! alist obj) (set! alist (cons obj alist))))) 2014-09-28T14:21:47Z Elzair: (room living-room (loc rooms) (dec "Living Room") (east to kitchen)) 2014-09-28T14:22:07Z Elzair: Oops! 2014-09-28T14:22:27Z vanila: but the way you use push!, it will only change 'x' 2014-09-28T14:23:09Z uselpa quit (Client Quit) 2014-09-28T14:23:12Z vanila: and the use is not quite right 2014-09-28T14:24:13Z vanila: http://lpaste.net/111771 this might help 2014-09-28T14:24:19Z vanila: to start rfom 2014-09-28T14:24:20Z vanila: from 2014-09-28T14:26:44Z Elzair: Okay, thanks. I am looking into it. 2014-09-28T14:26:45Z hiyosi joined #scheme 2014-09-28T14:26:51Z oleo__ quit (Quit: Verlassend) 2014-09-28T14:30:23Z oleo joined #scheme 2014-09-28T14:31:22Z hiyosi quit (Ping timeout: 240 seconds) 2014-09-28T14:31:59Z lrs: vanila, Any ideas 2014-09-28T14:34:34Z vanila: lrs, your paste is missing a line? 2014-09-28T14:34:57Z lrs: What line? 2014-09-28T14:35:21Z vanila quit (Remote host closed the connection) 2014-09-28T14:41:24Z kobain joined #scheme 2014-09-28T14:41:32Z bars0 quit (Quit: leaving) 2014-09-28T14:42:09Z BossKonaSegwaY quit (Ping timeout: 244 seconds) 2014-09-28T14:46:30Z kazimir42 quit (Remote host closed the connection) 2014-09-28T14:47:56Z Elzair: vanila, your pastebin helped a lot! Thank you. 2014-09-28T14:48:43Z Elzair: Now, my code is: (define-syntax new-object (syntax-rules () ((new-object name value value* ...) (push! objects (cons 'name '((value value* ...))))))) 2014-09-28T14:50:22Z lrs: vanila has quit (Remote host closed the connection) 2014-09-28T14:50:23Z lrs: ;_; 2014-09-28T14:50:52Z hiroakip quit (Ping timeout: 240 seconds) 2014-09-28T14:51:26Z Elzair: My only problem now is that objects may not always be stored in the objects variable. However, each object passes its parent reference (loc objname), so I just need to get that beforehand (which was the reason for the whole let stuff from earlier). Is there an easier way to get it? 2014-09-28T14:52:51Z lrs: vanila http://pastebin.com/DGxQKppg 2014-09-28T14:52:56Z hiyosi joined #scheme 2014-09-28T14:52:56Z lrs: Woops 2014-09-28T14:54:01Z Elzair: Oops. 2014-09-28T14:54:12Z Elzair: I was too busy coding and not watching the IRC logs. 2014-09-28T15:01:25Z zlrth joined #scheme 2014-09-28T15:02:19Z BossKonaSegwaY joined #scheme 2014-09-28T15:02:55Z atomx quit (Read error: Connection reset by peer) 2014-09-28T15:03:24Z atomx joined #scheme 2014-09-28T15:04:23Z jusss quit (Quit: ERC Version 5.2 (IRC client for Emacs)) 2014-09-28T15:05:08Z bjz_ quit (Read error: Connection reset by peer) 2014-09-28T15:05:24Z bjz joined #scheme 2014-09-28T15:16:41Z Nizumzen joined #scheme 2014-09-28T15:30:29Z arrdem quit (Quit: leaving) 2014-09-28T15:30:39Z arrdem joined #scheme 2014-09-28T15:35:03Z civodul quit (Ping timeout: 264 seconds) 2014-09-28T15:36:33Z guampa joined #scheme 2014-09-28T15:38:30Z civodul joined #scheme 2014-09-28T15:40:03Z hiroakip joined #scheme 2014-09-28T15:49:28Z gluegadget joined #scheme 2014-09-28T15:55:30Z jeremyheiler quit (Quit: Textual IRC Client: www.textualapp.com) 2014-09-28T15:55:40Z CaptainRant joined #scheme 2014-09-28T15:56:41Z bjz quit (Read error: Connection reset by peer) 2014-09-28T15:56:57Z bjz joined #scheme 2014-09-28T16:00:15Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-09-28T16:05:46Z yacks quit (Quit: Leaving) 2014-09-28T16:06:50Z vanila joined #scheme 2014-09-28T16:08:25Z tcsc joined #scheme 2014-09-28T16:19:40Z jeremyheiler joined #scheme 2014-09-28T16:30:22Z daviid joined #scheme 2014-09-28T16:31:54Z pnpuff joined #scheme 2014-09-28T16:41:52Z pnpuff quit (Quit: Lost terminal) 2014-09-28T17:14:13Z hiroakip quit (Ping timeout: 260 seconds) 2014-09-28T17:19:00Z Elzair_ joined #scheme 2014-09-28T17:20:52Z jeapostrophe joined #scheme 2014-09-28T17:20:53Z jeapostrophe quit (Changing host) 2014-09-28T17:20:53Z jeapostrophe joined #scheme 2014-09-28T17:24:31Z kazimir42 joined #scheme 2014-09-28T17:26:17Z b4284 quit (Quit: Konversation terminated!) 2014-09-28T17:29:13Z yacks joined #scheme 2014-09-28T17:29:17Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-09-28T17:33:49Z notzmv joined #scheme 2014-09-28T17:37:01Z aftershave quit (Quit: Textual IRC Client: www.textualapp.com) 2014-09-28T17:45:23Z cdidd quit (Ping timeout: 240 seconds) 2014-09-28T17:46:40Z cdidd joined #scheme 2014-09-28T17:51:29Z CaptainRant quit (Quit: WeeChat 0.4.3) 2014-09-28T17:51:51Z alexei joined #scheme 2014-09-28T17:53:21Z pnpuff joined #scheme 2014-09-28T17:54:18Z BossKonaSegwaY joined #scheme 2014-09-28T17:58:09Z cdidd quit (Ping timeout: 260 seconds) 2014-09-28T17:59:09Z cdidd joined #scheme 2014-09-28T18:04:15Z lrs: vanila, There? 2014-09-28T18:05:30Z vanila: hi 2014-09-28T18:05:55Z lrs: vanila, http://pastebin.com/47qN38V0 heres the whole thing if you remember 2014-09-28T18:06:03Z lrs: I was trying to make a midpoint command 2014-09-28T18:06:11Z vanila: oh good! 2014-09-28T18:06:22Z vanila: so makeMidpoint takes four numbers 2014-09-28T18:06:30Z vanila: and you want to write a version that takes two points? 2014-09-28T18:06:38Z vanila: or even takes a single line 2014-09-28T18:06:47Z lrs: UT should be y0 y1 under there 2014-09-28T18:06:57Z lrs: I want to make a function that creates the midpoint 2014-09-28T18:07:04Z lrs: From two points (line) 2014-09-28T18:07:19Z vanila: (makePoint (/ x0 x1 2)) 2014-09-28T18:07:19Z vanila: (makePoint (/ x0 x1 2)) 2014-09-28T18:07:22Z vanila: shouldn't that be 2014-09-28T18:07:35Z vanila: (makePoint (/ (+ x0 x1) 2) (/ (+ y0 y1) 2)) 2014-09-28T18:07:53Z vanila: since makePoint takes the two coordinates, you don't need to call it twice 2014-09-28T18:08:29Z lrs: vanila, http://pastebin.com/9g5fZ0nk? 2014-09-28T18:08:29Z pnpuff left #scheme 2014-09-28T18:08:30Z lrs: http://pastebin.com/9g5fZ0nk 2014-09-28T18:08:35Z lrs: -? 2014-09-28T18:08:46Z vanila: yeah 2014-09-28T18:10:18Z lrs: vanila, Nice man 2014-09-28T18:11:19Z lrs: Thanks alot 2014-09-28T18:11:25Z vanila: glad to help! 2014-09-28T18:11:36Z lrs: vanila, A question though 2014-09-28T18:11:47Z lrs: Why doesnt list make a list of makePoint? 2014-09-28T18:11:59Z lrs: Dont really get that stuff 2014-09-28T18:12:23Z vanila: it does, but then makeGraph conses 'midpoint onto it, 2014-09-28T18:12:25Z vanila: try this for exampe 2014-09-28T18:12:32Z vanila: (cons 'midpoint (list 'x)) 2014-09-28T18:12:34Z vanila: (cons 'midpoint (list 'x 'y 'z)) 2014-09-28T18:13:13Z lrs: Can you describe what cons do in this problem you wrote? 2014-09-28T18:13:23Z vanila: try running those two 2014-09-28T18:13:29Z lrs: I did 2014-09-28T18:13:44Z vanila: a list is made of conses 2014-09-28T18:13:57Z vanila: (list 'x 'y 'z) = (cons 'x (cons 'y (cons 'z '()))) 2014-09-28T18:14:02Z lrs: But shouldnt the first problem then be midpoint (list x) 2014-09-28T18:14:04Z lrs: ? 2014-09-28T18:14:13Z vanila: what do you mean ? 2014-09-28T18:14:16Z lrs: Or does it evaluate the list x and make it x ()' 2014-09-28T18:14:27Z lrs: Well i see 2014-09-28T18:14:35Z lrs: (cons 'midpoint (list 'x)) 2014-09-28T18:14:52Z lrs: As a list of ('midpoint, (list 'x)) 2014-09-28T18:14:57Z vanila: (cons 'midpoint (list 'x)) = (list 'midpoint 'x) 2014-09-28T18:16:59Z drdanmaku joined #scheme 2014-09-28T18:23:01Z gravicappa quit (Ping timeout: 272 seconds) 2014-09-28T18:27:05Z guampa quit (Remote host closed the connection) 2014-09-28T18:27:24Z guampa joined #scheme 2014-09-28T18:29:39Z klltkr quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2014-09-28T18:30:12Z teiresia1 is now known as teiresias 2014-09-28T18:30:43Z fikusz joined #scheme 2014-09-28T18:32:35Z kazimir42 quit (Remote host closed the connection) 2014-09-28T18:33:30Z oldskirt joined #scheme 2014-09-28T18:37:50Z oldskirt quit (Read error: Connection reset by peer) 2014-09-28T18:38:04Z oldskirt joined #scheme 2014-09-28T18:38:49Z kongtomorrow joined #scheme 2014-09-28T18:39:12Z hiroakip joined #scheme 2014-09-28T18:39:28Z oldskirt quit (Read error: Connection reset by peer) 2014-09-28T18:39:58Z oldskirt joined #scheme 2014-09-28T18:42:45Z kazimir42 joined #scheme 2014-09-28T18:44:15Z Elzair_ quit (Quit: Elzair_) 2014-09-28T18:52:58Z klltkr joined #scheme 2014-09-28T18:55:13Z kobain quit (Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/) 2014-09-28T19:00:36Z hiyosi quit (Ping timeout: 260 seconds) 2014-09-28T19:05:19Z kobain joined #scheme 2014-09-28T19:21:09Z BossKonaSegwaY quit (Ping timeout: 244 seconds) 2014-09-28T19:32:00Z zlrth quit (Ping timeout: 244 seconds) 2014-09-28T19:43:12Z BossKonaSegwaY joined #scheme 2014-09-28T19:43:48Z aranhoide joined #scheme 2014-09-28T19:46:37Z Elzair_ joined #scheme 2014-09-28T19:48:41Z hiroakip quit (Ping timeout: 260 seconds) 2014-09-28T19:55:03Z hiroakip joined #scheme 2014-09-28T19:56:18Z hiyosi joined #scheme 2014-09-28T20:01:11Z hiyosi quit (Ping timeout: 272 seconds) 2014-09-28T20:02:27Z rtra` joined #scheme 2014-09-28T20:06:01Z rtra quit (Ping timeout: 260 seconds) 2014-09-28T20:06:01Z rtra` is now known as rtra 2014-09-28T20:06:53Z mrowe_away is now known as mrowe 2014-09-28T20:08:36Z Elzair_ quit (Quit: Elzair_) 2014-09-28T20:32:47Z oldskirt quit (Ping timeout: 245 seconds) 2014-09-28T20:41:05Z hiroakip quit (Ping timeout: 272 seconds) 2014-09-28T20:43:37Z hiyosi joined #scheme 2014-09-28T20:48:25Z hiyosi quit (Ping timeout: 260 seconds) 2014-09-28T20:51:57Z BossKonaSegwaY quit (Ping timeout: 245 seconds) 2014-09-28T20:55:23Z kongtomorrow quit 2014-09-28T21:06:23Z nehaljwani joined #scheme 2014-09-28T21:07:00Z nehaljwani: Hi! How to programatically check if two expressions are aplha-equivalent in scheme? 2014-09-28T21:11:43Z vanila: nehaljwani, you will have to implement it by recursion and holding the environments 2014-09-28T21:12:55Z BossKonaSegwaY joined #scheme 2014-09-28T21:13:27Z nehaljwani: vanila, I know that I have to use recursion. But what is the logic behind checking if two exprs are a-equivalent? I have gone through many sources and each give some form of formula which I can't exactly relate to code. 2014-09-28T21:13:35Z vanila: okay 2014-09-28T21:13:42Z vanila: let me write something out to explain 2014-09-28T21:15:28Z nehaljwani: I know that (lambda(x) x) and (lambda(y) y) are alpha equivalent, in the sense that the x can be substituted to y in expr1 to get expr2 2014-09-28T21:15:44Z vanila: yes 2014-09-28T21:15:54Z vanila: the easiest case is 2014-09-28T21:16:02Z nehaljwani: but given two generic exprs, I don't know which renaming rule to apply to expr1 to check if it can turn to expr2 2014-09-28T21:16:08Z vanila: (f x) is alpha equal to (g y) when f alpha equals g, and x alpha equals y 2014-09-28T21:16:26Z vanila: this leaves lambda and variable cases 2014-09-28T21:17:03Z nehaljwani: how do you define 'f alpha; 2014-09-28T21:17:58Z vanila: what you can do to check lambdas for alpha equality is to store an assocation when you enter a binder 2014-09-28T21:17:59Z vanila: e.g. 2014-09-28T21:18:09Z vanila: to test that (lambda (x) m) is alpha equal to (lambda (v) n) 2014-09-28T21:18:23Z vanila: you can test that m is alpha equal to n with the association (x v) 2014-09-28T21:19:00Z vanila: whenever you check if variables are alpha equal v = u you look up the associated value of the LHS 2014-09-28T21:19:17Z vanila: so (lambda (x) (f x)) is alpha equal to (lambda (y) (f y)) 2014-09-28T21:19:34Z vanila: because (f x) = (f y) because f = f and x = y because of the association (x y) 2014-09-28T21:20:53Z nehaljwani: by association, do you mean, substitution? I am a bit confused with the terminologyu 2014-09-28T21:21:36Z vanila: yes, its essentially a substitution that you are performing as you go 2014-09-28T21:24:12Z vanila: so instead of just (alpha-equal term1 term2) 2014-09-28T21:24:19Z mrowe is now known as mrowe_away 2014-09-28T21:24:22Z vanila: you can write a procedure (alpha-equal env term1 term2) 2014-09-28T21:24:59Z vanila: where env is a renaming of the variables of the binders you have entered in term1 - it tells you what they are named in term2 2014-09-28T21:26:38Z nehaljwani: vanila, how do I find env 2014-09-28T21:27:28Z vanila: it starts out empty 2014-09-28T21:27:49Z Serpentoj joined #scheme 2014-09-28T21:27:56Z vanila: when you enter a binder, e.g. comparing (lambda(x) x) and (lambda(y) y) 2014-09-28T21:28:06Z vanila: you add the association (x . y) to env 2014-09-28T21:28:16Z vanila: now you can check that x is alpha equal to y 2014-09-28T21:28:25Z vanila: by checking what x is renamed to in env 2014-09-28T21:29:00Z masm quit (Ping timeout: 260 seconds) 2014-09-28T21:29:26Z nehaljwani: in paper, this seems easy, in program, it seems difficult :'( 2014-09-28T21:29:51Z vanila: do you know the function assoc in scheme? 2014-09-28T21:30:14Z nehaljwani: no. 2014-09-28T21:30:24Z nehaljwani: basically, I am implementing 2014-09-28T21:30:32Z nehaljwani: lambda calculus interpreter, etc in racket 2014-09-28T21:30:33Z vanila: association list is very important 2014-09-28T21:31:06Z vanila: http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_438 2014-09-28T21:31:06Z rudybot: http://tinyurl.com/5tz3qu 2014-09-28T21:34:02Z vanila: (lambda (x) A) is alpha equal to (lambda (y) B), when A[x/y] (substituting y for x) is alpha equal to B 2014-09-28T21:34:27Z vanila: and to implement this, you can check A is alpha equal to B in env ((x . y)) 2014-09-28T21:35:26Z vanila: and e.g. f is "alpha equal in env" to f, and x is alpha equal to y in env, because env tells us that x was renamed to y in the second term 2014-09-28T21:37:28Z nehaljwani: is there something similar to assoc in racket? 2014-09-28T21:37:49Z vanila: http://lpaste.net/111787 2014-09-28T21:41:37Z lrs quit (Ping timeout: 260 seconds) 2014-09-28T21:44:23Z hiyosi joined #scheme 2014-09-28T21:46:34Z vanila quit (Quit: Leaving) 2014-09-28T21:47:54Z BossKonaSegwaY quit (Read error: Connection reset by peer) 2014-09-28T21:48:00Z BossKonaSegwaY1 joined #scheme 2014-09-28T21:48:52Z hiyosi quit (Ping timeout: 240 seconds) 2014-09-28T22:04:27Z kongtomorrow joined #scheme 2014-09-28T22:17:46Z theseb joined #scheme 2014-09-28T22:18:44Z oleo is now known as Guest11597 2014-09-28T22:20:20Z oleo__ joined #scheme 2014-09-28T22:22:17Z Guest11597 quit (Ping timeout: 260 seconds) 2014-09-28T22:22:17Z theseb quit (Remote host closed the connection) 2014-09-28T22:27:21Z stepnem quit (Ping timeout: 260 seconds) 2014-09-28T22:32:40Z mrowe_away is now known as mrowe 2014-09-28T22:33:09Z civodul quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-09-28T22:44:53Z Riastradh joined #scheme 2014-09-28T22:45:15Z hiyosi joined #scheme 2014-09-28T22:50:12Z hiyosi quit (Ping timeout: 260 seconds) 2014-09-28T22:56:05Z Rodya_ joined #scheme 2014-09-28T23:12:40Z kongtomorrow quit 2014-09-28T23:23:33Z hiyosi joined #scheme 2014-09-28T23:24:53Z tcsc quit (Quit: computer sleeping) 2014-09-28T23:28:52Z tcsc joined #scheme 2014-09-28T23:31:51Z acarrico quit (Quit: Leaving.) 2014-09-28T23:39:03Z zacts quit (Quit: leaving) 2014-09-28T23:39:31Z zacts joined #scheme 2014-09-28T23:44:53Z acarrico joined #scheme 2014-09-28T23:52:05Z joast quit (Quit: Leaving.)