00:04:17 -!- joneshf-laptop [~joneshf@128.120.117.43] has quit [Ping timeout: 252 seconds] 00:11:40 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 00:11:57 annodomini [~lambda@173-14-129-9-NewEngland.hfc.comcastbusiness.net] has joined #scheme 00:11:57 -!- annodomini [~lambda@173-14-129-9-NewEngland.hfc.comcastbusiness.net] has quit [Changing host] 00:11:57 annodomini [~lambda@wikipedia/lambda] has joined #scheme 00:14:39 jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has joined #scheme 00:14:43 -!- jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has quit [Changing host] 00:14:43 jao [~jao@pdpc/supporter/professional/jao] has joined #scheme 00:16:24 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 252 seconds] 00:16:40 Sgeo [~quassel@ool-44c2df0c.dyn.optonline.net] has joined #scheme 00:18:07 zRecursive [~czsq888@183.12.36.242] has joined #scheme 00:19:37 -!- annodomini [~lambda@wikipedia/lambda] has quit [Quit: annodomini] 00:26:57 nisstyre [~yours@oftn/member/Nisstyre] has joined #scheme 00:50:04 -!- stepnem [~stepnem@internet2.cznet.cz] has quit [Read error: Operation timed out] 00:59:51 -!- hiroaki [~hiroaki@77-20-51-63-dynip.superkabel.de] has quit [Ping timeout: 260 seconds] 01:02:35 -!- DeathByDoubleDip [~DeathByDo@rrcs-76-79-65-218.west.biz.rr.com] has quit [Ping timeout: 260 seconds] 01:02:40 DeathByDoubleD-1 [~DeathByDo@157.254.210.30] has joined #scheme 01:07:03 -!- Okasu [~1@unaffiliated/okasu] has quit [Quit: leaving] 01:11:34 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 01:16:11 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 260 seconds] 01:17:41 bjz [~bjz@125.253.99.68] has joined #scheme 01:18:25 -!- githogori_ [~githogori@c-50-156-57-127.hsd1.ca.comcast.net] has quit [Ping timeout: 252 seconds] 01:22:21 -!- robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has quit [Remote host closed the connection] 01:23:27 -!- amgarching [~amgarchin@p4FD6386F.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 01:24:38 annodomini [~lambda@wikipedia/lambda] has joined #scheme 01:25:36 robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has joined #scheme 01:31:22 muteyknee [d8da860c@gateway/web/cgi-irc/kiwiirc.com/ip.216.218.134.12] has joined #scheme 01:32:11 -!- muteyknee [d8da860c@gateway/web/cgi-irc/kiwiirc.com/ip.216.218.134.12] has left #scheme 01:38:36 -!- DeathByDoubleD-1 [~DeathByDo@157.254.210.30] has quit [Quit: DeathByDoubleD-1] 01:47:22 arubin [~textual@99-114-192-172.lightspeed.cicril.sbcglobal.net] has joined #scheme 01:53:55 b4283 [~b4283@60-249-196-111.HINET-IP.hinet.net] has joined #scheme 01:56:12 -!- robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has quit [Read error: Connection reset by peer] 01:56:27 robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has joined #scheme 02:05:49 -!- annodomini [~lambda@wikipedia/lambda] has quit [Quit: annodomini] 02:07:33 jeapostrophe [~jay@c-50-148-72-199.hsd1.il.comcast.net] has joined #scheme 02:07:33 -!- jeapostrophe [~jay@c-50-148-72-199.hsd1.il.comcast.net] has quit [Changing host] 02:07:33 jeapostrophe [~jay@racket/jeapostrophe] has joined #scheme 02:08:23 Nizumzen [~Nizumzen@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 02:09:17 -!- Nizumzen [~Nizumzen@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Client Quit] 02:11:38 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 02:13:35 -!- mmc2 [~michal@j212115.upc-j.chello.nl] has quit [Ping timeout: 260 seconds] 02:13:40 Razz_ [~tim@kompiler.org] has joined #scheme 02:14:21 rdd` [~rdd@c83-250-157-59.bredband.comhem.se] has joined #scheme 02:14:23 antoszka_ [~antoszka@unaffiliated/antoszka] has joined #scheme 02:14:26 ivan\_ [~ivan@unaffiliated/ivan/x-000001] has joined #scheme 02:14:31 arrdem_ [~arrdem@dhcp-53-132.ece.utexas.edu] has joined #scheme 02:14:39 rotty_ [rotty@yade.xx.vu] has joined #scheme 02:14:58 -!- ivan\ [~ivan@unaffiliated/ivan/x-000001] has quit [Ping timeout: 272 seconds] 02:15:00 -!- tiksa [~tiksa@gateway/tor-sasl/tiksa] has quit [Ping timeout: 240 seconds] 02:15:01 -!- dje42 [~dje@173-13-178-53-sfba.hfc.comcastbusiness.net] has quit [Ping timeout: 272 seconds] 02:15:01 -!- estevocastro [~estevocas@95.85.29.193] has quit [Ping timeout: 272 seconds] 02:15:02 -!- rdd [~rdd@c83-250-157-59.bredband.comhem.se] has quit [Ping timeout: 272 seconds] 02:15:02 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Ping timeout: 272 seconds] 02:15:03 -!- stamourv` [~user@racket/stamourv] has quit [Ping timeout: 272 seconds] 02:15:04 -!- arrdem [~arrdem@dhcp-53-132.ece.utexas.edu] has quit [Ping timeout: 272 seconds] 02:15:05 -!- Razz [~tim@kompiler.org] has quit [Ping timeout: 272 seconds] 02:15:05 -!- chrisirc [~chrisirc@static.206.51.47.78.clients.your-server.de] has quit [Ping timeout: 272 seconds] 02:15:05 -!- blz37 [~minsa@99-73-166-221.lightspeed.sntcca.sbcglobal.net] has quit [Ping timeout: 272 seconds] 02:15:06 -!- rotty [rotty@yade.xx.vu] has quit [Remote host closed the connection] 02:16:00 -!- arrdem_ is now known as arrdem 02:16:17 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 265 seconds] 02:16:32 stamourv` [~user@ahuntsic.ccs.neu.edu] has joined #scheme 02:16:43 -!- ivan\_ is now known as ivan\ 02:16:49 DeathByDoubleDip [~DeathByDo@108-75-113-253.lightspeed.irvnca.sbcglobal.net] has joined #scheme 02:16:55 es [~estevocas@95.85.29.193] has joined #scheme 02:16:55 -!- es is now known as estevocastro 02:17:44 -!- kobain [~sambio@unaffiliated/kobain] has quit [Ping timeout: 265 seconds] 02:18:01 chrisirc [~chrisirc@static.206.51.47.78.clients.your-server.de] has joined #scheme 02:19:31 kobain [~sambio@unaffiliated/kobain] has joined #scheme 02:20:07 -!- arrdem is now known as grimoire 02:20:20 -!- grimoire is now known as arrdem 02:22:19 -!- yrdz [~p_adams@unaffiliated/p-adams/x-7117614] has quit [Quit: WeeChat 0.4.2] 02:22:42 -!- jeapostrophe [~jay@racket/jeapostrophe] has quit [Read error: Operation timed out] 02:25:38 -!- arrdem is now known as grimoire 02:25:43 blz37 [~minsa@99-73-166-221.lightspeed.sntcca.sbcglobal.net] has joined #scheme 02:25:52 -!- grimoire is now known as arrdem 02:29:56 vicenteH [~user@143.79.21.95.dynamic.jazztel.es] has joined #scheme 02:34:56 annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has joined #scheme 02:34:56 -!- annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has quit [Changing host] 02:34:56 annodomini [~lambda@wikipedia/lambda] has joined #scheme 02:35:19 -!- DeathByDoubleDip [~DeathByDo@108-75-113-253.lightspeed.irvnca.sbcglobal.net] has quit [Quit: DeathByDoubleDip] 02:50:58 yrdz [~p_adams@unaffiliated/p-adams/x-7117614] has joined #scheme 02:52:03 joneshf-laptop [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has joined #scheme 02:53:16 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 246 seconds] 03:05:35 c107 [~user@unaffiliated/c107] has joined #scheme 03:06:13 What do periods mean in Scheme? 03:11:33 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 03:16:18 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 252 seconds] 03:19:39 c107: isn't it a dotted pair? 03:20:00 idk though. someone else who knows can answer. :-) 03:20:53 zacts: (a . (b . (c . ()))) 03:27:34 weie [~weie@softbank221078042071.bbtec.net] has joined #scheme 03:29:09 Does petite support module ? 03:30:30 -!- pnkfelix [~pnkfelix@2620:101:8003:300:e853:f7cc:619d:3ef5] has quit [Ping timeout: 252 seconds] 03:34:29 -!- MichaelRaskin [~MichaelRa@195.91.224.161] has quit [Remote host closed the connection] 03:36:35 -!- ggrant [~user@75-132-18-215.dhcp.stls.mo.charter.com] has quit [Remote host closed the connection] 03:36:42 ggrant` [~user@75-132-18-215.dhcp.stls.mo.charter.com] has joined #scheme 03:48:19 githogori [~githogori@c-50-156-57-127.hsd1.ca.comcast.net] has joined #scheme 03:53:54 c107: (a . b) is a pair with a as car and b as cdr, whereas (a b) is a list with a as car, b as cadr, and '() as cddr 03:54:11 fire [~fire@unaffiliated/security] has joined #scheme 03:54:16 so (a . (b . (c . ()))) is the same as (a b c d) 03:54:32 oops (a b c) 03:54:38 no d anywhere :) 03:55:01 cadr, cddr? 03:55:26 aranhoide: guile-user mailing list said it equals (a b c) 03:55:28 cadr is the first element of the pair that is in the second element 03:55:38 -!- yrdz [~p_adams@unaffiliated/p-adams/x-7117614] has quit [Quit: WeeChat 0.4.2] 03:55:45 (cadr l) is the same as (car (cdr l)) 03:55:50 just an abbreviation 03:56:09 (cddr l) is the same as (cdr (cdr l)) 03:56:45 How is it possible to write (a . (b .)) without periods? 03:57:32 a list in Scheme is just a linked list of pairs, where each of the elements of the list is in the car of one of the pairs, and the cdrs refer to the next pair in the list 03:57:45 the last pair has cdr '() (the empty list) 03:58:50 so (a . (b . (c . ()))) is a pair that has a as the car and (b . (c . ())) as the cdr 03:59:18 where, in turn, (b . (c . ())) is a pair that has b as the car and (c . ()) as the cdr 03:59:31 etc. 03:59:56 (oh well, there's only one more step so:) 04:00:10 and (c . ()) is a pair with c as car and the empty list as cdr 04:00:17 (cdr 1 2 3) is 1, yes? 04:00:47 that isn't even the right way to call cdr 04:00:54 I get cdr, car nad cons mixed up. I never found a way to remember them long enough to use them in pratical code. 04:01:01 you call cdr with a single argument, which should be a pair 04:01:09 you're calling it with three numbers there 04:01:17 Dammit! 04:01:29 call them 'left' and 'right' then 04:02:11 _The Little Schemer_ said one of these were "the first item of a list." 04:02:32 cons is "make-pair", car is "left" and cdr is "right" 04:02:53 yes, that's car, but that is only true for pairs that are the beginning of lists 04:03:00 if you call (make-pair 1 2) 04:03:04 you get (1 . 2) 04:03:09 which is not a list 04:03:27 a list has the empty list as the last "right" element 04:03:47 -!- jao [~jao@pdpc/supporter/professional/jao] has quit [Ping timeout: 252 seconds] 04:04:12 so (make-pair 1 '()) gives you (1 . ()) which is the same as (1), the list that has only one element, namely 1 04:04:28 That's a disgusting impurity. I thought Lisp is done in nothing but lists. 04:05:43 Oh, well. 04:05:53 not really. there are atoms (numbers, strings, symbols), pairs that are not lists, and pairs that are part of lists 04:08:23 -!- nisstyre [~yours@oftn/member/Nisstyre] has quit [Ping timeout: 260 seconds] 04:08:25 if you find that disgusting, I wonder what programming language are you comparing it to ;) 04:11:42 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 04:11:46 -!- aranhoide [~aranhoide@49.Red-79-157-1.dynamicIP.rima-tde.net] has quit [Read error: Connection reset by peer] 04:15:00 MichaelRaskin [~MichaelRa@195.178.216.16] has joined #scheme 04:16:19 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 260 seconds] 04:20:12 bf? 04:21:40 nisstyre [~yours@oftn/member/Nisstyre] has joined #scheme 04:34:15 preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 04:34:38 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 240 seconds] 04:35:01 -!- preflex_ is now known as preflex 04:35:26 -!- karswell [~user@239.54.125.91.dyn.plus.net] has quit [Read error: Connection reset by peer] 04:35:41 karswell [~user@239.54.125.91.dyn.plus.net] has joined #scheme 04:36:23 -!- ggrant` [~user@75-132-18-215.dhcp.stls.mo.charter.com] has quit [Remote host closed the connection] 04:37:50 ggrant [~user@75-132-18-215.dhcp.stls.mo.charter.com] has joined #scheme 04:46:36 -!- fire [~fire@unaffiliated/security] has quit [Quit: WeeChat 0.4.1] 04:47:27 ASau` [~user@p5083D4B9.dip0.t-ipconnect.de] has joined #scheme 04:47:35 c107` [~user@72.135.98.184] has joined #scheme 04:52:04 minsa [~minsa@99-73-166-221.lightspeed.sntcca.sbcglobal.net] has joined #scheme 04:55:22 -!- c107 [~user@unaffiliated/c107] has quit [*.net *.split] 04:55:22 -!- blz37 [~minsa@99-73-166-221.lightspeed.sntcca.sbcglobal.net] has quit [*.net *.split] 04:55:22 -!- rdd` [~rdd@c83-250-157-59.bredband.comhem.se] has quit [*.net *.split] 04:55:23 -!- arubin [~textual@99-114-192-172.lightspeed.cicril.sbcglobal.net] has quit [*.net *.split] 04:55:23 -!- ASau [~user@p5083D4B9.dip0.t-ipconnect.de] has quit [*.net *.split] 04:55:24 -!- joneshf-work [~joneshf@c-98-238-144-159.hsd1.ca.comcast.net] has quit [*.net *.split] 04:57:10 rdd [~rdd@c83-250-157-59.bredband.comhem.se] has joined #scheme 04:57:11 arubin [~textual@99-114-192-172.lightspeed.cicril.sbcglobal.net] has joined #scheme 04:57:37 -!- ggrant [~user@75-132-18-215.dhcp.stls.mo.charter.com] has quit [Remote host closed the connection] 05:01:27 joneshf-work [~joneshf@c-98-238-144-159.hsd1.ca.comcast.net] has joined #scheme 05:06:41 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 05:07:26 -!- dan64 [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has quit [Ping timeout: 240 seconds] 05:07:59 -!- arubin [~textual@99-114-192-172.lightspeed.cicril.sbcglobal.net] has quit [Quit: Textual IRC Client: www.textualapp.com] 05:08:27 -!- annodomini [~lambda@wikipedia/lambda] has quit [Read error: Connection reset by peer] 05:09:17 -!- c107` [~user@72.135.98.184] has quit [Remote host closed the connection] 05:09:37 annodomini [~lambda@wikipedia/lambda] has joined #scheme 05:10:08 ggrant [~user@75-132-18-215.dhcp.stls.mo.charter.com] has joined #scheme 05:10:24 -!- zacts [~zacts@unaffiliated/zacts] has quit [Remote host closed the connection] 05:10:41 zacts [~zacts@unaffiliated/zacts] has joined #scheme 05:11:26 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 252 seconds] 05:11:40 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 05:13:08 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Read error: Connection reset by peer] 05:13:14 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 05:13:34 jeapostrophe [~jay@racket/jeapostrophe] has joined #scheme 05:18:54 -!- zacts [~zacts@unaffiliated/zacts] has quit [Quit: leaving] 05:21:59 zacts [~zacts@unaffiliated/zacts] has joined #scheme 05:23:55 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Remote host closed the connection] 05:33:33 -!- kobain [~sambio@unaffiliated/kobain] has quit [] 05:42:16 -!- annodomini [~lambda@wikipedia/lambda] has quit [Read error: Connection reset by peer] 05:42:28 annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has joined #scheme 05:42:28 -!- annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has quit [Changing host] 05:42:28 annodomini [~lambda@wikipedia/lambda] has joined #scheme 05:42:53 -!- jeapostrophe [~jay@racket/jeapostrophe] has quit [Read error: Operation timed out] 05:43:06 jeapostrophe [~jay@c-50-148-72-199.hsd1.il.comcast.net] has joined #scheme 05:43:06 -!- jeapostrophe [~jay@c-50-148-72-199.hsd1.il.comcast.net] has quit [Changing host] 05:43:06 jeapostrophe [~jay@racket/jeapostrophe] has joined #scheme 06:05:52 -!- oleo [~oleo@xdsl-78-35-174-200.netcologne.de] has quit [Quit: Leaving] 06:17:27 snits [~snits@inet-hqmc01-o.oracle.com] has joined #scheme 06:24:30 -!- jeapostrophe [~jay@racket/jeapostrophe] has quit [Read error: Operation timed out] 06:32:45 -!- hatFolk [~hatFolk@ip68-100-231-112.dc.dc.cox.net] has quit [Quit: Leaving] 06:36:55 -!- annodomini [~lambda@wikipedia/lambda] has quit [Quit: annodomini] 06:40:06 juxovec [~juxovec@viprinet-wan.sa.cz] has joined #scheme 06:45:16 -!- ehaliewicz [~user@50-0-51-28.dsl.static.sonic.net] has quit [Remote host closed the connection] 07:00:38 -!- hive-mind [pranq@unaffiliated/contempt] has quit [Ping timeout: 264 seconds] 07:13:13 hive-mind [pranq@unaffiliated/contempt] has joined #scheme 07:14:39 -!- ASau` is now known as ASau 07:20:11 -!- jlongster [~user@pool-173-53-114-190.rcmdva.fios.verizon.net] has quit [Ping timeout: 260 seconds] 07:26:37 FunkyDrummer [~RageOfTho@unaffiliated/rageofthou] has joined #scheme 07:38:02 jewel [~jewel@105-236-25-199.access.mtnbusiness.co.za] has joined #scheme 07:42:22 fire [~fire@unaffiliated/security] has joined #scheme 07:42:56 -!- juxovec [~juxovec@viprinet-wan.sa.cz] has quit [Remote host closed the connection] 07:43:23 juxovec [~juxovec@viprinet-wan.sa.cz] has joined #scheme 07:43:28 mmc1 [~michal@j212115.upc-j.chello.nl] has joined #scheme 07:45:16 jlongster [~user@pool-173-53-114-190.rcmdva.fios.verizon.net] has joined #scheme 07:48:16 juxovec_ [~juxovec@ip-37-188-227-144.eurotel.cz] has joined #scheme 07:48:33 -!- juxovec [~juxovec@viprinet-wan.sa.cz] has quit [Ping timeout: 272 seconds] 07:51:23 -!- jlongster [~user@pool-173-53-114-190.rcmdva.fios.verizon.net] has quit [Ping timeout: 252 seconds] 07:51:31 civodul [~user@gateway/tor-sasl/civodul] has joined #scheme 08:03:25 -!- mmc1 [~michal@j212115.upc-j.chello.nl] has quit [Read error: Operation timed out] 08:14:10 -!- antoszka_ is now known as antoszka 08:21:49 -!- juxovec_ [~juxovec@ip-37-188-227-144.eurotel.cz] has quit [Read error: Connection reset by peer] 08:24:12 -!- Fare [fare@nat/google/x-hnvbdiyjkdxzwtjr] has quit [Ping timeout: 252 seconds] 08:28:36 -!- vicenteH [~user@143.79.21.95.dynamic.jazztel.es] has quit [Read error: Operation timed out] 08:28:53 -!- ivan\ [~ivan@unaffiliated/ivan/x-000001] has quit [Ping timeout: 252 seconds] 08:33:52 -!- snits [~snits@inet-hqmc01-o.oracle.com] has quit [Remote host closed the connection] 08:34:29 dan64 [dan64@dannyadam.com] has joined #scheme 08:36:45 ivan\ [~ivan@unaffiliated/ivan/x-000001] has joined #scheme 08:39:55 ogamita [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has joined #scheme 08:40:07 snits [~snits@75-167-8-215.phnx.qwest.net] has joined #scheme 08:40:26 -!- yosafbridge [~yosafbrid@li125-242.members.linode.com] has quit [Ping timeout: 264 seconds] 08:42:25 yosafbridge [~yosafbrid@li125-242.members.linode.com] has joined #scheme 08:48:18 tiksa [~tiksa@gateway/tor-sasl/tiksa] has joined #scheme 08:48:26 juxovec [~juxovec@ip-37-188-227-144.eurotel.cz] has joined #scheme 08:50:17 przl [~przlrkt@p57922A29.dip0.t-ipconnect.de] has joined #scheme 08:51:28 stepnem [~stepnem@internet2.cznet.cz] has joined #scheme 08:59:42 -!- juxovec [~juxovec@ip-37-188-227-144.eurotel.cz] has quit [Read error: Connection reset by peer] 09:01:19 -!- przl [~przlrkt@p57922A29.dip0.t-ipconnect.de] has quit [Ping timeout: 265 seconds] 09:01:20 juxovec [~juxovec@ip-37-188-227-144.eurotel.cz] has joined #scheme 09:15:34 Fare [~fare@cpe-72-229-109-116.nyc.res.rr.com] has joined #scheme 09:15:48 How to transfer Guile code "(define (qachina) (make-thread (system "cd /media/D/qachina; ./start.bat")))" to chez petite ? 09:26:02 -!- Fare [~fare@cpe-72-229-109-116.nyc.res.rr.com] has quit [Ping timeout: 264 seconds] 09:28:25 -!- zRecursive [~czsq888@183.12.36.242] has left #scheme 09:34:50 przl [~przlrkt@62.217.45.197] has joined #scheme 09:39:43 -!- ggrant [~user@75-132-18-215.dhcp.stls.mo.charter.com] has quit [Read error: Connection reset by peer] 09:49:17 vicenteH [~user@194.224.13.58] has joined #scheme 10:00:44 -!- fire [~fire@unaffiliated/security] has quit [Ping timeout: 252 seconds] 10:01:27 juxovec_ [~juxovec@ip-37-188-227-144.eurotel.cz] has joined #scheme 10:05:04 -!- juxovec_ [~juxovec@ip-37-188-227-144.eurotel.cz] has quit [Read error: Connection reset by peer] 10:05:21 -!- juxovec [~juxovec@ip-37-188-227-144.eurotel.cz] has quit [Ping timeout: 272 seconds] 10:06:08 vraid [d91bbc5a@gateway/web/freenode/ip.217.27.188.90] has joined #scheme 10:08:41 Demetrius [~kushnaryo@86.57.158.98] has joined #scheme 10:37:38 -!- przl [~przlrkt@62.217.45.197] has quit [Quit: leaving] 10:37:48 przl [~przlrkt@62.217.45.197] has joined #scheme 10:54:15 amgarching [~amgarchin@p4FD63A15.dip0.t-ipconnect.de] has joined #scheme 11:02:18 juxovec [~juxovec@ip-37-188-227-144.eurotel.cz] has joined #scheme 11:05:45 -!- b4283 [~b4283@60-249-196-111.HINET-IP.hinet.net] has quit [Quit: Konversation terminated!] 11:06:25 I just realized I have no idea how, in a language with first-class functions, functions created at run-time are compiled. 11:06:39 -!- juxovec [~juxovec@ip-37-188-227-144.eurotel.cz] has quit [Read error: Connection reset by peer] 11:07:14 I'll explain how Perl's work, because I know that. I imagine most Scheme impls are mostly the same. 11:08:14 When you do a my $code = sub { some body here }; [that's basically like (define code (lambda () (body here...)))] at compiletime, the body code is still compiled into an optree, wrapped in a special type of function called a protosub. 11:08:24 Given (define (make-proc foo) (lambda () (use foo))), I suppose the inner lambda is somehow turned into an "incomplete" compiled procedure, where for every call to `make-proc' a new completed version with the "holes filled in" is returned ? 11:09:00 Later, at runtime if that line of code is executed, the sub ... expression itself is turned into a real anon code, by making a new code object with its own lexical environment, but just copying the optree of the protosub into it 11:09:33 Silly me, forgetting about linked lexical environments. 11:09:41 -!- offby1 [~user@pdpc/supporter/monthlybyte/offby1] has quit [Remote host closed the connection] 11:09:53 Confuscious he say: to obtain closure you must consider your function and environment 11:09:54 Thanks. 11:10:04 offby1` [~user@ec2-54-215-10-197.us-west-1.compute.amazonaws.com] has joined #scheme 11:10:53 So in an impl with linked lex envs, this "filling in the holes" is just linking the new parent environment; with flat closures and such it might be a bit more complicated but I guess there's nothing particularly interesting there either. 11:11:31 How would that be any different? 11:11:57 In that case you'd actually fill some holes in the flat bytestream that is the procedure. :P 11:12:18 A little bit less trivial than just adding a parent environment, I imagine. 11:12:24 But as I said, nothing interesting there. 11:13:49 Well, the way Perl's works is that every piece of code is the combination of two things; the optree, and the pad. The pad (short for scratchpad) is a vector of mutable variable slots, to store the actual lexicals and other temporaries. The optree itself just keeps index numbers into that pad. 11:14:18 The optree itself then is immutable once compiled; its pad indexes all refer to slots of the pad of whichever code is actually being executed. 11:14:59 When returning functions from a function, the linking of the optree and pad is done at run-time for each returned function, right ? 11:15:06 For each call to the function that returns a new function. 11:16:24 The interesting question is about optimization: given (make-proc ), an optimizer can easily do partial-application and then specialize the lambda to be returned for the type of the constant, no compile-time linking or filling-in-holes is done; however if the argument is not easily decidable at compile-time, then an unspecialized/unoptimized procedure will be returned every time. 11:18:02 vishesh [~vishesh@122.177.49.48] has joined #scheme 11:18:37 Assume (define (make-add5 number) (+ 5 number)), and the call (make-add5 foo) in the code where foo is unknown before run-time; at run-time this will return a procedure where the `+' has to do a type-check on foo every time the returned procedure is called. 11:19:26 Whereas it could as well have returned a procedure where the + is fully optimized, freed from a type-check, etc. 11:20:27 You'll need to do some "run-time, procedure-to-environment-linking-time" optimization; I wonder if this is a well-known optimization, and how many implementations do it ... 11:22:42 A procedure is generally called many more times than it is created, so while the optimization is done at run-time and induces overhead, chances are it will yield significant speed improvements. 11:23:18 Creating procedures rapidly is probably uncommon and will rarely be a bottleneck. 11:28:26 -!- przl [~przlrkt@62.217.45.197] has quit [Quit: leaving] 11:33:14 przl [~przlrkt@62.217.45.197] has joined #scheme 11:37:47 zRecursive [~czsq888@183.12.36.242] has joined #scheme 11:44:35 Well, the whole reason I started to think about this was that I realized that in Guile, (define my-proc (let ((priv-binding toplevel-binding)) (lambda () (use priv-binding)))) binds `priv-binding' to `toplevel-binding' at module-loading time and not compile-time, hence misses all the typical optimizations the same way using `toplevel-binding' directly would have (because toplevels are all mutable in Guile; the priv-binding does not see 11:44:35 those mutations but still doesn't get optimized). 11:46:12 Heather [~Heather@gentoo/developer/cynede] has joined #scheme 11:46:15 hi 11:46:31 o/ 11:46:33 So the question would be whether to allow some special static-import form that imports a toplevel from another module at compile-time so uses of it can be optimized, or whether to implement run-time/procedure-creation-time optimizations so said optimizations can be achieved through a private copy of the toplevel binding. 11:46:40 \o 11:46:44 how to get string from regexp ? 11:47:01 I've got given: '(#"Association of Zoos and Aquariums") 11:47:03 How to convert Guile code "(define (str2lst str) (map (lambda(c) (string->number c)) (string-split str #\space)))" to petite ? 11:47:05 Heather: Standard Scheme has no regexps. (Or does R6RS ?) 11:47:13 taylanub in racket... 11:47:29 Heather: There's #racket. Also, before they tell you to, "RTFM" ;) 11:47:54 taylanub well I will be glad to be pointed to right TFM 11:48:15 Heather: Did you Google "racket regexp" ? :P 11:48:19 Heather: '(#"Association of Zoons and Aquariums") is a list of one object, which is a byte string containing the given text. 11:48:21 taylanub sure 11:48:37 The key is (string-split str #\space) no standard way ? 11:48:48 Heather: And you didn't find http://docs.racket-lang.org/reference/regexp.html ? 11:49:02 taylanub I did 11:49:09 taylanub but that didn't helped much 11:49:24 davexunit [~user@fsf/member/davexunit] has joined #scheme 11:49:34 OK then sorry for wasting time, I assumed it would be easy to find there. 11:49:35 taylanub because http://docs.racket-lang.org/reference/regexp.html#%28def._%28%28quote._~23~25kernel%29._regexp-match~3f%29%29 it says it returns boolean 11:49:36 http://tinyurl.com/mmmerds 11:49:59 taylanub and I've got regexp-match* ... e.g. with * ... and it returns result ... 11:50:04 zRecursive: Which of the procedures you use aren't supported in petite ? 11:50:08 rudybot: (define foo '(#"Association of Zoos and Aquariums")) 11:50:09 cky: your sandbox is ready 11:50:09 cky: Done. 11:50:12 taylanub I'm currently in confusion there 11:50:16 taylanub: (string-split str #\space) 11:50:23 rudybot: (bytes->string/utf8 (car foo)) 11:50:23 cky: error: bytes->string/utf8: undefined; cannot reference an identifier before its definition in module: 'program 11:50:32 rudybot: (bytes->string/utf-8 (car foo)) 11:50:32 cky: ; Value: "Association of Zoos and Aquariums" 11:50:40 Heather: ^ Does that help? 11:50:48 zRecursive: Implement it in terms of other string procedures it supports ? 11:50:58 cky (bytes->string/utf-8 (car foo)) ? 11:51:10 Yes, where foo is the object you gave. 11:51:21 taylanub: guile needs (use-modules (ice-9 common-list)) 11:52:01 zRecursive: Sorry ? 11:52:06 cky yes... it helped 11:52:13 cky thanks ! 11:52:18 Cool. :-) 11:53:55 hiroaki [~hiroaki@p548319BC.dip0.t-ipconnect.de] has joined #scheme 11:56:27 So, I'm reading R7RS, and it talks about how if you call map, for-each, etc., it's an error if all the given lists are circular. Certainly, I can understand in the case of map, it could cause unconstrained memory allocation for the out list. But in for-each, surely it's just the equivalent of an endless loop, that you can break out of by either throwing an exception or calling a continuation? 11:59:17 I cannot imagine any implementation where the behaviour is undefined in that case. 12:03:42 I want to match and tag. but <([/])b> only matches closing one, anyone got ideas how to handle open too in that way? :) 12:03:59 Heather: 12:04:08 oh 12:04:12 cky thanks 12:04:15 :-) 12:04:29 -!- przl [~przlrkt@62.217.45.197] has quit [Ping timeout: 252 seconds] 12:06:16 Of course, my aim is to get the text "The lists can be circular, but it is an error if all of them are circular." struck out from the for-each description, but I am keen to hear from others if that's actually a bad idea, and why. 12:06:41 -!- hiroaki [~hiroaki@p548319BC.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 12:08:01 I see jcowan isn't currently here. I hope he reads the channel logs. :-) 12:14:40 cky another question :) how to replace "?" ? 12:17:11 -!- amgarching [~amgarchin@p4FD63A15.dip0.t-ipconnect.de] has quit [Read error: Operation timed out] 12:18:25 e.g. match 12:19:13 -!- clog [~nef@bespin.org] has quit [Ping timeout: 246 seconds] 12:19:47 found ! 12:19:51 it's [?] 12:22:23 mmc1 [~michal@sams-office-nat.tomtomgroup.com] has joined #scheme 12:25:25 Heather: You normally shouldn't be using regexps on XML. 12:26:07 Heather: And it's \?, which in a string will be "\\?" (so there really is a backslash in the string and the regexp engine sees it), though [?] works too. 12:29:50 taylanub I was trying \? and it doesn't work on racket 12:30:57 przl [~przlrkt@62.217.45.197] has joined #scheme 12:31:23 Heather: Try \\? then. One or the other should work. Yes, [?] works too but many programmers prefer to use \? instead. 12:31:56 cky well, I'm fine with [?]... thought it's ok to just stick with it 12:32:00 juxovec [~juxovec@37.188.227.144] has joined #scheme 12:32:21 Okay. 12:32:24 taylanub: http://stackoverflow.com/a/1732454/13 12:47:32 -!- zRecursive [~czsq888@183.12.36.242] has left #scheme 12:48:17 -!- juxovec [~juxovec@37.188.227.144] has quit [Remote host closed the connection] 12:48:45 juxovec [~juxovec@94.143.234.231] has joined #scheme 12:56:02 -!- davexunit [~user@fsf/member/davexunit] has quit [Quit: Later] 12:59:16 amgarching [~amgarchin@p4FD63A15.dip0.t-ipconnect.de] has joined #scheme 13:01:59 -!- Sgeo [~quassel@ool-44c2df0c.dyn.optonline.net] has quit [Read error: Connection reset by peer] 13:11:33 b4283 [~b4283@218-164-214-248.dynamic.hinet.net] has joined #scheme 13:12:03 -!- amgarching [~amgarchin@p4FD63A15.dip0.t-ipconnect.de] has quit [Ping timeout: 260 seconds] 13:17:33 -!- Heather [~Heather@gentoo/developer/cynede] has quit [Quit: see you] 13:27:54 -!- SeySayux [SeySayux@libsylph/developer/seysayux] has quit [Ping timeout: 253 seconds] 13:31:36 SeySayux [SeySayux@libsylph/developer/seysayux] has joined #scheme 13:38:22 -!- vicenteH [~user@194.224.13.58] has quit [Read error: Operation timed out] 13:38:53 -!- jewel [~jewel@105-236-25-199.access.mtnbusiness.co.za] has quit [Quit: Leaving] 13:39:30 davexunit [~user@38.104.7.18] has joined #scheme 13:52:32 cky: Haha, know that one. 13:57:10 -!- juxovec [~juxovec@94.143.234.231] has quit [Remote host closed the connection] 13:57:21 juxovec [~juxovec@94.143.234.231] has joined #scheme 14:11:43 -!- juxovec [~juxovec@94.143.234.231] has quit [Remote host closed the connection] 14:11:50 juxovec [~juxovec@94.143.234.231] has joined #scheme 14:14:17 vicenteH [~user@143.79.21.95.dynamic.jazztel.es] has joined #scheme 14:14:53 gravicappa [~gravicapp@ppp85-141-231-81.pppoe.mtu-net.ru] has joined #scheme 14:15:31 -!- przl [~przlrkt@62.217.45.197] has quit [Ping timeout: 272 seconds] 14:16:39 -!- juxovec [~juxovec@94.143.234.231] has quit [Remote host closed the connection] 14:21:45 edw [~user@207.239.61.34] has joined #scheme 14:23:11 annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has joined #scheme 14:23:11 -!- annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has quit [Changing host] 14:23:11 annodomini [~lambda@wikipedia/lambda] has joined #scheme 14:23:34 Nizumzen [~Nizumzen@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 14:29:29 juxovec [~juxovec@94.143.234.231] has joined #scheme 14:29:33 oleo [~oleo@xdsl-78-35-185-48.netcologne.de] has joined #scheme 14:30:22 clog [~nef@bespin.org] has joined #scheme 14:32:24 -!- annodomini [~lambda@wikipedia/lambda] has quit [Quit: annodomini] 14:36:29 -!- metasyntax` [~tvenable@proxy5.med-web.com] has quit [Quit: Leaving] 14:37:03 -!- b4283 [~b4283@218-164-214-248.dynamic.hinet.net] has quit [Ping timeout: 272 seconds] 14:41:32 przl [~przlrkt@62.217.45.197] has joined #scheme 14:41:55 SwashBuckla [daedra@urika.azquelt.co.uk] has joined #scheme 14:42:15 Any idea what scheme I should use for working through the examples in The Little Schemer? 14:43:26 -!- Demetrius [~kushnaryo@86.57.158.98] has quit [Quit: Leaving] 14:43:59 -!- MichaelRaskin [~MichaelRa@195.178.216.16] has quit [Quit: MichaelRaskin] 14:46:25 -!- przl [~przlrkt@62.217.45.197] has quit [Ping timeout: 265 seconds] 14:52:08 guile, racket, drscheme, chicken... 14:53:00 SwashBuckla: If it doesn't specify one, I guess any will do. Often Racket is recommended for teaching AFAIK, but maybe that's just for HtdP and SICP. I personally like Guile because it's GNU. 14:53:16 -!- vishesh [~vishesh@122.177.49.48] has quit [Ping timeout: 265 seconds] 14:53:43 b4283 [~b4283@114-39-254-241.dynamic.hinet.net] has joined #scheme 14:55:03 metasyntax [~tvenable@proxy5.med-web.com] has joined #scheme 15:00:01 if only I knew scheme enough to write the interpreter taught at the back of The Little Schemer :P 15:00:54 the last chapter runs you through the implementation of an interpreter capable of evaluating most of the expressions in the book 15:01:19 (but I'd need to compile it with something... so I guess that wouldn't work) 15:01:31 przl [~przlrkt@62.217.45.197] has joined #scheme 15:03:27 -!- Nizumzen [~Nizumzen@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 15:14:14 -!- gnomon_ is now known as gnomon 15:15:03 -!- ASau [~user@p5083D4B9.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 15:20:42 -!- offby1` is now known as offby1 15:21:01 -!- offby1 [~user@ec2-54-215-10-197.us-west-1.compute.amazonaws.com] has quit [Changing host] 15:21:01 offby1 [~user@pdpc/supporter/monthlybyte/offby1] has joined #scheme 15:26:35 -!- _5kg [~zifeitong@60.191.2.238] has quit [K-Lined] 15:27:10 tupi [~user@189.60.18.177] has joined #scheme 15:27:24 ASau [~user@p54AFE77D.dip0.t-ipconnect.de] has joined #scheme 15:33:36 -!- Kneferilis [~Kneferili@nb1-210.static.cytanet.com.cy] has quit [Read error: Connection reset by peer] 15:36:40 -!- juxovec [~juxovec@94.143.234.231] has quit [Remote host closed the connection] 15:38:12 juxovec [~juxovec@94.143.234.231] has joined #scheme 15:39:13 jewel [~jewel@105-236-25-199.access.mtnbusiness.co.za] has joined #scheme 15:42:50 -!- juxovec [~juxovec@94.143.234.231] has quit [Ping timeout: 264 seconds] 15:49:08 -!- taylanub is now known as RavioliDog 15:49:12 peterhil [~peterhil@dsl-hkibrasgw3-58c156-108.dhcp.inet.fi] has joined #scheme 15:49:23 -!- peterhil [~peterhil@dsl-hkibrasgw3-58c156-108.dhcp.inet.fi] has quit [Remote host closed the connection] 15:57:45 -!- RavioliDog is now known as taylanub 15:58:14 annodomini [~lambda@173-14-129-9-NewEngland.hfc.comcastbusiness.net] has joined #scheme 15:58:14 -!- annodomini [~lambda@173-14-129-9-NewEngland.hfc.comcastbusiness.net] has quit [Changing host] 15:58:14 annodomini [~lambda@wikipedia/lambda] has joined #scheme 16:00:31 -!- joneshf-laptop [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has quit [Ping timeout: 260 seconds] 16:07:52 DeathByDoubleDip [~DeathByDo@108-75-113-253.lightspeed.irvnca.sbcglobal.net] has joined #scheme 16:08:08 tcsc [~tcsc@c-76-127-240-20.hsd1.ct.comcast.net] has joined #scheme 16:11:29 -!- b4283 [~b4283@114-39-254-241.dynamic.hinet.net] has quit [Quit: ] 16:13:51 -!- tcsc [~tcsc@c-76-127-240-20.hsd1.ct.comcast.net] has quit [Quit: computer sleeping] 16:17:42 MichaelRaskin [~MichaelRa@195.91.224.161] has joined #scheme 16:29:27 juxovec [~juxovec@88.131.62.43] has joined #scheme 16:30:50 -!- przl [~przlrkt@62.217.45.197] has quit [Ping timeout: 264 seconds] 16:32:11 vishesh [~vishesh@103.30.140.128] has joined #scheme 16:34:13 -!- DeathByDoubleDip [~DeathByDo@108-75-113-253.lightspeed.irvnca.sbcglobal.net] has quit [Quit: DeathByDoubleDip] 17:00:23 -!- vishesh [~vishesh@103.30.140.128] has quit [Ping timeout: 252 seconds] 17:02:23 sheilong [~sabayonus@unaffiliated/sheilong] has joined #scheme 17:16:27 -!- snits [~snits@75-167-8-215.phnx.qwest.net] has quit [Read error: Operation timed out] 17:19:27 Okasu [~1@unaffiliated/okasu] has joined #scheme 17:21:58 taylanub: MIT Scheme and Kawa are technically GNU too. ;-) 17:21:58 -!- juxovec [~juxovec@88.131.62.43] has quit [Remote host closed the connection] 17:22:24 snits [~snits@inet-hqmc08-o.oracle.com] has joined #scheme 17:24:07 juxovec [~juxovec@88.131.62.43] has joined #scheme 17:25:26 -!- mmc1 [~michal@sams-office-nat.tomtomgroup.com] has quit [Ping timeout: 264 seconds] 17:26:02 vishesh [~vishesh@103.30.140.128] has joined #scheme 17:26:02 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 264 seconds] 17:26:14 -!- juxovec [~juxovec@88.131.62.43] has quit [Remote host closed the connection] 17:33:56 -!- civodul [~user@gateway/tor-sasl/civodul] has quit [Remote host closed the connection] 17:42:58 theseb [~cs@74.194.237.26] has joined #scheme 17:43:11 i know why (car (1 2)) bombs....you need a quote 17:44:05 should this bomb for the same reason?... (map car '( (1 2) (3 4) )) ? 17:44:22 i would have thought you needed (map car '( '(1 2) '(3 4) )) 17:44:59 -!- vraid [d91bbc5a@gateway/web/freenode/ip.217.27.188.90] has quit [Ping timeout: 272 seconds] 17:46:59 theseb: No, `quote' quotes the whole s-expression (tree). 17:51:19 taylanub: yes....maybe my understanding of map is wrong....i thought it applied car to every element of the list 17:51:31 taylanub: where "applied" means evaluate no? 17:51:48 taylanub: and when (1 2) gets evaluated it will bomb!? but it does NOT in guile! 17:52:25 przl [~przlrkt@p57922A29.dip0.t-ipconnect.de] has joined #scheme 17:57:21 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 17:59:12 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 17:59:39 tcsc [~tcsc@c-76-127-240-20.hsd1.ct.comcast.net] has joined #scheme 18:01:42 -!- nisstyre [~yours@oftn/member/Nisstyre] has quit [Ping timeout: 252 seconds] 18:05:58 pnkfelix [~pnkfelix@guest-nat.p2p.sfo1.mozilla.com] has joined #scheme 18:06:47 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 245 seconds] 18:07:47 theseb: Apply doesn't mean evaluate. 18:08:10 Apply just means .. execute the procedure, on the given arguments. 18:08:15 taylanub: ug...i've heard of apply but never understood the diff with eval 18:08:34 taylanub: so the only diff is eval first evals all the elements of the expression and apply does not? 18:08:42 theseb: Forget about eval, pretend it doesn't exist. 18:08:46 theseb: Evaluation is something that happens by default. 18:09:23 theseb: Eval takes data, interprets it as a program, i.e. the same thing your Scheme implementation does in first place. 18:09:45 So using `eval' in code is like creating a second layer of code. 18:10:21 `apply' takes a procedure, and a list of arguments, and executes the procedure on those arguments. 18:11:26 `apply` is the Lisp/Scheme equivalent of "splatting" arguments in Python or Ruby, if you've used either of those languages. 18:11:32 taylanub: is apply a genuine scheme command like eval? 18:11:34 pnpuff [~harmonic@unaffiliated/pnpuff] has joined #scheme 18:11:39 When you do (foo bar baz), then all three of foo, bar, and baz are evaluated (automatically), e.g. if they're variables they're referenced, so you end up with something like e.g. ( ), then is executed on those two objects. 18:11:43 theseb: Yes, but don't use it. 18:11:48 cky: i've use python for 10 years but never heard of "splatting" :) 18:11:50 Uh, don't use eval, I mean. 18:11:53 Yes, and it's a procedure itself. 18:12:03 theseb: foo(bar, *baz) 18:12:03 fedoseynko [~fedoseynk@193.28.144.115] has joined #scheme 18:12:13 cky: apply sounds like just "function invocation" in python 18:12:21 theseb: The *baz is a splatting application. 18:12:34 theseb: In Scheme you'd write that as (apply foo bar baz) 18:12:37 cky: *baz iirc is used for arbitrary number of args 18:12:45 Yes. And that's what `apply` does. 18:13:07 (apply foo (bar . baz)) 18:13:19 cky: whoa...wait....but my original example had nothing to do with arbitrary numbers of args 18:13:21 The bar is a normal positional argument in that (python) call 18:13:28 LeoNerd: yes 18:13:31 amgarching [~amgarchin@p4FD63A15.dip0.t-ipconnect.de] has joined #scheme 18:13:33 So say, in Python, you have baz = [1,2,3], then call foo(bar, *baz). That is the same as calling foo(bar, 1, 2, 3). 18:13:43 -!- fedoseynko [~fedoseynk@193.28.144.115] has quit [Remote host closed the connection] 18:13:52 cky: ah 18:13:53 theseb: In Scheme, if baz is a list with arguments (1 2 3), then calling (apply foo bar baz) is like calling (foo bar 1 2 3). 18:13:55 Normally the variable `apply' holds the apply procedure, so you can do (apply foo (list bar baz)), which ends up being something like ( ( )), and the code of is so that it takes its first argument, here, and its second argument which must be a list, holding the bar and baz objects here, and applies the function to those. 18:14:06 (foo bar baz) = (apply (list bar baz)) 18:14:12 er 18:14:12 (foo bar baz) = (apply foo (list bar baz)) 18:14:19 wow....this convo ended up differently than i was imagining 18:14:37 previously i thought it was lame that lisp differentiated between eval and apply 18:14:37 Lol. 18:14:43 -!- przl [~przlrkt@p57922A29.dip0.t-ipconnect.de] has quit [Ping timeout: 265 seconds] 18:14:49 even the SICP book has both on the cover 18:14:56 Yeah, `eval` and `apply` are _totally_ different beasts. 18:19:42 theseb: Forget about `quote' for now. Start with `list' (or even better, `cons' and `empty'). 18:20:31 And ignore `eval' for now. 18:21:02 theseb: http://www.ccs.neu.edu/home/matthias/HtDP2e/part_two.html 18:21:29 yeah: eval and apply are a sort of Maxwell's equations of software... even if this is not formally correct 18:21:51 theseb: Once you understand that part, and only then, read the intermezzo after that (about quote). 18:23:46 pnpuff: funny you should mention that.....that quote by Alan Kay is one of my all time favorites 18:24:03 dulcis in fundo: a pair... the universe's building block... 18:24:36 pnpuff: i liked it soo much i even named my little lisp dialect maxwell.....https://bitbucket.org/seberino/maxwell 18:24:55 pnpuff: and added the quote to my blog...so it is VERY amusing you mentioned it :) 18:24:56 hiroaki [~hiroaki@77-20-51-63-dynip.superkabel.de] has joined #scheme 18:25:57 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Remote host closed the connection] 18:30:22 -!- pnpuff [~harmonic@unaffiliated/pnpuff] has left #scheme 18:33:55 -!- ogamita [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has quit [Ping timeout: 272 seconds] 18:33:58 przl [~przlrkt@p57922A29.dip0.t-ipconnect.de] has joined #scheme 18:34:00 -!- przl [~przlrkt@p57922A29.dip0.t-ipconnect.de] has quit [Client Quit] 18:37:19 -!- SwashBuckla [daedra@urika.azquelt.co.uk] has left #scheme 18:40:01 -!- hiroaki [~hiroaki@77-20-51-63-dynip.superkabel.de] has quit [Ping timeout: 246 seconds] 18:46:05 DeathByDoubleDip [~DeathByDo@rrcs-76-79-65-218.west.biz.rr.com] has joined #scheme 18:46:44 mmc1 [~michal@j212115.upc-j.chello.nl] has joined #scheme 18:50:40 DeathByDoubleD-1 [~DeathByDo@157.254.210.30] has joined #scheme 18:53:02 -!- DeathByDoubleDip [~DeathByDo@rrcs-76-79-65-218.west.biz.rr.com] has quit [Ping timeout: 264 seconds] 18:54:21 manamonghippos [~ManAmongH@164.111.192.161] has joined #scheme 18:54:48 How can I differentiate between a constant and an expression or variable in a define-syntax macro? 18:55:16 manamonghippos: Eh? 18:55:44 manamonghippos: Remember, macros see the syntax only, it doesn't know "expressions" or "variables". You do have identifiers and other syntax objects, though. 18:56:18 manamonghippos: I think the best thing is to think about what kind of inputs and outputs you want to have in your macro. 18:56:35 If you draft up some use cases, it'd be easier to figure out what kind of macro you should write. 18:57:41 cky: here's my code http://paste.lisp.org/display/140846 18:57:52 (Also, there's no such thing as a "define-syntax" macro. define-syntax simply installs a syntax transformer, and the syntax transformer can be of a variety of types, like syntax-rules, syntax-case, etc.) 18:57:54 cky: It obviously doesn't work but maybe it'll help explain what I'm trying to do. 18:57:59 *cky* takes a look. 18:58:41 cky: I'm trying to "simplify" mathematical expressions in s-expr format 18:59:29 manamonghippos: Can you give me some sample inputs and some sample expected outputs? 19:00:29 jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has joined #scheme 19:00:32 -!- jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has quit [Changing host] 19:00:32 jao [~jao@pdpc/supporter/professional/jao] has joined #scheme 19:01:31 -!- Okasu [~1@unaffiliated/okasu] has quit [Quit: leaving] 19:02:51 cky: http://pastebin.com/6nP6mBPT 19:04:04 I see. 19:04:18 I'll see if I can cook up a quick macro to do what (I think) you're looking for. 19:06:11 arubin [uid489@gateway/web/irccloud.com/x-jwpmclthszfwqhng] has joined #scheme 19:07:48 hiroaki [~hiroaki@77-20-51-63-dynip.superkabel.de] has joined #scheme 19:10:07 -!- pnkfelix [~pnkfelix@guest-nat.p2p.sfo1.mozilla.com] has quit [Ping timeout: 245 seconds] 19:10:42 Fare [fare@nat/google/x-luxwmhdipovujyyi] has joined #scheme 19:21:27 manamonghippos: I now have a very simple version that works for + only (not *), and it doesn't do all your transformations yet, but it's pretty cool. 19:22:00 cky: Cool. Can I see it? 19:26:28 https://gist.github.com/cky/1402c9b7a4e9dec02c85 19:27:03 There are ways to improve this significantly, but I should get back to work. :-) 19:27:57 The kinds of simplifications you wanted to do cannot be done in syntax-rules. That's why I switched to syntax-case. 19:28:36 I appreciate it, thanks 19:28:47 Sure thing. :-) 19:30:01 -!- manamonghippos [~ManAmongH@164.111.192.161] has quit [Quit: manamonghippos] 19:31:10 pnkfelix [~pnkfelix@corp-nat.p2p.sfo1.mozilla.com] has joined #scheme 19:44:47 cky> Yeah, `eval` and `apply` are _totally_ different beasts. 19:44:56 cky: i agree but can we at least agree that... 19:45:07 cky: eval *uses* apply after it evals all the elements of the expression? 19:45:29 cky: at least for function expressions? 19:45:32 e.g. (+ 1 2) 19:47:05 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 245 seconds] 19:47:05 theseb: Eval needn't ever actually use the apply procedure, but "calling" a function is synonymous with "applying" it so it certainly applies functions. 19:48:03 Wow this is -still- going on...? 19:48:25 LeoNerd: nah..just one last thing 19:49:03 taylanub: but since scheme only evaluates stuff...it is the only thing that ever runs apply..so it seems the 2 are intimately related 19:49:19 theseb: (eval '(foo bar)) applies the procedure in foo to the object in bar, simply because (foo bar) is the basic procedure-application syntax in Scheme; (eval '(apply foo (list bar))) applies the apply procedure to the object in foo and a list that contains the object in bar; said apply procedure in turn applies the procedure it received as the first argument (which was stored in foo) to the argument list it received as its second 19:49:19 argument, which contains one object, the object that was initially in the variable bar. 19:49:33 taylanub: e.g. if you type (apply ....) in scheme, the interpreter needs to evaluate it first to know it has to invoke apply! 19:50:22 theseb: Yes but then it just applies the apply procedure, it needn't even know that it's in fact applying the apply procedure, it just applies a procedure (which in this case happens to be the "apply" procedure) 19:50:27 Not sure if I'm being clear :P 19:50:58 taylanub: you are 19:52:36 Apply needs to be a built-in though, it can't be implemented if it's not there yet. 19:52:44 The apply procedure, I mean. 19:53:08 But it's not related to the fact that procedure application happens all over the place when code is being evaluated. 20:08:35 -!- DeathByDoubleD-1 is now known as DeathByDoubleDip 20:14:02 -!- Fare [fare@nat/google/x-luxwmhdipovujyyi] has quit [Ping timeout: 264 seconds] 20:25:23 -!- oleo [~oleo@xdsl-78-35-185-48.netcologne.de] has quit [Ping timeout: 272 seconds] 20:26:01 oleo [~oleo@xdsl-78-35-134-69.netcologne.de] has joined #scheme 20:26:52 Fare [fare@nat/google/x-nagegspywjckmrmn] has joined #scheme 20:28:52 -!- amgarching [~amgarchin@p4FD63A15.dip0.t-ipconnect.de] has quit [Ping timeout: 246 seconds] 20:29:55 rgc [~user@95.Red-83-33-70.dynamicIP.rima-tde.net] has joined #scheme 20:32:59 eli [~eli@lambda.ccs.neu.edu] has joined #scheme 20:32:59 alexshendi [~alexshend@HSI-KBW-078-042-165-190.hsi3.kabel-badenwuerttemberg.de] has joined #scheme 20:33:00 -!- eli [~eli@lambda.ccs.neu.edu] has quit [Changing host] 20:33:00 eli [~eli@racket/eli] has joined #scheme 20:37:50 -!- gravicappa [~gravicapp@ppp85-141-231-81.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 20:48:06 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 20:49:17 -!- hiroaki [~hiroaki@77-20-51-63-dynip.superkabel.de] has quit [Ping timeout: 245 seconds] 20:49:46 civodul [~user@gateway/tor-sasl/civodul] has joined #scheme 20:49:48 hiroaki [~hiroaki@77-20-51-63-dynip.superkabel.de] has joined #scheme 20:52:37 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 252 seconds] 21:00:00 -!- civodul [~user@gateway/tor-sasl/civodul] has quit [Remote host closed the connection] 21:00:24 civodul [~user@gateway/tor-sasl/civodul] has joined #scheme 21:03:37 -!- jewel [~jewel@105-236-25-199.access.mtnbusiness.co.za] has quit [Ping timeout: 252 seconds] 21:07:49 -!- vishesh [~vishesh@103.30.140.128] has quit [Ping timeout: 272 seconds] 21:28:30 -!- weie [~weie@softbank221078042071.bbtec.net] has quit [Quit: Leaving...] 21:46:37 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 21:48:33 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 21:51:31 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 272 seconds] 21:51:43 amgarching [~amgarchin@p4FD63A15.dip0.t-ipconnect.de] has joined #scheme 21:54:05 -!- FunkyDrummer [~RageOfTho@unaffiliated/rageofthou] has quit [Ping timeout: 252 seconds] 22:09:33 -!- taylanub [tub@p4FD91F1A.dip0.t-ipconnect.de] has quit [Disconnected by services] 22:09:58 taylanub [tub@p4FD92482.dip0.t-ipconnect.de] has joined #scheme 22:12:24 -!- bjz [~bjz@125.253.99.68] has quit [Ping timeout: 276 seconds] 22:14:10 bjz [~bjz@125.253.99.68] has joined #scheme 22:30:40 -!- sheilong [~sabayonus@unaffiliated/sheilong] has quit [Quit: Konversation terminated!] 22:42:42 -!- MichaelRaskin [~MichaelRa@195.91.224.161] has quit [Remote host closed the connection] 22:46:02 joneshf-laptop [~joneshf@128.120.116.228] has joined #scheme 22:46:36 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 22:51:11 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 260 seconds] 22:58:04 -!- alexshendi [~alexshend@HSI-KBW-078-042-165-190.hsi3.kabel-badenwuerttemberg.de] has quit [Quit: Leaving] 23:00:01 -!- civodul [~user@gateway/tor-sasl/civodul] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:19:16 -!- mmc1 [~michal@j212115.upc-j.chello.nl] has quit [Quit: Leaving.] 23:20:11 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 272 seconds] 23:32:24 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 23:32:45 davexuni` [~user@209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 23:33:05 -!- hiroaki [~hiroaki@77-20-51-63-dynip.superkabel.de] has quit [Ping timeout: 252 seconds] 23:33:46 -!- davexunit [~user@38.104.7.18] has quit [Disconnected by services] 23:33:52 -!- davexuni` is now known as davexunit 23:34:04 -!- davexunit [~user@209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Changing host] 23:34:04 davexunit [~user@fsf/member/davexunit] has joined #scheme 23:40:34 -!- tinyghost` [~ghosty@rainbowsta.rs] has quit [Read error: Operation timed out] 23:46:34 tinyghost` [~ghosty@rainbowsta.rs] has joined #scheme 23:46:44 juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has joined #scheme 23:50:01 Rodya_ [~trav@71.175.107.141] has joined #scheme 23:50:57 -!- juxovec [~juxovec@ip-89-177-53-194.net.upcbroadband.cz] has quit [Ping timeout: 245 seconds]