00:00:00 rudybot: eval (cdr (cons 'a 'b)) 00:00:00 sladegen: ; Value: b 00:00:01 It was sugar for contracts, I believe 00:00:28 tommylommykins [~tommylomm@5ad471cc.bb.sky.com] has joined #scheme 00:00:51 typemore, if you expand `RAII', perhaps someone can answer your question. 00:01:52 asking wikipedia seems obviously to mean: Resource Acquisition Is Initialization 00:02:00 Somelauw, the text `(1 . + . 2)' reads just like the text `(+ 1 2)'. In general, if A, B, and C are S-expressions, then the text `(A . B . C)' reads the same as `(B A C)'. 00:02:06 stupid intertubez. 00:04:54 Riastradh, so it is just syntactic sugar. I thought it had something to do with nesting pairs. 00:05:12 Yes, Somelauw, it is just syntactic sugar. 00:05:28 (or, syntactic saccharine, perhaps) 00:05:38 But I couldn't get the same by trying stuff like (cons (cons 1 +) 2) 00:06:09 That's right. There's no fancy list structure; it's just in the reader. 00:06:57 is it possible to have RAII in a continuation passing style interpreter? does the question even make sense?; RAII = Resource Acquisation Is Initialization 00:07:36 But I do remember the dot was used for doing a variable number of parameters. 00:07:57 Well, I looked at the Wikipedia article on `RAII', and it appears to be full of confusion between signalling conditions and performing non-local control transfers. 00:08:10 Something like (lambda (p1 p2 . px) ...) 00:08:22 And px would be a list of resting parameters. 00:08:30 RAII, afaik, requires the langauge to be 'stack based' 00:08:34 so you can know when to call the destructors 00:08:53 I don't quite understand your question, but generally, in Scheme, there is a garbage collector which will handle this for you, provided that you tell it how to release external resources other than memory. 00:09:03 once you have something like cps, and the 'stack frames' are on the heap, and they get GC-ed, stuff appears to go haywire 00:10:45 You can explicitly release resources sooner if you know that they are done, of course. 00:11:09 (let ((input-port (open-input-file "/foo/bar"))) ... (let ((result (zot input-port))) (close-input-port input-port) result)) 00:11:31 The inner LET can be replaced by the non-standard, but easily definable, macro BEGIN0: (begin0 (zot input-port) (close-input-port input-port)) 00:11:48 This particular pattern, with a single input file, is captured by the procedure CALL-WITH-INPUT-FILE. 00:15:18 paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has joined #scheme 00:15:34 -!- Somelauw [~anonymous@038-234-045-062.dynamic.caiway.nl] has quit [Quit: Ik ga weg] 00:15:43 Is that a satisfactory answer to your question? 00:21:52 virl [~virl__@178-191-170-176.adsl.highway.telekom.at] has joined #scheme 00:24:40 -!- virl__ [~virl__@178-191-163-102.adsl.highway.telekom.at] has quit [Ping timeout: 276 seconds] 00:33:14 -!- RageOfThou [~RageOfTho@users-55-220.vinet.ba] has quit [Read error: No route to host] 00:33:34 RageOfThou [~RageOfTho@users-55-220.vinet.ba] has joined #scheme 00:41:41 -!- Komi [Komi@83.231.81.247] has quit [Disconnected by services] 00:41:57 Komi [Komi@83.231.80.212] has joined #scheme 00:42:10 -!- pdelgallego [~pdelgalle@1503031474.dhcp.dbnet.dk] has quit [Ping timeout: 260 seconds] 00:46:48 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 00:48:18 paint [~paint@unaffiliated/paint] has joined #scheme 00:48:39 mmc1 [~michal@109.117.131.121] has joined #scheme 00:49:42 -!- mmc [~michal@109.112.3.146] has quit [Ping timeout: 252 seconds] 00:54:18 -!- tommylommykins [~tommylomm@5ad471cc.bb.sky.com] has quit [Ping timeout: 260 seconds] 01:02:18 -!- Komi [Komi@83.231.80.212] has quit [Ping timeout: 240 seconds] 01:05:26 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 01:07:57 justicefries [~thefry@65.100.130.168] has joined #scheme 01:12:58 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 260 seconds] 01:24:54 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 01:34:32 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 258 seconds] 01:36:07 -!- homie [~user@xdsl-87-79-85-158.netcologne.de] has quit [Ping timeout: 246 seconds] 01:36:09 -!- wbooze [~user@xdsl-87-79-85-158.netcologne.de] has quit [Ping timeout: 240 seconds] 01:37:05 tommylommykins [~tommylomm@5ad471cc.bb.sky.com] has joined #scheme 01:41:02 xwl [~user@123.115.100.225] has joined #scheme 01:44:05 pdelgallego [~pdelgalle@1503031474.dhcp.dbnet.dk] has joined #scheme 01:44:30 -!- mmc1 [~michal@109.117.131.121] has quit [Read error: Connection reset by peer] 01:46:49 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 01:48:04 -!- tommylommykins [~tommylomm@5ad471cc.bb.sky.com] has quit [] 01:48:19 paint [~paint@unaffiliated/paint] has joined #scheme 02:13:52 -!- pdelgallego [~pdelgalle@1503031474.dhcp.dbnet.dk] has quit [Ping timeout: 276 seconds] 02:26:49 -!- Spewns [~jake@97-92-222-240.dhcp.stls.mo.charter.com] has quit [Quit: Leaving.] 02:31:47 nowhereman [~pierre@AStrasbourg-551-1-29-158.w83-196.abo.wanadoo.fr] has joined #scheme 02:32:00 -!- nowhere_man [~pierre@AStrasbourg-551-1-72-210.w92-141.abo.wanadoo.fr] has quit [Ping timeout: 245 seconds] 02:35:51 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 02:40:13 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 02:42:00 asarch [~asarch@189.188.200.37] has joined #scheme 02:48:10 -!- mejja [~user@c-14bee555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote host closed the connection] 02:52:34 timj__ [~timj@e176194162.adsl.alicedsl.de] has joined #scheme 02:53:03 paint [~paint@unaffiliated/paint] has joined #scheme 02:56:10 -!- timj_ [~timj@e176192067.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 03:10:30 fowlduck [~fowlduck@24-177-112-133.dhcp.mdsn.wi.charter.com] has joined #scheme 03:14:04 -!- meder [~meder@c-71-206-10-49.hsd1.md.comcast.net] has quit [Read error: Operation timed out] 03:18:40 meder [~meder@c-71-206-10-49.hsd1.md.comcast.net] has joined #scheme 03:21:01 MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 03:24:25 -!- MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit [Client Quit] 03:28:56 phao [~phao@189.107.142.87] has joined #scheme 03:33:23 ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 03:44:07 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Quit: snarkyboojum] 03:44:39 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 260 seconds] 03:45:19 -!- bgs100 is now known as bgs000 03:47:33 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 03:48:17 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 03:48:35 paint [~paint@unaffiliated/paint] has joined #scheme 03:49:59 -!- Checkie [225@unaffiliated/checkie] has quit [Ping timeout: 264 seconds] 03:58:05 snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has joined #scheme 04:00:28 -!- jonrafkind [~jon@c-67-172-254-235.hsd1.ut.comcast.net] has quit [Ping timeout: 240 seconds] 04:01:49 jonrafkind [~jon@c-67-172-254-235.hsd1.ut.comcast.net] has joined #scheme 04:18:22 -!- IJP [~Ian@host86-186-179-58.range86-186.btcentralplus.com] has quit [Quit: leaving] 04:18:58 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Quit: ros3] 04:19:06 ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 04:20:05 Fare [~Fare@c-24-218-127-11.hsd1.ma.comcast.net] has joined #scheme 04:22:23 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 264 seconds] 04:23:12 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 04:24:15 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Ping timeout: 276 seconds] 04:24:30 ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 04:27:29 -!- asarch [~asarch@189.188.200.37] has quit [Quit: Leaving] 04:28:41 -!- phao [~phao@189.107.142.87] has quit [Quit: Leaving] 04:33:57 -!- typemore [~typemore@unaffiliated/typemore] has quit [Quit: leaving] 04:44:00 -!- Fare [~Fare@c-24-218-127-11.hsd1.ma.comcast.net] has quit [Ping timeout: 265 seconds] 04:47:13 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 04:48:05 paint [~paint@unaffiliated/paint] has joined #scheme 04:50:21 -!- saccade_ [~saccade_@COMBINATOR.MIT.EDU] has quit [Read error: Operation timed out] 05:10:05 Modius [~Modius@cpe-24-28-30-165.austin.res.rr.com] has joined #scheme 05:10:56 -!- Modius [~Modius@cpe-24-28-30-165.austin.res.rr.com] has quit [Max SendQ exceeded] 05:11:29 Modius [~Modius@cpe-24-28-30-165.austin.res.rr.com] has joined #scheme 05:16:28 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 240 seconds] 05:18:24 -!- fowlduck [~fowlduck@24-177-112-133.dhcp.mdsn.wi.charter.com] has quit [Remote host closed the connection] 05:19:19 -!- mjonsson [~mjonsson@cpe-98-14-173-5.nyc.res.rr.com] has quit [Quit: Leaving] 05:35:04 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Remote host closed the connection] 05:38:16 Spewns [~jake@97-92-222-240.dhcp.stls.mo.charter.com] has joined #scheme 05:47:55 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 05:48:06 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 05:48:36 paint [~paint@unaffiliated/paint] has joined #scheme 06:24:20 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Quit: ros3] 06:24:28 ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 06:27:50 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Read error: Operation timed out] 06:34:31 -!- RageOfThou [~RageOfTho@users-55-220.vinet.ba] has quit [Read error: No route to host] 06:34:46 MrFahrenheit [~RageOfTho@users-55-220.vinet.ba] has joined #scheme 06:37:11 -!- stepnem [~stepnem@88.103.132.186] has quit [Quit: ZNC - http://znc.sourceforge.net] 06:40:33 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 06:41:36 stepnem [~stepnem@88.103.132.186] has joined #scheme 06:42:21 ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 06:47:59 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 06:49:08 paint [~paint@unaffiliated/paint] has joined #scheme 07:02:17 elderK [~kae@pdpc/supporter/active/elderk] has joined #scheme 07:12:13 -!- jonrafkind [~jon@c-67-172-254-235.hsd1.ut.comcast.net] has quit [Ping timeout: 276 seconds] 07:25:59 -!- paint [~paint@unaffiliated/paint] has quit [Ping timeout: 264 seconds] 07:36:55 -!- bleakgadfly [~cato@168.81-166-171.customer.lyse.net] has quit [Ping timeout: 276 seconds] 07:37:35 masm [~masm@bl19-139-80.dsl.telepac.pt] has joined #scheme 07:45:48 -!- xwl [~user@123.115.100.225] has quit [Ping timeout: 240 seconds] 07:55:18 paint [~paint@unaffiliated/paint] has joined #scheme 08:08:26 rdd [~rdd@c83-250-52-182.bredband.comhem.se] has joined #scheme 08:18:11 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 258 seconds] 08:21:02 virl__ [~virl__@178-191-163-113.adsl.highway.telekom.at] has joined #scheme 08:24:34 -!- virl [~virl__@178-191-170-176.adsl.highway.telekom.at] has quit [Ping timeout: 246 seconds] 08:48:18 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 08:48:48 paint [~paint@unaffiliated/paint] has joined #scheme 09:09:13 -!- leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has quit [Read error: Connection reset by peer] 09:15:16 leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has joined #scheme 09:17:01 typemore [~typemore@unaffiliated/typemore] has joined #scheme 09:17:06 so I just wrote a basic scheme tokener 09:17:10 *tokenizer* 09:17:17 how do I parse it into sexps ? 09:38:12 -!- justicefries [~thefry@65.100.130.168] has quit [Ping timeout: 248 seconds] 09:39:30 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 09:44:19 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 276 seconds] 09:48:16 R3cur51v3 [~Recursive@209-20-84-78.slicehost.net] has joined #scheme 09:48:20 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 09:50:50 paint [~paint@unaffiliated/paint] has joined #scheme 09:52:52 stis [~stis@1-1-1-39a.veo.vs.bostream.se] has joined #scheme 09:54:12 e-future [~e-future@unaffiliated/sergio/x-8197433] has joined #scheme 09:58:18 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Remote host closed the connection] 10:03:55 mmc [~michal@109.112.32.228] has joined #scheme 10:10:02 -!- jmcphers [~jmcphers@218.185.108.156] has quit [Remote host closed the connection] 10:10:45 jmcphers [~jmcphers@218.185.108.156] has joined #scheme 10:15:17 -!- lusory [~bart@bb121-6-247-192.singnet.com.sg] has quit [Read error: Connection reset by peer] 10:19:55 lusory [~bart@bb121-6-158-40.singnet.com.sg] has joined #scheme 10:28:47 justicefries [~thefry@65.100.130.168] has joined #scheme 10:29:35 gravicappa [~gravicapp@ppp85-140-117-112.pppoe.mtu-net.ru] has joined #scheme 10:38:28 -!- e-future [~e-future@unaffiliated/sergio/x-8197433] has quit [Ping timeout: 240 seconds] 10:40:17 e-future [~e-future@unaffiliated/sergio/x-8197433] has joined #scheme 10:43:33 adu [~ajr@softbank220043139062.bbtec.net] has joined #scheme 10:44:41 -!- typemore [~typemore@unaffiliated/typemore] has quit [Quit: leaving] 10:45:00 typemore [~typemore@unaffiliated/typemore] has joined #scheme 10:45:18 does 'define' make sense out of the top-level ? 10:48:23 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 10:50:23 paint [~paint@unaffiliated/paint] has joined #scheme 10:52:55 -!- virl__ [~virl__@178-191-163-113.adsl.highway.telekom.at] has quit [Remote host closed the connection] 10:53:01 typemore: yes, it's valid at the beginning of a lambda body 10:53:09 *thinks* 10:53:13 this is an related question, I think: 10:53:23 let can be a macro interms of lambda; can letrec be a macro interms of lambda? 10:53:37 it appears to me that 'define' is equiv in power to letrec 10:53:50 the notion that a bunch of var-'places' are created at once, then they're all bound 10:54:13 foof: ^ is the above correct? 10:59:33 seraph_ [~seraph@204.12.252.34] has joined #scheme 10:59:44 hi there! 10:59:52 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Quit: +++ killed by SIGSEGV +++] 11:00:18 typemore: yes, it's related, you can implement letrec in terms or internal define 11:01:08 what's "internal define" ? 11:02:53 slom [~slom@pD9EB4509.dip.t-dialin.net] has joined #scheme 11:02:53 -!- seraph_ [~seraph@204.12.252.34] has left #scheme 11:09:28 -!- leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has quit [Ping timeout: 276 seconds] 11:15:47 -!- justicefries [~thefry@65.100.130.168] has quit [Ping timeout: 264 seconds] 11:17:25 -!- gravicappa [~gravicapp@ppp85-140-117-112.pppoe.mtu-net.ru] has quit [Ping timeout: 245 seconds] 11:19:19 define inside a lambda 11:23:13 leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has joined #scheme 11:24:31 -!- lusory [~bart@bb121-6-158-40.singnet.com.sg] has quit [Read error: Connection reset by peer] 11:27:28 -!- aehrisch [~aehrisch@vhost.knauel.org] has left #scheme 11:29:40 lusory [~bart@bb116-14-104-43.singnet.com.sg] has joined #scheme 11:31:05 fradgers- [~fradgers-@5adafe9d.bb.sky.com] has joined #scheme 11:31:30 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 11:36:17 -!- R3cur51v3 [~Recursive@209-20-84-78.slicehost.net] has quit [Ping timeout: 265 seconds] 11:45:59 -!- slom [~slom@pD9EB4509.dip.t-dialin.net] has quit [Remote host closed the connection] 11:46:51 hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 11:48:24 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 11:49:25 paint [~paint@unaffiliated/paint] has joined #scheme 11:59:45 homie [~user@xdsl-78-34-244-80.netcologne.de] has joined #scheme 11:59:47 wbooze [~user@xdsl-78-34-244-80.netcologne.de] has joined #scheme 12:02:19 -!- snarkyboojum [~snarkyboo@110-174-43-105.static.tpgi.com.au] has quit [Quit: snarkyboojum] 12:09:19 -!- elderK [~kae@pdpc/supporter/active/elderk] has quit [Quit: Leaving] 12:13:51 xyxz [~xyz@78.169.40.253] has joined #scheme 12:14:43 gravicappa [~gravicapp@ppp85-141-166-221.pppoe.mtu-net.ru] has joined #scheme 12:19:04 kephas [~pierre@AStrasbourg-551-1-9-107.w86-213.abo.wanadoo.fr] has joined #scheme 12:19:08 -!- nowhereman [~pierre@AStrasbourg-551-1-29-158.w83-196.abo.wanadoo.fr] has quit [Ping timeout: 240 seconds] 12:23:25 -!- leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has quit [Ping timeout: 265 seconds] 12:28:05 MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 12:30:00 adu [~ajr@softbank220043139062.bbtec.net] has joined #scheme 12:35:23 leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has joined #scheme 12:35:23 -!- stis [~stis@1-1-1-39a.veo.vs.bostream.se] has quit [Read error: Connection reset by peer] 12:36:58 RageOfThou [~RageOfTho@users-55-171.vinet.ba] has joined #scheme 12:37:07 -!- NNshag [user@lns-bzn-44-82-249-218-89.adsl.proxad.net] has quit [Ping timeout: 260 seconds] 12:39:26 -!- MrFahrenheit [~RageOfTho@users-55-220.vinet.ba] has quit [Ping timeout: 276 seconds] 12:41:00 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 12:41:44 pjb [~t@81.202.16.46.dyn.user.ono.com] has joined #scheme 12:42:01 -!- MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit [Ping timeout: 265 seconds] 12:44:50 Guest10162 [~WoodenBoy@87-194-114-233.bethere.co.uk] has joined #scheme 12:48:55 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 12:49:22 NNshag [user@lns-bzn-27-82-248-22-25.adsl.proxad.net] has joined #scheme 12:50:25 paint [~paint@unaffiliated/paint] has joined #scheme 12:53:55 -!- leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has quit [Ping timeout: 260 seconds] 13:05:02 leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has joined #scheme 13:11:59 -!- leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has quit [Ping timeout: 265 seconds] 13:25:20 leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has joined #scheme 13:32:29 _Pb [~pb@75.131.194.186] has joined #scheme 13:34:21 -!- _Pb [~pb@75.131.194.186] has quit [Client Quit] 13:39:24 phao [~phao@189.107.195.154] has joined #scheme 13:48:58 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 13:49:57 paint [~paint@unaffiliated/paint] has joined #scheme 13:50:45 alvatar [~alvatar@161.127.222.87.dynamic.jazztel.es] has joined #scheme 13:51:49 hotblack23 [~jh@p57B5B7BB.dip.t-dialin.net] has joined #scheme 13:53:22 adu [~ajr@softbank220043139062.bbtec.net] has joined #scheme 14:01:49 _Pb [~pb@75.131.194.186] has joined #scheme 14:03:41 -!- typemore [~typemore@unaffiliated/typemore] has quit [Quit: leaving] 14:13:35 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Quit: Leaving] 14:18:58 -!- homie [~user@xdsl-78-34-244-80.netcologne.de] has quit [Read error: Operation timed out] 14:19:16 -!- paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has quit [Ping timeout: 248 seconds] 14:19:50 paperkettles [~chris@2001:5c0:1104:f400:226:bbff:fe0c:b57f] has joined #scheme 14:19:55 -!- saccade [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Quit: This computer has gone to sleep] 14:20:48 -!- wbooze [~user@xdsl-78-34-244-80.netcologne.de] has quit [Ping timeout: 240 seconds] 14:21:20 asarch [~asarch@189.188.142.140] has joined #scheme 14:34:47 -!- Modius [~Modius@cpe-24-28-30-165.austin.res.rr.com] has quit [Quit: I'm big in Japan] 14:47:55 aehrisch [~aehrisch@vhost.knauel.org] has joined #scheme 14:48:01 -!- aehrisch [~aehrisch@vhost.knauel.org] has left #scheme 14:48:57 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 14:49:57 paint [~paint@unaffiliated/paint] has joined #scheme 15:07:24 mejja [~user@c-14bee555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 15:12:05 virl [~virl__@178-191-163-113.adsl.highway.telekom.at] has joined #scheme 15:16:19 -!- bgs000 is now known as bgs100 15:22:02 -!- asarch [~asarch@189.188.142.140] has quit [Quit: Leaving] 15:24:07 <_Pb> how can I take an associated list and return a copy of it with one of the values changed? 15:28:31 sunnyps [~sunny@72.snat-111-91-127.hns.net.in] has joined #scheme 15:31:59 Fare [~Fare@c-24-218-127-11.hsd1.ma.comcast.net] has joined #scheme 15:32:25 -!- samth_away is now known as samth 15:33:26 somnium [~user@adsl-65-180-205.dab.bellsouth.net] has joined #scheme 15:33:31 <_Pb> please? 15:33:41 saccade [~saccade_@COMBINATOR.MIT.EDU] has joined #scheme 15:36:54 _Pb: (map (lambda (f) (if (eq? goal (car f)) (cons goal new-val) f)) my-alist) 15:37:52 <_Pb> samth: thanks 15:38:55 Im trying to understand the top level expansion as described in R6RS, and a bit confused: given something like (define foo ...) (define-syntax bar ...) (bar ...) (define frob ...), what lexical scope is the bar transformer bound to exactly? 15:39:27 somnium, what do you mean by binding a transformer to a lexical scope 15:41:23 so, every define is put aside until all definitions have been seen, but a macro might be called and expanded before theyve all been seen, and might expand into another define-syntax, right? 15:46:05 and define-syntax is handled immediately, not put aside, so Im confused as to how the symbols are ultimately resolved if multiple expansions and defines might happen before the top level environment is completely determined. 15:46:47 I guess its a lack of understanding of hygiene on my part, but I couldnt find a clear (to me) explanation in the spec 15:48:55 i'm not sure what you mean by "put aside" 15:49:27 symbols are resolved incrementally, when they are needed 15:49:51 mmc1 [~michal@109.117.134.116] has joined #scheme 15:50:27 -!- paint [~paint@unaffiliated/paint] has quit [Quit: IRC is just a multiplayer Notepad] 15:52:50 -!- mmc [~michal@109.112.32.228] has quit [Ping timeout: 245 seconds] 15:52:58 paint [~paint@unaffiliated/paint] has joined #scheme 15:55:23 somnium, think "identifier", not "symbol". 15:55:30 samth: I think he means "expansion is deferred". 15:55:38 say the top level is like (amacro ...) (define-syntax amacro ...) more defs ..., and amacro expands into (define ...) or (define-syntax ...) 15:55:58 somnium: It is tricky. Have you read http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-13.html#node_chap_10 ? 15:56:02 sorry if Im not being articulate, I come form an unhygienic world 15:56:03 somnium, a symbol is just concrete syntax. The identifier is the underlying object, that also contains source location and scoping information 15:56:14 chandler: Im about to :) 15:56:41 so two identifiers would be equal iff they denote the same bindings. 15:56:57 chandler: yes, I have read that, but I still have these lingering questions 15:57:04 when you macro-expand, you operate on identifiers, not on symbols. 15:57:46 Fare: I think somnium is asking tricky questions about the R6RS expansion process, not basic questions about what identifiers are. 15:57:47 Fare but how do you know what they identify before the top-level is complete? 15:58:36 I don't understand what you mean by "toplevel is complete". You know what it means by macroexpanding. 15:59:04 macroexpansion happens before evaluation. 15:59:16 somnium: I think the example you gave is invalid. 15:59:51 so if you try to define a macro after you use it, it cannot work 15:59:58 somnium: Each form is classified as a definition or an expression as it is processed. `amacro' would be classified as an expression, which means that an expansion into (define ...) is invalid. 16:00:14 Fare: OK, but what order does it take place in? 16:00:15 chandler: ok, is there a good implementation to study? I looked at portable syntax-case, but it was rather impenetrable to me 16:00:38 Fare: Is (let () (define foo (bar)) (define-syntax bar (syntax-rules () ((_) 1)) foo) valid? 16:00:48 chandler: ok! thats good to know 16:00:53 chandler, at the toplevel, each form is fully processed in order, macroexpanded then evaluated. 16:00:54 somnium: Not really. I'll be around later today to help answer questions, though. 16:01:08 Fare: That's very wrong in a R6RS context. 16:02:17 chandler, I would expect the first bar to not be in the scope of the define-syntax -- but Scheme is known for messing up internal define's 16:03:01 Scope and expansion order are two different things. 16:03:25 Not only is it in scope, but the syntax definition of `bar' is processed before the right-hand side of the definition of `foo' is, so the example is valid. 16:03:39 *chandler* will be back later. 16:04:12 alvatar_ [~alvatar@219.126.222.87.dynamic.jazztel.es] has joined #scheme 16:04:59 I'd argue it's a bug in the Scheme spec 16:06:28 -!- alvatar [~alvatar@161.127.222.87.dynamic.jazztel.es] has quit [Ping timeout: 248 seconds] 16:07:10 homie [~user@xdsl-78-34-204-61.netcologne.de] has joined #scheme 16:07:12 wbooze [~user@xdsl-78-34-204-61.netcologne.de] has joined #scheme 16:07:27 -!- sunnyps [~sunny@72.snat-111-91-127.hns.net.in] has quit [Quit: Ex-Chat] 16:08:22 Fare: It's a wart, but it is certainly deliberate. 16:08:47 MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 16:15:19 deliberate evil is still evil. 16:15:43 Fare, it's really very useful 16:15:56 samth: how so? 16:16:23 why can't you put your define-syntax'es before the define's that use them? 16:16:31 for example, we all expect this to work: (let () (define (f) (g)) (define (g) 1) ...) 16:16:35 how does racket does it inside a local ? 16:16:47 Racket behaves just as chandler described 16:17:56 *Fare* has to wrap his head around implicit vs explicit mutual recursion. 16:17:57 but if we change `define' to `define/contract' that is defined by macro expansion, then you would have it break 16:18:43 ML has letrec ... and ... 16:19:52 somnium, you may want to look at -- that implements the classification and expansion process, including processing definitions at the top level and in internal scopes, with both R5RS and R6RS semantics for the latter. 16:20:22 Riastradh: excellent, thanks 16:21:06 Please let me know if you have any questions: I have tried to make that code clear, but I never wrote any summary of its overall organization. 16:21:21 virl__ [~virl__@178-191-173-115.adsl.highway.telekom.at] has joined #scheme 16:22:04 jonrafkind [~jon@c-67-172-254-235.hsd1.ut.comcast.net] has joined #scheme 16:22:29 Fare, what does ML letrec have to do with this? 16:23:04 saccade_ [~saccade@BRAIN-AND-COG-THIRTY-EIGHT.MIT.EDU] has joined #scheme 16:23:23 -!- MononcQc [~Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit [Quit: Leaving] 16:24:34 -!- virl [~virl__@178-191-163-113.adsl.highway.telekom.at] has quit [Ping timeout: 240 seconds] 16:24:47 Riastradh: compared to portable-syntax-case its like a graphic novel so ffar 16:26:06 samth: it gives a different syntax for mutually recursive vs non-mutually recursive definitions, at toplevel and inner scopes likewise 16:26:29 as does let and letrec 16:26:29 with some consistency between the two. 16:26:44 samth: but not (define ...) 16:27:02 it happens that scheme has a third kind of scope, which allows mixing syntax and value definitions 16:27:13 which ml doesn't have to deal with 16:27:43 speaking of ML, have there ever been any attempts to support automatic currying/partial evaluation in scheme? 16:28:05 er, partial-application 16:28:06 Automatic currying and partial evaluation are two very different beasts. Perhaps you meant `partial application'? 16:28:18 indeed 16:28:34 somnium, there have been experiments, but how is that to work with rest arguments or keyword arguments? 16:28:57 You can straightforwardly write CURRIED-LAMBDA and CURRIED-CALL macros that curry things for you, and give them names as terse as you like. 16:29:23 somnium, http://docs.racket-lang.org/reference/procedures.html?q=curry#%28def._%28%28lib._racket/function..rkt%29._curry%29%29 16:29:24 -rudybot:#scheme- http://tinyurl.com/2dc3wwk 16:30:03 I suppose as long as the partial evaluation is always protected and you have to invoke it explicitly, rather than rely on ML-style automatic evaluation when all the arguments are there, you're safe. 16:30:07 its a question, but is it reasonable to say that all scheme procedures take one argument, and that argument is always a list? 16:30:20 somnium, no, it's not reasonable to say that 16:30:40 at least not in the way that you can say such things about haskell 16:31:54 <_Pb> is this a good way to handle objects in a game, or is there another data structure that i should be using? http://codepad.org/iuAhQqPc 16:32:17 i recommend hash tables 16:32:50 samth: why so? (lambda x (let ((a x0) ... (z xn))) =~ (lambda (a ... z) ...)? 16:32:51 alists are about never the correct datastructure 16:32:58 <_Pb> Fare: heh, really? 16:33:22 only if you know the list is (almost) always very short yet the space of keys is very large. 16:33:34 _Pb, if the set of fields is fixed in the program, then records are most idiomatic. 16:33:38 <_Pb> samth: i didn't want to go with anything destructive, but i'll use them 16:33:42 <_Pb> i see. 16:33:57 _Pb, use an immutable dictionary type 16:34:12 i just abbreviated that (rather incorrectly) to hash table 16:34:14 _Pb: which scheme? 16:34:24 somnium, that transformation is correct, but isn't telling you anything 16:34:28 <_Pb> Fare: chibi, this really small minimal implementation 16:34:30 (define-record-type (make-sprite x y w h dx dy sprite type) sprite? (x sprite.x) ...) (define (sprite-with-x sprite x) (make-sprite x (sprite.y sprite) ...)) 16:34:51 <_Pb> Raistradh: thanks, i'll read up on records in tspl 16:35:00 _Pb: you could use one of the srfi's for records. 16:35:13 I don't know whether TSPL discusses the standard form of records, SRFI 9 . 16:35:17 (assuming chibi doesn't provide them) 16:35:24 I am sure, however, Chibi supports SRFI 9. 16:36:34 <_Pb> ah, thanks, this is exactly what i wanted 16:36:57 samth: I guess I formed this idea that multiple arguments are just syntax sugar for projections, how is it incorrect? 16:38:02 I'm using GNU/MIT Scheme 9.0.1 (actually git from a few days ago) with rlwrap and it seems my C-c strokes aren't going through properly. E.g. when I enter the debugger, pushing C-c twice in a row doesn't do anything. Has anybody else seen this, or have an idea on how to fix? 16:38:34 It works as expected when run in a bare terminal (i.e. xterm for me), but not under rlwrap 0.30 or 0.37. 16:39:02 somnium, it's incorrect because that isn't how multiple arguments work in Scheme 16:39:25 i don't really know what else to say about it 16:39:45 Does rlwrap send ^C as SIGINT, metasyntax`? 16:40:01 bipt [~bpt@cl-851.chi-02.us.sixxs.net] has joined #scheme 16:41:00 Riastradh: it's supposed to. CLISP for example seems to see it. 16:41:42 I'm off to lunch now, but I'll look into it when I get back. 16:41:48 samth: you mean as they are implemented? is there a reason a compiler couldnt use such an internal representation? 16:42:03 -!- paint [~paint@unaffiliated/paint] has quit [Remote host closed the connection] 16:42:19 The debugger's putting the tty into cooked mode may have something to do with this, by the way. Can you exit the debugger with q? 16:42:20 it could, but semantics-preserving transformations are not the same thing as the semantics 16:42:30 Riastradh: I have however seen a few posts about rlwrap not receiving C-c properly, so I don't know. 16:42:50 samth: I guess my question is how are the semantics different? 16:44:39 Riastradh: Say for example I type "foo" and get an unbound variable error, then hit C-c I get the interrupt prompt. That's when C-c breaks, but q works. Also, if I just hit C-c at the REPL prompt, it quits immediately, it doesn't print the interrupt prompt. 16:45:26 they aren't different 16:45:56 -!- paperkettles [~chris@2001:5c0:1104:f400:226:bbff:fe0c:b57f] has quit [Ping timeout: 248 seconds] 16:45:56 you could say that ML takes multiple argument, but that the compiler detects partial application and constructs curried versions 16:46:03 and that would be a correct semantics 16:46:14 but it would lead to to understand ML less well 16:47:48 -!- mmc1 [~michal@109.117.134.116] has quit [Ping timeout: 265 seconds] 16:52:45 paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has joined #scheme 16:55:23 -!- lusory [~bart@bb116-14-104-43.singnet.com.sg] has quit [Read error: Connection reset by peer] 16:57:08 -!- e-future [~e-future@unaffiliated/sergio/x-8197433] has quit [Ping timeout: 248 seconds] 16:59:12 e-future [~e-future@unaffiliated/sergio/x-8197433] has joined #scheme 17:00:58 lusory [~bart@bb121-6-160-107.singnet.com.sg] has joined #scheme 17:02:25 samth: I hadn't seen racket's curry before, thanks for pointing it out 17:02:58 I'm full of questions today: does racket have any SDL bindings? 17:05:31 i made some a long time ago, but they are lost in the void 17:08:00 <_Pb> it seems that every scheme has outdated/badly supported sdl bindings 17:08:11 <_Pb> i ended up writing my own for chibi-scheme, i'd share them with you if you'd like 17:08:16 Ypsilon is awesome in that regard 17:08:25 <_Pb> yeah 17:08:49 Racket just has so many, batteries, it would be fun to use it with SDL 17:09:07 i wrote an allegro binding for racket, its basically sdl 17:09:17 jonrafkind: is it on Planet? 17:09:19 yea 17:09:36 http://planet.racket-lang.org/display.ss?package=allegro.plt&owner=kazzmir 17:09:41 it doesnt show up on the main page for some reason 17:09:43 <_Pb> hah, i was just looking at those this morning 17:09:55 <_Pb> i assmued they were outdated because they weren't on the front page 17:10:08 the main page listing has some bugs in it 17:10:25 <_Pb> does allegro support sound? 17:10:29 yea 17:10:34 <_Pb> cool 17:13:00 jonrafkind: cool 17:28:59 -!- xyxz [~xyz@78.169.40.253] has quit [Ping timeout: 264 seconds] 17:38:45 -!- hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote host closed the connection] 17:41:10 hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 17:42:27 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 17:45:34 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 17:55:49 mudge [~nick@173-160-19-245-Sacramento.hfc.comcastbusiness.net] has joined #scheme 17:56:45 hello 17:57:43 I'm new to scheme 17:57:49 anybody use racket? 17:58:11 mudge: Sure 17:58:18 Welcome by the way =] 17:58:22 thanks 17:59:00 I'm thinking I'd like to learn about how to make a web application using scheme, and am wondering if maybe racket was good for that 17:59:34 i also wonder how closely racket follows the r6rs standard 18:00:00 Well 18:00:02 I made a website in scheme 18:00:06 It's by no means ready. 18:00:11 But actually, what you want is this 18:00:28 http://docs.racket-lang.org/continue/index.html [+] 18:00:29 yea? 18:00:56 thanks 18:02:08 No problem 18:02:19 askhader, what's your favorite scheme implementation? 18:02:29 i'm still wondering which one I should use 18:02:41 mudge: what for? 18:02:51 under what constraints? 18:03:37 Riastradh: ping 18:04:11 i'd like something that is close to a scheme standard, and for building web applications 18:04:17 that has good documentation 18:07:01 phao_ [~phao@189.107.195.154] has joined #scheme 18:07:06 Mandar [~armand@pha75-21-78-228-186-233.fbx.proxad.net] has joined #scheme 18:07:07 -!- phao_ [~phao@189.107.195.154] has quit [Read error: Connection reset by peer] 18:10:46 -!- Guest10162 [~WoodenBoy@87-194-114-233.bethere.co.uk] has quit [Quit: Leaving] 18:18:38 anybody want to talk about scheme? 18:19:15 -!- Mandar [~armand@pha75-21-78-228-186-233.fbx.proxad.net] has quit [Quit: Quitte] 18:21:42 mudge: I think you'll be hard pressed to find a scheme with more thorough documentation than racket 18:22:55 somnium: good to know 18:23:11 seems like racket is one of the more popular schemes 18:24:40 <_Pb> if you want to make a web application, and you're new to scheme, you should probably go with racket 18:25:29 <_Pb> you could always switch to another scheme after that, but it's easier to get started with racket 18:25:53 <_Pb> you won't need to worry about things like writing your own bindings to whatever C library you need to get started 18:26:10 <_Pb> (the trap that i fell into) 18:28:13 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 276 seconds] 18:35:10 mudge: Scheme implementations are like Pokemon: each has its strengths and weaknesses, and you gotta try 'em all to figure out which is best for whatever situation you run across. But I think that's something that only comes with time. Racket is certainly quite complete both in terms of functionality and documentation. 18:36:37 -!- RageOfThou [~RageOfTho@users-55-171.vinet.ba] has quit [Read error: Connection reset by peer] 18:36:59 RageOfThou [~RageOfTho@users-55-171.vinet.ba] has joined #scheme 18:38:53 -!- hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote host closed the connection] 18:39:45 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 18:42:10 thanks guys 18:43:14 -!- paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has quit [Quit: paperkettles] 18:44:00 pdelgallego [~pdelgalle@1503031474.dhcp.dbnet.dk] has joined #scheme 18:46:20 paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has joined #scheme 18:51:50 why would someone start off using racket and then switch to a different scheme? i'm just curious about what kind senario that might happen in 18:52:21 also, i'm curious what schemers might think about clojure 18:52:25 <_Pb> racket's pretty big, maybe if you wanted a smaller scheme that you could embed in a C program, you'd use that 18:52:41 _Pb: ah, good one 18:54:25 *metasyntax`* just likes collecting implementations and seeing how they do things differently 18:54:51 you can embed racket in a C program 18:55:05 im not sure how big the resulting embedding is, though 18:55:07 metasyntax: yea, makes sense 18:55:45 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 240 seconds] 18:56:00 <_Pb> jonrafkind: racket itself, or mzscheme? 18:56:35 you mean the C runtime vs racket code? 18:56:57 mudge: One might also do it as a portability exercise, of course; say you write a library and want to support as many people as possible. 18:57:28 im not sure if you can take racket code and bundle it with an exe, usually ive seen extra files just distributed with a collects/ directory along with the exe 18:57:28 <_Pb> dunno, just curious 18:57:42 <_Pb> oh, ok 18:57:50 metasyntax: thanks 18:58:04 what's the difference between racket and mzscheme? 18:59:00 hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 18:59:01 mzscheme is the pre-racket command line interface, `racket' is a generic term for the entire racket production 18:59:12 but now there is a `racket' command line prorgam that supercedes mzscheme 18:59:25 mzscheme -> racket. drscheme -> drracket 18:59:54 <_Pb> oh, mzscheme isn't the core language? 19:00:58 mzscheme was just the name for the command line interface 19:01:05 the language used to be called 'plt scheme' 19:01:14 <_Pb> i see 19:02:05 i just downloaded and installed racket, i see the racket command line interface, but the mzscheme one is still there, i wonder why it is still there, now there are too command line interfaces 19:02:57 I think it is just an alias. 19:04:03 no symbolic link, different file sizes 19:04:20 for backwards compatiblity I guess 19:04:20 oops. I broke my install somehow so I can't run mzscheme. 19:04:23 -!- phao [~phao@189.107.195.154] has quit [Quit: Leaving] 19:04:33 i see 19:04:58 curious, what's the typical operating system for a schemer? windows, mac, linux ? 19:05:11 i use a commodore64 19:05:30 now you're trolling us. 19:06:19 me or jonrafkind? 19:06:19 did a scheme ever run on a 6502 without mmu? 19:06:30 mudge: not you. 19:06:30 <_Pb> yeah, mzscheme is just racket: http://docs.racket-lang.org/scheme/compat-exe.html 19:06:51 mzscheme runs with the #lang scheme, racket runs with #lang racket. thats the only difference 19:06:58 <_Pb> ah 19:07:02 okay, yea, i don't think commodore64 has enough memory for modern schemes 19:07:34 bremner: I believe there's a c64lisp called MicroLisp 19:07:46 mudge: I use clojure a lot, its great if you need-to-use/want-to-leverage the jvm, and has some very clever datastructures and improved CL-style macros 19:08:10 <_Pb> somnium: what kind of programs do you write in clojure? 19:08:19 mudge: that said, if you want to call C, or use continuations, or just prefer tail recursion, or many other possible reasons scheme just wins sometimes 19:09:04 or you are following along a book written with scheme in mind 19:09:17 _Pb: mostly web apps and data-crunching things, also some toy-compilers 19:09:51 <_Pb> somnium: cool. have you done any graphical stuff with it? 19:09:58 basically i just want to learn about making a web application using a nice lisp, I don't depend upon any existing infrastructure 19:10:09 somnium: interesting, thanks 19:10:41 <_Pb> mudge: why not go through this tutorial? http://docs.racket-lang.org/continue/index.html 19:11:14 _Pb: yes, i will 19:11:31 _Pb: no, Id like to, but Ive had a horrible time setting up java graphical libs. C based stuff always just works 19:11:53 clojure has nice interop into Java, so you can build graphical stuff using Swing 19:12:01 <_Pb> somnium: ah, that's too bad. 19:13:21 Oh, Clojure still doesn't have TCO? 19:14:14 metasyntax`: it can't, not really, on the jvm. not without ... concessions 19:14:30 metasyntax: TCO can't be implemented in Java very well, Clojure has explicit forms: loop and recur for optimizing recursion 19:15:04 metasyntax: clojure depends a lot on lazy sequences for recursive stuff 19:15:36 I see, interesting. 19:16:40 -!- paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has quit [Quit: paperkettles] 19:17:12 phao [~phao@189.107.176.53] has joined #scheme 19:17:16 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 19:18:15 does scheme have any lazy semantics? 19:18:31 delay: the mother of all laziness 19:18:54 delay does sound pretty lazy 19:19:46 19:23:59 do you guys think that racket follows R5RS pretty well? 19:28:15 -!- meder [~meder@c-71-206-10-49.hsd1.md.comcast.net] has quit [Ping timeout: 245 seconds] 19:28:49 test 19:29:30 -!- dfeuer [~dfeuer@wikimedia/Dfeuer] has quit [Ping timeout: 245 seconds] 19:30:01 mudge, racket has a r5rs language 19:30:08 racket itself is not r5rs 19:30:13 meder [~meder@c-71-206-10-49.hsd1.md.comcast.net] has joined #scheme 19:30:21 somnium: poing 19:30:23 (in particular, it has immutable cons cells) 19:30:46 Fare: thanks, is there some way to specify that you're using the r5rs language when using racket? 19:31:29 i like the immutable style of things, do you guys? 19:31:34 bremner, there have been lisps for the 6502, but no complete rnrs scheme. 19:31:43 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 19:31:52 if only because of the pain to implement a full numeric tower (or bignums) 19:32:09 Riastradh: ah great, you're back. I did end up with some questions. i guess Ill ask in a random order. 19:32:15 what is a 'location context'? 19:32:48 mudge: http://docs.racket-lang.org/r5rs/r5rs-mod.html 19:33:02 metasyntax`, ah, so the problem isn't the debugger; the problem is the interrupt prompt. 19:33:07 That's a context where one can use a location, but perhaps not an expression. A variable reference is an example of a location: you can store a value into it. In Scheme, the only location contexts are the left-hand sides of SET! expressions. 19:33:28 This is a little bit of excess generality which would enable support, for instance, for a generalized SET! in the style of Common Lisp. 19:34:18 ok, so like, maybe a variable, maybe a slot on an object kind of thing? 19:34:18 metasyntax: thanks, as a beginner do you think it is a good idea to try to follow r5rs in the beginning to learn the ropes? 19:34:40 bremner, however, the gambit team is I think currently maintaining tiny embeddable scheme-ish evaluators 19:35:32 Variable references are the only example of locations in Scheme. Combinations could be locations too: compiling an assignment to a combination, say (SET! (F X Y) Z), could be compiled identically to ((SETTER F) Z X Y). Macro invocations could expand into locations, like Common Lisp's SETF expanders. 19:35:42 Riastradh: (continuing in random order) homogeneous-sequence-scanner? 19:36:12 That's part of the sequence scanning mechanism. It scans a sequence of forms that should be all of the same class: all definitions, or all expressions. 19:36:21 mudge: Personally, if you don't know much about functional programming, I think that's a good idea, if only to give you a good basis of "how things are done" without overwhelming you with lots of different functions to remember. 19:36:50 mudge: But if you want to write a web application straight away, you're going to have a harder time using just R5RS. :-) 19:37:08 metasyntax: thanks 19:37:18 Where do we use homogeneous sequence scanners? Example: In the R5RS and the R6RS, every lambda body consists of a sequence of definitions followed by a sequence of expressions. Once we have found the first expression, we know that the rest of the subforms must be expressions. So we use SCAN-EXPRESSIONS. 19:38:09 -!- meder [~meder@c-71-206-10-49.hsd1.md.comcast.net] has quit [Ping timeout: 265 seconds] 19:38:25 Example: In the R5RS, every form in the body of a lambda must be *either* an expression or a definition, or a sequence of one or the other. So (lambda () (begin (define x 5) x)) is not valid in the R5RS. Once we have discovered the first definition there, we use SCAN-DEFINITIONS to find the rest, and guarantee that they are definitions, not expressions. 19:38:28 Riastradh: ok, great (I think I recall finding that mzscheme doesnt complain if defines and expressions are intermingled in a lambda-body) 19:38:41 Sure. You could express that too. That's what SCAN-TOP-LEVEL does. 19:39:23 `reduction' and `guarded-classifier' 19:39:32 Fare: ah, so the claim of running on C64 is not _quite_ as outlandish as I thought. 19:40:00 GUARDED-CLASSIFIER returns a procedure that acts like CLASSIFY, but guarantees that the classification it returns satisfies a predicate. 19:40:26 ok 19:40:32 A reduction is when one form reduces to another by macro expansion or by unwrapping a syntactic closure. For example, (LET ((X 5)) X) reduces to ((LAMBDA (X) X) 5). 19:42:30 dfeuer [~dfeuer@wikimedia/Dfeuer] has joined #scheme 19:45:04 ok, and, how do temporary classifiers work, and when in the process are they invoked, and oh yes, what is expansion history? :) 19:45:34 is a record kept of every preceding macroexpansion? 19:45:36 Expansion history is just a record of the expansion process for debugging purposes. 19:45:52 You can omit it altogether by supplying #F for the initial history. 19:48:34 lolcow [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has joined #scheme 19:48:35 Temporary classifiers are a kludge by which macro expanders can get at the syntactic environment and expansion history. For example, the expander for CASE uses this to report precise syntax errors. 19:48:44 -!- virl__ [~virl__@178-191-173-115.adsl.highway.telekom.at] has quit [Remote host closed the connection] 19:49:16 -!- leppie [~lolcow@196-210-177-53.dynamic.isadsl.co.za] has quit [Ping timeout: 265 seconds] 19:50:10 If a macro expander wants to get at that, it reduces to a bogus form (KEYWORD) in a syntactic environment where KEYWORD is bound to a special classifier that will pass that information to a procedure in the macro expander. 19:51:41 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 276 seconds] 19:55:44 Riastradh: ok, where/how is the output of syntax-transformers processed? (I gathered that portable-syntax-case used an intricate system of 'marks') 19:55:57 The mechanism is syntactic closures. 19:56:27 bremner, just keeping your symbol table in such tiny memory can be a pain 19:57:17 yeah, and the 6502 has this crazy 256 byte pseudo segmented addressing iirc 19:57:42 bremner, these days, more interesting would be a cross-development system where symbols & metadata lives outside the (otherwise interactive) target system. 19:57:42 There are several types of forms as is traditional in Lisp: symbols, pairs, self-evaluating literals (numbers, booleans, strings, &c.). There is also another type of form, the syntactic closure. A syntactic closure contains another form and a syntactic environment. Classifying a syntactic closure with form F and environment E in some environment E' is roughly equivalent to classifying F in the environment E. 19:58:21 When you write a macro, there are typically two environments involved: that in which the macro is defined, and that in which someone used the macro. 19:59:10 Take LET for example, for which you want (LET ((v e) ...) b) to expand into ((LAMBDA (v ...) b) e ...). Specifically, you want the name LAMBDA to be the standard Scheme LAMBDA, not whatever the name LAMBDA means in the environment where some luser happened to use LET. 19:59:43 Riastradh: the reason Im trying to get this, well its fun, but besides Im trying to add macros to a toy language that can eventually be implemented in itself. define-syntax style macros have the (temporary) advantage that the compiler can be in any language. 19:59:46 ^^ right 20:00:44 So when you define LET, it remembers the environment in which you defined it -- which maps the name LAMBDA to the meaning of the standard Scheme LAMBDA. When you use LET, what it expands to is classified in the environment of usage, which may map LAMBDA to some random meaning -- say, a local variable. 20:01:12 Riastradh, except when what you want is re-defining a LET for your new Scheme extension where LAMBDA has a different meaning. 20:01:48 The expansion of LET, then, may look something like {usage environment, (({definition environment, LAMBDA} (v ...) b) e ...)}, where curly braces indicate a syntactic closure. 20:01:49 (at which point you currently re-evaluate the source for LET in the new environment) 20:02:16 -!- alvatar_ [~alvatar@219.126.222.87.dynamic.jazztel.es] has quit [Quit: leaving] 20:02:19 -!- _Pb [~pb@75.131.194.186] has quit [Ping timeout: 260 seconds] 20:02:42 Yes, Fare. The purpose here is to allow a macro to have semantics independent of the context in which it is used -- to make the macro's implementation details just that, implementation details and not actually a part of its interface. 20:03:08 -!- lolcow is now known as leppie 20:03:49 Expanding (LET ((v e) ...) b) into ((LAMBDA (v ...) b) e ...) is one possible way to implement LET, but there may be others as well. 20:04:45 For further details on syntactic closures, see the 1988 paper by Alan Bawden and Jonathan Rees titled `Syntactic Closures', or perhaps `A Syntactic Closures Macro Facility'. 20:05:13 -!- hohoho [~hohoho@ntkngw227224.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote host closed the connection] 20:08:01 Riastradh: are there any test suites for Riaxpander to play with? (and where exactly is the entry point?) 20:08:19 There is a simplification called `explicit renaming', where the only form that can be stored in a syntactic closure is a symbol or another syntactic closure; Will Clinger wrote a small paper in 1991 on the subject. 20:08:28 No, 'fraid not. There are several entry points, but you probably want to start with sexp.scm. 20:08:35 -!- phao [~phao@189.107.176.53] has quit [Ping timeout: 276 seconds] 20:09:04 IJP [~Ian@host86-186-179-58.range86-186.btcentralplus.com] has joined #scheme 20:09:46 It's easiest to load s48-interfaces.scm and s48-packages.scm into Scheme48, open the SYNTACTIC structure, and then try, say, (sexp/expand '(let ((f display)) (f "Hello, world!")) (make-sexp-environment)). 20:11:13 That, or to load mit-load.scm into MIT Scheme. 20:11:36 (I don't know whether chicken.scm will work in recent versions of Chicken -- riaxpander got bundled into an egg for Chicken 3, and then Chicken 4 had many changes.) 20:13:19 pchrist_ [~spirit@gentoo/developer/pchrist] has joined #scheme 20:15:48 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Ping timeout: 240 seconds] 20:17:03 hmm, is it a bad sign that the expansion process seems vastly more complicated than the actual compilation process? 20:17:17 What compilation process, exactly? 20:17:23 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 20:17:44 In riaxpander, `compiling' just means producing output from the whole shebang. The term is a little silly. 20:18:04 well, anf-normalization, lambda-reductions, and anf->direct 20:18:18 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 20:18:24 no, I meant my little toy project 20:18:56 OK. Well, riaxpander contains a lot of generality, which may not need. 20:20:25 phao [~phao@189.107.174.8] has joined #scheme 20:20:26 You could substantially reduce the size of riaxpander by merging sexp.scm and standard.scm, and eliminating everything from the definition scanning machinery in classify.scm that you don't need. 20:20:59 -!- pchrist_ [~spirit@gentoo/developer/pchrist] has quit [Ping timeout: 260 seconds] 20:21:39 It might also be reducible further by using explicit renaming rather than syntactic closures, although I'm not sure of that -- originally riaxpander did implement only explicit renaming, but I implemented syntactic closures because it didn't expand the code very much, if I recall correctly. 20:22:22 The code could also be a bit smaller if you ripped out all the expansion history bookkeeping. 20:23:14 But even with all that generality, expansion history, syntactic closures, and so on, it's still only about half the size of psyntax, last I checked... 20:23:32 In lines of code, that is. I think psyntax's code is much terser, though. 20:23:46 Revolve [revolve@wind.nullroute.eu.org] has joined #scheme 20:26:16 -!- phao [~phao@189.107.174.8] has quit [Ping timeout: 265 seconds] 20:27:34 Im half tempted to abandon hygiene :/ First I'll read the papers you mentioned and see if it sinks in a bit more. Thanks again for all your help and patience. 20:27:52 from the website, racket is a descendant of scheme, so its not really scheme anymore but its own language 20:28:16 Please don't abandon hygiene: it is very important for a macro to have semantics independent of how it is implemented -- for the implementation not to leak into its interface. 20:30:05 If you just want to understand a simple mechanism for hygiene, try Jonathan Rees's paper `Implementing Lexically Scoped Macros' from Lisp Pointers around 1992 or so. 20:30:30 That gives a simple expander for explicit renaming macros, in terms of which you can implement SYNTAX-RULES, without all the complications of definitions, which are most of why riaxpander is hairy. 20:33:16 somnium: The implementation of `syntax-rules' style hygienic macros is fairly straightforward, especially if you disallow complicated non-R5RS features such as inner `define-syntax'. 20:33:50 (Of all the macro expanders I've seen, I think riaxpander has the most elegant treatment of definitions -- but they are still hairy!) 20:34:17 (Here `definition' includes top-level and internal definitions of variables and of syntax.) 20:36:01 mudge: Most Scheme implementations offer more than the Reports call for, as Racket certainly does. I think the Racket folks prefer users to think of it as a platform for building and running languages, one of which is Scheme. Racket also runs a minimal Java-like language too if memory serves. 20:36:46 somnium: Using `syntax-rules' style hygienic macros also allows you to simplify your handling of matters of phase, and if you're bootstrapping a new language, you can write the expander in your host language. 20:37:34 mudge: I believe part of the rationale for the name change (from PLT Scheme to Racket) is to try to keep people from thinking Racket is "just Scheme". 20:38:01 phao [~phao@189.107.214.86] has joined #scheme 20:38:46 mudge: Racket retains all of the essential characteristics of a Scheme, but it differs in some respects from the reports. You can think of it as an evolutionary branch, if you like. 20:38:59 chandler: yes, that was my original attraction. (also, the source target is javascript, and under the optimistic assumption that I complete it and someone other than myself uses it, define-syntax rules style macros are vastly more idiot-proof than procedural ones) 20:39:33 (think of all the horrible javascript in the world. now imagine that javascript has unhygienic macros) 20:39:40 *somnium* shudders 20:39:42 Yikes. That's a frightening thought. 20:41:22 I can imagine that procedural macros for a non-S-expression-based language would be even more difficult to work with as well. 20:42:59 (`Source target'?) 20:43:10 *mejja* racket ~ "homo neanderthalensis" 20:44:32 Riastradh: target language? the string2 of (string1 -> string2)? 20:45:02 OK. 20:49:40 dark [~dark@unaffiliated/eliasamaral] has joined #scheme 20:50:00 _Pb [~pb@75.131.194.186] has joined #scheme 20:51:49 thanks metasyntax for the explanations 20:53:21 -!- phao [~phao@189.107.214.86] has quit [Ping timeout: 240 seconds] 20:53:49 mheld [~mheld@c-76-119-90-161.hsd1.ma.comcast.net] has joined #scheme 20:53:52 hey y'all 20:54:16 -!- mudge [~nick@173-160-19-245-Sacramento.hfc.comcastbusiness.net] has quit [Quit: Ex-Chat] 20:56:25 I've got a non-scheme question for y'all 20:56:31 though it's related to PL design 20:56:38 metasyntax`, well, I can reproduce the weirdness you observed with rlwrap and MIT Scheme, but I don't know why it is. 20:56:49 how would one implement a MIMD language? 20:57:19 -!- wbooze [~user@xdsl-78-34-204-61.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 20:57:25 -!- homie [~user@xdsl-78-34-204-61.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 20:58:29 mheld: Can you specify a bit further what you mean by "MIMD language"? I can imagine several possibilities, but I'd like to hear what you're thinking of. 20:58:35 Thomas_H [~Thomas_H@66.183.224.178] has joined #scheme 20:58:38 mheld, you'd implement several such languages at a time 20:58:54 every programmer would have his own 20:59:01 chandler: like J 20:59:16 where it's not a single stream of data that you're applying stuff on 20:59:22 J, the APL successor? 20:59:30 do you mean SIMD ? 20:59:39 ecm 20:59:39 erm 20:59:40 yes 20:59:42 sorry 21:00:12 there are papers about that. Otherwise, you should give a look at Fortress 21:00:19 I'm still not sure what kind of information you're looking for. 21:00:40 I'm just curious about how one goes about thinking about that kind of stuff 21:01:07 read about map/reduce 21:01:35 actually, J is a MIMD language 21:04:48 Riastradh: OK, at least it's not just my setup then. It's not a major deal for me; I'll poke around some and see if the same thing has happened with rlwrap and other programs, maybe I can learn something useful. 21:06:51 Fare: http://www.vector.org.uk/archive/v102/mcdonnell102_128.htm 21:07:31 metasyntax`, I was wrong about SIGINT -- ^C sends SIGQUIT to MIT Scheme, and ^G sends SIGINT. MIT Scheme edits the termios structure of the terminal, and this probably confuses rlwrap. 21:07:41 phao [~phao@189.107.128.251] has joined #scheme 21:07:59 metasyntax`, I find that after I have hit ^\ or ^C a couple times (and returned to the top-level REPL), everything seems to behave normally with MIT Scheme under rlwrap. 21:11:22 Riastradh: I see a change in behaviour (it shows the prompt when I hit ^C rather than just immediately ";Quit!") but it still doesn't handle ^C at the interrupt prompt without an intervening keystroke. 21:11:45 asarch [~asarch@189.188.150.8] has joined #scheme 21:12:31 aack [~user@a83-163-241-74.adsl.xs4all.nl] has joined #scheme 21:13:13 Usually, in MIT Scheme, ^G delivers SIGINT, which returns to the top-level REPL; ^C delivers SIGQUIT, which brings up an interactive interrupt prompt; and ^Z delivers SIGTSTP, which suspends Scheme. 21:13:53 Ah, it appears from the rlwrap manual that it's supposed to adapt to changes in what characters send what signals, it seems not to be handling it properly. 21:13:59 mheld, if J says that log(.3) is 1.09861, I'm not interested in that language 21:14:58 (but this . probably means something different from what I guess) 21:19:54 -!- phao [~phao@189.107.128.251] has quit [Read error: Connection reset by peer] 21:24:24 -!- _Pb [~pb@75.131.194.186] has quit [Quit: Leaving] 21:27:23 -!- gravicappa [~gravicapp@ppp85-141-166-221.pppoe.mtu-net.ru] has quit [Ping timeout: 265 seconds] 21:31:52 metasyntax`, I don't see how rlwrap finds out what the interrupt characters are when the child changes them. 21:32:42 -!- gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Ping timeout: 265 seconds] 21:35:24 mmc [~michal@109.117.173.9] has joined #scheme 21:36:13 Fare: that's the natural log 21:36:15 Riastradh: Not sure, but this subject is also starting to get out of my familiarity. The manual says vaguely: "If command changes the keystrokes that send a particular signal from the keyboard (like emacs, which uses CTRLG instead of CTRLC) rlwrap will do the same." 21:36:23 not log_10 21:36:52 Komi [Komi@62.32.153.39] has joined #scheme 21:37:13 Yes, metasyntax`, but I don't see where rlwrap is supposed to be informed that the slave pty's interrupt characters (or, more generally, termios attributes) have changed. 21:37:38 ^.3 is ln(3) in J 21:37:56 mheld, I don't care what log it is; any logarithm of a number in (0, 1) ought to be negative, not positive. 21:38:14 ^. is an operator 21:38:22 Riastradh: It's a syntactic misunderstanding. 21:38:32 so it's (^.) applied to 3 21:38:35 (Gee, how could anyone find J syntax unintuitive?) 21:38:57 ^.0.3 is ln(0.3) 21:39:20 yeah, I'm not too excited about the strangely terse syntax of J 21:40:06 (^.)(3),o_0`o7 21:40:53 well, I'm not fond of the horribly long syntax of scheme, even worse than CL because they lack generic functions and setf functions. 21:41:11 quicksort=: (($:@(<#[) , (=#[) , $:@(>#[)) ({~ ?@#)) ^: (1<#) 21:41:16 tell me that's not insane 21:41:47 that's not insane, it's simply schizoidic... 21:41:59 it looks like a very long, very strange looking fish 21:42:22 I can almost read that 21:42:33 $:@ is "recurse if not empty" ? 21:42:39 metasyntax`, a little more generally, I'm not sure how *any* program is supposed to be informed when someone does a tcsetattr on a slave pty fd. 21:42:50 Can anyone else here shed any light on the subject? 21:42:52 jsnikeris [~user@pool-98-114-61-170.phlapa.fios.verizon.net] has joined #scheme 21:42:54 hi all 21:43:09 I suppose this may not be the best place to seek Unix tty wizards... 21:43:18 mister_m [~matthew@c-71-201-6-9.hsd1.il.comcast.net] has joined #scheme 21:43:19 Riastradh, when I looked (long ago), I didn't find any obvious answer 21:43:33 OK. In that case, I guess the answer is `don't use rlwrap; use Emacs'. 21:45:21 Fare: I'm not sure how having or not having generic functions or SETF functions makes Scheme syntax long. I could equally say that Common Lisp is incredibly verbose because I have to write everything in CPS due to the lack of first-class continuations! It would be an equally vacuous statement. 21:45:43 presumably the sources for xterm must have the answer buried deep down inside 21:45:58 so I've got a bunch of things and each thing has a value associated to it. My problem is that I want to get the combination of things whose values when summed are closest to some given number 21:46:17 Basically, unix ttys are a mind-numbing cesspool of design lossage, except that there's nothing else that works as well and is as versatile. 21:46:29 Riastradh: Yeah, Emacs does a better job in M-x shell, I should probably give Edwin a go too. Thanks for having a look at the rlwrap weirdness. 21:46:35 chandler, first, with setf you don't need two sets of function names. Second, with generic functions, you don't need a new name for the same operation on data structure 21:46:41 there must be a name for this kind of problem, and a general way to solve them...any ideas? 21:46:42 for every data structure 21:47:06 Riastradh, lossage yes, design, I haven't found a trace of it 21:47:16 jsnikeris: knapsack problem? 21:47:19 phao [~phao@189.107.230.103] has joined #scheme 21:47:56 Close, but that's too specific 21:48:00 Fare, why would xterm need to know what the interrupt characters are? 21:48:27 Fare, you're right -- the word `design' has no place in my sentence. 21:48:33 Fare: Do you think I don't understand the expressive value of those features? Of course I do. 21:50:24 I have five apples with values {1, 3, 4, 5, 9}. And I must give up an amount of apples whose values are over 6. How do I know that the giving up the 1 and 5 apples are the best choice 21:51:34 aren't 1 and 5 less than 6? 21:51:41 the values summed up 21:52:04 whose values are 6 or over I should have said 21:52:05 you can create a graph and traverse it 21:52:48 how do I turn a set of key->value pairs into a graph 21:53:08 is there a better way than trying every combination? 21:53:27 keeping track of the closest set 21:53:32 that's the naive approach 21:53:35 I'm sure there's a better way 21:53:38 me too 21:53:40 -!- kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 245 seconds] 21:53:44 "An equivalent problem is this: given a set of integers and an integer s, does any non-empty subset sum to s? Subset sum can also be thought of as a special case of the knapsack problem." 21:54:15 apparently, you use epoll and get a POLLPRI event on your master pty then must use some ioctl to get to the data. 21:54:32 -!- phao [~phao@189.107.230.103] has quit [Ping timeout: 276 seconds] 21:54:41 -!- pdelgallego [~pdelgalle@1503031474.dhcp.dbnet.dk] has quit [Ping timeout: 258 seconds] 21:55:34 mauke: is that problem solvable in polynomial time? 21:55:43 it's NP-complete 21:55:50 using the TIOCPKT ioctl. Lovely, isn't it? 21:55:56 oh ok 21:56:11 -!- mmc [~michal@109.117.173.9] has quit [Ping timeout: 260 seconds] 21:57:02 so I'm out of luck? 21:58:39 -!- Fare [~Fare@c-24-218-127-11.hsd1.ma.comcast.net] has left #scheme 21:58:43 Fare [~Fare@c-24-218-127-11.hsd1.ma.comcast.net] has joined #scheme 22:03:29 -!- saccade_ [~saccade@BRAIN-AND-COG-THIRTY-EIGHT.MIT.EDU] has quit [Quit: Leaving] 22:04:24 -!- Thomas_H [~Thomas_H@66.183.224.178] has quit [Ping timeout: 276 seconds] 22:05:47 phao [~phao@189.107.218.119] has joined #scheme 22:05:53 kniu [~kniu@pool-71-106-4-84.lsanca.dsl-w.verizon.net] has joined #scheme 22:08:01 saccade_ [~saccade@BRAIN-AND-COG-THIRTY-EIGHT.MIT.EDU] has joined #scheme 22:16:56 Fare, I don't see any indication that under Linux, TIOCPKT will even deliver the right information to you. 22:17:52 -!- phao [~phao@189.107.218.119] has quit [Ping timeout: 240 seconds] 22:18:25 -!- hotblack23 [~jh@p57B5B7BB.dip.t-dialin.net] has quit [Quit: Leaving.] 22:20:53 metasyntax`, so, I have an idea of how to fix the bug...on NetBSD. 22:21:27 -!- somnium [~user@adsl-65-180-205.dab.bellsouth.net] has quit [Read error: Operation timed out] 22:22:04 It may also work on Linux, but I'm not sure. 22:24:00 at that point, reading the source code of a client that would already DTRT, and/or the kernel, is called for. 22:24:30 On reading NetBSD's source I didn't see anything obvious, although the TIOCPKT handling code is probably not far from where I looked. 22:25:32 I don't know of *any* program that does the right thing here, because I don't know of anything other than rlwrap and ledit that needs to do this, and I doubt whether ledit does the right thing. 22:25:54 ros3_ [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 22:27:34 you could keep the slave pty open and ioctl it to look at its parameters 22:27:42 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Read error: Connection reset by peer] 22:27:43 -!- ros3_ is now known as ros3 22:27:47 That's not the issue -- rlwrap already does that. 22:27:51 The issue is knowing when to do that. 22:28:05 as in? 22:28:41 at every input character? 22:30:39 rlwrap could do that, but then it would have to interpret the termios structure itself, and I think that would require a much more invasive restructuring of rlwrap's implementation. 22:31:11 schmir [~schmir@p54A91ACC.dip0.t-ipconnect.de] has joined #scheme 22:31:31 welcome to Unix API hell. 22:31:43 That is, it would have to put the user's tty into raw mode, read input from the user, fetch the pty slave fd's termios structure, and then interpret each character in terms of the termios structure. 22:31:48 But no, even that doesn't work! 22:32:17 If the child puts the pty slave fd into raw mode, rlwrap needs to know immediately. 22:33:30 Oh, I suppose that does work. 22:37:06 -!- zard1989 [~user@Joe.m4.ntu.edu.tw] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:38:43 metasyntax`, anyway, my theory is that it's rlwrap's fault for not magically figuring out information not supplied by the portable API about when the child has tcsetattr'd the pty slave fd. 22:40:13 phao [~phao@189.107.131.206] has joined #scheme 22:41:01 Oh, hey, I see TIOCPKT_IOCTL in Linux's tty_ioctl.c. 22:41:56 Riastradh, when the slave does that, you think the master should suddenly become transparent? 22:42:16 Sorry, when the slave does what? 22:42:28 put the pty in raw mode 22:42:54 When the pty slave fd is put into raw mode, the user's tty should be put into raw mode too. 22:45:20 -!- schmir [~schmir@p54A91ACC.dip0.t-ipconnect.de] has quit [Ping timeout: 245 seconds] 22:45:53 -!- mister_m [~matthew@c-71-201-6-9.hsd1.il.comcast.net] has quit [Remote host closed the connection] 22:46:47 and the existing buffer flushed? 22:47:02 wait until the line is done then flush? 22:47:19 It should behave however ttys normally behave for that. 22:49:19 Now, I don't know whether there is any way for rlwrap to know whether you passed TCSANOW, TCSADRAIN, or TCSAFLUSH to tcsetattr, but there *should* be. 22:49:37 Riastradh: FWIW ledit is worse than rlwrap because it always sends INT for C-c (like rlwrap does in the beginning) and it also doesn't handle QUIT (ledit just dies). 22:49:57 Not surprising. It's written in OCaml, so probably not written by a Unix weenie. 22:50:05 Consequently, it probably has a simplified view of the Unix world. 22:50:25 -!- masm [~masm@bl19-139-80.dsl.telepac.pt] has quit [Quit: Leaving.] 22:53:16 Well, you could be an ocaml hacker *and* a unix weenie. 22:54:34 -!- phao [~phao@189.107.131.206] has quit [Quit: Leaving] 22:54:58 Yes, but the intersection between the two is relatively small. 22:55:01 xleroy was giving the unix course in caml, back in the days 22:55:52 -!- stepnem [~stepnem@88.103.132.186] has quit [Read error: Connection reset by peer] 22:57:14 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Quit: ros3] 22:57:22 ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 22:59:10 stepnem [~stepnem@88.103.132.186] has joined #scheme 23:01:35 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Ping timeout: 245 seconds] 23:09:10 ASau [~user@83.69.227.32] has joined #scheme 23:11:04 frogscaleo [~frogscale@bl17-38-171.dsl.telepac.pt] has joined #scheme 23:11:44 hey, what book about scheme do you recommend? i dont have a strong math background (i am 15 year old), and i know C, and i use Linux 23:13:05 htdp.org 23:13:20 SICP is bad? 23:14:13 what are your goals? 23:15:49 build good programming basis, good programming style, learn how to improve my programming skill in problem solving 23:16:59 If you like SICP, go with it. 23:17:27 i dont know i am just asking 23:18:00 rottenrecords [~rottenrec@pool-108-13-54-97.lsanca.dsl-w.verizon.net] has joined #scheme 23:19:41 htdp will teach you how to program 23:19:51 sicp will teach you how to think about how to program 23:20:14 SICP is better if you already have strong math skills, I'd say 23:20:35 given your goals I'd say go for HTDP 23:20:38 but it's not as well organized for essential programming skills as HtDP or other such 23:21:03 If you were more interested in Computer Science rather than Programming, I'd say go with SICP 23:22:52 ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has joined #scheme 23:24:45 -!- ros3 [~roselynro@70-36-146-7.dsl.dynamic.sonic.net] has quit [Client Quit] 23:25:17 -!- rottenrecords [~rottenrec@pool-108-13-54-97.lsanca.dsl-w.verizon.net] has quit [Disconnected by services] 23:25:24 Apparently FreeBSD has taken TIOCPKT out. 23:25:42 rottenrecords [~rottenrec@pool-108-13-54-97.lsanca.dsl-w.verizon.net] has joined #scheme 23:29:19 -!- fradgers- [~fradgers-@5adafe9d.bb.sky.com] has quit [Remote host closed the connection] 23:37:18 metasyntax`, just to clarify: mapping ^C to SIGINT and ^\ to SIGQUIT is not xterm's doing but the kernel's doing when xterm (or rlwrap, or anyone) allocates a pty. See /usr/include/sys/ttydefaults.h on Linux or BSD for example. 23:38:04 bokr [~eduska@95-30-101-119.broadband.corbina.ru] has joined #scheme 23:38:17 (Also, it's usually `MIT/GNU Scheme', rather than `GNU/MIT Scheme'.) 23:38:24 (I don't know whether the / here is supposed to be commutative.) 23:39:24 -!- frogscaleo [~frogscale@bl17-38-171.dsl.telepac.pt] has quit [Quit: Saindo] 23:40:29 blame GNU/RMS for the meme :) 23:40:36 Riastradh: Oh, I see. Feel free to correct anything I might have said, I don't know a lot about terminals. And sorry about mixing up the name. 23:43:44 Riastradh: incidentally, is "MIT Scheme" an acceptable colloquialism or is that sort of like saying "Linux" by itself? 23:43:54 rottenrecords1 [~rottenrec@pool-108-13-54-97.lsanca.dsl-w.verizon.net] has joined #scheme 23:44:05 -!- rottenrecords [~rottenrec@pool-108-13-54-97.lsanca.dsl-w.verizon.net] has quit [Ping timeout: 245 seconds] 23:44:57 -!- rottenrecords1 is now known as rottenrecords 23:45:06 -!- kephas [~pierre@AStrasbourg-551-1-9-107.w86-213.abo.wanadoo.fr] has quit [Read error: Operation timed out] 23:45:23 kephas [~pierre@AStrasbourg-551-1-11-58.w86-213.abo.wanadoo.fr] has joined #scheme 23:49:05 Komii [Komi@83.231.20.63] has joined #scheme 23:49:19 -!- Komi [Komi@62.32.153.39] has quit [Disconnected by services] 23:49:22 -!- Komii is now known as Komi 23:53:26 metasyntax`, I usually say `MIT Scheme', and so does Chris. 23:54:14 It's different from GNU/Linux vs Linux because in that case, there are two separate parts -- the GNU userland and the Linux kernel. The name `MIT/GNU Scheme' arose only when MIT Scheme became a GNU project. 23:54:22 *Fare* thinks unix tty's and pty's are E-V-I-L. Everything a file my ass. 23:54:41 Everything *is* a file in Plan 9 ;) 23:58:26 Every userland-visible operating system resource, perhaps. 23:58:37 But I doubt even that. Are threads or processes files? 23:58:46 -!- mejja [~user@c-14bee555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote host closed the connection] 23:58:47 Of course. 23:58:55 As are network connections and your keyboard. 23:59:44 In what way are threads and processes files, other than that they are identified by small integers in the same space as file descriptors?