00:04:35 Aethaeryn [~Michael@wesnoth/umc-dev/developer/aethaeryn] has joined #scheme 00:21:59 astertronistic [~astertron@ip70-181-247-103.sd.sd.cox.net] has joined #scheme 00:31:21 -!- adu [~ajr@pool-108-28-107-227.washdc.fios.verizon.net] has quit [Quit: adu] 00:40:05 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 252 seconds] 00:43:34 adu [~ajr@pool-108-28-107-227.washdc.fios.verizon.net] has joined #scheme 00:48:17 -!- realityg1ill is now known as realitygrill 00:50:08 -!- civodul [~user@reverse-83.fdn.fr] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 01:15:52 -!- duncanm [~duncan@a-chinaman.com] has quit [Ping timeout: 245 seconds] 01:16:35 duncanm [~duncan@a-chinaman.com] has joined #scheme 01:16:35 la la la 01:19:47 Hello. I have a question. Is there any way for a procedure created by a lambda form in the function position of an expression to escape? 01:20:00 -!- pyro-__ is now known as pyro- 01:20:12 -!- pyro- [~pyro@chopstick.dcollins.info] has quit [Changing host] 01:20:12 pyro- [~pyro@unaffiliated/purplepanda] has joined #scheme 01:22:29 what do you mean? 01:24:11 e.g. exists a b and c so that ((lambda a b) c) is eq? to the (lambda a b), so that the new procedure escapes the form by being returned from the call. or another way to make it have indefinite extent? by defining a binding to it within the form? 01:24:29 -!- gffa [~unknown@unaffiliated/gffa] has quit [Quit: sleep] 01:25:29 or can the procedure created in the first elemtn of the list only ever be used within the call? i couldn't come up with an exampel where it escapes the call 01:25:46 I don't think so 01:26:13 pyro-: in that case, there's no way for the procedure to escape. 01:26:32 thank you ijp and mark_weaver ! 01:26:35 pyro-: not in standard scheme anyway. 01:27:39 the use of being able to relly on that is that it simplifies my compiler :-) 01:27:55 wtetzner_ [~wtetzner@c-24-218-217-69.hsd1.ma.comcast.net] has joined #scheme 01:28:22 you can read more in the "escape analysis" section of Krantz's thesis on the Orbit compiler. 01:28:35 oh sounds interesting 01:29:05 -!- erann [~erann@89.Red-83-50-3.dynamicIP.rima-tde.net] has left #scheme 01:29:32 http://repository.readscheme.org/ftp/papers/orbit-thesis.pdf 01:29:50 if you're writing a compiler, that thesis is highly recommended. 01:30:50 the entire closure analysis chapter is quite interesting. 01:34:49 -!- tupi [~david@177.149.199.253] has quit [Read error: Connection reset by peer] 01:41:33 -!- youlysse` is now known as `youlysses 01:42:19 thank you mark_weaver 01:42:36 pyro-: you're welcome! :) 01:42:43 :-) 01:44:06 -!- bipt [~bpt@cpe-076-182-071-114.nc.res.rr.com] has quit [Ping timeout: 240 seconds] 01:51:17 bipt [~bpt@cpe-076-182-071-114.nc.res.rr.com] has joined #scheme 01:51:49 -!- MrFahrenheit [~RageOfTho@77.221.30.167] has quit [Ping timeout: 256 seconds] 02:03:43 -!- Sorella_ [~quildreen@201-58-224-253.user.veloxzone.com.br] has quit [Ping timeout: 256 seconds] 02:10:10 jonrafkind [~jon@racket/jonrafkind] has joined #scheme 02:11:51 -!- adu [~ajr@pool-108-28-107-227.washdc.fios.verizon.net] has quit [Quit: adu] 02:21:24 -!- Aethaeryn [~Michael@wesnoth/umc-dev/developer/aethaeryn] has left #scheme 02:22:23 Nisstyre-laptop [~yours@oftn/member/Nisstyre] has joined #scheme 02:35:18 -!- masm [~masm@bl18-56-117.dsl.telepac.pt] has quit [Quit: Leaving.] 02:40:23 -!- cdidd [~cdidd@95-24-132-90.broadband.corbina.ru] has quit [Ping timeout: 260 seconds] 02:40:49 -!- `youlysses [~user@75-132-17-145.dhcp.stls.mo.charter.com] has quit [Quit: Sleep, then time to write a 4 page ethics paper...] 02:42:12 fantazo [~fantazo@91-119-203-9.dynamic.xdsl-line.inode.at] has joined #scheme 03:03:41 -!- Nisstyre-laptop [~yours@oftn/member/Nisstyre] has quit [Quit: Leaving] 03:06:31 Nisstyre-laptop [~yours@oftn/member/Nisstyre] has joined #scheme 03:08:23 b4283 [~b4283@1-172-80-248.dynamic.hinet.net] has joined #scheme 03:16:55 crundar [~user@99-108-224-199.lightspeed.iplsin.sbcglobal.net] has joined #scheme 03:20:55 REPLeffect [~REPLeffec@69.54.116.237] has joined #scheme 03:21:31 Onionnion|Eee [~ryan@adsl-68-254-167-6.dsl.milwwi.ameritech.net] has joined #scheme 03:25:59 -!- Nisstyre-laptop [~yours@oftn/member/Nisstyre] has quit [Ping timeout: 255 seconds] 03:27:51 Nisstyre-laptop [~yours@oftn/member/Nisstyre] has joined #scheme 03:39:17 tupi [~david@177.149.43.73] has joined #scheme 03:40:21 dnolen [~user@cpe-74-64-61-245.nyc.res.rr.com] has joined #scheme 03:45:12 -!- wtetzner_ [~wtetzner@c-24-218-217-69.hsd1.ma.comcast.net] has quit [Remote host closed the connection] 03:45:13 -!- wtetzner [~wtetzner@c-24-218-217-69.hsd1.ma.comcast.net] has quit [Remote host closed the connection] 04:01:16 -!- peterhil [~peterhil@91-157-48-10.elisa-laajakaista.fi] has quit [Ping timeout: 265 seconds] 04:15:53 -!- tupi [~david@177.149.43.73] has quit [Read error: Connection reset by peer] 04:22:09 What would you recommend for an append-only sequence type ? 04:23:48 the bitbucket 04:24:14 :P 04:24:15 a stack? 04:24:36 I don't get the bitbucket joke .. 04:25:13 OK, what would you recommend for a stack type ? :P How to best implement it, I mean. 04:25:16 I guess its about people putting code into bitbucket that no one will ever use 04:25:24 Hehe. 04:25:25 taylanub: well, you never said you were going to use it after you appended it 04:25:43 It should basically be readable. :P 04:25:53 that is truly an amazing thing to say ijp 04:25:53 Hrm, OK I get it. -_- 04:26:44 So yeah, I want an ordered set type that supports appendage as mutation. 04:27:04 set, or multiset? 04:27:05 *Waits for another flaw being pointed out in the explanation.* 04:27:26 "ordered set" sounds like a self-contradiction. 04:27:40 Hrm, multiset. (Will probably never get the same value inserted.) 04:27:42 he just means LIFO 04:27:44 well, one simple way is a tconc, like guile uses for it's queue implementation 04:28:06 mark_weaver: Well, there's a mathematical definition of that. (Synonym to tuples ..) 04:28:07 that is list, and a pointer to the last pair 04:28:25 so a deque 04:28:42 jonrafkind: I _do_ have serious answers as well, but I like to start things off with a joke 04:28:51 taylanub: what other operations do you need to be efficient on this data structure? 04:28:57 feeble ones sometimes, but there you go 04:29:29 Now that ijp mentions guile queues, I'll probably just use those. 04:29:39 mark_weaver: Really just appendage. 04:30:09 taylanub: you need to access the elements presumably. otherwise you can just use #f. 04:30:11 ijp: Guile queues will append, right ? 04:30:29 mark_weaver: But it may be as inefficient as it wants during read. :P 04:31:17 taylanub: when you append two of these lists, is it okay to destroy the lists being appended? or must they be preserved? 04:31:22 I'm also quite fond of representing lists as (lambda (l) (append list l)), then append is just function composition 04:31:34 mark_weaver: Oh, I meant single-element appending. 04:32:05 taylanub: how is this different from an ordinary queue? 04:32:16 mark_weaver: that orbit compiler PDF was just what I was looking for! Really cool stuff. 04:32:27 ijp: Do you prefer Church Numerals or the Mogensen-Scott Encoding when working with integers ? 04:32:35 or for that matter, a stack? since you haven't specified any requirements on the accessors? 04:32:36 mark_weaver: It needn't support pop. 04:33:09 As in the pop that mutates. 04:33:13 taylanub: you could just 'cons' elements to the front, and interpret the list as if it was reversed. 04:33:30 (i.e. when you want to print it or access it, reverse it first) 04:33:51 taylanub: you jest, but it isn't actually a terrible representation 04:34:02 attila_lendvai [~attila_le@92.47.219.83] has joined #scheme 04:34:02 -!- attila_lendvai [~attila_le@92.47.219.83] has quit [Changing host] 04:34:02 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 04:34:11 Well yeah, not sure at which point in the code it would be clearest to do that. I'll just use guile queues for this, thanks for the interesting inputs though. 04:34:26 ijp: Hrm .. 04:35:15 consing elements and then reversing when done is, after all, the most common way to efficiently build a list from left-to-right in scheme (and lisp) 04:35:30 at least, it shouldn't be much worse that consing and reversing 04:36:00 ("shouldn't" being a remark I should save till after benchmarking) 04:42:46 Gotta hate English. `set-add!' is sure confusing when used right aside `set-car!' and `set-cdr'. 04:44:44 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 04:45:23 peterhil [~peterhil@91-157-48-10.elisa-laajakaista.fi] has joined #scheme 04:45:48 ideally, 'set-car!' and 'set-cdr!' shouldn't occur in very many places in your code. they would be better wrapped within some other procedure of yours. 04:46:26 Indeed they are, in `set-add!'. :P 04:47:06 It's 5:45, which makes me high, and I just found that really funny. Also, I love the Beatles. 04:49:04 taylanub: the worst named function I ever wrote was probably set-set 04:49:57 well, maybe not the worst, I can probably find a few more terrible examples 04:50:20 ijp: what did 'set-set' do? 04:51:02 fds [~fds@tickle.compsoc.man.ac.uk] has joined #scheme 04:51:12 it inserted into a set 04:51:47 sounds like it should have been called 'set-add!' :) 04:51:50 Insert ? That sounds wrong. Why wasn't it `set-insert!' ? 04:51:57 Or that. :P 04:52:16 taylanub: momentary lapse in the naming part of my brain 04:52:26 Hehe, OK. 04:52:46 Naming things is the part I have the most difficulty with when writing code. 04:53:19 mark_weaver: these days I consider a thesaurus an indispensable programming tool 04:53:57 that's a good idea :) 05:01:01 Where do I find `every' and `any' ? 05:01:17 I should ask in #guile .. But ijp is already here. :P 05:03:04 taylanub: they are in the module (srfi srfi1) 05:03:09 er, srfi-1 05:03:15 Thanks, mark_weaver answered in #guile. :P 05:03:32 (BTW that was surprisingly hard to google.) 05:22:11 -!- dnolen [~user@cpe-74-64-61-245.nyc.res.rr.com] has quit [Remote host closed the connection] 05:23:28 taylanub: and as flattering as it is to be singled out as your personal encyclopedia, better to just ask your question to the channel in general :) 05:24:58 Well it really felt like we're 3 people in here and I forgot the 3rd person is in #guile as well. :P 05:25:11 So here's my compiling but untested result: http://sprunge.us/ZWAf 05:25:35 It's to solve the lock-picking and map-deciphering mini-games in the God Wars II MUD. 05:29:55 wow, you redefined 'min', 'max', and 'length' to be parameters. hope you don't need those R5RS procedures in the future! 05:32:00 you're using parameters incorrectly btw. in 'apply-operation', you use 'min' and 'max' directly, instead of calling them as procedures. 05:32:19 I don't see how the code can work. 05:33:59 Heh, typical facepalm mistakes. :P Or do you see a flaw in the general logic ? 05:34:55 I didn't look carefully. but the redefinition of those three things caught my eye, so I looked to see where you used them. 05:35:07 OK, thanks. 05:35:15 if you accidentally call (length lst) somewhere, it will set the 'length' parameter to be 'lst'. 05:35:50 Yeah, I'm just so tired .. :P And maybe elisp cursed me! 05:36:31 yeah, I can sympathize with hacking while underslept, heh. 05:38:33 Fixed those mistakes, and closed the file; if I continue my brain will start smoking. Good night and thanks for the help. :) 05:41:31 -!- ijp [~user@host109-151-49-241.range109-151.btcentralplus.com] has quit [Ping timeout: 268 seconds] 05:45:47 good night! 06:06:59 -!- mark_weaver [~user@209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 06:10:57 phax [~phax@unaffiliated/phax] has joined #scheme 06:13:29 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Quit: Leaving.] 06:13:35 attila_lendvai [~attila_le@92.47.219.83] has joined #scheme 06:13:35 -!- attila_lendvai [~attila_le@92.47.219.83] has quit [Changing host] 06:13:35 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 06:28:03 -!- wbooze [~wbooze@xdsl-78-35-128-217.netcologne.de] has quit [Ping timeout: 276 seconds] 06:36:55 -!- realitygrill [~realitygr@209-6-30-187.c3-0.smr-ubr2.sbo-smr.ma.cable.rcn.com] has quit [Quit: Computer has gone to sleep] 06:43:26 adu [~ajr@pool-108-28-107-227.washdc.fios.verizon.net] has joined #scheme 06:52:07 answer_42 [~answer_42@gateway/tor-sasl/answer42/x-66983568] has joined #scheme 07:02:21 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving] 07:10:06 -!- Quadrescence [~quad@unaffiliated/quadrescence] has quit [Read error: Connection reset by peer] 07:10:28 Quadrescence [~quad@unaffiliated/quadrescence] has joined #scheme 07:32:03 -!- jonrafkind [~jon@racket/jonrafkind] has quit [Ping timeout: 260 seconds] 07:41:00 -!- githogori [~githogori@adsl-66-123-22-146.dsl.snfc21.pacbell.net] has quit [Ping timeout: 244 seconds] 08:12:37 cdidd [~cdidd@128-72-30-62.broadband.corbina.ru] has joined #scheme 08:21:05 -!- adu [~ajr@pool-108-28-107-227.washdc.fios.verizon.net] has quit [Quit: adu] 08:26:14 gravicappa [~gravicapp@ppp91-77-181-83.pppoe.mtu-net.ru] has joined #scheme 08:40:10 mmc1 [~michal@178-85-56-58.dynamic.upc.nl] has joined #scheme 08:44:26 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Quit: Leaving] 08:56:49 -!- Onionnion|Eee [~ryan@adsl-68-254-167-6.dsl.milwwi.ameritech.net] has quit [Ping timeout: 256 seconds] 09:12:36 Onionnion|Eee [~ryan@adsl-68-254-167-6.dsl.milwwi.ameritech.net] has joined #scheme 09:17:13 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Ping timeout: 256 seconds] 09:32:55 amgarchIn9 [~amgarchin@p4FD6174B.dip0.t-ipconnect.de] has joined #scheme 09:45:03 -!- gravicappa [~gravicapp@ppp91-77-181-83.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 10:05:34 -!- SeySayux [SeySayux@libsylph/developer/seysayux] has quit [Ping timeout: 240 seconds] 10:06:14 gffa [~unknown@unaffiliated/gffa] has joined #scheme 10:06:22 -!- taylanub [tub@p4FD942A9.dip.t-dialin.net] has quit [Disconnected by services] 10:06:35 taylanub [tub@p4FD945A6.dip.t-dialin.net] has joined #scheme 10:07:47 SeySayux [SeySayux@libsylph/developer/seysayux] has joined #scheme 10:35:35 -!- b4283 [~b4283@1-172-80-248.dynamic.hinet.net] has quit [Remote host closed the connection] 10:39:47 b4283 [~b4283@1-172-80-248.dynamic.hinet.net] has joined #scheme 10:43:18 wingo [~wingo@77-56-172-80.dclient.hispeed.ch] has joined #scheme 11:26:07 masm [~masm@bl16-219-40.dsl.telepac.pt] has joined #scheme 11:40:09 mark_weaver [~user@209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 11:41:03 wbooze [~wbooze@xdsl-87-79-193-196.netcologne.de] has joined #scheme 11:54:19 -!- Nisstyre-laptop [~yours@oftn/member/Nisstyre] has quit [Ping timeout: 260 seconds] 11:58:20 Stanislaw_ [~quassel@124-148-251-7.dyn.iinet.net.au] has joined #scheme 11:58:54 -!- Onionnion|Eee [~ryan@adsl-68-254-167-6.dsl.milwwi.ameritech.net] has quit [Quit: Leaving] 12:01:41 -!- Stanislaw [~quassel@58-7-203-229.dyn.iinet.net.au] has quit [Ping timeout: 255 seconds] 12:02:26 Sorella_ [~quildreen@201-58-224-253.user.veloxzone.com.br] has joined #scheme 12:09:24 MrFahrenheit [~RageOfTho@77.221.30.167] has joined #scheme 12:17:46 hiroaki [~hiroaki@ip-78-94-227-230.unitymediagroup.de] has joined #scheme 12:17:51 hiroaki_ [~hiroaki@ip-78-94-227-230.unitymediagroup.de] has joined #scheme 12:18:50 -!- hiroaki_ [~hiroaki@ip-78-94-227-230.unitymediagroup.de] has quit [Client Quit] 12:20:33 -!- astertronistic [~astertron@ip70-181-247-103.sd.sd.cox.net] has quit [Ping timeout: 265 seconds] 12:25:05 -!- Tanami [~carnage@9ch.in] has quit [Ping timeout: 255 seconds] 12:28:17 Tanami [~carnage@9ch.in] has joined #scheme 12:42:28 erann [~erann@24.Red-83-61-36.dynamicIP.rima-tde.net] has joined #scheme 12:57:49 -!- hiroaki [~hiroaki@ip-78-94-227-230.unitymediagroup.de] has quit [Ping timeout: 252 seconds] 12:57:52 -!- erann is now known as erann-F1 13:01:16 Gmind [~Deulamco@113.190.192.84] has joined #scheme 13:05:04 -!- mark_weaver [~user@209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 13:10:04 attila_lendvai [~attila_le@95.56.126.38] has joined #scheme 13:10:04 -!- attila_lendvai [~attila_le@95.56.126.38] has quit [Changing host] 13:10:04 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 13:12:26 -!- cdidd [~cdidd@128-72-30-62.broadband.corbina.ru] has quit [Remote host closed the connection] 13:28:13 cdidd [~cdidd@128-72-164-129.broadband.corbina.ru] has joined #scheme 13:28:43 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Quit: Leaving.] 13:43:03 Nisstyre-laptop [~yours@oftn/member/Nisstyre] has joined #scheme 13:44:44 -!- crundar [~user@99-108-224-199.lightspeed.iplsin.sbcglobal.net] has quit [Ping timeout: 255 seconds] 14:04:24 crundar [~user@99-108-224-199.lightspeed.iplsin.sbcglobal.net] has joined #scheme 14:05:55 -!- Nisstyre-laptop [~yours@oftn/member/Nisstyre] has quit [Ping timeout: 265 seconds] 14:06:46 teiresias [~teiresias@archlinux/trusteduser/teiresias] has joined #scheme 14:20:42 civodul [~user@reverse-83.fdn.fr] has joined #scheme 14:29:51 hiroaki [~hiroaki@ip-78-94-227-230.unitymediagroup.de] has joined #scheme 14:32:07 -!- fantazo [~fantazo@91-119-203-9.dynamic.xdsl-line.inode.at] has quit [Remote host closed the connection] 14:35:05 tupi [~david@177.150.79.93] has joined #scheme 14:39:23 Sorella__ [~quildreen@201-58-194-49.user.veloxzone.com.br] has joined #scheme 14:42:19 -!- Sorella_ [~quildreen@201-58-224-253.user.veloxzone.com.br] has quit [Ping timeout: 260 seconds] 14:47:56 add^_ [~add^_@m37-2-171-154.cust.tele2.se] has joined #scheme 14:58:13 -!- erann-F1 is now known as erann 15:05:25 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Ping timeout: 248 seconds] 15:21:15 -!- qu1j0t3 [~qu1j0t3@kvm5.telegraphics.com.au] has left #scheme 15:21:23 -!- Nshag [user@chl45-1-88-123-84-8.fbx.proxad.net] has quit [Ping timeout: 252 seconds] 15:22:25 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 15:23:17 -!- acarrico [~acarrico@user-0c9aeu4.cable.mindspring.com] has quit [Ping timeout: 255 seconds] 15:24:02 Nshag [user@chl45-1-88-123-84-8.fbx.proxad.net] has joined #scheme 15:25:08 -!- Sorella__ is now known as Sorella 15:39:41 -!- bipt [~bpt@cpe-076-182-071-114.nc.res.rr.com] has quit [Ping timeout: 268 seconds] 15:40:42 pjb` [~t@vil93-14-88-184-74-97.fbx.proxad.net] has joined #scheme 15:43:08 dnolen [~user@cpe-74-64-61-245.nyc.res.rr.com] has joined #scheme 15:44:07 -!- pjb [~t@vil93-14-88-184-74-97.fbx.proxad.net] has quit [Ping timeout: 252 seconds] 15:44:42 -!- pjb` [~t@vil93-14-88-184-74-97.fbx.proxad.net] has quit [Client Quit] 15:45:54 pjb [~t@vil93-14-88-184-74-97.fbx.proxad.net] has joined #scheme 15:46:12 -!- pjb [~t@vil93-14-88-184-74-97.fbx.proxad.net] has quit [Remote host closed the connection] 15:48:35 -!- Nshag [user@chl45-1-88-123-84-8.fbx.proxad.net] has quit [Ping timeout: 260 seconds] 15:53:23 Nshag [user@chl45-1-88-123-84-8.fbx.proxad.net] has joined #scheme 15:54:05 pjb [~t@vil93-14-88-184-74-97.fbx.proxad.net] has joined #scheme 15:58:49 -!- leppie [~lolcow@105-236-244-248.access.mtnbusiness.co.za] has quit [] 16:06:45 jonrafkind [~jon@racket/jonrafkind] has joined #scheme 16:23:00 leppie [~lolcow@105-236-244-248.access.mtnbusiness.co.za] has joined #scheme 16:27:01 -!- dnolen [~user@cpe-74-64-61-245.nyc.res.rr.com] has quit [Ping timeout: 252 seconds] 16:42:50 ijp [~user@host86-171-26-131.range86-171.btcentralplus.com] has joined #scheme 16:48:04 jewel [~jewel@105.237.24.33] has joined #scheme 16:48:49 stis [~stis@1-1-1-39a.veo.vs.bostream.se] has joined #scheme 16:56:59 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 17:01:36 bipt [~bpt@cpe-076-182-071-114.nc.res.rr.com] has joined #scheme 17:13:54 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 17:17:48 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Client Quit] 17:20:50 -!- erann [~erann@24.Red-83-61-36.dynamicIP.rima-tde.net] has quit [Quit: Error: protocol HTCPCP unsupported] 17:27:35 phax [~phax@unaffiliated/phax] has joined #scheme 17:31:42 -!- imphasing [~Alex@97-81-65-25.dhcp.athn.ga.charter.com] has quit [Ping timeout: 276 seconds] 17:31:42 gravicappa [~gravicapp@ppp91-77-212-232.pppoe.mtu-net.ru] has joined #scheme 17:37:11 Negdayen [~jacob@184.2.192.153] has joined #scheme 18:05:56 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 18:12:30 NeedMoreDesu [~user@109.122.23.91] has joined #scheme 18:13:15 There is set and setq in cl(or elisp), there is set! equivalent of setq in scheme. Where is set? 18:14:01 NeedMoreDesu: it is nonsensical in scheme, since scheme symbols don't have a value slot. 18:14:35 (set sym val) == (setf (symbol-value sym) val) 18:15:54 (define a #f) (define b 'a) (set b 12) ? 18:17:42 -!- juanfra__ [juanfra684@gateway/shell/blinkenshell.org/x-ovuonafvhvvwjvpk] has quit [Quit: juanfra__] 18:20:03 Wow, so there is even no way to get 'a, given 'b? 18:20:42 Correct. The meaning of your program does not depend on the names you used to write it. If you consistently rewrite a name, the meaning of your program won't change. 18:20:54 So you can be guaranteed, for example, that if (let ((x 0)) (f x) x) returns, its value will be 0. 18:22:12 And you can rewrite that fragment as (let ((y 0)) (f y) y) without worrying about changing anything about your program. 18:22:15 Okay, thanks. 18:22:18 NeedMoreDesu: in CL, emacs lisp and older lisps, yes, (set b 12) would modify the value of the symbol a. 18:22:24 But not in scheme. 18:23:24 I'm trying to get scheme way, already know elisp/cl on some basic level. Any tips? 18:23:37 Note however, that CL and emacs-24 have lexical bindings that behave like scheme. SET only works on the symbol value slot (which is used for the special bindings). 18:24:30 NeedMoreDesu: well, I'd just read r5rs, and sicp. 18:25:12 Got it :3 18:28:34 ffs [~garland@unaffiliated/ffs] has joined #scheme 18:34:31 -!- Gmind [~Deulamco@113.190.192.84] has quit [Quit: Leaving.] 18:35:33 One more question: (+ 1 (call/cc (lambda(arg) (set! a arg) 2)) (begin (display "asd") 3)) (begin 1 (call/cc (lambda(arg) (set! b arg) 2)) (begin (display "asd") 3)) (a 9000) (b 9000) ; (a 9000) does not display asd, but (b 9000) does 18:37:57 -!- wingo [~wingo@77-56-172-80.dclient.hispeed.ch] has quit [Ping timeout: 245 seconds] 18:40:43 imphasing [~Alex@97-81-65-25.dhcp.athn.ga.charter.com] has joined #scheme 18:42:22 Gmind [~Deulamco@113.190.192.84] has joined #scheme 18:48:39 that likely depends on the order in which your scheme evaluates arguments to functions 18:49:35 if the last argument to + was evaluated before the second argument, this would indeed not display asd on repeated invocations of the continuation 18:50:07 begin, on the other hand, is always evaluated left to right 18:51:45 -!- b4283 [~b4283@1-172-80-248.dynamic.hinet.net] has quit [Remote host closed the connection] 18:51:51 (+ (begin (display "asd1") 3) (call/cc (lambda(arg) (set! a arg) 2)) (begin (display "asd2") 3)) 18:51:51 doesn't work too 18:52:46 NeedMoreDesu: like I say, it depends on the order you evaluate the arguments 18:53:05 while I don't know any examples offhand, it is perfectly compliant to evaluate the first and third arguments before the second 18:53:21 maybe some optimising compilers take advantage of this 18:55:02 If I evaluate that in guile, calling a again will display asd2, but not asd1 18:55:19 Oh, ok, thanks :3 18:55:37 Btw, want to learn guile too. 18:56:29 perhaps someone on your implementations mailing list will be able to give you a better understanding of how function arguments are evaluated 18:57:26 Well, I've tried with ~7 args, in any position. 18:58:10 maybe they are detecting call/cc and treating it specially 18:59:34 -!- Gmind [~Deulamco@113.190.192.84] has quit [Read error: Connection reset by peer] 19:00:53 -!- tupi [~david@177.150.79.93] has quit [Ping timeout: 256 seconds] 19:05:34 erann [~erann@240.Red-79-146-126.dynamicIP.rima-tde.net] has joined #scheme 19:09:07 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Remote host closed the connection] 19:09:44 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 19:12:37 -!- dca [~user@95-28-34-187.broadband.corbina.ru] has quit [Ping timeout: 246 seconds] 19:14:15 dca [~user@95-28-34-187.broadband.corbina.ru] has joined #scheme 19:14:36 fantazo [~fantazo@91-119-203-9.dynamic.xdsl-line.inode.at] has joined #scheme 19:18:36 -!- wbooze [~wbooze@xdsl-87-79-193-196.netcologne.de] has quit [Ping timeout: 240 seconds] 19:18:57 mark_weaver [~user@TURNTABLE.MIT.EDU] has joined #scheme 19:23:19 wbooze [~wbooze@xdsl-78-35-171-72.netcologne.de] has joined #scheme 19:23:31 -!- imphasing [~Alex@97-81-65-25.dhcp.athn.ga.charter.com] has quit [Quit: rebooting] 19:28:03 imphasing [~Alex@97-81-65-25.dhcp.athn.ga.charter.com] has joined #scheme 19:31:06 i tried loading the scip code from the net both on mit-scheme and chicken scheme interpreter without luck.... 19:31:32 they barf at dispatch proc .... 19:36:33 wbooze: http://www.neilvandyke.org/racket-sicp/ 19:38:06 wbooze: you have to adapt your scheme to sicp. 19:46:24 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 244 seconds] 19:47:33 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 276 seconds] 19:49:26 Onionnion|Eee [~ryan@ip-64-134-171-181.public.wayport.net] has joined #scheme 19:50:29 -!- Negdayen [~jacob@184.2.192.153] has left #scheme 19:53:49 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 20:04:32 -!- hiroaki [~hiroaki@ip-78-94-227-230.unitymediagroup.de] has quit [Ping timeout: 255 seconds] 20:12:34 tcleval [~funnyguy@177.158.162.66] has joined #scheme 20:15:59 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 20:19:29 -!- tcleval [~funnyguy@177.158.162.66] has left #scheme 20:27:26 -!- Euthy [~euthy@unaffiliated/euthydemus] has quit [Quit: leaving] 20:32:35 -!- mark_weaver [~user@TURNTABLE.MIT.EDU] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 20:47:54 -!- jewel [~jewel@105.237.24.33] has quit [Ping timeout: 240 seconds] 20:49:05 -!- erann [~erann@240.Red-79-146-126.dynamicIP.rima-tde.net] has quit [Quit: erann] 20:50:30 -!- ijp [~user@host86-171-26-131.range86-171.btcentralplus.com] has quit [Ping timeout: 264 seconds] 20:50:39 erann [~erann@240.Red-79-146-126.dynamicIP.rima-tde.net] has joined #scheme 20:56:39 Does scheme have a built-in pi variable? 20:57:00 or is it compiler/interpretor-specific 20:57:09 No. But you can spell it (atan 0 -1). 20:58:42 atan? 20:59:06 how does that return pi? 21:00:05 Magic! 21:00:28 -!- gaze__ [62b61805@gateway/web/freenode/ip.98.182.24.5] has quit [Ping timeout: 245 seconds] 21:00:33 O.o I don't get it 21:00:35 Mathgic! 21:00:38 If you travel pi radians counterclockwise about the unit circle starting from (1, 0), where do you end up? 21:00:59 (Mathemagic land, of course! But more specifically?) 21:02:09 I just don't know what the atan proc is 21:02:27 It's the arctangent function. 21:02:29 Arctangent? 21:02:30 ah 21:05:19 yeah I'm not all that familiar with that type of math (yet), was just trying to get a pi var but thanks 21:11:47 -!- erann [~erann@240.Red-79-146-126.dynamicIP.rima-tde.net] has quit [Ping timeout: 256 seconds] 21:16:54 erann [~erann@214.Red-83-33-85.dynamicIP.rima-tde.net] has joined #scheme 21:17:05 astertronistic [~astertron@ip70-181-247-103.sd.sd.cox.net] has joined #scheme 21:19:21 -!- answer_42 [~answer_42@gateway/tor-sasl/answer42/x-66983568] has quit [Quit: WeeChat 0.3.9] 21:22:09 -!- add^_ [~add^_@m37-2-171-154.cust.tele2.se] has quit [Quit: add^_] 21:24:00 weird 21:24:24 isn't this right? (define (circumference r) (pi * 2 * r)) 21:24:32 I have pi defined 21:25:00 wait 21:25:05 But not defined as a procedure, am I right? ;-) 21:25:10 >.< forgot, prefix notation 21:25:30 derpaderp 21:27:26 lol got it now :P 21:27:40 Onionnion|Eee: What are you working on, out of curiosity? 21:28:15 klutometis, nothing specific, just practicing things like syntax and how to make stuff work 21:32:03 Onionnion|Eee: Did you check out the classic make-stuff-work book? 21:32:15 No? 21:32:29 Learning from SiCP and the '86 MIT Lectures 21:38:11 Onionnion|Eee: On, nice; that's exactly it. 21:38:30 Sweet 21:38:40 -!- Nisstyre [~yours@oftn/member/Nisstyre] has quit [Quit: Leaving] 21:40:00 by the way why did the example in the book sicp about accumulate not give a proper tail-recursive def of it ? 21:40:28 Nisstyre [~yours@oftn/member/Nisstyre] has joined #scheme 21:41:25 i can't get something run because the stack grows and grows ..... 21:41:37 wbooze: that would certainly be bad. 21:41:53 and then i get thrown into the debugger....with heap and/or stack corruption.... 21:43:15 Heap and/or stack corruption? In what Scheme system? 21:43:38 in common-lisp 21:43:52 -!- stis [~stis@1-1-1-39a.veo.vs.bostream.se] has quit [Remote host closed the connection] 21:43:55 but it wouldn't matter if it were scheme...... 21:44:04 it's not tail-recursive..... 21:44:24 scheme and common-lisp both optimize only tail-recursives..... 21:45:53 so the programmer has the burden of writing it in tail-recursive way if he does not want the stack/heap grow and the program abort due to that..... 21:46:07 but i couldn't get how to convert that one to tail-recursive really.... 21:50:47 wbooze: TCO is not standard in CL. 21:51:11 wbooze: some implementations provide it, some don't. And those that provide it, do only in some circumstances, not all. 21:51:15 in my implementation it is, it seems.... 21:51:27 wbooze: eg. in clisp, TCO is only implemented by the compiler, not by the interpreter. 21:51:42 i use sbcl 21:51:59 If your code count on the implementation to be runnable, then it's not conforming. 21:52:02 the same i think..... 21:52:15 wbooze: in CL, use LOOP or some other looping operator. 21:52:45 i tried dolist 21:53:16 but no go again...either i'm too dumb for that or someting else is going on... 21:53:28 In general in lisp, we try to name explicitely the operations we're doing. If we want a loop, it's better to write (loop something) rather than get an implicit loop thru recursion. 21:54:54 -!- Onionnion|Eee [~ryan@ip-64-134-171-181.public.wayport.net] has quit [Remote host closed the connection] 21:55:23 IIRC all it takes to make sbcl exhaust the control stack is a special variable. 21:56:59 (funcall op (car seq) seq) for which the seq is the (accumulate op init (cdr seq)), the deffered operation is the first so (funcall op (car seq) (accumulate op init.......i can get rid of the deferred one in an accumulator variable say acc, but then it's no more a simple matter of just 1+' ing that one..... 21:59:29 do i use that as init to the tail-recursive one ? 21:59:46 (accumulate op acc (cdr seq)) ? 22:01:29 (define (accumulate op acc lst) (if (null? lst) acc (accumulate op (op acc (car lst)) (cdr lst)))) 22:01:39 -!- gravicappa [~gravicapp@ppp91-77-212-232.pppoe.mtu-net.ru] has quit [Ping timeout: 256 seconds] 22:02:00 (defun accumulate (op acc list) (if (null list) acc (accumulate op (funcall op acc (car list)) (cdr list)))) 22:02:38 But again, if you count on your CL implementation for the last one, then it's not conforming, and you'd better write: 22:02:48 -!- phax [~phax@unaffiliated/phax] has quit [Ping timeout: 244 seconds] 22:02:53 (defun accumulate (op acc list) (reduce op list :initial-value acc)) 22:03:21 or (defun accumulate (op acc list) (loop for item in list do (setf acc (funcall op acc item)) finally (return acc))) 22:09:14 hah 22:09:51 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 260 seconds] 22:10:12 -!- shardz [~samantha@ilo.staticfree.info] has quit [Ping timeout: 265 seconds] 22:10:26 i get on >(accumulate #'cons nil (list 1 2 3 4 5)) => (1 2 3 4 5) in one case and (((((nil . 1) . 2) .3) .4). 5) in the other case..... 22:10:52 depending on if i used the latter version or the former of accumulate.... 22:11:45 and i don't get why i didn't get that before, cause i tried already your version and it was erroring....somehow.... 22:11:59 hmmmmm 22:12:57 The difference would be on the order of the arguments to op. 22:13:26 Ie. if you use foldr or foldl in scheme, or (reduce) or (reduce :from-end t) in CL. 22:14:00 githogori [~githogori@adsl-66-123-22-146.dsl.snfc21.pacbell.net] has joined #scheme 22:16:53 shardz [~samantha@ilo.staticfree.info] has joined #scheme 22:25:52 -!- masm [~masm@bl16-219-40.dsl.telepac.pt] has quit [Quit: Leaving.] 22:28:06 cluck [~user@108.80.108.93.rev.vodafone.pt] has joined #scheme 22:28:50 :) 22:35:52 -!- bipt [~bpt@cpe-076-182-071-114.nc.res.rr.com] has quit [Ping timeout: 244 seconds] 22:38:20 duh 22:38:47 that's like foldl then.... 22:45:30 -!- NeedMoreDesu [~user@109.122.23.91] has quit [Remote host closed the connection] 22:52:44 fewwwww 22:53:02 now i got it..... 22:54:32 (defun accumulate (op seq init) (if (null seq) init (accumulate op (funcall op init (car seq)) (cdr seq))))..... 22:54:35 mjonsson [~mjonsson@38.109.95.133] has joined #scheme 22:55:09 but doesn't reflect anymore the real order of the arguments..... 22:57:32 lol 22:58:42 that's where i'd have to use macros not ? 22:59:50 or would a (let ((seq init) (init seq).. do ? 23:06:39 sonstwo [~garland@unaffiliated/ffs] has joined #scheme 23:07:23 -!- ffs [~garland@unaffiliated/ffs] has quit [Ping timeout: 268 seconds] 23:08:52 -!- gffa [~unknown@unaffiliated/gffa] has quit [Quit: sleep] 23:20:22 mark_weaver [~user@TURNTABLE.MIT.EDU] has joined #scheme 23:24:37 -!- sonstwo [~garland@unaffiliated/ffs] has quit [Ping timeout: 246 seconds] 23:27:24 ffs [~garland@unaffiliated/ffs] has joined #scheme 23:34:57 Onionnion|Eee [~ryan@adsl-68-254-167-6.dsl.milwwi.ameritech.net] has joined #scheme 23:39:15 -!- civodul [~user@reverse-83.fdn.fr] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:45:15 -!- amgarchIn9 [~amgarchin@p4FD6174B.dip0.t-ipconnect.de] has quit [Quit: Konversation terminated!] 23:46:29 -!- mmc1 [~michal@178-85-56-58.dynamic.upc.nl] has quit [Ping timeout: 256 seconds] 23:46:42 -!- fantazo [~fantazo@91-119-203-9.dynamic.xdsl-line.inode.at] has quit [Ping timeout: 245 seconds] 23:47:37 Is Rachet basically 99% Scheme? 23:47:42 or what's the difference 23:48:01 er, racket 23:49:57 Racket actually has a pile of languages in it. One (or two) of them are straight-up scheme. 23:50:15 The Racket Language per se, though, is almost-Scheme with lots of handy stuff added. 23:50:33 One difference: scheme lets you mutate cons cells; Racket doesn't. 23:51:12 I am nowhere near experienced enough to know what that is :P 23:51:21 doesn't matter, thenm. 23:51:32 If you have some "scheme" code and you're wondering if Racket will run it, give it a try. 23:51:36 Either it will or it won't :) 23:51:43 If not, people here can probably figure out what up. 23:52:13 Onionnion|Eee: To add to what offby1 said, usually, all that you need to make Scheme code run in Racket is to add the line "#lang racket" at the top of the file. 23:52:16 Racket is also actively maintained; I suspect there are only two or three other Schemes that are. 23:53:07 I'm just trying to find an interpretor with command recalling and won't put in the weird symbols when I press left arrow to fix a typo 23:53:27 You can use Racket+xrepl. 23:53:36 rudybot: doc xrepl 23:53:37 stamourv: your sandbox is ready 23:53:37 stamourv: not found in any library's documentation: xrepl 23:53:44 rudybot: (require xrepl) 23:53:44 stamourv: Done. 23:53:46 rudybot: doc xrepl 23:53:47 stamourv: not found in any library's documentation: xrepl 23:54:12 http://doc.racket-lang.org/xrepl/index.html?q=xrepl 23:55:47 many thanks 23:56:14 this helps a lot now 23:56:15 onionnion|eee: I wonder if you'd be happier with Guile. 23:56:24 I suspect it does readline properly right out of the box. 23:56:30 I looked at it, it doesn't 23:59:18 In general rlwrap adds readline to pretty much anything. 23:59:20 rlwrap should work for interpreters that don't. 23:59:40 Of course, a good repl (like xrepl) provides a lot more than just readline support.