00:02:34 -!- grettke [n=grettke@CPE-69-23-38-57.wi.res.rr.com] has quit ["The computer fell asleep"] 00:06:14 What the... 00:06:57 arcfide: is that in reference to my message? 00:07:18 ice_man`: What implementation are you using? 00:07:33 rudybot: doc datum->syntax 00:07:34 arcfide: your sandbox is ready 00:07:34 arcfide: http://docs.plt-scheme.org/reference/stxops.html#(def._((quote._~23~25kernel)._datum-~3esyntax)) 00:07:41 PLT Scheme version 4.15 00:08:49 ice_man`: For this, it may help to read a little more about what constitutes a valid syntax object. 00:09:28 arcfide: will do, thanks for the pointer...I should have thought of that 00:10:07 ice_man`: But I'm not sure how DATUM->SYNTAX works on PLT Scheme, looking at the docs that rudybot gave me, I don't see how (DATUM->SYNTAX STX 'STOP-SERVER STX) even works. 00:10:50 ice_man`: What are you trying to do? 00:11:02 -!- aack [n=user@a83-161-214-179.adsl.xs4all.nl] has quit [Remote closed the connection] 00:12:03 rudybot: (syntax stop-server) 00:12:04 *offby1: eh? Try "rudybot: help". 00:12:05 arcfide: I am trying to write a macro that binds an identifier to a lambda at the top-level. 00:12:06 rudybot: eval (syntax stop-server) 00:12:07 *offby1: your sandbox is ready 00:12:07 *offby1: ; Value: # 00:12:29 rudybot: eval (datum->syntax 'stop-server) 00:12:29 *offby1: error: datum->syntax: expects 2 to 5 arguments, given 1: stop-server 00:12:54 ice_man`: So, you're trying to write a macro START-SERVER, that expands to a definition for STOP-SERVER? 00:13:03 yes... 00:14:29 The value of having such a macro aside, what is wrong with (DEFINE-SYNTAX START-SERVER (SYNTAX-RULES () [(_) (DEFINE STOP-SERVER (LAMBDA () ...))]))? 00:15:06 That was the first thing I tried, it doesn't work because the macros are hygienic 00:17:27 ice_man`: Oh, I see what you mean, you're not...yeah, sorry. What I should have said was... 00:18:39 arcfide: no worries, I appreciate the input in any case 00:19:57 (define-syntax start-server (lambda (x) (syntax-case x () [(k) #`(define #,(datum->syntax #'k 'stop-server) (lambda () 'stopped))]))). 00:20:47 ice_man`: That works for me. 00:21:37 just tried it, it works but it doesn't actually stop the server 00:22:17 ice_man`: Well...that doesn't do anything about a server, so I wouldn't expect it to. 00:22:35 You need to define the function such that it sends the right things to stop the server. 00:22:55 On the other hand, I'm not sure why you want a macro for ths, anyways. I would have just defined two procedures to do it for me. 00:23:40 arcfide: crap...my bad... 00:24:53 arcfide: I am more curious than anything, I hope to expand my understanding of syntax-case and datum->syntax 00:26:15 -!- mmc [n=mima@cs168106.pp.htv.fi] has quit ["Leaving."] 00:27:33 A few things that are fun to define are DEFINE-INTEGRABLE, DEFINE-CONSTANT, and you own LOOP that provides a BREAK procedure. 00:29:10 arcfide: Thanks, I will have a look at those...the dybvig book has some interesting examples as well, and I am working through those 00:29:32 Good. 00:31:37 That's for a particular definition of "fun". 00:32:30 eli: They were fun when I did them. ;-) 00:33:12 -!- outchanter [n=hrun@c-98-207-114-26.hsd1.ca.comcast.net] has quit [Read error: 110 (Connection timed out)] 00:35:18 -!- ikaros [n=ikaros@f051048231.adsl.alicedsl.de] has quit ["Leave the magic to Houdini"] 00:35:18 eli: You're telling me that you don't get a kick out of writing such things. ;-) 00:35:54 arcfide: No. `define-integrable' and `define-constant' are things that should be left for the compiler to deal with. 00:36:12 eli: Still, they are good practice. 00:36:29 (So is learning to program in assembley language.) 00:36:35 eli: Which is also pretty fun. 00:36:46 ... for a particular definition of "fun". 00:36:49 :-D 00:37:16 And with `loop' defining `break' unhygienically -- that's the kind of bad hygiene breaking that is solved elegantly with syntax parameters. 00:37:30 I remember that I had to change the curriculum on my teacher when he tried to teach assembly because he was teaching on a DOS machine, and I was working on a UNIX box, and the calling conventions were different. 00:37:56 eli: Well, yeah, I wouldn't do such a thing in real life, but if he wants practice using DATUM->SYNTAX. 00:38:35 IOW, I no longer see any point in breaking hygiene in this bad way. `datum->syntax' is still useful, of course, but that's unrelated. 00:47:03 eli: If you look here http://docs.plt-scheme.org/more/index.html , the way to start the server is: (define stop (serve 8080)) 00:47:41 eli: I simply wanted a more convenient way of starting the server, and thought this was a good opportunity to learn about syntax case 00:53:59 -!- ice_man` [n=user@CPE000d6074b550-CM001a66704e52.cpe.net.cable.rogers.com] has left #scheme 01:15:38 -!- kniu [n=kniu@pool-71-107-56-85.lsanca.dsl-w.verizon.net] has quit [Read error: 60 (Operation timed out)] 01:18:50 offby1, What about Cleveland? 01:24:13 -!- blackened` [n=blackene@ip-89-102-208-138.karneval.cz] has quit [] 01:28:19 kniu [n=kniu@pool-71-107-56-85.lsanca.dsl-w.verizon.net] has joined #scheme 01:43:43 -!- dnm_ [n=dnm@250.sub-75-222-67.myvzw.com] has quit [Read error: 60 (Operation timed out)] 01:47:09 echo-area [n=user@nat/yahoo/x-3fdf065e9fae976c] has joined #scheme 01:47:41 xwl_ [n=user@147.243.236.60] has joined #scheme 01:52:31 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 01:54:30 -!- annodomini [n=lambda@wikipedia/lambda] has quit [Client Quit] 02:10:11 dnm_ [n=dnm@250.sub-75-222-67.myvzw.com] has joined #scheme 02:15:52 -!- JohnnyL [i=crashcar@ool-182f0b98.dyn.optonline.net] has left #scheme 02:23:02 -!- araujo [n=araujo@gentoo/developer/araujo] has quit [Read error: 104 (Connection reset by peer)] 02:25:11 araujo [n=moz@gentoo/developer/araujo] has joined #scheme 02:25:11 -!- araujo [n=moz@gentoo/developer/araujo] has quit [Read error: 54 (Connection reset by peer)] 02:36:15 -!- eno__ [n=eno@adsl-70-137-175-96.dsl.snfc21.sbcglobal.net] has quit [Read error: 104 (Connection reset by peer)] 02:41:18 eno [n=eno@nslu2-linux/eno] has joined #scheme 02:42:50 -!- dnm_ [n=dnm@250.sub-75-222-67.myvzw.com] has quit [Client Quit] 02:43:56 -!- dudleyf [n=dudleyf@ip70-178-212-238.ks.ks.cox.net] has quit [] 02:44:08 Adamant [n=Adamant@c-76-29-188-22.hsd1.ga.comcast.net] has joined #scheme 02:44:09 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 02:44:26 -!- araujo [n=araujo@gentoo/developer/araujo] has quit [Read error: 104 (Connection reset by peer)] 02:46:11 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 02:46:35 -!- araujo [n=araujo@gentoo/developer/araujo] has quit [Read error: 54 (Connection reset by peer)] 02:48:15 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 02:49:01 -!- araujo [n=araujo@gentoo/developer/araujo] has quit [Read error: 54 (Connection reset by peer)] 02:49:52 incubot: Bach's motet [a choral musical composition] "O Jesu Christ, meins lebens licht" was one of the last pieces of music written for the Lituus. 02:49:54 Is there a connection between choral activities and Scheme? 02:56:39 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 03:08:28 copumpkin [n=pumpkin@Aeropuerto.Kiewit.Dartmouth.EDU] has joined #scheme 03:12:07 -!- athos [n=philipp@92.250.250.68] has quit ["leaving"] 03:17:11 dnm_ [n=dnm@78.sub-75-193-97.myvzw.com] has joined #scheme 03:17:32 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 04:00:46 dsmith: I was probably saying "Cleveland, Ho" ... http://www.dailymotion.com/video/x7lg0f_pete-townshend-eddie-vedder-sherato_music 04:01:23 -rudybot:#scheme- http://tinyurl.com/nrwsoe 04:02:36 http://tinyurl.com/nsfw 04:11:18 -!- mejja [n=user@c-87bae555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 04:50:30 -!- arcfide [n=arcfide@adsl-99-137-202-73.dsl.bltnin.sbcglobal.net] has quit ["Leaving"] 05:02:54 hadronzoo1 [n=hadronzo@ppp-70-251-121-9.dsl.rcsntx.swbell.net] has joined #scheme 05:11:53 Korollary [n=peon@c-76-121-49-32.hsd1.wa.comcast.net] has joined #scheme 05:13:12 Hi. When I reload a module in mzscheme using enter!, a definition that I deleted still persists. Is there a way to unload? 05:22:41 -!- dnm_ [n=dnm@78.sub-75-193-97.myvzw.com] has quit [Read error: 60 (Operation timed out)] 05:24:35 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has left #scheme 05:25:02 dnm_ [n=dnm@14.sub-75-197-61.myvzw.com] has joined #scheme 05:25:04 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 05:26:52 saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 05:35:14 kilimanjaro [n=kilimanj@70.116.95.163] has joined #scheme 05:38:12 -!- cel [n=cel@193.Red-79-148-50.dynamicIP.rima-tde.net] has quit [Read error: 110 (Connection timed out)] 05:50:47 -!- meanburrito920_ [n=John@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit ["has been attacked by a grue"] 05:57:02 amca [n=amca@CPE-121-208-82-97.qld.bigpond.net.au] has joined #scheme 05:57:04 -!- dnm_ [n=dnm@14.sub-75-197-61.myvzw.com] has quit [Client Quit] 05:58:15 I think you need to "touch" the file, or else "enter!" won't really reload it 05:58:54 I did touch the file. I removed the definition. It reloaded it. 06:01:03 cel [n=cel@193.Red-79-148-50.dynamicIP.rima-tde.net] has joined #scheme 06:01:06 hi 06:01:10 the docs say: "When a module is declared using a name for which a module is already declared, the new declarations definitions replace and extend the old declarations. If a variable in the old declaration has no counterpart in the new declaration, the old variable continues to exist, but its binding is not included in the lexical information for the module body." 06:03:31 So if I refer to the deleted function within the module, I get an error. But the function is still available in the repl. 06:06:59 Korollary: ask eli, when he's around; I think he designed that feature 06:07:12 ok 06:13:41 Tankado [n=Woodruff@bzq-79-176-13-35.red.bezeqint.net] has joined #scheme 06:18:52 outchanter [n=hrun@c-98-207-114-26.hsd1.ca.comcast.net] has joined #scheme 06:26:34 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 06:28:20 Lemonator [n=kniu@pool-71-107-56-85.lsanca.dsl-w.verizon.net] has joined #scheme 06:28:29 -!- kniu [n=kniu@pool-71-107-56-85.lsanca.dsl-w.verizon.net] has quit [Read error: 110 (Connection timed out)] 06:30:23 -!- Tankado [n=Woodruff@bzq-79-176-13-35.red.bezeqint.net] has quit [] 06:33:17 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has left #scheme 06:33:45 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 06:42:19 ejs1 [n=eugen@242-29-178-94.pool.ukrtel.net] has joined #scheme 07:05:10 hotblack23 [n=jh@p5B0576A6.dip.t-dialin.net] has joined #scheme 07:12:08 Axioplase [n=Pied@p1066-ipbf610aobadori.miyagi.ocn.ne.jp] has joined #scheme 07:12:31 -!- 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"] 07:17:10 -!- xwl_ [n=user@147.243.236.60] has quit [Remote closed the connection] 07:20:28 exexex [n=chatzill@85.97.124.209] has joined #scheme 07:26:24 nan8 [n=user@dslb-088-064-153-144.pools.arcor-ip.net] has joined #scheme 07:37:05 Jarvellis [n=jarv@dsl-217-155-101-22.zen.co.uk] has joined #scheme 07:54:14 -!- ejs1 [n=eugen@242-29-178-94.pool.ukrtel.net] has quit ["This computer has gone to sleep"] 08:03:25 mmmm 08:03:37 any good way to avoid this repetition of code? 08:03:54 (define (product P) 08:03:54 (* (char->number (string-ref digits (- P 0))) 08:03:54 (char->number (string-ref digits (- P 1))) 08:03:54 (char->number (string-ref digits (- P 2))) 08:03:54 (char->number (string-ref digits (- P 3))) 08:03:55 (char->number (string-ref digits (- P 4))))) 08:04:30 i can't seem to find a better way 08:10:16 xwl_ [n=user@147.243.236.60] has joined #scheme 08:16:38 cel: first step maybe would be: (apply * (map char->number (list ...))) 08:17:04 the problem is consing the list 08:17:19 i thought about doing something like... 08:18:03 (apply * (map char->number (string->list (substring digits P (- P 4)))) 08:18:26 but consing a list in each multiplication gets everything slower 08:18:37 (product gets called many times) 08:21:27 well if speed is your concern at that point, maybe just keep the ugly version? 08:21:43 yep, that will have to do for now 08:24:58 (I use gauche - and in gauche you can treat a string as a sequence and you can just do: (map char->integer (substring ..)) 08:25:34 npe [i=npe@d54C451B4.access.telenet.be] has joined #scheme 08:25:49 i use mzscheme, maybe it has something like that 08:25:52 i'll take a look 08:26:15 (more precisely in that case: you can treat a string as a collection) 08:26:49 > (map char->integer "doh") 08:26:49 map: expects type as 2nd argument, given: "doh"; 08:26:53 no luck :) 08:27:10 maybe you have to use some module before it works? 08:27:18 (thats how it is done in gauche) 08:27:22 ah 08:27:52 *cel* digs the documentation a bit 08:28:06 gosh> (map char->integer "jhjh") 08:28:06 *** ERROR: list required, but got "jhjh" 08:28:06 Stack Trace: 08:28:06 _______________________________________ 08:28:09 gosh> (use gauche.collection) 08:28:12 # 08:28:15 gosh> (map char->integer "jhjh") 08:28:18 (106 104 106 104) 08:35:15 -!- outchanter [n=hrun@c-98-207-114-26.hsd1.ca.comcast.net] has left #scheme 08:37:31 (define (product P) 08:37:52 (loop ((for index (up-from 0 (to 5))) 08:38:11 (for running-product (multiplying (char->number (string-ref digits (- P index)))))) 08:38:22 => running-product)) 08:38:46 -!- ejs [n=eugen@242-29-178-94.pool.ukrtel.net] has quit [Read error: 110 (Connection timed out)] 08:40:03 i suppose one could use `in-string' instead, but the low-exclusive, high-inclusive nature of tha above code would make that awkward, i think 08:40:39 cel : that's using , btw 08:42:12 ski: gauche version is nicer - isn't it? 08:42:38 ski: (not to offend you 08:46:09 cel wanted to avoid allocating intermediary structures. i believe the foof-loop version accomplishes that 08:46:39 (maybe the gauche version manages to deforest away the intermediaries, i don't know) 08:48:55 ikaros [n=ikaros@f051048231.adsl.alicedsl.de] has joined #scheme 08:52:11 ski: i don't know either 08:54:54 sorry, wasn't here 08:54:57 thanks a lot :) 08:55:20 i'll try the foof loop version 08:55:28 cel: if you're concerned about speed, then your version is fine. 08:55:47 ski: but (apply * (map char->integer (string->list "kkkk"))) is much faster than (apply * (map char->integer "kkkk")) 08:56:32 and to avoid the repetition, you can define a local function: (define (product P) (define (foo n) (char->number (string-ref digits (- P n)))) (* (foo 0) (foo 1) (foo 2) (foo 3) (foo 4))) 08:57:54 mmmm, true 08:58:32 the function... will be redefined each time i call product, right? 08:58:45 i mean, maybe it would be better to define it as global to avoid that 08:59:22 ski: i guess this is caused by the one being a call to generic map - wheras the other calles the builtin map for lists - but thats just a guess 09:00:03 or maybe it's just stupid because it still has to lookup the current lexical environment before the global one 09:00:47 i think i'll try all the alternatives and then decide 09:00:54 thanks a lot for the help guys :) 09:01:17 cel: Trust the compiler. 09:01:47 cel: If you don't, then here's a good exercise: don't trust it -- make functions global, play any trick you can think of. 09:01:57 Then compare the speed you get with the simple version. 09:02:06 cel: in general: first make sure that you really have a performance problem, ... 09:03:54 i have, but i'm not really sure that's the bottleneck, just guessing 09:04:31 anyway i like tinkering with all posible methods, wether the outcome is good or bad 09:04:36 for the fun of it 09:04:56 well thats a completely different thing then ;-) 09:05:34 sometimes i can spend hours optimizing a stupid thing from 1 second to 0.8 09:05:49 but i know is stupid, i just like it, it's a nice hobby 09:10:29 cel: yes its fun (did the same some weeks ago - tried to speed up hypotf using SIMD assembler instructions (sse3) - but in the end it was slower) 09:10:47 cel: Here's the quick version of what you were talkint about 09:10:50 sounds familiar :) 09:11:16 Moving a function to be global is a very well known technique -- it's usually called lifting. 09:11:25 i were adapting the Marc Feeley compiler for Scheme (written in Scheme itself as a benchmark for Larceny and Gambit) to SBCL 09:11:35 in the end it was also slower 09:11:45 Now, the thing is that it's common enough that people who implement schemes will make the implementation do it when it makes things run faster, 09:12:16 so the decision of when to do it is done by code written by the implementor 09:12:19 so... that's what that "lambda lifting" thing was? 09:12:36 mmm nice to know 09:12:36 and the implementor will undoubtedly know much more than you about the tradeoffs. 09:12:43 cel: Yes. 09:13:02 rudybot: eval (define (foo x) (lambda (y) (+ y 3))) 09:13:10 rudybot: eval (eq? (foo 1) (foo 2)) 09:13:10 eli: ; Value: #t 09:13:46 The two functions that were returned are the same one -- so the compiler essentially lifted the internal function to be global. 09:14:00 interesting 09:14:20 and also interesting the way you can know about it or how it affects the semantics 09:15:17 > (define (foo x) (lambda (y) (+ y 3))) 09:15:17 > (eq? (foo 1) (foo 2)) 09:15:17 #f 09:15:20 Petite Chez 09:15:31 Well, the fact that you can tell that it does that using `eq?' is part of the hackish nature of `eq?'. 09:15:57 it's like... some slow implementations 09:16:03 that let you do things like 09:16:08 No, Chez is not slow. 09:16:13 (let ((x if)) (x (< 2 3) ...) 09:16:50 But implementors have many reasons to do things in a particular way. For example, if you don't put plt scheme code in a module, then you lose on many optimizations. 09:16:57 chez is fast, really fast sometimes 09:17:07 and really slow others 09:17:19 it's kind of strange 09:17:31 is gauche considered slow compared to those 2? 09:17:44 i had one of those small programs of project euler 09:17:48 (i never tested it) 09:17:55 done in three different methods 09:18:08 in chez, two of them run in 5 seconds each 09:18:13 and the last one in about 11 09:18:29 in plt the first one is about 5 seconds 09:18:33 the second one 3.5 09:18:40 and the latest one 1.3 seconds 09:19:10 when i was using mzscheme 352 the times for the first two 09:19:22 were almost the same in both petite and mzscheme 09:19:36 but the last one was still 11s in petite, 4 in mzscheme 09:19:51 (to be honest - i did not care because i always thought: if there is something to slow i will implement it in C and call it from gauche/scheme) 09:20:00 still i tried that exact algorithm in other schemes 09:20:02 probably just the difference between compiled and interpreted code 09:20:11 and in all of them it was faster than the other two methods 09:20:24 except petite, for some strange reason 09:20:58 leppie maybe 09:21:21 i did try it on other interpreters/compilers because i knew it had to be faster 09:21:21 it's probably sabotage to illicit purchases of comercial version... 09:21:34 the other two algorithms were naive brute force 09:21:46 the last one was supossed to be the clever one 09:22:12 but it had a procedure with 5 arguments 09:22:33 that had a lot of calls, maybe that was it and petite just doesn't like many args 09:44:43 Judofyr [n=Judofyr@ti0056a380-0643.bb.online.no] has joined #scheme 09:59:53 dzhus [n=sphinx@95-24-125-207.broadband.corbina.ru] has joined #scheme 10:05:47 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 10:27:56 Nshag [i=user@Mix-Orleans-106-1-215.w193-248.abo.wanadoo.fr] has joined #scheme 10:31:41 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has left #scheme 10:32:11 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 10:37:33 -!- amca [n=amca@CPE-121-208-82-97.qld.bigpond.net.au] has quit ["Farewell"] 10:39:35 athos [n=philipp@92.250.250.68] has joined #scheme 10:43:42 -!- echo-area [n=user@nat/yahoo/x-3fdf065e9fae976c] has left #scheme 10:45:07 -!- ikaros [n=ikaros@f051048231.adsl.alicedsl.de] has quit [Remote closed the connection] 10:47:08 wingo [n=wingo@ATuileries-152-1-16-81.w82-123.abo.wanadoo.fr] has joined #scheme 10:48:08 LunohoD_ [n=alex@e180076103.adsl.alicedsl.de] has joined #scheme 10:49:28 -!- LunohoD [n=alex@e180077116.adsl.alicedsl.de] has quit [Read error: 60 (Operation timed out)] 10:49:29 -!- LunohoD_ is now known as LunohoD 10:50:42 JKGpp [n=juergen@dslb-088-067-190-038.pools.arcor-ip.net] has joined #scheme 11:11:56 -!- dzhus [n=sphinx@95-24-125-207.broadband.corbina.ru] has quit [Remote closed the connection] 11:12:23 dzhus [n=sphinx@95-24-125-207.broadband.corbina.ru] has joined #scheme 11:13:04 Edico [n=Edico@unaffiliated/edico] has joined #scheme 11:13:13 elias` [n=me@resnet-pat-254.ucs.ed.ac.uk] has joined #scheme 11:15:08 elmex_ [i=elmex@ist.m8geil.de] has joined #scheme 11:15:20 -!- npe [i=npe@d54C451B4.access.telenet.be] has quit [Read error: 60 (Operation timed out)] 11:22:07 -!- elmex [i=elmex@ist.m8geil.de] has quit [Read error: 111 (Connection refused)] 11:22:08 -!- elmex_ is now known as elmex 11:26:55 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit ["+++ killed by SIGSEGV +++"] 11:38:54 -!- athos [n=philipp@92.250.250.68] has quit ["leaving"] 11:40:35 a-s [n=user@92.85.204.10] has joined #scheme 11:54:09 -!- tttsssttt [n=pussycat@topol.nat.praha12.net] has quit [Read error: 104 (Connection reset by peer)] 11:54:24 tttsssttt [n=pussycat@topol.nat.praha12.net] has joined #scheme 12:00:30 nvteighen [n=nvteighe@76.Red-81-37-204.dynamicIP.rima-tde.net] has joined #scheme 12:07:17 -!- nvteighen [n=nvteighe@76.Red-81-37-204.dynamicIP.rima-tde.net] has left #scheme 12:08:33 npe [n=npe@195.207.5.2] has joined #scheme 12:16:31 jao [n=jao@194.Red-88-15-114.dynamicIP.rima-tde.net] has joined #scheme 12:21:22 -!- Axioplase [n=Pied@p1066-ipbf610aobadori.miyagi.ocn.ne.jp] has quit ["quit"] 12:30:51 -!- exexex [n=chatzill@85.97.124.209] has quit [Remote closed the connection] 13:03:54 -!- kilimanjaro [n=kilimanj@70.116.95.163] has quit [Remote closed the connection] 13:11:39 -!- elias` [n=me@unaffiliated/elias/x-342423] has quit [Read error: 145 (Connection timed out)] 13:13:00 reprore [n=reprore@ntkngw261071.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 13:14:01 -!- jao [n=jao@194.Red-88-15-114.dynamicIP.rima-tde.net] has quit [Read error: 110 (Connection timed out)] 13:21:59 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has left #scheme 13:22:30 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 13:30:54 jao [n=jao@95.Red-83-36-223.dynamicIP.rima-tde.net] has joined #scheme 13:42:33 -!- jao [n=jao@95.Red-83-36-223.dynamicIP.rima-tde.net] has quit [Read error: 104 (Connection reset by peer)] 13:50:43 jao [n=jao@95.Red-83-36-223.dynamicIP.rima-tde.net] has joined #scheme 13:57:28 -!- pchrist [n=spirit@gentoo/developer/pchrist] has quit ["leaving"] 13:58:15 pchrist [n=spirit@gentoo/developer/pchrist] has joined #scheme 14:12:46 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has left #scheme 14:13:18 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 14:22:57 puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has joined #scheme 14:24:51 -!- wingo [n=wingo@ATuileries-152-1-16-81.w82-123.abo.wanadoo.fr] has quit [Read error: 113 (No route to host)] 14:31:48 -!- reprore [n=reprore@ntkngw261071.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Read error: 54 (Connection reset by peer)] 14:32:29 reprore [n=reprore@ntkngw261071.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 14:35:23 npe_ [n=npe@195.207.5.2] has joined #scheme 14:37:12 -!- reprore [n=reprore@ntkngw261071.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Read error: 104 (Connection reset by peer)] 14:39:55 gyx_ [i=gyx@123.112.73.169] has joined #scheme 14:42:14 -!- gyx_ [i=gyx@123.112.73.169] has quit [Client Quit] 14:43:12 -!- puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has quit [Remote closed the connection] 14:46:02 puchacz [n=puchacz@87.194.5.99] has joined #scheme 14:51:12 -!- npe [n=npe@195.207.5.2] has quit [No route to host] 14:53:00 -!- puchacz [n=puchacz@87.194.5.99] has quit [Remote closed the connection] 14:54:21 puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has joined #scheme 14:57:58 -!- puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has quit [Client Quit] 15:00:25 korvin [n=korvin@host-200-145-66-217.spbmts.ru] has joined #scheme 15:00:33 re all 15:01:17 vaasu [n=vaasu@67.23.25.178] has joined #scheme 15:05:44 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 15:05:51 -!- vaasu [n=vaasu@67.23.25.178] has left #scheme 15:06:41 rjack [n=rjack@adsl-ull-119-129.51-151.net24.it] has joined #scheme 15:08:12 sepult [n=sepult@xdsl-87-78-27-181.netcologne.de] has joined #scheme 15:10:12 blackened` [n=blackene@89.102.208.138] has joined #scheme 15:10:52 when I'm trying to load silex extension, Im getting this error: http://openpaste.org/14568/ . how can I fix it? (chicken 4.0) 15:12:32 gladiator [n=gladiato@203.81.197.196] has joined #scheme 15:13:10 Adamant [n=Adamant@c-76-29-188-22.hsd1.ga.comcast.net] has joined #scheme 15:14:36 -!- nan8 [n=user@dslb-088-064-153-144.pools.arcor-ip.net] has left #scheme 15:17:43 xwl [n=user@114.246.69.255] has joined #scheme 15:25:57 -!- jao [n=jao@95.Red-83-36-223.dynamicIP.rima-tde.net] has quit [Read error: 104 (Connection reset by peer)] 15:35:20 -!- xwl [n=user@114.246.69.255] has quit [Remote closed the connection] 15:38:46 npe [n=npe@195.207.5.2] has joined #scheme 15:39:03 -!- npe_ [n=npe@195.207.5.2] has quit [Read error: 104 (Connection reset by peer)] 15:46:58 hi... i started working on scheme today .. and i need some help .. could someone point out what i am foing wrong here? 15:46:58 (define (summation n1 n2) 15:46:59 (define x n1) 15:46:59 (+ (if (<= x n2) x 0) (summation (+ 1 x) n2)) 15:49:07 gladiator: a call to summation will always result in another call to summation, leading to an infinite loopping 15:49:46 hkBst: yes .. i am getting a heap overflow .. but i cant seem to set up a termination condition 15:50:51 gladiator: first I would recommend getting rid of x 15:51:41 you probably need to decrement one, increment another and return on 0... 15:51:46 gladiator: your termination condition should probably be when the second argument is zero? 15:52:16 hkBst: no .. i am trying to write a function to give a sum from n1 to n2 15:52:27 return as in return the other one not invoke summation. 15:52:30 1 + 2 + 3+ 4 .. if n1 = 1 and n2 = 4 15:52:35 *sladegen* feels spoily. 15:52:59 gladiator: ah I see, so terminate on (= n1 n2) 15:53:58 hkBst: yes .. thats why i put in the if condition .. and the 0 .. 15:54:30 gladiator: ok, but you should realize that the if will return the 0 to the + and will not exit your function. 15:54:47 and you want a grand sum of 1 + 2 + 3 ... at the end? 15:55:45 sladegen: yes. hkBst: how do it terminate then? 15:56:09 gladiator: move the if outside the + 15:56:32 -!- rjack [n=rjack@adsl-ull-119-129.51-151.net24.it] has quit ["leaving"] 15:56:43 ok heres another go .. (define (summation n1 n2) 15:56:43 (+ (if (< n1 n2) (summation (+ n1 1) n2) n2) but this always returns n2 .. why isnt it summing? 15:56:59 alaricsp [n=alaricsp@88-202-206-145.rdns.as8401.net] has joined #scheme 15:57:57 hkBst: how will i give it the else case then ? 15:58:46 you have to decouple creation of the sum from creating the sum elements... 15:59:56 gladiator: you need to keep the running sum somewhere. You can use a local function's argument for example. 16:00:27 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 16:00:28 gladiator . why not: (define (summation a b) (if (> a b) (cons a b) (summation (+ 1 a) b)) ? 16:01:00 Lectus [n=Frederic@189.105.107.32] has joined #scheme 16:01:05 -!- CSdread_ [n=danielf@209-188-116-183.taosnet.com] has quit ["Ajax isnt that something you clean the bathroom with?"] 16:01:10 rudybot: (define (summation from to) (let loop ((from from) (res 0)) (if (= from to) 0 (loop (+ from 1) (+ res from))))) 16:01:10 hkBst: eh? Try "rudybot: help". 16:01:17 or (+ (- n1 1) (if ...)) perhaps... 16:01:18 rudybot: eval (define (summation from to) (let loop ((from from) (res 0)) (if (= from to) 0 (loop (+ from 1) (+ res from))))) 16:01:20 hkBst: your sandbox is ready 16:01:26 rudybot: (summation 1 10) 16:01:26 hkBst: eh? Try "rudybot: help". 16:01:31 rudybot: eval (summation 1 10) 16:01:31 hkBst: ; Value: 0 16:01:41 rudybot: eval (define (summation from to) (let loop ((from from) (res 0)) (if (= from to) res (loop (+ from 1) (+ res from))))) 16:01:43 rudybot: eval (summation 1 10) 16:01:43 hkBst: ; Value: 45 16:02:47 gladiator: the named let is syntactic sugar for a local function... 16:03:06 incubot: logical steps are hard with one register. 16:03:09 steps of what ? 16:03:35 incubot: steps of reason. 16:03:38 What's my reason to have a message for you? 16:03:56 incubot: bow down slave! 16:03:59 but there's a difference between sitting down on a bus and getting hauled off to jail for it, and putting a brick for a window to steal a pair of shoes 16:04:13 korvin: i didnt understand what your example did at all :S hkBst summation(1 3) returns 0 :S 16:04:40 look again 16:04:56 rudybot: eval (summation 1 3) 16:04:56 hkBst: ; Value: 3 16:05:10 gladiator: it certainly doesn't return the correct answer :) 16:05:38 incubot: #scheme sucksorz. 16:05:42 if it makes any difference, I am doing a project right now which is a web application for system monitoring, in Scheme. 16:05:44 gladiator: well it does actually, but it doesn't add `to' 16:05:56 gladiator . I don't quite understand what is your function must to do =) 16:06:06 gladiator: half open intervals are good(TM) 16:07:53 hkBst: it works fine for some cases .. and not for others .. korvin.. a simple summation from n1 to n2 .. summation( 1 3) should return 6 16:08:10 oh that 16:08:25 hkBst: i dont get your loops .. 16:09:06 rudybot: eval (define (sum n1 n2) (if (= n1 n2) n2 (+ n1 (sum (+ n1 1) n2)))) 16:09:07 sladegen: your sandbox is ready 16:09:17 rudybot: eval (sum 1 3) 16:09:17 sladegen: ; Value: 6 16:09:30 incubot: Jesus Christ Superstar! 16:09:33 christ; looks like i'm forced to use the non-standard extension define-record-printer; and do a hideous with-output-to-string hack. 16:10:12 ok whats wrong with this: (define (summation n1 n2) 16:10:12 (if (> n1 n2) 0 (+ n1 (summation( (+ n1 1) n2) )))) 16:11:27 mine is better(tm;-) 16:11:29 gladiator: yeah, that's the same thing as sladegen's. The only bad thing is that it is not tail-recursive, but you might not want to bother with that. 16:11:38 sladegen: yours works .. and mine doesnt :S 16:11:51 wingo [n=wingo@ATuileries-152-1-16-81.w82-123.abo.wanadoo.fr] has joined #scheme 16:12:03 hkBst: theres another difference as well .. mine has an error 16:12:12 which i have no idea about 16:12:22 rudybot: eval (define (summation n1 n2) (if (> n1 n2) 0 (+ n1 (summation( (+ n1 1) n2) )))) 16:12:32 parens... 16:12:33 rudybot: eval (summation 1 3) 16:12:34 hkBst: error: procedure application: expected procedure, given: 2; arguments were: 3 16:12:57 summation( <== nasty C habit? ;P 16:12:58 Warning: non-procedure in operator position 16:12:58 ((+ n1 1) n2) 16:12:59 (summation (+ n1 1) n2) 16:13:05 rudybot: eval (define (summation n1 n2) (if (> n1 n2) 0 (+ n1 (summation (+ n1 1) n2) ))) 16:13:09 rudybot: eval (summation 1 3) 16:13:09 hkBst: ; Value: 6 16:13:13 dzhus89 [n=sphinx@95-24-180-102.broadband.corbina.ru] has joined #scheme 16:13:38 gladiator . (define (summation n1 n2) (let loop ((i n1) (sum 0)) (if (> i n2) sum (loop (+ i 1) (+ sum i))))) 16:13:42 gladiator: parens in scheme are VERY much meaningful. 16:13:47 -!- dzhus89 [n=sphinx@95-24-180-102.broadband.corbina.ru] has quit [Remote closed the connection] 16:14:05 aah .. damn.. 16:14:13 thanks guys! 16:15:34 and when you have time, later on, consider what hkBst said about differences between the two approaches i.e. tail recursion. 16:19:59 tjafk2 [n=timj@e176215146.adsl.alicedsl.de] has joined #scheme 16:20:43 elias` [n=me@resnet-nat-406.ucs.ed.ac.uk] has joined #scheme 16:25:43 sladegen . in your example: (+ n1 (summary ...)) -- simple recursive, not tail, amm I right? 16:27:14 -!- dzhus [n=sphinx@95-24-125-207.broadband.corbina.ru] has quit [Read error: 110 (Connection timed out)] 16:29:56 korvin: yes, hkBst's is properly tail recursive one. 16:30:40 what does this mean: Condition: (&interrupt post-major-gc) 16:30:41 ? 16:30:59 -!- sepult [n=sepult@xdsl-87-78-27-181.netcologne.de] has quit ["leaving"] 16:31:32 gladiator: which scheme and what's the context? 16:31:36 sladegen . your example works with 1 4000000 args, is it means that that scheme can use so deep recursion? 16:32:14 korvin: yes, usually limited by available memory, by some scheme have limited C stack... 16:32:36 hkBst: i dont know .. i did sudo apt-get install scheme48 on ubuntu 16:32:40 thanks 16:32:53 And some Scheme implementations use the heap for storing call frames, in which case, you have as much room as you have memory. :-P 16:32:55 s/by/but some schemes/ 16:33:02 i am writing a function .. which calls another function recursively .. an extension of the summation thing 16:33:07 -!- wingo [n=wingo@ATuileries-152-1-16-81.w82-123.abo.wanadoo.fr] has quit [Read error: 113 (No route to host)] 16:33:41 gladiator: probably out of memory... 16:34:14 or heap space. older scheme48 has heap of set size on startup. 16:34:15 yep, in guile I had Stack overflow on about 1000 calls deep 16:34:32 korvin: In Guile, the max stack depth is configurable. 16:34:33 sladegen: wow .. then i must be doing something wrong .. it shouldnt actually .. since it just spews out the error immediately 16:35:16 gladiator: dunno... not seeing the code. 16:35:18 cky . I didn't know it =) 16:35:39 -!- tjafk1 [n=timj@e176198187.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 16:36:38 gladiator: if you are using old scheme48 default heap size is "tiny". 16:37:10 e.g., (debug-set! stack 1000000) 16:37:47 sladegen: i get undefined variable stack 16:38:00 whats the latest version ? i can install that ... 16:38:38 gladiator: Some people will tell you 1.8, others will tell you 1.3. :-P 16:38:41 gladiator: it won't help, if you go into infinite loop no amount of memory will help. 16:38:52 this is what i am doing: first three functions are working fine .. 16:38:56 http://pastie.org/495737 16:41:27 cky: any packages for ubuntu? 16:41:54 gladiator: If you're using the latest Ubuntu, it comes with "scheme48" package, which is 1.8. 16:42:13 cky: then i am using the latest ... i am on ubuntu 9.04 16:42:18 and have scheme48 16:42:21 gladiator: That stack-setting stuff is for Guile, not Scheme48. Just so you know. 16:42:28 gladiator: That was just to answer korvin's comment. 16:42:52 cky: oh ... ok .. 16:47:15 gladiator: well, first of all perhaps there is no point in calculating combinations like that n!/(n-b)! = (n - b + 1) * ... * n 16:48:44 sladegen: combinations = n!/(n-b)! * b! 16:49:01 older mit-scheme aborts with: ;Aborting!: maximum recursion depth exceeded 16:49:41 sladegen: means that the summation is not quite right ? in atleast_b function ? 16:52:13 -!- alaricsp [n=alaricsp@88-202-206-145.rdns.as8401.net] has quit [] 16:54:21 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 16:55:05 alaricsp [n=alaricsp@88-202-206-145.rdns.as8401.net] has joined #scheme 16:55:12 *sladegen* hmmms. 16:55:16 gladiator . as I know there is an "agreement" to use '- symbol in complex names, not '_ =) 16:55:26 sladegen: i had made a stupid mistake .. wrong parameter passing .. 16:55:58 korvin? 16:56:27 gladiator . and I think it's better to use tail-recursion if it possible =) 16:56:35 gladiator: yup, just noticed that, too ;)) 16:56:58 gladiator . not 'my_prob but 'my-prob =) 16:58:30 sladegen pasted "properly rewritten for gladiator" at http://paste.lisp.org/display/81118 16:58:48 Adamant [n=Adamant@c-76-29-188-22.hsd1.ga.comcast.net] has joined #scheme 16:59:10 sladegen: thanks :) 17:00:28 grettke [n=grettke@CPE-69-23-38-57.wi.res.rr.com] has joined #scheme 17:00:34 what editor do you use? some die-hard use vim for scheme, but emacs is king in lisp-world. 17:01:44 I'm using vim ^_^' I'm to lazy to learn emacs hot-keys =) 17:02:47 I just caught the tail end of this editor thread, but I'll jump in anyway: DrScheme is a great Scheme editor, and it even eases the migration to Emacs if that is where you are headed. 17:03:12 vim is fine if your adventure in lisp-world is short or you are long-time vimmer... 17:03:45 gladiator . is n!/(n-b)! * b! equal to n!/((n-b)! * b!) ? 17:03:56 korvin : no 17:04:23 is there any other way of defining functions inside functions? other than lambda? 17:04:32 gladiator . so in those paste your combination fun not right 17:05:09 korvin: is it so? i tried it on 10 3 and it gives the same result as my calculator :S 17:05:11 lambda doesn't define function, it creates function 17:05:26 gladiator: "normal" define works, too. 17:05:39 Anyone up for a syntax-case question? 17:06:23 grettke: you won't know unless you ask ;) 17:06:27 *sladegen* feels lately like there should #syntax-case. 17:06:31 gladiator . khm... (/ (fac n) (* (fac (- n b)) (fac b))) isn't equal to (n!/(n-b)!) * b! =/ 17:06:56 i think gladiator is just confused. 17:07:09 hkBst: thanks, perhaps my problem is that I miss the obvious ;) 17:07:25 sepult [n=sepult@xdsl-87-78-27-181.netcologne.de] has joined #scheme 17:07:49 grettke: this is my problem with syntax-case too all to often. Unfortunately that doesn't mean that's the majority of problems :( 17:07:53 korvin: this is my function .. and i think it has all the parenthesis right (define (combination n b) 17:07:53 (/ (factorial n) 17:07:53 (* (factorial (- n b)) 17:07:53 (factorial b)))) 17:08:04 hey grettke 17:08:07 it's ok. 17:08:43 gladiator: i just think you could simplify it, mathematically speaking... 17:09:02 how do i call a function which is passed as a parameter? 17:09:09 in stead of calculating raw factorials. 17:09:10 ,df funcall 17:09:16 hah, wrong channel 17:09:18 gladiator: you just do it(TM) ;) 17:09:24 sladegen: how? 17:09:53 gladiator: like i said... 17:10:52 rudybot: eval ((lambda (b) (b 1 2)) (lambda (a b) (+ a b))) 17:10:52 sladegen: ; Value: 3 17:11:15 grettke: so which is it that you are struggling with? 17:12:10 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 17:13:57 clhs funcall 17:13:57 http://www.lispworks.com/reference/HyperSpec/Body/f_funcal.htm 17:14:22 offby1: thereoff you go! 17:14:42 nothingHappens [n=nothingh@173-25-176-111.client.mchsi.com] has joined #scheme 17:14:48 gladiator: sometimes you need `apply' if you have the arguments already in a list... 17:15:32 r5rs apply 17:15:33 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_556 17:15:35 -rudybot:#scheme- http://tinyurl.com/2kjgxd 17:16:26 sladegen: actually I was thinking of Emacs Lisp 17:17:22 I am trying to write a syntax-case macro. One of the patterns matches any number of values like this: (name ...). In the template, I want to unhygienically create a list of names, where "make-" is prepended to each of the syntax values (this is to facilitate working with another macro that creates records). I know how to do this using with-syntax, but not in this case where there would be a new binding for every name. 17:17:43 elisp funcall 17:17:43 http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_232.html#IDX618 17:17:45 -rudybot:#scheme- http://tinyurl.com/mrcf8w 17:17:52 rudybot: stfu 17:17:52 sladegen: eh? Try "rudybot: help". 17:18:33 http://paste.lisp.org/display/81120 17:18:42 ... and watch your language 17:19:10 I am trying to write the drt++/default macro. 17:22:14 hkBst: that is the one 17:25:03 grettke: I don't see a clause with (name ...) 17:25:41 hkBst: I tried to generalize the question, and then realized that I should just post the code. 17:25:54 ok 17:25:58 -!- JKGpp [n=juergen@dslb-088-067-190-038.pools.arcor-ip.net] has quit [] 17:26:40 hkBst: In the pattern where field gets matched, every item after that can be generated. 17:27:00 athos [n=philipp@92.250.250.68] has joined #scheme 17:27:18 hkBst: Basically, you are specifying record field accessors and helper functions (these are expected by the destination macro) 17:27:41 hkBst: I want to generate "ncolor-set!-red", but for every field name. 17:29:10 ejs [n=eugen@91-116-112-92.pool.ukrtel.net] has joined #scheme 17:32:41 grettke: I think I understand the code you pasted, but not how you want to extend it or what's wrong with it. 17:36:08 hbBst: I think that my explanation is poor. Sorry. that said, Right now, for every field defined, red for blue for example, you have to type in the accesor name, and changer name, for each field. Since I know that those names will be the same (-set!-) I want to just generate them. However, I don't understand how to introduce new syntax, for those names. 17:36:29 hkBst: Maybe this is just easy, and I *am* making it too hard! 17:38:13 how do i work with lists ? when i write (1 2 3 5) it gives me an error saying attempt to call a non procedure 17:39:56 gladiator: The LIST procedure makes lists 17:40:03 rudybot: eval (car (list 1 2 3)) 17:40:03 sjamaan: your sandbox is ready 17:40:04 sjamaan: ; Value: 1 17:40:19 You can also quote the value if you want, so it is taken literally as a list instead of a procedure call 17:40:24 rudybot: eval (car '(1 2 3)) 17:40:24 sjamaan: ; Value: 1 17:41:02 sjamaan: oh .. thanks! 17:41:07 yw 17:41:20 The ' symbol is short for the special form QUOTE, by the way: 17:41:31 rudybot: eval (car (quote (1 2 3))) 17:41:31 sjamaan: ; Value: 1 17:41:38 jao [n=jao@190.Red-81-32-179.dynamicIP.rima-tde.net] has joined #scheme 17:43:45 whats wrong with this then:? (list-ref 1 (list 2 3)) 17:45:03 It wants the list first and the index second :) 17:45:22 r5rs list-ref 17:45:22 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_426 17:45:24 -rudybot:#scheme- http://tinyurl.com/am94od 17:45:59 Most procedures in Scheme are like that; object first and operator-specific values next 17:46:34 (there are a few exceptions, notably member, assoc etc) 17:51:14 -!- Lectus [n=Frederic@189.105.107.32] has left #scheme 17:51:53 "customer account executive"... ha! 17:52:22 why does this: (list-ref '(1 2 3 4 5) 2) works .. and this: (list-ref '(1 2 '(3 4) 5) 2) doesnt? 17:52:49 You don't have to quote the inner list 17:52:55 It's already part of a quoted expression 17:53:11 sjamaan: it doesnt work either ways 17:53:29 (list-ref '(1 2 (3 4 5) 2) 17:53:33 oopa 17:53:34 rudybot: eval (list-ref '(1 2 (3 4) 5) 2) 17:53:34 sjamaan: ; Value: (3 4) 17:53:39 Looks fine to me 17:53:40 oops 17:54:17 The list (3 4) is the value in the main list at index 2 17:54:28 In mzscheme enter!'ing a module reloads it, but deleted definitions persist in the repl. Is there a way to unload them? 17:54:51 eli: that question from Korollary was for you. 17:54:59 Mr Account Executive. 17:55:26 -!- alaricsp [n=alaricsp@88-202-206-145.rdns.as8401.net] has quit [] 17:55:40 rudybot: eval (list-ref '(1 2 (3 4 (5) 6) 7) 6) 17:55:41 gladiator: your sandbox is ready 17:55:41 gladiator: error: list-ref: index 6 too large for list: (1 2 (3 4 (5) 6) 7) 17:56:06 rudybot: eval (list-ref '(1 2 (3 4 (5) 6) 7) 5) 17:56:06 gladiator: error: list-ref: index 5 too large for list: (1 2 (3 4 (5) 6) 7) 17:56:08 rudybot: eval (length ') 17:56:08 *offby1: your sandbox is ready 17:56:09 *offby1: error: eval:1:9: read: unexpected `)' 17:56:15 rudybot: eval (length '(1 2 (3 4 (5) 6) 7)) 17:56:16 *offby1: ; Value: 4 17:56:18 damned keyboard 17:56:52 offby1, Korollary: I'mon the phone with a comcast "customer account executive"... 17:57:33 rudybot: eval (list-ref '(1 2 (3 4 (5) 6) 7) 3) 17:57:33 gladiator: ; Value: 7 17:58:18 hurray, no error :) 17:58:32 Do you understand why it works now and not in the other cases? 17:59:16 sjamaan: no... in my assignment... i am supposed to get 4 on index 4 .. and 6 on index 6 17:59:31 I doubt your assignment is to just use list-ref as-is :) 17:59:39 Wouldn't be much of an assignment otherwise 17:59:55 sjamaan... yea .. looks like so to me too ! 18:00:04 I think the idea is you write a procedure that knows about nested lists 18:00:23 I don't think list-ref will be of much use to you 18:00:45 (list-ref '(1 2 (3 4 (5) 6) 7) 3.5) should return (5) ;) 18:00:55 If you don't know where to begin, try writing your own version of list-ref first 18:01:03 (one that works exactly like the current one) 18:01:17 If you get that working, extend it to work like your assignment says it should 18:01:21 Korollary: I don't think that values get deleted, but why is that a problem? 18:01:33 gladiator: i'm joking, only. 18:01:38 (or write a new one with the ideas you got from writing the original one) 18:01:41 sjamaan: yea .. trying to think of a solution .. 18:02:42 eli: I accidentally use things that I deleted. I couldn't quite figure out how to start a new sandbox in the repl, either. 18:03:14 sjamaan: im thinking of visiting each node .. and calling my function if the current node is a list 18:03:27 That sounds like a good idea 18:04:52 sjamaan: that has one problem though .. say i get my index number 6 and i will need to exit the recursion and not just return .. how do i do that with scheme? 18:05:23 You can just let it return 18:05:31 And then the procedure that called it to return also, etc 18:07:05 Korollary: The repl doesn't use a sandbox. 18:07:26 (If it did, then each reset of the sandbox would initialize your world from scratch.) 18:07:26 I'm off 18:07:36 Good luck, gladiator 18:07:45 sjamaan: thanks :) 18:07:58 Korollary: As for the non-deletion of previous binding, I'm not sure exactly what's the reason for that, so you'll need to ask about it on the list. 18:09:02 meanburrito920_ [n=John@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has joined #scheme 18:15:11 mejja [n=user@c-87bae555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 18:19:47 ct2rips [n=ct2rips@blfd-4db0e286.pool.einsundeins.de] has joined #scheme 18:25:23 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [Read error: 60 (Operation timed out)] 18:26:26 -!- npe [n=npe@195.207.5.2] has quit [Read error: 60 (Operation timed out)] 18:37:43 -!- ct2rips [n=ct2rips@blfd-4db0e286.pool.einsundeins.de] has quit [Remote closed the connection] 18:52:52 -!- jao [n=jao@190.Red-81-32-179.dynamicIP.rima-tde.net] has quit [Read error: 104 (Connection reset by peer)] 18:57:07 exexex [n=chatzill@88.235.95.169] has joined #scheme 19:00:57 ikaros [n=ikaros@g226147181.adsl.alicedsl.de] has joined #scheme 19:10:27 -!- ikaros [n=ikaros@g226147181.adsl.alicedsl.de] has quit ["Leave the magic to Houdini"] 19:11:12 Ragnaroek [i=54a65a49@gateway/web/ajax/mibbit.com/x-908bb1edb01fc3e8] has joined #scheme 19:13:52 -!- fishey [n=fisheyss@ool-4573344b.dyn.optonline.net] has quit [Read error: 110 (Connection timed out)] 19:14:44 fishey [n=fisheyss@ool-4573344b.dyn.optonline.net] has joined #scheme 19:15:14 http://gmarceau.qc.ca/blog/2009/05/speed-size-and-dependability-of.html 19:17:55 ejs1 [n=eugen@91-116-112-92.pool.ukrtel.net] has joined #scheme 19:21:05 memoize [n=memoize@beigetower/jaene] has joined #scheme 19:21:38 _JFT_ [n=_JFT_@modemcable183.11-202-24.mc.videotron.ca] has joined #scheme 19:22:53 npe [n=npe@91.179.90.56] has joined #scheme 19:24:44 kilimanjaro [n=kilimanj@70.116.95.163] has joined #scheme 19:30:48 in ter ess ting 19:31:55 -!- memoize [n=memoize@beigetower/jaene] has left #scheme 19:40:05 Adamant [n=Adamant@c-76-29-188-22.hsd1.ga.comcast.net] has joined #scheme 19:47:59 -!- Ragnaroek [i=54a65a49@gateway/web/ajax/mibbit.com/x-908bb1edb01fc3e8] has quit ["http://www.mibbit.com ajax IRC Client"] 19:59:35 incubot: what's your opinion on spamurlators? 19:59:38 Is this a Good Thing, in your opinion? 20:00:00 incubot: don't quite know. 20:00:03 yes, that distinction quite apparent in my proposal (as inherited by Riastradh's TCP proposal) 20:00:29 incubot: good call, TCP is evil. 20:00:32 That's nice & evil 20:00:34 spamurlator? 20:00:44 incubot: you're the best conversationalist I know 20:00:46 don't like the word? 20:00:47 or, the best solution imho is to not use multiple values at all. 20:01:01 Don't know what it means... 20:01:12 guess!-) 20:02:23 npe_ [n=npe@d54C450C4.access.telenet.be] has joined #scheme 20:02:54 two hits in google, yayks! 20:03:03 0 hits for me 20:03:43 stupid google... it's for spamulator 20:03:54 incubot: kick google! 20:03:57 maybe a bot could be programmed to detect undesirable situations and kick all those involved 20:04:09 google is always involved 20:04:15 incubot: YES, YES, YES! 20:05:40 *sladegen* patents the word. 20:11:33 -!- a-s [n=user@92.85.204.10] has quit [Remote closed the connection] 20:11:43 a-s [n=user@92.85.204.10] has joined #scheme 20:14:08 -!- ejs1 [n=eugen@91-116-112-92.pool.ukrtel.net] has quit ["This computer has gone to sleep"] 20:17:56 -!- korvin [n=korvin@host-200-145-66-217.spbmts.ru] has quit ["(quit *servers* 'x_X)"] 20:18:44 -!- npe [n=npe@91.179.90.56] has quit [No route to host] 20:22:03 -!- Lemonator [n=kniu@pool-71-107-56-85.lsanca.dsl-w.verizon.net] has quit [Read error: 110 (Connection timed out)] 20:23:18 Lemonator [n=kniu@pool-71-107-56-85.lsanca.dsl-w.verizon.net] has joined #scheme 20:34:45 luz [n=davids@189.122.121.232] has joined #scheme 20:37:42 -!- ejs [n=eugen@91-116-112-92.pool.ukrtel.net] has quit [Read error: 110 (Connection timed out)] 20:47:01 -!- athos [n=philipp@92.250.250.68] has quit [Remote closed the connection] 20:47:21 athos [n=philipp@92.250.250.68] has joined #scheme 20:48:52 -!- acarrico [n=acarrico@pppoe-68-142-42-148.gmavt.net] has quit [Read error: 110 (Connection timed out)] 21:00:12 -!- copumpkin [n=pumpkin@Aeropuerto.Kiewit.Dartmouth.EDU] has quit [Client Quit] 21:02:04 alaricsp [n=alaricsp@88-202-206-145.rdns.as8401.net] has joined #scheme 21:03:24 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 21:07:09 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has left #scheme 21:07:37 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 21:07:42 copumpkin [n=pumpkin@dhcp-210-180.cs.dartmouth.edu] has joined #scheme 21:09:02 -!- leppie [n=lolcow@dsl-243-24-152.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 21:10:28 arcfide [n=arcfide@adsl-99-186-236-30.dsl.bltnin.sbcglobal.net] has joined #scheme 21:17:10 Good afternoon. 21:17:17 Boo! 21:17:58 *arcfide* spills his ... 21:18:06 Oh, right, nothing to spill have I. 21:20:16 hi arcfide 21:26:28 -!- alaricsp [n=alaricsp@88-202-206-145.rdns.as8401.net] has quit [] 21:31:03 leppie [n=lolcow@dsl-243-24-152.telkomadsl.co.za] has joined #scheme 21:37:34 -!- _JFT_ [n=_JFT_@modemcable183.11-202-24.mc.videotron.ca] has quit [] 21:43:35 karlw [n=karlw@adsl-99-157-202-142.dsl.pltn13.sbcglobal.net] has joined #scheme 21:44:09 Hey, how to I get Quack to enter! a buffer? 21:44:49 -!- athos [n=philipp@92.250.250.68] has quit [Remote closed the connection] 21:45:20 athos [n=philipp@92.250.250.68] has joined #scheme 21:49:09 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Leaving"] 21:50:19 karlw_ [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 21:50:19 -!- karlw [n=karlw@adsl-99-157-202-142.dsl.pltn13.sbcglobal.net] has quit [Read error: 104 (Connection reset by peer)] 21:52:32 -!- karlw_ [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has quit [Client Quit] 21:53:10 -!- rdd [n=user@c83-250-157-93.bredband.comhem.se] has quit [Read error: 54 (Connection reset by peer)] 21:54:48 karlw [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 21:57:05 -!- hotblack23 [n=jh@p5B0576A6.dip.t-dialin.net] has quit [Read error: 60 (Operation timed out)] 21:58:55 rdd [n=user@c83-250-157-93.bredband.comhem.se] has joined #scheme 22:00:43 volalba [n=mark@unaffiliated/pina] has joined #scheme 22:00:44 -!- leppie [n=lolcow@dsl-243-24-152.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 22:04:15 dunno that you can 22:08:18 I could try writing it. 22:08:40 leppie [n=lolcow@dsl-243-24-152.telkomadsl.co.za] has joined #scheme 22:10:44 -!- volalba [n=mark@unaffiliated/pina] has left #scheme 22:11:02 -!- jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has quit [Read error: 110 (Connection timed out)] 22:11:46 I looked at my version of quack.el and it has no mention of enter!. 22:12:20 There's another emacs mode called Geiser that looked like it targeted plt better 22:17:39 -!- karlw [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has quit [Read error: 104 (Connection reset by peer)] 22:18:13 karlw [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 22:18:51 I'll add it and mail neil 22:18:53 -!- mejja [n=user@c-87bae555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 22:23:39 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Read error: 104 (Connection reset by peer)] 22:30:15 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 22:33:50 wingo [n=wingo@ATuileries-152-1-16-81.w82-123.abo.wanadoo.fr] has joined #scheme 22:38:21 karlw_ [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 22:38:21 -!- karlw [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has quit [Read error: 54 (Connection reset by peer)] 22:38:43 metasyntax [n=taylor@pool-71-127-125-129.aubnin.fios.verizon.net] has joined #scheme 22:39:57 Mr-Cat [n=Mr-Cat@93-81-151-13.broadband.corbina.ru] has joined #scheme 22:40:00 -!- karlw_ [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has quit [Read error: 104 (Connection reset by peer)] 22:40:37 karlw [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 22:40:38 -!- tizoc [n=user@unaffiliated/tizoc] has quit ["Coyote finally caught me"] 22:40:39 Does chicken4 support syntax-case? There seems to be no egg. 22:40:55 tizoc [n=user@unaffiliated/tizoc] has joined #scheme 22:42:26 -!- Judofyr [n=Judofyr@ti0056a380-0643.bb.online.no] has quit [Read error: 104 (Connection reset by peer)] 22:43:51 syntax-case hasn't been ported yet 22:43:56 You can still use syntax-rules though 22:46:30 -!- offby1 [n=user@pdpc/supporter/monthlybyte/offby1] has quit [Read error: 60 (Operation timed out)] 22:47:45 -!- karlw [n=karlw@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has quit [Read error: 104 (Connection reset by peer)] 22:47:47 rudybot_ [n=luser@q-static-138-125.avvanta.com] has joined #scheme 22:47:49 offby1 [n=user@q-static-138-125.avvanta.com] has joined #scheme 22:48:25 -!- npe_ [n=npe@d54C450C4.access.telenet.be] has quit [] 22:50:22 Hm... And chicken4 supports er-macros, doesn't it? Is there a er-macros guide? I need to implement a couple of unhygienic macros. 22:50:31 yes, it does 22:50:39 There's a good article by foof 22:50:41 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 22:51:05 hang on 22:51:28 -!- rudybot_ is now known as rudybot__ 22:51:37 -!- rudybot [n=luser@q-static-138-125.avvanta.com] has quit [Nick collision from services.] 22:51:44 -!- rudybot__ is now known as rudybot 22:51:46 Mr-Cat: http://lists.gnu.org/archive/html/chicken-users/2008-04/msg00013.html 22:52:01 (btw, there's also a #chicken here; that might be more useful for chicken-specific questions) 22:52:26 sjaaman: Thanks 22:52:43 yw 22:53:11 yahweh 22:53:12 And of course you will need to read http://chicken.wiki.br/man/4/Modules%20and%20macros.html too 22:53:44 -!- wingo [n=wingo@ATuileries-152-1-16-81.w82-123.abo.wanadoo.fr] has quit [Read error: 113 (No route to host)] 22:53:47 inri 22:54:20 (Why is there a #chicken channel, again? I know I've asked before, but I've forgotten.) 22:54:58 Because it's nice to discuss implementation-specific stuff in a place where there isn't random other chatting going on 22:55:21 because it was trying to cross the #road? 22:55:23 What's wrong with discussing implementation-specific stuff in #scheme? 22:55:31 elderk [n=zk@122-57-254-205.jetstream.xtra.co.nz] has joined #scheme 22:55:40 It will get lost in the backlog easier 22:56:43 -!- elderk [n=zk@122-57-254-205.jetstream.xtra.co.nz] has left #scheme 22:57:18 .oO("ur-macros"?) 23:01:22 (why is there a #gambit? or a #guile?) 23:01:38 (why are there any implementation specific channels? we should all just be on #internet.) 23:01:39 *sjamaan* proposed we all join #computerstuff and kill every channel 23:01:44 acarrico [n=acarrico@pppoe-68-142-36-37.gmavt.net] has joined #scheme 23:01:45 Exactly elf :) 23:01:48 *elf* grins. 23:02:09 *elf* pokes his head back out. 23:02:12 (My question about #chicken applies equally well to Gambit and Guile.) 23:02:23 how about #scheme? shouldnt we all be on #lisp? 23:02:26 or #lang ? 23:02:42 #freenode 23:03:03 Freenode staff will have a field day with that one ;) 23:03:10 *elf* retreats back to #elsewhere 23:03:11 There is more commonality between Chicken and Gambit than there is between the collection of Common-Lisp-related topics and the collection of Scheme-related topics. 23:03:14 Aha, er seems to be a superset of define-macro 23:03:25 No, Mr-Cat. 23:03:28 DEFINE-MACRO is a broken concept. 23:03:31 Explicit renaming is not. 23:03:55 You can implement define-macro in terms of er, if that's what you're asking 23:04:12 Personally I'd like to see more implementation-specific discussion here. 23:04:29 I mean define-macro can be rewritten to er without substantial changes 23:05:06 If you're careful - yes 23:05:08 at least in my case 23:05:09 *sladegen* demends #plt 23:05:28 it's wrong to use define-macro? bad practice? 23:06:11 cleanliness is next to godliness. 23:06:32 It doesn't work very well, cel. 23:06:39 It is intrinsically a source of bugs. 23:06:58 uhm, i find it usefull sometimes and easy to use 23:07:11 define-syntax and such seem harder and complex 23:07:15 It is very easy to introduce bugs with DEFINE-MACRO. That is why it should not be used. 23:07:18 cel: And it is absent in chicken4. 23:08:05 DEFINE-SYNTAX is simply the name for the general operator that introduces syntactic bindings in Scheme. DEFINE-MACRO conventionally refers to unhygienic macro systems in particular. Perhaps you meant SYNTAX-RULES or SYNTAX-CASE, cel, when you said DEFINE-SYNTAX. 23:08:31 *Riastradh* vanishes. 23:10:08 ah 23:10:26 so i should be using syntax-rules instead 23:15:32 npe [n=npe@91.179.90.56] has joined #scheme 23:25:42 Is there anything ready-to-use in chicken4 for sorting lists? Srfi-95 does not seem to be available. 23:26:18 I'm sure they have a built-in "sort" function 23:26:25 in fact I assume R5RS requires that 23:26:52 offby1: thanks, that seems to be so 23:29:57 what do you guys think of syntax-case? Like it? 23:30:14 basically never use it 23:30:30 syntax-case is my bishie 23:30:42 offby1: what do you use instead? 23:30:46 functions 23:30:47 :) 23:30:52 never got into macros 23:32:37 *sladegen* takes offby1's scheme club membership card away. 23:32:59 from what I have seen you can use functions and syntax-rules to do a lot of nice things 23:33:36 I just tried writing a macro to facilitate the creation of record names and helper-functions. I learned a lot. It was hard (iow I suck at it, sort of). 23:35:16 yeah, I saw that all go by 23:36:24 jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has joined #scheme 23:36:34 you didn't get to see the solution though hehe 23:36:36 grettke: I don't consider myself too qualified to talk on it, but I did something neat while playing with define-syntax for the first time. 23:37:07 A sort of function to traverse a path in JSON: (json-path json-thing (field -> field @ index -> field). 23:37:07 I don't think I've _ever_ written an interesting macro 23:37:48 It definitely un-complicates reading code that traverses a JSON object down several levels. 23:38:24 Though it almost felt like cheating somehow. I guess I'm just not used to abusing the full power of Scheme yet. 23:38:48 yet your name is metasyntax 23:39:25 metasyntax: I've written enough to know that I have a long way to go :). 23:39:28 -!- elias` [n=me@unaffiliated/elias/x-342423] has quit ["leaving"] 23:39:41 offby1: Never needed to eh? 23:40:16 If you have some interesting macros, you might consider putting them up here: http://schemecookbook.org/Cookbook/RecipeIndex 23:41:29 Korollary: my interests cover all computer languages, I'm only recently getting heavily into Scheme 23:42:26 Korollary: I suppose it is mundane when you think about it/look at it. I just couldn't get it into my head, how you could take advantage of assembling syntax objects, and that you could do it in functions as you lwish. 23:43:25 grettke pasted "Learned a little about composing syntax objects" at http://paste.lisp.org/display/81136 23:43:54 Korollary: I wrote define-record-type++/default 23:48:13 dunno about never _needing_ to, but I've never been tempted. 23:48:25 Might be one of those things where I don't know what I'm missing. 23:49:32 offby1: I found that by learning about macros (enough by some measure), I found that for 90% of what *I* encountered, functions work just fine. If you haven't learned the power of functions, learning about macros will teach you. Sounds counterintuitive, but it is true. 23:52:54 -!- meanburrito920_ [n=John@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit [Read error: 54 (Connection reset by peer)] 23:54:57 Oh no, chicken4's syntax-rules does not seem to support (... ...) 23:59:20 Ah, found a workaround