00:01:24 Stinkin' bluetooth. 00:01:58 Remind me to stick with theoretical computer science next time, where I don't have to deal with hardware so much. :-) 00:04:57 delamarche_ [n=delamarc@CPE001ec9033fb3-CM0014f85c546a.cpe.net.cable.rogers.com] has joined #scheme 00:04:58 Bluetooth seems to be the most ill-designed and ill-implemented standard of anything of that sort. 00:05:05 Especially in the recent years. 00:06:21 And yet, it remains pervasively unavoidable. 00:06:59 *arcfide* wonders if the above sentence makes sense. 00:07:01 *arcfide* thinks. 00:07:05 *arcfide* nods. 00:07:16 .oO(Yes, just barely.) 00:10:59 -!- jlongster [n=user@75.148.111.133] has quit [Read error: 113 (No route to host)] 00:13:25 synthase [n=synthase@68.63.20.12] has joined #scheme 00:13:40 -!- synthasee [n=synthase@68.63.20.12] has quit [Connection reset by peer] 00:13:40 -!- drdo [n=psykon@167.111.54.77.rev.vodafone.pt] has quit [Remote closed the connection] 00:16:32 mrtsunami [n=tsunami@adsl-157-137-22.cae.bellsouth.net] has joined #scheme 00:18:55 replor [n=replor@ntkngw375028.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 00:20:51 tizoc_ [n=user@r190-135-28-91.dialup.adsl.anteldata.net.uy] has joined #scheme 00:21:18 -!- delamarche [n=delamarc@CPE001ec9033fb3-CM0014f85c546a.cpe.net.cable.rogers.com] has quit [Read error: 110 (Connection timed out)] 00:21:49 -!- tizoc [n=user@r190-135-43-33.dialup.adsl.anteldata.net.uy] has quit [Nick collision from services.] 00:21:51 -!- tizoc_ is now known as tizoc 00:22:01 -!- arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has quit ["Restart"] 00:24:29 arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has joined #scheme 00:26:39 -!- mejja [n=user@c-7d2472d5.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 00:29:38 -!- schme_ [n=marcus@c83-249-231-47.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 00:30:37 -!- bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has quit [Remote closed the connection] 00:35:52 bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has joined #scheme 00:38:12 synthase: what's wrong with (require "a.ss")? You don't need to "install" anything for things to work. 00:38:33 elf: `require' works very properly. 00:39:00 -!- hemulen [n=hemulen@cpe-069-134-114-252.nc.res.rr.com] has quit [] 00:41:50 -!- bweaver [n=bweaver@75.148.111.133] has quit [] 00:48:46 cemerick [n=la_mer@c-71-192-208-28.hsd1.ma.comcast.net] has joined #scheme 00:50:26 bombshelter13_ [n=bombshel@209-161-240-8.dsl.look.ca] has joined #scheme 00:50:37 -!- cemerick [n=la_mer@c-71-192-208-28.hsd1.ma.comcast.net] has quit [Client Quit] 00:54:06 annodomini_ [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 00:56:34 delamarche [n=delamarc@dsl-67-212-16-62.acanac.net] has joined #scheme 00:57:39 -!- sebell [n=sebell@S01060016cbc2d41a.cg.shawcable.net] has quit ["rcirc on GNU Emacs 22.2.1"] 00:59:58 -!- sjamaan [n=sjamaan@frohike-old.xs4all.nl] has quit [Remote closed the connection] 01:00:09 sjamaan [n=sjamaan@frohike-old.xs4all.nl] has joined #scheme 01:00:23 -!- annodomini [n=lambda@wikipedia/lambda] has quit [Read error: 60 (Operation timed out)] 01:00:37 -!- wastrel [n=wastrel@nylug/member/wastrel] has quit ["bye now"] 01:02:48 hiyuh [n=hiyuh@KD059133117089.ppp.dion.ne.jp] has joined #scheme 01:04:27 -!- bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has quit [Read error: 113 (No route to host)] 01:07:16 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 01:08:59 -!- offby1 [n=user@q-static-138-125.avvanta.com] has quit [Remote closed the connection] 01:11:38 -!- sm [n=sm@pool-71-104-90-51.lsanca.dsl-w.verizon.net] has quit [] 01:18:30 -!- delamarche_ [n=delamarc@CPE001ec9033fb3-CM0014f85c546a.cpe.net.cable.rogers.com] has quit [Connection timed out] 01:22:50 eno__ [n=eno@adsl-70-137-151-163.dsl.snfc21.sbcglobal.net] has joined #scheme 01:23:13 -!- bombshelter13_ [n=bombshel@209-161-240-8.dsl.look.ca] has left #scheme 01:24:16 sm [n=sm@pool-71-104-90-51.lsanca.dsl-w.verizon.net] has joined #scheme 01:24:30 bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has joined #scheme 01:29:25 paganini123_ [n=chatzill@adsl-10-22-240.mia.bellsouth.net] has joined #scheme 01:31:07 offby1 [n=user@q-static-138-125.avvanta.com] has joined #scheme 01:34:33 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 110 (Connection timed out)] 01:41:05 Cale_ [n=Cale@CPE001c10c70239-CM000e5cdd834a.cpe.net.cable.rogers.com] has joined #scheme 01:42:05 -!- Cale [n=Cale@CPE001c10c70239-CM000e5cdd834a.cpe.net.cable.rogers.com] has quit [Nick collision from services.] 01:42:09 -!- Cale_ is now known as Cale 01:42:30 -!- paganini123 [n=chatzill@adsl-153-100-26.mia.bellsouth.net] has quit [Read error: 113 (No route to host)] 01:43:23 -!- sm [n=sm@pool-71-104-90-51.lsanca.dsl-w.verizon.net] has quit [] 01:43:55 -!- error_developer_ [n=errordev@78-86-1-110.zone2.bethere.co.uk] has quit [Read error: 110 (Connection timed out)] 01:45:50 erm... scheme equivalent to strstr, go. 01:48:33 synx, SRFI-13 has some stuff. 01:48:48 thanks! 01:49:06 *offby1* doesn't mind a bit that he's forgotten what strstr does 01:49:30 I'd just use regexp matchin 01:49:50 -!- CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has quit [Connection timed out] 01:52:41 It's just a plain substring search. I'm looking for delimiters. 01:54:36 -!- tltstc` [n=nine@192.207.69.1] has quit [] 01:55:58 synx: `regexp-match*' and/or `regexp-split' are probably much better in a delimited situation. 01:56:14 synx: also, you didn't say what's wrong with (require "a.ss"). 01:56:37 Nothing. I just didn't understand what was going on at the time. 01:57:21 And regexp-split is great if I was splitting based on a pattern. It's just a delimiter though, a fixed sequence of characters. 01:57:43 fwiw, it is better to stick with the string form when you require files relative to the requiring file. If you look at the plt sources you'll see that almost all such references uses the string form. 01:57:59 Though it would be possible to abstract out the test function, so you could use either strings or regexps. 01:58:05 You mean that you want regexp-split based on a string as the delimiting token? 01:58:08 eli: Yes I can see that thanks. 01:58:32 You mean that you want regexp-split based on a string as the delimiting token? 01:58:41 A string is the delimiting token, yes. 01:58:43 rudybot: eval (regexp-split (regexp (regexp-quote "*")) "foo*bar*baz") 01:58:44 eli: ; Value: ("foo" "bar" "baz") 01:58:52 like that? 01:59:27 Yes, _like_ that. 01:59:47 Is there anything still missing from that? 02:00:04 errordeveloper [n=errordev@78-86-1-110.zone2.bethere.co.uk] has joined #scheme 02:00:20 Far the contrary. 02:00:51 [I don't understand if that's what you're looking for, or is it something else...] 02:01:57 I'm looking for a way to separate a line off from the front of a string, where "line" is some sequence of characters ending in a delimiter. 02:02:56 So, just `car' of the above, right? 02:03:16 Sure. 02:03:23 Unless you really care about efficiency and don't want those extra matches. 02:04:03 rudybot: eval (cadr (regexp-match (string-append "^(.*?)" (regexp-quote "*")) "foo*bar*baz")) 02:04:03 eli: ; Value: "foo" 02:04:12 That's the more efficent version. 02:04:45 I'm just curious about the internal workings of a scheme interpreter, it's not an attempt of premature optimization: How efficient is eval? Ie, say I've got a list of functions, would eval be considerably slower than running the list through a lambda? 02:04:57 -!- mercurycc [n=mercuryc@129-97-115-184.uwaterloo.ca] has quit [""] 02:05:13 Debolaz: What's "running a list through a lambda"? 02:05:39 *Debolaz* notes his native language isn't english, hence weird formulations. 02:05:45 error_developer_ [n=errordev@78-86-1-110.zone2.bethere.co.uk] has joined #scheme 02:06:27 Debolaz: you can be more precise regardless of your native language. 02:06:56 *eli* notes that his native language is even farther away 02:07:03 (from English) 02:07:41 I don't want those extra matches. 02:07:56 -!- felipe [n=felipe@my.nada.kth.se] has quit [Client Quit] 02:08:02 Efficiency would be nice too though, yes. I don't like kitchen sink solutions. 02:08:21 synx: see the last example I posted, it doesn't do them. 02:08:29 ((lambda () (display "Hello world!"))) vs (eval '(display "Hello world!)) 02:09:09 Debolaz: in most compilers the first form will be much more efficient. 02:09:27 I'll just do a substring based on the index returned from string-contains 02:09:45 synx: And why would you do that? 02:09:48 -!- emma [n=emma@unaffiliated/emma] has quit [Remote closed the connection] 02:10:01 Because that's what I'm trying to do. 02:10:39 synx: did you look at my last example? 02:11:04 It's doing exactly what you want, and is very likely to be faster. 02:11:41 -!- hadronzoo [n=hadronzo@ppp-70-247-160-133.dsl.rcsntx.swbell.net] has quit [] 02:12:01 vorpal [n=rhunter@pdpc/supporter/student/vorpal] has joined #scheme 02:12:14 jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has joined #scheme 02:12:40 It's splitting at least 3 times in your example, and the creation (and tossing out) of those extra 2 substrings has got to be relatively significant. 02:13:24 CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has joined #scheme 02:13:24 synx: I'm talking about the *last* example 02:13:27 This one: 02:13:28 rudybot: eval (cadr (regexp-match (string-append "^(.*?)" (regexp-quote "*")) "foo*bar*baz")) 02:13:28 eli: ; Value: "foo" 02:13:41 Plus the compilation of a regexp itself takes time. It's just already so fast with substring and string-index it'd be hard to beat. 02:13:45 eli: Interesting. Thank you. 02:14:15 Yes, well it splits them all up, and then eventually garbage collects "bar" and "baz" 02:14:34 synx: no! It doesn't split it all up. 02:14:35 It's correct, but I think Occam would have a few things to say about it. 02:15:38 First of all, regexp compilation is usually neglegible compared to the speed you get, especially with regexp-quoted patterns. 02:15:52 Second, the regexp I'm using is simple: 02:15:56 Speed I get from what? 02:16:13 speed you get from using a regexp rather than comparing char-by-char yourself. 02:16:23 A regexp match isn't going to be any faster than string-contains. 02:16:45 And how did you reach *that* conclusion? 02:16:46 You're saying string-contains doesn't do that in asm, but regexp does? 02:17:14 It's a sequence of characters anyway. A regexp has to compare char-by-char, it just pipes them in through a little FSM. 02:17:54 -!- errordeveloper [n=errordev@78-86-1-110.zone2.bethere.co.uk] has quit [Connection timed out] 02:17:55 But that's done by some tight C code. 02:18:10 And string-contains is not. 02:18:50 *arcfide* tries to catch up. 02:19:00 arcfide: don't bother :| 02:19:10 No, `string-contains' is implemented in Scheme -- and it's even a relatively portable Scheme at that, which makes it even slower. 02:19:28 Ah okie. I'll use regexp then. 02:19:36 But what's the point, just measure the two versions yourself. 02:19:56 *eli* seconds offby1 02:20:04 I'd rather not. 02:20:13 hee 02:20:35 I so hate infinite loops when I can't see what causes them 02:20:37 ): 02:20:39 Why? If you want speed, you need to work for it. 02:21:04 And if you don't care *that* much about the speed, then you should use the `regexp-split' version in the first place. 02:21:08 *offby1* ties qebab's head to his tail 02:21:39 saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 02:21:40 [And BTW, Occam would be much happier with the regexp-split version -- it's a simpler construct that is more useful.] 02:21:51 I only need the first match though, not all the others just yet... I'll have to buffer them up I guess. 02:22:14 Occam wouldn't be happy with a complex implementation for a simple result. 02:22:47 Hehehe. 02:22:49 eli: _I_ knew William of Occam, and believe me, you're no William of Occam. 02:23:01 No, Occam will be happy with a simple functionality -- in CS, visible functionality = interface definition = explanation. 02:23:47 offby1: It's Haden of Haden Industries. Blame him. 02:23:52 No, if a simpler solution exists, I dare say he'd prefer it. 02:23:56 eli, REGEXP-MATCH isn't written in Scheme? 02:24:17 s/Haden/Hadden/ 02:24:21 eli, I assume that we're talking about PLT here? 02:24:33 arcfide: No, and yes, respectively. 02:24:39 Huh. 02:24:42 Curious. 02:25:15 -!- saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Client Quit] 02:25:35 -!- arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has quit ["Restart"] 02:25:54 cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has joined #scheme 02:28:33 emma [n=emma@unaffiliated/emma] has joined #scheme 02:29:08 arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has joined #scheme 02:30:35 -!- melito [n=melito@70.99.250.82] has quit ["Leaving..."] 02:31:33 saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 02:38:44 -!- arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has quit ["Restart"] 02:39:24 hml [n=x@unaffiliated/hml] has joined #scheme 02:42:44 ChibaPet [n=ChibaPet@c-24-218-210-5.hsd1.ma.comcast.net] has joined #scheme 02:44:03 -!- cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has quit [] 02:44:28 Hey all. I was wondering: Is Gambit/Termite limited to executing on a single core on systems where there are multiple cores available? Or does it do something to take advantage of multiple cores, like mapping multiple Termite lightweight threads to multiple OS threads? And... Does PLT have anything similar? 02:44:36 Is there a list that keeps track of its length, so you don't have to count it all the time? 02:44:50 schme [n=marcus@c83-249-231-47.bredband.comhem.se] has joined #scheme 02:45:40 ChibaPet: Two processes communicating over a socket can take advantage of multiple cores, no matter what language it is. 02:46:03 My impression was that Termite message-passing wasn't socket-based. I might be wrong. 02:46:23 ChibaPet: PLT does not use multiple OS threads at the moment; there is work done on getting such functionality in, but it will not be in the form of the current threads. 02:46:40 huh 02:46:50 *offby1* wonders what it'll look like 02:47:21 synx: (a) a vector, (b) use your own length+list struct, (c) keep in mind that counting lengths of lists is often much faster than you think it is. 02:47:41 offby1: Some of that code is already in -- look for `places'. 02:47:54 huh 02:47:56 *offby1* does so 02:48:01 Heh, yeah. It's just cycling through a few dozen pointers after all. 02:48:17 I would like to learn about more random access type lists though, and vectors seems to be uh.. it. 02:48:21 offby1: src/mzscheme/src/places.c 02:48:52 mm hmm 02:48:58 synx: In that case, you shouldn't worry about it. You need some substantially-sized list to have it pay off. 02:49:16 And yes, random-access lists are called vectors in Scheme... 02:50:15 Hmm, how do I get circular-list in DrScheme? I've selected Pretty big, but it doesn't seem to be there. 02:50:24 wastrel [n=wastrel@nylug/member/wastrel] has joined #scheme 02:50:26 rudybot: eval (circular-list 1 2 3) 02:50:26 offby1: error: reference to undefined identifier: circular-list 02:50:30 hmm 02:50:56 rudybot: eval (begin (require srfi/1) (circular-list 1 2 3)) 02:50:56 offby1: ; Value: #0=(1 2 3 . #0#) 02:51:02 Debolaz: voilą 02:51:06 rudybot: eval (shared ([a (cons 1 a)]) a) 02:51:06 eli: ; Value: #0=(1 . #0#) 02:51:13 Debolaz: voilą 02:51:21 I'll voilą your voilą. 02:51:27 rudybot: eval (shared ([a (list* 1 2 3 a)]) a) 02:51:27 eli: ; Value: (1 2 3 . #) 02:51:31 Bah. 02:51:34 I actually use circular lists here and there 02:51:43 -!- ChibaPet [n=ChibaPet@c-24-218-210-5.hsd1.ma.comcast.net] has left #scheme 02:51:44 offby1,eli: Thank you. 02:51:46 handy for the rotors in my enigma thingy 02:51:56 what with them being circular rotors 'n' all. 02:52:22 eli: what determines when I can write a require spec with no quotes, and a slash, as in srfi/1? 02:52:42 (lib "foo.ss" "blatz") => blatz/foo ? 02:53:24 offby1: 1. (lib "foo.ss" "blatz") is kept for compatibility; (lib "blatz/foo.ss") should be used now. 02:53:50 but not blatz/foo ? 02:53:58 Hmm: require: unknown module: srfi/1 02:54:06 rudybot: eval (banner) 02:54:06 offby1: ; Value: "Welcome to MzScheme v4.1.1 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.\n" 02:54:09 offby1: 2. (require (lib "blatz/foo.ss")) can be replaces with (require blatz/foo) 02:54:13 -!- mrtsunami [n=tsunami@adsl-157-137-22.cae.bellsouth.net] has quit [Read error: 113 (No route to host)] 02:54:15 (replaced) 02:54:18 mm hmm 02:54:44 2a. You can do this for any library in the usual collection tree, as long as the filename ends with a .ss 02:54:47 and (require (lib "fee/fi/fo/fum.ss" )) => (require fee/fi/fo/fum) etc ? 02:54:51 Yes. 02:54:54 gotcha 02:55:15 3. You should use (require "foo/bar/baz.ss") for a relative file -- which is the same as always. 02:55:54 Do I need to select something in DrScheme to be allowed to require srfi/1? 02:56:12 Debolaz: Which version are you using? 02:56:19 grettke [n=grettke@CPE-65-31-132-59.wi.res.rr.com] has joined #scheme 02:56:51 eli: 372 02:57:21 oow 02:57:29 *offby1* makes the "lookit the old guy" hand motion 02:57:40 Gerroff his lawn, offby1. 02:57:50 Debolaz: in your case it'd have to be (require (lib "1.ss" "srfi")), as mentioned above 02:57:50 Then you need (require (lib "1.ss" "srfi")), but it's better to upgrade. 02:57:53 damned kids 02:57:58 *offby1* looks around for mbishop 02:58:13 *offby1* throws his dentures at where mbishop had been sitting 02:58:18 eli: I kind of just used what I found packaged for my operating system. (Ie, Ubuntu) 02:58:51 Debolaz: wow, they are indeed behind 02:59:08 Debolaz: we have installers for Ubuntu (at the usual download pages), you can use them. 02:59:12 Debolaz: the "Igneous Idiatrod" beta has 4.0 though. 02:59:54 Ubuntu 12.03: "Ungrateful Ungulate" 03:00:17 Debolaz: and you don't need to worry about not using the package system, just don't use the "unix-style" installation (when it asks), and you will get the whole thing in a single directory that you can later remove. 03:00:54 eli: About that, is there any particular reason why it isn't distributed as a package? 03:01:04 but it is! 03:01:19 Debolaz: define "package"...? 03:01:19 Debian and Ubuntu distributes .debs ... 03:01:26 eli: .deb 03:01:42 gods... how hard could it be to convert a stream of byte strings into a stream of lines. It kills my brain every time I have to do this. 03:01:42 Debolaz: you mean: why don't the PLT folks themselves generate .debs and .rpms and what-have-yous. 03:02:02 synx: I'd call 'read-line' on it and be done with it 03:02:20 offby1: Yes. Many actually does that you know. 03:02:24 it might even let you choose the record limiter 03:02:27 I can't do that sorry. 03:02:38 Debolaz: eli will weigh in I'm sure, but my guess is: it's too much work. 03:02:51 offby1: If one goes through the trouble of making an installer specifically for ubuntu, it just seems a bit weird. 03:03:00 I have the greatest enthusiasm for this mission 03:03:04 -!- hml [n=x@unaffiliated/hml] has quit ["leaving"] 03:03:08 Debolaz: Well, we have our build process that works very well, on several very different platforms. A .deb (and a .rpm) requires running a different build process that is part of the package specs -- and that'll make things too expensive. 03:03:14 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 03:03:23 eli: Very well. 03:03:31 has anyone used lizorkin's sxpath library? 03:03:59 Debolaz: I've considered making "bogus" .deb and .rpm files -- ones that I create directly from a compiled directory -- but that's considered wrong for multiple reasons, which is why I never went on with it. 03:03:59 Return the first element of ( the list of lines we had last unless it's too small then (append more lines read off the socket plus what's left of our last line (which wasn't finished), making sure we have enough lines read from there otherwise wait) but chop off the last element since it was absorbed into the next lines) 03:04:04 It's like the worst algorithm evar 03:04:19 jonrafkind: as opposed to the PLT packaging of it? 03:04:28 where is it in PLT? 03:04:37 You mean planet? 03:04:40 PLaneT I think 03:04:41 yeah 03:04:44 yea, Im using the planet one 03:04:51 there is virtually no documentation that I can find of it 03:04:55 so its a bit hard to use.. 03:05:02 synx: can you describe what you actually need? It sounds like it can be done very easily. 03:05:03 all I ever do with it is very simple stuff 03:05:08 -!- vorpal [n=rhunter@pdpc/supporter/student/vorpal] has quit ["The incensed priests...continued to raise their voices, vituperating each other in bad Latin"] 03:05:09 can you show me some examples 03:05:14 Im just doing simple stuff too 03:05:27 eli: I'm trying to turn a stream of byte strings into a stream of lines, formed from the concatenation of said byte streams. 03:05:30 AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has joined #scheme 03:05:55 synx: what do you mean by "a stream of byte strings"? 03:06:05 ...currently just trying to implement the "read one line" function without worrying about stream semantics at the moment. 03:06:19 GreyLensma1 [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 03:06:20 synx: what do you mean by "a stream of byte strings"? 03:06:28 -!- GreyLensma1 [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has left #scheme 03:06:33 I mean something that produces a byte string, then some time later produces another byte string, and eventually stops producing. 03:06:48 Currently it's a function with side effects... easy enough to turn into a stream though. 03:06:55 is that any different from something that produces a byte or two every now and then? 03:07:03 sm [n=sm@pool-71-104-90-51.lsanca.dsl-w.verizon.net] has joined #scheme 03:07:03 i.e., and ordinary input port? 03:07:13 s/and/an/ 03:07:21 synx: OK, and that function is not producing these bytes from a given port? 03:07:28 Sure, it collects the bytes into groups for efficiency. 03:07:40 It's collecting them from a given port. 03:07:57 synx: so why can't you just use (read-line )? 03:08:01 *nod 03:08:11 Because it blocks. 03:08:29 And is that a problem? 03:08:59 When you're writing an asynchronous event framework, yeah. 03:09:30 .oO("Don't be a cat squandering the popcorn"?) 03:09:51 offby1: I didn't get that either. 03:10:32 synx: I still don't see why it's a problem -- assuming that you have some code that needs to operate on a whole line, that code will need to wait for such a line to be read anyway. 03:11:29 Sure that code will wait, but I want to handle other events while it's waiting. 03:11:35 ...that's the point of the whole async thing. 03:12:01 sounds like a job for ... 03:12:04 *offby1* glances around nervously ... 03:12:06 THREADS! 03:12:08 there, I said it. 03:12:12 I actually feel better now. 03:12:34 synx: in that case make the code in question (the code that needs the line) run in a thread. The `read-line' that it will do *will* block, but only the thread that waits for it, and the rest of the system will continue running happily. 03:12:56 I don't need to copy the entire stack. I was just going to use a continuation, not a whole thread. 03:13:24 I didn't say "copy the stack", i said "run a thread". 03:13:40 (And offby1 said that too...) 03:13:42 Well, at least in plt every thread has a separate copy of the stack. 03:13:48 synx: you have got to get your panties out of a wad about that massive 27K expense. 03:14:06 Yeah, I can't surpass the c10k problem with that on my head! 03:14:39 Plus not every network computer is going to have 400MB of spare memory. 03:15:37 synx: each thread will have it's own stack. But I still don't see your problem -- you seem to be heading down some very convoluted solution just to avoid that "overhead", and I won't be surprised if your solution will cost more in the end. 03:16:04 (Plus, you're risking making the late mr Occam turn in it's grave several thousand degrees.) 03:16:27 I would be surprised. But that's why I haven't given up yet. :) 03:16:39 synx: Are you saying that you need 14000 threads?? 03:16:52 I might be saying that, yes. 03:16:59 The way to address the C10K problem is not to spin off one thread for each potential client. Nowhere are threads free. 27K is not an unreasonable overhead per thread. 03:17:17 synx: Are you planning to have 14000 ports open? 03:18:01 No, 14000 clients at once. And again, if I (read-line) on one client, all the others will be blocked if I don't use one thread per client. 03:18:58 ...or if I continue back to the main event loop, which seems much nicer in my opinion. 03:19:20 If you're planning to have 14000 clients (for some server, I assume), then you'll have 14000 open input ports, and 14000 output ports. The 400MB is *not* going to be your biggest problem. 03:20:45 Oh, yeah okay. 03:20:49 I don't think that's an unreasonable amount of ports... there are somewhere around 65K available after all, maybe more nowadays. 03:21:17 And that's duplex sockets, not ports. 03:21:30 Still, the 27kb/thread is *not* going to be your main problem. 03:22:17 Is this a practical issue, or just making a point? -- I can't imagine what kind of server needs to deal with 14k simultaneous connections, not even Google servers. 03:23:04 Google has like a server farm so they can spread out their ports really nicely. 03:23:29 Right, and most massive services will do the same -- that's the *sane* thing to do. 03:23:42 I'm just making an async event framework, nothing more than that. 03:24:05 async io, right? 03:24:10 If you're planning to run 14k simultaneous connections for some service, then a 400MB machine is not going to be your problem. 03:24:36 You realize that an asynchronous event framework is often just a way to express multiple threads of control clumsily, right? 03:24:51 synx: I really fail to see why you're trying to make an "async event framework" in PLT Scheme, which already has that -- in a very nice way. 03:25:03 (And much more.) 03:25:19 The loop that you're writing using PLT events already happens at a lower level, so that you can use higher-level events where they are useful and just use threads where your program doesn't revolve around a multiplexed event loop. 03:25:25 It does? Where's that? ._. 03:25:33 There we go, an updated plt in ~/plt :) 03:25:54 Riastradh: What was the example you had of an unhygienic macro that vanilla explicit renaming couldn't do? 03:26:05 I saw something in the GUI about asynchronous events. It didn't do network stuff though. 03:26:06 This? http://docs.plt-scheme.org/reference/async-channel.html 03:26:09 mred I mean. 03:26:48 No, that's just a queue I think. Isn't doing any event loop while blocking. 03:27:00 foof, any macro that introduces identifiers for the user of the macro. If the macro is used in the expansion of another macro, then the expansion should be able to refer to those inserted identifiers, which should not leak into the user of the second macro unless the second macro specifies it. 03:27:04 synx: the GUI events are not what you need. 03:27:31 synx, I'm talking about the `events' that you already fiddled with the other day or the other week, such as the alarm events, with SYNC and CHOOSE and friends. 03:27:38 synx: The point (that several other people suggested in different ways), is that you *don't* need to write an event-loop. 03:27:46 -!- synthase [n=synthase@68.63.20.12] has quit [Read error: 110 (Connection timed out)] 03:28:03 felipe [n=felipe@my.nada.kth.se] has joined #scheme 03:28:03 Your code will be an order of magnitude simpler, and Occam will rest in peace. 03:28:24 Those, and the thread system, do have an event loop underlying them, precisely because most programs aren't actually about the event loop. 03:28:42 tizoc_ [n=user@r190-135-15-165.dialup.adsl.anteldata.net.uy] has joined #scheme 03:28:50 Riastradh I'm using that sync loop, not anything more fundamental than that. 03:29:57 synx: `sync' should be something that you'd use very rarely. In your case it certainly sounds like you don't need it. (More specifically, it sounds like you're trying to re-implement things that PLT already has.) 03:30:44 -!- zbigniew_ is now known as zbigniew 03:31:09 If it does I haven't seen it. I'm trying to implement a async event framework, and provide ways to continue into the main loop so that functions can appear to block, while events are still being handled. 03:31:51 Threads do that, but copy the stack instead of just saving a continuation. Haven't seen anything else really. 03:32:53 A continuation is much closer to "copy the stack" than threads. In fact, a thread will not really copy the stack but will use its own stack (with some initial prefix that is copied). 03:33:15 In fact, most implementations of call/cc do just that -- copy the stack. 03:33:31 I thought continuations just saved the point they are in the stack. 03:33:57 So threads don't copy the stack? Where did the 27K come from then? 03:34:54 I don't know, and I don't care. I certainly wouldn't care if I were you. First of all get some code that is working, and then try to look into places to optimize. 03:35:27 And the way it sounds now, I can safely bet large sums of money that whatever it is you're doing, I can do the same in a fraction of the code size. 03:35:50 But will it gobble up memory. 03:36:22 Do you *know* that it does? -- Did you try it? 03:36:44 Well I have hardly got my stuff working so, hard to say! 03:37:02 In fact I could do that, hm... well let's try something. 03:37:39 I'm completely serious about my suggestion. If I'm correct, then you can do what you want to do in a very small amount of code -- I'd definitely do that first. 03:38:07 If it later turns out that you use too much memory, and you really need to cut down on that, *then* you should start optimizing things away. 03:39:13 And even if you have to do that (which is a question), you will end up with better code -- since the high-level code will be there, the "async event framework" is something that you already know how you want to use -- in other words, the interface will already be there. 03:40:20 synthasee [n=synthase@68.63.20.12] has joined #scheme 03:43:52 *Debolaz* stares at ((eval (append (list 'lambda '(rest)) (zip (list (lambda (x) (display x))) (circular-list 'rest)))) "Hello world!\n") 03:44:35 -!- tizoc [n=user@r190-135-28-91.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 03:45:19 -!- grettke [n=grettke@CPE-65-31-132-59.wi.res.rr.com] has quit [] 03:46:17 -!- bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has quit [Client Quit] 03:47:01 hadronzoo [n=hadronzo@ppp-70-247-160-133.dsl.rcsntx.swbell.net] has joined #scheme 03:47:20 Apparantly a simple thread example connecting 12000 times uses 300 megabytes of memory, whereas my little echo server uses like 60K to serve that. 03:47:43 Again it's just a stress test, but... 03:47:46 -!- tizoc_ is now known as tizoc 03:48:13 *eli* rolls his eyes 03:49:33 synx: your little echo server is not launching 12000 threads. 03:49:49 No it's not. 03:58:12 -!- gweiqi [n=greg@69.120.126.163] has left #scheme 04:07:34 oh wel, I just used xslt to do my xml transformation 04:10:00 Ah I figured why it wasn't overloading the server. File descriptor limits heh. 04:10:21 tjafk2 [n=timj@e176212105.adsl.alicedsl.de] has joined #scheme 04:11:15 -!- MichaelRaskin_ [n=raskin@gwh-1-177-mytn23k1.ln.rinet.ru] has quit [Read error: 113 (No route to host)] 04:23:07 -!- wastrel [n=wastrel@nylug/member/wastrel] has quit ["bedtime"] 04:26:02 synx, I have a continuation based tasking system (coroutines). It switches on fuel exhaustion or when non-blocking socket I/O gives an EAGAIN. A thread / task is suspended until a socket has input via EPOLL. Nonblocking socket IO appears as a standard R6RS port. Linux/Larceny only. Works but unpolished. 04:27:24 -!- tjafk1 [n=timj@e176220058.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 04:27:46 Sounds nifty! 04:28:33 They say the best way to understand something is to implement it. 04:29:08 Well your welcome to look at... 04:29:53 Its what I use for http://www.knozama.com/books?terms=scheme+language+programming 04:31:35 -!- vasa [n=vasa@mm-26-89-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 04:31:58 My little continuation thing, and regular plt threads both seem to jutter to a halt somewhere around 3000 simultaneous connections. Hmm... 04:35:02 Never really pushed mine because I know I have some hotspots. e.g. I keep rebuild the EPOLL fd set on every check for available I/O etc. But it could be fixed. Got some O(n) lists that should be maps ... 04:35:52 vorpal [n=rhunter@pdpc/supporter/student/vorpal] has joined #scheme 04:36:24 zonk! 04:36:37 speaking of zonk, I just fired up a 2ce instance. 04:38:40 synx, well if its of any interest ... http://github.com/GreyLensman/rl3/tree/master/rl3/concurrency 04:38:54 Thank you. 04:40:20 -!- offby1 [n=user@q-static-138-125.avvanta.com] has quit [Remote closed the connection] 04:41:25 cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has joined #scheme 04:42:07 peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 04:42:29 -!- sjamaan [n=sjamaan@frohike-old.xs4all.nl] has quit [Remote closed the connection] 04:42:40 sjamaan [n=sjamaan@frohike-old.xs4all.nl] has joined #scheme 04:43:00 offby1 [n=user@q-static-138-125.avvanta.com] has joined #scheme 04:47:25 Dawgmatix [n=dawgmati@207-237-30-94.c3-0.avec-ubr11.nyr-avec.ny.cable.rcn.com] has joined #scheme 04:48:25 peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 04:48:45 aiur [n=Jan@218.109.66.37] has joined #scheme 04:48:46 -!- Dawgmatix [n=dawgmati@207-237-30-94.c3-0.avec-ubr11.nyr-avec.ny.cable.rcn.com] has quit [Client Quit] 04:50:26 -!- peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Read error: 60 (Operation timed out)] 04:54:46 how is the fact that the S&P 500 is 37% below its 52 week high affecting the Scheme community? 04:55:37 -!- eno__ [n=eno@adsl-70-137-151-163.dsl.snfc21.sbcglobal.net] has quit ["leaving"] 04:55:51 Half of us have jumped out of tall buildings, the rest are drowning their sorrows in uncharacteristically cheap whiskey. 04:56:02 haha 04:56:17 I would imagine that the Scheme crew generally drinks only the good stuff 04:56:29 there is always "cool aid" when things get really bad 04:56:44 koolaid gets a bad rep. it was flavouraid at jonestown. 04:56:59 totally different beverage. 04:57:43 so I watched a video about Clojure the other day. That is some interesting memory model going on there 04:58:15 like having all the memory data in a PostgreSQL database 05:00:50 *elf* thinks sql is overrated. 05:01:17 *elf* ponders jumping out of a tall building into a pool of cheap whiskey. 05:01:21 *elf* doesnt like whiskey. 05:02:31 Clojure doesn't use the SQL part. It is the transactional memory part that is borrowed and interesting 05:03:44 Relational DBs, with relational query DSLs are pretty cool. Shame of it is there only a couple of tiny ones out there to play with. 05:11:44 -!- cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has quit [] 05:13:27 I don't like SQL. Need a better query language. Relational databases are kind of neat, though good luck making a many-to-many relationship fast. 05:15:17 I'm past 8192 connections... wondering if I can get past 10K heh. It's slowing down though. 05:18:17 Woo, past 10K and the server is still responding. 05:18:31 xerox [n=xerox@unaffiliated/xerox] has joined #scheme 05:18:33 Best echo server evar 05:18:35 -!- annodomini_ [n=lambda@wikipedia/lambda] has quit [] 05:19:09 -!- futilius [n=will@user-0c9hfll.cable.mindspring.com] has quit [Read error: 104 (Connection reset by peer)] 05:21:55 -!- vorpal [n=rhunter@pdpc/supporter/student/vorpal] has quit ["The incensed priests...continued to raise their voices, vituperating each other in bad Latin"] 05:23:11 Sort of like being the best one legged hopping dude in an Olympic Marathon. 05:23:21 eno [n=eno@nslu2-linux/eno] has joined #scheme 05:24:47 There was a marathon near here recently. I've never seen so many people out of their cars. 05:28:24 Yay threaded echo server also is >10K and still responding. 05:29:09 Didn't take as long to accept all those connections either. Looks like around 120% the memory signature. 05:32:35 annodomini [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 05:35:29 peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 05:37:52 -!- peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Read error: 110 (Connection timed out)] 05:39:59 -!- peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Client Quit] 05:42:11 -!- sjamaan [n=sjamaan@frohike-old.xs4all.nl] has quit [Remote closed the connection] 05:42:20 xhanjian [n=Jan@218.109.76.145] has joined #scheme 05:42:22 sjamaan [n=sjamaan@frohike-old.xs4all.nl] has joined #scheme 05:49:52 -!- delamarche [n=delamarc@dsl-67-212-16-62.acanac.net] has quit [Read error: 104 (Connection reset by peer)] 05:50:17 -!- xerox [n=xerox@unaffiliated/xerox] has quit [] 05:54:36 -!- aiur [n=Jan@218.109.66.37] has quit [Read error: 110 (Connection timed out)] 05:59:03 mmc1 [n=gvtk86@217.147.104.33] has joined #scheme 05:59:54 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 06:05:52 ecraven [n=nex@140.78.42.103] has joined #scheme 06:06:30 is append capable of taking more than two arguments? 06:07:25 rudybot: eval (append '(well) '(lets) '(see)) 06:07:26 klutometis: ; Value: (well lets see) 06:07:45 cool 06:08:16 hmm i'm having an issue but i'm still gonna keep looking at it, i think i need to figure out a point to stop at, right now it never pops up 06:08:24 synx: what did you modify to go 10k+? 06:08:39 NaNO2x: recursion issue? 06:08:43 yeah 06:09:09 i'm recursing along trees that have ((a * b) + (c / d)) 06:09:19 and i can get to the bottom 06:09:25 i'm just not having a good case to pop back 06:10:03 what are your base cases? 06:10:10 none :P 06:10:19 thus why i haven't actually posted here asking questions 06:10:32 *aspect* suggests The Little Schemer to NaNO2x 06:10:33 I was having trouble with the client honestly. I ended up running 10 clients with tiny nonblocking C programs connecting at 1024 each. 06:11:11 Then a couple more sockets with netcat 06:11:55 hml [n=x@unaffiliated/hml] has joined #scheme 06:21:57 qrkz [n=martink@c-40c070d5.010-54-6f72652.cust.bredbandsbolaget.se] has joined #scheme 06:22:11 -!- qrkz [n=martink@c-40c070d5.010-54-6f72652.cust.bredbandsbolaget.se] has left #scheme 06:23:15 darx_ [n=darx@82-37-17-145.cable.ubr03.wolv.blueyonder.co.uk] has joined #scheme 06:23:34 -!- darx [n=darx@82-37-17-145.cable.ubr03.wolv.blueyonder.co.uk] has quit [Read error: 110 (Connection timed out)] 06:29:01 woah 06:29:03 is the site down? 06:30:55 -!- hml [n=x@unaffiliated/hml] has quit ["leaving"] 06:34:20 attila_lendvai [n=ati@catv-89-133-170-239.catv.broadband.hu] has joined #scheme 06:35:13 -!- CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has quit [Connection timed out] 06:41:14 yo klutometis wanna take a look at something ;) 06:46:59 NaNO2x: sure 06:47:39 well since lisp.org seems to be down.... 06:48:24 http://rafb.net/p/2Fr3TR57.html 06:52:07 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 06:54:40 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 06:58:11 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 07:06:04 -!- GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has quit ["Leaving"] 07:08:04 -!- raikov [n=igr@203.181.243.11] has quit [Remote closed the connection] 07:10:11 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 07:12:13 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 07:23:08 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 07:24:12 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 07:29:29 synthase [n=synthase@68.63.20.12] has joined #scheme 07:38:04 hotblack23 [n=jh@p5B0549C7.dip.t-dialin.net] has joined #scheme 07:38:59 -!- synthasee [n=synthase@68.63.20.12] has quit [Connection timed out] 08:03:13 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 08:04:24 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 08:07:36 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 08:10:31 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 08:14:38 -!- borism [n=boris@195-50-200-6-dsl.krw.estpak.ee] has quit [Read error: 145 (Connection timed out)] 08:15:08 elmex [n=elmex@e180068068.adsl.alicedsl.de] has joined #scheme 08:16:29 Nshag [i=user@Mix-Orleans-106-2-193.w193-248.abo.wanadoo.fr] has joined #scheme 08:19:43 -!- hotblack23 [n=jh@p5B0549C7.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 08:23:37 hml [n=x@unaffiliated/hml] has joined #scheme 08:29:14 -!- grnman [n=grnman@c-76-110-165-179.hsd1.fl.comcast.net] has quit [Read error: 104 (Connection reset by peer)] 08:29:25 grnman [n=grnman@c-76-110-165-179.hsd1.fl.comcast.net] has joined #scheme 08:34:54 papermachine [n=ahoman@61.152.106.169] has joined #scheme 09:10:14 schme_ [n=marcus@c83-249-231-47.bredband.comhem.se] has joined #scheme 09:10:45 klutometis, any ideas? 09:21:32 -!- xhanjian [n=Jan@218.109.76.145] has quit [Client Quit] 09:23:39 -!- schme [n=marcus@c83-249-231-47.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 09:28:27 eren_ [n=eren@d-stu.ibun.edu.tr] has joined #scheme 09:30:00 -!- eren_ [n=eren@d-stu.ibun.edu.tr] has quit [Client Quit] 09:53:10 -!- hml [n=x@unaffiliated/hml] has quit ["leaving"] 09:53:17 hml [n=x@unaffiliated/hml] has joined #scheme 10:26:57 LobsterMan [n=a@host72-50.student.udel.edu] has joined #scheme 10:44:30 -!- hml [n=x@unaffiliated/hml] has quit [Read error: 60 (Operation timed out)] 10:44:36 -!- zbigniew [n=zb@3e8.org] has quit [Read error: 60 (Operation timed out)] 10:44:46 zbigniew [n=zb@3e8.org] has joined #scheme 11:02:20 drdo [n=psykon@167.111.54.77.rev.vodafone.pt] has joined #scheme 11:25:44 aiur [n=Jan@218.109.72.160] has joined #scheme 11:40:03 schumaml [i=c19b5f04@gateway/web/ajax/mibbit.com/x-bf8199c695c63ba8] has joined #scheme 11:41:01 -!- drdo [n=psykon@167.111.54.77.rev.vodafone.pt] has quit [Remote closed the connection] 11:43:56 hey is anyone around who can help me with a pseudo-map type function i'm trying to write? 11:45:54 probably, ask away! 11:46:19 specifically it is with this problem from the sicp book 11:46:20 http://community.schemewiki.org/?sicp-ex-2.22 11:47:23 what's your question about it? 11:47:24 i cannot for the life of me understand why this line at the end of case 1 essentially builds the list backwards 11:47:25 (iter (cdr things) (cons (square (car things)) answer)) 11:47:58 in the upper or the lower example? 11:48:03 upper 11:48:12 did you try to step through it? 11:48:19 it seems like it should make perfect sense that it passes the final elements of 'things' back into iter, then computes the value and appends it to the front of answer 11:48:20 yeah 11:48:20 i.e. you call square-list with '(1 2 3 4) 11:48:36 this calls iter as (iter '(1 2 3 4) '()) 11:48:59 things is '(1 2 3 4), which is not null, so the else-part of the if is used 11:49:19 yeah, so it takes (cdr things) and that gets rid of the 1, to pass '(2 3 4) back into iter 11:49:21 it calls (iter (cdr '(1 2 3 4)) (cons ... '())) 11:49:26 moghar [n=user@unaffiliated/moghar] has joined #scheme 11:49:37 yes, and importantly, it conses the result to the *beginning* of the answer list 11:49:57 in the next step, the result for squaring 2 will be prepended to the result of squaring 1 11:50:31 i thought the order of the arguments denoted which came first? 11:50:45 the args for cons 11:50:56 (cons 1 '(2)) -> '(1 2) 11:51:07 ttmrichter [n=ttmricht@219.140.250.18] has joined #scheme 11:51:22 look at (cons (square (car things)) answer). you put the new squared number *before* the rest of the answers 11:51:38 (that's actually the only thing cons can do, you can't append things to a list with cons, you can only prepend) 11:51:53 *LobsterMan* misses stacks and c++ 11:51:55 lol 11:52:01 hehe, you won't, soon 11:52:06 still makes no sense? 11:52:17 step through it, write down the value of every expression and variable 11:52:25 so instead of starting from the front, i want to try to start from the back of the list? 11:52:47 the usual suggestion is to reverse either the input list, or the answers list at the end 11:53:18 heh...is there an easy way to start at the last element of a list? 11:53:55 instead of passing (cdr things) back to iter, i want to pass all but the last element it would seem 11:55:47 you can try, but there's no easy (and efficient) way to do that 11:56:13 because my assignment is to fix this square-list function 11:57:03 the usual idea is to create the reversed list, then right before returning it reverse it ;) 11:57:55 hehe.....people tell me this whole scheme/recursion business is supposed to be growing on me, but the more i learn the more convoluted and unnecessarily drawn out it all seems 11:57:55 lol 11:58:22 it takes a bit to see the good side ;) but (imho) it is there, and it gets bigger and bigger the more you use it 11:58:35 well i try to keep an open mind :) 11:58:59 wait until you get problems that wouldn't be easier to solve with "normal" languages.. this is not a very good example to make you see the advantages of Scheme 11:59:17 especially since normally you'd just write (map square items) ;) 11:59:36 yeah...we're not supposed to use map for this one 12:00:27 so if i want to call (square-list '(1 2 3)) and have it return '(1 4 9), then i believe this is the 'ideal' sequence of the things and answer lists: 12:00:29 things answer 12:00:29 (1 2 3) () 12:00:29 (2 3) (1) 12:00:29 (3) (1 4) 12:00:29 () (1 4 9) 12:01:26 and i thought i could just take (car things) and then do (cons (square (car things)) answer) and it should add the appropriate digit where it needs to go 12:01:32 but apparently that is not the case 12:02:14 schme [n=marcus@c83-249-231-47.bredband.comhem.se] has joined #scheme 12:02:51 as you see, you append to the *end* of the results list. you can't do that with cons 12:03:04 you need append for that (which is much slower than cons) 12:03:38 if you use append, then your approach would work well (with a bit of tweaking, append expects only lists as parameters) 12:03:48 You can append at the end by recursing non-tail-recursively. 12:06:21 gnomon what do you mean exactly? 12:06:26 that staement seems to contradict itself 12:10:02 besiria [n=user@webspirs.uom.gr] has joined #scheme 12:11:09 well i'm going to go take a shower and think on this a bit, i'll be back shortly :) 12:14:43 -!- schme_ [n=marcus@c83-249-231-47.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 12:18:21 You can recurse without tail recursing. 12:19:22 (define (sum-until n) (if (<= n 0) 0 (+ n (sum-until (- n 1))))) 12:23:55 gigabytes [n=gigabyte@host45-233-dynamic.15-87-r.retail.telecomitalia.it] has joined #scheme 12:26:05 ventonegro [n=user@136.166.1.3] has joined #scheme 12:42:22 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 12:43:13 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 12:47:00 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 12:49:04 bombshelter13 [n=bombshel@net2.senecac.on.ca] has joined #scheme 12:50:43 -!- hadronzoo [n=hadronzo@ppp-70-247-160-133.dsl.rcsntx.swbell.net] has quit [] 12:54:50 annodomini [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 12:56:06 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 12:58:40 cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has joined #scheme 12:59:34 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:00:14 kryptos23 [n=kryptos@freenet/developer/kryptos] has joined #scheme 13:01:59 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:02:16 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 13:03:30 -!- darx_ [n=darx@82-37-17-145.cable.ubr03.wolv.blueyonder.co.uk] has quit [Read error: 110 (Connection timed out)] 13:05:36 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:06:54 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:07:04 -!- gigabytes [n=gigabyte@host45-233-dynamic.15-87-r.retail.telecomitalia.it] has quit [] 13:12:34 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:15:44 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:16:47 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:17:20 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:18:58 annodomini [n=lambda@64.30.3.122] has joined #scheme 13:25:29 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:26:07 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:27:43 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:29:28 -!- sm [n=sm@pool-71-104-90-51.lsanca.dsl-w.verizon.net] has quit [] 13:35:53 -!- bombshelter13 [n=bombshel@net2.senecac.on.ca] has quit [Client Quit] 13:36:13 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:37:06 hemulen [n=hemulen@rrcs-96-10-19-242.se.biz.rr.com] has joined #scheme 13:38:15 which schemes besides Chez support native threading? 13:38:21 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 13:39:21 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:42:18 -!- forcer [n=forcer@e179193062.adsl.alicedsl.de] has quit [Read error: 113 (No route to host)] 13:43:29 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:44:24 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 13:44:29 -!- GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has left #scheme 13:45:08 ray_ [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 13:48:41 paganini123__ [n=chatzill@adsl-223-191-109.mia.bellsouth.net] has joined #scheme 13:48:43 -!- paganini123__ is now known as paganini123 13:51:09 ventonegro: emmm... plt? 13:51:50 rmrfchik: didn't know that, thanks 13:51:59 -!- 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"] 13:52:08 check it.. i'm not sure it's native 13:52:50 cemerick [n=la_mer@75.147.38.122] has joined #scheme 13:54:24 -!- Mr_SpOOn [n=Mr_SpOOn@abdallo.cs.unibo.it] has quit [Read error: 54 (Connection reset by peer)] 13:54:51 -!- besiria [n=user@webspirs.uom.gr] has quit [Remote closed the connection] 13:54:53 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:55:56 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 13:57:42 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 13:59:31 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 14:00:13 leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has joined #scheme 14:00:43 -!- annodomini [n=lambda@wikipedia/lambda] has quit [Read error: 110 (Connection timed out)] 14:03:17 bombshelter13 [n=bombshel@net2.senecac.on.ca] has joined #scheme 14:06:05 annodomini [n=lambda@130.189.179.215] has joined #scheme 14:06:14 -!- paganini123_ [n=chatzill@adsl-10-22-240.mia.bellsouth.net] has quit [Read error: 110 (Connection timed out)] 14:07:15 -!- leppie [n=lolcow@dsl-243-40-84.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 14:08:31 -!- bombshelter13 [n=bombshel@net2.senecac.on.ca] has quit [Client Quit] 14:08:40 bombshelter13 [n=bombshel@net2.senecac.on.ca] has joined #scheme 14:11:08 lolcow [n=lolcow@196-210-170-110-wfor-esr-2.dynamic.isadsl.co.za] has joined #scheme 14:13:58 -!- lolcow [n=lolcow@196-210-170-110-wfor-esr-2.dynamic.isadsl.co.za] has quit [Client Quit] 14:14:01 lolcow [n=lolcow@196-210-170-110-wfor-esr-2.dynamic.isadsl.co.za] has joined #scheme 14:14:37 woohoo new ISP :) 14:14:45 *lolcow* = leppie 14:18:21 -!- ecraven [n=nex@140.78.42.103] has quit ["bbl"] 14:18:49 -!- lolcow is now known as leppie 14:39:42 yhara [n=yhara@84.215.12.221.megaegg.ne.jp] has joined #scheme 14:52:33 -!- jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has quit [Read error: 110 (Connection timed out)] 15:00:12 jcowan [n=jcowan@cpe-74-68-115-13.nyc.res.rr.com] has joined #scheme 15:07:21 peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 15:08:46 *jcowan* unvanishes. 15:09:21 bweaver [n=bweaver@67.161.236.94] has joined #scheme 15:10:15 -!- bweaver [n=bweaver@67.161.236.94] has quit [Read error: 104 (Connection reset by peer)] 15:10:16 bweaver_ [n=bweaver@67.161.236.94] has joined #scheme 15:11:50 -!- schumaml [i=c19b5f04@gateway/web/ajax/mibbit.com/x-bf8199c695c63ba8] has quit ["http://www.mibbit.com ajax IRC Client"] 15:12:12 jlongster [n=user@75.148.111.133] has joined #scheme 15:13:30 jonrafkind [n=jon@wireless156.wireless.utah.edu] has joined #scheme 15:14:50 -!- bombshelter13 [n=bombshel@net2.senecac.on.ca] has quit [Client Quit] 15:19:09 ha, that trick doesn't work on me any more 15:19:15 I _still_ can't see you. 15:26:40 -!- Lemon [n=karl@LEMON.RES.CMU.EDU] has quit [Remote closed the connection] 15:28:24 -!- tizoc [n=user@r190-135-15-165.dialup.adsl.anteldata.net.uy] has quit [Read error: 104 (Connection reset by peer)] 15:28:38 OceanSpray [n=karl@LEMON.RES.CMU.EDU] has joined #scheme 15:29:03 tizoc [n=user@r190-135-8-124.dialup.adsl.anteldata.net.uy] has joined #scheme 15:31:19 -!- minion [n=minion@common-lisp.net] has quit [Remote closed the connection] 15:31:19 -!- lisppaste [n=lisppast@common-lisp.net] has quit [Remote closed the connection] 15:31:19 -!- specbot [n=specbot@common-lisp.net] has quit [Remote closed the connection] 15:33:52 peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 15:35:31 -!- hiyuh [n=hiyuh@KD059133117089.ppp.dion.ne.jp] has quit ["|_ e /\ \/ i |/| G"] 15:42:43 -!- sondermann [n=user@58-226-dsl.kielnet.net] has quit [Read error: 60 (Operation timed out)] 15:42:50 gigabytes [n=gigabyte@host102-233-dynamic.20-79-r.retail.telecomitalia.it] has joined #scheme 15:45:01 lisppaste [n=lisppast@208.72.159.207] has joined #scheme 15:45:42 -!- jlongster [n=user@75.148.111.133] has quit [Remote closed the connection] 15:46:18 minion [n=minion@208.72.159.207] has joined #scheme 15:46:24 specbot [n=specbot@208.72.159.207] has joined #scheme 15:46:46 sondermann [n=user@220-244-dsl.kielnet.net] has joined #scheme 15:46:52 jlongster [n=user@75.148.111.133] has joined #scheme 15:47:25 -!- yhara [n=yhara@84.215.12.221.megaegg.ne.jp] has quit ["Leaving..."] 15:48:23 -!- papermachine [n=ahoman@61.152.106.169] has quit [Read error: 104 (Connection reset by peer)] 15:48:48 -!- peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Read error: 110 (Connection timed out)] 16:03:40 errordeveloper [n=errordev@78-86-1-110.zone2.bethere.co.uk] has joined #scheme 16:11:15 synthasee [n=synthase@68.63.20.12] has joined #scheme 16:13:12 -!- Jarvellis [n=jarv@dsl-217-155-101-22.zen.co.uk] has quit ["Leaving"] 16:14:26 papermachine [n=ahoman@61.152.106.169] has joined #scheme 16:14:53 -!- error_developer_ [n=errordev@78-86-1-110.zone2.bethere.co.uk] has quit [Read error: 110 (Connection timed out)] 16:16:34 anborn [n=anborn@host-78-12-177-134.cust-adsl.tiscali.it] has joined #scheme 16:16:56 peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has joined #scheme 16:21:45 -!- synthase [n=synthase@68.63.20.12] has quit [Read error: 110 (Connection timed out)] 16:23:08 -!- peter_12_ [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [Read error: 110 (Connection timed out)] 16:25:00 -!- peter_12 [n=peter_12@S010600119506b129.gv.shawcable.net] has quit [] 16:27:52 vasa [n=vasa@mm-126-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 16:29:48 -!- cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has quit [Read error: 110 (Connection timed out)] 16:35:37 cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has joined #scheme 16:35:56 langmartin [n=user@75.148.111.133] has joined #scheme 16:37:12 -!- jonrafkind [n=jon@wireless156.wireless.utah.edu] has quit ["Leaving"] 16:37:15 jonrafkind [n=jon@wireless156.wireless.utah.edu] has joined #scheme 16:42:38 -!- gigabytes [n=gigabyte@host102-233-dynamic.20-79-r.retail.telecomitalia.it] has quit [] 16:45:31 -!- jcowan [n=jcowan@cpe-74-68-115-13.nyc.res.rr.com] has left #scheme 16:45:53 -!- bweaver_ [n=bweaver@67.161.236.94] has quit [] 16:51:13 bweaver [n=bweaver@67.161.236.94] has joined #scheme 16:51:42 -!- bweaver [n=bweaver@67.161.236.94] has quit [Client Quit] 16:55:49 -!- vasa [n=vasa@mm-126-93-84-93.dynamic.pppoe.mgts.by] has quit [Read error: 113 (No route to host)] 16:56:06 -!- anborn [n=anborn@host-78-12-177-134.cust-adsl.tiscali.it] has quit ["Leaving"] 16:58:49 bombshelter13 [n=bombshel@net2.senecac.on.ca] has joined #scheme 17:01:13 Jarvellis [n=andrew@dsl-217-155-101-22.zen.co.uk] has joined #scheme 17:04:57 wastrel [n=wastrel@nylug/member/wastrel] has joined #scheme 17:05:38 srauls [n=srauls@89.203.65.15] has joined #scheme 17:11:01 -!- srauls [n=srauls@89.203.65.15] has left #scheme 17:15:59 -!- bombshelter13 [n=bombshel@net2.senecac.on.ca] has quit [Client Quit] 17:17:55 bombshelter13 [n=bombshel@net2.senecac.on.ca] has joined #scheme 17:19:29 -!- aiur [n=Jan@218.109.72.160] has quit [Client Quit] 17:21:50 arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has joined #scheme 17:29:19 -!- OceanSpray [n=karl@LEMON.RES.CMU.EDU] has quit [Read error: 110 (Connection timed out)] 17:31:50 -!- sjamaan [n=sjamaan@frohike-old.xs4all.nl] has quit [Remote closed the connection] 17:31:55 -!- arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has quit ["Leaving"] 17:32:01 sjamaan [n=sjamaan@frohike-old.xs4all.nl] has joined #scheme 17:33:37 CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has joined #scheme 17:36:33 -!- cubix [n=cubix@bas21-toronto12-1279470612.dsl.bell.ca] has quit [] 17:37:19 -!- geckosenator [n=sean@c-24-8-193-190.hsd1.co.comcast.net] has quit ["leaving"] 17:46:36 xerox [n=xerox@unaffiliated/xerox] has joined #scheme 17:47:15 hotblack23 [n=jh@p5B055085.dip.t-dialin.net] has joined #scheme 17:50:19 saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 17:57:26 drdo [n=psykon@167.111.54.77.rev.vodafone.pt] has joined #scheme 17:59:59 tltstc` [n=nine@192.207.69.1] has joined #scheme 18:08:09 gigabytes [n=gigabyte@host102-233-dynamic.20-79-r.retail.telecomitalia.it] has joined #scheme 18:13:19 -!- mmc1 [n=gvtk86@217.147.104.33] has quit [Remote closed the connection] 18:20:54 -!- AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has quit ["foobar"] 18:33:45 Adamant [n=Adamant@unaffiliated/adamant] has joined #scheme 18:46:24 -!- bombshelter13 [n=bombshel@net2.senecac.on.ca] has quit [Client Quit] 18:46:32 hadronzoo [n=hadronzo@ppp-70-247-160-133.dsl.rcsntx.swbell.net] has joined #scheme 18:51:03 -!- moghar [n=user@unaffiliated/moghar] has quit [Remote closed the connection] 18:51:56 jgracin [n=jgracin@82.193.208.195] has joined #scheme 18:57:09 -!- hadronzoo [n=hadronzo@ppp-70-247-160-133.dsl.rcsntx.swbell.net] has quit [] 19:06:29 vasa [n=vasa@mm-126-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 19:12:43 -!- gigabytes [n=gigabyte@host102-233-dynamic.20-79-r.retail.telecomitalia.it] has quit [] 19:14:47 codydh [i=8097e426@gateway/web/ajax/mibbit.com/x-e8ada9d9f821ed63] has joined #scheme 19:14:52 -!- benny [n=benny@i577A10DE.versanet.de] has quit [Connection timed out] 19:15:07 hello! Can anyone tell me if this is valid in scheme? (if (string It's in some premade code I got and I can't tell if my input is wrong or the code is wrong 19:17:54 well, the paren before the "if" needs to be closed 19:18:09 right, that's just the beginning of a set of statements 19:18:14 I'm wondering about the string I'm not sure what you actually mean to be asking, but what you asked isn't communicating what you meant to say. 19:18:37 r5rs string http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_506 19:18:40 -rudybot:#scheme- http://tinyurl.com/4wsej4 19:19:57 -!- sjamaan [n=sjamaan@frohike-old.xs4all.nl] has quit [Remote closed the connection] 19:20:08 sjamaan [n=sjamaan@frohike-old.xs4all.nl] has joined #scheme 19:24:36 Right. 19:24:51 Ok, makes sense. 19:24:52 -!- codydh [i=8097e426@gateway/web/ajax/mibbit.com/x-e8ada9d9f821ed63] has quit ["http://www.mibbit.com ajax IRC Client"] 19:29:28 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [Read error: 104 (Connection reset by peer)] 19:30:08 -!- Nshag [i=user@Mix-Orleans-106-2-193.w193-248.abo.wanadoo.fr] has quit [Read error: 104 (Connection reset by peer)] 19:33:52 puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has joined #scheme 19:37:30 You know, python has cooperative yet kernel level threading, though they don't like to talk about it much. 19:37:51 I wonder if it has any advantages over user level cooperative threading. The kernel threads don't block on socket operations for instance... 19:38:46 But then, in scheme all socket operations are handled behind the scenes by a (sync) loop, in order to prevent threads from blocking on i/o. 19:47:13 Adamant [n=Adamant@c-98-244-152-196.hsd1.ga.comcast.net] has joined #scheme 19:49:01 -!- CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has quit [Remote closed the connection] 19:54:56 -!- ventonegro [n=user@136.166.1.3] has quit ["ERC Version 5.2 (IRC client for Emacs)"] 20:01:29 synx: python moves with 2.6 rather in the forking instead of threading direction. 20:02:09 synx: the problem with cpython threads is that python code cannot run concurrently. 20:02:53 Neither can all cooperative threading systems. They still have advantages. 20:03:24 f/i serving other requests while reading a laggy response from one. 20:04:12 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [Read error: 113 (No route to host)] 20:04:23 I use multiple processes if I want concurrence. 20:06:28 Others try to use preemptive threads for that, with some success... dunno. 20:18:08 -!- Kusanagi [n=Motoko@unaffiliated/kusanagi] has quit [] 20:19:14 Kusanagi [n=Motoko@unaffiliated/kusanagi] has joined #scheme 20:19:58 -!- r0bby [n=wakawaka@guifications/user/r0bby] has quit [Client Quit] 20:21:02 r0bby [n=wakawaka@guifications/user/r0bby] has joined #scheme 20:29:22 CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has joined #scheme 20:36:05 -!- rdd`` [n=rdd@c83-250-142-219.bredband.comhem.se] has quit [Read error: 104 (Connection reset by peer)] 20:45:55 rdd [n=user@c83-250-142-219.bredband.comhem.se] has joined #scheme 20:52:01 bpt [n=bpt@cpe-071-070-209-067.nc.res.rr.com] has joined #scheme 20:56:18 -!- langmartin [n=user@75.148.111.133] has quit [Read error: 60 (Operation timed out)] 21:00:31 -!- vasa [n=vasa@mm-126-93-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 21:01:34 -!- hemulen [n=hemulen@rrcs-96-10-19-242.se.biz.rr.com] has quit [] 21:01:53 eren_ [n=eren@88.253.9.183] has joined #scheme 21:02:24 any schemer have 5 minutes to help out? 21:03:11 eren_: don't ask to ask 21:03:47 I have this project: http://vst.darkfiles.org/pages/cs/courses/2008-2009/comp149/week02/project.php 21:03:49 -rudybot:#scheme- http://tinyurl.com/3zu3wf 21:04:39 what I need is, how to return to animation to start.. like.. circle back in the middle.. or maybe.. is there a way to reset "tick count" in run-simulation? 21:04:49 -!- jgracin [n=jgracin@82.193.208.195] has quit [Remote closed the connection] 21:05:16 lelf [n=Lelf@217.118.90.96] has joined #scheme 21:06:34 -!- cemerick [n=la_mer@75.147.38.122] has quit [] 21:11:17 run-simulation looks like a function that is specific to your programming course, not anything we here would know. You'll have to describe it more fully before anyone can help. 21:12:03 My advice would be you return the animation to start, when you call run-simulation again. Clearly it's not that simple though. 21:12:27 synthase [n=synthase@68.63.20.12] has joined #scheme 21:15:27 I suppose you can just abort the simulation and then run it again 21:15:46 vasa [n=vasa@mm-126-93-84-93.dynamic.pppoe.mgts.by] has joined #scheme 21:15:53 -!- Paraselene__ [n=None@79-68-228-157.dynamic.dsl.as9105.com] has quit [] 21:16:19 yes I can abort it 21:16:45 but the main goal is to achieve the continuous animation...so.. thanks anyways guys.. I'll keep searching 21:17:55 Whatever function you use to set the position of the circle, just (set-position circle 0 0) or whatnot, then continue without aborting. 21:19:54 I should explain the way run-simulation works. it starts a clock at function call and the clock ticks at a given rate (input). the position of the circle is dependent on the tick number. so basically I'm just searching for a way to reset the tick clock but haven't found anything yet 21:21:39 if you want to wrap the ticks around after x steps, you can use the remainder of ticks divided by x 21:22:02 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Read error: 110 (Connection timed out)] 21:22:43 -!- xerox [n=xerox@unaffiliated/xerox] has quit [] 21:23:51 -!- synthasee [n=synthase@68.63.20.12] has quit [Connection timed out] 21:28:40 benny [n=benny@i577A0C9B.versanet.de] has joined #scheme 21:30:56 -!- attila_lendvai [n=ati@catv-89-133-170-239.catv.broadband.hu] has quit [Read error: 110 (Connection timed out)] 21:34:21 anyone arou nd? 21:35:06 No. 21:35:10 figures 21:35:11 :P 21:35:34 anyway, i'm having issues with popping something back up 21:35:47 i keep appending to tmp at the end but i think it returns the wrong tmp or something 21:37:26 NaNO2x pasted "traverse tree" at http://paste.lisp.org/display/68218 21:37:59 append does not modify "tmp". 21:38:31 hmm? 21:38:42 synthasee [n=synthase@68.63.20.12] has joined #scheme 21:38:44 (append tmp (operator expr-tree)) 21:38:51 right 21:38:57 why isn't append modifying tmp? 21:38:59 you construct a list by appending `tmp' to `(operator expr-tree)', and then it is discarded 21:39:03 It doesn't do that. 21:39:10 ah 21:39:16 how can i return tmp back up"? 21:39:48 What is it that you want to be doing with the list you're building? 21:40:02 just pop it back up 21:40:08 pretty much this is an inorder traversal 21:40:29 so at the end i want (traverse '((6 * 3) + (5 - 2))) -> (6 * 3 + 5 - 2) 21:41:04 I'm not sure what "just pop it back up" means. Generally such a traversal should return a new list. 21:41:12 rudybot: eval (let ((tmp '(foo bar))) (append '(baz) tmp) tmp) 21:41:12 Daemmerung: ; Value: (foo bar) 21:41:27 yes, i want it to return a new list made of those items 21:41:40 rudybot: eval (let ((tmp '(foo bar))) (append '(baz) tmp)) 21:41:42 Daemmerung: ; Value: (baz foo bar) 21:41:53 see the difference? 21:42:37 i'm a bit confused 21:42:47 nvm 21:42:48 yeah 21:42:50 i see what you mean 21:43:10 well then what do i do, not have a tmp list? 21:43:15 i mean how can i pop it up? 21:43:43 You don't "pop it up." You return a value that your caller can use. 21:43:43 btw, i'm doing this as a helper method now but later i want to put it into a let if possible 21:44:00 yes, but how do i return that value 21:44:05 pop-up == return in my head 21:44:11 I've already shown you how. 21:45:20 -!- hotblack23 [n=jh@p5B055085.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 21:45:31 umm 21:45:33 i'm not seeing it 21:45:47 Compare the first and second expressions that rudybot eval'd. 21:45:51 yes 21:45:54 but the thing is 21:45:56 perhaps (let ((tmp1 (append tmp (whatever)) ...) 21:46:04 sladegen, thats what i have now 21:46:18 or waht 21:46:22 ugh 21:46:29 where? 21:46:31 nvm 21:46:49 isn't there a way to just tack on a new value to the end of tmp/ 21:47:33 srfi-1 probably has some append! 21:47:47 ... 21:47:49 huh? 21:47:50 NaNO2x: you need to do this the right way. 21:47:54 i know 21:48:09 -!- synthase [n=synthase@68.63.20.12] has quit [Connection timed out] 21:48:15 (that was really aimed more at sladegen than you.) 21:48:15 ok 21:48:31 well look, for what i'm passing into the recursion 21:48:39 i think what you're saying is THAT shouldn't be tmp 21:48:49 because tmp isn't actually modified 21:49:18 NaNO2x, are you trying to evaluate the tree? 21:49:28 what do you mean evaluate? 21:49:39 what is your function supposed to do? it looks like it just returns the tree again 21:49:49 it returns the tree flattened 21:50:04 Daemmerung: i know... but if his mind refuses to work in functional matter. i'm no jesus. 21:50:18 or rather it returns the tree by each of its nodes 21:50:30 s/tt/nn/ 21:50:42 rather leaves, except for the operator which is on each level 21:50:45 oh probably something like (if (list? obj) (append (traverse-helper (car obj)) (traverse-helper (cdar obj)) ...) obj) 21:51:06 sladegen, i need to figure out functional programming eventually 21:51:19 thats what i have 21:51:21 can you edit your paste to show the output you expect 21:51:22 check it 21:51:26 it would be easier to see what you want then 21:51:27 k 21:51:52 timmy_boy [n=hp@71-87-57-97.dhcp.stcd.mn.charter.com] has joined #scheme 21:51:53 Mein [n=jono@75.146.48.206] has joined #scheme 21:51:57 Hey everyone 21:52:18 NaNO2x: do you know how to write the `append' function? 21:52:19 NaNO2x annotated #68218 with "traverse tree" at http://paste.lisp.org/display/68218#1 21:52:34 ok I see 21:52:37 am i doing it wrong? 21:53:06 Just a quick question - can anyone please explain the usage of "eval" to me? 21:53:23 Mein: Do you mean "how to use it", or "why would I use it"? 21:53:28 NaNO2x, I think you want to append the first thing to the operator to the third thing 21:53:30 r5rs eval 21:53:31 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_578 21:53:32 -rudybot:#scheme- http://tinyurl.com/4qfyda 21:53:36 Mein, it evaluates an s-expression 21:53:39 rudybot: SHUT UP 21:53:41 Append takes one or more lists and returns a single list. 21:54:02 rudybot: eval (append '(foo) '(bar) '(mung bean)) 21:54:02 Daemmerung: ; Value: (foo bar mung bean) 21:54:23 Mein, (eval '(+ 1 1)) => 2 21:54:43 Thanks guys 21:54:45 jonrafkind: Not in the Scheme I'm using, it doesn't! 21:55:04 -!- puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has quit ["Konversation terminated!"] 21:55:10 ok, well too bad for you :p 21:55:35 Your Scheme may allow one-argument eval, but in R5RS it is specified to take two arguments. 21:55:48 Yeh 21:55:49 uh hu. thats *so* important to remember 21:55:55 I need two arguments 21:55:58 rudybot: eval (let ((left (lambda () (list 'foo))) (op (lambda () (list 'bar))) (right (lambda () (list 'mung 'bean)))) (append (left) (op) (right))) 21:55:58 Daemmerung: ; Value: (foo bar mung bean) 21:55:59 Well, if someone is asking for usage, it probably is. 21:56:16 Mein: You probably want (scheme-report-environment 5) to be the second environment. 21:56:21 rudybot: eval (eval '(1 2)) 21:56:21 chandler: error: procedure application: expected procedure, given: 1; arguments were: 2 21:56:27 jonrafkind, i tried that it kept crashing 21:56:28 rudybot: eval (eval '(1 2) (scheme-report-environment 5)) 21:56:28 chandler: error: reference to undefined identifier: scheme-report-environment 21:56:48 er 21:56:58 pltisms 21:57:30 rudybot: eval (interaction-environment) 21:57:30 chandler: error: reference to undefined identifier: interaction-environment 21:57:41 I'm pretty sure that rudybot has eval safely sandboxes somehow. 21:57:48 s/es/ed 21:57:59 What kind of retarded implementation is this, anyway? 21:58:22 it's an ircbot... 21:58:32 ...a safely castrated ircbot. 21:58:49 Yeh I'm running R5RS 21:58:52 I'll try that 21:59:11 but one arg evals are "normal" "conveniences" 21:59:25 -!- lelf [n=Lelf@217.118.90.96] has quit ["used jmIrc"] 21:59:34 *sladegen* mumbles: plt, chicken... 21:59:34 NaNO2x, can you paste the code you tried 22:00:19 i figured it out 22:00:23 ;) 22:00:24 oh ok cool 22:00:35 here i'll paste the new version 22:00:50 NaNO2x annotated #68218 with "traverse tree" at http://paste.lisp.org/display/68218#2 22:00:53 Ok it worked 22:00:58 Thanks a lot guys 22:01:18 NaNO2x, ok looks fine 22:01:30 hmm now to make this all without a helper function 22:01:42 well you can put the helper define inside the first one 22:02:14 awesome 22:02:16 figured that out 22:02:16 :P 22:02:21 no 22:02:24 no defines in defines 22:02:27 that's slopy 22:02:38 jon annotated #68218 with "stuff" at http://paste.lisp.org/display/68218#3 22:02:51 why is it sloppy? 22:03:12 it is 22:03:19 because you're touching global too much 22:03:42 what global 22:03:54 a define in another define is local to the first define 22:03:58 thats the whole point 22:04:04 of course, you don't need the extra tmp parameter.. 22:04:38 define is not local 22:04:41 unless yo umean let 22:04:46 but i don't even need a tmp for this 22:04:57 define is local 22:05:04 try putting the second define in the first and then calling the second define 22:05:14 outside the first one 22:05:41 the 'aha' moment 22:06:03 -!- Mein [n=jono@75.146.48.206] has quit [] 22:07:00 :P 22:07:15 anyway, sladegen want to see my fully finished traversals? 22:07:21 and tell me if i'm not doing them the proper way 22:08:34 it looks ok, but i'm hardly a scheme guru. 22:08:47 i mean i've redone it a bit 22:09:12 NaNO2x annotated #68218 with "pre,in,post order" at http://paste.lisp.org/display/68218#4 22:09:19 -!- eren_ [n=eren@88.253.9.183] has quit ["Ex-Chat"] 22:10:19 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 22:11:01 i think i'm doing it the proper functional way right? 22:14:37 seems so... if you want me to be strict you are performing the righ/let-op twice, if they were expesive operations you could consider using a temporary variable... /me goes off to walk a dog. 22:14:52 left-op* 22:14:58 kk 22:17:55 -!- drdo [n=psykon@167.111.54.77.rev.vodafone.pt] has quit [Remote closed the connection] 22:21:59 arcfide [n=arcfide@adsl-99-137-201-22.dsl.bltnin.sbcglobal.net] has joined #scheme 22:24:00 bombshelter13 [n=bombshel@209-161-240-8.dsl.look.ca] has joined #scheme 22:24:44 all right... well this builds onto the next problem 22:24:54 which i must say i'm not quite sure how to go about 22:25:11 and that is evaluation of the list 22:26:17 i think i understand the general idea 22:26:38 drdo [n=psykon@167.111.54.77.rev.vodafone.pt] has joined #scheme 22:26:51 do either a pre/post 22:26:54 Here's a hint: you don't need to call `append'. 22:26:57 then loop/recurse through 22:26:58 :P 22:27:36 But otherwise it's a trivial elaboration of code that you've already written. 22:28:09 well yeah 22:32:45 Adamant [n=Adamant@c-98-244-152-196.hsd1.ga.comcast.net] has joined #scheme 22:36:46 annodomini [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 22:38:17 -!- jlongster [n=user@75.148.111.133] has quit [Read error: 113 (No route to host)] 22:47:01 Adamant_ [n=Adamant@c-98-244-152-196.hsd1.ga.comcast.net] has joined #scheme 22:47:42 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [No route to host] 22:48:43 is append kind of "hacky" 22:49:01 i was trying to use it before, and the lists i was outputting had tons of extra parenthesis 22:49:27 its not a hack. it attaches two lists to each other 22:49:39 although using cons is usually more efficient 22:51:34 is there any way to use append but not pick up all the extra ()'s? heh 22:52:58 can you show an example 22:53:58 -!- r0bby [n=wakawaka@guifications/user/r0bby] has quit [Connection timed out] 22:56:42 a-s [i=root@93.112.71.47] has joined #scheme 23:02:08 hmm 23:02:25 anyone familiar with CSI and SS3 strings when working with terminal escape sequences? 23:04:03 duncanm, whats your question 23:06:50 jonrafkind: pressing the left key generates (27 91 68), but terminfo tells me key-left should be (27 79 68) 23:06:57 cemerick [n=la_mer@24-177-58-26.dhcp.oxfr.ma.charter.com] has joined #scheme 23:07:18 (27 91) is ESC-O, which is 'SS3' 23:07:37 and (27 79) is ESC-[, which is 'CSI' 23:07:40 hm, sorry its beyond my knowledge.. 23:11:37 r0bby [n=wakawaka@guifications/user/r0bby] has joined #scheme 23:12:41 gweiqi [n=greg@69.120.126.163] has joined #scheme 23:16:44 -!- cemerick [n=la_mer@24-177-58-26.dhcp.oxfr.ma.charter.com] has quit [] 23:19:40 annodomini_ [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 23:21:41 -!- elmex [n=elmex@e180068068.adsl.alicedsl.de] has quit [Remote closed the connection] 23:24:10 Does anyone know of a scheme module for generating valid HTML from a scheme syntax? 23:24:32 -!- jonrafkind [n=jon@wireless156.wireless.utah.edu] has quit [Read error: 110 (Connection timed out)] 23:25:58 Like (document (p "hi")) would become "

hi

) ...or something 23:26:18 synx: You probably want something like SXML or MIT's XML library. 23:26:48 synx: If you are using PLT Scheme, then there are probably three or more libraries of that form. 23:27:11 I see a bunch of HTML parsers... 23:31:26 vorpal [n=rhunter@pdpc/supporter/student/vorpal] has joined #scheme 23:33:35 pantsd [n=hkarau@129-97-136-21.uwaterloo.ca] has joined #scheme 23:36:24 -!- annodomini [n=lambda@wikipedia/lambda] has quit [Read error: 110 (Connection timed out)] 23:41:33 -!- Daemmerung [n=goetter@1133sae.mazama.net] has quit [Remote closed the connection] 23:41:44 Daemmerung [n=goetter@1133sae.mazama.net] has joined #scheme 23:44:12 synx: within PLT, (require xml html). Outside of PLT, LAML and others (eg SXML as cited by arcfide). There is also Webit and I don't know what-all else up on Planet. 23:44:44 I'll look at those thanks. 23:51:50 woohoo 23:51:52 i figured it out 23:52:00 it's the terminal capability smkx/rmkx 23:52:09 http://invisible-island.net/xterm/xterm.faq.html#xterm_arrows