00:00:12 grettke: link? 00:00:26 http://groups.google.com/group/comp.lang.scheme/browse_thread/thread/abb11379c7da6908/efd57bedee4e701b 00:00:27 -rudybot:#scheme- http://tinyurl.com/ytuwnf 00:00:38 http://groups.google.com/group/comp.lang.scheme/browse_thread/thread/941062c6b5c31630/517bc7447a354274?hl=en&lnk=gst&q=Of+the+eight+who+served+as+editors%2C+only+three#517bc7447a354274 00:00:39 BW^-: I do not think they were required to give reasons,b ut I do not know if any of them did give reasons. 00:00:40 -rudybot:#scheme- http://tinyurl.com/3vh77o 00:01:45 There are 9 people listed in R6RS, but Will's post talks about 8, hmm... 00:01:54 Yay, just finished the first version of my very first scheme program. \o/ 00:02:28 kudos Debolaz 00:03:51 http://static.andersberle.com/temp/helloworld.scm.txt 00:05:40 Debolaz: Was that an exercise? 00:05:52 No. 00:06:03 Just an idea I had. 00:06:40 flow_race [n=chatzill@200.87.196.194] has joined #scheme 00:08:18 *Debolaz* notes there are some loose ends in there, I intend to tie them together. It's just the first somewhat working version. :) 00:13:44 bye guys 00:16:10 hml [n=x@unaffiliated/hml] has joined #scheme 00:22:42 -!- grettke [n=grant@CPE-65-31-132-59.wi.res.rr.com] has quit [] 00:32:39 -!- mejja [n=user@c-7d2472d5.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 00:34:30 -!- fschwidom [n=fschwido@dslb-084-059-039-004.pools.arcor-ip.net] has quit [Remote closed the connection] 00:37:31 -!- jonrafkind [n=jon@c-67-186-250-110.hsd1.co.comcast.net] has quit ["Leaving"] 00:37:41 jonrafkind [n=jon@c-67-186-250-110.hsd1.co.comcast.net] has joined #scheme 00:38:02 mejja [n=user@213.114.36.125] has joined #scheme 00:39:48 -!- flow_race [n=chatzill@200.87.196.194] has quit ["ChatZilla 0.9.83 [Firefox 3.0.3/2008092417]"] 00:41:04 -!- aack [n=user@s559195f7.adsl.wanadoo.nl] has quit [Remote closed the connection] 00:42:43 http://scheme.pastebin.us/4726 running this code with: (paint ((new-right-split einstein mark-of-zorro) 4)) returns error: =: expects type as 1st argument; given procedure ... other arguments were: 0 and this error shows a pointer from line 2 to line 9 ... the first argument is *supposed* to be a procedure... why does it want a number? 00:43:24 *henderson pic lang* 00:43:57 = only works on numbers. 00:44:11 identity is simply: (define (identity x) x) 00:44:30 I don't really know why, but somehow you're setting n to a procedure. 00:44:37 synx, I got that much, but with respect to this code, it should *operate on procedures* , not numbers 00:45:06 what sort of procedure is n then? 00:45:10 Did you mean (= (n) 0)? 00:45:26 nope, n is a number 00:45:39 the first argument is a procedure - combine-2 00:46:07 The only time you use = is with n, so at some point n is not a number, but a procedure. 00:46:31 I'm not understanding you... n is not the problem 00:46:44 I'm sure it's line 10 00:46:48 r2q2 [n=user@c-71-228-37-14.hsd1.il.comcast.net] has joined #scheme 00:46:55 but I can't figure out line 10 is the problem 00:47:11 *r2q2* does the captian morgan stance. 00:47:35 *CaptainMorgan* raises knee... 00:48:37 compose is defined in hutils.scm as the basic composition function, (f (g x)) 00:49:39 -!- r2q2 [n=user@c-71-228-37-14.hsd1.il.comcast.net] has quit [Remote closed the connection] 00:51:04 god this code is frustrating 00:52:27 -!- araujo [n=araujo@gentoo/developer/araujo] has quit ["Leaving"] 00:52:35 What are you trying to do? 00:54:36 do you know the section in SICP 2.2.4 ? where a picture of hen is split in I think four columns.... better to find it than explain it... 00:54:38 one sec 00:55:51 I'm trying to output what you see in the top of Figure 2.14 here: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-15.html#%_sec_2.2.4 01:00:11 nevermind... I'll figure it out eventually... just after two days and a substantial headache I figured I'd ask for help... thanks anyways. 01:00:47 huh... it's a bit over my head, sorry. 01:03:28 no problem, thanks for trying :) 01:14:57 kilimanjaro [n=foo@70.116.95.163] has joined #scheme 01:17:57 r2q2 [n=user@c-71-228-37-14.hsd1.il.comcast.net] has joined #scheme 01:20:16 -!- hml [n=x@unaffiliated/hml] has quit ["leaving"] 01:20:29 -!- jonrafkind [n=jon@c-67-186-250-110.hsd1.co.comcast.net] has quit [Read error: 110 (Connection timed out)] 01:22:41 CaptainMorgan: You have to trace your error backwards through the code. What synx wanted to tell you is that, although the error popped out on line #2, you should try and find out where it originally comes from 01:23:35 The error tells you, that on line #2, n is not a number but a procedure. You then see that the "repeated" is only called from line #9, so there's already a faulty "n" in this function 01:25:02 Dark-Star|away, thanks, but I know for sure the problem is not n, the problem is either how I call it inside the interpreter or how combine-2, which is a procedure, is constructed... 01:25:09 then you check where that n comes from... it is the second (curried) argument from the call to keep-combining on line 15. But there is no second argument there, new-right-split just returns a curried function again. so the faulty argument must come from the call to new-right-split 01:25:29 jonrafkind [n=jon@wireless41.wireless.utah.edu] has joined #scheme 01:25:31 I'm getting close now... and yes, I'm in the process of manually going back through it 01:25:51 so the problem is that n is "einstein" (in your example), and not a number. you got your parens mixed up a bit. Why do you keep insisting that n is noth the problem, when the error clearly says that it is? 01:26:08 aye - thanks Dark-Star|away - how I called it :) 01:27:06 sorry, I meant not "einstein" but "mask-of-zorro", since einstein will be bound to "painter" and "mask-of-zorro" will be bound to n 01:28:06 (disclaimer: I'm currently quite tired, and haven't even tried to run your code. I could be totally wrong ;-) 01:28:33 nope, I think you're right.. I was getting close just until you spoke up- thank you for your help, tired or not :) 01:28:51 you're welcome. gotta get some sleep now :) bye 02:05:18 saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 02:20:06 -!- fnord123 [n=fnord@78-105-27-133.zone3.bethere.co.uk] has quit [] 02:42:21 that line was wrong... line 10, it's supposed to be a lambda expression - not simply combine-2 ... ugh 02:42:25 cheers 02:56:25 Dark-Star [i=Darkstar@p57B54629.dip.t-dialin.net] has joined #scheme 03:02:04 elmex_ [n=elmex@e180066046.adsl.alicedsl.de] has joined #scheme 03:10:32 johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has joined #scheme 03:15:13 -!- johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has quit [Client Quit] 03:15:41 -!- Dark-Star|away [i=Darkstar@p57B5644F.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 03:17:26 -!- elmex [n=elmex@85.180.65.205] has quit [Read error: 110 (Connection timed out)] 03:17:29 -!- elmex_ is now known as elmex 03:26:26 -!- saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit ["This computer has gone to sleep"] 03:27:00 moonfart [n=moonfart@199.2.121.90] has joined #scheme 03:51:34 johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has joined #scheme 03:51:55 -!- johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has quit [Remote closed the connection] 04:07:39 -!- mbishop [n=martin@unaffiliated/mbishop] has quit [Remote closed the connection] 04:11:16 mbishop [n=martin@c-75-65-113-237.hsd1.la.comcast.net] has joined #scheme 04:14:30 mbishop_ [n=martin@adsl-35-254-242.msy.bellsouth.net] has joined #scheme 04:22:50 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 04:27:08 *Debolaz* yawns. 04:27:19 -!- tjafk2 [n=timj@e176205163.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 04:27:44 tjafk2 [n=timj@e176200121.adsl.alicedsl.de] has joined #scheme 04:29:08 -!- npe [n=npe@66.112.249.148] has quit [] 04:29:43 sodio [n=sodio@netblock-63-66-64-29.myitdepartment.net] has joined #scheme 04:29:43 -!- sodio [n=sodio@netblock-63-66-64-29.myitdepartment.net] has quit [Remote closed the connection] 04:31:09 -!- mbishop [n=martin@unaffiliated/mbishop] has quit [Read error: 110 (Connection timed out)] 04:32:39 r2q2` [n=user@c-71-228-37-14.hsd1.il.comcast.net] has joined #scheme 04:43:17 -!- ak70 [n=ak70@195.158.90.66] has quit [Read error: 110 (Connection timed out)] 04:48:04 -!- r2q2 [n=user@c-71-228-37-14.hsd1.il.comcast.net] has quit [Read error: 110 (Connection timed out)] 04:55:52 r2q2`` [n=user@c-71-228-37-14.hsd1.il.comcast.net] has joined #scheme 04:56:01 -!- mld [n=user@cekyrij.olf.sgsnet.se] has quit [Remote closed the connection] 05:08:35 r2q2``` [n=user@c-71-228-37-14.hsd1.il.comcast.net] has joined #scheme 05:11:00 -!- r2q2``` [n=user@c-71-228-37-14.hsd1.il.comcast.net] has quit [Remote closed the connection] 05:12:23 -!- r2q2` [n=user@c-71-228-37-14.hsd1.il.comcast.net] has quit [Read error: 110 (Connection timed out)] 05:21:48 -!- wastrel [n=wastrel@nylug/member/wastrel] has quit ["i am going to bed"] 05:25:35 -!- r2q2`` [n=user@c-71-228-37-14.hsd1.il.comcast.net] has quit [Read error: 110 (Connection timed out)] 05:42:32 hadronzoo [n=hadronzo@ppp-70-247-175-181.dsl.rcsntx.swbell.net] has joined #scheme 05:47:54 -!- arcfide [n=arcfide@adsl-99-137-203-90.dsl.bltnin.sbcglobal.net] has quit ["Leaving"] 05:52:24 -!- CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has quit [Read error: 110 (Connection timed out)] 05:53:15 CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has joined #scheme 06:03:45 -!- BW^- [i=Miranda@94.191.150.87.bredband.tre.se] has quit [Read error: 110 (Connection timed out)] 06:07:35 vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 06:23:34 nanothief_ [n=kvirc@203.94.189.86] has joined #scheme 06:34:53 -!- AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has quit ["fraise"] 06:36:50 -!- nanothief [n=kvirc@203.94.189.86] has quit [Read error: 110 (Connection timed out)] 06:45:04 -!- mejja [n=user@213.114.36.125] has quit [Remote closed the connection] 06:45:48 kofub [n=kofub@c-98-234-95-238.hsd1.ca.comcast.net] has joined #scheme 06:46:43 -!- cubix [n=cubix@bas21-toronto12-1242359988.region1.highspeedunplugged.bell.ca] has quit [Read error: 110 (Connection timed out)] 06:49:04 -!- gweiqi [n=greg@69.120.126.163] has quit ["Leaving."] 07:09:02 papermachine [n=ahoman@61.152.106.169] has joined #scheme 07:13:22 Nshag [i=user@Mix-Orleans-106-2-96.w193-248.abo.wanadoo.fr] has joined #scheme 07:19:14 -!- cracki [n=cracki@sglty.kawo2.RWTH-Aachen.DE] has quit [Read error: 110 (Connection timed out)] 07:28:09 cubix [n=cubix@bas21-toronto12-1242359988.region1.highspeedunplugged.bell.ca] has joined #scheme 07:29:03 -!- kofub [n=kofub@c-98-234-95-238.hsd1.ca.comcast.net] has left #scheme 07:36:23 -!- xwl [n=user@221.221.146.148] has quit [Remote closed the connection] 07:44:55 -!- jonrafkind [n=jon@wireless41.wireless.utah.edu] has quit [Read error: 110 (Connection timed out)] 07:52:04 jgracin [n=jgracin@82.193.208.195] has joined #scheme 07:56:51 kraant [n=kraant@58.161.128.2] has joined #scheme 08:03:19 borism_ [n=boris@195-50-205-104-dsl.krw.estpak.ee] has joined #scheme 08:09:25 -!- borism [n=boris@195-50-199-214-dsl.krw.estpak.ee] has quit [Read error: 145 (Connection timed out)] 08:12:40 -!- hadronzoo [n=hadronzo@ppp-70-247-175-181.dsl.rcsntx.swbell.net] has quit [] 08:25:17 johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has joined #scheme 08:32:21 -!- vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 08:39:43 hotblack23 [n=jh@p5B057691.dip.t-dialin.net] has joined #scheme 08:42:45 ormvegr [n=art@65-100-216-32.slkc.qwest.net] has joined #scheme 08:45:55 blerg 09:07:54 -!- ormvegr [n=art@65-100-216-32.slkc.qwest.net] has quit ["Leaving"] 09:27:11 jewel [n=jewel@dsl-242-129-17.telkomadsl.co.za] has joined #scheme 09:45:21 -!- jgracin [n=jgracin@82.193.208.195] has quit [Remote closed the connection] 09:48:12 blarg 09:48:21 mornin foof 09:48:44 -!- darx [n=darx@82-37-17-145.cable.ubr03.wolv.blueyonder.co.uk] has quit [Read error: 110 (Connection timed out)] 09:52:19 hi. does PLT have some function like all() and any() from Python? 09:52:54 all returns true if all items of a list are true and any if only a single one is true. 09:53:09 Leonidas: See srfi-1 09:53:10 well, srfi-1 has every and any 09:53:14 but plt, who knows. :) 09:53:19 haha 09:54:03 PLT supports SRFI 1, nice. 09:54:06 thanks 09:54:14 plt, proudly spitting in the face of cross-platform compatibility since... 09:54:15 *Leonidas* does like PLT quite a lot 09:54:18 *elf* is being snarky, sorry. 09:54:26 :) 09:54:28 cross-implementation, not cross-platform 09:54:49 elf: sure, but the problem is with about any scheme 09:55:02 I cannot use Guile GTK anywhere else 09:55:23 I cannot use SCSHs date-stuff in PLT, etc. 09:55:27 thats cause its guile gtk. not scheme gtk 09:55:33 scsh's date stuff is from srfi-19 09:55:34 iirc. 09:55:43 so you could use it in anything that supports srfi-19 09:56:03 there is no scheme gtk since everybody trying went insane for being compatible with all implementations 09:56:25 And I mean, for getting things done PLT is really quite useful 09:56:41 And the mailinglist is friendly too (just like this channel) 09:56:43 thats because thats not possible: scheme-gtk would involve some kind of wrapper around a c lib with scheme conversions, which is ffi and language dep. 09:57:02 if there were some way to write a generalised ffi, it would be possible :0 09:57:57 elf: That's not true; one could define a highlevel library independently of the underlying FFI used 09:58:10 anyway, now I can use every and any, that's actually why I came here :) 09:58:13 one could define a highlevel interface... 09:58:29 elf: yeah, interface, not library :) 09:58:38 but how would one write a lib without knowledge of how the scheme code would interact with the lib? :) 09:58:52 ? 09:59:44 sorry, poor wording. 10:02:25 since a lib would primarily be glue code between the scheme system and the native libraries, one needs knowledge of the specific ffi in order to glue it together properly :) 10:04:05 Leonidas: the conventional plt functions are `ormap' and `andmap'. 10:07:40 besiria [n=user@ppp083212085019.dsl.uom.gr] has joined #scheme 10:11:38 puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has joined #scheme 10:13:20 eli: oh, thanks. Do they have any advantage over just using SRFI 1? 10:13:49 Leonidas: They lock you into PLT, making it harder to switch 10:13:51 Leonidas: Yes, incompatibility. 10:13:52 *sjamaan* hides 10:14:31 Leonidas pasted "String checking" at http://paste.lisp.org/display/67959 10:15:48 are you familiar with srfi-13? 10:15:51 That's what I cobbled together :) 10:17:06 elf: no, not yet. But even if I did, I wouldn't use it for this task. 10:17:27 since the fun was to implement it by oneself. 10:17:44 ah 10:17:50 Keep the fun! 10:18:29 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 10:19:09 Adamant [n=Adamant@c-98-244-152-196.hsd1.ga.comcast.net] has joined #scheme 10:20:03 string-every sounds quite similar to what I did. Hmm, let's figure out how to use that :) 10:22:42 Leonidas: yes, they will throw errors if you give them a cyclic list. The srfi-1 functions will just choke your cpu. 10:23:21 eli: good to know. 10:23:46 Leonidas: and ignore the silly white noise -- it's almost by definition that every scheme implementation will have its own names, so all of them (certainly the practical ones) will "lock you in". 10:24:35 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 10:25:36 sjamaan: and JFYI, plt did *not* invent these names to "lock you in". They were (and still are) in use by Chez -- so if there's a "lock in" scapegoat you need in regards to these names then you should point at Chez. 10:26:12 Chez doesn't exist. 10:27:03 That's exactly what I'll classify as white noise. 10:27:16 ("That" = your statement.) 10:27:25 ("your" = foof) 10:27:33 The names did exist in a few implementations before SRFI-1, as did ANY and EVERY. 10:28:11 foof: my point still stands. The names that plt uses are were not invented to create any kind of lock in. 10:28:12 So it would've caused incompatibility within PLT itself to make the switch. 10:28:54 To make what switch? 10:28:57 eli: But using them causes a lock in 10:29:11 eli: To switch to using ANY and EVERY as the default names. 10:29:52 PLT would have to provide both and deprecate ANDMAP and ORMAP. 10:30:01 foof: JFYI, there were several places where we did use srfi/1 names, some even recently, which I worked on. 10:30:28 But for some of them it is not possible to do that, since srfi-1 has some questionable properties in some cases. 10:31:18 (BTW, native PLT doesn't even have cyclic lists anymore, how can that be an issue?) 10:31:25 Schemers scheming.. :o 10:31:43 foof: BTW, you're mistaken. 10:33:07 BW^- [i=Miranda@79.138.215.61.bredband.tre.se] has joined #scheme 10:34:33 *leppie* thinks the R6RS names are better, ie for-all and exists 10:35:24 yay, more incompatibility 10:35:27 can someone give me a hand making a string->date template that eats "Thu, 02 Oct 2008 14:26:00 GMT" ? 10:35:48 or just "Thu, 02 Oct 2008 14:26:00". 10:35:53 regex 10:35:56 (string->date "~a, ~e ~b ~Y ~k:~M:~S" "Thu, 02 Oct 2008 14:26:00") 10:36:13 i thought that would work but it doesn't 10:36:37 date formats are a mess 10:36:47 hm? Why Chez doesn't exist? Last time I looked it was there. 10:36:48 m 10:37:13 BW^-: ~e is blank padded 10:37:22 if u have a fixed format, it's easy 10:37:28 I think you want ~d 10:37:52 BW^-: Same for ~k vs ~H 10:38:05 oh sorry, ignore me :p 10:38:15 sjamaan: so how should it look? 10:38:20 i don't get it work even though 10:38:37 "~a, ~d ~b ~Y ~H:~M:~S" I think 10:38:47 Are you sure the locale is good? 10:38:52 yep 10:39:03 i use the default srfi19 impl, it has english as pre-set locale. 10:39:21 even (string->date "~H:~M:~S" "14:26:00") does not work 10:39:28 Oh wait 10:39:36 You swapped the template and the string 10:39:36 neither (string->date "~H~M~S" "142600") 10:39:42 oh. 10:39:44 string->date input-string template-string -> date 10:40:09 great 10:41:11 how ~z works? 10:42:56 eli: Ah, I suppose you can still create immutable list literals with shared structure? 10:44:16 foof: not literals -- these were the problematic ones (cyclic input syntax) 10:44:33 rudybot: eval (shared ([x (cons 1 x)]) x) 10:44:34 eli: ; Value: #0=(1 . #0#) 10:44:49 how does ~z of string->date work? 10:44:58 i want to write a routine that wraps "GMT" or whatever into that 10:47:39 ah, it seems to be + or - and then 4 digits 10:47:39 (string->date "Thu, 2 Oct 2008 14:26:00 +1000" "~a, ~d ~b ~Y ~H:~M:~S ~z") 10:48:33 GMT offset? 10:49:18 in seconds, yes. 10:49:28 wow, seconds 10:49:33 that would be confusing 10:49:47 so how do we reliably convert "CET" or "MST" or "GMT" into an offset? 10:50:08 use the hour:minute syntax ? 10:50:49 hour:minute is easy to convert to seconds 10:50:53 but how do we reliably get that = 10:50:54 ? 10:51:02 does the hour:minute change as daylight savings settings change? 10:51:10 probably 10:52:12 i think that is very much system dependent 10:54:08 dates just confuse me even more than unicode 10:59:32 http://schematics.sourceforge.net/scheme-london/nmk-case-study.pdf 11:05:52 s_p [n=s_p___@77.241.163.216] has joined #scheme 11:15:53 Leonidas: BTW, I forgot another "obvious" difference -- the srfi-1 functions will accept lists of different lengths, and will stop at the shortest one; the plt functions will require them all to have the same length. 11:16:21 It's usually not something that you'd think about, since most uses are with unary predicates. 11:16:30 what timezone libraries we have? 11:17:15 -!- papermachine [n=ahoman@61.152.106.169] has quit [Remote closed the connection] 11:19:04 eli: thanks :) 11:31:35 papermachine [n=ahoman@61.152.106.169] has joined #scheme 11:32:33 fschwidom [n=fschwido@dslb-084-059-250-250.pools.arcor-ip.net] has joined #scheme 11:33:58 gigabytes [n=gigabyte@host232-239-dynamic.11-79-r.retail.telecomitalia.it] has joined #scheme 11:34:07 hello :D 11:34:46 I'll have to study scheme at university 11:34:46 so 11:35:02 you'll see me often :D 11:35:25 Great. 11:36:31 but 11:36:39 until now 11:36:46 I think it's not very difficult 11:36:54 to learn and use.. 11:37:02 That's great :) 11:38:26 I am experiencing somewhat of the same. 11:38:34 It seems easy enough to learn and abuse. 11:39:32 abuse? 11:40:12 Oh use, I mean use. 11:40:48 eheh 11:43:01 http://paste.lisp.org/display/67961 11:43:02 abuse! 11:44:52 (<= _ (<- X (ht s)) (<- F (h s)) (! s (tt s)) (e F) (x X s)) 11:44:55 maj gadd. 11:45:14 your teacher will like it if you write your homework like that 11:45:19 trust me 11:47:37 nickga [n=nick@93-97-121-81.zone5.bethere.co.uk] has joined #scheme 11:47:44 OMG 11:47:46 what is it? 11:48:04 I thought scheme was more readable that perl XD 11:48:08 than* 11:48:42 gigabytes: basically just an RPN calculator with user-definable functions and first-class functions 11:49:34 oh 11:50:05 I don't understand a single line 11:50:12 maybe it's time to start to study XD 11:50:37 gigabytes: it's intentionally ridiculous 11:50:44 I know 11:50:46 but 11:51:24 I can understand some "intentionally ridiculous" perl code 11:51:28 so 11:51:39 i want to understand that too XD 11:52:49 just trace the macro expansion 11:53:48 right 11:55:21 eli, actually, youre wrong re: srfi-1 any and every 11:56:00 to wit: it is an error to pass these procedures a circular list that does not contain an element satisfying the search criteria. 11:58:01 umis [n=umis@prudent-gloryer.volia.net] has joined #scheme 12:04:48 -!- borism_ [n=boris@195-50-205-104-dsl.krw.estpak.ee] has quit [Read error: 145 (Connection timed out)] 12:06:41 -!- umis [n=umis@prudent-gloryer.volia.net] has quit ["Leaving..."] 12:11:19 tizoc_ [n=user@r190-135-47-81.dialup.adsl.anteldata.net.uy] has joined #scheme 12:16:02 -!- gigabytes [n=gigabyte@host232-239-dynamic.11-79-r.retail.telecomitalia.it] has quit [] 12:19:02 -!- cubix [n=cubix@bas21-toronto12-1242359988.region1.highspeedunplugged.bell.ca] has quit [] 12:20:01 attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has joined #scheme 12:22:26 -!- Paraselene_ [n=Not@79-68-228-157.dynamic.dsl.as9105.com] has quit [Read error: 104 (Connection reset by peer)] 12:22:43 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 12:25:20 elf: that is exactly why I'm right -- "it is an error to pass blah" = "we're not going to check that you gave us a blah" != "an error is signalled if a non-blah value is given". 12:28:22 -!- tizoc [n=user@r190-135-43-235.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 12:30:33 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Read error: 104 (Connection reset by peer)] 12:30:39 gigabytes [n=gigabyte@host232-239-dynamic.11-79-r.retail.telecomitalia.it] has joined #scheme 12:31:32 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 12:33:07 wasabi_ [n=wasabi@ntoska151203.oska.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 12:38:19 -!- gigabytes [n=gigabyte@host232-239-dynamic.11-79-r.retail.telecomitalia.it] has quit [] 12:41:27 is there a value->function wrapper? When I need a function that always returns #t or something? 12:42:05 (define (thunk x) (lambda () x)) ? 12:44:34 johnnowak: exactly, I know that it is trivial, just wanted to know wherther there might be something like this already available. 12:44:46 not in r5rs 12:45:23 Because I often find myself implementing trivial stuff and when I find out about the proper functions I can often condense my program to 40% of the origianl version 12:49:24 That function is usually called ALWAYS, if it exists... 12:51:01 ok, my implementation doesn not have it. But good to know the name. 12:53:31 hellues_ [n=hellues@hopper.cs.bilgi.edu.tr] has joined #scheme 12:53:33 hey 12:53:57 i try to learn applicitive order evaluation and normal order evaluation 12:54:14 i ask something is anybody yhere 12:54:40 i wrote very simple programs i read sicp 12:54:44 (define (sum-of-squares x y) ( + (* x x) (* y y))) 12:55:24 i understand that in applicitive order it stars from inside. 12:55:43 i mean let say x=5 y=1 12:56:15 wait a second sorry 13:00:45 (define (square x) (* x x)) 13:00:45 (define (sum-of-squares x y) 13:00:45 (+ (square x) (square y))) 13:00:50 i wrtoe this 13:01:12 sicp says in applicitive order it evauates first operates and operans 13:02:16 i mean ( + ( square 5) (square 6)) than (+ (* 5 5) ( * 6 6)) than (+ (25) (36)) thane 61 13:02:25 in applicitive order is it true 13:02:45 but i dont understand normal order evaluation can somebody help me in this issue 13:03:36 hellues_: it can be understood on if 13:03:54 (define x 0) (define y 1) 13:03:59 ChibaPet [n=ChibaPet@c-76-127-213-207.hsd1.ma.comcast.net] has joined #scheme 13:04:18 (if (= x y) (+ x 2) (- y 5)) 13:04:46 'if' always needs first argument, so (if (= 0 1) (+ x 2) (- y 5)) 13:05:04 (if #f (+ x 2) (- y 5)) 13:05:23 (if #f .. ..) uses third argument, so 13:05:36 (- y 5) 13:05:42 (- 1 5) 13:05:44 -4 13:05:51 Hey all. Horrible newbie question... I have trouble seeing how tail recursion in any way beats iteration for clarity. Can someone fix my perception?? Thanks in advance... :) 13:06:36 hmm 13:06:38 MichaelRaskin_, 13:06:45 i ask one more question 13:06:55 ChibaPet: It depends on what you mean by iteration. If you mean loops and side effects, it can often be more clear. If you just mean iterative approaches in general, then often iterative approaches are more clear and preferable. 13:06:59 what is paste site of this channel 13:07:28 !paste 13:07:31 paste.lisp.org 13:07:32 well... the loop proc in http://docs.plt-scheme.org/more/ for example... 13:07:50 hellues_: http://paste.lisp.org/new/scheme 13:08:42 -!- elias` [n=me@unaffiliated/elias/x-342423] has quit [Remote closed the connection] 13:09:02 ChibaPet pasted "iteration clearer?" at http://paste.lisp.org/display/67962 13:09:07 ChibaPet: there's nothing preferable about that. a better idea would be to write a 'forever' macro then write (forever (accept-and-handle listener)) 13:09:57 How would one implement the forever macro? With (do)? 13:10:05 hellues pasted "order evaluation" at http://paste.lisp.org/display/67963 13:10:13 MichaelRaskin_, 13:10:28 i am newbie on drscheme and i read sicp try to learn something 13:10:50 http://paste.lisp.org/display/67963 13:11:01 (define-syntax forever (syntax-rules () ((_ p) (let loop () p (loop))))) 13:11:06 can you look at this what is that can you explain me 13:11:51 (define (p) (p)) defines a procedure that always hangs for obvious reasons. 13:12:09 ChibaPet: make sense? 13:12:26 what is the diffrrences between (define (p p) and (define (p) (p) 13:12:29 hmm 13:12:37 johnnowak: I haven't learned syntax-rules yet, but let me go toss that in an editor and look it up. :) 13:13:02 ChibaPet: if you want, you can do it without macros... (define (forever p) (p) (forever p)) 13:13:04 (define p p) defines variable p to be equal to p which is undefined which fails. 13:13:24 ChibaPet: the only problem is that you'll need to wrap the expression in a lambda.. (forever (lambda () (display "hi!"))) 13:13:32 John, but that's tail recursion again, isn't it? 13:13:41 i understand that (define (p) (p) 13:13:43 (define (p) (p)) defines procedure p in terms of some procedures (here only p itself) which can be substituted later in the same lexical environment 13:13:56 ChibaPet: sure, but you've abstracted it out. it's always going to be tail recursion at some level. 13:14:29 (define (square) (square) does it make any sense 13:14:37 johnnowak: But tail recursion is always iteration. :) I'll try to get over this. And I'll try to understand syntax-rules now. :) 13:14:57 hellues_: No, it does no sense if you want it to do anything useful 13:15:19 But here the point was to define something which will obviously hang evaluation 13:15:48 ChibaPet: tail recursion is not always directly translatable to iteration. for example, to translate mutual tail recursion, you need to manually dispatch. 13:15:51 hmm 13:15:57 so it waits procedure 13:16:05 (define (p) (p) 13:16:11 johnnowak: Well. That's a good point, yeah. Hm. 13:16:47 hellues_: You always miss last parenthesis.. 13:16:57 sorry 13:17:41 i actuallt understand thae in applicitive order if i give x to 5 or to 0 it joins the loop 13:17:42 ChibaPet: Generally speaking, you should try to express recursion using a combinator that abstracts away your process and gives it a name so you know what you're dealing with. 13:18:11 ok 13:18:14 In applicative order it evaluates both arguments to test, but one of them is broken 13:18:18 but in normal order if i give x to 5 joins the loop or give 0 to x returns to 0 13:18:42 how is broken 13:18:46 p is broken 13:18:51 ChibaPet: for example, (define (sum xs) (if (null? xs) 0 (+ (car xs) (sum (cdr xs))))) is better written as (define (sum xs) (fold + 0 xs)) 13:19:08 p is not broken, but (p) cannot be evaluated 13:19:15 hmm 13:19:39 i am sorry i am newbie why (p) cannot be evaluate because of () 13:20:04 johnnowak: Okay, that makes sense. 13:20:54 in applicitive order inside the () cannot be evaluated right MichaelRaskin_ 13:21:00 hellues_: p is an OK procedure. But trying to call it leads to hanging, as it never finishes 13:21:01 is that true 13:21:15 hmm 13:21:24 in applicitive order 13:21:37 i understand you but still a point 13:21:40 In applicative order you mustn't ignore any of the arguments, even if you don't need it. 13:22:05 Nothing will help you evaluate (p) if you actually need it 13:22:15 Normal order just lets you ignore it. 13:22:18 (test 0 (p)) returns 0 but (test 5(p)) joins the loop 13:22:39 normal order ignores the procedures ? 13:22:47 No 13:22:51 hmm 13:23:07 zero is not procedures ? 13:23:12 zero is not procedure ? 13:23:27 In the first case, (test 0 (p)) checks "0 = 0" and doesn't need to know the values of the second argument 13:23:39 -!- papermachine [n=ahoman@61.152.106.169] has quit [Remote closed the connection] 13:23:48 hellues_: perhaps you should learn a little scheme before trying to use it to understand such things 13:23:48 hmm yeah 13:23:52 In the second case, 0<>5, so the second argument is needed 13:23:54 johnnowak: heh, my idea of how "let" works is evidently broken. You've generated lots of reading for me. :) Good stuff. 13:24:11 MichaelRaskin_, i understand thaat 13:24:16 thank you 13:25:24 okey i wonn a say if x=0 returns zero it doesnt need to procedures (p) 13:25:29 okey 13:26:43 in applicitive order first evaluation starts in parantehesis and (p) cannot be evaluated 13:26:46 this is true 13:31:51 johnnowak: What *is* your use of let there? (let loop () p (loop)) isn't making sense to me unless I think of it as being a function definition with strange syntax... I'm not familiar with let used in that context. 13:32:34 ah, sorry. that's called a "named let". it is equivalent to (letrec ((loop (lambda () p (loop))))) 13:32:38 (loop) 13:33:09 in other words, it defines a function named loop with no arguments (hence the empty list) with the body 'p (loop)' and then calls it 13:33:25 ah, okay, that makes more sense. :) thank you once again 13:33:39 it's a convenient, if sort of strange, special form. :) 13:36:36 cubix [n=cubix@bas21-toronto12-1242359988.region1.highspeedunplugged.bell.ca] has joined #scheme 13:41:36 Alright, thanks, and have a good morning. :) 13:41:41 -!- ChibaPet [n=ChibaPet@c-76-127-213-207.hsd1.ma.comcast.net] has quit [] 13:41:52 -!- forcer [n=forcer@f054125053.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 13:42:32 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 13:52:22 -!- Archville [n=Archvill@59.Red-83-50-142.dynamicIP.rima-tde.net] has quit ["El corazón palpita, el alma late"] 13:52:41 ak70 [n=ak70@195.158.89.221] has joined #scheme 13:58:35 I was told apply is an expensive operation. What it does seem rather simple, could someone explain to me why or point me in the right direction? 13:59:56 -!- kraant [n=kraant@58.161.128.2] has quit ["Leaving"] 14:00:03 Debolaz: I don't think it is particularly expensive 14:00:09 It's expensive relative to a normal procedure call with a fixed number of arguments. 14:00:55 you need to traverse the list to get the arguments, the size of the list will likely not be known ahead of time, etc 14:01:30 In general, it takes a variable number of arguments, conses them all up into a single list (like LIST*), then puts each value on the stack, and calls the procedure. 14:01:57 The consing is going to be the really expensive thing there. 14:02:01 I'm using it to implement an object system. The call goes like (object 'message arg1 arg2), where I get the (list arg1 arg2) which I apply to the function. 14:07:24 -!- cubix [n=cubix@bas21-toronto12-1242359988.region1.highspeedunplugged.bell.ca] has quit [] 14:11:49 npe [n=npe@66.112.249.148] has joined #scheme 14:14:45 ohayou npe 14:14:59 foof: ohayou 14:15:32 have you read "your userspace sucks"? 14:15:43 nope 14:17:03 foof: you'll get a f 14:17:07 ew laughs out of it. 14:21:06 You mean "why userspace sucks?" 14:23:10 yeah, that's it. 14:32:58 hey can i ask something i study in sicp 14:33:42 hellues pasted "order evaluation" at http://paste.lisp.org/display/67974 14:34:05 http://paste.lisp.org/display/67974 i write this from sicp 14:34:39 but there is a point i dont understand in pretty big joins the loop in lazy scheme gives the result what is the reason of that 14:38:27 anybody there? 14:40:44 replor [n=replor@ntkngw375028.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 14:41:21 hellues_: "in pretty big joins"? 14:41:31 i mean 14:41:40 i choose pretty and mrEd 14:41:52 and i run it after than program joins the loop 14:42:00 but when i choose lazy scheme 14:42:08 function gives the result 14:42:10 "joins the loop"? 14:42:25 i mean 14:42:38 i had to do user break 14:42:44 when i run function 14:43:22 dont you understand 14:43:25 ? 14:43:47 i push to stop button 14:43:53 metasyntax [n=taylor@pool-71-188-161-219.aubnin.fios.verizon.net] has joined #scheme 14:44:03 hellues_: it is because `new-if' will evaluate all its arguments including the else-clause. ALways. Therefore you get the infinite loop. In lazy Scheme this is not so and it will work. 14:44:43 hmm 14:45:11 i try to learn something about applicitive order and normal order 14:45:17 can i say that 14:45:31 in applicitive order function evaluates whole 14:45:49 but in normal order evaluates function starts to end 14:47:02 hellues_: did you read the wikipedia article? 14:50:53 -!- besiria [n=user@ppp083212085019.dsl.uom.gr] has quit [Remote closed the connection] 14:58:43 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 15:03:17 gweiqi [n=greg@69.120.126.163] has joined #scheme 15:04:16 pchrist [n=spirit@gentoo/developer/pchrist] has joined #scheme 15:06:37 johnnowak, no 15:06:40 cracki [n=cracki@sglty.kawo2.RWTH-Aachen.DE] has joined #scheme 15:15:29 annodomini [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 15:18:32 -!- bsmntbombdood [n=gavin@97-118-128-184.hlrn.qwest.net] has quit [Read error: 110 (Connection timed out)] 15:18:48 bsmntbombdood [n=gavin@97-118-128-184.hlrn.qwest.net] has joined #scheme 15:37:03 -!- johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has quit [] 15:43:29 -!- ak70 [n=ak70@195.158.89.221] has left #scheme 15:45:00 sonderma` [n=user@148-202-dsl.kielnet.net] has joined #scheme 15:48:11 hey 15:54:52 yitz_ [n=yitz@dsl-207-112-45-180.tor.primus.ca] has joined #scheme 15:55:12 -!- sondermann [n=user@173-217-dsl.kielnet.net] has quit [Read error: 110 (Connection timed out)] 15:55:15 -!- yitz_ [n=yitz@dsl-207-112-45-180.tor.primus.ca] has left #scheme 15:58:43 altxwally [n=inverted@189.161.165.58] has joined #scheme 16:00:58 hello, could someone tell me what this scheme code does? 16:00:58 ( d e f i n e (+ a b) 16:00:58 ( i f (= a 0) b 16:00:58 (+ (1 a ) (1+ b ) ) ) ) 16:03:24 with all the spaces? 16:03:30 it subtracts 1 from and adds 1 to b till a is zero, hence the result of adding 2 numbers 16:04:21 hence the returned b is the result of adding 2 numbers 16:04:46 ohhh ok, thanks leppie 16:04:47 ecraven [n=nex@plc31-103.linzag.net] has joined #scheme 16:06:40 -!- rdd [n=user@c83-250-142-219.bredband.comhem.se] has quit [Read error: 104 (Connection reset by peer)] 16:06:52 rdd [n=rdd@c83-250-142-219.bredband.comhem.se] has joined #scheme 16:12:27 -!- nanothief_ [n=kvirc@203.94.189.86] has quit ["KVIrc 3.4.0 Virgo http://www.kvirc.net/"] 16:18:48 jgracin [n=jgracin@82.193.208.195] has joined #scheme 16:21:23 rtra [n=rtra@unaffiliated/rtra] has joined #scheme 16:23:50 -!- altxwally [n=inverted@189.161.165.58] has left #scheme 16:25:42 forcer [n=forcer@e177140031.adsl.alicedsl.de] has joined #scheme 16:33:04 synthase [n=synthase@68.63.20.12] has joined #scheme 16:37:52 -!- s_p [n=s_p___@77.241.163.216] has quit [Remote closed the connection] 16:38:10 -!- synthasee [n=synthase@68.63.20.12] has quit [Read error: 113 (No route to host)] 16:39:29 how we do timezone handling? 16:50:12 synthasee [n=synthase@68.63.20.12] has joined #scheme 16:50:30 vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 16:52:11 -!- CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has quit ["Leaving"] 16:55:05 AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has joined #scheme 16:57:37 -!- synthase [n=synthase@68.63.20.12] has quit [Read error: 110 (Connection timed out)] 16:57:59 -!- attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has quit [Read error: 113 (No route to host)] 17:00:26 -!- AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has quit [Remote closed the connection] 17:00:37 AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has joined #scheme 17:03:16 riastradh: around? 17:03:26 how does PLT and MIT solve this? 17:11:51 hellues pasted "function" at http://paste.lisp.org/display/67980 17:11:59 hey 17:12:04 i need some help 17:12:14 http://paste.lisp.org/display/67980 here 17:12:38 > (h 4) 17:12:39 65536 17:12:55 i dont understand that can someone explain me ? 17:13:55 isn't that the ackermann function? 17:15:17 yes 17:15:24 that is ackerman from sicp 17:16:30 looks a bit different from the version in wikipedia but I gess thats ok. so what exactly don't you understand? 17:16:44 why it evaluates to 65536? 17:17:28 example 17:17:39 BW^-, MIT Scheme does not support many calendrical or chronological calculations; primarily it supports encoding and decoding different time formats. Time zones are represented as rational offsets in hours from UTC. 17:17:49 i dont understand function whole 17:18:06 (A -x 1) (A x(- y 1)) 17:18:11 what does that mean 17:18:24 Not much, because `-x' is invalid lexical syntax in Scheme. 17:18:34 - x 17:18:46 sorry Riastradh 17:19:04 whoa, let me guess, you just started with scheme, right? 17:19:06 (else (A (- x 1) 17:19:06 (A x (- y 1)))))) 17:19:20 In that case, you're passing A a different number of arguments at different times: in one, you pass the subtraction procedure, the value of X, and the integer 1; in the other case, you pass the value of x, and one less than the value of y. 17:19:24 i started scheme ues 17:19:31 Aha! Now that's different, hellues_. 17:19:37 yes 17:19:44 Riastradh, sorry confusing 17:20:08 it seems x reduce 1 (A (- x 1)) 17:20:10 Whenever you quote code, you must quote it exactly. There may be no shenanigans with loose quotation, like some English typesetters like to put punctuation within `quotations,' unlike everyone else in the world who write quotations like `this'. 17:20:24 (A x (- y 1)))))) this seems recursive call 17:20:38 you are right REPLeffect 17:20:39 Above all, you cannot mix up the nesting structure of balanced delimiters. 17:20:44 sorry Riastradh 17:21:07 advice: start with simpler examples first, and get ued to the syntax of scheme first 17:21:30 i know scheme syntax just i wrote wrong :D 17:21:40 (f x y) in general is a (lambda) application, something like calling a function in more traditional languages. i.e. it roughly translates to f(x,y) in java, for example 17:21:43 riastradh: ok thanks. 17:21:57 riastradh: i wanna parse MST -> -0700 . .) 17:22:12 (define (f n) (A 0 n)) x equal zero it return value of n 17:22:42 hellues_, so, what is the context of your question? It will not be particularly illuminating 17:22:52 ...just to explain piece by piece what every bit of that definition means. 17:23:34 BW^-, I don't know what `. .)' is supposed to mean, but MIT Scheme's parser knows about the MST zone. 17:23:37 hellues pasted "function" at http://paste.lisp.org/display/67981 17:24:10 i dont understand exactly the evaluation of this function 17:24:34 (A 2 4) why it is 655536 17:25:19 x =2 y=4 we make x 1 than 0 17:25:23 riastradh: aha how? 17:25:27 what is exact operation on y 17:25:28 Gosh, do you get 655536 from evaluating that? 17:25:35 If so, maybe your Scheme implementation is broken. 17:25:36 yes 17:25:39 -!- sjamaan [n=sjamaan@80.101.127.174] has quit [Remote closed the connection] 17:25:42 muhahhaha 17:25:53 sjamaan [n=sjamaan@frohike.xs4all.nl] has joined #scheme 17:25:56 If not, please at least give the simulacrum of making an effort to communicate more clearly. 17:25:57 (A 3 3) this is 65536 to 17:26:03 tip: take a piece of paper and do the substitutions that scheme does if you enter (A 2 4) by yourself. i.e. (A 2 4) wil get translated to (A (- 2 1) (A 2 (- 4 1))) by the else-path... and so on 17:26:06 riastradh: what function you use for that? 17:26:36 if you do this repeatedly you end up with one term which only includes constants and no applications of A, and then you can calculate the result 17:26:37 hey guys, i want to parse "Thu, 02 Oct 2008 14:26:00 GMT" and "Thu, 02 Oct 2008 14:26:00 MST" to a srfi19 date. 17:26:39 hellues_: well, start from beginning... like Dark-Star said. 17:26:51 now, are timezone UTC offsets date dependant? 17:27:33 i do this thing 17:27:42 but i cannot understand the operation 17:27:45 oh, and to understand the function you could start with smaller numbers. what is (A 0 0)? what is (A 1 0) and why? what are (A 0 1), (A 1 1), etc... 17:27:47 hellues_, you can't just insert a `5' and expect a sensible result. 17:28:12 (A 0 0) is 0 17:28:30 bcause it says (= y 0) 0 17:28:49 I'd like to request that folks not encourage people who appear to have no intent to apply effort on their own part, particularly in the most intellectually stimulating pursuit of the use of the keyboard. 17:29:12 http://en.wikipedia.org/wiki/Ackermann_function <-- this might also help you understanding what's going on 17:30:05 BW^-: if you mean they might be different for different dates i think the answer is yes... think saving time, iirc it's no uniform globally. but ultimately the best thing is to ask system functions about that. 17:30:44 metasynt1x [n=taylor@pool-71-188-161-219.aubnin.fios.verizon.net] has joined #scheme 17:30:56 sladegen: such as? 17:31:04 paganini123 [n=chatzill@adsl-153-100-26.mia.bellsouth.net] has joined #scheme 17:31:58 BW^-: well saving time goes into effect on different dates in europe and usa, no? 17:32:30 -!- luz [n=davids@201.19.0.53] has quit ["Client exiting"] 17:33:11 BW^-, the mnemonic abbreviations in RFC 822 for time zones are not date-dependent. EST, for instance, refers to Eastern Standard Time, or UTC-5. The daylight time zone in the region for EST is known as EDT, or UTC-4. 17:33:30 Similarly, there are CST and CDT, MST and MDT, &c. 17:33:56 Riastradh: Thanks! 17:34:01 BW^-, so, what is the context of your inquiry? 17:34:19 Riastradh: I need to parse atom/rss dates 17:34:44 Riastradh: is "Thu, 02 Oct 2008 14:26:00 GMT" exactly an RFC 822 date? 17:35:07 I don't know; why don't you check RFC 822? 17:36:19 MIT Scheme's RFC (2)822 parser accepts it, at least. 17:36:34 schme [n=marcus@c83-249-230-179.bredband.comhem.se] has joined #scheme 17:37:28 riastradh: where's its source? 17:38:08 BW^-, the RFC (2)822 parser? It's in the same datime.scm file that I showed you the other day. 17:39:01 Paraselene_ [n=Not@79-68-228-157.dynamic.dsl.as9105.com] has joined #scheme 17:39:39 peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 17:41:12 -!- metasyntax [n=taylor@pool-71-188-161-219.aubnin.fios.verizon.net] has quit [Read error: 110 (Connection timed out)] 17:41:20 riastradh: right, RFC 822 says only 8 different timezone offsets are allowed. 17:41:20 jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has joined #scheme 17:42:58 hellues pasted "function" at http://paste.lisp.org/display/67983 17:43:13 this is not possible pls look aqt the result 17:43:20 bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has joined #scheme 17:43:43 hellues_, when you can form complete English sentences and complete English words, perhaps heed will be paid to you. 17:44:22 can you look the address my english is not good as yours. 17:44:26 i am sorry for that 17:44:48 but i dont understand how to work function 17:45:01 there is a number 10 lines 17:45:18 will you help me or not 17:45:28 what is not possible? the function you have there grows very fast 17:46:30 i actually dont understand this growing fast 17:46:41 Please check the wikipedia page of the Ackermann function (should be http://tr.wikipedia.org/wiki/Ackermann_i%C5%9Flevi for you) 17:46:42 x=2 than x=1 than x=0 17:46:53 when x=0 (*y 2) 17:47:24 yes but the second number changes too! you're not just decrementing x, you're also incrementing y 17:47:47 y is changed to (A x (- y 1)) which is, again, a large number 17:48:21 okey ley say y=10 x=2 17:48:34 x becomes 1 y becomes 9 17:48:39 right 17:48:44 no, wrong 17:48:51 x becomes 1, all right 17:49:09 but y becomes (A 2 9) which has to be calculated recursively 17:49:36 so you need to find (A 2 9) to calculate (A 2 10). 17:50:03 2 10 2 9 2 8 2 7....... 17:50:12 1 10 1 9 18 1 7... 17:50:20 0 * y 2 17:50:23 ? 17:50:43 well, almost. let|s start with something simpler. How about (A 2 2) 17:50:52 okey 17:51:08 x=2 y=2 17:51:32 yes. and (A 2 2) will result in (A (- 2 1) (A 2 (- 2 1)) which recurses and calls A with x=1 and y=(A 2 1) 17:51:36 in first calculation you said (a 2) A 2 1) 17:52:02 sorry 17:52:24 after first recursive x equals 1 y equals to 1 17:52:26 ? 17:53:08 -!- schme_ [n=marcus@c83-249-230-179.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 17:53:13 there is nothing in wikipedia 17:53:29 no, you're forgetting that this is a double application of A, i.e. in each recursive step you get two A's more, and you have to apply the calculation again from the inside 17:55:32 so (A 2 2) becomes (A 1 (A 2 1)) which then becomes (A 1 2) [because y is 1 now] and then it becomes (A 0 (A 1 1)) which then becomes (* 2 (A 1 1)) [because x is 0] which then becomes (* 2 2) which becomes 4 if I didn't miss a step somwhere 17:55:42 *Dark-Star* feels like a scheme interpreter now 17:56:40 you should really do it step by step, on a paper. each recursion is only a simple substitution of one term with another, more complicated term 18:00:15 i study on paper half an hour Dark-Star 18:00:35 1 = 1 2=4 3=16 4=65536 18:01:00 (expt 16 4) = 655536 18:01:06 (expt 16 4) = 65536 18:03:52 yes, shows that your function is almost, but not quite entirely unlike expt ;-) 18:10:15 it's better! 18:17:08 -!- puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has quit ["Konversation terminated!"] 18:17:59 gigabytes [n=gigabyte@host159-58-dynamic.8-87-r.retail.telecomitalia.it] has joined #scheme 18:18:44 peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 18:24:47 -!- peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Connection timed out] 18:25:09 -!- OceanSpray [n=karl@LEMON.RES.CMU.EDU] has quit [Read error: 110 (Connection timed out)] 18:25:22 OceanSpray [n=karl@CMU-301252.WV.CC.CMU.EDU] has joined #scheme 18:29:30 Dark-Star, 18:29:36 i ask one more question 18:29:58 let say x=1 2 x=2 4 x=3 16 x=4 65534 18:30:13 (expt 16 4) = 655336 18:30:25 (expt 2 2) =4 18:30:34 but (expt 4 3) 64 18:31:05 attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has joined #scheme 18:32:49 GreyLensma1 [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 18:39:48 puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has joined #scheme 18:40:13 -!- gigabytes [n=gigabyte@host159-58-dynamic.8-87-r.retail.telecomitalia.it] has quit [] 18:40:38 -!- hellues_ [n=hellues@hopper.cs.bilgi.edu.tr] has quit [Read error: 113 (No route to host)] 18:43:49 -!- bpt [i=bpt@cpe-071-070-209-067.nc.res.rr.com] has quit [Read error: 110 (Connection timed out)] 18:51:48 peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 18:53:38 bpt [i=bpt@cpe-071-070-209-067.nc.res.rr.com] has joined #scheme 18:59:41 -!- peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Read error: 110 (Connection timed out)] 19:03:46 mejja [n=user@c-7d2472d5.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 19:09:26 lalala (define (rfc822/asctime->date s) .. 19:11:14 4*4*4 is 64 19:13:00 1+1 is 2 19:13:45 BW^-: Atom doesn't use RFC 822 timestamps. 19:15:44 right, it uses rfc 3339. 19:18:18 peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 19:23:45 -!- vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 19:24:50 vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 19:27:05 -!- vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has quit [Client Quit] 19:28:44 ..or ISO 8601, one should say 19:30:34 gigabytes [n=gigabyte@host240-175-dynamic.60-82-r.retail.telecomitalia.it] has joined #scheme 19:31:14 -!- gigabytes [n=gigabyte@host240-175-dynamic.60-82-r.retail.telecomitalia.it] has quit [Client Quit] 19:33:32 -!- peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Connection timed out] 19:52:45 vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 19:52:58 -!- vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has quit [Success] 19:53:24 vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 19:58:33 gigabytes [n=gigabyte@87.2.239.244] has joined #scheme 20:21:44 -!- Nshag [i=user@Mix-Orleans-106-2-96.w193-248.abo.wanadoo.fr] has quit [Read error: 110 (Connection timed out)] 20:24:30 Daemmerung [n=goetter@1133sae.mazama.net] has joined #scheme 20:25:07 elias` [n=me@unaffiliated/elias/x-342423] has joined #scheme 20:32:58 -!- GreyLensma1 [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has left #scheme 20:33:23 peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 20:38:56 -!- tizoc_ is now known as tizoc 20:40:06 -!- kilimanjaro [n=foo@70.116.95.163] has quit [] 20:40:14 -!- peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Read error: 110 (Connection timed out)] 20:47:54 borism [n=boris@195-50-200-14-dsl.krw.estpak.ee] has joined #scheme 20:59:55 peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 21:00:32 -!- vasa [n=vasa@mm-8-93-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 21:04:01 -!- puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has quit [Remote closed the connection] 21:04:29 drdo [n=psykon@167.111.54.77.rev.vodafone.pt] has joined #scheme 21:07:46 jdijk [i=jdijk@ftth-212-84-159-210.solcon.nl] has joined #scheme 21:07:54 -!- jdijk [i=jdijk@ftth-212-84-159-210.solcon.nl] has quit [Client Quit] 21:11:13 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Read error: 104 (Connection reset by peer)] 21:12:39 -!- peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [] 21:15:12 -!- peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Connection timed out] 21:15:41 -!- rtra [n=rtra@unaffiliated/rtra] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 21:18:30 cubix [n=cubix@bas21-toronto12-1242359988.region1.highspeedunplugged.bell.ca] has joined #scheme 21:18:47 hellues [n=hellues@hopper.cs.bilgi.edu.tr] has joined #scheme 21:18:51 !paste 21:19:02 lisppaste: url 21:19:02 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 21:21:13 http://paste.lisp.org/display/67999 21:21:21 i wrote cube root function 21:21:46 but i dont understand 21:21:56 *Explain* the formula used for the iterative step for cube root. 21:22:00 what does that mean 21:22:57 pls help me 21:22:59 :XD 21:23:01 explain why the iterative function works, i guess? 21:23:23 hmm 21:23:39 why the iterative function works 21:23:46 what do you mean ? 21:24:22 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 21:26:14 must i explain this formula as iterative process i dont understand 21:26:41 and one more question design recipe meanr is program iterative or recursive ? 21:29:37 synthase [n=synthase@68.63.20.12] has joined #scheme 21:31:15 you should ask your teacher those questions :) they depend on what s/he wants 21:31:47 hahaha 21:32:05 sorry i am just wish to learn 21:39:38 -!- synthasee [n=synthase@68.63.20.12] has quit [Connection timed out] 21:42:51 -!- attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has quit ["..."] 21:46:29 we all are just wish to learn... all of us 21:56:12 *gnomon* is not wish to learn 21:56:23 *gnomon* is just to wish to bang the drum on all days long 21:57:28 How do you bang on a drum with paper bags and tentacles? 21:58:41 Like this! 21:58:54 *gnomon* bangs on the nearest drum with paper bags and tentacles 21:58:59 See? Easy-peasy. 21:59:07 borism_ [n=boris@195-50-197-39-dsl.krw.estpak.ee] has joined #scheme 21:59:25 offby1 [n=erich@q-static-138-125.avvanta.com] has joined #scheme 21:59:46 I'm guessing it's a bad idea to compile PLT with -j3 22:00:03 why? 22:00:05 Why's that? 22:00:13 Blast, beaten to the punch. 22:00:15 wh yman why! 22:00:18 'cuz I just tried it and saw a bunch of errors skitter past 22:00:19 This round to you, kazzmir_. 22:00:35 What kind of errors? 22:00:39 you _would_ ask. 22:00:42 ...and don't say "compilation errors". 22:00:46 Well, yes. I'm annoying that way. 22:00:52 I dunno; I just saw stars and started over without -j3 22:00:55 (and many others too, of course) 22:01:09 oh, and the end result announced itself as v4.1.0.4, whereas it otta be 4.1.1 22:01:41 Ornery *and* dishonest - a bad mix indeed. 22:02:19 -!- fschwidom [n=fschwido@dslb-084-059-250-250.pools.arcor-ip.net] has quit [Remote closed the connection] 22:02:41 fschwidom [n=fschwido@dslb-084-059-250-250.pools.arcor-ip.net] has joined #scheme 22:03:45 it might have been honest, but confused. 22:05:18 chaoslynx [n=cpehle@mnhm-590fb5d5.pool.einsundeins.de] has joined #scheme 22:05:24 -!- jgracin [n=jgracin@82.193.208.195] has quit [Remote closed the connection] 22:05:33 offby1, well if you can figure out what went wrong im sure it would be useful to the devs 22:05:54 -!- borism [n=boris@195-50-200-14-dsl.krw.estpak.ee] has quit [Connection timed out] 22:09:18 -!- xerox [n=xerox@unaffiliated/xerox] has quit [] 22:10:38 -!- bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has quit [Remote closed the connection] 22:10:55 bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has joined #scheme 22:12:04 -!- nickga [n=nick@93-97-121-81.zone5.bethere.co.uk] has quit ["Leaving"] 22:12:50 hellues: isn't that just newton approximation? i.e. you approximate the function by using a polynom function. It is known that this approximation gets closer and closer to your desired value (i.e. the cube root) 22:14:36 yeah i unbderstand 22:14:43 i wrote this code myself 22:14:57 but i didnt understand what design recipe mean 22:15:10 design recipe mean is it recursive or iterative 22:15:31 and it says explain used formula for iterative steps and for cuberoot 22:15:38 i dont understand that 22:17:49 the design (as you wrote it) is tail-recursive, which is like a hybrid between recursive and iterative. And the formula you used is the newton formula, you can explain this in every detail you want (i.e. add the proof for the formula, for the banach fixpoint theorem, etc. You can easily fill a few pages with that explanation ;-) 22:17:52 -!- hotblack23 [n=jh@p5B057691.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 22:20:12 -!- mejja [n=user@c-7d2472d5.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 22:24:51 -!- synx [i=pandora@gateway/gpg-tor/key-0xA71B0C6A] has quit [Remote closed the connection] 22:27:04 -!- gigabytes [n=gigabyte@87.2.239.244] has quit [] 22:28:08 synx [i=pandora@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 22:33:38 schme_ [n=marcus@c83-249-230-179.bredband.comhem.se] has joined #scheme 22:36:17 hm 22:36:31 is there any common denominator as regards from where people on this channel are, geographically? 22:36:44 -!- jewel [n=jewel@dsl-242-129-17.telkomadsl.co.za] has quit [Read error: 113 (No route to host)] 22:36:47 or, tendency, i should say 22:36:48 Earth. 22:36:53 Riastradh: beat me to it 22:37:18 weren't hyperbolic functions fundamental enough to warrant inclusion in rnrs, or at least a srfi? 22:37:26 i know, i know, i can define them, but still... 22:38:45 *klutometis* laments the ignomy of trigonometry's unsung cousins 22:38:53 You can define them even without entering the complex domain. 22:39:29 -!- hellues [n=hellues@hopper.cs.bilgi.edu.tr] has quit [Read error: 113 (No route to host)] 22:40:33 Riastradh: you're right; but a fast version would be nice, and I hate dipping in FFI 22:41:35 Is your program running unacceptably slowly because (/ (+ (exp x) (exp (- x))) 2) does not run in acceptably close to the time a `native' version takes, whatever that native version is exactly? 22:42:23 Riastradh: I'll do some benchmarking before I revert to premature optimization. 22:43:00 resort* 22:43:51 I don't think that the x87 even has instructions for the hyperbolic functions. 22:43:57 (while it does for the trigonometric ones) 22:44:11 -!- ecraven [n=nex@plc31-103.linzag.net] has quit ["bbl"] 22:44:39 Riastradh: damn, you beat me to "Earth", too, by about 8 minutes. 22:44:45 One slows down as one gets older. 22:44:53 offby1: light-speed lag from the Sun 22:46:01 -!- schme [n=marcus@c83-249-230-179.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 22:46:26 "revert to premature optimization" - hee. 22:46:40 (...and for the real exponential function, although its range is limited.) 22:47:32 CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has joined #scheme 22:48:42 -!- chaoslynx [n=cpehle@mnhm-590fb5d5.pool.einsundeins.de] has quit [Read error: 110 (Connection timed out)] 22:54:01 chrisdone [n=user@unaffiliated/chrisdone] has joined #scheme 23:02:15 -!- OceanSpray [n=karl@CMU-301252.WV.CC.CMU.EDU] has quit [Read error: 110 (Connection timed out)] 23:05:34 -!- elmex [n=elmex@e180066046.adsl.alicedsl.de] has quit [Remote closed the connection] 23:05:55 ttmrichter [n=ttmricht@219.140.250.230] has joined #scheme 23:06:01 ttmrichter_ [n=ttmricht@219.140.250.230] has joined #scheme 23:06:32 mmh 23:06:39 -!- ttmrichter_ [n=ttmricht@219.140.250.230] has quit [Read error: 104 (Connection reset by peer)] 23:06:42 handling of semistructured data. 23:06:42 Adamant [n=Adamant@c-98-244-152-196.hsd1.ga.comcast.net] has joined #scheme 23:09:17 johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has joined #scheme 23:11:40 BW^-, Ear... crap. 23:13:14 gnomon: ? 23:13:31 ah hehe right. 23:13:32 where ya? 23:16:55 raikov [n=igr@203.181.243.11] has joined #scheme 23:17:06 Hey, when you (require amodule), it seems to let you use stuff in amodule, without adding amodule: in front of it. 23:18:45 BW^-, if you really want that kind of information, you could parse the logs, extract hostnames and IP addresses, and submit them en masse to a geoip service. 23:18:58 yep know 23:19:04 -!- johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has quit [] 23:19:14 As for myself, I hail from the wild northern wastelands of Canuckistania. 23:19:17 i thought you were joking that you were on the moon, another galaxy, etc. 23:19:56 I leave that hypothesizing to others. 23:20:26 Is there a way to get that amodule: prefix, or do you just have to type it into every declaration in the module? 23:20:39 er, definition sorry. Old C habits. 23:26:39 Ohh, no my bad. (provide) will remove the amodule: prefix, by letting you declare exports. 23:29:18 -!- sad0ur [n=sad0ur@psi.cz] has quit [Read error: 110 (Connection timed out)] 23:31:27 -!- wasabi_ [n=wasabi@ntoska151203.oska.nt.ftth.ppp.infoweb.ne.jp] has quit ["Leaving..."] 23:35:26 gnomon: was it you who recommended Famous Grouse? 23:36:47 I don't believe that I recommended it, no. My brother occasionally mixes it with ginger ale to go along with epic Scrabble battles, but that's about the extent of my exposure to it. Why do you ask? 23:37:23 gaah 23:37:27 *offby1* pauses to retch 23:37:48 gnomon: well, some IRC denizen from an exotic far-away country (like Canada) did ... 23:38:05 prolly was arcus, back when I was always confusing him with you 23:39:01 Possibly. Certainly wasn't me. I'm not a fan of it. 23:40:09 But it's interesting to note that you know what it is. 23:42:07 I know what it is because I bought it by accident one time. I was supposed to pick up some Wild Turkey and got confused. 23:42:52 (for the record, the only bourbons that I actually enjoy are Maker's Mark and Woodford Reserve; I would particularl recommend the latter when paired with a Mill Street Brewery coffee porter) 23:45:50 never had a bourbon I liked, ever. 23:46:55 hellues [n=hellues@hopper.cs.bilgi.edu.tr] has joined #scheme 23:47:00 lisppaste, url 23:47:01 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 23:47:36 -!- hiyuh [n=hiyuh@KD125054017176.ppp-bb.dion.ne.jp] has quit ["|_ e /\ \/ i |/| G"] 23:47:57 hellues pasted "recursive or iterative" at http://paste.lisp.org/display/68006 23:48:03 hey 23:48:12 pls look at url 23:48:31 it s about recursive or iterate as you will see 23:48:59 what about it 23:49:01 (inc (+ (dec a) b)))) 23:49:11 is that ackermans function? 23:49:15 i think this line must be recursive 23:49:18 no ackerman 23:49:33 what does it compute? 23:49:39 -!- vorpal [n=rhunter@pdpc/supporter/student/vorpal] has quit ["The incensed priests...continued to raise their voices, vituperating each other in bad Latin"] 23:49:55 7 23:50:19 for any value of a and b it will compute 7? 23:50:44 yes i guess 23:51:41 uh no.. did you even try those functions? 23:51:54 inc dec function ? 23:52:03 look, try this expression (+++ 4 5) 23:52:08 what do you get 23:52:09 is 9 23:52:14 oh, so is that 7? 23:52:43 3 4 equals 7 4 5 equals 9 23:53:02 reduce a then inc b until a=0 23:53:08 mejja [n=user@c-7d2472d5.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 23:53:08 so when I asked if "for any value of a and b it will compute 7" and you said "yea" you had no idea what I was talking about did you 23:53:11 sad0ur [n=sad0ur@psi.cz] has joined #scheme 23:54:08 sorry 23:54:15 times is 3 a.m 23:54:26 i am infron of computer from 1 p.m 23:54:30 14 hours 23:54:38 i am confusing sometime :) 23:54:38 what is your native language 23:54:58 Turkish 23:55:28 anyway, so what is your question 23:55:35 my question is 23:55:56 which is recursive or iteerativve i am newbie in programming environment 23:56:10 how can i understand recursive or iterative 23:56:20 recursive means a function calling itself 23:56:29 yes 23:56:34 (inc (+ (dec a) b)))) 23:56:37 iterative means looping over a set of values 23:56:58 that line is from the ++ function, it is not calling itself 23:57:03 its calling two other functions 23:57:08 hmm 23:57:17 inc and dec 23:57:21 if it was (define (++ a b) (++ a b)) or some such, it would be recursive 23:58:02 i understand 23:58:21 this is iterative because calls function to another function right 23:58:56 mm, usually you use recursive and iterative to refer to something that loops, neither ++ nor +++ loop in any way 23:59:13 you are just calling two other functions 23:59:43 so you aren't actually reducing a to 0 23:59:57 if you wanted to do that, then use (inc (++ (dec a) b))