00:00:54 is there a way to add a read-macro in r5rs? 00:01:43 No. 00:12:44 tcleval [~funnyguy@186.213.4.191] has joined #scheme 00:13:19 hi, how can I change a list without returning a new one? I mean I want to know if I can mutate a list. 00:13:25 -!- tab1ta [~tab1ta@host137-8-dynamic.10-79-r.retail.telecomitalia.it] has quit [Ping timeout: 250 seconds] 00:14:03 tcleval, set-car!, set-cdr! 00:14:27 if you don't have those functions, you're probably using Racket 00:15:05 where there are separate types for mutable conses 00:15:37 weirdo: I am using chicken, I hope I can find those 00:15:54 chicken should be fine 00:16:19 weirdo: chicken-doc says I am on the right path, thx a lot 00:17:14 :-) 00:17:59 -!- MrFahrenheit [~RageOfTho@users-146-176.vinet.ba] has quit [Ping timeout: 258 seconds] 00:18:18 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 00:19:49 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 00:21:08 weirdo: No, your bigger problem is using a macro system where binding names are symbolic illusions. 00:21:31 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 252 seconds] 00:22:02 eli, could you please elaborate? again, i come from a CL background 00:22:04 pnkfelix [~Adium@c-71-225-165-188.hsd1.pa.comcast.net] has joined #scheme 00:23:21 weirdo: You're using symbols, an unhygienic macro system is a bug, no matter how popular it is in CL. 00:25:25 -!- drdo` is now known as drdo 00:25:34 eli, i plan to do stuff like ,(toplevel 'foo) which fetches the system binding in the macroexpansion 00:25:57 this will be tedious, but there'll be a read-macro in the self-hosting compiler 00:27:06 is that unsound as well? 00:27:30 if so, i'm gonna have to drop cl macros, i suppose 00:32:28 -!- joseanpg [5aaf6c84@gateway/web/freenode/ip.90.175.108.132] has quit [Ping timeout: 252 seconds] 00:33:43 invisiblecure [~chatzilla@201-13-164-162.dial-up.telesp.net.br] has joined #scheme 00:33:48 -!- pnkfelix [~Adium@c-71-225-165-188.hsd1.pa.comcast.net] has quit [Quit: Leaving.] 00:45:19 -!- invisiblecure [~chatzilla@201-13-164-162.dial-up.telesp.net.br] has quit [Quit: ChatZilla 0.9.87 [Firefox 3.6.16/20110319135224]] 00:59:18 -!- pyro- [~pyro@unaffiliated/purplepanda] has quit [Remote host closed the connection] 01:01:57 homie` [~levgue@xdsl-78-35-170-158.netcologne.de] has joined #scheme 01:03:59 pyro- [~pyro@unaffiliated/purplepanda] has joined #scheme 01:04:58 -!- homie [~levgue@xdsl-78-35-137-191.netcologne.de] has quit [Ping timeout: 264 seconds] 01:06:00 weirdo: "Fetching system bindings" is unrelated to a (bad) symbolic macro system. 01:06:10 For that, you should use a module system. 01:07:07 eli, there is a lexenv, which is separate for each module, except there is no module syntax yet 01:07:29 it has separate toplevel bindings* 01:07:35 invisiblecure [~chatzilla@201-13-164-162.dial-up.telesp.net.br] has joined #scheme 01:07:36 I have no idea how to parse that sentence. 01:08:58 eli, there is lexenv, which contains toplevel bindings, and there are separate lexenvs for each module 01:09:16 eli, to macroexpand-1, i always pass a lexenv argument which designates a module 01:09:18 -!- mejja [~user@c-0eb9e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Quit: ChatZilla 0.9.87 [Firefox 5.0/20110615151330]] 01:09:55 a lexenv contains toplevel bindings, lexical bindings, but also code prologue used for (quote ...) 01:09:59 weirdo: I still don't know what is a "lexenv", how it "contains" toplevel bindings, or how these bindings are represented. 01:10:17 {foo "SCM_184_foo" var #f} 01:10:46 -!- pygospa [~TheRealPy@kiel-d9bfdbb4.pool.mediaWays.net] has quit [Disconnected by services] 01:10:49 this is a variable. in order: symbol, JS identifier (unimportant), type (var or macro) and compiler macro 01:10:50 In any case, as long as you use symbols in your macros as your earlier paste did, chances are you're doing it wrong. 01:10:56 pygospa [~TheRealPy@kiel-4dbedc27.pool.mediaWays.net] has joined #scheme 01:12:03 and "lexenv" is short for lexical environment 01:13:23 Penten [~user@114.255.149.182] has joined #scheme 01:14:43 PokeTron [~PokeTron@unaffiliated/poketron] has joined #scheme 01:14:48 -!- PokeTron [~PokeTron@unaffiliated/poketron] has left #scheme 01:26:02 levi` [~user@c-174-52-219-147.hsd1.ut.comcast.net] has joined #scheme 01:26:39 -!- levi` is now known as levi 01:31:06 -!- fbass [~fbass@75-173-81-122.albq.qwest.net] has quit [Read error: Operation timed out] 01:31:55 -!- pandeiro [~pandeiro@187.105.249.212] has quit [Quit: Thanks, fellas] 01:33:52 is it common for "equal?" to fail to terminate if there are circular data structures? 01:34:53 it is a common flaw. use tortoise-and-hare algo. 01:35:27 thank you! 01:40:10 -!- bgs100 [~ian@unaffiliated/bgs100] has quit [Quit: DRAMATIC NOOOOOOOOO] 01:55:38 -!- djkfdalkj [~paulh@244-15-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 01:56:48 fbass [~fbass@75-173-81-122.albq.qwest.net] has joined #scheme 02:00:23 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 02:00:31 Penten` [~user@114.255.149.182] has joined #scheme 02:01:22 -!- Penten [~user@114.255.149.182] has quit [Ping timeout: 264 seconds] 02:15:32 -!- hussaibi [~hussaibi@wirewall.cs.toronto.edu] has quit [Ping timeout: 252 seconds] 02:17:45 chemuduguntar [~ravic@smtp.touchcut.com] has joined #scheme 02:19:40 Is there any reason not to allow complex numbers with different exactness in their real and imaginary components? 02:22:15 haole [~ivan@187.37.82.153] has joined #scheme 02:22:56 perhaps speed, when you have to perform ops on them there are more type-dispatches 02:23:00 but i could be smoking crack 02:23:41 instead of going through some %complex-rational-/ function it has to go through %generic-/ 02:23:44 hello there... i want to write a small scheme interpreter to learn some new things and i was willing to follow some of the basics of the r6rs standard, but i read somewhere that r6rs doesn't follow the initial simple design of the language... is this true? should i begin with r5rs instead? 02:24:23 haole, definitely, if you're just a hobbyist and don't want to use it for some production purposes 02:26:05 weirdo, i'm reading both of them right now... what are the main differences that "bloat" r6rs? 02:26:20 i like a lot the idea of SRFIs of scheme 02:26:26 haole, the length of the document 02:26:33 keeping a core small and implementing some libraries following a standard if needed 02:26:34 it's hard to come up with an index that big 02:28:20 i was willing to use chicken scheme for some production projects 02:28:24 web based ones 02:28:37 it would be my first non-academic use of the language 02:28:42 hope it succeeds :) 02:29:21 Chicken doesn't implement R6RS (AFAIK), so that'd be right up your alley re using R5RS. 02:34:43 haole, why bother interpreting your parens? why not write a compiler instead? 02:35:16 -!- fbass [~fbass@75-173-81-122.albq.qwest.net] has quit [Quit: leaving] 02:35:23 fbass [~fbass@75-173-81-122.albq.qwest.net] has joined #scheme 02:36:47 foof, inexactness contagion. (+ a b) gives an inexact if either a or b is inexact; surely, so then should (+ a (* +i b)). 02:38:15 -!- haole [~ivan@187.37.82.153] has quit [Ping timeout: 260 seconds] 02:38:58 -!- masm [~masm@bl19-142-4.dsl.telepac.pt] has quit [Ping timeout: 246 seconds] 02:45:00 i have a silly idea that would probably easily be refuted 02:45:02 -!- martinhex [~mjc@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 02:45:46 how about not CPS-transforming functions that cannot return non-locally? 02:45:57 that would give a large CPU and memory boost 02:46:06 the problem is deciding which functions these are 02:46:52 i'd have to combine that with type inference, to define a class of functions that never fail if their type arguments are OK 02:47:04 and compile them twice, that is 02:47:08 how does it sound? 02:47:24 -!- drdo [~drdo@91.205.108.93.rev.vodafone.pt] has quit [Remote host closed the connection] 02:48:10 drdo [~drdo@91.205.108.93.rev.vodafone.pt] has joined #scheme 02:49:56 martinhex [~mjc@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 02:51:48 -!- fbass [~fbass@75-173-81-122.albq.qwest.net] has quit [Quit: leaving] 02:51:54 fbass [~fbass@75-173-81-122.albq.qwest.net] has joined #scheme 02:56:15 hussaibi [~hussaibi@wirewall.cs.toronto.edu] has joined #scheme 02:56:45 -!- hussaibi [~hussaibi@wirewall.cs.toronto.edu] has quit [Read error: Connection reset by peer] 03:05:32 -!- fbass [~fbass@75-173-81-122.albq.qwest.net] has quit [Quit: Lost terminal] 03:05:59 -!- homie` [~levgue@xdsl-78-35-170-158.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 03:09:05 hussaibi [~hussaibi@wirewall.cs.toronto.edu] has joined #scheme 03:10:47 haole [~ivan@187.37.82.153] has joined #scheme 03:13:08 -!- invisiblecure [~chatzilla@201-13-164-162.dial-up.telesp.net.br] has quit [Quit: gotta go] 03:15:13 Penten`` [~user@114.255.149.182] has joined #scheme 03:16:08 -!- drdo [~drdo@91.205.108.93.rev.vodafone.pt] has quit [Remote host closed the connection] 03:18:10 -!- Penten` [~user@114.255.149.182] has quit [Ping timeout: 264 seconds] 03:21:36 when using tortoise and hare, the first argument has to walk just cdr or both car and cdr? 03:23:31 drdo [~drdo@91.205.108.93.rev.vodafone.pt] has joined #scheme 03:29:00 Riastradh: If we can represent correctly that the real part is exact and the imaginary part inexact in that example, then we haven't lost the inexactness. 03:31:35 Obviously, the inexactness contagion must be preserved and consistent. Multiplication or division of complex numbers with either component inexact will result in both components being inexact. This is not so for addition or subtraction. 03:33:42 -!- phax [~phax@unaffiliated/phax] has quit [Ping timeout: 240 seconds] 03:34:42 The exactness difference may occur naturally. Consider (sqrt -x), with x inexact. The imaginary component will be inexact, but since x is real we can safely say the real component is exactly 0. 03:36:24 Hmmm... I suppose it depends on whether you consider real numbers to have exact zero imaginary parts, or if they should always "promote" to a complex with an imaginary part with the same exactness. 03:36:35 Which is just the original question. 03:42:16 -!- drdo [~drdo@91.205.108.93.rev.vodafone.pt] has quit [Read error: Connection reset by peer] 03:42:53 doc_who [~doc_who@pool-108-28-6-47.washdc.fios.verizon.net] has joined #scheme 03:44:26 drdo [~drdo@91.205.108.93.rev.vodafone.pt] has joined #scheme 03:52:01 -!- haole [~ivan@187.37.82.153] has quit [Quit: Saindo] 04:04:12 dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 04:06:20 -!- drdo [~drdo@91.205.108.93.rev.vodafone.pt] has quit [Read error: Connection reset by peer] 04:06:36 weirdo: for circular structures in general, you want to put all the objects walked into a hash or list. If you just want to detect a circular list, without minding the structure of its element, obviously you need to walk only the cdr. 04:06:39 The other question, is should a complex number be allowed to have +nan.0 components? 04:07:19 phax [~phax@unaffiliated/phax] has joined #scheme 04:07:20 pjb, thank you. that's what i wanted to do in the first place. just thought tortoise and hare would be more efficient 04:07:49 My instinct here is no, because it violates the definition that the components be real numbers, and it doesn't mean anything to add a non-number to any number, imaginary or otherwise. 04:07:51 hussaibi_ [~hussaibi@wirewall.cs.toronto.edu] has joined #scheme 04:07:58 -!- csdwifi [~csdwifi@76.177.215.56] has quit [Ping timeout: 264 seconds] 04:11:32 csdwifi [~csdwifi@CPE-76-177-215-56.natcky.res.rr.com] has joined #scheme 04:13:05 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 04:21:39 but sometimes you do computations with complexes, only to take in the final just the real part. 04:22:02 So perhaps it wouldn't matter if the imaginary part is infinite. 04:23:12 it would matter 04:23:40 if you intend a complex number to mean something, the imaginary part matters, even if you end up looking at the real part in the end 04:24:18 to have infinite complex part would just be confusing to anybody else with the misfortune of interpreting what you are doing 04:24:49 Infinite complex part? 04:25:06 err, imaginary part 04:25:15 i was just getting too much into the spirit of being incoherent 04:28:02 It's infinitely complex. 04:29:54 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving] 04:30:51 srid [~srid@unaffiliated/srid] has joined #scheme 04:39:57 -!- arbscht [~arbscht@60-234-133-173.bitstream.orcon.net.nz] has quit [Ping timeout: 255 seconds] 04:40:22 -!- zmv [~daniel@c95334de.virtua.com.br] has quit [Quit: sleep] 04:41:27 Lemonator [~kniu@pool-173-52-208-184.nycmny.fios.verizon.net] has joined #scheme 04:41:32 -!- kniu [~kniu@pool-173-52-208-184.nycmny.fios.verizon.net] has quit [Read error: Connection reset by peer] 04:54:08 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 04:54:35 HG` [~HG@p5DC05082.dip.t-dialin.net] has joined #scheme 04:55:50 -!- dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has quit [Quit: dnolen] 05:11:42 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 05:12:31 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 05:14:12 -!- srid [~srid@unaffiliated/srid] has quit [Quit: Computer has gone to sleep.] 05:14:55 -!- tcleval [~funnyguy@186.213.4.191] has quit [Ping timeout: 276 seconds] 05:22:53 drdo [~drdo@91.205.108.93.rev.vodafone.pt] has joined #scheme 05:30:17 -!- HG` [~HG@p5DC05082.dip.t-dialin.net] has quit [Quit: Leaving.] 05:34:59 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 05:44:07 -!- tupi [~david@189.60.162.202] has quit [Remote host closed the connection] 05:57:50 choas [~lars@p5792C65B.dip.t-dialin.net] has joined #scheme 06:12:39 -!- choas [~lars@p5792C65B.dip.t-dialin.net] has quit [Ping timeout: 250 seconds] 06:25:35 -!- alaricsp [~alaric@relief.warhead.org.uk] has quit [Quit: Leaving] 06:32:15 jewel [~jewel@196-215-16-133.dynamic.isadsl.co.za] has joined #scheme 06:41:54 Penten``` [~user@114.255.149.182] has joined #scheme 06:44:41 -!- Penten`` [~user@114.255.149.182] has quit [Ping timeout: 240 seconds] 06:50:27 -!- jewel [~jewel@196-215-16-133.dynamic.isadsl.co.za] has quit [Ping timeout: 255 seconds] 07:00:27 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 276 seconds] 07:06:38 arbscht [~arbscht@60-234-133-173.bitstream.orcon.net.nz] has joined #scheme 07:08:50 mmc [~michal@109.117.133.244] has joined #scheme 07:11:09 -!- hussaibi_ [~hussaibi@wirewall.cs.toronto.edu] has quit [Ping timeout: 255 seconds] 07:11:16 -!- hussaibi [~hussaibi@wirewall.cs.toronto.edu] has quit [Ping timeout: 246 seconds] 07:44:12 wingo [~wingo@90.164.198.39] has joined #scheme 07:44:23 masm [~masm@bl19-142-4.dsl.telepac.pt] has joined #scheme 07:48:16 -!- ASau [~user@95-24-229-205.broadband.corbina.ru] has quit [Quit: off] 07:48:49 -!- drdo [~drdo@91.205.108.93.rev.vodafone.pt] has quit [Remote host closed the connection] 07:53:56 fbass [~fbass@75-173-81-122.albq.qwest.net] has joined #scheme 07:54:46 -!- fbass [~fbass@75-173-81-122.albq.qwest.net] has quit [Client Quit] 07:54:51 fbass [~fbass@75-173-81-122.albq.qwest.net] has joined #scheme 07:59:44 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 08:08:19 -!- Penten``` [~user@114.255.149.182] has quit [Ping timeout: 246 seconds] 08:23:55 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Quit: Leaving] 08:30:49 -!- blueadept [~blueadept@unaffiliated/blueadept] has quit [Quit: Leaving] 08:40:00 -!- mmc [~michal@109.117.133.244] has quit [Ping timeout: 240 seconds] 08:46:08 -!- stepnem [~stepnem@176.119.broadband10.iol.cz] has quit [Read error: Operation timed out] 08:48:42 stepnem [~stepnem@176.119.broadband10.iol.cz] has joined #scheme 08:54:33 -!- realitygrill [~realitygr@c-24-5-7-139.hsd1.ca.comcast.net] has quit [Quit: realitygrill] 08:54:51 mmc [~michal@109.117.194.165] has joined #scheme 08:57:01 -!- weinholt [weinholt@debian/emeritus/weinholt] has quit [Ping timeout: 260 seconds] 08:58:29 -!- csdwifi [~csdwifi@CPE-76-177-215-56.natcky.res.rr.com] has quit [Quit: Leaving] 09:14:39 rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has joined #scheme 09:18:50 -!- aoh [~aki@85.23.168.123] has quit [Read error: Operation timed out] 09:18:56 aoh [~aki@85.23.168.123] has joined #scheme 09:19:25 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 250 seconds] 09:21:58 -!- rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has quit [Read error: Connection reset by peer] 09:23:17 csdwifi [~csdwifi@CPE-76-177-215-56.natcky.res.rr.com] has joined #scheme 09:27:26 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 09:31:20 f8l [~f8l@87-205-51-8.adsl.inetia.pl] has joined #scheme 09:40:09 DGASAU [~user@91.218.144.129] has joined #scheme 09:44:22 rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has joined #scheme 09:45:32 weinholt [weinholt@debian/emeritus/weinholt] has joined #scheme 09:50:31 jdfjklajkl [~paulh@244-15-ftth.onsnetstudenten.nl] has joined #scheme 09:51:37 -!- elliottcable [~elliottca@ec2-174-129-205-205.compute-1.amazonaws.com] has quit [Quit: rage] 09:52:22 phax [~phax@unaffiliated/phax] has joined #scheme 10:03:52 jyfl987 [~jyf@unaffiliated/yunfan] has joined #scheme 10:12:21 hi, i tried the socket example code on guile v1.8's document, and got an error message return, which is "Unbound variable read-line" , so what's wrong with it 10:19:19 sheikra [~sheikra@110.187.68.233] has joined #scheme 10:23:00 jyfl987: (use-modules (ice-9 rdelim)) probably 10:23:41 wingo: ok will try it 10:25:08 wingo: it works, thanks 10:26:04 -!- jyfl987 [~jyf@unaffiliated/yunfan] has quit [Quit: Leaving.] 10:59:12 elliottcable [~me@ell.io] has joined #scheme 11:00:31 -!- fbass [~fbass@75-173-81-122.albq.qwest.net] has quit [Ping timeout: 246 seconds] 11:02:03 -!- kba [kristian@unaffiliated/wanze] has quit [Ping timeout: 276 seconds] 11:04:51 dnolen [~davidnole@cpe-72-229-247-113.nyc.res.rr.com] has joined #scheme 11:07:12 -!- elliottcable [~me@ell.io] has quit [Quit: rage] 11:10:55 elliottcable [~ec@ell.io] has joined #scheme 11:11:25 -!- elliottcable [~ec@ell.io] has quit [Client Quit] 11:12:40 elliottcable [~me@ell.io] has joined #scheme 11:19:07 zmv [~daniel@c95334de.virtua.com.br] has joined #scheme 11:19:45 bah! Spam leaking into the lists! 11:20:08 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 11:22:08 kuribas [~user@94-227-91-92.access.telenet.be] has joined #scheme 11:28:08 blueadept [~blueadept@unaffiliated/blueadept] has joined #scheme 11:35:01 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving] 11:40:04 -!- blueadept [~blueadept@unaffiliated/blueadept] has quit [Quit: Leaving] 11:40:23 blueadept [~blueadept@unaffiliated/blueadept] has joined #scheme 11:49:42 -!- masm [~masm@bl19-142-4.dsl.telepac.pt] has quit [Ping timeout: 255 seconds] 11:54:35 drdo [~drdo@199.119.226.161] has joined #scheme 11:55:08 dlila [~dlila@CPE0014d1c9243c-CM001bd71cede2.cpe.net.cable.rogers.com] has joined #scheme 12:01:13 njoh [~njoh@94.182.85.242] has joined #scheme 12:01:31 -!- njoh [~njoh@94.182.85.242] has left #scheme 12:20:11 -!- mmc [~michal@109.117.194.165] has quit [Ping timeout: 252 seconds] 12:22:14 masm [~masm@2.80.142.4] has joined #scheme 12:25:50 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 12:37:11 Hey, I am hacking a scheme-y language... I wonder how I could pass more than one parameter to my puts call... `(hash-each globals (lambda (k v) (begin (puts k))))' ... I would like to puts k and v together... How would one normally do this the scheme way? 12:40:12 (puts k) (puts v) ? 12:40:26 -!- DrDuck [~duck@adsl-98-81-80-109.hsv.bellsouth.net] has quit [Ping timeout: 260 seconds] 12:41:22 (hash-each globals (lambda (k v) (begin (display k) (display " => ") (display v) (newline)))) 12:41:35 I can do that... 12:41:48 the begin is not need, though, lambda has implicit begin. 12:42:01 dostoyevsky: whats wrong with it then ? 12:42:56 fbs: I am new to scheme and was wondering about the right way to printing variables on the console... 12:43:11 oh ok 12:43:48 afaik thats good, but im no expert 12:44:46 DT``: That makes sense... I need to make begin implicit 12:45:07 I could also let puts take more than one parameter... 12:45:25 (puts k " => " v) 12:45:45 (define (puts . xs) (for-each display xs) (newline))? 12:47:35 mmc [~michal@109.114.51.202] has joined #scheme 12:48:24 joseanpg [5aaf6c84@gateway/web/freenode/ip.90.175.108.132] has joined #scheme 12:48:25 DT``: Looks good.. I could do something like this.. I just implemented list-each... 12:55:29 (define puts2 (lambda (xs) (begin (array-each xs (lambda(x) (display x)))(newline)))) 12:55:36 (puts2 (list "a" "=>" "c")) 12:56:11 This works... It's not yet what DT`` proposed... but it's getting there.. 13:00:39 damd [~secret@unaffiliated/damd] has joined #scheme 13:00:43 -!- damd [~secret@unaffiliated/damd] has left #scheme 13:10:42 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 240 seconds] 13:10:52 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 13:14:46 -!- joseanpg [5aaf6c84@gateway/web/freenode/ip.90.175.108.132] has quit [Ping timeout: 252 seconds] 13:16:31 replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 13:16:55 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Connection reset by peer] 13:18:03 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 13:21:15 What does (puts . xs) do/mean? 13:22:52 dostoyevsky, it's the rest argument. 13:23:29 rudybot, (define (f . xs) xs) 13:23:31 DT``: your sandbox is ready 13:23:31 DT``: Done. 13:23:34 rudybot, (f 1 2 3) 13:23:34 DT``: ; Value: (1 2 3) 13:24:17 basically, `f' gets all its arguments as a list. 13:24:30 rudybot, (f) 13:24:30 DT``: ; Value: () 13:25:07 ``(f . xs)'' this has only a meaning when used as the first parameter to define? 13:25:44 rudybot: (f . xs) 13:25:45 dostoyevsky: your sandbox is ready 13:25:45 dostoyevsky: error: eval:1:0: application: bad syntax in: (f . xs) 13:27:24 genieliu [~genieliu@59.78.62.120] has joined #scheme 13:29:37 dostoyevsky, (x . y) is also the representation of a cons: 13:29:41 rudybot, (cons 1 2) 13:29:41 DT``: ; Value: (1 . 2) 13:30:10 (define (f . xs) ...) is a shorthand for (define f (lambda xs ...)). 13:35:26 PokeTron [~PokeTron@unaffiliated/poketron] has joined #scheme 13:35:35 -!- PokeTron [~PokeTron@unaffiliated/poketron] has left #scheme 13:38:11 -!- sheikra [~sheikra@110.187.68.233] has quit [Ping timeout: 260 seconds] 13:38:31 -!- dnolen [~davidnole@cpe-72-229-247-113.nyc.res.rr.com] has quit [Quit: dnolen] 13:42:01 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 250 seconds] 13:45:35 MrFahrenheit [~RageOfTho@users-146-176.vinet.ba] has joined #scheme 13:48:37 sheikra [~sheikra@118.125.237.3] has joined #scheme 13:50:14 Could I parse (x . y) the following way: If I have a list with 3 elements and the second entry is a '.': cons the first and third entry in the list. 13:50:34 dostoyevsky: no. 13:50:45 . is not an element of the list, it's a syntactic element. 13:51:50 Basically, you parse it as: sexp := '(' ')' | '(' + [ '.' ] ')' | . 13:52:18 the first rule reads (); the second rule reads lists (possibly dotted lists), and the third rule reads atoms. 13:52:39 soveran [~soveran@186.19.214.247] has joined #scheme 13:53:45 When you read list, you cons the elements you read. If there's a dot, the last cons has the last in its cdr. If there's no dot, the last cons has () in its cdr. 13:54:00 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 13:54:18 So: (if (got-dot) (cons before-last-element last-element) (cons last-element '())) 13:56:01 pjb: Can I just think that (x . y) means the pair doesn't end with '() but y? 13:56:21 Yes. (x . y) is the pair you get by calling (cons 'x 'y). 13:56:31 (x) is the pair you get by calling (cons 'x '()) 13:56:39 (x)  (x . ()) 13:57:42 and y is just a primitive data? 13:58:02 It's a symbol, and indeed, it's a primitive data. 13:58:13 But you can put any data in a cons cell. 13:58:28 (cons 42 (cons 4 2)) --> (42 4 . 2) 13:58:44 (42 4 . 2) is the standard way to print (42 . (4 . 2)) 13:59:30 homie [~levgue@xdsl-78-35-164-18.netcologne.de] has joined #scheme 13:59:48 It is clear if you draw a box to replace the abstract data. 14:00:20 Indeed. 14:01:00 it's a little similar to the c's pointer. 14:01:44 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Operation timed out] 14:02:23 To extend that C analogy, a cons is essentially a struct with two data members, named "car" and "cdr". 14:06:06 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 14:11:15 how can i implement eq? hash-tables in a language w/o pointers, namely, javascript? 14:14:57 weirdo: == ? 14:15:07 dostoyevsky, but i need hash codes 14:20:27 -!- sheikra [~sheikra@118.125.237.3] has quit [Quit: Leaving] 14:20:41 -!- zanes [~zane@108-90-245-81.lightspeed.cicril.sbcglobal.net] has quit [] 14:24:23 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 14:26:46 -!- weirdo [~sthalik@d135-185.icpnet.pl] has quit [Quit: Reconnecting] 14:27:05 weirdo [~sthalik@d135-185.icpnet.pl] has joined #scheme 14:30:58 weirdo: You need the equivalent of Java's System.identityHashCode(). Which I'm not sure JS has. 14:31:20 -!- elliottcable [~me@ell.io] has quit [Quit: rage] 14:31:22 it doesn't. at least i can make hash-codes for each of my types 14:32:17 Right. They'd be non-identity hash codes, which means you get more collisions, but it still results in a correct program. 14:33:19 -!- zmv [~daniel@c95334de.virtua.com.br] has quit [Ping timeout: 246 seconds] 14:34:05 On which note: 14:34:12 Oh, drat. jcowan isn't here. 14:36:40 zmv [~daniel@c95334de.virtua.com.br] has joined #scheme 14:39:45 pumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 14:39:53 -!- pumpkin is now known as copumpkin_ 14:40:42 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 240 seconds] 14:40:48 -!- copumpkin_ is now known as copumpkin 14:40:51 elliottcable [~me@ell.io] has joined #scheme 14:58:24 -!- samth_away is now known as samth 15:03:12 realitygrill [~realitygr@c-24-5-7-139.hsd1.ca.comcast.net] has joined #scheme 15:04:59 cky, which one is better? structural identity hash-codes for everything or reference identity by making a word-sized object as a property of _all_ objects like, functions, vectors, etcetera, etcetera? 15:05:29 the latter is what #javascript suggested after finally understanding what "reference equality" means 15:06:26 i think the former. it's hard to sacrifice one more word for each of the objects 15:06:37 cky, thank you for the idea 15:09:41 -!- genieliu [~genieliu@59.78.62.120] has quit [Quit: leaving] 15:14:17 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 15:15:24 -!- realitygrill [~realitygr@c-24-5-7-139.hsd1.ca.comcast.net] has quit [Quit: realitygrill] 15:16:14 -!- zmv [~daniel@c95334de.virtua.com.br] has quit [Quit: leaving] 15:21:31 rudybot, (define (f . something) something) 15:21:31 dostoyevsky: Done. 15:21:55 udybot, (f 1 2 3) 15:21:57 rudybot, (f 1 2 3) 15:21:57 dostoyevsky: ; Value: (1 2 3) 15:25:53 -!- PreciousMetals [~Heart@unaffiliated/colours] has quit [Ping timeout: 240 seconds] 15:26:26 PreciousMetals [~Heart@unaffiliated/colours] has joined #scheme 15:32:12 -!- githogori [~githogori@c-24-7-1-43.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 15:32:21 YokYok [~david@AClermont-Ferrand-651-1-24-147.w86-194.abo.wanadoo.fr] has joined #scheme 15:39:23 sheikra [~sheikra@118.125.237.3] has joined #scheme 15:40:06 dostoyevsky: That function is usually called "list". 15:40:10 rudybot: (list 1 2 3) 15:40:10 cky: your sandbox is ready 15:40:11 cky: ; Value: (1 2 3) 15:40:30 rudybot: ((lambda x x) 1 2 3) 15:40:30 cky: ; Value: (1 2 3) 15:40:37 zanes [~zane@mail.barackobama.com] has joined #scheme 15:40:45 dostoyevsky: ^^--- :-) 15:40:50 tupi [~david@139.82.89.24] has joined #scheme 15:41:58 phao [~phao@pontenova.dpi.ufv.br] has joined #scheme 15:43:15 rudybot, ((lambda lambda lambda) 1 2 3) 15:43:15 weirdo: your sandbox is ready 15:43:15 weirdo: ; Value: (1 2 3) 15:43:18 :-) 15:45:09 y'all weird 15:45:27 *offby1* tries 15:45:39 rudybot: ((buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo) 1 2 3) 15:45:40 *offby1: your sandbox is ready 15:45:40 *offby1: error: reference to an identifier before its definition: buffalo in module: 'program 15:45:45 *offby1* rubs chin 15:46:47 :-D 15:48:16 pandeiro [~pandeiro@bd21cfb9.virtua.com.br] has joined #scheme 15:48:32 what is the sound that a buffalo makes 15:51:21 phax [~phax@unaffiliated/phax] has joined #scheme 15:54:15 Meuh! 16:03:50 -!- rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has quit [Ping timeout: 260 seconds] 16:06:16 srid [~srid@unaffiliated/srid] has joined #scheme 16:07:30 nisstyre_ [~nisstyre@infocalypse-net.info] has joined #scheme 16:08:00 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 255 seconds] 16:09:21 -!- nisstyre_ [~nisstyre@infocalypse-net.info] has quit [Client Quit] 16:09:59 Nisstyre [~nisstyre@infocalypse-net.info] has joined #scheme 16:12:35 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 16:13:48 HG` [~HG@p5DC05F48.dip.t-dialin.net] has joined #scheme 16:14:57 pumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 16:15:51 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 250 seconds] 16:22:38 sheikra_ [~sheikra@118.125.237.3] has joined #scheme 16:24:17 -!- srid [~srid@unaffiliated/srid] has quit [Quit: Textual IRC Client: http://www.textualapp.com/] 16:24:28 gravicappa [~gravicapp@ppp91-77-164-131.pppoe.mtu-net.ru] has joined #scheme 16:25:08 -!- sheikra_ [~sheikra@118.125.237.3] has quit [Client Quit] 16:25:10 -!- pumpkin is now known as copumpkin 16:25:31 sheikra_ [~sheikra@118.125.237.3] has joined #scheme 16:40:15 githogori [~githogori@216.207.36.222] has joined #scheme 16:41:18 hussaibi [~hussaibi@wirewall.cs.toronto.edu] has joined #scheme 16:41:24 hussaibi_ [~hussaibi@wirewall.cs.toronto.edu] has joined #scheme 16:45:26 -!- sheikra_ [~sheikra@118.125.237.3] has quit [Quit: Leaving] 16:51:27 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 16:51:35 -!- sheikra [~sheikra@118.125.237.3] has quit [Ping timeout: 250 seconds] 16:53:09 -!- phao [~phao@pontenova.dpi.ufv.br] has quit [Quit: Leaving] 16:58:13 Euthydemus` [~euthydemu@unaffiliated/euthydemus] has joined #scheme 16:58:16 -!- Euthydemus [~euthydemu@unaffiliated/euthydemus] has quit [Ping timeout: 260 seconds] 17:00:58 -!- nowhere_man [~pierre@AStrasbourg-551-1-1-166.w92-141.abo.wanadoo.fr] has quit [Remote host closed the connection] 17:16:00 -!- blueadept [~blueadept@unaffiliated/blueadept] has quit [Ping timeout: 276 seconds] 17:19:47 jewel [~jewel@196-215-16-133.dynamic.isadsl.co.za] has joined #scheme 17:20:56 blueadept [~blueadept@unaffiliated/blueadept] has joined #scheme 17:24:41 -!- ivartj_ [~ivartj@ti0031a380-0522.bb.online.no] has quit [Read error: Connection reset by peer] 17:24:56 ivartj [~ivartj@ti0031a380-0522.bb.online.no] has joined #scheme 17:25:11 -!- kennyd [~kennyd@93-138-27-15.adsl.net.t-com.hr] has quit [Ping timeout: 250 seconds] 17:25:51 -!- inimino [~inimino@boshi.inimino.org] has quit [Ping timeout: 255 seconds] 17:26:03 -!- arbscht [~arbscht@60-234-133-173.bitstream.orcon.net.nz] has quit [Ping timeout: 250 seconds] 17:26:03 -!- dostoyevsky [sck@oemcomputer.oerks.de] has quit [Ping timeout: 250 seconds] 17:26:03 -!- DT`` [~Feeock@net-93-149-46-58.cust.dsl.teletu.it] has quit [Ping timeout: 250 seconds] 17:26:11 -!- shachaf [~shachaf@204.109.63.130] has quit [Ping timeout: 240 seconds] 17:26:24 -!- ozzloy [~ozzloy@unaffiliated/ozzloy] has quit [Ping timeout: 276 seconds] 17:26:37 dostoyevsky [sck@oemcomputer.oerks.de] has joined #scheme 17:26:52 ozzloy [~ozzloy@unaffiliated/ozzloy] has joined #scheme 17:26:57 kennyd [~kennyd@93-138-27-15.adsl.net.t-com.hr] has joined #scheme 17:37:25 DT`` [~Feeock@net-93-149-46-58.cust.dsl.teletu.it] has joined #scheme 17:38:26 shachaf [~shachaf@204.109.63.130] has joined #scheme 17:38:29 arbscht [~arbscht@60-234-133-173.bitstream.orcon.net.nz] has joined #scheme 17:39:16 -!- kuribas [~user@94-227-91-92.access.telenet.be] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 17:46:58 leo2007 [~leo@222.130.139.86] has joined #scheme 17:50:17 inimino [~inimino@boshi.inimino.org] has joined #scheme 17:51:57 -!- hussaibi [~hussaibi@wirewall.cs.toronto.edu] has quit [Ping timeout: 255 seconds] 17:52:09 -!- hussaibi_ [~hussaibi@wirewall.cs.toronto.edu] has quit [Ping timeout: 258 seconds] 17:55:06 rstandy [~rastandy@net-2-32-114-134.cust.dsl.teletu.it] has joined #scheme 17:55:29 barryfm [~barryfm@fl-71-2-133-215.dhcp.embarqhsd.net] has joined #scheme 18:01:10 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 252 seconds] 18:02:30 dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has joined #scheme 18:12:39 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 255 seconds] 18:18:44 nego [~nego@c-76-16-30-244.hsd1.il.comcast.net] has joined #scheme 18:19:11 -!- rstandy [~rastandy@net-2-32-114-134.cust.dsl.teletu.it] has quit [Read error: Operation timed out] 18:19:45 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving] 18:26:32 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote host closed the connection] 18:27:35 -!- leo2007 [~leo@222.130.139.86] has quit [Quit: rcirc on GNU Emacs 23.3.50.1] 18:30:18 -!- DGASAU [~user@91.218.144.129] has quit [Remote host closed the connection] 18:30:38 DGASAU [~user@91.218.144.129] has joined #scheme 18:37:17 -!- homie [~levgue@xdsl-78-35-164-18.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 18:49:41 -!- elly [~elly@atheme/member/elly] has quit [Ping timeout: 250 seconds] 18:50:34 rudybot, (define f (lambda xs xs)) 18:50:34 dostoyevsky: your sandbox is ready 18:50:34 dostoyevsky: Done. 18:50:37 rudybot, (f 1 2 3) 18:50:38 dostoyevsky: ; Value: (1 2 3) 18:50:57 rudybot, (define f (lambda (xs) xs)) 18:50:57 dostoyevsky: Done. 18:51:00 rudybot, (f 1 2 3) 18:51:00 dostoyevsky: error: procedure f: expects 1 argument, given 3: 1 2 3 18:51:05 ahh... ok 18:51:18 need any help? 18:51:24 elly [~elly@atheme/member/elly] has joined #scheme 18:53:13 Can I assume that if the first parameter to lambda is not a list: pass the whole argument list instead of individual parameters? 18:53:41 weirdo: I am still learning scheme. :) 18:53:48 dostoyevsky, yes 18:53:54 dostoyevsky, but: 18:54:16 rudybot, ((lambda (x . xs) (cons x xs)) 1 2 3 4 5) 18:54:16 weirdo: ; Value: (1 2 3 4 5) 18:58:17 what is "modulo" and how it differs from "remainder"? 18:58:22 how do i implement it? 18:59:06 rudybot: eval (modulo -11 3) 18:59:06 Riastradh: your sandbox is ready 18:59:06 Riastradh: ; Value: 1 18:59:12 rudybot: eval (remainder -11 3) 18:59:12 Riastradh: ; Value: -2 19:02:13 -!- MrFahrenheit [~RageOfTho@users-146-176.vinet.ba] has quit [Ping timeout: 258 seconds] 19:04:22 rudybot: (define foo (lambda arglist arglist)) 19:04:22 tali713: your sandbox is ready 19:04:23 tali713: Done. 19:04:55 rudybot: (foo 'arg 'lists 'are 'easy) 19:04:55 tali713: ; Value: (arg lists are easy) 19:06:08 Ok, I can write now: `(define puts2 (lambda xs (array-each xs (lambda(x) (display x)))(newline)))' 19:06:24 What's the best way to define an alias? 19:06:34 an alias? 19:06:38 (define for-each array-each) ? 19:06:50 phao [~phao@pontenova.dpi.ufv.br] has joined #scheme 19:07:22 Yep.. seems to do it. :) 19:07:39 -!- nego [~nego@c-76-16-30-244.hsd1.il.comcast.net] has quit [Ping timeout: 250 seconds] 19:14:50 -!- confab [180a3cb9@gateway/web/freenode/ip.24.10.60.185] has quit [Ping timeout: 252 seconds] 19:20:07 PokeTron [~PokeTron@unaffiliated/poketron] has joined #scheme 19:20:11 -!- PokeTron [~PokeTron@unaffiliated/poketron] has left #scheme 19:20:20 hmmm... for-each takes the list as the *second* argument right? 19:20:33 My array-each takes it as the first... 19:21:44 also, for-each may take multiple lists. 19:22:04 ah... ok... then it makes sense... 19:22:09 (and returns an unspecified value, unlike map) 19:25:01 bugQ [~bug@c-67-186-254-86.hsd1.ut.comcast.net] has joined #scheme 19:26:59 Is there a syntax-shorthand like `(list 1 2 3)' for defining a hash? 19:27:32 hashes are not standard, so it depends. Racket has #hash((key . value) ...), for example. 19:28:02 neat... 19:28:59 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving] 19:30:51 Does eq? check for structural equality? Right now I think I am just comparing pointers internally.. 19:34:59 DT``` [~Feeock@net-93-149-63-34.cust.dsl.teletu.it] has joined #scheme 19:35:08 eq? is pointer equality 19:35:44 http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/Equivalence-Predicates.html#Equivalence-Predicates or your favorite reference 19:35:45 http://tinyurl.com/3gucnnq 19:35:46 Ah, maybe I understood weirdo's earlier question on eq? incorrectly.. 19:36:21 -!- DT`` [~Feeock@net-93-149-46-58.cust.dsl.teletu.it] has quit [Ping timeout: 260 seconds] 19:36:43 -!- DT``` is now known as DT`` 19:44:43 bgs100 [~ian@h184.98.187.173.dynamic.ip.windstream.net] has joined #scheme 19:44:45 -!- bgs100 [~ian@h184.98.187.173.dynamic.ip.windstream.net] has quit [Changing host] 19:44:45 bgs100 [~ian@unaffiliated/bgs100] has joined #scheme 19:46:39 confab [180a3cb9@gateway/web/freenode/ip.24.10.60.185] has joined #scheme 19:46:42 phax [~phax@adsl-68-73-148-217.dsl.ipltin.ameritech.net] has joined #scheme 19:46:42 -!- phax [~phax@adsl-68-73-148-217.dsl.ipltin.ameritech.net] has quit [Changing host] 19:46:42 phax [~phax@unaffiliated/phax] has joined #scheme 19:47:24 rudybot, (cdr (1 . 2)) 19:47:24 dostoyevsky: your sandbox is ready 19:47:24 dostoyevsky: error: eval:1:5: application: bad syntax in: (1 . 2) 19:47:50 ' 19:47:57 rudybot, (cdr '(1 . 2)) 19:47:57 dostoyevsky: ; Value: 2 19:48:13 1038:perf>(cdr (1 . 2)) 19:48:13 => (2) 19:48:18 sup, schemers? 19:48:33 hmmm... on mine it seems to work differently.. 19:53:33 -!- jdfjklajkl [~paulh@244-15-ftth.onsnetstudenten.nl] has quit [Ping timeout: 246 seconds] 19:54:14 dostoyevsky: (cdr '(1 2)) is (2). (cdr '(1 . 2)) is 2. 19:54:18 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 19:55:21 cky: oh yeah? CDR THIS 19:55:26 that might work in javascript 19:56:36 -!- jewel [~jewel@196-215-16-133.dynamic.isadsl.co.za] has quit [Ping timeout: 255 seconds] 19:56:58 (cdr (1 . 2)) should give an error... 19:57:37 rudybot, (cdr (1 . 2)) 19:57:37 bugQ: your sandbox is ready 19:57:37 bugQ: error: eval:1:5: application: bad syntax in: (1 . 2) 19:57:39 dostoyevsky, any unquoted sequence of conses must be evaluated. 19:58:15 DT``: cons as a noun is a bad idea. 19:58:18 no? 19:58:37 pairs? 19:59:07 pairs sounds good... 19:59:15 yes 19:59:16 jdfjklajkl [~paulh@244-15-ftth.onsnetstudenten.nl] has joined #scheme 19:59:19 cons makes pairs 19:59:44 i guess it's a noun there ;) 19:59:59 (define #hash (lambda xs (define h (make-hash)) (array-each xs (lambda (v) (hash-set h (car v) (cdr v))))h)) 20:00:11 english is a higher order language, i noun its verbs 20:00:12 first-class function = nominal verb 20:00:26 bugQ: indeed! 20:00:26 This works for me right now... but probably it's all wrong from a scheme perspective. :-) 20:03:13 dostoyevsky: #hash is probably implemented reader-side, in Racket. 20:03:22 dostoyevsky: So it's not a function or anything. 20:03:49 rudybot: (call-with-input-string "#hash()" read) 20:03:50 cky: your sandbox is ready 20:03:50 cky: ; Value: #hash() 20:04:03 cky: Yeah, that's probably the best way to do it... 20:04:50 rudybot: (define (string->datum str) (call-with-input-string str read)) 20:04:50 cky: Done. 20:05:09 rudybot: (string->datum "#hash((42 . "Look ma, no eval!"))") 20:05:10 cky: Trying to follow Nathan's comment here: http://nex-3.com/posts/45-efficient-window-switching-in-emacs in the process of binding the windmove-* functions to M-, I'm encountering the following problem: quoted-insert (C-q) doesn't give me results like: \M-[1;3A for M- but gives me something like: ^[[A which seems wrong since all the M- give me the same. 20:05:20 rudybot: (string->datum "#hash((42 . \"Look ma, no eval!\"))") 20:05:20 cky: As a user, you can redefine any key, but it is usually best to stick to key sequences that consist of `C-c' followed by a letter (upper or lower case). These keys are "reserved for users," so they won't conflict with any properly designed Emacs extension. The function keys through are also reserved for users. If you redefine some other key, your definition may be overridden by certain extensions or ma 20:05:24 rudybot: eval (string->datum "#hash((42 . \"Look ma, no eval!\"))") 20:05:25 cky: ; Value: #hash((42 . "Look ma, no eval!")) 20:06:59 -!- gravicappa [~gravicapp@ppp91-77-164-131.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 20:07:27 -!- barryfm [~barryfm@fl-71-2-133-215.dhcp.embarqhsd.net] has left #scheme 20:17:50 What would be a good syntax for regular expressions in a scheme-y language? 20:18:18 I am leaning towards something like: (array-grep list /foo/) 20:19:29 dostoyevsky: Chances are, you will want to use at least #/foo/. 20:19:45 Any kind of "reader extension" stuff should usually start with #. 20:22:22 hmmm... maybe (#/ regexp) 20:24:29 are there scheme languages that are built around the idea of concurrency? 20:26:13 ASau [~user@95-24-229-205.broadband.corbina.ru] has joined #scheme 20:26:57 dostoyevsky: Look into "SRE"s. There's a portable SRE library called "irregular expressions" at http://synthcode.com/scheme/irregex 20:27:18 It's the "100% solution" to doing regexen in a Lispy language :) 20:29:49 (Each time I see this nick I want to ask how many old women he murdered.) 20:33:05 hahaha 20:34:37 Is 'foo a shorthand for (quote foo) ? 20:34:43 yes. 20:34:48 -!- offby1 [~user@pdpc/supporter/monthlybyte/offby1] has quit [Remote host closed the connection] 20:35:25 -!- rudybot [~luser@ec2-204-236-167-175.us-west-1.compute.amazonaws.com] has quit [Read error: Connection reset by peer] 20:36:19 rudybot [~luser@ec2-204-236-167-175.us-west-1.compute.amazonaws.com] has joined #scheme 20:36:47 -!- soveran [~soveran@186.19.214.247] has quit [Ping timeout: 240 seconds] 20:44:12 -!- phao [~phao@pontenova.dpi.ufv.br] has quit [Quit: Leaving] 20:44:37 offby1 [~user@ec2-204-236-167-175.us-west-1.compute.amazonaws.com] has joined #scheme 20:44:44 -!- offby1 [~user@ec2-204-236-167-175.us-west-1.compute.amazonaws.com] has quit [Changing host] 20:44:44 offby1 [~user@pdpc/supporter/monthlybyte/offby1] has joined #scheme 20:47:33 flonum [~ben@24-138-98-109.zing-net.ca] has joined #scheme 20:48:03 you also use '(...) in place of (list ...), except when you can't. 20:48:15 tricksy quoteses 20:48:20 heh, lovely explanation 20:49:01 well, I used them interchangeably until I found a place it didn't work that way. 20:49:22 Hehehehehe. 20:49:30 That's when you start learning about quasiquote. :-) 20:51:26 huh. sounds more like lazyquote. 20:53:38 zmv [~daniel@c95334de.virtua.com.br] has joined #scheme 20:55:47 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 250 seconds] 20:55:59 but yeah. that would have fit the bill perfectly at the time. 21:02:50 penryu: ' also doesn't work if you want to mutate the result 21:03:54 -!- bugQ [~bug@c-67-186-254-86.hsd1.ut.comcast.net] has quit [Read error: Operation timed out] 21:05:45 -!- zmv [~daniel@c95334de.virtua.com.br] has quit [Read error: Connection reset by peer] 21:07:29 mutate as in set-mcar! ? 21:07:31 littlebobby [~bob@unaffiliated/littlebobby] has joined #scheme 21:07:48 zmv [~daniel@c95334de.virtua.com.br] has joined #scheme 21:12:19 choas [~lars@p5792C65B.dip.t-dialin.net] has joined #scheme 21:15:09 hee hee, mcar 21:17:19 what is the convention on car/cdr vs. first/rest? I'd thought it was personal preference, but I've had some hard looks from people when I use car/cdr 21:19:10 pothos_ [~pothos@111-240-165-1.dynamic.hinet.net] has joined #scheme 21:21:10 -!- pothos [~pothos@111-240-171-210.dynamic.hinet.net] has quit [Ping timeout: 260 seconds] 21:21:22 -!- pothos_ is now known as pothos 21:23:19 penryu: by all means, use car and cdr, unless you have a sequence abstraction that makes first/rest meaningful 21:23:28 but it is personal preference, as you say :) 21:24:28 ok. I got in the habit of use car/cdr from Little Schemer, but I guess.. yeah. seq abstraction might be worth the more expressive name. 21:26:17 are there any alternatives for caar/cadr/caaadr shortcuts? firstrestrestrest? :) 21:27:13 penryu: For cadr, caddr, cadddr, etc., there's second, third, fourth, etc. 21:27:37 penryu: Of course there's also list-ref if you use a variable number of traversals. 21:28:00 Both of those sets of functions apply to cdring only, of course. 21:31:04 ya. so for nested lists, (caadr x) => (first (second x)) 21:32:27 hrm. that's almost more natural. :) 21:32:48 -!- HG` [~HG@p5DC05F48.dip.t-dialin.net] has quit [Quit: Leaving.] 21:36:07 Ok, I think I just implemented '() quote syntax. :) 21:36:56 joseanpg [5aaf6c84@gateway/web/freenode/ip.90.175.108.132] has joined #scheme 21:39:41 -!- zmv [~daniel@c95334de.virtua.com.br] has quit [Ping timeout: 240 seconds] 21:41:00 -!- mmc [~michal@109.114.51.202] has quit [Quit: Leaving.] 21:43:22 -!- kennyd [~kennyd@93-138-27-15.adsl.net.t-com.hr] has quit [Ping timeout: 246 seconds] 21:44:30 -!- jrapdx [~jra@c-98-246-157-58.hsd1.or.comcast.net] has quit [Quit: Leaving] 21:46:42 I would like to create a version of lambda that doesn't eval it's arguments... 21:47:24 So I could write something like: `(#/ ^string$)' without having to quote ^string$ 21:48:27 kennyd [~kennyd@78-1-168-188.adsl.net.t-com.hr] has joined #scheme 21:53:15 -!- wingo [~wingo@90.164.198.39] has quit [Ping timeout: 246 seconds] 21:55:24 -!- githogori [~githogori@216.207.36.222] has quit [Remote host closed the connection] 21:56:43 dostoyevsky: Write a macro. 21:56:49 dostoyevsky: That's the usual way to do it. 21:57:23 Yeah... I am implementing it similar to quote in my eval loop.. That looks good enough to me... 22:01:49 framling_ [~pete@cpe-74-64-94-88.hvc.res.rr.com] has joined #scheme 22:03:56 -!- framling_ is now known as framling 22:05:42 -!- dlila [~dlila@CPE0014d1c9243c-CM001bd71cede2.cpe.net.cable.rogers.com] has quit [Quit: Leaving] 22:09:08 -!- framling [~pete@cpe-74-64-94-88.hvc.res.rr.com] has quit [Quit: leaving] 22:09:19 framling [~pete@cpe-74-64-94-88.hvc.res.rr.com] has joined #scheme 22:10:27 -!- framling [~pete@cpe-74-64-94-88.hvc.res.rr.com] has quit [Client Quit] 22:12:24 turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has joined #scheme 22:19:46 -!- pandeiro [~pandeiro@bd21cfb9.virtua.com.br] has quit [Quit: Thanks, fellas] 22:28:11 -!- choas [~lars@p5792C65B.dip.t-dialin.net] has quit [Ping timeout: 240 seconds] 22:28:53 MrFahrenheit [~RageOfTho@users-146-176.vinet.ba] has joined #scheme 22:45:21 -!- Lemonator [~kniu@pool-173-52-208-184.nycmny.fios.verizon.net] has quit [Ping timeout: 255 seconds] 22:53:09 replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 22:57:35 -!- zanes [~zane@mail.barackobama.com] has quit [] 23:00:03 Algo [~Algo@unaffiliated/algorithmiccontr] has joined #scheme 23:02:32 932:perf>(array-grep '(foo boo hoo) (#/ ^foo)) 23:02:32 => (foo) 23:02:58 Today is my lucky day... I've tried to implement many things and they just work. :) 23:03:36 -!- f8l [~f8l@87-205-51-8.adsl.inetia.pl] has quit [Quit: WeeChat 0.3.5] 23:20:25 soveran [~soveran@186.19.214.247] has joined #scheme 23:21:46 tupi [~david@189.60.162.202] has joined #scheme 23:23:05 -!- pygospa [~TheRealPy@kiel-4dbedc27.pool.mediaWays.net] has quit [Ping timeout: 260 seconds] 23:24:38 pygospa [~TheRealPy@kiel-5f7686e9.pool.mediaWays.net] has joined #scheme 23:38:52 -!- Algo [~Algo@unaffiliated/algorithmiccontr] has left #scheme 23:38:59 -!- samth is now known as samth_away 23:41:20 -!- samth_away [~samth@punge.ccs.neu.edu] has quit [Quit: Ex-Chat] 23:41:39 dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 23:50:33 zmv [~daniel@c95334de.virtua.com.br] has joined #scheme 23:54:01 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 23:56:59 -!- MrFahrenheit [~RageOfTho@users-146-176.vinet.ba] has quit [Ping timeout: 258 seconds]