00:03:31 realitygrill [~realitygr@76.226.139.34] has joined #scheme 00:14:50 geef [~king@108-215-232-154.lightspeed.hstntx.sbcglobal.net] has joined #scheme 00:15:19 i have a list of pairs and i want to subtract the smallest car from the largest car. 00:16:03 is (- (apply min (map car listofpairs)) (apply max (map car listofpairs))) the right way to do it? 00:18:15 geef: Well, there are better ways. :-) 00:18:36 Also, you swapped the order of arguments for the -, but that's by the by. 00:19:17 -!- homie` [~levgue@xdsl-78-35-154-182.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 00:19:25 For something simple, you could do: (let ((cars (map car listofpairs))) (- (apply max cars) (apply min carsn))) 00:19:28 *carn 00:19:30 *cars 00:20:48 -!- rostayob [~rostayob@02d99acf.bb.sky.com] has quit [Quit: WeeChat 0.3.5] 00:22:07 thanks 00:22:19 :-) 00:22:20 wbooze [~wbooze@xdsl-78-35-154-182.netcologne.de] has joined #scheme 00:22:42 you can get the max and min in one pass, but it's slightly more ugly 00:22:54 ijp: Indeed, that is my preference. 00:23:23 LeoNerd [~leo@cel.leonerd.org.uk] has joined #scheme 00:25:06 -!- wbooze [~wbooze@xdsl-78-35-154-182.netcologne.de] has quit [Remote host closed the connection] 00:25:55 copumpkin [~copumpkin@unaffiliated/pumpkingod] has joined #scheme 00:26:47 rudybot: (define (minmax lst) (foldl (lambda (e x) (if (pair? x) (cons (min e (car x)) (max e (cdr x))) (cons e e))) #f lst)) 00:26:49 cky: your sandbox is ready 00:26:49 cky: Done. 00:26:56 -!- porco [~porco@125.33.83.213] has quit [] 00:26:57 rudybot: (minmax '(1 2 3 4 5 6)) 00:26:58 cky: ; Value: (1 . 6) 00:27:32 cute 00:27:50 I have some haskell inspired code that makes this (let ((max/min (fold-map (product max-monoid min-monoid) (lambda (x) (cons (car x) (car x))) list))) (- (car max/min) (cdr max/min))) 00:28:11 Though isn't the optimal version the one where you take list elements in pairs? 00:28:19 LeoNerd: No. 00:28:36 LeoNerd: Or, at least, no reason I can come up with. 00:28:46 -!- bytbox [~s@129.2.129.228] has quit [Quit: Lost terminal] 00:28:55 Fewer comparisons 00:28:58 rostayob [~rostayob@02d99acf.bb.sky.com] has joined #scheme 00:29:39 Can you explain? 00:30:02 Take list elements two at a time, compare them (1), swap if out of order, then (max bigger currentmax) => newmax, ditto for min. 3 comparisons total, for every 2 elements. 00:30:33 Whereas, other algorithms do 2 comparisons total for every element, one for min, one for max. 00:31:23 It'd be interesting to try to time it. In any case, it'd make the code somewhat more complicated. 00:31:53 A little bit 00:32:00 Well, for starters, you can't use fold any more. 00:32:07 I'd be tempted to loop it 00:32:11 loop with case-lambda. 00:32:30 How would you loop with case-lambda in a way that isn't slow? :-) 00:33:35 First, understand this: (eq? x (apply (lambda x x) x)) is #f, always, guaranteed. 00:33:56 That means, any time you use apply, the arguments are always copied. 00:34:15 Ya... 00:34:31 If you're literally doing this with, say, numbers, then probably the naive implementation is realworld quicker 00:34:50 But if the comparison operation is complex, then the 2-at-a-time minmax algorithm is cheaper in comparisons, so may be quicker overall 00:35:18 If the comparison operation is complex, you can also use Schwartzian transform. :-) 00:35:36 Ah.. sometimes, yeah. 00:35:57 .oO( You -are- talking to the person who wrote List::UtilsBy::max_by in perl ;) ) 00:36:05 :-D 00:36:34 I haven't looked at List::UtilsBy. Does it use Schwartzian transform? :-) 00:36:40 Yes, basically 00:36:43 Cool. :-) 00:36:51 my $longest = max_by { length } @some_strings; 00:37:08 etc... sort_by, max/min_by, lots of functional list functions 00:37:34 bytbox [~s@129.2.129.228] has joined #scheme 00:37:39 -!- ticking [~janpaulbu@87.253.189.132] has quit [Quit: Linkinus - http://linkinus.com] 00:37:46 I got tired of having to explain to people how to do efficient sorting on #perl, so I just wrote a module, stuck it on CPAN, and shouted it at people :) 00:38:21 :-D 00:38:23 Oh.. on a vaguely related note, I couldn't find in R5 or similar a function to do this, so I wrote one instead. (any? predicate list) => returns #t if any element in list satisfies predicate. 00:38:27 Similar for all? 00:38:32 LeoNerd: It's in SRFI 1. 00:38:41 http://srfi.schemers.org/srfi-1/srfi-1.html 00:38:42 Hrmmm.. it is? Couldn't find it 00:38:46 SRFI 1 is like List::Util. 00:38:51 You really should use it heaps and heaps. 00:39:11 I saw it, yes... 00:39:28 rudybot: (require srfi/1) 00:39:28 cky: Done. 00:39:33 rudybot: (any even? '(1 2 3 4 5)) 00:39:34 cky: ; Value: #t 00:39:37 rudybot: (every even? '(1 2 3 4 5)) 00:39:38 cky: ; Value: #f 00:39:49 r6rs calls it 'exists' 00:39:53 Ahh... any and every. 00:39:59 Hrmmm... their names don't have ? 00:40:13 I know, it's crazy, right? 00:40:29 Yah, I can't use SRFI 1 yet because my implementation is still missing quite a few things.. 00:40:35 rudybot: (require srfi/1) 00:40:36 ijp: your sandbox is ready 00:40:36 ijp: Done. 00:40:45 like call-with-values/values, call-with-current-continuation,... 00:40:52 rudybot: eval (any values (iota 10)) 00:40:52 ijp: ; Value: 0 00:41:07 ^^ doesn't necessarily return a boolean 00:41:17 Oooh.. any and every are multi-list functions. hrmmm 00:41:23 rudybot: eval (every values (iota 10)) 00:41:23 ijp: ; Value: 9 00:41:25 Euthydemus [~euthydemu@unaffiliated/euthydemus] has joined #scheme 00:41:31 ijp: Very nice. 00:41:54 ijp: It means the last element is tail callable. :-) 00:42:08 ijp: I wrote a version of fold that tail-called on the last element, too. 00:42:51 Oooh.. I seee... SRFI's any returns -the- true value, mine just returned #t or #f 00:42:56 Hence being any? 00:43:23 LeoNerd: Right, but see how returning the actual value allows for tail calls, but returning #t/#f doesn't? 00:43:25 although it's an inconsistency, I quite like R6RS's 'exists' and 'for-all' choice of names 00:43:30 Yah 00:43:54 Ohyes,... I guess I'm just being defensive.. I'm used to C/Perl/etc... where 0, empty string, empty list, etc... are all false 00:43:58 rudybot: eval (require rnrs/lists-6) 00:43:59 ijp: Done. 00:44:09 rudybot: eval (for-all number? (iota 10)) 00:44:09 ijp: error: mcdr: expects argument of type ; given '(0 1 2 3 4 5 6 7 8 9) 00:44:16 wbooze [~wbooze@xdsl-78-35-154-182.netcologne.de] has joined #scheme 00:44:21 yech 00:44:28 bad racket! 00:44:47 So I have a disliking for returning values directly out of predicates.. :) 00:44:48 rudybot: eval (require racket/mpair) 00:44:48 ijp: Done. 00:44:53 rudybot: eval (for-all number? (list->mlist (iota 10))) 00:44:53 ijp: ; Value: #t 00:45:16 hypercube32 [~hypercube@246.111.188.72.cfl.res.rr.com] has joined #scheme 00:45:18 Hrm.... I wonder what percentage of SRFI 1 I could actually load.. 00:45:21 rudybot: eval (for-all number? (iota 10)) 00:45:21 *offby1: error: reference to an identifier before its definition: for-all in module: 'program 00:45:22 LeoNerd: well, if it doesn't return a boolean, it's not a really predicate 00:45:37 offby1: note the (require rnrs/lists-6) 00:45:39 ah 00:45:42 ijp: Well, the point is, mine do. And they're just one list, not multilist 00:45:53 I needed them for map 00:45:59 LeoNerd: I like anything that allows for tail calling. 00:46:05 Well, no. I needed any? for map, but I wrote all? just as an optimisation 00:46:06 So in this case, non-boolean > boolean. :-D 00:46:17 I just used (any? null? lists) 00:46:36 soveran [~soveran@186.19.214.247] has joined #scheme 00:47:31 Oooooh.... I see another way to do member/etc.. nicely here. member takes an optional equallity test param, defaulting to equal? if not. Then memq and memv just call member passing in eq? or eqv? 00:47:43 That would do it without the additional helper members 00:47:47 functions 00:48:48 Indeed. 00:49:15 Hmmm.. I might hack that in now actually. Then my predicate is basically clean, apart from my do-step helper macro 00:49:26 which I suspect let-syntax will let me solve ifwhen anyone explains it to me :) 00:50:04 rudybot: (define (member key lst (pred? equal?)) (cond ((null? lst) #f) ((pred? key (caar lst)) (car lst)) (else (member key (cdr lst) pred?)))) 00:50:04 cky: Done. 00:50:30 .. waitwhat..? 00:50:41 rudybot: (member "foobar" '(("foo" . "bar") ("bar" . "baz") ("foobar" . "qux"))) 00:50:41 cky: ; Value: #f 00:50:42 What's that (define (member key lst (pred? equal?)) part doing...? 00:51:06 LeoNerd: Default arguments. 00:51:10 Ahhh... cute 00:51:35 -!- bytbox [~s@129.2.129.228] has quit [Quit: Lost terminal] 00:51:38 xwl_ [user@nat/nokia/x-xyyewdcqqohehdxt] has joined #scheme 00:52:12 I was going to go for (define (member key list . maybe-pred) (let ((pred (if (pair? maybe-pred) (car maybe-pred) equal?))) .... ) 00:52:29 .. mostly as my impl. doesn't support those yet:) 00:52:37 Manual argument unpacking is so unsightly. :-P 00:52:50 Yeah.. I know... 00:53:15 I only got (define (name . formals) . body ) support a few days ago :P 00:53:20 bytbox [~s@129.2.129.228] has joined #scheme 00:53:21 Heh. 00:53:23 I got tired of (define name (lambda .... )) 00:53:28 *cky* heads off home. :-) 00:53:39 Gogo syntactic sugar. :-) 00:54:56 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 00:55:18 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 00:55:45 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 00:56:06 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 00:56:53 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 00:57:31 langmartin [~user@host-68-169-155-216.WISOLT2.epbfi.com] has joined #scheme 00:58:19 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [Client Quit] 00:58:53 *offby1* would have used [] for the default argument 00:59:03 turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has joined #scheme 00:59:19 -!- copumpkin [~copumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 245 seconds] 00:59:45 copumpkin [~copumpkin@unaffiliated/pumpkingod] has joined #scheme 00:59:48 I don't recognise [] or {} at all currently 01:01:04 -!- githogori [~githogori@216.207.36.222] has quit [Ping timeout: 272 seconds] 01:10:21 -!- DGASAU [~user@91.218.144.129] has quit [Read error: No route to host] 01:16:45 -!- rostayob [~rostayob@02d99acf.bb.sky.com] has quit [Quit: WeeChat 0.3.5] 01:21:25 -!- masm [~masm@2.80.175.203] has quit [Quit: Leaving.] 01:24:24 karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 01:24:38 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 240 seconds] 01:39:15 tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 01:48:32 -!- bigfg is now known as bfig 02:05:07 dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 02:19:08 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 02:19:45 githogori [~githogori@c-50-131-15-16.hsd1.ca.comcast.net] has joined #scheme 02:25:51 -!- X-Scale [email@sgi-ultra64.broker.freenet6.net] has quit [Read error: Connection reset by peer] 02:28:09 -!- tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 02:31:07 X-Scale [email@sgi-ultra64.broker.freenet6.net] has joined #scheme 02:32:01 tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 02:34:30 jcowan [~John@cpe-66-108-19-185.nyc.res.rr.com] has joined #scheme 02:36:36 hoi 02:39:54 -!- mister_m [~mattosaur@2620:0:2250:2110:223:5aff:fe7e:cc97] has quit [Remote host closed the connection] 02:43:23 -!- hypercube32 [~hypercube@246.111.188.72.cfl.res.rr.com] has quit [Quit: Leaving] 02:51:39 offby1: I'm having trouble propagating my "visited" list to higher levels of recursion. 02:52:13 (In reference to the DFS question I posted earlier.) 03:06:24 -!- GoKhlaYe1 [~GoKhlaYeh@135.51.68.86.rev.sfr.net] has quit [Ping timeout: 245 seconds] 03:07:08 paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has joined #scheme 03:13:49 -!- LeoNerd [~leo@cel.leonerd.org.uk] has quit [Ping timeout: 252 seconds] 03:20:27 -!- wbooze [~wbooze@xdsl-78-35-154-182.netcologne.de] has quit [Ping timeout: 245 seconds] 03:24:09 -!- karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 240 seconds] 03:29:36 mister_m [~mattosaur@216-80-123-91.c3-0.drb-ubr1.chi-drb.il.cable.rcn.com] has joined #scheme 03:32:04 ThePawnBreak [~quassel@94.177.108.25] has joined #scheme 03:32:10 attila_lendvai [~attila_le@m212-96-64-234.cust.tele2.kz] has joined #scheme 03:32:10 -!- attila_lendvai [~attila_le@m212-96-64-234.cust.tele2.kz] has quit [Changing host] 03:32:10 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 03:32:58 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has left #scheme 03:39:07 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 03:41:58 homie [~levgue@xdsl-78-35-141-9.netcologne.de] has joined #scheme 03:48:38 groovy2shoes [~cory@unaffiliated/groovebot] has joined #scheme 03:49:12 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Ping timeout: 245 seconds] 03:50:41 -!- langmartin [~user@host-68-169-155-216.WISOLT2.epbfi.com] has quit [Ping timeout: 260 seconds] 03:55:46 -!- mister_m [~mattosaur@216-80-123-91.c3-0.drb-ubr1.chi-drb.il.cable.rcn.com] has quit [Quit: Leaving] 03:57:21 toekutr [~user@50-0-51-2.dsl.static.sonic.net] has joined #scheme 04:00:36 hypnocat [~hypnocat@unaffiliated/hypnocat] has joined #scheme 04:07:30 -!- bytbox [~s@129.2.129.228] has quit [Read error: Operation timed out] 04:07:36 karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 04:07:48 mister_m [~mattosaur@216-80-123-91.c3-0.drb-ubr1.chi-drb.il.cable.rcn.com] has joined #scheme 04:18:33 soveran [~soveran@186.19.214.247] has joined #scheme 04:26:30 -!- hypnocat [~hypnocat@unaffiliated/hypnocat] has quit [Quit: ZNC - http://znc.sourceforge.net] 04:37:14 -!- turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has quit [Ping timeout: 245 seconds] 04:38:49 tupi_ [~david@189.67.42.60] has joined #scheme 04:47:13 -!- jrslepak [~jrslepak@c-71-233-151-135.hsd1.ma.comcast.net] has quit [Quit: Leaving] 04:47:29 -!- karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 240 seconds] 04:48:29 -!- MrFahrenheit [~RageOfTho@users-38-111.vinet.ba] has quit [Ping timeout: 245 seconds] 04:48:37 karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 04:50:53 -!- tupi_ [~david@189.67.42.60] has quit [Quit: Leaving] 04:55:17 -!- karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 248 seconds] 04:55:55 joast [~rick@98.145.65.117] has joined #scheme 04:56:28 karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 04:56:40 -!- groovy2shoes [~cory@unaffiliated/groovebot] has quit [Quit: Computer has gone to sleep] 04:59:12 -!- ThePawnBreak [~quassel@94.177.108.25] has quit [Ping timeout: 272 seconds] 04:59:36 -!- karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Excess Flood] 05:00:46 -!- kvda [~kvda@124-169-23-5.dyn.iinet.net.au] has quit [Quit: -___-] 05:01:48 karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 05:03:18 bytbox [~s@129.2.129.228] has joined #scheme 05:03:28 -!- paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has quit [Ping timeout: 252 seconds] 05:12:27 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 05:16:29 -!- realitygrill [~realitygr@76.226.139.34] has quit [Ping timeout: 240 seconds] 05:16:48 hypnocat [~hypnocat@unaffiliated/hypnocat] has joined #scheme 05:17:09 soveran [~soveran@186.19.214.247] has joined #scheme 05:31:21 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 05:33:41 -!- bfig [~b_fin_g@r186-48-194-143.dialup.adsl.anteldata.net.uy] has quit [Quit: Leaving] 05:34:28 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 05:37:00 -!- githogori [~githogori@c-50-131-15-16.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 05:37:09 -!- tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 05:41:57 githogori [~githogori@c-50-131-15-16.hsd1.ca.comcast.net] has joined #scheme 05:43:01 EmmanuelOga [~emmanuel@host83.190-31-137.telecom.net.ar] has joined #scheme 05:44:35 bfig [~b_fin_g@r186-48-194-143.dialup.adsl.anteldata.net.uy] has joined #scheme 05:44:43 gravicappa [~gravicapp@ppp91-77-175-50.pppoe.mtu-net.ru] has joined #scheme 05:48:32 jewel [~jewel@196-215-88-26.dynamic.isadsl.co.za] has joined #scheme 05:49:32 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Ping timeout: 252 seconds] 05:49:47 skld [~skld@vpn.bangalore.geodesic.com] has joined #scheme 05:49:47 -!- skld [~skld@vpn.bangalore.geodesic.com] has quit [Changing host] 05:49:47 skld [~skld@unaffiliated/skld] has joined #scheme 05:53:00 -!- jcowan [~John@cpe-66-108-19-185.nyc.res.rr.com] has quit [Quit: Leaving] 05:53:20 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 05:53:52 woonie [~woonie@nusnet-214-249.dynip.nus.edu.sg] has joined #scheme 05:56:49 -!- ijp [~user@host86-177-154-20.range86-177.btcentralplus.com] has quit [Quit: gnome completely borked -- restarting] 05:57:50 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Read error: Operation timed out] 05:58:18 confab [~confab@c-71-193-9-153.hsd1.ca.comcast.net] has joined #scheme 06:00:09 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 06:03:55 porco [~porco@222.130.130.151] has joined #scheme 06:10:37 -!- bfig [~b_fin_g@r186-48-194-143.dialup.adsl.anteldata.net.uy] has quit [Quit: Leaving] 06:12:56 tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 06:13:34 bfig [~b_fin_g@r186-48-194-143.dialup.adsl.anteldata.net.uy] has joined #scheme 06:14:29 -!- skld [~skld@unaffiliated/skld] has left #scheme 06:17:21 mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has joined #scheme 06:20:16 ijp [~user@host86-177-154-20.range86-177.btcentralplus.com] has joined #scheme 06:31:09 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Ping timeout: 240 seconds] 06:32:48 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Ping timeout: 252 seconds] 06:34:09 -!- jewel [~jewel@196-215-88-26.dynamic.isadsl.co.za] has quit [Ping timeout: 240 seconds] 06:34:29 -!- jao [~user@pdpc/supporter/professional/jao] has quit [Ping timeout: 240 seconds] 06:42:38 wbooze [~wbooze@xdsl-78-35-141-9.netcologne.de] has joined #scheme 06:56:03 -!- dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has quit [Ping timeout: 252 seconds] 07:01:49 -!- mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has quit [Ping timeout: 240 seconds] 07:03:58 -!- woonie [~woonie@nusnet-214-249.dynip.nus.edu.sg] has quit [Ping timeout: 272 seconds] 07:10:52 woonie [~woonie@nusnet-228-27.dynip.nus.edu.sg] has joined #scheme 07:11:17 -!- gravicappa [~gravicapp@ppp91-77-175-50.pppoe.mtu-net.ru] has quit [Ping timeout: 252 seconds] 07:13:29 -!- hypnocat [~hypnocat@unaffiliated/hypnocat] has quit [Ping timeout: 240 seconds] 07:15:08 -!- wbooze [~wbooze@xdsl-78-35-141-9.netcologne.de] has quit [Quit: Client Quit] 07:16:19 -!- mister_m [~mattosaur@216-80-123-91.c3-0.drb-ubr1.chi-drb.il.cable.rcn.com] has quit [Quit: Leaving] 07:17:48 ysph [~user@166.137.12.121] has joined #scheme 07:29:41 -!- ysph [~user@166.137.12.121] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 07:30:08 turbofail [~user@99-121-57-65.lightspeed.sntcca.sbcglobal.net] has joined #scheme 07:43:34 gravicappa [~gravicapp@ppp91-77-177-200.pppoe.mtu-net.ru] has joined #scheme 07:47:58 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 245 seconds] 07:48:05 ysph [~user@166.137.12.121] has joined #scheme 07:53:28 -!- toekutr [~user@50-0-51-2.dsl.static.sonic.net] has quit [Remote host closed the connection] 07:59:07 hkBst [~marijn@79.170.210.172] has joined #scheme 07:59:07 -!- hkBst [~marijn@79.170.210.172] has quit [Changing host] 07:59:07 hkBst [~marijn@gentoo/developer/hkbst] has joined #scheme 08:00:47 MichaelRaskin [~MichaelRa@3ad50e34.broker.freenet6.net] has joined #scheme 08:46:59 tom_i [~thomasing@cmc.beaming.biz] has joined #scheme 08:49:37 bfgun [~b_fin_g@r186-48-200-89.dialup.adsl.anteldata.net.uy] has joined #scheme 08:53:23 -!- bfig [~b_fin_g@r186-48-194-143.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 245 seconds] 08:55:06 wingo [~wingo@218.pool85-50-103.dynamic.orange.es] has joined #scheme 08:57:03 DGASAU [~user@91.218.144.129] has joined #scheme 09:01:02 kvda [~kvda@124-169-23-5.dyn.iinet.net.au] has joined #scheme 09:05:47 djcb [djcb@nat/nokia/x-tdpwczsrrszzabib] has joined #scheme 09:13:02 wbooze [~wbooze@xdsl-78-35-141-9.netcologne.de] has joined #scheme 09:24:28 rostayob [~rostayob@02d99acf.bb.sky.com] has joined #scheme 09:31:42 kpal [~kpal@janus-nat-128-240-225-120.ncl.ac.uk] has joined #scheme 09:38:57 -!- EmmanuelOga [~emmanuel@host83.190-31-137.telecom.net.ar] has quit [Ping timeout: 244 seconds] 09:45:12 -!- wbooze [~wbooze@xdsl-78-35-141-9.netcologne.de] has quit [Remote host closed the connection] 09:57:31 -!- MichaelRaskin [~MichaelRa@3ad50e34.broker.freenet6.net] has quit [Ping timeout: 252 seconds] 09:58:29 -!- woonie [~woonie@nusnet-228-27.dynip.nus.edu.sg] has quit [Ping timeout: 240 seconds] 10:02:56 -!- tizoc [~user@unaffiliated/tizoc] has quit [Remote host closed the connection] 10:03:46 tizoc [~user@unaffiliated/tizoc] has joined #scheme 10:20:24 -!- rostayob [~rostayob@02d99acf.bb.sky.com] has quit [Quit: WeeChat 0.3.5] 10:20:48 -!- porco [~porco@222.130.130.151] has quit [Ping timeout: 244 seconds] 10:31:02 dzhus [~sphinx@95-25-98-202.broadband.corbina.ru] has joined #scheme 10:33:41 masm [~masm@bl19-175-203.dsl.telepac.pt] has joined #scheme 10:35:58 -!- drwho [~drwho@56-34-237-24.gci.net] has quit [Quit: zzz] 10:41:36 -!- dzhus [~sphinx@95-25-98-202.broadband.corbina.ru] has quit [Read error: Connection reset by peer] 10:44:22 -!- karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Read error: Operation timed out] 10:46:07 -!- amoe [~amoe@host-78-147-173-172.as13285.net] has quit [Quit: leaving] 10:47:14 amoe [~amoe@host-78-147-173-172.as13285.net] has joined #scheme 10:47:20 -!- amoe [~amoe@host-78-147-173-172.as13285.net] has quit [Client Quit] 10:50:48 LeoNerd [~leo@cel.leonerd.org.uk] has joined #scheme 10:52:54 -!- nowhereman [~pierre@AStrasbourg-551-1-135-13.w90-26.abo.wanadoo.fr] has quit [Quit: Konversation terminated!] 10:53:54 amoe [~amoe@host-78-147-173-172.as13285.net] has joined #scheme 10:56:59 nowhere_man [~pierre@AStrasbourg-551-1-135-13.w90-26.abo.wanadoo.fr] has joined #scheme 10:57:42 hypnocat [~hypnocat@unaffiliated/hypnocat] has joined #scheme 10:59:50 -!- hypnocat [~hypnocat@unaffiliated/hypnocat] has quit [Quit: ZNC - http://znc.sourceforge.net] 11:03:57 choas [~lars@p5795C1FE.dip.t-dialin.net] has joined #scheme 11:13:28 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 252 seconds] 11:15:18 eno [~eno@nslu2-linux/eno] has joined #scheme 11:24:23 ahinki [~chatzilla@212.99.10.150] has joined #scheme 11:28:01 -!- choas [~lars@p5795C1FE.dip.t-dialin.net] has quit [Ping timeout: 260 seconds] 11:50:16 zmv [~zmv@186.204.150.191] has joined #scheme 11:50:42 -!- zmv is now known as Guest15312 12:00:49 TWA [~TWA@softbank219018116166.bbtec.net] has joined #scheme 12:02:29 -!- ysph [~user@166.137.12.121] has quit [Ping timeout: 248 seconds] 12:22:49 -!- masm [~masm@bl19-175-203.dsl.telepac.pt] has quit [Ping timeout: 240 seconds] 12:25:50 soveran [~soveran@186.19.214.247] has joined #scheme 12:26:16 -!- xwl_ [user@nat/nokia/x-xyyewdcqqohehdxt] has quit [Read error: Connection reset by peer] 12:26:26 masm [~masm@bl19-175-203.dsl.telepac.pt] has joined #scheme 12:28:38 -!- gravicappa [~gravicapp@ppp91-77-177-200.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 12:32:29 -!- TWA [~TWA@softbank219018116166.bbtec.net] has left #scheme 12:36:41 does anyone use scm? 12:37:03 i am wondering what you can do with the "env" arg passed to acros in scm 12:37:13 "acros" is not a typo 12:38:26 It seems guile developed from SCM, perhaps everybody use/work on guile nowadays. 12:41:23 pjb. 12:41:41 i maintain guile. i know this. 12:41:58 ok. 12:45:49 so, no scm users? 12:46:34 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 12:54:27 -!- Guest15312 is now known as zmv 13:10:46 groovy2shoes [~cory@unaffiliated/groovebot] has joined #scheme 13:22:20 MrFahrenheit [~RageOfTho@users-38-111.vinet.ba] has joined #scheme 13:33:36 -!- groovy2shoes [~cory@unaffiliated/groovebot] has quit [Quit: Computer has gone to sleep] 13:38:08 groovy2shoes [~cory@unaffiliated/groovebot] has joined #scheme 13:38:31 dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 13:42:34 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 245 seconds] 13:44:31 eno [~eno@adsl-70-137-133-209.dsl.snfc21.sbcglobal.net] has joined #scheme 13:44:32 -!- eno [~eno@adsl-70-137-133-209.dsl.snfc21.sbcglobal.net] has quit [Changing host] 13:44:32 eno [~eno@nslu2-linux/eno] has joined #scheme 13:46:15 -!- groovy2shoes [~cory@unaffiliated/groovebot] has quit [Quit: Computer has gone to sleep] 13:46:29 -!- tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 13:48:36 kilon [~kvirc@178.59.17.196] has joined #scheme 13:52:35 anyone tried to combine Lisp with smalltalk via LispKit ? http://www.zogotounga.net/comp/squeak/lispkit.htm 13:56:34 _schulte_ [~eschulte@c-174-56-1-147.hsd1.nm.comcast.net] has joined #scheme 14:00:11 -!- eno [~eno@nslu2-linux/eno] has quit [Read error: Operation timed out] 14:01:22 -!- dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has quit [Remote host closed the connection] 14:02:02 dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 14:02:37 eno [~eno@adsl-70-137-133-209.dsl.snfc21.sbcglobal.net] has joined #scheme 14:02:37 -!- eno [~eno@adsl-70-137-133-209.dsl.snfc21.sbcglobal.net] has quit [Changing host] 14:02:37 eno [~eno@nslu2-linux/eno] has joined #scheme 14:16:11 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 252 seconds] 14:17:40 eno [~eno@nslu2-linux/eno] has joined #scheme 14:18:53 groovy2shoes [~cory@unaffiliated/groovebot] has joined #scheme 14:20:58 -!- brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has quit [Ping timeout: 272 seconds] 14:28:28 -!- groovy2shoes [~cory@unaffiliated/groovebot] has quit [Quit: Computer has gone to sleep] 14:31:33 brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has joined #scheme 14:45:11 \o/ My parser is now ~20% more efficient 14:45:15 Makes unit tests nicer too 14:49:24 porco [~porco@125.33.83.213] has joined #scheme 14:54:23 -!- brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has quit [Ping timeout: 252 seconds] 14:56:35 brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has joined #scheme 14:57:14 -!- bytbox [~s@129.2.129.228] has quit [Quit: Lost terminal] 14:58:52 jrslepak [~jrslepak@c-71-233-151-135.hsd1.ma.comcast.net] has joined #scheme 15:09:56 langmartin [~user@host-68-169-175-226.WISOLT2.epbfi.com] has joined #scheme 15:14:15 -!- djcb [djcb@nat/nokia/x-tdpwczsrrszzabib] has quit [Remote host closed the connection] 15:15:45 -!- kilon [~kvirc@178.59.17.196] has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/] 15:15:49 -!- dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has quit [Ping timeout: 244 seconds] 15:15:54 -!- langmartin [~user@host-68-169-175-226.WISOLT2.epbfi.com] has quit [Ping timeout: 255 seconds] 15:19:11 hypnocat [~hypnocat@unaffiliated/hypnocat] has joined #scheme 15:20:59 -!- copumpkin [~copumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 15:23:17 homie` [~levgue@xdsl-78-35-186-210.netcologne.de] has joined #scheme 15:23:48 -!- porco [~porco@125.33.83.213] has quit [Read error: Connection timed out] 15:23:49 -!- hypnocat [~hypnocat@unaffiliated/hypnocat] has quit [Read error: Connection reset by peer] 15:23:52 langmartin [~user@host-68-169-175-226.WISOLT2.epbfi.com] has joined #scheme 15:24:05 hypnocat_ [~hypnocat@unaffiliated/hypnocat] has joined #scheme 15:24:18 -!- hypnocat_ is now known as hypnocat 15:25:21 -!- homie [~levgue@xdsl-78-35-141-9.netcologne.de] has quit [Ping timeout: 255 seconds] 15:25:52 porco [~porco@125.33.83.213] has joined #scheme 15:32:00 woonie [~woonie@nusnet-228-5.dynip.nus.edu.sg] has joined #scheme 15:42:21 -!- jrslepak [~jrslepak@c-71-233-151-135.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 15:48:07 copumpkin [~copumpkin@unaffiliated/pumpkingod] has joined #scheme 15:50:55 -!- ahinki [~chatzilla@212.99.10.150] has quit [Quit: ChatZilla 0.9.88 [Firefox 10.0/20120123235200]] 15:53:32 LeoNerd: What's a parser? :-P Surely you mean the reader? :-P 15:53:46 Likely... 15:55:02 LeoNerd: "Likely"? 15:55:08 wingo: that conversation above w/ pjb is hilarious :) 15:55:14 samth: Agree. 15:55:28 :) 15:56:33 cky: I mean "the bit that turns a string representing an expression or program into a deep-nested data structure of that expression or program". Anyone else calls it a parser. 15:56:49 LeoNerd: The reader is what implements the "read" function, that's why it's called reader rather than parser. 15:57:25 Ya.. well, I don't have a read function yet. 15:57:33 LeoNerd: :-O 15:57:58 LeoNerd: The data structure you talk about is a bunch of S-expressions. 15:58:02 Yah. 15:58:18 LeoNerd: Whatever you have that creates the S-expressions is a reader. That's what the read function does. 15:58:20 Illiterate Scheme 15:58:39 rudybot: (call-with-input-string "(1 2 3)" read) 15:58:40 cky: ; Value: (1 2 3) 15:58:53 Turns out my initial attempt wasn't very good, because it parsed a list recursively, rather than iteratively. So when I added too much to my prelude file, suddenly Perl started complaining about deep recursion 15:58:54 Oops :) 15:59:06 So now it's iterative, which leads to none of that.. and is also faster to run 15:59:10 rudybot: (call-with-input-string "(define (fma x y z) (+ x (* y z)))" read) 15:59:11 cky: ; Value: (define (fma x y z) (+ x (* y z))) 15:59:19 LeoNerd: ^^--- 15:59:33 Notice how the reader reads those strings into S-expressions. 15:59:36 yesyse I'm aware of the function. I just don't have one exposed to the Scheme level of that name yet 15:59:44 Then, you call "eval" on the S-expressions to run them. 15:59:51 I have exactly that behaviour. 15:59:56 Cool. 16:00:15 I have an instance of a Parser::MGC subclass, so it's called a parser. :) 16:00:21 Lol. 16:03:22 Actually there's quite a bit near the end of R5 I don't have yet. None of the IO stuff, no values, no call/cc... I'm working on it, mostly in order now. 16:03:34 I have enough to demonstrate it "basically works", so now I'm filling in the gaps. 16:03:55 -!- kpal [~kpal@janus-nat-128-240-225-120.ncl.ac.uk] has quit [Ping timeout: 260 seconds] 16:06:20 See, this is why I think Scheme implementations are best attempted by people who already have programmed in Scheme lots. They'd implement things in a logical order, not in "book order". :-) 16:06:54 Hrm? 16:07:01 Not to pick on you, but I've noticed the difficulties you've run into so far. :-) 16:07:03 I already -have- a reader. It's like... 15 seconds of code to expose that at the Scheme layer 16:07:16 *nods* 16:07:53 Though I will take the point of -still- not quite understanding let-syntax yet. 16:08:04 I -think- I have an idea though, by analogy... perhaps you could stop me if I go wrong here? 16:08:05 bytbox [~s@129.2.129.230] has joined #scheme 16:08:11 Okay, sure. 16:09:07 An expression with let is evaluated by first evaluating its init expressions, then binding the value of each to the new names, then evaluating the body expression(s) in a nested environment that includes those new names, over the top of the outer environment 16:09:16 -!- brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has quit [Ping timeout: 272 seconds] 16:10:01 So, by analogy: a program with let-syntax is expanded by first expanding its init expressions, then binding the value of each to the new names, then expanding the body expressions(s) in a nested environment that includes those new names over the top of the outer environment 16:10:14 So I need to make those names visible at macro expansion time 16:10:28 -!- X-Scale [email@sgi-ultra64.broker.freenet6.net] has quit [Read error: Connection reset by peer] 16:11:42 mintsoup [~mintsoup@173-164-33-21-colorado.hfc.comcastbusiness.net] has joined #scheme 16:12:00 Right. 16:13:20 X-Scale [email@sgi-ultra64.broker.freenet6.net] has joined #scheme 16:13:26 -!- homie` [~levgue@xdsl-78-35-186-210.netcologne.de] has quit [Read error: Connection reset by peer] 16:13:38 rudybot: (let-syntax ((+ (syntax-rules () ((_ expr ...) (- expr ...))))) (+ 42 10)) 16:13:39 cky: ; Value: 32 16:13:42 rudybot: (+ 42 10) 16:13:42 cky: ; Value: 52 16:13:47 LeoNerd: ^^--- 16:13:50 Yah.. 16:13:54 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 252 seconds] 16:14:13 I want to see an example of let-syntax being used alongside define-syntax though, as well... 16:14:23 (though, brb workstuff ) 16:14:30 :-) 16:14:46 homie` [~levgue@xdsl-78-35-186-210.netcologne.de] has joined #scheme 16:15:21 eno [~eno@nslu2-linux/eno] has joined #scheme 16:18:02 -!- homie` [~levgue@xdsl-78-35-186-210.netcologne.de] has quit [Client Quit] 16:19:36 langmart` [~user@host-68-169-175-226.WISOLT2.epbfi.com] has joined #scheme 16:20:17 -!- langmart` [~user@host-68-169-175-226.WISOLT2.epbfi.com] has quit [Client Quit] 16:20:29 -!- langmartin [~user@host-68-169-175-226.WISOLT2.epbfi.com] has quit [Remote host closed the connection] 16:20:36 -!- eno [~eno@nslu2-linux/eno] has quit [Read error: Operation timed out] 16:20:41 langmartin [~user@host-68-169-175-226.WISOLT2.epbfi.com] has joined #scheme 16:21:17 homie [~levgue@xdsl-78-35-186-210.netcologne.de] has joined #scheme 16:23:16 eno [~eno@nslu2-linux/eno] has joined #scheme 16:35:01 -!- hkBst [~marijn@gentoo/developer/hkbst] has quit [Quit: Konversation terminated!] 16:37:01 ASau` [~user@95-27-175-50.broadband.corbina.ru] has joined #scheme 16:37:08 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 272 seconds] 16:37:37 tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 16:38:18 eno [~eno@nslu2-linux/eno] has joined #scheme 16:40:54 -!- ASau [~user@95-26-213-211.broadband.corbina.ru] has quit [Ping timeout: 245 seconds] 16:43:00 EmmanuelOga [~emmanuel@host172.190-229-76.telecom.net.ar] has joined #scheme 16:50:40 GoKhlaYeh [~GoKhlaYeh@135.51.68.86.rev.sfr.net] has joined #scheme 16:51:21 -!- bfgun [~b_fin_g@r186-48-200-89.dialup.adsl.anteldata.net.uy] has quit [Quit: Leaving] 16:53:36 bfig [~b_fin_g@r186-48-200-89.dialup.adsl.anteldata.net.uy] has joined #scheme 16:56:22 jewel [~jewel@196-215-88-26.dynamic.isadsl.co.za] has joined #scheme 17:00:09 -!- tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 17:00:28 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 17:01:58 tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 17:05:43 dnolen [aa95640a@gateway/web/freenode/ip.170.149.100.10] has joined #scheme 17:05:44 -!- Euthydemus [~euthydemu@unaffiliated/euthydemus] has quit [Quit: leaving] 17:06:16 mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has joined #scheme 17:08:49 -!- tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 17:13:47 tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 17:16:12 -!- EmmanuelOga [~emmanuel@host172.190-229-76.telecom.net.ar] has quit [Ping timeout: 244 seconds] 17:24:31 -!- githogori [~githogori@c-50-131-15-16.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 17:25:00 -!- tom_i [~thomasing@cmc.beaming.biz] has quit [Ping timeout: 260 seconds] 17:27:18 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 255 seconds] 17:28:55 eno [~eno@nslu2-linux/eno] has joined #scheme 17:29:36 EmmanuelOga [~emmanuel@host247.190-31-129.telecom.net.ar] has joined #scheme 17:30:05 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Ping timeout: 245 seconds] 17:31:48 jao [~user@pdpc/supporter/professional/jao] has joined #scheme 17:40:47 rudybot: init 17:40:49 cky: your sandbox is ready 17:41:23 rudybot: (define serial (let ((count 0)) (lambda _ (set! count (add1 count)) count))) 17:41:24 cky: Done. 17:41:31 rudybot: (build-list 10 serial) 17:41:31 cky: ; Value: (1 2 3 4 5 6 7 8 9 10) 17:41:38 rudybot: (require srfi/1) 17:41:38 cky: Done. 17:41:44 rudybot: (list-tabulate 10 serial) 17:41:44 cky: ; Value: (11 12 13 14 15 16 17 18 19 20) 17:42:00 I see the Racket version of list-tabulate is left-to-right too. :-D 17:42:25 It's hard to imagine how you'd do it any other order. 17:42:33 LeoNerd: Right-to-left is more straightforward to implement. 17:42:33 I know R5/etc.. reserves the right to order differently... 17:43:04 Hrmm.. oh I suppose in this case, building a list but not walking down one... yah.. 17:44:01 Indeed. 17:44:34 I'm still convinced that TCMC is quite easy to implement, and thus everyone should just build lists by naive (cons) recursion anyway 17:44:36 :) 17:47:16 .. well, it's trivial to implement provided you know there isn't a call-with-current-continuation going to kick you. You can optimise presuming there won't be, and in the unlikely event that one does, you can just copy your partial list if you get invoked a second/etc.. time. 17:49:39 There's probably a way to do a CPS transformation that allows you to insert some thingamajig between "here" and the continuation you're going to. 17:49:53 I haven't explored it in depth, though. 17:52:46 -!- wingo [~wingo@218.pool85-50-103.dynamic.orange.es] has quit [Quit: Leaving] 17:54:44 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 17:56:30 -!- turbofail [~user@99-121-57-65.lightspeed.sntcca.sbcglobal.net] has quit [Ping timeout: 260 seconds] 18:00:35 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 260 seconds] 18:02:16 eno [~eno@nslu2-linux/eno] has joined #scheme 18:09:05 brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has joined #scheme 18:17:59 teurastaja [~chatzilla@modemcable168.103-58-74.mc.videotron.ca] has joined #scheme 18:18:45 Hi, so I finally attempted to write a DFS function for traversing *all* the nodes of a graph starting from any one. However, my code gives and error "The object (), passed as an argument to safe-car, is not a pair.". I'm not sure which function call it's talking about. Here's the code: http://paste.pocoo.org/show/544204/ 18:19:27 safe-car? presumably that's one with rollbars 18:20:50 anyone knows anything about r7rs releasing dates or current works? yes i know about scheme-reports.org and the wiki and i know how to get draft 5. the last time i spoke to a comity member he said it was probably going to be released last year 18:21:07 LeoNerd: rollbars? 18:21:11 hahaha 18:21:30 r7rs is a frustrating process to wait for 18:21:39 dont you agree? 18:21:55 grammachook: AKA rollcage, etc... A set of reinforcement bars usually put in rally cars, etc... to strengthen the roof of the body, if it rolls upside-down. Stops the driver getting crushed. 18:22:14 *gremmachook. 18:22:27 LeoNerd: Not a fan of tab-completion? :-P 18:22:35 I haven't implemented that yet. 18:22:40 :-O 18:22:41 It's a decidedly nontrivial problem 18:22:48 Isn't that a fundamental operation on IRC? 18:23:05 It is if your IRC state and your GUI are in the same process on the same machine, yes :) 18:23:20 http://www.leonerd.org.uk/code/circle/ <== less trivial here 18:23:29 I mean from a user-interface perspective. 18:23:39 i.e., users expect to tab-complete from their IRC client. 18:23:45 Oh, quite. 18:23:47 I would not use an IRC client that did not have tab-completion. 18:23:50 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 18:24:33 :) 18:27:00 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Remote host closed the connection] 18:29:22 stis [~stis@1-1-1-39a.veo.vs.bostream.se] has joined #scheme 18:34:33 is this definition correct?: 18:34:39 (define (apply f . ls) 18:34:41 (if (null? ls) (error "No arguments!") 18:34:43 (let ([fx (cons f (concatenate (drop-right ls 1) (last ls)))]) 18:34:45 (eval fx (map (lambda (x) (eval x (interaction-environment))) fx))))) 18:34:54 You are -defining- apply ? 18:34:59 djcb [~djcb@a88-114-95-13.elisa-laajakaista.fi] has joined #scheme 18:35:00 yes 18:35:02 i am 18:35:05 why? 18:35:05 Curious 18:35:15 i defined eval 18:35:35 Personally, I implemented apply as a special form, so that it becomes tail-recursive 18:35:48 apply fn list is -basically- a special variant of normal operator application 18:36:47 havent verified if it works yet but my eval doesnt call apply (it applies locally) so that the definition of apply is more generic 18:37:41 -!- woonie [~woonie@nusnet-228-5.dynip.nus.edu.sg] has quit [Ping timeout: 248 seconds] 18:38:32 jeapostrophe [~jay@lallab.cs.byu.edu] has joined #scheme 18:39:20 .oO( But then I have something of an obsession with tail-recursion because I believe CPS is awesome ) 18:39:21 i wanted to simplify the argument parsing so that i dont have to handle applys args more than by defining fx 18:39:57 teurastaja: it's wrong. 18:40:05 damn... 18:40:07 why? 18:40:19 teurastaja: try it on: (apply symbol->string '(x)) 18:40:51 rudybot: eval: (define (apply f . ls) 18:40:52 teurastaja: JavaScript values which count as false: #f (spelled "false"), null, undefined, 0, "", NaN 18:40:53 (if (null? ls) (error "No arguments!") 18:40:55 (let ([fx (cons f (concatenate (drop-right ls 1) (last ls)))]) 18:40:57 (eval fx (map (lambda (x) (eval x (interaction-environment))) fx))))) 18:41:02 huh? 18:41:30 rudybot: (define (apply. f . ls) (if (null? ls) (error "No arguments!") (let ([fx (cons f (concatenate (drop-right ls 1) (last ls)))]) (eval fx (map (lambda (x) (eval x (interaction-environment))) fx))))) 18:41:30 pjb: your r5rs sandbox is ready 18:41:31 pjb: error: #:1:69: read: illegal use of open square bracket 18:41:50 rudybot: (define (apply. f . ls) (if (null? ls) (error "No arguments!") (let ((fx (cons f (concatenate (drop-right ls 1) (last ls))))) (eval fx (map (lambda (x) (eval x (interaction-environment))) fx))))) 18:41:51 pjb: Done. 18:41:56 *offby1* calls the square-bracket po-leece on pjb 18:42:00 rudybot: (apply. symbol->string '(x)) 18:42:00 pjb: error: reference to an identifier before its definition: concatenate in module: 'program 18:42:13 (require srfi/i) 18:42:17 er, 1 18:42:25 rudybot: (define (apply. f . ls) (if (null? ls) (error "No arguments!") (let ((fx (cons f (append (butlast ls) (last ls))))) (eval fx (map (lambda (x) (eval x (interaction-environment))) fx))))) 18:42:25 pjb: Done. 18:42:27 rudybot: (apply. symbol->string '(x)) 18:42:27 pjb: error: reference to an identifier before its definition: butlast in module: 'program 18:42:29 use more 'Roman::Numerals'; 18:42:32 youre typing faster so ill let you do it ;) 18:42:37 rudybot: (define (apply. f . ls) (if (null? ls) (error "No arguments!") (let ((fx (cons f (append (drop-right ls 1) (last ls))))) (eval fx (map (lambda (x) (eval x (interaction-environment))) fx))))) 18:42:37 pjb: Done. 18:42:39 rudybot: (apply. symbol->string '(x)) 18:42:39 pjb: error: reference to an identifier before its definition: drop-right in module: 'program 18:44:22 rudybot: (define (drop-right ls i) (take (reverse ls) i)) 18:44:22 teurastaja: your sandbox is ready 18:44:22 teurastaja: Done. 18:44:25 rudybot: (apply. symbol->string '(x)) 18:44:25 pjb: error: reference to an identifier before its definition: drop-right in module: 'program 18:44:35 rudybot: (define (apply. f . ls) (if (null? ls) (error "No arguments!") (let ((fx (cons f (append (butlast ls) (last ls))))) (eval fx (map (lambda (x) (eval x (interaction-environment))) fx))))) 18:44:35 pjb: Done. 18:44:36 rudybot: (apply. symbol->string '(x)) 18:44:37 pjb: error: reference to an identifier before its definition: last in module: 'program 18:44:41 *offby1* fidgets uncomfortably 18:45:00 rudybot: (apply. symbol->string '(x)) 18:45:00 pjb: error: reference to an identifier before its definition: x in module: 'program 18:45:07 teurastaja: There. 18:45:22 rudybot: (interaction-environment) 18:45:22 teurastaja: error: reference to an identifier before its definition: interaction-environment in module: 'program 18:45:47 rudybot: (banner) 18:45:47 *offby1: your sandbox is ready 18:45:48 *offby1: ; Value: "Welcome to Racket v5.2.\n" 18:45:54 rudybot: (display (interaction-environment)) 18:45:54 teurastaja: error: reference to an identifier before its definition: interaction-environment in module: 'program 18:45:58 Racket is perhaps different from other schemes you're used to 18:46:22 rudybot: (apply. symbol->string '(zzz)) 18:46:23 pjb: error: reference to an identifier before its definition: zzz in module: 'program 18:46:35 teurastaja: It's not your x, that's not defined, it's mine :-) 18:46:40 yes. i know rudybot is nice but why doesnt someone port it to a real standard scheme? 18:46:49 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 240 seconds] 18:47:03 .oO("standard scheme"?) 18:47:51 One could argue any Scheme that follows R${N}RS, is Standard. For some $N 18:48:35 will racket comply to r7rs? 18:48:49 eno [~eno@nslu2-linux/eno] has joined #scheme 18:49:17 probably 18:49:23 it has an R6RS mode 18:49:25 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 18:49:54 in fact, back when R6RS was controversial, I seem to recall that the PLT people were some of the few who were in favor of the standard 18:52:41 rudybot: ((lambda (f) (f f)) (lambda (g) (g g))) 18:52:51 teurastaja: error: with-limit: out of time 18:52:56 :P 18:53:09 LeoNerd: I, too, forebore from tab-based autocompletion in IRC for a couple microfortnights. 18:53:10 Y??!! 18:53:19 nah 18:53:21 omega 18:53:29 klutometis: Oh, my only excuse is that I haven't implemented it yet, because as I said it's nontrivial 18:53:47 LeoNerd: Have you posted the source for your home-brew client? 18:53:50 so... what was wrong in my apply definition 18:54:08 choas [~lars@p5795C1FE.dip.t-dialin.net] has joined #scheme 18:54:08 klutometis: Ofcourse, it's on CPAN, and my bzr repo. 18:54:51 LeoNerd: This? http://www.leonerd.org.uk/code/circle/obtain.html 18:55:18 That's the one 18:56:02 You mention that circle has "the best attributes of . . . screen+irssi," but you fail to mention tab-completion. 18:56:22 Oh, ok: "the above is all a big lie." 18:57:29 I'm not going to list every tiny little feature I haven't implemented yet... that would be silly :P 18:58:03 Heh, you're night: the enumeration of missing features is an infinite list, I think. 18:58:04 -!- brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has quit [Ping timeout: 245 seconds] 18:58:17 (For any software project, that is.) 18:58:31 Quiteso 18:58:36 Anyway, maybe I'll take it for a spin. 18:58:47 rudybot: ((lambda (f) (write f)) (lambda (g) (read g))) 18:58:47 teurastaja: ; stdout: "#" 18:59:05 shit... doesnt do what i expected 19:00:08 teurastaja: what was wrong with your apply is that: 19:00:10 rudybot: (apply. symbol->string '(zzz)) 19:00:11 pjb: error: reference to an identifier before its definition: zzz in module: 'program 19:00:20 It tries to evaluate my data. 19:01:04 apply should not evaluate its parameters. It's the caller that evaluates the arguments BEFORE passing them as parameters. 19:01:09 so i have to extend the environment manually instead of relying on eval? 19:01:27 teurastaja: you should not touch the environment in apply. 19:01:46 but i have to use eval no? 19:02:14 turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has joined #scheme 19:02:39 -!- MrFahrenheit [~RageOfTho@users-38-111.vinet.ba] has quit [Ping timeout: 245 seconds] 19:02:39 Yes. But you write it with 4 symbols and 2 lists. 19:03:19 so one of those symbols is eval, assumedly two others are f and ls, remains to find the fourth symbol. 19:04:10 how do you know the count? 19:04:13 Ah, right, I'm looking and old apply. Modern apply still need (append (butlast ls) (last ls)). 19:05:05 (define (apply. f . ls) (eval (??? f (append (butlast ls) (last ls))))) 19:05:27 (assuming last returns the last car of the list). 19:05:56 Err, I may be wrong. 19:06:17 you lost me 19:06:41 -!- dnolen [aa95640a@gateway/web/freenode/ip.170.149.100.10] has quit [Ping timeout: 245 seconds] 19:07:03 Yes, I'm wrong here. It's not the solution. 19:08:08 -!- confab [~confab@c-71-193-9-153.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 19:08:11 Well, one thing that bothers me, is that eval is defined in terms of apply. So if you use apply in eval, you will probably have an infinite recursion. 19:11:31 except when eval returns self-evaluating args... 19:18:11 -!- porco [~porco@125.33.83.213] has quit [Read error: Connection reset by peer] 19:29:06 cdidd [~cdidd@93-80-142-242.broadband.corbina.ru] has joined #scheme 19:29:29 -!- teurastaja [~chatzilla@modemcable168.103-58-74.mc.videotron.ca] has quit [Ping timeout: 240 seconds] 19:29:59 JoelMcCracken [~user@c-71-60-19-216.hsd1.pa.comcast.net] has joined #scheme 19:35:12 teurastaja: see http://paste.lisp.org/display/127445 19:38:53 -!- zmv is now known as nottheiponyourwh 19:39:05 -!- nottheiponyourwh is now known as nottheiponurwhoi 19:39:31 -!- nottheiponurwhoi is now known as zmv 19:40:30 -!- choas [~lars@p5795C1FE.dip.t-dialin.net] has quit [Ping timeout: 245 seconds] 19:41:32 kudkudyak [~sun@94.72.140.37] has joined #scheme 19:44:09 -!- JoelMcCracken [~user@c-71-60-19-216.hsd1.pa.comcast.net] has quit [Ping timeout: 240 seconds] 19:48:19 githogori [~githogori@216.207.36.222] has joined #scheme 19:48:40 -!- githogori [~githogori@216.207.36.222] has quit [Client Quit] 19:54:49 -!- tuubow [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 20:02:08 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 240 seconds] 20:03:50 eno [~eno@nslu2-linux/eno] has joined #scheme 20:04:25 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving] 20:06:09 -!- jewel [~jewel@196-215-88-26.dynamic.isadsl.co.za] has quit [Ping timeout: 240 seconds] 20:27:03 Blkt [~user@82.84.158.49] has joined #scheme 20:42:05 -!- leppie [~lolcow@196-209-224-26.dynamic.isadsl.co.za] has quit [Read error: Connection reset by peer] 20:42:32 choas [~lars@p5795C1FE.dip.t-dialin.net] has joined #scheme 20:46:39 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 255 seconds] 20:49:15 -!- bfig [~b_fin_g@r186-48-200-89.dialup.adsl.anteldata.net.uy] has quit [Read error: Connection reset by peer] 20:49:22 leppie [~lolcow@196-209-224-26.dynamic.isadsl.co.za] has joined #scheme 21:00:25 brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has joined #scheme 21:01:15 githogori [~githogori@216.207.36.222] has joined #scheme 21:13:56 mister_m [~mattosaur@2620:0:2250:2104:223:5aff:fe7e:cc97] has joined #scheme 21:19:07 pothos_ [~pothos@114-36-241-131.dynamic.hinet.net] has joined #scheme 21:19:37 rostayob [~rostayob@host217-42-33-157.range217-42.btcentralplus.com] has joined #scheme 21:20:51 -!- pothos [~pothos@114-36-224-117.dynamic.hinet.net] has quit [Ping timeout: 252 seconds] 21:22:10 -!- pothos_ [~pothos@114-36-241-131.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 21:22:30 pothos [~pothos@114-36-241-131.dynamic.hinet.net] has joined #scheme 21:23:36 tuubow [~adityavit@NYUFGA-WLESSAUTHCLIENTS-03.NATPOOL.NYU.EDU] has joined #scheme 21:25:12 bfig [~b_fin_g@r186-48-193-124.dialup.adsl.anteldata.net.uy] has joined #scheme 21:25:12 -!- pothos [~pothos@114-36-241-131.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 21:25:31 pothos [~pothos@114-36-241-131.dynamic.hinet.net] has joined #scheme 21:28:30 -!- kudkudyak [~sun@94.72.140.37] has quit [Quit: Leaving.] 21:28:41 wingo [~wingo@90.164.198.39] has joined #scheme 21:32:33 -!- githogori [~githogori@216.207.36.222] has quit [Ping timeout: 255 seconds] 21:33:53 kudkudyak [~sun@94.72.140.37] has joined #scheme 21:34:29 -!- kudkudyak [~sun@94.72.140.37] has quit [Client Quit] 21:35:22 -!- brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has quit [Ping timeout: 252 seconds] 21:35:36 MrFahrenheit [~RageOfTho@users-38-111.vinet.ba] has joined #scheme 21:36:33 -!- bfig [~b_fin_g@r186-48-193-124.dialup.adsl.anteldata.net.uy] has quit [Remote host closed the connection] 21:45:07 bfig [~b_fin_g@r186-48-193-124.dialup.adsl.anteldata.net.uy] has joined #scheme 21:45:39 ticking [~janpaulbu@87.253.189.132] has joined #scheme 21:46:50 -!- gsathya [~gsathya@unaffiliated/gsathya] has quit [Ping timeout: 272 seconds] 21:47:44 gsathya [~gsathya@unaffiliated/gsathya] has joined #scheme 21:52:42 paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has joined #scheme 21:54:05 phax [~phax@cpc14-haye17-2-0-cust110.haye.cable.virginmedia.com] has joined #scheme 21:54:05 -!- phax [~phax@cpc14-haye17-2-0-cust110.haye.cable.virginmedia.com] has quit [Changing host] 21:54:05 phax [~phax@unaffiliated/phax] has joined #scheme 22:00:57 karswell_ [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 22:01:30 -!- bfig [~b_fin_g@r186-48-193-124.dialup.adsl.anteldata.net.uy] has quit [Remote host closed the connection] 22:01:57 -!- tuubow [~adityavit@NYUFGA-WLESSAUTHCLIENTS-03.NATPOOL.NYU.EDU] has quit [Ping timeout: 248 seconds] 22:05:07 -!- stis [~stis@1-1-1-39a.veo.vs.bostream.se] has left #scheme 22:08:09 -!- dan64 [~dan64@c-71-206-193-42.hsd1.pa.comcast.net] has quit [Read error: Connection reset by peer] 22:10:15 dan64 [~dan64@c-71-206-193-42.hsd1.pa.comcast.net] has joined #scheme 22:11:22 brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has joined #scheme 22:13:05 rostayob1 [~rostayob@host86-137-11-130.range86-137.btcentralplus.com] has joined #scheme 22:16:36 -!- rostayob [~rostayob@host217-42-33-157.range217-42.btcentralplus.com] has quit [Ping timeout: 272 seconds] 22:17:29 -!- rostayob1 [~rostayob@host86-137-11-130.range86-137.btcentralplus.com] has quit [Ping timeout: 240 seconds] 22:18:37 -!- langmartin [~user@host-68-169-175-226.WISOLT2.epbfi.com] has quit [Ping timeout: 252 seconds] 22:23:05 bfig [~b_fin_g@r186-48-193-124.dialup.adsl.anteldata.net.uy] has joined #scheme 22:30:49 CampinSam [~CampinSam@24-176-98-217.dhcp.jcsn.tn.charter.com] has joined #scheme 22:31:35 rostayob1 [~rostayob@host217-42-35-248.range217-42.btcentralplus.com] has joined #scheme 22:45:30 -!- dan64 [~dan64@c-71-206-193-42.hsd1.pa.comcast.net] has quit [Read error: Connection reset by peer] 22:46:21 -!- EmmanuelOga [~emmanuel@host247.190-31-129.telecom.net.ar] has quit [Ping timeout: 244 seconds] 22:47:11 dan64 [~dan64@c-71-206-193-42.hsd1.pa.comcast.net] has joined #scheme 22:50:28 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving] 22:58:29 -!- choas [~lars@p5795C1FE.dip.t-dialin.net] has quit [Ping timeout: 248 seconds] 23:05:57 -!- mister_m [~mattosaur@2620:0:2250:2104:223:5aff:fe7e:cc97] has quit [Remote host closed the connection] 23:06:19 Do you guys dabble in bodiless emails; and, if so, do you use an unadorned `EOM', a bracketed `[EOM]', a parenthesized `(EOM)' or nothing at all? 23:06:32 -!- cdidd [~cdidd@93-80-142-242.broadband.corbina.ru] has quit [Quit: Leaving] 23:07:24 too creepy. 23:07:33 seriously tho 23:07:52 having worked at Microsoft, I picked up the habit of putting at the end of the Subject: line 23:07:59 "will be 10 min late [eom]" is fine 23:08:05 yes 23:08:31 Subject: How do you keep an idiot occupied? 23:08:35 then leave the body blank 23:08:40 :) 23:10:13 offby1: Angle brackets? Creative. Creepy? How? 23:13:21 tuubow [~adityavit@NYUFGA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has joined #scheme 23:13:38 cdidd [~cdidd@95-28-164-178.broadband.corbina.ru] has joined #scheme 23:16:13 Bodiless messages? Sounds like something from a seance! 23:16:53 -!- rostayob1 [~rostayob@host217-42-35-248.range217-42.btcentralplus.com] has quit [Quit: WeeChat 0.3.5] 23:19:03 -!- jeapostrophe [~jay@lallab.cs.byu.edu] has quit [Read error: Operation timed out] 23:24:50 -!- Blkt [~user@82.84.158.49] has quit [Remote host closed the connection] 23:37:15 -!- DerGuteMoritz [~syn@85.88.17.198] has quit [Read error: Operation timed out] 23:37:27 DerGuteMoritz [~syn@85.88.17.198] has joined #scheme 23:37:37 -!- zedstar [~john@fsf/member/zedstar] has quit [Read error: Operation timed out] 23:37:41 zedstar [~john@zedstar.com] has joined #scheme 23:37:42 -!- zedstar [~john@zedstar.com] has quit [Changing host] 23:37:42 zedstar [~john@fsf/member/zedstar] has joined #scheme 23:51:04 -!- brendyn [~brendyn@123-2-73-61.static.dsl.dodo.com.au] has quit [Quit: WeeChat 0.3.6] 23:53:49 -!- stepnem [~stepnem@176.119.broadband10.iol.cz] has quit [Ping timeout: 240 seconds] 23:54:29 -!- amoe [~amoe@host-78-147-173-172.as13285.net] has quit [Ping timeout: 248 seconds] 23:56:02 githogori [~githogori@c-50-131-15-16.hsd1.ca.comcast.net] has joined #scheme 23:56:43 amoe [~amoe@host-78-147-175-235.as13285.net] has joined #scheme 23:59:25 stepnem [~stepnem@176.119.broadband10.iol.cz] has joined #scheme