00:00:12 tronador_ [~guille@190.255.83.103] has joined #scheme 00:03:20 -!- nilg [~user@77.70.2.229] has quit [Remote host closed the connection] 00:06:04 mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has joined #scheme 00:08:01 -!- davazp [~user@15.Red-83-57-38.dynamicIP.rima-tde.net] has quit [Remote host closed the connection] 00:17:39 -!- mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has quit [Quit: ..zzZzzZ] 00:27:22 -!- chemuduguntar [~ravic@smtp.touchcut.com] has quit [Remote host closed the connection] 00:34:22 aisa [~aisa@209.234.140.58] has joined #scheme 00:38:33 -!- aisa [~aisa@209.234.140.58] has quit [Client Quit] 00:44:14 -!- kuribas [~user@dD57635AB.access.telenet.be] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 00:52:10 -!- dRbiG [drbig@unhallowed.pl] has quit [Ping timeout: 240 seconds] 00:52:16 dRbiG [drbig@unhallowed.pl] has joined #scheme 00:52:58 -!- dfkjjkfd [~paulh@210-11-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 00:53:48 -!- vu3rdd [~vu3rdd@fsf/member/vu3rdd] has quit [Remote host closed the connection] 00:58:06 -!- carleastlund [~cce@gotham.ccs.neu.edu] has quit [Quit: carleastlund] 01:01:10 -!- jonrafkind [~jon@crystalis.cs.utah.edu] has quit [Ping timeout: 240 seconds] 01:11:08 bitweiler [~bitweiler@adsl-99-40-232-158.dsl.stl2mo.sbcglobal.net] has joined #scheme 01:14:57 -!- Axioplas1 [~Axioplase@fortigate.kb.ecei.tohoku.ac.jp] has quit [Quit: Reconnecting] 01:15:50 mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has joined #scheme 01:17:03 evening ;) 01:17:42 Axioplase [~Axioplase@fortigate.kb.ecei.tohoku.ac.jp] has joined #scheme 01:26:02 -!- alexsuraci [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has left #scheme 01:31:03 -!- bitweiler [~bitweiler@adsl-99-40-232-158.dsl.stl2mo.sbcglobal.net] has quit [Read error: Connection reset by peer] 01:35:18 jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has joined #scheme 01:36:15 *jcowan* unvanishes. 01:38:01 Hi jcowan 01:38:05 And everyone else 01:43:32 copumpkin [~pumpkin@rrcs-184-75-32-88.nyc.biz.rr.com] has joined #scheme 01:43:32 -!- copumpkin [~pumpkin@rrcs-184-75-32-88.nyc.biz.rr.com] has quit [Changing host] 01:43:32 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 01:52:22 bitweiler [~bitweiler@adsl-99-40-232-158.dsl.stl2mo.sbcglobal.net] has joined #scheme 01:55:22 -!- pdelgallego [~pdelgalle@1385159852.dhcp.dbnet.dk] has quit [Quit: Leaving] 02:02:58 xwl_ [~wixu@nat/nokia/x-iannnqiwbwufmato] has joined #scheme 02:03:38 masm [~masm@bl19-155-146.dsl.telepac.pt] has joined #scheme 02:03:51 mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has joined #scheme 02:05:29 -!- masm1 [~masm@bl16-170-191.dsl.telepac.pt] has quit [Ping timeout: 250 seconds] 02:08:29 -!- tauntaun [~Antoninus@ool-4577847a.dyn.optonline.net] has quit [Ping timeout: 240 seconds] 02:10:19 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 260 seconds] 02:24:26 -!- xwl_ [~wixu@nat/nokia/x-iannnqiwbwufmato] has quit [Remote host closed the connection] 02:35:50 vu3rdd [~vu3rdd@nat/cisco/x-pehujkmgfutuavss] has joined #scheme 02:35:50 -!- vu3rdd [~vu3rdd@nat/cisco/x-pehujkmgfutuavss] has quit [Changing host] 02:35:50 vu3rdd [~vu3rdd@fsf/member/vu3rdd] has joined #scheme 02:50:58 -!- d3mux [~d3mux@89.181.145.137] has quit [Quit: Leaving] 02:51:30 steshaw [~steshaw@60-240-111-207.tpgi.com.au] has joined #scheme 02:53:44 homie [~levgue@xdsl-78-35-167-243.netcologne.de] has joined #scheme 02:59:34 -!- tupi [~david@189.60.162.71] has quit [Quit: Leaving] 02:59:59 -!- minsa [~minsa@c-24-5-121-157.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 03:04:00 -!- neilcj [~neilcj@174.49.216.137] has quit [Quit: Good night. Ding-ding-ding.] 03:08:00 xwl_ [~user@nat/nokia/x-jxbzmwdlwuoqsjid] has joined #scheme 03:14:26 -!- vilsonvieira [~vilson@h08100.ifsc.usp.br] has quit [Quit: Saindo] 03:16:58 -!- xwl_ [~user@nat/nokia/x-jxbzmwdlwuoqsjid] has quit [Remote host closed the connection] 03:18:17 -!- homie [~levgue@xdsl-78-35-167-243.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 03:29:45 -!- RaceCondition [~erik@dsl-hkibrasgw4-fe5ddc00-120.dhcp.inet.fi] has quit [Quit: RaceCondition] 03:42:14 how could i change this: (define (make-counter init incr) (let ([next init]) (lambda () (let ([x next]) (set! next (+ next incr)) x)))) to start with (define (make-counter . args) .......) ? 03:44:00 teurastaja_: what would the args after the first two do...? 03:44:29 evhan: Maybe teurastaja_ wants to use default arguments. 03:44:30 nothing 03:44:48 For Scheme implementations that support SRFI 89 default arguments, you can use this: 03:45:02 yes default but im wondering if i can not use let then set! 03:45:02 (define (make-counter (init 0) (incr 1)) ...) 03:45:25 thats like tcl 03:45:41 but without that? 03:46:16 Then you get to unpack the arguments yourself! 03:48:09 what if it doesnt exist? 03:49:03 teurastaja_: youll have to define that behavior yourself 03:49:24 mucking around with (case (length args) ...) or somesuch 03:50:01 case-lambda is often your friend here, and its implementation is portable. 03:50:31 hmm saw that somewhere.... let me read about it 03:50:58 teurastaja_: case-lambda is defined in SRFI 16. 03:51:26 http://srfi.schemers.org/srfi-16/srfi-16.html while were pointing the way 03:52:40 timj_ [~timj@e176195031.adsl.alicedsl.de] has joined #scheme 03:52:47 possibilities are so vast its sort of frightening 03:53:09 the joy of scheme :-) 03:55:15 joy but also disorientation to people who dont know enough possibilities 03:55:53 ...and they say its an afternoons study... 03:56:48 -!- zanes [~zane@wall.tripitinc.com] has quit [Quit: zanes] 03:56:53 -!- timj [~timj@e176206058.adsl.alicedsl.de] has quit [Ping timeout: 276 seconds] 03:56:53 no no no, they say the SYNTAX is an afternoon's study 04:01:41 -!- cataska [~cataska@210.64.6.233] has quit [Quit: leaving] 04:03:27 -!- mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has quit [Quit: ..zzZzzZ] 04:03:39 -!- didi [~user@187.123.196.79] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 04:05:10 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 04:06:37 cataska [~cataska@210.64.6.233] has joined #scheme 04:18:14 homie [~levgue@xdsl-78-35-167-243.netcologne.de] has joined #scheme 04:20:49 accel [~accel@unaffiliated/accel] has joined #scheme 04:20:53 -!- mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has quit [Ping timeout: 240 seconds] 04:20:54 why is dotted list part of scheme? 04:21:02 is it too abd to type (cons a b) instead of (a . b)? 04:32:06 accel: those two forms are not equivalent at all. The former MAY build a new cons cell, when executed. The later WILL produce an error when executed. 04:32:38 accel: and obviously, those two objects are not equivalent at all: (equal? '(cons a b) '(a . b)) --> #f 04:33:12 crap 04:33:16 I thoght they were exchangable 04:33:20 what are dotted lsits used for? 04:33:21 Not at all. 04:33:45 -!- stepnem [~stepnem@176.119.broadband10.iol.cz] has quit [Quit: ZNC - http://znc.sourceforge.net] 04:33:51 Well, dotted lists may be used, but I know no standard function making any good use of them. 04:34:04 On the other hand, cons cells, ie. pairs, are used a lot. 04:34:24 They're used to make lists, trees, structures, and all kind of data structures. 04:34:53 iirc, everything ins cheme 04:34:54 Notice that a pair equal to (a . b) will be the result of the form (cons 'a 'b) 04:34:56 is either an atom or a cons cell 04:34:59 rudybot: (cons 'a 'b) 04:35:01 pjb: your sandbox is ready 04:35:01 pjb: ; Value: (a . b) 04:35:08 rudybot: (equal '(a . b) (cons 'a 'b)) 04:35:08 pjb: error: reference to undefined identifier: equal 04:35:10 -!- vu3rdd [~vu3rdd@fsf/member/vu3rdd] has quit [Remote host closed the connection] 04:35:10 rudybot: (equal? '(a . b) (cons 'a 'b)) 04:35:11 pjb: ; Value: #t 04:35:19 pjb: ? 04:35:30 *accel* demands his tuition back 04:35:42 Yes, any scheme object is either an atom or a cons cell (pair), by definition. 04:36:07 accel: the point is that you have to be careful distinguishing data from code. 04:36:29 stepnem [~stepnem@176.119.broadband10.iol.cz] has joined #scheme 04:36:51 accel: when you present a sexp, it may be considered as a form (to be executed, giving some other sexp as result, that itself could be or not a form, and if it is could be executed, or not). 04:37:02 mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has joined #scheme 04:38:02 and you need to be careful with sub-expressions too. When you write (cons a b) and consider it as a form to be executed, a and be will be evaluated as variables, and assuming they're bound to something else than the symbols a and b, the cons cell that will be built will not be equal? to the object (a . b). 04:39:40 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 04:40:43 vu3rdd [~vu3rdd@nat/cisco/x-fwbkakpzamwxwkkl] has joined #scheme 04:40:44 -!- vu3rdd [~vu3rdd@nat/cisco/x-fwbkakpzamwxwkkl] has quit [Changing host] 04:40:44 vu3rdd [~vu3rdd@fsf/member/vu3rdd] has joined #scheme 04:44:07 minsa [~minsa@c-24-5-121-157.hsd1.ca.comcast.net] has joined #scheme 04:51:38 -!- kanru1 [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit [Quit: WeeChat 0.3.2] 04:52:01 kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined #scheme 04:56:53 adu [~ajr@softbank220043138128.bbtec.net] has joined #scheme 04:57:48 -!- steshaw [~steshaw@60-240-111-207.tpgi.com.au] has quit [Quit: steshaw] 04:58:07 pjb: is (values 1 2) an atom or a cons? 04:58:24 rudybot: (pair? '(values 1 2)) 04:58:25 pjb: ; Value: #t 04:58:28 rudybot: (car '(values 1 2)) 04:58:29 pjb: ; Value: values 04:58:32 rudybot: (cadr '(values 1 2)) 04:58:32 pjb: ; Value: 1 04:58:35 rudybot: (caddr '(values 1 2)) 04:58:36 pjb: ; Value: 2 04:58:44 rudybot: (values 1 2) 04:58:44 pjb: ; Value: 1 04:58:45 pjb: ; Value#2: 2 04:58:51 you *quoted* it! 04:58:57 My point. 04:59:12 You could ask: is the result of evaluating (values 1 2) an atom or a cons? 04:59:16 rudybot: (pair? (values 1 2)) 04:59:16 pjb: error: context expected 1 value, received 2 values: 1 2 04:59:36 It's an error, because there is no THE result of (values 1 2). There are TWO resulting values. 04:59:40 < pjb> Yes, any scheme object is either an atom or a cons cell (pair), by definition. <-- isn't (values 1 2) a scheme object? 04:59:48 No it is not. 04:59:56 then, what is it? 05:00:02 That is, the result of evaluating (values 1 2) is not a first class scheme object. 05:00:21 (or, "what is your definition of a scheme object?") 05:00:51 It's an internal something that can be decomposed with call-with-values. 05:01:13 Axioplase: basically, a scheme object is something that can be bound to a scheme variable. 05:01:29 rudybot: (let ((x (values 1 2))) x) 05:01:29 Axioplase: your sandbox is ready 05:01:29 Axioplase: error: context expected 1 value, received 2 values: 1 2 05:01:37 See, it cannot be bound. 05:01:37 ah, it worked in gambit, though. 05:02:02 Yes, in Commn Lisp too multiple values can be ignored so that the first may be bound. 05:02:18 pjb: gambit returned the *two* values, not just 1, like CL 05:02:29 So did guile. 05:02:34 In CL (values 1 2) returns two values too. 05:02:53 But when an expression returns more values than needed, the superfluous values are just ignored. 05:02:55 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit [Quit: WeeChat 0.3.2] 05:03:01 (let ((x (values 1 2))) (list x x)) ==> (# #) 05:03:04 mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has joined #scheme 05:03:04 in Guile. 05:03:13 Ah, I see. Nice trick. 05:03:23 So in guile, multiple values are guile objects. 05:03:30 This is not the case in CL or in R5RS. 05:03:47 kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined #scheme 05:03:58 More accurately, R5RS doesn't allow you to portably determine whether multiple values are an object or not. 05:04:10 Ok. 05:04:22 Because it is an error to pass multiple values to a continuation not expecting them. 05:04:32 (I find this weird too. I think that Gambit's behaviour was due to constant propagation, turning (let ((x (values 1 2))) x) into (values 1 2)) 05:04:39 In Chibi, a multiple value is just a list whose car is a unique cons cell. 05:04:51 And that's perfectly conformant. 05:05:23 So to answer the original question: it depends on the implementation. 05:12:52 -!- mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has quit [Quit: ..zzZzzZ] 05:15:14 -!- masm [~masm@bl19-155-146.dsl.telepac.pt] has quit [Ping timeout: 260 seconds] 05:22:07 -!- rasterbar [~rasterbar@unaffiliated/rasterbar] has quit [Remote host closed the connection] 05:24:05 mmc [~michal@a91-155-246-104.elisa-laajakaista.fi] has joined #scheme 05:27:49 saccade [~saccade@c-67-180-11-158.hsd1.ca.comcast.net] has joined #scheme 05:28:46 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Remote host closed the connection] 05:30:12 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 05:31:58 -!- mmc [~michal@a91-155-246-104.elisa-laajakaista.fi] has quit [Quit: Leaving.] 05:33:06 nilg [~user@77.70.2.229] has joined #scheme 05:35:52 Question: Are there common examples of hygiene-breaking macros that rely on the macro importing the bindings of identifiers from the point of call, as opposed to exporting them into the body of the macro? 05:36:30 I think the answer is no, but I'm not experienced with macros that deliberately break hygiene. 05:41:01 -!- blueadept [~blueadept@unaffiliated/blueadept] has quit [Quit: Leaving] 05:43:24 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Ping timeout: 272 seconds] 05:43:53 HG` [~HG@xdsl-92-252-86-213.dip.osnanet.de] has joined #scheme 05:44:33 jcowan: in CL we could do this, as a mean of communicating between an outer macro, and inner macro, using local macrolets. 05:45:07 *jcowan* nods. 05:46:18 *jcowan* is not a fan of anything more complicated than syntax-rules. 05:46:52 In sicp it's made a great case for state, as long as it's hidden and encapsulated :-) 05:47:58 adu [~ajr@softbank220043138128.bbtec.net] has joined #scheme 05:51:18 adu_ [~ajr@softbank220043138128.bbtec.net] has joined #scheme 05:51:21 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Read error: Connection reset by peer] 05:51:34 xwl_ [~user@nat/nokia/x-hupglxqlnzhpniys] has joined #scheme 05:52:52 -!- xwl_ [~user@nat/nokia/x-hupglxqlnzhpniys] has quit [Remote host closed the connection] 05:55:29 xwl_ [~user@nat/nokia/x-lleihoxciamicpqg] has joined #scheme 05:55:53 -!- adu_ [~ajr@softbank220043138128.bbtec.net] has quit [Ping timeout: 264 seconds] 05:56:39 -!- homie [~levgue@xdsl-78-35-167-243.netcologne.de] has quit [Read error: Connection reset by peer] 05:56:47 -!- xwl_ [~user@nat/nokia/x-lleihoxciamicpqg] has quit [Remote host closed the connection] 05:57:14 xwl_ [~user@nat/nokia/x-ucxbtudbwqmzfefa] has joined #scheme 05:57:56 homie [~levgue@xdsl-78-35-176-59.netcologne.de] has joined #scheme 05:58:20 dnolen [~davidnole@184.152.69.75] has joined #scheme 05:58:43 pjb: where at in SCIP is this great case for state mention? 06:00:07 Perhaps it was only in the videos. At one moment, the professors shows how to transform some procedural code into a form of functional decomposition, using variables to transmit state. 06:01:39 oh, I've been reading that chapter lately and it seemed very useful 06:02:46 I'm still learning so bare my ignorance or excessive questioning ;) 06:02:52 Also, the whole section "3.3 Modeling with Mutable Data". 06:03:16 Being ignorant is all right; spreading ignorance is generally not. 06:03:34 -!- dnolen [~davidnole@184.152.69.75] has quit [Quit: dnolen] 06:04:37 s/SCIP/SICP/ 06:07:31 lol... I never spread ignorance AFAIK 06:09:36 MichaelRaskin [~MichaelRa@195.178.216.22] has joined #scheme 06:15:24 adu [~ajr@softbank220043138128.bbtec.net] has joined #scheme 06:16:11 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 06:17:53 No problem, then! 06:19:18 "First class" isn't always a good thing. Scheme variables, for example, are deliberately second-class, which makes it possible to reason about their use. 06:19:41 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Ping timeout: 240 seconds] 06:23:12 jcowan: but in a compiler, target variables are first class. 06:23:42 jewel [~jewel@196-215-88-87.dynamic.isadsl.co.za] has joined #scheme 06:23:43 jcowan: the question is what proportion of a program needs to be first class to make meta programming the most easy and safe. 06:24:19 -!- jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has quit [Read error: Connection reset by peer] 06:24:33 That said, in CL lexical variables are not first class either, and it seems that we can still archieve good metaprogramming results. 06:24:40 jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has joined #scheme 06:24:58 Well, safety and ease of use are often mutually exclusive. 06:25:06 More precisely, safety and power are. 06:25:18 Syntax-rules isn't that powerful, but it's extremely safe and simple to reason about. 06:27:53 adu [~ajr@softbank220043138128.bbtec.net] has joined #scheme 06:27:55 As for variables not being first class object, this is actually often a stumbling block for CL newbies trying to write macros, on one hand, and a difficulty in debugging lisp programs: implementations need to reify lexical variables to let the debugger work with them (inspection, modification). So I'd say that it would be worthwhile exploring the possibility of making variables first class objects. 06:29:36 -!- Khisanth [~Khisanth@pool-96-250-128-177.nycmny.east.verizon.net] has quit [Read error: Operation timed out] 06:30:46 Khisanth [~Khisanth@pool-96-246-10-165.nycmny.east.verizon.net] has joined #scheme 06:40:53 -!- mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has quit [Ping timeout: 240 seconds] 06:45:12 -!- tronador_ [~guille@190.255.83.103] has quit [Quit: tronador_] 06:49:03 -!- saccade [~saccade@c-67-180-11-158.hsd1.ca.comcast.net] has quit [Quit: This computer has gone to sleep] 06:54:08 mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has joined #scheme 06:54:59 -!- jewel [~jewel@196-215-88-87.dynamic.isadsl.co.za] has quit [Ping timeout: 276 seconds] 06:55:47 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu] 06:57:01 acs [59eed542@gateway/web/freenode/ip.89.238.213.66] has joined #scheme 07:11:49 -!- bitweiler [~bitweiler@adsl-99-40-232-158.dsl.stl2mo.sbcglobal.net] has quit [Remote host closed the connection] 07:37:00 steshaw [~steshaw@60-240-111-207.tpgi.com.au] has joined #scheme 07:37:43 dfkjjkfd [~paulh@210-11-ftth.onsnetstudenten.nl] has joined #scheme 07:42:14 -!- pyro- [~pyro@CPE-124-176-147-147.lns5.lon.bigpond.net.au] has quit [Ping timeout: 260 seconds] 07:45:38 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 272 seconds] 07:47:58 saccade [~saccade@c-67-180-11-158.hsd1.ca.comcast.net] has joined #scheme 07:51:00 -!- foof` is now known as foof 07:51:47 NihilistDandy [~ND@c-75-69-129-101.hsd1.nh.comcast.net] has joined #scheme 07:55:54 -!- kniu [~kniu@DOHOHO.RES.CMU.EDU] has quit [Quit: Leaving] 07:59:17 kniu [~kniu@DOHOHO.RES.CMU.EDU] has joined #scheme 08:03:14 hkBst [~quassel@gentoo/developer/hkbst] has joined #scheme 08:10:39 lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has joined #scheme 08:12:03 -!- dfkjjkfd [~paulh@210-11-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 08:16:14 -!- stepnem [~stepnem@176.119.broadband10.iol.cz] has quit [Ping timeout: 276 seconds] 08:18:51 dfkjjkfd [~paulh@210-11-ftth.onsnetstudenten.nl] has joined #scheme 08:19:13 Gmind [~Nevermind@113.190.169.177] has joined #scheme 08:23:33 -!- Gmind [~Nevermind@113.190.169.177] has quit [Client Quit] 08:23:48 DrunkenPanda [~pyro@CPE-124-181-139-86.vic.bigpond.net.au] has joined #scheme 08:25:02 -!- nilg [~user@77.70.2.229] has quit [Remote host closed the connection] 08:26:17 nilg [~user@77.70.2.229] has joined #scheme 08:28:19 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Ping timeout: 260 seconds] 08:28:20 -!- nilg [~user@77.70.2.229] has quit [Remote host closed the connection] 08:30:44 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Quit: leaving] 08:37:52 borism [~boris@ec2-79-125-58-77.eu-west-1.compute.amazonaws.com] has joined #scheme 08:38:06 nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #scheme 08:38:20 Gmind [~Nevermind@113.190.169.177] has joined #scheme 08:43:02 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 08:54:52 -!- interglacial [~interglac@95.148.218.45] has quit [Ping timeout: 255 seconds] 08:58:36 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 09:00:30 stepnem [~stepnem@176.119.broadband10.iol.cz] has joined #scheme 09:00:53 -!- xwl_ [~user@nat/nokia/x-ucxbtudbwqmzfefa] has quit [Ping timeout: 240 seconds] 09:04:23 nilg` [~user@77.70.2.229] has joined #scheme 09:09:15 -!- teurastaja_ [~user@modemcable182.177-200-24.mc.videotron.ca] has quit [] 09:14:05 lawG [~wit@unaffiliated/hughjass] has joined #scheme 09:17:51 -!- cpach [~carl@h167n3-sde-a31.ias.bredband.telia.com] has quit [Quit: hejhej] 09:20:08 lbc_ [~quassel@1908ds1-aboes.0.fullrate.dk] has joined #scheme 09:21:28 -!- lbc_ [~quassel@1908ds1-aboes.0.fullrate.dk] has quit [Remote host closed the connection] 09:26:10 cpach [~carl@h167n3-sde-a31.ias.bredband.telia.com] has joined #scheme 09:27:31 alaricsp [~alaric@relief.warhead.org.uk] has joined #scheme 09:33:16 -!- NihilistDandy [~ND@c-75-69-129-101.hsd1.nh.comcast.net] has quit [Remote host closed the connection] 09:36:49 -!- steshaw [~steshaw@60-240-111-207.tpgi.com.au] has quit [Quit: steshaw] 09:44:30 schmir [~schmir@mail.brainbot.com] has joined #scheme 09:49:04 wingo [~wingo@74.Red-80-24-4.staticIP.rima-tde.net] has joined #scheme 09:50:57 -!- Gmind [~Nevermind@113.190.169.177] has quit [Quit: Leaving.] 09:51:22 -!- Axioplase is now known as Axioplase_ 09:51:59 f8l [~f8l@213-238-96-89.adsl.inetia.pl] has joined #scheme 09:57:05 steshaw [~steshaw@60-240-111-207.tpgi.com.au] has joined #scheme 09:59:28 Gmind [~Nevermind@113.190.169.177] has joined #scheme 10:00:39 -!- Gmind [~Nevermind@113.190.169.177] has quit [Client Quit] 10:03:08 Gmind [~Nevermind@113.190.169.177] has joined #scheme 10:05:54 -!- jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has quit [Read error: Connection reset by peer] 10:06:31 jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has joined #scheme 10:12:20 tauntaun [~Antoninus@ool-4577847a.dyn.optonline.net] has joined #scheme 10:16:53 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 250 seconds] 10:22:05 -!- tauntaun [~Antoninus@ool-4577847a.dyn.optonline.net] has quit [Ping timeout: 240 seconds] 10:24:09 -!- vu3rdd [~vu3rdd@fsf/member/vu3rdd] has quit [Ping timeout: 276 seconds] 10:25:41 -!- lawG [~wit@unaffiliated/hughjass] has quit [Ping timeout: 240 seconds] 10:31:24 greenmang0 [~quassel@123.252.207.134] has joined #scheme 10:31:24 -!- greenmang0 [~quassel@123.252.207.134] has quit [Changing host] 10:31:24 greenmang0 [~quassel@unaffiliated/greenmang0] has joined #scheme 10:33:51 -!- alaricsp [~alaric@relief.warhead.org.uk] has quit [Remote host closed the connection] 10:38:33 -!- jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has quit [Ping timeout: 250 seconds] 10:43:46 drdo [~user@91.205.108.93.rev.vodafone.pt] has joined #scheme 10:44:28 -!- Gmind [~Nevermind@113.190.169.177] has quit [Quit: Leaving.] 10:44:40 -!- arbscht [~arbscht@60-234-133-173.bitstream.orcon.net.nz] has quit [Ping timeout: 240 seconds] 10:44:55 -!- f8l [~f8l@213-238-96-89.adsl.inetia.pl] has quit [Quit: WeeChat 0.3.4] 10:46:21 arbscht [~arbscht@unaffiliated/arbscht] has joined #scheme 11:00:51 gravicappa [~gravicapp@host150-114-static.39-79-b.business.telecomitalia.it] has joined #scheme 11:01:03 tauntaun [~Antoninus@64.134.98.133] has joined #scheme 11:01:13 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 11:02:00 alaricsp [~alaric@relief.warhead.org.uk] has joined #scheme 11:11:45 vu3rdd [~vu3rdd@nat/cisco/x-vlbkboktkoujbikj] has joined #scheme 11:11:46 -!- vu3rdd [~vu3rdd@nat/cisco/x-vlbkboktkoujbikj] has quit [Changing host] 11:11:46 vu3rdd [~vu3rdd@fsf/member/vu3rdd] has joined #scheme 11:13:29 masm [~masm@bl19-155-146.dsl.telepac.pt] has joined #scheme 11:13:56 jesusito [~user@58.pool85-49-45.dynamic.orange.es] has joined #scheme 11:15:34 Gmind [~Nevermind@113.190.169.177] has joined #scheme 11:15:39 RaceCondition [~erik@dsl-hkibrasgw4-fe5ddc00-120.dhcp.inet.fi] has joined #scheme 11:15:55 phao [phao@189.107.128.29] has joined #scheme 11:16:13 -!- Gmind [~Nevermind@113.190.169.177] has quit [Client Quit] 11:17:41 -!- wingo [~wingo@74.Red-80-24-4.staticIP.rima-tde.net] has quit [Ping timeout: 240 seconds] 11:23:23 Gmind [~Nevermind@113.190.169.177] has joined #scheme 11:23:46 -!- Gmind [~Nevermind@113.190.169.177] has quit [Client Quit] 11:29:40 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 255 seconds] 11:32:22 Caleb-- [thedude@109.67.207.23] has joined #scheme 11:35:52 a question: http://paste.lisp.org/display/119705 11:35:55 mmc [~michal@cs181162098.pp.htv.fi] has joined #scheme 11:36:11 (it was from an exam) 11:40:04 i've tried something with append, but it returns a flat list 11:40:09 it doesn't keep the tree structure 11:41:25 (tree-manip '() list car cdr (lambda (x y) (append y x)) tree) 11:43:09 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Ping timeout: 260 seconds] 11:44:58 -!- mmc [~michal@cs181162098.pp.htv.fi] has quit [Ping timeout: 255 seconds] 11:48:05 -!- tauntaun [~Antoninus@64.134.98.133] has quit [Ping timeout: 264 seconds] 11:56:44 f8l [~f8l@213-238-96-89.adsl.inetia.pl] has joined #scheme 11:57:48 Caleb--: I suggest CONS (havent looked deeply at your code) 12:01:06 -!- steshaw [~steshaw@60-240-111-207.tpgi.com.au] has quit [Quit: steshaw] 12:01:18 alaricsp_ [~alaric@relief.warhead.org.uk] has joined #scheme 12:03:25 -!- alaricsp [~alaric@relief.warhead.org.uk] has quit [Ping timeout: 255 seconds] 12:03:35 Caleb--: basically, what is done is that each sublist is replaced by (reverse sublist). So a simplier function would be: (define (deep-reverse tree) (cond ((pair? tree) (map (compose deep-reverse reverse) tree)) (else tree))) 12:04:21 with (define (compose fun . funs) (if (null? funs) fun (lambda (x) (fun ((apply compose funs) x))))) 12:04:42 -!- vu3rdd [~vu3rdd@fsf/member/vu3rdd] has quit [Remote host closed the connection] 12:05:52 Caleb--: otherwise, your accum just needs to reverse the list of children and append to it the label of the node. It is strange that tree-manip applies the same function to both the list of children (rest) and the label (first). 12:06:01 (This is just yet another ill defined problem). 12:06:53 Oh, sorry, first and rest are parameter, erase my last two paragraphs. 12:09:03 So, basically: (tree-manip '() (lambda (leaf) leaf) (lambda (tree) #f) (lambda (tree) tree) (lambda (tree) (reverse (map (lambda (x) (if (pair? x) (deep-reverse x) x))))) tree) 12:09:27 There are a lot of other possibilities. 12:10:38 To use append, you need to add a call to list: (tree-manip '() list car cdr (lambda (first rest) (append rest (list first))) tree) 12:11:10 and leaf should stay leaf: (tree-manip '() (lambda (leaf) leaf) car cdr (lambda (first rest) (append rest (list first))) tree) 12:11:25 -!- alaricsp_ is now known as alaricsp 12:11:48 -!- greenmang0 [~quassel@unaffiliated/greenmang0] has left #scheme 12:12:18 The problem of this solution with append is that it is in O(nē) because of the recursive call to append. Happily, n is only the maximum number of children per node. 12:13:26 pjb, very nice! 12:13:48 so my solution was close ;-) 12:15:10 Caleb--: the problem with tree-manip is that it doesn't manipulate the tree in terms of tree nodes, but in terms of a list (using first and rest, and with the recursive call on the result of (first tree) and (rest tree)). If you pass as first a function to return the label of the node, and as rest a function to return the list of children, then the recursive calls to tree-manip are nonsensical, since we don't have there any tree! 12:16:36 So I would avoid tree-manip, and both provide my first solution above treating the structure as a mere sexp, or write a correct tree-manip, having defined a functional abstraction for trees. (eg. make-tree, tree-label and tree-children functions). 12:17:46 Notice that second solution above using tree-manip cheats, since it doesn't do anything with first and rest, and does everything in accum (the first argument of accum is ignored, and the other is treated as the sexp of my first solution). It's a silly solution given to a silly problem. 12:17:50 pjb, yeah, that's why i was confused at first when i started this exercise 12:17:56 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 12:18:14 i was stuck for a while, and then i realized that i won't go far if i'll only restrict myself to "legal" tree manipulation 12:18:32 like taking left-branch, right-branch or node-entry 12:18:36 THis is definitely not hte kind of problem you can answer in a MCQ. 12:18:42 MCQ? 12:18:49 Multiple-Choice-Question :-) 12:19:07 this question had 3 parts 12:19:18 1) write (sum-odd tree) that sums all the odd elements 12:19:27 2) write (flatten tree) that creates a flat list of all elements 12:19:32 and 3rd was deep-reverse 12:20:04 @ sum-odd i realized that regular tree manipulation won't help, because i can't get to the node values 12:20:17 Well, you can always add the functions you need. 12:20:18 assuming that the tree structure is (node-val left-branch right-branch) 12:20:28 pjb, they were all "fill in the blanks" 12:20:29 -!- gravicappa [~gravicapp@host150-114-static.39-79-b.business.telecomitalia.it] has quit [Ping timeout: 260 seconds] 12:20:38 You must not restrict yourself to the frame given by the (ill-defined most often) problem statements. 12:20:58 steshaw [~steshaw@60-240-111-207.tpgi.com.au] has joined #scheme 12:21:32 yeah 12:21:35 Caleb--: you can always fill in the blanks, but I would not be satisfied by that, and add pages to show why the problem statement is bad, how to correct it, and implementing the right solution to the right problem in addition to the bad solution of the bad problem. 12:21:49 -!- f8l [~f8l@213-238-96-89.adsl.inetia.pl] has quit [Quit: WeeChat 0.3.4] 12:23:32 ok, i'm gonna back to doing these tests, i'll pop in if i have any questions. thanks 12:26:05 -!- masm [~masm@bl19-155-146.dsl.telepac.pt] has quit [Ping timeout: 240 seconds] 12:26:09 mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has joined #scheme 12:26:19 pjb, the problem with these fill in the blanks questions is that you can't write any external functions. you must follow their recipe 12:33:44 Caleb--: Is the exercise taken from "the little schemer?" 12:34:11 no, from an exam 12:34:19 okay 12:35:28 tauntaun [~Antoninus@208.252.23.2] has joined #scheme 12:37:17 -!- drdo [~user@91.205.108.93.rev.vodafone.pt] has quit [Ping timeout: 250 seconds] 12:50:04 heh, seems like this exact question was taken from a 1998 MIT exam 12:52:53 Agari [~Agari@180.Red-81-33-92.dynamicIP.rima-tde.net] has joined #scheme 12:59:43 mmc [~michal@a91-155-246-104.elisa-laajakaista.fi] has joined #scheme 13:00:39 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 13:03:39 -!- mmc [~michal@a91-155-246-104.elisa-laajakaista.fi] has quit [Client Quit] 13:03:41 -!- tauntaun [~Antoninus@208.252.23.2] has quit [Ping timeout: 240 seconds] 13:09:41 -!- steshaw [~steshaw@60-240-111-207.tpgi.com.au] has quit [Ping timeout: 264 seconds] 13:12:53 -!- mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has quit [Ping timeout: 240 seconds] 13:15:07 adu [~ajr@softbank220043138128.bbtec.net] has joined #scheme 13:25:34 -!- ray [ray@xkcd-sucks.org] has quit [Remote host closed the connection] 13:26:07 tauntaun [~Antoninus@ool-44c7e46c.dyn.optonline.net] has joined #scheme 13:27:32 ray_ [ray@xkcd-sucks.org] has joined #scheme 13:29:36 another question: http://paste.lisp.org/display/119708 13:32:58 i have an almost-complete solution 13:33:32 -!- RaceCondition [~erik@dsl-hkibrasgw4-fe5ddc00-120.dhcp.inet.fi] has quit [Quit: RaceCondition] 13:34:19 RaceCondition [~erik@dsl-hkibrasgw4-fe5ddc00-120.dhcp.inet.fi] has joined #scheme 13:34:53 masm [~masm@2.80.155.146] has joined #scheme 13:34:58 i've pasted it on that page 13:35:09 note that i'm not sure what to take as the first element of the new stream 13:35:14 Caleb--: That question has a bug. 13:35:32 does it? 13:35:33 I presume interleave sholud be: (cons-stream (stream-car s1) (interleave s2 (stream-cdr s1))) 13:35:44 yes 13:35:48 it's my typo 13:35:55 Okay. 13:36:22 -!- RaceCondition [~erik@dsl-hkibrasgw4-fe5ddc00-120.dhcp.inet.fi] has quit [Client Quit] 13:38:05 btw, if u wanna test, i have a function that creates a stream of streams 13:38:08 sec, i'll ad that to the paste 13:38:24 mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has joined #scheme 13:38:30 -!- eut [~m@cpe-24-24-136-239.socal.res.rr.com] has quit [Ping timeout: 276 seconds] 13:39:15 done 13:39:36 RaceCondition [~erik@dsl-hkibrasgw4-fe5ddc00-120.dhcp.inet.fi] has joined #scheme 13:40:59 ok, the last line in my attempted solution shoudl be (stream-combine (stream-map stream-cdr str))))) 13:41:23 but other than that it seems ok (and i still don't know what to use for the first element) 13:41:46 i can just use (stream-car (stream-car str)) 13:41:52 but then some elements will appear twice 13:42:22 (some = prolly aleph_null of them :P) 13:44:54 tronador_ [~guille@190.255.83.103] has joined #scheme 13:45:32 -!- tronador_ [~guille@190.255.83.103] has quit [Client Quit] 13:47:27 -!- homie [~levgue@xdsl-78-35-176-59.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 13:51:18 -!- MapMan [mapman@dynamic-87-105-50-44.ssp.dialog.net.pl] has quit [Read error: Operation timed out] 13:53:35 MapMan [mapman@host-62-141-192-113.swidnica.mm.pl] has joined #scheme 13:53:57 eut [~m@cpe-24-24-136-239.socal.res.rr.com] has joined #scheme 14:00:25 -!- snorble [~snorble@s83-179-14-105.cust.tele2.se] has quit [Ping timeout: 255 seconds] 14:01:26 snorble [~snorble@s83-179-14-105.cust.tele2.se] has joined #scheme 14:03:03 Gmind [~Nevermind@113.190.169.177] has joined #scheme 14:06:13 I have a feeling that that _wasn't_ the solution they were going for. But if they have an open mind, then any workable solution should be fine. 14:06:42 what else can you suggest? 14:06:56 Nothing yet. Because streams hurt my brain. 14:06:58 it works fine other than the duplicates part 14:11:19 homie [~levgue@xdsl-78-35-176-59.netcologne.de] has joined #scheme 14:13:25 wbooze [~levgue@xdsl-78-35-176-59.netcologne.de] has joined #scheme 14:13:45 cky, tell me about it. i hate the streams questions on the tests 14:14:01 I can totally sympathise. 14:14:10 they're the only ones you can't really check... you can have a feeling you'er right, but you might be way off 14:14:17 Yep. 14:14:39 ...and I wonder why people want me to implement a stream-based GolfScript dialect. Sheesh. 14:15:09 never heard of GolfScript 14:16:49 holy shit, this test is 17 pages 14:21:14 -!- eut [~m@cpe-24-24-136-239.socal.res.rr.com] has quit [Ping timeout: 260 seconds] 14:22:53 O_o 14:23:33 GolfScript is an easily-parsed, stack-based language, designed for writing short code. 14:24:03 It does this by using really short symbols for all its built-in functions, and overloading each symbol with argument-specific functionality. 14:24:53 GolfScript has four types: integer, array, string, and block (functions). 14:25:21 As an example, % has at least three different uses. 14:25:42 It can be a modulo: 5 3 % => 2 14:26:10 It can be map: [1 2 3 4] {)} % => [2 3 4 5] 14:26:46 It can be index-selection: [1 2 3 4] 2 % => [1 3] 14:27:50 Another example, the , operator has three different uses too: 14:28:07 It can be an iota: 10 , => [0 1 2 3 4 5 6 7 8 9] 14:28:15 It can be array length: [1 2 3 4] , => 4 14:29:05 It can be filter: [1 2 3 4 5 6 7 8 9] {3 %} , => [1 2 4 5 7 8] 14:29:31 Real GolfScript programs, of course, strip out all the unnecessary spaces. 14:30:19 So you could write 10,{3%}, => [1 2 4 5 7 8] 14:32:27 sounds confusing to me 14:32:33 acs_ [59eed542@gateway/web/freenode/ip.89.238.213.66] has joined #scheme 14:32:33 ;] 14:32:48 It has a somewhat steep learning curve, but once you get the hang of it, you can use it for writing really compact programs. 14:32:51 i thought we were going in the direction of mroe readable code 14:33:04 For example, the Fibonacci sequence can be generated with 12 bytes of GolfScript code. 14:33:05 -!- acs [59eed542@gateway/web/freenode/ip.89.238.213.66] has quit [Ping timeout: 245 seconds] 14:33:10 Hehehehehehe. 14:33:57 but you could also write it in a more readable language and the compiled executable could be the same size (or smaller), depending on the compiler 14:34:14 ok, here's another question 14:35:05 suppose you have a list of numbers. you need to write a function, say all-equal that takes the list, and returns true/false depending on whether all the elements are equal or not 14:35:11 using only accumulate 14:35:33 copumpkin [~pumpkin@gw1.mcgraw-hill.com] has joined #scheme 14:35:33 -!- copumpkin [~pumpkin@gw1.mcgraw-hill.com] has quit [Changing host] 14:35:33 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 14:35:49 i was thinking of doing something like: 14:36:09 jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has joined #scheme 14:37:03 http://paste.lisp.org/display/119711 14:37:08 i wonder if that would work 14:37:10 (define (all-equal l) (reduce (lambda (x y) (and x (eqv? x y))) #t l)) 14:37:28 eut [~m@cpe-24-24-136-239.socal.res.rr.com] has joined #scheme 14:38:03 Caleb--: What if your list has an odd number of items, and the centre element is different from the rest? 14:38:46 right :S 14:39:44 but how does your solution work? 14:40:10 i was having a problem with the fact that there are numbers in the list and yet i need to accumulate booleans 14:40:13 It doesn't work yet. I'm still testing it. 14:40:54 davazp [~user@15.Red-83-57-38.dynamicIP.rima-tde.net] has joined #scheme 14:41:18 i think i have it 14:41:31 note that the list will not be empty 14:41:36 (define (all-equal l) (reduce (lambda (x y) (and y (eqv? x y) x)) #t l)) 14:41:38 This works. 14:42:25 It looks at the saved value, which is either the number you're seeking, or #f. 14:42:31 If it's #f, keep it #f. 14:42:33 i just used (car lst) 14:42:39 compare everything to it 14:42:40 Otherwise, see if the incoming item is the number you're seeking. 14:42:47 If so, return that. 14:42:57 That's too hard. 14:42:59 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 276 seconds] 14:42:59 (define (all-equal l) (map (lambda (x) (equal? (car l) x)) (cdr l)) 14:43:14 and filter that 14:43:35 Special-casing the first element is too hard for me. :-P 14:43:36 (define (all-equal? lst) (accumulate (lambda (x y) (and (= x (car lst)) y)) #t lst)) 14:43:45 cky, the list won't be empty 14:44:46 The pedant in me wants you to extract the (car lst) into a separate variable first. But in this case, it probably doesn't matter. 14:45:00 And see C-Keen's answer; pass (cdr lst), not lst. 14:45:28 i see 14:45:36 note that on the test i have limited space 14:45:50 some questions give you a template of an algorithm and you have to fill in the blanks 14:45:59 Well, my answer is more compact than yours, then. ;-) 14:46:01 so no wiggle room 14:46:06 yep 14:46:19 -!- weinholt [weinholt@debian/emeritus/weinholt] has quit [Ping timeout: 260 seconds] 14:46:24 ok, on to the next question! 14:46:34 weinholt [weinholt@debian/emeritus/weinholt] has joined #scheme 14:47:32 -!- masm [~masm@2.80.155.146] has quit [Ping timeout: 276 seconds] 14:48:42 anyone heard of this book http://www.amazon.com/Let-Over-Lambda-Doug-Hoyte/dp/1435712757 ? 14:49:30 Yes. 14:49:33 I have not read it, though. 14:49:37 i see 14:50:06 http://landoflisp.com/ is probably better. 14:50:14 yay Land of Lisp! 14:50:32 I'm so sad I didn't know about the book during O'Reilly's Cyber Monday sale last year. 14:50:47 Apparently it was the 23rd most popular book during the Cyber Monday sale. 14:51:14 I have a problem with buying books at full price. ;-) 14:51:17 any advantages to knowing lisp ? 14:51:24 i mean, how different is scheme from lisp, anyway? 14:51:34 Hahahahahahahahha. 14:51:39 scheme is a member of the lisp family 14:51:44 there is no "lisp language" 14:51:55 Not anymore, anyway 14:51:59 cky, yeah, point and laugh, you bastard. 14:52:04 Asking for a comparison between Scheme and CL, is like asking for a comparison between Java and C#. 14:52:05 Well, nowadays, there's Common Lisp, emacs lisp and scheme. 14:52:13 Never was, except when Lisp was just McCarthy's Lisp. 14:52:18 And clojure, if you count it 14:52:24 cky: not exactly. You can write programs that work on both scheme and CL. 14:52:34 jcowan: yeah, up until Lisp 1.5 it was still "the Lisp", right? 14:52:41 pjb: True. 14:52:46 Yeah, but few or none of us remember those days. 14:52:55 cky: http://paste.lisp.org/display/84252 14:52:57 Clojure definitely counts. 14:52:57 masm [~masm@bl15-133-247.dsl.telepac.pt] has joined #scheme 14:53:18 Dylan and Logo are more marginal members 14:53:33 No. For me, scheme is the border of lisp. You can include ISO Lisp, but not Clojure or Dylan. 14:53:53 What about Autolisp? 14:53:57 Does that still exist? 14:54:10 Very limited. It has competition from AutoBasic or something. 14:54:14 ISLisp, yes, definitely. 14:54:22 heh 14:54:25 Why not clojure? 14:54:33 Too many []. 14:54:38 :-) 14:55:04 femtoo [~femto@95-89-248-198-dynip.superkabel.de] has joined #scheme 14:55:09 Does Clojure even have cons cells? Or rather, do Clojure lists use cons cells? 14:55:10 What about Racket? 14:55:12 :) 14:55:23 HEH 14:55:27 I'm waiting for r7rs. 14:55:45 pjb: Yeah, in Clojure, [...] is the same as #(...), and in many cases, the use of vectors is enforced. 14:55:54 What are the best books/articles of learning Lisp/Scheme ? 14:55:54 pjb: Like, the lambda list must be a vector, not a list, in Clojure. 14:55:55 dear god, who needs so many langauges? :P 14:56:10 Indeed. I only use CL now. 14:56:10 a lot of schemes allow [] to be used equivalently to () 14:56:27 but at least you can s/[/(/g s/]/)/g 14:56:34 C-Keen: Right, but that's not how Clojure treats []. ;-) 14:56:47 C-Keen: (Re pjb's comment about Clojure using [] too much.) 14:57:33 pjb: ...as long as you don't have #\[, #\], "foo[bar]", etc. ;-) 14:57:34 heh, they've launched a Python pilot in my university... next semester there will be a choice between Scheme and Python in the Intro to CompSci course 14:57:43 Caleb--: Ruh roh. 14:58:18 they're following in MIT's footsteps 14:58:36 back in the 90s the course was taught using Pascal, but then they decided to switch to Scheme 14:58:48 i think in 98 14:59:31 i think it might be for the best 14:59:39 jewel [~jewel@196-215-88-87.dynamic.isadsl.co.za] has joined #scheme 14:59:41 python is much more widely used than scheme is 15:00:03 no offense to all the schemophiles ;p 15:00:14 I think Python is an acronym for Lots of Irritating Silly Restrictions 15:00:18 None taken. Python is a joke. 15:00:38 PHP is much more widely used than Python. Obviously PHP is the greatest language there is. 15:00:40 1000 lemmings cannot be possibly wrong 15:00:45 (Ruby is an ironic joke, Perl is a dramatic one). 15:00:58 lol 15:01:13 I've never used PHP, but you can find reasons to badmouth any language. 15:01:17 Caleb--, well, they only teach C++ and/or Java in CS courses here... 15:01:25 jcowan: well, php 5.3 has lambda... 15:01:28 so you've still not answered my question... why would one use, say, Common Lisp over Scheme, or vice-versa? 15:01:34 fortran and COBOL have been in use for decades now and they are the largest and oldest supported code bases... 15:01:58 are there only stylistic differences? philosophical differences? 15:02:09 pjb: lambda with explicit closure annotations to keep track of variables :S 15:02:10 Lisp-1 vs Lisp-2? 15:02:11 Caleb--: ATM Common Lisp has more batteries included, and it has large amounts of backward and sidewise compatibility. 15:02:37 Caleb--: Common Lisp is more stable, it has a wide standard so you can more easily port your application from implementation to implementation (actually there is a nice collection of portability libraries so that you can really write applications compilable in almost all the CL implementations). 15:03:00 tronador_ [~guille@190.145.89.146] has joined #scheme 15:03:00 The Scheme attitude tends to be "Don't port your application, port your Scheme" 15:03:12 heh 15:04:59 -!- Gmind [~Nevermind@113.190.169.177] has quit [Quit: Leaving.] 15:05:17 rasterbar [~rasterbar@unaffiliated/rasterbar] has joined #scheme 15:05:20 Because the prevailing standard is small, Scheme is really a family of languages within the Lisp family, with some things in common. 15:05:39 so programming languages are just like religions ;) 15:07:19 Yes. Catholic is Latin is Common Lisp. Jew is Hebrew is Scheme. 15:07:22 no the 'followers' of programming languages tend to be religious 15:07:45 same thing with editors 15:08:00 you could think of scheme as a set of religions having a small common part, like 'how about we wouldn't kill eachother for any reason? 15:08:08 Gmind [~Nevermind@113.190.169.177] has joined #scheme 15:08:24 and the implementations fill in the rest of the details as to how to apply that in real life 15:08:30 :D 15:08:31 Euthydemus [~euthydemu@vaxjo7.80.cust.blixtvik.net] has joined #scheme 15:10:18 That said, there are two competing standards for Scheme, and there may soon be three. 15:10:38 Fortunately, one is mostly a subset of the other. 15:10:54 Four, no? There will be r7rs/short and r7rs/long or something. 15:11:52 In effect, "long" is just a set of optional libraries, with a little bit of baggage. 15:12:18 aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has joined #scheme 15:12:31 jcowan: don't you think that WG1 will be the 'new r5rs' which will be largely adopted and WG2 stuff will be added selectively? 15:12:44 C-Keen: I hope that, but it would be too much to say that I think that. 15:13:10 jcowan: As I see it WG1 is not too far away from R5RS 15:13:13 yapsol [~yapsol@187.116.53.27] has joined #scheme 15:13:34 That's definitely the intention, but it is about 40% larger in terms of identifiers. 15:13:53 That's ok. 15:14:05 jcowan: most major implementations already have their own share of additional identifiers anyway 15:14:05 dnolen [~davidnole@184.152.69.75] has joined #scheme 15:14:16 Oh yes. 15:14:26 jcowan: would not hurt to bring them together a bit 15:14:29 -!- masm [~masm@bl15-133-247.dsl.telepac.pt] has quit [Ping timeout: 240 seconds] 15:14:30 I want to try implementing WG1 from scratch, in C++, as a proof of concept. 15:14:31 There will also be optional modules within the WG1 language 15:14:38 bweaver [~user@host-68-169-175-225.WISOLT2.epbfi.com] has joined #scheme 15:14:53 jcowan: oh dear 15:14:55 cky: Okay; note that Chibi is committed to moving to WG1 15:15:05 jcowan: Oh, cool! 15:15:20 (Well, doesn't foof chair WG1 or something? Or is that you?) 15:15:26 That would stand to reason. :-) 15:16:33 Foof chairs WG1, I chair WG2 15:16:58 C-Keen: The modules in WG1 language pretty much reflect existing optionality in R5RS. 15:17:30 *nods* 15:18:28 For example, instead of saying that magnitude, angle, make-rectangular, etc. are only required when you have complex numbers, we put them in a module "complex". If the implementation provides complex numbers, it does so by providing this module. 15:19:03 Similarly, by putting file operations in a module, "read" in another, and "display"/"write" in a third, we cater for embedded applications. 15:19:23 jcowan: I remember felix having questions on the evaluation order wording with import statements 15:19:51 jcowan: Is there a WG1 draft online? 15:20:01 *C-Keen* should have a look in trac's ticket system 15:20:51 Agari: No. We need volunteers to work on it, though. 15:22:45 Count me in if I can help (although my free time is limited). 15:23:15 In the meantime, is there a blog or some resource to look at progress being made? mailing list? 15:24:17 http://trac.sacrideo.us/wg/report/8 shows all the tickets in "decided" and "writing" state. 15:27:32 -!- ray_ [ray@xkcd-sucks.org] has quit [Remote host closed the connection] 15:29:28 ray [ray@xkcd-sucks.org] has joined #scheme 15:35:22 -!- githogori [~githogori@adsl-66-123-22-146.dsl.snfc21.pacbell.net] has quit [Ping timeout: 255 seconds] 15:39:02 -!- dnolen [~davidnole@184.152.69.75] has quit [Quit: dnolen] 15:39:21 It looks like WG1 will be at some place between R5RS and R6RS with a few SRFI-funcionality thrown in. 15:40:30 MrFahrenheit [~RageOfTho@users-148-140.vinet.ba] has joined #scheme 15:40:43 In size, yes. 15:41:12 Some specifics come from R6RS, but not too many; the SRFIs and existing practice have been a much better guide. 15:41:38 I'm basically very happy with it, although there are a few things I wish had gotten in that didn't. 15:41:41 tonyg [~tonyg@navarone.ccs.neu.edu] has joined #scheme 15:41:56 -!- bweaver [~user@host-68-169-175-225.WISOLT2.epbfi.com] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 15:42:02 For example, we can now portably throw errors, but we have no portable way of catching them. 15:42:34 -!- phao [phao@189.107.128.29] has quit [Ping timeout: 255 seconds] 15:42:37 vu3rdd [~vu3rdd@122.167.112.38] has joined #scheme 15:42:37 -!- vu3rdd [~vu3rdd@122.167.112.38] has quit [Changing host] 15:42:37 vu3rdd [~vu3rdd@fsf/member/vu3rdd] has joined #scheme 15:42:42 -!- jesusito [~user@58.pool85-49-45.dynamic.orange.es] has left #scheme 15:42:54 Which means C-based implementations are free to implement error as abort. ;-) 15:43:05 Quite. 15:43:05 :-( 15:43:10 this is redhibitory. 15:43:13 -!- Gmind [~Nevermind@113.190.169.177] has quit [Quit: Leaving.] 15:43:32 I think I'll wait for r8rs before considering scheme... 15:43:54 corruptmemory [~jim@96.246.167.18] has joined #scheme 15:43:59 It's not in WG1, but that does not mean it won't be in WG2. 15:44:13 I'm almost certain WG2 will have a means to catch errors. 15:44:29 jcowan: So having 'error' (SRFI23) was agreed upon, but not having an exception mechanism. 15:44:35 Right. 15:44:54 I feel that's partly my fault; I should have gotten behind R6RS, which is good enough. 15:45:20 I was concerned to keep out the R6RS *condition* system. 15:45:23 In terms of exceptions? Or in terms of the whole bath-water-plus-baby? 15:45:29 Exceptions. 15:45:32 Ah. 15:46:03 pjb: I'll be happy to refund twice what you paid for the standard. 15:46:18 Thanks. 15:47:31 -!- femtoo [~femto@95-89-248-198-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 15:50:01 The only other thing I'm personally unhappy about is that mutable strings are still in; I hate them. 15:50:07 dnolen [~davidnole@184.152.69.75] has joined #scheme 15:50:26 Gmind [~Nevermind@113.190.169.177] has joined #scheme 15:52:34 *jcowan* wishes the rest of the U.S. had redhibitory actions, not just Louisiana 15:52:57 Now that we talk of standards, it might be worth revisiting at least the definition or conditions for 'proper tail recursion' in the specification? 15:53:39 Agari: There are more places that you wish to consider tail locations? 15:53:52 -!- dnolen [~davidnole@184.152.69.75] has quit [Client Quit] 15:54:08 jcowan: Yeah, mutable strings are distinctly concurrency-unfriendly. *nods* 15:54:42 They are also not very Unicode-friendly, unless you use UTF-32 as the internal representation. 15:54:45 In particular (or otherwise I've read it wrong) it does specify that the first argument to 'apply' must be called via a tail call but I feel it fails to resolve whether other primitives (for example: map) should do that too. 15:54:59 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Read error: Connection reset by peer] 15:55:25 It doesn't make much sense to tail-call the mapping function, as you have to get control again in order to construct the result. 15:55:40 s/you/'map' 15:55:43 binary_crayon [~binary_cr@pp002332dca816.usask.ca] has joined #scheme 15:56:42 for-each's function is tail-called on the last element only, I think. 15:58:12 copumpkin [~pumpkin@gw1.mcgraw-hill.com] has joined #scheme 15:58:12 I remember there were also some implications of this and call/cc, let's see if I can find a link. I agree it's not a big deal anyway though. 15:58:12 -!- copumpkin [~pumpkin@gw1.mcgraw-hill.com] has quit [Changing host] 15:58:12 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 16:01:06 bweaver [~user@host-68-169-175-225.WISOLT2.epbfi.com] has joined #scheme 16:03:07 Ah, here it is: http://sisc-scheme.org/r5rs_pitfall.scm (last test on the page). 16:10:23 drdo [~user@2001:690:2100:1d:226:8ff:fef7:3d9e] has joined #scheme 16:10:30 -!- yapsol [~yapsol@187.116.53.27] has quit [Read error: Connection reset by peer] 16:12:24 Agari: That one has three "ideal" behaviours, of which only two can be achieved. 16:12:49 Agari: Implmentations have the discretion to choose which two. 16:14:12 -!- lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has quit [Remote host closed the connection] 16:15:24 mario-go` [~user@67.205.85.241] has joined #scheme 16:16:04 cky: I believe it would be good that the standard mentions if the behaviour of such programs is implementation-defined or has an expected value. 16:18:46 -!- hkBst [~quassel@gentoo/developer/hkbst] has quit [Read error: Connection reset by peer] 16:19:17 -!- mario-go` [~user@67.205.85.241] has quit [Client Quit] 16:19:27 -!- mario-goulart [~user@67.205.85.241] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 16:19:31 ha 16:20:02 I see that newbie asked again about the difference between Scheme and CLisp 16:20:03 :)) 16:20:07 =)) 16:20:13 mario-goulart [~user@67.205.85.241] has joined #scheme 16:20:20 please stop confusing newbies =)) 16:22:38 Agari: But specifying that would break about half the implementations out there, for some value of "half". 16:23:05 Gmind: s/CLisp/CL/ 16:23:32 cky: fortunately, there aren't WG1 implementations out there yet! 16:23:47 Agari: Fair enough. 16:24:06 =.= 16:24:39 Gmind: CLisp is too easy to confuse with CLISP, which is an implementation of Common Lisp. 16:24:48 god 16:24:52 :| 16:24:53 maybe he meant to compare Chibi with CLISP 16:25:13 next time I will stop "stand for"... 16:25:40 btw, Land of Lisp is so fun 16:25:43 bremner: Now there's a world of difference! 16:26:10 are vectors a built-in datatype? 16:26:23 Caleb--: Yes. 16:26:40 because i implemented it using a list, so i didn't see why it would be faster at access time 16:26:50 because down below it's just using (list-ref) to access elements 16:26:55 user17 [~user@p5B2A9D65.dip0.t-ipconnect.de] has joined #scheme 16:27:03 Caleb--: Try this: (vector-ref v 1000000) vs (list-ref l 1000000). 16:27:05 so i bet the scheme implementation is smarter about that :) 16:27:07 You'll feel the difference. 16:27:27 One version is 1000000 times slower. :-P 16:27:31 hehe 16:28:11 (hey, can I use geiser with Lisp ?) 16:28:24 thoolihan [~Tim@209.221.3.130] has joined #scheme 16:29:05 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 16:29:44 -!- thoolihan [~Tim@209.221.3.130] has left #scheme 16:30:03 *Caleb--* downloads Racket 5.1 16:30:06 i had DrScheme 209 :P 16:30:18 -!- jimrees_ [~jimrees@ita4fw1.itasoftware.com] has quit [Quit: Ex-Chat] 16:31:13 i remember that there are SICP extension somewhere 16:31:17 extensions* 16:33:00 -!- drdo [~user@2001:690:2100:1d:226:8ff:fef7:3d9e] has quit [Ping timeout: 260 seconds] 16:33:08 -!- mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has quit [Read error: Connection reset by peer] 16:34:09 do i need to do anything special to support SICP? 16:40:15 pumpkin [~pumpkin@gw1.mcgraw-hill.com] has joined #scheme 16:40:15 -!- pumpkin [~pumpkin@gw1.mcgraw-hill.com] has quit [Changing host] 16:40:16 pumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 16:41:01 copumpki_ [~pumpkin@gw1.mcgraw-hill.com] has joined #scheme 16:41:43 copumpk__ [~pumpkin@gw1.mcgraw-hill.com] has joined #scheme 16:42:10 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 240 seconds] 16:42:15 tupi [~david@139.82.89.24] has joined #scheme 16:44:40 -!- pumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 246 seconds] 16:45:19 -!- copumpki_ [~pumpkin@gw1.mcgraw-hill.com] has quit [Ping timeout: 260 seconds] 16:46:17 -!- copumpk__ [~pumpkin@gw1.mcgraw-hill.com] has quit [Ping timeout: 264 seconds] 16:49:34 masm [~masm@bl19-133-159.dsl.telepac.pt] has joined #scheme 16:50:09 mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has joined #scheme 16:51:11 -!- jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has quit [Quit: Leaving] 16:54:03 crap, it's not running some of my older code 16:54:29 -!- tauntaun [~Antoninus@ool-44c7e46c.dyn.optonline.net] has quit [Ping timeout: 240 seconds] 16:54:58 -!- binary_crayon [~binary_cr@pp002332dca816.usask.ca] has quit [Remote host closed the connection] 16:55:29 Gmind1 [~Nevermind@113.190.169.177] has joined #scheme 16:55:39 offby1 [~user@pdpc/supporter/monthlybyte/offby1] has joined #scheme 16:56:51 -!- Gmind [~Nevermind@113.190.169.177] has quit [Ping timeout: 250 seconds] 16:58:43 -!- davazp [~user@15.Red-83-57-38.dynamicIP.rima-tde.net] has quit [Remote host closed the connection] 16:59:24 jimrees_ [~jimrees@ita4fw1.itasoftware.com] has joined #scheme 17:00:12 To load: (require (planet neil/sicp:1:13)) 17:00:15 where do i type that? 17:02:25 githogori [~githogori@63.sub-69-99-188.myvzw.com] has joined #scheme 17:02:35 Caleb--: Top-level. 17:02:40 oh 17:02:55 -!- githogori [~githogori@63.sub-69-99-188.myvzw.com] has quit [Read error: Connection reset by peer] 17:02:58 wingo_ [~wingo@74.Red-80-24-4.staticIP.rima-tde.net] has joined #scheme 17:03:04 githogori [~githogori@63.sub-69-99-188.myvzw.com] has joined #scheme 17:03:10 i suppose that this is a good SICP package 17:05:42 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 17:07:42 reference to undefined identifier: null 17:07:58 require: namespace mismatch; reference (phase 1) to a module "C:\Program Files (x86)\Racket\collects\errortrace\errortrace-key.rkt" that is not available (phase level 0) in: errortrace-key 17:08:00 damn :/ 17:08:16 -!- pygospa [~pygospa@kiel-4dbec94a.pool.mediaWays.net] has quit [Disconnected by services] 17:08:28 pygospa [~pygospa@kiel-4d067cf6.pool.mediaWays.net] has joined #scheme 17:09:14 -!- githogori [~githogori@63.sub-69-99-188.myvzw.com] has quit [Ping timeout: 260 seconds] 17:11:12 -!- wingo_ [~wingo@74.Red-80-24-4.staticIP.rima-tde.net] has quit [Ping timeout: 272 seconds] 17:16:42 back to v209 17:18:13 O_o 17:18:21 That's a seriously ancient version to use. 17:19:08 i'm getting errors with my code 17:19:30 even after switching to that SICP package 17:19:54 using the PLT Graphical language, all works fine 17:20:01 (with v209) 17:20:16 alexsuraci [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #scheme 17:20:31 -!- alexsuraci [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has left #scheme 17:20:48 Hmm. 17:28:26 -!- tronador_ [~guille@190.145.89.146] has quit [Quit: tronador_] 17:31:04 tauntaun [~Antoninus@ool-44c7e46c.dyn.optonline.net] has joined #scheme 17:31:22 tronador_ [~guille@190.145.89.146] has joined #scheme 17:32:39 -!- tronador_ [~guille@190.145.89.146] has quit [Client Quit] 17:33:55 carleastlund [~cce@gotham.ccs.neu.edu] has joined #scheme 17:34:41 tronador_ [~guille@190.145.89.146] has joined #scheme 17:41:41 -!- mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has quit [Ping timeout: 240 seconds] 17:44:25 Where can I find a list of all the cs variables from foo, bar, baz to how ever long they stretch..? 17:46:25 http://en.wikipedia.org/wiki/Metasyntactic_variable 17:48:06 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 17:51:37 -!- mathk [~mathk@lns-bzn-32-82-254-57-129.adsl.proxad.net] has quit [Read error: Connection reset by peer] 17:51:49 mathk [~mathk@lns-bzn-40-82-251-181-29.adsl.proxad.net] has joined #scheme 17:53:08 mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has joined #scheme 17:54:16 -!- alexsuraci` [~alex@pool-71-188-133-67.aubnin.fios.verizon.net] has left #scheme 17:55:39 abhinav [~abhinav@122.172.207.135] has joined #scheme 17:57:08 -!- Gmind1 [~Nevermind@113.190.169.177] has quit [Read error: Connection reset by peer] 18:02:24 jesusito [~user@58.pool85-49-45.dynamic.orange.es] has joined #scheme 18:04:38 lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has joined #scheme 18:07:26 -!- dlouhy [~jdlouhy@zerowing.ccs.neu.edu] has quit [Quit: leaving] 18:07:34 jeff___ [~jdlouhy@zerowing.ccs.neu.edu] has joined #scheme 18:12:29 -!- Agari [~Agari@180.Red-81-33-92.dynamicIP.rima-tde.net] has quit [Ping timeout: 240 seconds] 18:15:58 teurastaja [~user@modemcable182.177-200-24.mc.videotron.ca] has joined #scheme 18:16:13 drdo [~user@lab9p6.rnl.ist.utl.pt] has joined #scheme 18:19:41 -!- vu3rdd [~vu3rdd@fsf/member/vu3rdd] has quit [Ping timeout: 240 seconds] 18:24:16 -!- Caleb-- [thedude@109.67.207.23] has quit [Ping timeout: 240 seconds] 18:26:53 -!- tauntaun [~Antoninus@ool-44c7e46c.dyn.optonline.net] has quit [Ping timeout: 240 seconds] 18:29:03 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 276 seconds] 18:29:22 Caleb-- [~caleb@109.64.202.178] has joined #scheme 18:32:09 -!- wbooze [~levgue@xdsl-78-35-176-59.netcologne.de] has quit [Read error: Connection reset by peer] 18:32:29 -!- homie [~levgue@xdsl-78-35-176-59.netcologne.de] has quit [Read error: Connection reset by peer] 18:33:32 wbooze [~levgue@xdsl-78-35-132-130.netcologne.de] has joined #scheme 18:33:48 homie [~levgue@xdsl-78-35-132-130.netcologne.de] has joined #scheme 18:34:18 -!- DrDuck [~duck@216.186.151.63] has quit [Ping timeout: 246 seconds] 18:34:48 davazp [~user@15.Red-83-57-38.dynamicIP.rima-tde.net] has joined #scheme 18:37:56 -!- tronador_ [~guille@190.145.89.146] has quit [Quit: tronador_] 18:41:17 -!- MichaelRaskin [~MichaelRa@195.178.216.22] has quit [Remote host closed the connection] 18:49:04 -!- nilg` [~user@77.70.2.229] has quit [Remote host closed the connection] 18:53:52 Agari [~Agari@180.Red-81-33-92.dynamicIP.rima-tde.net] has joined #scheme 18:54:26 -!- mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has quit [Ping timeout: 272 seconds] 18:57:03 tauntaun [~Antoninus@ool-44c7e46c.dyn.optonline.net] has joined #scheme 19:04:21 is there a quick way to print n spaces? 19:04:27 like, indents 19:07:29 (printf "~a" (make-string 5 #\n)) 19:10:40 zanes [~zane@wall.tripitinc.com] has joined #scheme 19:14:01 rudybot: (printf "~5a" "") 19:14:01 cky: your racket sandbox is ready 19:14:01 cky: error: printf: expects type as 1st argument, given: "~5a"; other arguments were: "" 19:14:07 Hmpf. 19:16:50 why not just (display (make-string 5 #\space)) 19:17:36 thats cleaner 19:17:50 tronador_ [~guille@190.145.89.146] has joined #scheme 19:19:13 rudybot: (for ([i (in-range 5)]) (display #\space)) 19:19:14 carleastlund: your sandbox is ready 19:19:14 carleastlund: ; stdout: " " 19:19:23 Saves even allocating a string ;) 19:21:12 print " " * 5 19:22:08 -!- tauntaun [~Antoninus@ool-44c7e46c.dyn.optonline.net] has quit [Quit: Ex-Chat] 19:22:54 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving] 19:26:23 -!- drdo [~user@lab9p6.rnl.ist.utl.pt] has quit [Remote host closed the connection] 19:26:42 never seen in-range before hmm... 19:28:40 githogori [~githogori@175.sub-75-208-44.myvzw.com] has joined #scheme 19:31:11 -!- teurastaja [~user@modemcable182.177-200-24.mc.videotron.ca] has quit [] 19:31:25 -!- acs_ [59eed542@gateway/web/freenode/ip.89.238.213.66] has quit [Ping timeout: 245 seconds] 19:33:29 mippymoe [~mathguru1@67-194-39-225.wireless.umnet.umich.edu] has joined #scheme 19:34:55 schmir [~schmir@p54A90A3F.dip0.t-ipconnect.de] has joined #scheme 19:36:23 copumpkin [~pumpkin@gw1.mcgraw-hill.com] has joined #scheme 19:36:23 -!- copumpkin [~pumpkin@gw1.mcgraw-hill.com] has quit [Changing host] 19:36:23 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 19:37:14 rdd` [~rdd@c83-250-51-60.bredband.comhem.se] has joined #scheme 19:40:30 -!- rdd [~rdd@c83-250-51-60.bredband.comhem.se] has quit [Ping timeout: 240 seconds] 19:44:13 -!- rdd` is now known as rdd 19:45:50 -!- githogori [~githogori@175.sub-75-208-44.myvzw.com] has quit [Ping timeout: 240 seconds] 19:46:02 cool, thx 19:50:51 Oh, I should have clarified -- my answer was a Racketism; not portable. Sorry if that was confusing. 20:11:42 nilg [~user@77.70.2.229] has joined #scheme 20:14:53 -!- jewel [~jewel@196-215-88-87.dynamic.isadsl.co.za] has quit [Ping timeout: 240 seconds] 20:18:08 femtoo [~femto@95-89-248-198-dynip.superkabel.de] has joined #scheme 20:18:57 -!- pygospa is now known as philluu 20:19:47 -!- philluu is now known as phillu 20:26:18 -!- phillu is now known as phillusMom 20:27:24 -!- mippymoe [~mathguru1@67-194-39-225.wireless.umnet.umich.edu] has quit [Read error: Operation timed out] 20:29:25 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 20:30:43 -!- phillusMom is now known as pygospa 20:36:38 a new problem! :) 20:36:41 http://paste.lisp.org/display/119731 20:36:53 this is some code i wrote for a search tree 20:37:24 the only problematic function is (del-tree-val! t n) which is supposed to delete the the node 'n' from the tree 't' 20:37:37 githogori [~githogori@44.sub-75-208-59.myvzw.com] has joined #scheme 20:37:52 the malfunctioning bit is where it calculates "min-in-right" and "min-in-left" 20:37:53 -!- homie [~levgue@xdsl-78-35-132-130.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 20:38:00 -!- wbooze [~levgue@xdsl-78-35-132-130.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 20:38:10 that is, the smallest element in the right subtree, or the largest element in the left subtree 20:38:24 the accumulate function doesn't work as i thought it would, and i'm not sure why 20:38:29 some test code is at the bottom 20:40:49 homie [~levgue@xdsl-78-35-132-130.netcologne.de] has joined #scheme 20:45:10 -!- femtoo [~femto@95-89-248-198-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 20:45:59 wbooze [~levgue@xdsl-78-35-132-130.netcologne.de] has joined #scheme 20:46:29 -!- schmir [~schmir@p54A90A3F.dip0.t-ipconnect.de] has quit [Ping timeout: 240 seconds] 20:50:16 no, wait 20:50:21 the accumulate code does work 20:50:25 something else is wrong 20:51:12 interglacial [~interglac@95.151.44.198] has joined #scheme 20:53:33 Hahahahahaha. 20:56:03 WHAT 20:57:01 oh, shit, i dun goof'd 20:57:17 You found your problem? 21:01:58 bah, still doesn't work 21:02:25 Awwww.... 21:02:42 make-empty is fubar'd? 21:04:01 i give up 21:04:28 langmartin [~user@exeuntcha2.tva.gov] has joined #scheme 21:04:49 Caleb--: You should try using a real record, if you can. 21:04:59 It'd make the code a bit easier to reason about. 21:05:11 -!- githogori [~githogori@44.sub-75-208-59.myvzw.com] has quit [Ping timeout: 276 seconds] 21:05:24 i only know about lists and vectors 21:07:00 Hmmmm.... 21:07:07 first of all, i think that make-empty is wrong 21:07:26 Caleb--: Yes, it is. 21:07:30 it changes the pointer, instead of what's it pointing to 21:07:36 Caleb--: Scheme is pass-by-value, not pass-by-reference. 21:07:51 (define (make-empty! t)_________________________________________) 21:07:56 that's not much space for a definition 21:08:00 so i had to keep it short 21:08:16 maybe they had some different implementation in mind 21:08:44 i don't think i could fit 3 set-car!s in that space 21:08:47 NihilistDandy [~ND@c-75-69-129-101.hsd1.nh.comcast.net] has joined #scheme 21:09:38 Caleb--: (pair-for-each (cut set-car! <> #f) t) 21:09:51 :( 21:10:11 can't use something we didn't learn though :S 21:10:25 see if you can restrict yourself to the most basic functions 21:10:59 set!, set-car!, set-cdr!, map, filter, accumulate, append, reverse, car, cdr 21:11:33 -!- museun [~what@c-98-252-140-73.hsd1.ga.comcast.net] has quit [] 21:19:04 -!- z0d [~z0d@unaffiliated/z0d] has quit [Ping timeout: 240 seconds] 21:20:55 hmm 21:21:14 first of all i did fix some problems with that accumulate bit 21:21:22 but now i see that the problem is after removing 15 21:25:19 oh my 21:25:20 fixed it 21:25:22 cky! 21:25:35 !!!! 21:26:39 new code pasted as annotation 21:27:29 *checks* 21:28:03 I thought you said you couldn't bear to write three set-car! calls. 21:28:13 I'm glad you got it going, anyway. 21:28:21 yeah, but first iw anted to fix this code 21:28:27 *nods* 21:28:59 cky, so 3 problems were fixed: 1) bad make-empty code 2) the first 2 conditions in the cond were in reverse, if n < node it went right instead of left 3) accumulate needed to get the first node of the subtree as init, and not 'n' itself 21:31:17 -!- NihilistDandy [~ND@c-75-69-129-101.hsd1.nh.comcast.net] has quit [Quit: class] 21:31:27 *nods* 21:32:08 now let's see if we can do something about the low-level implementation of the tree itself 21:33:46 i have only two choices anyway, and i don't see anything better than a list ;p 21:34:17 IF a list was your only choice of implementing this tree, how else would you do it? 21:37:17 ysph [~user@75-143-85-15.dhcp.aubn.al.charter.com] has joined #scheme 21:43:20 kuribas [~user@d54C43860.access.telenet.be] has joined #scheme 21:43:34 -!- davazp [~user@15.Red-83-57-38.dynamicIP.rima-tde.net] has quit [Read error: Connection reset by peer] 21:45:38 davazp [~user@15.Red-83-57-38.dynamicIP.rima-tde.net] has joined #scheme 21:45:45 -!- jesusito [~user@58.pool85-49-45.dynamic.orange.es] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 21:50:11 githogori [~githogori@225.sub-75-210-80.myvzw.com] has joined #scheme 21:51:33 my god, these stream question blow my mind 21:56:20 -!- nilg [~user@77.70.2.229] has quit [Read error: Connection reset by peer] 21:56:29 -!- ysph [~user@75-143-85-15.dhcp.aubn.al.charter.com] has quit [Ping timeout: 240 seconds] 21:56:47 what book/questions are you reading Caleb? 21:57:05 doing previous exams 21:57:32 ah k 21:57:48 teurastaja [~user@modemcable182.177-200-24.mc.videotron.ca] has joined #scheme 21:58:28 ysph [~user@75-143-85-15.dhcp.aubn.al.charter.com] has joined #scheme 22:01:08 -!- langmartin [~user@exeuntcha2.tva.gov] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:08:00 -!- cpach [~carl@h167n3-sde-a31.ias.bredband.telia.com] has quit [Quit: leaving] 22:08:55 "When he says the bed is two feet wide, it is, in fact, sixty feet wide." 22:10:17 Caleb--: how you implement your tree data structure is totally irrelevant. (It's only a concern of performance, and given the usually small number of slot a tree node has, any underlying data type will be about the same speed and size). 22:10:30 Caleb--: what matters, is that you define a functional abstraction for it, and stick to it. 22:11:04 Caleb--: perhaps you should read SICP (and watch the videos). 22:11:08 -!- ASau [~user@89-178-250-194.broadband.corbina.ru] has quit [Ping timeout: 240 seconds] 22:11:51 pjb, the issue here is not which implementation is good performance-wise, but which implementation fits better into the allotted space given to write it on the test 22:15:20 since i have limited space, and they give a partial template, then i have no choice 22:15:35 -!- tronador_ [~guille@190.145.89.146] has quit [Quit: tronador_] 22:23:49 mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has joined #scheme 22:27:27 tauntaun [~Antoninus@ool-43511b93.dyn.optonline.net] has joined #scheme 22:33:17 -!- lbc [~quassel@1908ds1-aboes.0.fullrate.dk] has quit [Remote host closed the connection] 22:34:20 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 22:41:53 drdo [~user@bl11-44-58.dsl.telepac.pt] has joined #scheme 22:43:26 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Quit: Leaving] 22:43:32 Nisstyre_ [~nisstyre@infocalypse-net.info] has joined #scheme 22:43:53 -!- Nisstyre_ [~nisstyre@infocalypse-net.info] has quit [Remote host closed the connection] 22:46:46 Nisstyre_ [~nisstyre@infocalypse-net.info] has joined #scheme 22:46:57 jao [~jao@pdpc/supporter/professional/jao] has joined #scheme 22:47:18 -!- Nisstyre_ [~nisstyre@infocalypse-net.info] has quit [Remote host closed the connection] 22:57:00 -!- aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has quit [Quit: aisa] 22:58:03 -!- tauntaun [~Antoninus@ool-43511b93.dyn.optonline.net] has quit [Quit: Ex-Chat] 22:58:08 jesusito [~user@58.pool85-49-45.dynamic.orange.es] has joined #scheme 23:02:03 -!- jesusito [~user@58.pool85-49-45.dynamic.orange.es] has quit [Client Quit] 23:05:35 -!- corruptmemory [~jim@96.246.167.18] has quit [Remote host closed the connection] 23:06:58 rasterba_ [~rasterbar@99-113-184-115.lightspeed.sntcca.sbcglobal.net] has joined #scheme 23:07:33 -!- rasterbar [~rasterbar@unaffiliated/rasterbar] has quit [Ping timeout: 240 seconds] 23:09:38 rasterbar [~rasterbar@unaffiliated/rasterbar] has joined #scheme 23:10:56 -!- jao [~jao@pdpc/supporter/professional/jao] has quit [Remote host closed the connection] 23:12:12 -!- rasterba_ [~rasterbar@99-113-184-115.lightspeed.sntcca.sbcglobal.net] has quit [Ping timeout: 272 seconds] 23:15:59 Nisstyre [~nisstyre@infocalypse-net.info] has joined #scheme 23:16:56 -!- rasterbar [~rasterbar@unaffiliated/rasterbar] has quit [Remote host closed the connection] 23:23:03 RageOfThou [~RageOfTho@users-148-140.vinet.ba] has joined #scheme 23:25:29 -!- drdo [~user@bl11-44-58.dsl.telepac.pt] has quit [Ping timeout: 260 seconds] 23:26:14 -!- RageOfThou [~RageOfTho@users-148-140.vinet.ba] has quit [Read error: Connection reset by peer] 23:26:31 -!- MrFahrenheit [~RageOfTho@users-148-140.vinet.ba] has quit [Ping timeout: 255 seconds] 23:27:26 RageOfThou [~RageOfTho@users-148-140.vinet.ba] has joined #scheme 23:27:57 tronador_ [~guille@190.255.83.103] has joined #scheme 23:28:53 -!- mippymoe [~mathguru1@c-24-11-171-16.hsd1.mi.comcast.net] has quit [Ping timeout: 240 seconds] 23:29:31 rasterbar [~rasterbar@unaffiliated/rasterbar] has joined #scheme 23:46:30 -!- githogori [~githogori@225.sub-75-210-80.myvzw.com] has quit [Ping timeout: 240 seconds] 23:55:29 -!- RageOfThou [~RageOfTho@users-148-140.vinet.ba] has quit [Read error: Connection reset by peer] 23:56:04 RageOfThou [~RageOfTho@users-148-140.vinet.ba] has joined #scheme 23:56:29 -!- teurastaja [~user@modemcable182.177-200-24.mc.videotron.ca] has quit [Ping timeout: 240 seconds] 23:59:53 teurastaja [~user@modemcable182.177-200-24.mc.videotron.ca] has joined #scheme