00:00:28 all the sellers are running in parallel, if one waits 2 seconds between sales and one has no delay between sales, the one whos selling faster usually sells more 00:00:49 tizoc_ [n=user@r190-135-53-255.dialup.adsl.anteldata.net.uy] has joined #scheme 00:00:51 Well, so two *different* sellers might sell a different number of tickets. 00:00:58 yeah 00:01:09 But can any one seller ever record a bogus number of tickets sold by that seller? 00:01:28 that's what i'm trying to "fix" here 00:01:40 as it is right now, at the end it sometimes turns out that more tickets than the 100 supply have been sold 00:02:19 That's not what I'm asking about -- I'm asking about whether a seller can record a number other than the number of times it has recursively gone through the SELL procedure. 00:02:34 oh, i don't believe it can do that 00:02:42 Why not? 00:03:24 hmm 00:04:13 i guess it actually could 00:04:21 Do any pairs of concurrent threads of execution refer to a common TOTAL-TICKETS-SOLD variable? 00:04:49 Or does each thread have its own, unrelated to the other threads'? 00:05:25 this is where i think i'm getting confused: it doesn't look like the inconsistency is with each dealer's own sell count, but the problem arises with the global *SEATS-LEFT* 00:05:52 Right. In that case, the threads share a common location about which they must cooperate. 00:07:19 i think i need to make sure that only one seller at a time is querying as well as modifying *SEATS-LEFT* 00:08:02 So will it be good enough to create a serializer for seats, say S, and to write 00:08:12 (let ((seats (s (lambda () *seats-left*)))) 00:08:30 (if (customer-order seats) (begin (s (lambda () (set! *seats-left* (- seats 1)))) ...))) 00:08:34 ? 00:09:19 hmm 00:09:36 That will make sure that no two sellers are reading from or writing to *SEATS-LEFT* simultaneously. 00:10:48 oh i see 00:11:07 i need to change them to lambdas to allow them to be passed into the serializer 00:11:59 and the lambda procedure has no args, but simply performs a set! command? 00:12:26 Well, there are two of them used with the serializer here; both have zero parameters, and one of them SET!s. 00:13:43 one is a Rodgers and Hammerstein musical comedy, the other is a planet package 00:14:31 *zbigniew* accidentally responds to a comment from 15 hours ago 00:14:47 when it checks (if (customer-order *SEATS-LEFT*) i also need to make sure that no mutex has been acquired and there's at least one ticket remaining 00:17:07 -!- tizoc [n=user@r190-135-42-203.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 00:17:20 ok i think i've got this now, thanks a bunch :) 00:17:48 So what do you really need to protect here with a serializer? It's not just ensuring that no two threads read from or write to *SEATS-LEFT* simultaneously. 00:18:27 it's also making sure that no 2 threads are preparing to read/write before a mutex has been acquired? 00:18:44 Not quite. 00:18:57 gweiqi [n=greg@69.120.126.163] has joined #scheme 00:19:33 -!- jonrafkind [n=jon@wireless25.wireless.utah.edu] has quit [Read error: 110 (Connection timed out)] 00:19:58 i thought it was basically preserving the order in which the threads try to access/modify this data 00:20:02 to maintain consistency 00:20:35 tizoc [n=user@r190-135-50-97.dialup.adsl.anteldata.net.uy] has joined #scheme 00:22:35 -!- tizoc_ [n=user@r190-135-53-255.dialup.adsl.anteldata.net.uy] has quit [Read error: 104 (Connection reset by peer)] 00:22:56 i've got to step afk for a bit, i'm pretty sure i get the gist of this now, thanks for the advice thus far and any i get when i return 00:24:40 -!- proq [n=user@unaffiliated/proqesi] has quit [Remote closed the connection] 00:27:07 proq [n=user@unaffiliated/proqesi] has joined #scheme 00:32:40 -!- hotblack23 [n=jh@p5B053BB2.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 00:32:49 cemerick [n=la_mer@c-71-233-165-252.hsd1.ma.comcast.net] has joined #scheme 00:34:30 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 00:36:58 JohnnyL [i=JohnnyL@ool-182ddad4.dyn.optonline.net] has joined #scheme 00:37:13 -!- cemerick [n=la_mer@c-71-233-165-252.hsd1.ma.comcast.net] has quit [Client Quit] 00:38:17 -!- mejja [n=user@c-4db6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit ["*bork bork*"] 00:40:16 peter_12 [n=peter@pool-71-105-154-91.lsanca.dsl-w.verizon.net] has joined #scheme 00:40:31 -!- peter_12 [n=peter@pool-71-105-154-91.lsanca.dsl-w.verizon.net] has quit [Remote closed the connection] 00:42:36 saccade_ [n=saccade@65.78.24.47] has joined #scheme 00:45:56 hemulen [n=hemulen@cpe-069-134-114-252.nc.res.rr.com] has joined #scheme 00:48:42 -!- attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has quit [Read error: 113 (No route to host)] 00:53:01 i am back after a mediocore dining hall meal :} 00:53:08 lets see if i can finally get this working 00:56:22 mejja [n=user@c-4db6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 00:57:51 -!- saccade_ [n=saccade@65.78.24.47] has quit ["This computer has gone to sleep"] 00:58:11 -!- JohnnyL [i=JohnnyL@ool-182ddad4.dyn.optonline.net] has left #scheme 00:59:37 -!- hemulen [n=hemulen@cpe-069-134-114-252.nc.res.rr.com] has quit [] 01:02:32 -!- rdd` [n=rdd@c83-250-142-219.bredband.comhem.se] has quit [Read error: 60 (Operation timed out)] 01:07:09 Riastradh are you still here? 01:14:53 SweetwaterDixon [n=user@210.48.104.34] has joined #scheme 01:19:00 -!- jlongster [n=user@75.148.111.133] has quit [Read error: 113 (No route to host)] 01:19:35 gaja_ [n=Gabriel@c-0689e555.017-40-6c6b7013.cust.bredbandsbolaget.se] has joined #scheme 01:21:47 can someone tell me in a nutshell what (begin does? 01:22:12 it evaluates all the forms inside it and is evaluated to the value of the last form 01:22:41 ah i thought it was something like that, thanks 01:22:48 np 01:23:27 actually, they are evaluated in sequence, from left to right 01:24:13 does it run through all possible "choice" inside the begin? 01:24:52 rdd [n=rdd@c83-250-142-219.bredband.comhem.se] has joined #scheme 01:25:34 -!- gaja [n=Gabriel@c-3481e555.017-40-6c6b7013.cust.bredbandsbolaget.se] has quit [Read error: 110 (Connection timed out)] 01:25:41 what do you mean by "choice"? 01:25:55 geckosenator [n=sean@c-24-8-193-190.hsd1.co.comcast.net] has joined #scheme 01:26:19 i have a (begin (... with several lines of code inside, using serializers and stuff 01:26:20 -!- Mr_SpOOn [n=Mr_SpOOn@89-97-102-218.ip17.fastwebnet.it] has quit [Read error: 110 (Connection timed out)] 01:26:28 does it need to wait for one inside to finish before moving on? 01:26:57 yes, that's what "evaluated in sequence" means 01:27:04 :] 01:27:19 sorry i'm new to all this and still don't really know what i'm doing 01:27:44 Everyone is new once 01:30:38 lobsterman pasted "halp plz" at http://paste.lisp.org/display/71891 01:30:52 can someone please take a look at this and offer any advice as to why it passing a procedure not a number in for seats on line7 01:31:45 >: expects type as 1st argument, given: #; other arguments were: 0 01:32:44 i figure it's something simple i'm overlooking 01:33:52 or maybe i messed up a definition somewhere 01:34:31 did you know that you can bind more than one variable in a let form? 01:34:37 no i did not 01:34:54 you probably want to use (seats) instead of seats 01:36:22 heh well no errors this time 01:36:30 but it just gives me 0 at the end now lol 01:37:27 i suspected it needed to be (seats) 01:37:30 (if you guys see any other glaring errors please let me know) 01:37:57 hml [n=x@unaffiliated/hml] has joined #scheme 01:38:51 hmm i added some more parens...i don't know if it's just going slowly now or if it hung 01:41:09 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 01:41:36 don't just add parens without a reason 01:41:55 i added one more set around each of my (s (lambda.... expressions 01:41:58 -!- GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has quit [Client Quit] 01:42:04 since they need to be passed as procedures as well 01:42:10 but it's getting hung up somewhere 01:43:08 does (define s (make-serializer)) need to be outside of my procedure somewhere? 01:43:33 tbh I have no idea how your code is meant to work 01:43:51 i don't really either........my professor gave it to us and said "ok, add serialization! gogogo" 01:44:01 i mean i have an idea...and it's based on some otherframework we got 01:44:06 "Needs moar serialisation plz" 01:44:17 kind of like that, yes :P 01:44:23 pfo [n=pfo@chello084114049188.14.vie.surfer.at] has joined #scheme 01:48:40 i think i need to drop the "sell" at the very end 01:49:01 ...noper 01:49:49 SweetwaterDixon pasted "How I would do it" at http://paste.lisp.org/display/71893 01:49:58 Is that kind of what you're trying to do? 01:50:32 yeah...but we're dealing with parallel threads and serialization/mutexes 01:50:41 ah 01:50:47 if only it were that easy :[ 01:50:52 Then I have been NO HELP 01:50:56 hehe 01:50:58 win! 01:55:06 oh wtf...it was just freezing before now it's giving me errors 01:55:17 add more parens 01:55:59 lol 01:56:53 cemerick [n=la_mer@c-71-233-165-252.hsd1.ma.comcast.net] has joined #scheme 01:57:34 ohh progress 01:58:01 they now all sell one ticket XD 01:59:30 -!- cemerick [n=la_mer@c-71-233-165-252.hsd1.ma.comcast.net] has quit [Client Quit] 01:59:32 these parenthesis are my downfall :[ 02:01:39 use [] 02:01:49 can i mix and match? 02:01:56 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit ["Leaving."] 02:02:21 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 02:03:42 saccade_ [n=saccade@65.78.24.47] has joined #scheme 02:04:01 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 02:10:14 why does it not work X{ 02:10:23 maybe someone can have a look 02:10:37 don't ask to ask, just ask 02:11:04 lobsterman pasted "???" at http://paste.lisp.org/display/71894 02:11:11 i was pasting :P 02:11:13 and you should probably give a clearer explanation of what you're trying to do 02:11:42 -!- saccade_ [n=saccade@65.78.24.47] has quit ["This computer has gone to sleep"] 02:12:20 and u should probably put ur bindings in one "let" 02:12:40 yeah i'm ignoring that for the moment, unless it may affect things? 02:13:11 It may affect others ability to read your program and help you 02:13:56 What on earth is s, LobsterMan? 02:14:05 sorry 02:14:05 (define s (make-serializer)) 02:14:12 defined externally 02:14:21 i'm messing with serializers and mutexes 02:14:27 trying to preserver concurrency 02:14:35 LobsterMan, suppose one thread reads 4 seats left, and determines that there's a customer order. 02:14:43 At this point another thread reads 4 seats left, and also determines that there's a customer order. 02:15:26 i was under the impression that my serializer function had that all handled 02:16:27 Now the first thread decrements *SEATS-LEFT*, which it makes sure will happen atomically, by the use of the serializer S. 02:16:42 jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has joined #scheme 02:16:42 Next the second thread decrements *SEATS-LEFT*, which again is an atomic action. 02:17:02 And both threads bump the number of tickets they've sold. 02:17:10 Now there are 2 seats left. 02:17:21 What if we started off with 1 seat left, rather than 4? 02:17:50 Riastradh i think you may be trying to explain stuff i've already got implemented into my code, did you see the serializer and mutex procedures? 02:18:23 I'm assuming that your serializers work correctly and everything. Was there fault in my proposed sequence of actions? 02:18:26 bombshelter13 [n=bombshel@209-161-228-143.dsl.look.ca] has joined #scheme 02:18:40 well 02:18:58 The decrementation of *SEATS-LEFT* is atomic; we never wind up with two threads believing that they have each sold a ticket, but with only one seat fewer left than before. 02:19:00 assuming that my backend stuff is working, it should not let things go on if only one ticket is left until all mutexes release control 02:20:34 Why not? You have imposed only the restriction that the initial read from *SEATS-LEFT*, and the subsequent decrementation of *SEATS-LEFT*, be atomic. But you didn't say that those two actions had to happen without any other actions intervening. 02:21:01 hmph i see what you're getting at... 02:21:28 There are a couple of other problems with the code you most recently pasted, in lisppaste #71894. 02:21:42 1. (LET (SEATS ...) ...) is invalid syntax. You're missing parentheses here. 02:21:52 (let ((seats (s (lambda () *SEATS-LEFT*)))) 02:21:54 that's fixed 02:22:09 *offby1`* sniffles 02:22:13 nobody is using rudybot 02:22:24 2. (S (LAMBDA () *SEATS-LEFT*)) will yield the value of *SEATS-LEFT*, which is presumably a number, not a procedure. So to refer to the number of seats left (as it was when you read from the global variable), you would write SEATS, not (SEATS). 02:22:46 rudybot: eval (let ((whine "I am happiest")) (display whine) (newline) (display "when I'm being used")) 02:22:49 offby1`: error: with-limit: out of time 02:22:52 :-( 02:22:53 rudybot: eval (let ((whine "I am happiest")) (display whine) (newline) (display "when I'm being used")) 02:22:53 offby1`: ; stdout: "I am happiest\nwhen I'm being used" 02:23:10 3. Presumably you are interested in the *current* number of seats left, not the *original* value of seats left when the whole process began. 02:23:18 yes 02:23:58 So you want to read from *SEATS-LEFT* for each iteration of the SELL loop, not outside the SELL loop. 02:24:52 i thought the first (let statement was loading whatever was in *SEATS-LEFT* to seats so that i had something to compare 02:25:34 If you evaluate (S (LAMBDA () *SEATS-LEFT*)) outside of the SELL procedure, it will happen only once (assuming you invoke the ticket seller only once, which I presume you are doing in (PARALLEL-EXECUTE (MAKE-TICKET-SELLER ...) ...)). 02:25:35 i think i see what you're saying though, i'm still not accounting for possible changes 02:26:08 so i should move that let inside of my sell procedure? 02:26:26 Yes, as it was before, if I recall correctly. 02:26:42 i've been doing a lot of copy/pasting around, things may have become mixed up 02:26:51 Now, didn't we agree earlier that there is no way for the total number of tickets sold by a single particular ticket seller to become inconsistent? 02:27:31 yes 02:27:56 the sum as well as remaining seats are of primary concern 02:27:58 So why do you need to serialize the incrementation of TOTAL-TICKETS-SOLD? 02:28:11 good point :) 02:28:48 There remains one other (serious) issue, but let's see what the code looks like after the above issues are dealt with before tackling this last showstopper. 02:28:58 ok one second, i'll update the paste 02:29:28 man you guys are still discussing this? its been like 2 hours 02:29:33 *LobsterMan* is a slow learner 02:29:47 There was a two-hour break for grub. 02:29:50 just put a mutex around the if crap 02:30:02 (lock-mutex (if (customer-buys ...) ....) thats it 02:30:06 end of story. you are done 02:30:09 Nope. 02:30:16 nope 02:30:16 it is mutexed, just externally via s, which is make-serializer 02:30:33 hold on one minute...trying to get it to at least run something before i paste it again 02:31:09 The object of this exercise, jonrafkind, is not to sprinkle mutices willy-nilly over large swaths of program hunks until it grinds to a deadlock^W^W^W^Wworks accidentally. 02:31:31 who cares 02:31:34 The object of this exercise is for LobsterMan to learn how to think about concurrent synchronization of shared resources. 02:31:41 oh thank socrates 02:31:45 thanks* 02:32:01 we're all friends here, let's keep it constructive :P 02:32:04 If you don't care, then you are welcome to ignore the conversation. 02:32:12 lobsterman pasted "now it runs but hangs" at http://paste.lisp.org/display/71896 02:32:55 LobsterMan, why are you calling what the serializer returns as if what it returns is a procedure? 02:33:01 i just saw that 02:33:14 so many parenthesis... 02:34:23 Dawgmatix [n=deep@207-237-30-94.c3-0.avec-ubr11.nyr-avec.ny.cable.rcn.com] has joined #scheme 02:34:28 and i think i want just (sell) not ((s (lambda () (sell))))) 02:34:57 Well, first fix the invocations of the serializers: I presume that (S ) returns whatever returns, rather than (necessarily) another procedure. 02:35:25 ...I could be wrong about that, however. 02:35:32 (S ) returns whatever returns, yes, and if i add another set of parenthesis it returns the actual procedure 02:35:39 as far as i'm able to tell at least 02:36:09 Excuse me: I was wrong. Your use of the serializer is correct. 02:36:11 augh what 02:36:38 a1len [n=James@unaffiliated/a1len] has joined #scheme 02:36:43 S is a map from unserialized procedures to serialized procedures, rather than a serializing executor of procedures. 02:36:50 I thought you meant serialization, as in data serialization, as in encoding data structures to bytes... 02:37:03 so yeah, i thought the first line of begin is supposed to be 02:37:08 (begin ((s (lambda () (set! *SEATS-LEFT* (- *SEATS-LEFT* 1)))));record sale 02:37:25 So, returning to the scenario I described earlier: 02:37:57 Suppose seller A reads *SEATS-LEFT*, and sees that there is an order for a seat. 02:38:27 At this point seller B is free to do the same -- read *SEATS-LEFT*, and also see that there is an order for a seat. 02:38:47 Now both sellers are determined to decrement *SEATS-LEFT* -- even if its value (at this moment) is 1. 02:39:05 i need to handle this somehow (i assume)? 02:39:16 What went wrong? 02:40:26 well i thought that since *seats-left* was being "looked up" inside of sell 02:40:55 that it would make sure there is sufficient tickets remaining before it gives the goahead to sell more 02:41:37 or am i incorrect in this assumption? 02:41:42 So there are two distinct actions here: checking whether there are enough tickets to sell more, and actually selling a ticket. 02:41:48 yes 02:42:23 it calls customer order, which is as follows: 02:42:24 (define (customer-order seats) 02:42:24 (if (> seats 0); customer can buy 02:42:24 (begin (my-sleep (random 2)) ;customer thinks for a while 02:42:24 #t) ;and then says "I'll take one ticket, please" 02:42:24 #f) ; seller says "sorry, sold out." 02:42:26 ) 02:43:45 Suppose some tickets are sold in the duration between those two actions: Seller A checks whether there are more tickets. [In the distance, seller B sells some tickets.] The customer opts to buy one, and seller A sells the customer a ticket. 02:44:03 do i need to perform another check before actually selling the ticket? 02:44:12 Well, let's suppose you did this: 02:45:08 (if (customer-order seats) (if (seats-left?) (sell-seat!) ...)) 02:46:07 Here SEATS-LEFT? reads from *SEATS-LEFT* and checks whether it is positive, and SELL-SEAT! decrements *SEATS-LEFT* (and perhaps also increments TOTAL-TICKETS-SOLD). Each of these procedures will invoke the serializer, so that reading *SEATS-LEFT* will happen atomically, and decrementing *SEATS-LEFT* will happen atomically. 02:46:17 Would that help? 02:46:55 -!- phao [n=phao@189.13.126.182] has quit ["Leaving"] 02:47:04 seems like that would over-convolute things even further 02:47:14 but it just might work 02:47:34 Suppose now the following steps happen: 02:47:43 1. Seller A checks whether there are seats left. 02:48:09 2. The customer thinks about whether to order, and seller B sells a seat. There are no more seats left. 02:48:35 3. Seller A checks whether there are still seats left, and, seeing that there are not, apologizes to the customer for having said incorrectly that there were seats left. 02:48:46 That sounds good. 02:49:20 so i do need an additional check 02:50:12 Is any other sequence of events possible -- any sequence that might undermine this approach? 02:52:21 possibly 02:52:30 nothing i can think of off the top of my head that hasn't been covered 02:52:44 Well, let's try this sequence: 02:52:50 1. Seller A checks whether there are seats left. 02:52:50 (saw this coming :P ) 02:53:09 2. The customer orders a seat. Seller B sells a seat, but there are still seats left afterward. 02:53:24 3. Seller A checks whether there are seats left, and sees that there are still seats. 02:53:32 4. Seller A sells a seat to the customer, and all is well. 02:53:36 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit ["Leaving."] 02:54:31 so i need to check, wait, check again/lock mutex, sell, unlock mutex? 02:54:38 -!- raikov [n=igr@203.181.243.11] has quit [Remote closed the connection] 02:56:12 saccade_ [n=saccade@65.78.24.47] has joined #scheme 02:56:13 This last scenario, too, went just peachily. 02:56:50 what it appears that my program does as-is right now: load number of seats, wait, check/engage mutex/decrement count 02:56:55 but it doesn't ever release the mutex? 02:57:17 Oh, it releases the mutex; that's handled by the serializer abstraction. 02:57:49 I wrote the sequence of steps very carefully so that you can insert whatever extra steps you want between the lines. 02:58:08 For example, maybe between steps 1 and 3, seller C also sells a seat. 02:58:22 it seems that there's a slight problem with my algorithm 02:58:51 check, wait, but after the wait i should check the seat-count again? 02:59:16 So you want to add a step, say 3', to the above sequence? 02:59:23 3. Seller A checks whether there are seats left, and sees that there are still seats. 02:59:30 3'. Seller A checks again whether there are seats left, and sees that there are still seats. 02:59:35 4. Seller A sells a seat to the customer. 03:00:29 is the best way to do this to add another "step" to my begin sequence, with an if to make sure seats are still there? 03:00:58 -!- incubot [n=incubot@24.205.65.135] has quit [Read error: 131 (Connection reset by peer)] 03:01:01 initial check, wait, check again, sell, adjust count, then sell again 03:01:19 Without changing your algorithm, can you imagine by what sequence of steps a problem might arise? 03:01:37 (Hint: Anything can happen between the steps I wrote. So between 3 and 3', seller D could sell a seat, for instance.) 03:02:31 i thought that the act of checking "locked" the value so that whichever seller was the first to check would get the seat 03:02:46 so if there was 1 seat left, the first to check would get "dibs" and everyone else has to wait until he's done? 03:03:13 Nope. If all you serialize is a read from *SEATS-LEFT*, that's all that gets serialized. Anything can happen between that action and whatever you next serialize. 03:04:05 and everything you're hinting at is within my make-ticket-seller function right? 03:04:44 Yes; I'm assuming that there are no malicious sellers who will scribble all over *SEATS-LEFT*. 03:04:49 hehe 03:05:04 wastrel [n=wastrel@nylug/member/wastrel] has joined #scheme 03:05:45 incubot [n=incubot@24.205.65.135] has joined #scheme 03:07:44 tbh it looks pretty sound to me 03:07:48 am i still missing something? 03:08:10 (well the fact that it still doesn't work...) heh 03:08:27 Yep. Hint: Anything can happen between steps that are not serialized together. 03:09:29 so between the initial check and actual purchase bad things can happen 03:11:34 initial check (doesn't really do much it seems), wait, use old value to determine availability, sell if old value indicated ticket available, sell ticket even though one might not be available 03:12:02 it seems like my first check may need to be moved, or maybe an additional check added 03:12:12 You don't need any additional checks; they're red herrings. 03:12:44 If we check in one step, and decrement in a subsequent step, what can go wrong? 03:13:19 so simply wait, then check during the actual if statment? 03:14:05 i think my first check is badly placed 03:14:07 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 03:14:55 would this work: 03:15:00 (if (customer-order (s (lambda () *SEATS-LEFT*))) 03:15:26 That doesn't really change anything. 03:16:01 i feel like i'm missing some really obvious point 03:16:17 Can you tell me what's wrong with checking in one step and decrementing in a subsequent step? Here a `step' is something made atomic by the serializer, so ((S (LAMBDA () *SEATS-LEFT*))) is one step and ((S (LAMBDA () (SET! *SEATS-LEFT* (- *SEATS-LEFT* 1))))) is another. 03:16:36 i see what you're saying 03:16:44 but i'm trying to figure out how to implement it 03:16:56 -!- mejja [n=user@c-4db6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 03:17:17 I'd like you just to say what's wrong with that, before you implement a solution. 03:17:40 there's stil a period of time between the check and the sale 03:17:59 And what about that period of time? 03:18:10 so a ticket can be sold in the single instant between the first check and the sale 03:18:19 riastradh: just out of curiosity, do you teach computer science by any chance? 03:18:20 a ticket from another salesman* 03:18:20 Exactly. 03:18:24 -!- sam_ [n=Sami__@hoasnet-fe1add00-113.dhcp.inet.fi] has quit [] 03:18:54 (btw Riastradh I really, really appreciate all the help) 03:19:12 LobsterMan, so, how can you make sure that *nothing* happens between a check and a decrementation? 03:19:21 (nothing concerning the remaining seats, that is) 03:19:33 somehow make a check and a sale happen "at the same time" 03:19:55 How do you make two actions happen as one? 03:20:03 cons? 03:20:07 No... 03:20:09 lol 03:20:26 Perhaps: How do you enforce a serial order on two actions, prohibiting any others between them? 03:20:51 parallel-execute? 03:21:52 which i thought was the purpose of the serizlizer 03:22:07 Yikes! No, PARALLEL-EXECUTE does the opposite -- it allows the actions to take any order, independent of one another! 03:22:13 hehe 03:22:17 Yes, you use a serializer to enforce a serial order on two actions. 03:22:52 can i put 2 procedures into a single (s ... ) ? 03:23:15 Well, not two procedures, but you can pass S a single procedure that does several things. 03:23:49 i thought that was how (begin ... worked 03:23:50 -!- melito [n=melito@70.99.250.82] has quit ["Leaving..."] 03:25:01 I ought, I suppose, to have been slightly more precise about my terminology: A procedure may execute several actions in sequence, but while these actions occur in a definite sequence relative to one another, other concurrent actions may take place simultaneously with them. S makes a procedure that performs the same actions as the procedure you give it, but prohibits any concurrent actions from the same serializerr. 03:25:07 Serializer, even. 03:25:52 so load up my (s .. with a lambda which checks and then sells all at once eh? 03:26:03 Yes, exactly. 03:26:51 That will solve one problem, of overselling by mistake. 03:29:18 am i going to need to do some crazy syntactical stuff like (if (customer-order (let ((seats (s (lambda () *SEATS-LEFT*))) 03:30:17 oh wait... 03:30:18 Not quite that, but you will need to restructure the interior of the procedure a little bit in order to recursively call SELL only if you have seen seats left, after you have (atomically) checked for seats and decremented them. 03:30:48 so given 03:30:48 (let ((seats (s (lambda () *SEATS-LEFT*)))) 03:31:12 if i use seats does it re-check the value by acquiring the mutex and all that again, or just use the stored value? 03:31:37 or can i make it so that seats will call the function each time? or am i getting too complicated now? 03:31:39 heh 03:31:50 SEATS will in the body of that LET be bound to a procedure that reads from *SEATS-LEFT* and returns its value at the time when you called SEATS. 03:32:01 valiza1 [n=haroldo@r190-133-129-205.dialup.adsl.anteldata.net.uy] has joined #scheme 03:33:54 But you want to do more inside the procedure you pass to S -- as you said earlier, you'll want to check *and* decrement in that procedure, something along the lines of: (s (lambda () (if (seats-left?) (sell-seat!)))) 03:34:28 and i can just define those 2 functions inside the let? 03:35:05 That, or you can just write their definitions in-line (maybe (SEATS-LEFT?) is equivalent to (CUSTOMER-ORDER *SEATS-LEFT*), and (SELL-SEAT!) decrements *SEATS-LEFT*). 03:35:58 would i want to use define or let? 03:38:36 actually, the one thing i'm really hung up on, isn't that exactly what my (begin is doing 03:38:49 (if (customer-order (seats)) 03:38:49 (begin ((s (lambda () (set! *SEATS-LEFT* (- *SEATS-LEFT* 1)))));record sale 03:38:49 ;globally 03:39:53 What action do you want to perform atomically, so that no other action (related to the shared resource *SEATS-LEFT*) can happen simultaneously? 03:40:11 sell 03:40:19 That's all? 03:40:27 How do you know that you can sell? 03:40:41 well the check as well 03:40:58 So you want to check and sell -- how do you write this action in Scheme (without involving the serializer)? 03:41:36 (if (enough) (sell) (don't sell)) 03:41:50 OK. Now if you want that to happen atomically, write 03:41:59 ((s (lambda () (if (enough) (sell) (don't sell))))) 03:42:03 oh i see.....if the comparison isn't inside a serializer.... 03:42:19 hehe oversight on my part above, i didn't see that the if was inside the (s 03:42:27 raikov [n=igr@203.181.243.11] has joined #scheme 03:42:54 this is kind of tricky, but also kind of cool 03:43:55 What will be tricky is expressing the decision to repeat the selling loop *within* the serializer. That is, if there are enough tickets, we want to sell one *and* continue selling. 03:44:06 yeah 03:44:19 So suppose you write ((s (lambda () (if (seats-left?) (begin (sell-seat!) (sell)) (fail-to-sell))))) 03:44:30 What's wrong with that? 03:44:49 so the trick is to encapsulate the entire comparison into it's own serializer? 03:45:37 ok let me type this up and see if it runs 03:45:42 One way to do this is to return a boolean from the atomic check-and-decrement action, indicating whether you successfully sold a seat. 03:46:26 wow, still at it 03:46:28 (if ((s check-and-decrement)) (sell)), where CHECK-AND-DECREMENT checks SEATS-LEFT?, invokes SELL-SEAT!, and returns true if there were seats left or false if not. 03:47:14 that's kind of what customer-order does 03:47:51 Not quite. CUSTOMER-ORDER makes a decision based on a number of tickets; it doesn't actually check the current number of tickets (i.e. read from *SEATS-LEFT*) and decrement the number of tickets. 03:49:22 do i need to serailize within serializations? 03:49:30 Nope. 03:50:15 arcfide [n=arcfide@99.137.203.206] has joined #scheme 03:50:37 doesn't serializing the entire if statement "hog resources"? 03:52:06 Yes -- but you *need* to make the check and decrement atomic. 03:53:02 You have a choice of whether you want to call CUSTOMER-ORDER in the atomic action; you can check, ask the customer, and decrement all in one atomic action, which will especially hog resources. You can also read the number of seats in one step, ask the customer in another step, and then in one atomic action check *again* and decrement. 03:53:41 Good evening everyone, what's new? 03:55:01 arcfide: i've been in #scheme for so long, that i assumed the world was an extension of #scheme; i'm grieved to find out that men in the world are slaves to fashion 03:55:22 fashion being xml and its hideous toolchains; and other langues du jour 03:55:29 well Riastradh this is starting to come together now but i've spent longer on this than i planned 03:55:37 klutometis: Welcome to the real world. 03:55:50 thanks very much again and i'm going to work on some other work while my subconscious digests all of this 03:56:08 arcfide: whoops; you forgot your scare quotes around "real world" ;) 03:56:47 klutometis: In my limited experience, I can't justify quotes. :-) 03:57:27 klutometis: http://offby1-whining.blogspot.com/2008/12/pentaho.html 03:58:49 offby1`: heh; nice smack-down 03:58:51 a blog to complain about free-software, LOVE IT 03:59:41 wasabi_____ [n=wasabi@ntoska205253.oska.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 03:59:47 arcfide: "real" derives from latin res, or thing; and if the "real" world is real because men surround themselves with things, i can justify removing the scare quotes 03:59:58 `A programming language raison d'etre is in the syntax.' 04:00:59 So...what's `Pentaho', and why are you afflicted by it? 04:01:20 SweetwaterDixon: not "complain", but rather, "whine" :-) 04:01:23 even _more_ annoying. 04:01:53 elmex_ [n=elmex@e180067180.adsl.alicedsl.de] has joined #scheme 04:02:07 Is there a whine about Firefox in general? 04:02:25 Pentaho, pentaho / Five-sided lady of the evening / Try our hosted demo! 04:02:27 ` *``* We can start *delivering* VALUE /quickly/ with [Pentaho]. *''* ' 04:02:28 Riastradh: I think he's referring to pentahos before pentaprose. 04:02:42 (No emphasis added.) 04:02:56 arcfide: in general, I like Firefox 04:03:04 so if I whined about it, it'd have been about something specific 04:03:05 no way, man. Pentabros over Pentahos 04:03:32 SweetwaterDixon: heh 04:03:51 Riastradh: the prenominate quote is ungoogleable; is it your own invention? 04:04:01 klutometis, click on offby1-whining's link to Pentaho. 04:04:02 offby1: Interesting stuff. Hehe, I gave up on file sharing too. Now I just have proper DNS + SSH for my machines, including Windows, and it has worked wonderfully. 04:04:24 offby1`, out of curiosity, does pidgin open a UDP socket for deliberating with some Microsoftoid UPnP service discovery protocol? 04:04:41 Pentaho support does a GREAT JORB 04:04:48 Riastradh: no idea 04:05:48 Adium does, and it bothers me, almost as much as it bothers me that OS X's nmbd sprays NetBIOS crud all over its network interfaces. 04:07:30 Riastradh: sounds like you're asking about mdns, aka BonJour, aka avahi 04:07:47 Nope, completely different. 04:08:19 (Gosh, does l'acadamie francaise permit camelCasing of `bonjour'?) 04:09:18 -!- wastrel [n=wastrel@nylug/member/wastrel] has quit ["okbye"] 04:10:08 I don't mind solicited service discovery packets for Zeroconf: when I want to list printers available on this LAN, for instance, it is reasonable for the operating system to send multicast service discovery packets. When I want to connect to a machine whose name I know on the local network, it is reasonable to use mDNS to resolve the name to an IP address. 04:10:27 ho kay 04:11:21 What's not reasonable is the operating system's spraying out NetBIOS workgroup queries every half second, or interacting with Microsoftoid home router configuration service discovery protocols...automatically, in Adium. 04:12:05 I still don't really know why Adium does this, and I lost interest investigating it. So I wondered whether pidgin was afflicted by the same unsolicited behaviour. 04:12:54 -!- wasabi____ [n=wasabi@ntoska205253.oska.nt.ftth.ppp.infoweb.ne.jp] has quit [Read error: 110 (Connection timed out)] 04:13:35 Riastradh: This isn't something that is done in order to make sure port forwarding works correctly, is it? 04:13:44 What port forwarding? 04:14:24 Riastradh: Most IMs I know of use things like UPnP to avoid stepping on each others toes when dealing with routers and NAT. 04:14:24 It might be that Adium wants to know what its public IP address is, if it is behind a NATty gateway. Why, I can't imagine. 04:14:41 -!- hml [n=x@unaffiliated/hml] has quit [Remote closed the connection] 04:14:42 For file transfer. 04:15:05 Or at least, that's one of the common reasons. 04:15:07 Yes, because I'm transferring files all the time. 04:15:31 Merely by launching Adium I have expressed my intent to transfer a file, so Adium should strike up a conversation with the nearest NATty gateway. 04:15:33 I imagine there are other uses, but I think UPnP is the only thing that it would use for such things, not NetBIOS. 04:15:42 Riastradh: I don't see _any_ UDP in my wireshark output, which leads me to suspect I'm doing it wrong 04:15:51 (NetBIOS is unrelated. That's unsolicited behaviour by OS X.) 04:15:59 Oh. 04:16:16 I think it does that to track down Windows machines on the network. 04:17:00 offby1`, try going to a web site at a host you have not been to lately, while you sniff traffic. (Also, I don't know whether Wireshark will do the sniffing itself [correctly]; I always use `tcpdump -i -w tcp.dump' and then run Wireshark on the file tcp.dump afterward.) 04:17:33 arcfide, what, so it can find them and destroy them? 04:17:42 Heh, I wish. 04:17:48 -!- elmex [n=elmex@e180064003.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 04:17:49 -!- elmex_ is now known as elmex 04:18:06 Apparently just so that it can have a Network browser at the ready. 04:18:58 Well, that's stupid. Unfortunately, the only way I am aware of to disable it is to edit a configuration file in /System/Library/Launch{Daemons,Agents}. 04:19:04 As for Instant Messengers, I believe there used to be problems when multiple clients would run on the same NATed network, so most clients use UPnP to make sure they are playing with the router in a way that will make the other clients work. 04:19:22 That's absurd. 04:19:25 -!- Modius [n=Modius@adsl-67-67-217-250.dsl.austtx.swbell.net] has quit ["I'm big in Japan"] 04:19:33 It may be stupid, but people were constantly complaining that the finder took too long to find windows machines. 04:20:15 I know I have had troubles in the past with IMs on some networks, because of this issue; it doesn't show up as often now because of the UPnP. 04:20:23 Of course, it should be turned off by default. 04:20:39 That reeks of a stupidly designed network protocol. 04:20:40 I am surprised there is not a setting to control that in Adium. 04:21:06 Are you using Bonjour instant messaging in Adium? 04:21:18 I don't even know what that is. 04:21:25 I'm using Jabber. 04:21:57 iChat has the ability to automatically sniff out clients on the local network, so that people on the same network can chat without having to go outside the network. Adium supports this protocol, I believe. 04:22:00 prestoo [n=presto10@cs180038.pp.htv.fi] has joined #scheme 04:22:19 I presume it would use Zeroconf, then -- when solicited. 04:22:44 I haven't observed any especially antisocial Zeroconf-related behaviour either by OS X or by Adium. 04:22:49 Something like that, but it might also be sending out some packets fairly regularly to find new clients. 04:23:14 Most big GUI Jabber clients I know of usually have some sort of UPnP component. 04:24:07 Why? 04:24:24 offby1 [n=eric@q-static-138-125.avvanta.com] has joined #scheme 04:24:35 NAT issues. 04:24:40 What NAT issues? 04:25:23 I don't recall immediately the issues, but I do remember lot's of mailing list and forum posts about jabber not working in a default NAT environment, until someone did UPnPing. 04:25:56 *arcfide* shrugs. 04:25:58 So either Jabber is broken or the Jabber implementations are broken, or people are confused. What could Jabber possibly need that can't be done with NAT? It is based on a simple TCP stream connection to a server, no? 04:26:07 I am almost sure you can disable UPnP in Adium, though. 04:26:39 *arcfide* shrugs. 04:26:57 I know file transfer is one of the issues, but obviously, we shouldn't have to do that until we transfer a file. 04:27:13 I don't know the details, but I think there used to be a few default ports for clients to use. 04:27:33 Dunno. 04:28:00 Usually one of the first things I do on routers is disable the UPnP unless I need to for something. 04:28:30 specbot: r6rs list 04:28:36 specbot: help 04:28:36 To use the specbot bot, say something like "database term", where database is one of ("clhs", "r5rs", "cocoa", "elisp", "clim", "ieee754", "ppc", "posix", "man", "cltl2", "cltl2-section") and term is the desired lookup. The available databases are: 04:28:37 "clhs", The Common Lisp HyperSpec; "r5rs", The Revised 5th Ed. Report on the Algorithmic Language Scheme; "cocoa", Classes in the Cocoa Foundation and Application kits; "elisp", GNU Emacs Lisp Reference Manual 04:28:37 "clim", Common Lisp Interface Manager II Specification; "ieee754", Section numbers of IEEE 754; "ppc", PowerPC assembly mnemonics; "posix", Single UNIX Specification 04:31:52 arcfide: The only issue I've ever had with running a jabber ...client, is file transfers. It works fine otherwise, until you get in a situation where a direct connection is needed and the right person can't forward a port. 04:34:08 -!- mfredrickson [n=mfredric@c-98-212-171-158.hsd1.il.comcast.net] has quit [] 04:34:10 -!- SweetwaterDixon [n=user@210.48.104.34] has quit [Remote closed the connection] 04:36:47 offby1`` [n=user@q-static-138-125.avvanta.com] has joined #scheme 04:36:57 *Riastradh* hands offby1`` a nose-hair trimmer. 04:37:05 Honestly, it just looks gross. 04:38:05 offby1_ [n=eric@q-static-138-125.avvanta.com] has joined #scheme 04:38:12 -!- offby1_ [n=eric@q-static-138-125.avvanta.com] has quit [Read error: 54 (Connection reset by peer)] 04:38:40 offby1_ [n=eric@q-static-138-125.avvanta.com] has joined #scheme 04:39:24 -!- bombshelter13 [n=bombshel@209-161-228-143.dsl.look.ca] has quit ["Where is the glory in complying with demands?"] 04:39:38 -!- offby1 [n=eric@q-static-138-125.avvanta.com] has quit [Nick collision from services.] 04:39:40 -!- offby1`` is now known as offby1 04:39:47 *offby1* sweeps the floor 04:40:07 -!- jjong [n=user@203.246.179.177] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 04:42:02 *offby1* rides a GS scooter with his hair cut neat 04:42:13 offby1__ [n=eric@q-static-138-125.avvanta.com] has joined #scheme 04:42:17 -!- offby1__ [n=eric@q-static-138-125.avvanta.com] has quit [Connection reset by peer] 04:42:32 offby1__ [n=eric@q-static-138-125.avvanta.com] has joined #scheme 04:42:54 tizoc_ [n=user@r190-135-2-255.dialup.adsl.anteldata.net.uy] has joined #scheme 04:43:10 mmph 04:44:59 man, connecting has been a bitch lately 04:45:44 -!- prestoo [n=presto10@cs180038.pp.htv.fi] has quit [] 04:46:13 -!- Nshag [i=user@Mix-Orleans-106-2-18.w193-248.abo.wanadoo.fr] has quit [Remote closed the connection] 04:47:33 offby1___ [n=eric@q-static-138-125.avvanta.com] has joined #scheme 04:48:01 -!- incubot [n=incubot@24.205.65.135] has quit [Read error: 110 (Connection timed out)] 04:48:05 offby1___, also, it looks like when there is no UPnP gateway in the vicinity, Adium just sends out a single UDP packet at startup, which pidgin might do as well. 04:48:08 -!- offby1 [n=user@q-static-138-125.avvanta.com] has quit [Read error: 60 (Operation timed out)] 04:48:33 I'm pretty sure the video chat jabber supports is a direct connection too. 04:49:14 I've seen pidgin try to setup UPnP for file transfers, not just for jabber I think. 04:49:19 Did I mention anything about video, audio, file transfer, or anything remotely of that nature? 04:49:58 -!- offby1___ [n=eric@q-static-138-125.avvanta.com] has quit [Remote closed the connection] 04:50:25 No, but those are parts of the xmpp protocol. 04:50:33 Honestly it's embarassingly generic. 04:50:41 offby1 [n=eric@m470436d0.tmodns.net] has joined #scheme 04:51:17 So, is there any reason when interacting with the XMPP but *not* with video, audio, or file transfer, to initiate UPnP discussions with random network devicess in the vicinity? 04:53:08 -!- offby1` [n=user@q-static-138-125.avvanta.com] has quit [Connection timed out] 04:53:08 If there is, then the XMPP, or Jabber, is badly designed and obnoxious; if there isn't, then Adium is badly implemented and obnoxious. 04:53:27 In either case I probably ought to let the discussion here return to Scheme. 04:53:39 Oh, by all means, continue ranting. :-) 04:53:56 We all love a good Riastradh rant! 04:54:01 rave on, toothless wonder 04:56:09 Toothless? Just bitter over mbishop's theft of your dentures the last time you pelted him with them, I imagine. 04:56:40 -!- offby1_ [n=eric@q-static-138-125.avvanta.com] has quit [Read error: 110 (Connection timed out)] 04:56:49 I have a dentists appointment tomorrow in fact...the first one in...10 years? :( 04:57:11 *mbishop* digs through his bag of used dentures 05:01:48 -!- tizoc [n=user@r190-135-50-97.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 05:05:15 -!- offby1__ [n=eric@q-static-138-125.avvanta.com] has quit [Read error: 110 (Connection timed out)] 05:05:42 -!- kniu [n=kniu@OLAWDYME.RES.CMU.EDU] has quit [Connection timed out] 05:05:44 offby1` [n=user@q-static-138-125.avvanta.com] has joined #scheme 05:06:15 kniu [n=kniu@CMU-311358.WV.CC.CMU.EDU] has joined #scheme 05:06:41 -!- offby1 [n=eric@m470436d0.tmodns.net] has quit [Nick collision from services.] 05:06:50 -!- offby1` is now known as offby1 05:06:54 -!- gweiqi [n=greg@69.120.126.163] has left #scheme 05:06:58 offby1_ [n=eric@m370436d0.tmodns.net] has joined #scheme 05:07:00 damn. 05:08:04 johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has joined #scheme 05:09:00 karsten_ [n=karsten@dslb-088-072-214-094.pools.arcor-ip.net] has joined #scheme 05:10:40 -!- offby1_ [n=eric@m370436d0.tmodns.net] has quit [Client Quit] 05:10:52 offby1_ [n=eric@m470436d0.tmodns.net] has joined #scheme 05:11:46 -!- offby1_ [n=eric@m470436d0.tmodns.net] has quit [Read error: 104 (Connection reset by peer)] 05:16:09 I haven't seen a dentist in about 8 years... 05:16:22 eww. 05:16:23 lern 2 hygiene 05:16:33 ... 05:16:46 brush with syntax-rules 05:17:10 I brush my teeth daily. 05:18:06 -!- karsten__ [n=karsten@dslb-088-072-202-246.pools.arcor-ip.net] has quit [Read error: 110 (Connection timed out)] 05:19:01 synx's chewing betel nuts / And he don't use Pepsodent 05:19:18 eww. 05:19:22 *offby1* spits betal nut juice 05:19:24 betel 05:19:34 cannot spell. Cannot keep a connection up for more than five minutes. 05:19:39 Can dance a little. 05:20:23 you lisp a bit, too 05:21:08 betel...? 05:21:51 from the arabic, betelgeuse 05:22:06 this zbigniew, he's erudite 05:22:13 I...see... 05:22:43 He's the fifth Betel. 05:22:51 *offby1* slaps Daemmerung upside the haid 05:22:55 *offby1* slaps zbigniew upside the haid 05:22:58 y'all 05:23:04 owww... mah haid 05:23:09 right answer! 05:23:20 I'm not sure what you guys are getting at... 05:23:24 I just can't afford dentists anymore. 05:23:26 gosh durnit offby1 05:23:44 *offby1* raises his Palm of Slapping 05:23:47 don't gimme no lip 05:24:52 A mighty Pimp Hand, to be sure. 05:24:57 ... When I nod my head, you hit it. 05:30:15 A might Hot Dog is our lord. 05:32:36 incubot [n=incubot@24.205.65.135] has joined #scheme 05:34:50 MichaelRaskin_ [n=raskin@chld.ru] has joined #scheme 05:38:12 -!- Dawgmatix [n=deep@207-237-30-94.c3-0.avec-ubr11.nyr-avec.ny.cable.rcn.com] has quit ["Ex-Chat"] 05:38:36 xrt [n=xrt@adsl-99-8-229-125.dsl.pltn13.sbcglobal.net] has joined #scheme 05:43:07 -!- grettke [n=grettke@CPE-65-31-132-59.wi.res.rr.com] has quit [] 05:52:03 -!- johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has quit [] 05:54:36 -!- pchrist|univ [n=spirit@gateway.hpc.cs.teiath.gr] has quit [Read error: 110 (Connection timed out)] 05:54:41 tizoc [n=user@r190-135-6-45.dialup.adsl.anteldata.net.uy] has joined #scheme 06:02:55 r11t [n=r11t@74.193.238.104] has joined #scheme 06:05:26 -!- tizoc_ [n=user@r190-135-2-255.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 06:12:57 offby1` [n=user@q-static-138-125.avvanta.com] has joined #scheme 06:16:33 -!- offby1 [n=user@q-static-138-125.avvanta.com] has quit [Read error: 60 (Operation timed out)] 06:39:53 -!- kilimanjaro [n=kilimanj@70.116.95.163] has quit ["Connection reset by beer"] 06:57:23 -!- ozy` [n=vt920@pool-71-184-104-97.prvdri.fios.verizon.net] has quit ["absquatulating"] 07:02:29 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 07:02:53 phax [n=phax@unaffiliated/phax] has joined #scheme 07:06:40 -!- r11t [n=r11t@74.193.238.104] has quit [Remote closed the connection] 07:18:39 ramkrsna [n=ramkrsna@unaffiliated/ramkrsna] has joined #scheme 07:36:21 pchrist|univ [n=spirit@gateway.hpc.cs.teiath.gr] has joined #scheme 07:39:59 ecraven [n=nex@140.78.42.103] has joined #scheme 07:41:57 hml [n=x@unaffiliated/hml] has joined #scheme 07:46:39 -!- synthasee [n=synthase@c-68-63-76-191.hsd1.al.comcast.net] has quit [Read error: 60 (Operation timed out)] 08:05:33 -!- xrt [n=xrt@adsl-99-8-229-125.dsl.pltn13.sbcglobal.net] has left #scheme 08:10:25 foof [n=user@195.207.5.2] has joined #scheme 08:11:28 attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has joined #scheme 08:12:36 hotblack23 [n=jh@p5B0554E7.dip.t-dialin.net] has joined #scheme 08:21:04 -!- karsten_ [n=karsten@dslb-088-072-214-094.pools.arcor-ip.net] has quit [Read error: 60 (Operation timed out)] 08:27:01 -!- hml [n=x@unaffiliated/hml] has quit [Read error: 110 (Connection timed out)] 08:31:03 Arelius [n=Indy@netblock-68-183-230-134.dslextreme.com] has joined #scheme 08:34:24 I haven't been able to fully deduce how to extract a portion of a regex from here: http://docs.plt-scheme.org/reference/regexp.html#(part._.Regexp_.Splitting) the example would be "www.google.com" how do I extract only 'google' using a regex? 08:34:50 err.. that's not the url I meant to post, not about splitting, just meant the regex page in general 08:37:25 pchrist [n=spirit@gentoo/developer/pchrist] has joined #scheme 08:39:01 rudybot: eval (cadr (regexp-match #rx"\\.([^.]+)\\." "www.google.com")) 08:39:02 eli: ; Value: "google" 08:40:17 rudybot: eval (regexp-replace #rx"[.].*$" (regexp-replace #rx"^.*?[.]" "www.google.com" "") "") 08:40:17 eli: ; Value: "google" 08:40:40 rudybot: eval (cadr (regexp-split #rx"[.]" "www.google.com")) 08:40:40 eli: ; Value: "google" 08:41:58 actually.. I guess split is not a bad way to do it 08:42:05 hey, thanks eli 08:42:42 I was thinking more to do with something similar to perl's (?:) structure 08:45:09 CaptainMorgan: MzScheme has `(?:stuff)' too, but why would you need it? 08:49:59 -!- cracki [n=cracki@sglty.kawo2.RWTH-Aachen.DE] has quit ["The funniest things in my life are truth and absurdity."] 08:50:07 valiza2 [n=haroldo@r190-133-130-122.dialup.adsl.anteldata.net.uy] has joined #scheme 08:51:03 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 08:54:12 -!- attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has quit [Read error: 113 (No route to host)] 08:56:50 -!- foof [n=user@195.207.5.2] has quit ["ERC Version 5.2 (IRC client for Emacs)"] 08:56:55 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 08:59:41 -!- Kusanagi [n=Motoko@unaffiliated/kusanagi] has quit [Nick collision from services.] 08:59:42 Motoko_Kusanagi [n=Motoko@71-14-81-211.dhcp.stls.mo.charter.com] has joined #scheme 09:07:04 -!- valiza1 [n=haroldo@r190-133-129-205.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 09:09:18 -!- hotblack23 [n=jh@p5B0554E7.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 09:10:25 -!- tarbo [n=me@unaffiliated/tarbo] has quit [Read error: 110 (Connection timed out)] 09:15:54 AYI [n=chatzill@78.167.203.218] has joined #scheme 09:15:58 hey 09:16:29 i try to learn normal order and applicitive order.How it works etc. Do you suggest any tutorial for that ? 09:21:00 tizoc_ [n=user@r190-135-30-34.dialup.adsl.anteldata.net.uy] has joined #scheme 09:21:14 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 09:22:06 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 09:24:55 szgyg [n=luni@dsl5401B2BA.pool.t-online.hu] has joined #scheme 09:26:26 Mr_SpOOn [n=Mr_SpOOn@89-97-102-218.ip17.fastwebnet.it] has joined #scheme 09:27:11 jewel [n=jewel@41.247.196.124] has joined #scheme 09:27:44 -!- AYI [n=chatzill@78.167.203.218] has quit [Remote closed the connection] 09:30:47 ejs [n=eugen@nat.ironport.com] has joined #scheme 09:37:56 -!- tizoc [n=user@r190-135-6-45.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 09:53:43 -!- jewel [n=jewel@41.247.196.124] has quit [No route to host] 10:05:28 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 10:06:17 -!- MichaelRaskin_ [n=raskin@chld.ru] has quit ["Leaving."] 10:06:26 MichaelRaskin_ [n=raskin@chld.ru] has joined #scheme 10:07:35 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 10:12:12 -!- LobsterMan [n=a@host72-50.student.udel.edu] has quit ["-=SysReset 2.55=-"] 10:24:30 jjong [n=user@203.246.179.177] has joined #scheme 10:31:07 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 10:31:41 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 10:39:40 fschwidom [n=fschwido@dslb-088-068-124-061.pools.arcor-ip.net] has joined #scheme 10:55:23 -!- MichaelRaskin_ [n=raskin@chld.ru] has quit ["Leaving."] 10:58:53 -!- pjdelport [n=pjd@dsl-243-31-29.telkomadsl.co.za] has quit [Connection timed out] 10:59:48 pjdelport [n=pjd@dsl-243-31-29.telkomadsl.co.za] has joined #scheme 11:05:38 cemerick [n=la_mer@75.147.38.122] has joined #scheme 11:09:06 ineiros_ [n=ineiros@kosh.hut.fi] has joined #scheme 11:09:43 ventonegro [n=user@136.166.1.3] has joined #scheme 11:10:33 -!- ineiros [n=ineiros@kosh.hut.fi] has quit [Read error: 60 (Operation timed out)] 11:16:57 rincewind_ [n=rincewin@141.89.226.149] has joined #scheme 11:17:15 mr_uggla_ [i=mzsillan@melkinpaasi.cs.helsinki.fi] has joined #scheme 11:18:33 -!- rincewind_ is now known as rfgpfeiffer 11:19:41 -!- ejs [n=eugen@nat.ironport.com] has quit [Read error: 60 (Operation timed out)] 11:19:58 ejs [n=eugen@nat.ironport.com] has joined #scheme 11:20:57 -!- CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has quit [Read error: 60 (Operation timed out)] 11:21:09 -!- mr_uggla [i=mzsillan@melkinpaasi.cs.helsinki.fi] has quit [Read error: 110 (Connection timed out)] 11:23:09 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 11:23:39 -!- tizoc_ is now known as tizoc 11:23:42 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 11:23:52 -!- rfgpfeiffer [n=rincewin@141.89.226.149] has quit [] 11:24:35 attila_lendvai [n=ati@business-89-132-61-222.business.broadband.hu] has joined #scheme 11:28:05 -!- a1len [n=James@unaffiliated/a1len] has quit ["the young soldier fart his brother looked at each other, fart both knew that with love, fart truth, fart courage both would e] 11:30:43 pmatos [n=pmatos@pocm06r.ecs.soton.ac.uk] has joined #scheme 11:30:56 -!- pmatos [n=pmatos@pocm06r.ecs.soton.ac.uk] has quit [Read error: 104 (Connection reset by peer)] 11:32:21 -!- a-s [n=user@89.38.174.194] has quit [Remote closed the connection] 11:34:57 -!- gaja_ [n=Gabriel@c-0689e555.017-40-6c6b7013.cust.bredbandsbolaget.se] has quit ["Lost terminal"] 11:38:35 -!- z0d [n=z0d@unaffiliated/z0d] has quit [Read error: 60 (Operation timed out)] 11:40:41 hemulen [n=hemulen@cpe-069-134-114-252.nc.res.rr.com] has joined #scheme 11:40:41 -!- incubot [n=incubot@24.205.65.135] has quit [Read error: 54 (Connection reset by peer)] 11:42:51 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 11:44:15 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 11:45:36 incubot [n=incubot@24-205-65-135.dhcp.psdn.ca.charter.com] has joined #scheme 11:51:02 is there anything nearly as good as slime for scheme? 11:51:38 ilSignorCarlo [n=Mr_SpOOn@89-97-102-218.ip17.fastwebnet.it] has joined #scheme 12:00:17 -!- araujo [n=araujo@gentoo/developer/araujo] has quit ["Leaving"] 12:05:36 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 12:10:18 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 12:12:03 orgy` [n=ratm_@pD9FFF44D.dip.t-dialin.net] has joined #scheme 12:15:30 -!- orgy` [n=ratm_@pD9FFF44D.dip.t-dialin.net] has quit [Client Quit] 12:19:19 jewel [n=jewel@41.247.196.124] has joined #scheme 12:23:04 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 12:23:13 -!- GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has left #scheme 12:27:30 foof [n=user@195.207.5.2] has joined #scheme 12:32:09 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 12:32:48 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 12:34:04 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 12:37:47 mfredrickson [n=mfredric@c-98-212-171-158.hsd1.il.comcast.net] has joined #scheme 12:47:12 ejs1 [n=eugen@nat.ironport.com] has joined #scheme 12:47:52 -!- GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has quit ["Leaving."] 12:50:24 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 12:55:55 -!- ejs [n=eugen@nat.ironport.com] has quit [Connection timed out] 12:59:55 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 13:00:54 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 54 (Connection reset by peer)] 13:01:27 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 13:02:41 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 13:04:35 -!- pjdelport [n=pjd@dsl-243-31-29.telkomadsl.co.za] has quit [Connection reset by peer] 13:05:28 -!- ejs1 [n=eugen@nat.ironport.com] has quit [Read error: 110 (Connection timed out)] 13:06:58 pjdelport [n=pjd@dsl-243-31-29.telkomadsl.co.za] has joined #scheme 13:13:50 BW^- [i=Miranda@79.138.182.147.bredband.tre.se] has joined #scheme 13:14:00 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 13:18:47 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 13:23:15 neilv [n=user@dsl092-071-030.bos1.dsl.speakeasy.net] has joined #scheme 13:32:54 kib2 [n=kib@bd137-1-82-228-159-28.fbx.proxad.net] has joined #scheme 13:33:01 -!- leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 13:34:14 leppie [n=lolcow@dsl-243-62-141.telkomadsl.co.za] has joined #scheme 13:36:56 -!- pjdelport [n=pjd@dsl-243-31-29.telkomadsl.co.za] has quit [Connection timed out] 13:44:40 pjdelport [n=pjd@dsl-243-31-29.telkomadsl.co.za] has joined #scheme 13:46:57 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 13:48:24 Arelius: Well, there is SLIME48. But it's for Scheme 48 1.3, not the current 1.8, unless Riastradh has done something about that. Or there's MIT Scheme, which has its own implementation of Emacs. 13:48:40 hrm 13:49:06 I'll check those out 13:49:39 Scheme 48 1.3 is a righteous Scheme. 13:50:27 how dependent is SLIME48 on scheme 48 13:51:14 and what do you mean by righteous? 13:51:41 -!- Motoko_Kusanagi is now known as Kusanagi 13:52:08 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 13:52:10 You mean how portable is it to another Scheme? I think Riastradh's lack of updating it for 1.5+ is an indication of the nontrivial effort it would be. By 'righteous', I mean 'awesome'. 13:52:31 hrm 13:52:35 I'll check it out 13:52:38 :) 13:52:48 What sort of project is this for? 13:54:01 Working on a Photo Cataloging database, thought it'd be nice to have a better editing environment. 13:54:18 Better than what? Emacs? 13:54:44 well, SLIME is an emacs mode... 13:54:51 so, better then standard scheme mode. 13:56:12 Many Schemes come with custom Emacs modes. Gambit has a nice-ish one. Scheme 48 has one too. Scheme 48's respects the structure that a buffer belongs to, which is nice. 13:57:02 indeed 13:57:17 Scheme 48's is distinct from SLIME48. I used it until Riastradh converted me. I'm using S48 1.8 now, and I'm using raw scheme-mode, and have all my code in one ginormous file. 13:57:48 how does that work for you? 13:58:04 The ginormous source code file? 13:58:11 and I don't think having all my code in one file is practical. 13:58:20 yeah... 13:58:48 -!- BW^- [i=Miranda@79.138.182.147.bredband.tre.se] has quit ["Miranda IM! Smaller, Faster, Easier. http://miranda-im.org"] 13:59:59 With multiple Emacs frames and windows, it's not a big deal for me. Going back to a sane source organization would be difficult, as I'd need to tease apart the internal and external dependencies. My main source file is 1,509 lines. 14:00:16 Meh 14:00:24 I don't think I'd be able to handle that well 14:00:35 I don't recommend it...I just do it. 14:00:53 Heh 14:01:05 Sounds like you miss slime48 14:01:24 Yeah. 14:01:30 -!- benny [n=benny@i577A24CD.versanet.de] has quit [Read error: 145 (Connection timed out)] 14:03:30 And I have enough useful code lying around that the real problem is that I need a code librarian so I'm not re-using by cut and paste. 14:03:46 All in the single file? 14:06:10 I have code that has been around through several projects and whether I'm moving it into a new source tree or into the giant source file, it seems inadequate. I feel like I should be leaving behind some sort of edifice. 14:07:08 weird 14:07:37 ? 14:08:24 dunno exactally 14:09:22 the concept of a code librarian I figure. 14:09:40 offby1`` [n=user@q-static-138-125.avvanta.com] has joined #scheme 14:11:06 Nshag [i=user@Mix-Orleans-106-1-64.w193-248.abo.wanadoo.fr] has joined #scheme 14:11:42 I mean a person, by the way. Someone to organize all the code in a coherentaxonomy (or ontology, for the stuffed shirt crowd). 14:11:50 annodomini [n=lambda@nat-204-203.Dartmouth.EDU] has joined #scheme 14:12:07 I think I assumed the person part 14:13:23 Programmers need to specialize. Some OCD people would get off on that, refactoring and organizing all day, while others could focus on algorithms or whatever you young kids do today. 14:13:26 Anyways, I'm out for the night 14:13:28 Wii playing. 14:13:31 G'night. 14:13:57 algorithms or wii playing? =P 14:14:31 That's how we program these days, no? 14:14:32 Aight 14:14:37 Certinally 14:14:56 That's the only way to program, with you're wiimote in hand. 14:15:27 I don't know how to do that. God, I'm old! 14:16:19 antoszka [n=antoszka@unaffiliated/antoszka] has joined #scheme 14:16:27 hehe 14:16:29 Night 14:16:31 -!- Arelius [n=Indy@netblock-68-183-230-134.dslextreme.com] has quit [] 14:20:29 -!- pjdelport [n=pjd@dsl-243-31-29.telkomadsl.co.za] has quit [] 14:20:41 pjdelport [n=pjd@ampere.divmod.com] has joined #scheme 14:24:03 aneqrs [n=andreas@c83-253-104-206.bredband.comhem.se] has joined #scheme 14:24:52 -!- offby1` [n=user@q-static-138-125.avvanta.com] has quit [Connection timed out] 14:25:00 Modius [n=Modius@adsl-67-67-217-250.dsl.austtx.swbell.net] has joined #scheme 14:27:06 annodomini_ [n=lambda@64.30.3.122] has joined #scheme 14:27:53 offby1``` [n=user@q-static-138-125.avvanta.com] has joined #scheme 14:30:01 -!- jewel [n=jewel@41.247.196.124] has quit [No route to host] 14:33:05 -!- Kusanagi [n=Motoko@unaffiliated/kusanagi] has quit [Read error: 145 (Connection timed out)] 14:33:26 Kusanagi [n=Motoko@71-14-81-211.dhcp.stls.mo.charter.com] has joined #scheme 14:34:15 LobsterMan [n=a@host72-50.student.udel.edu] has joined #scheme 14:38:13 vasa [n=vasa@mm-132-88-84-93.dynamic.pppoe.mgts.by] has joined #scheme 14:38:23 -!- offby1``` [n=user@q-static-138-125.avvanta.com] has quit [Read error: 60 (Operation timed out)] 14:39:06 offby1``` [n=user@q-static-138-125.avvanta.com] has joined #scheme 14:41:44 -!- annodomini [n=lambda@wikipedia/lambda] has quit [Read error: 110 (Connection timed out)] 14:42:23 -!- offby1`` [n=user@q-static-138-125.avvanta.com] has quit [Read error: 110 (Connection timed out)] 14:44:52 -!- AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has quit ["foobar"] 14:47:16 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit ["+++ killed by SIGSEGV +++"] 14:47:25 benny [n=benny@i577A2355.versanet.de] has joined #scheme 15:03:10 annodomini [n=lambda@130.189.179.215] has joined #scheme 15:05:00 -!- annodomini_ [n=lambda@wikipedia/lambda] has quit [Read error: 110 (Connection timed out)] 15:09:06 jlongster [n=user@75.148.111.133] has joined #scheme 15:09:21 phao [n=phao@189.13.132.82] has joined #scheme 15:25:53 jewel [n=jewel@41.247.196.124] has joined #scheme 15:32:35 -!- ramkrsna [n=ramkrsna@unaffiliated/ramkrsna] has quit [Remote closed the connection] 15:32:52 -!- geckosenator [n=sean@c-24-8-193-190.hsd1.co.comcast.net] has quit [Read error: 145 (Connection timed out)] 15:41:21 -!- neilv [n=user@dsl092-071-030.bos1.dsl.speakeasy.net] has quit ["Leaving"] 15:47:55 -!- offby1``` is now known as offby1 15:53:20 orgy` [n=ratm_@pD9FFF44D.dip.t-dialin.net] has joined #scheme 15:59:56 -!- ecraven [n=nex@140.78.42.103] has quit ["bbl"] 16:00:39 wasabi______ [n=wasabi@ntoska205253.oska.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 16:01:31 wastrel [n=wastrel@nylug/member/wastrel] has joined #scheme 16:01:46 gaja [n=Gabriel@c-0689e555.017-40-6c6b7013.cust.bredbandsbolaget.se] has joined #scheme 16:07:58 tarbo [n=me@unaffiliated/tarbo] has joined #scheme 16:13:07 -!- wasabi_____ [n=wasabi@ntoska205253.oska.nt.ftth.ppp.infoweb.ne.jp] has quit [Read error: 110 (Connection timed out)] 16:13:46 -!- ventonegro [n=user@136.166.1.3] has quit ["ERC Version 5.2 (IRC client for Emacs)"] 16:14:49 -!- jlongster [n=user@75.148.111.133] has quit [Remote closed the connection] 16:23:05 can anyone take a look at this and possibly see why it's freezing? i was working on it yesterday and i still can't get it to work; each time a parallel thread calls make-ticket-seller it just skips over the whole body and doesn't evaluate anything inside 16:23:08 lobsterman pasted "freezing code?" at http://paste.lisp.org/display/71916 16:25:09 -!- kniu [n=kniu@CMU-311358.WV.CC.CMU.EDU] has quit [Read error: 110 (Connection timed out)] 16:25:35 ventonegro [n=user@136.166.1.3] has joined #scheme 16:25:43 kniu [n=kniu@OLAWDYME.RES.CMU.EDU] has joined #scheme 16:26:15 -!- jjong [n=user@203.246.179.177] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 16:29:27 peter_12 [n=peter@pool-71-105-154-91.lsanca.dsl-w.verizon.net] has joined #scheme 16:29:41 athos [n=philipp@92.250.204.223] has joined #scheme 16:31:48 offby1` [n=user@q-static-138-125.avvanta.com] has joined #scheme 16:32:40 LobsterMan: do you ever call the function "s" anywhere? 16:33:15 -!- phao [n=phao@189.13.132.82] has quit [Read error: 110 (Connection timed out)] 16:35:16 yeah 16:35:29 it's defined externally as (define s (make-serializer)) 16:35:36 does it need to be within make-ticket-seller? 16:38:41 -!- foof [n=user@195.207.5.2] has quit [Read error: 113 (No route to host)] 16:40:05 heck, I diunno 16:40:17 seems like you might want to call it though. 16:41:17 i do 16:41:21 maybe you're code isn't freezing: maybe it's looping in "sell" 16:41:24 or 16:41:26 ow 16:41:30 s/you're/your/ 16:41:49 i debugged, it skips over all the stuff inside (define sell 16:41:56 sam_ [n=Sami__@hoasnet-fe1add00-113.dhcp.inet.fi] has joined #scheme 16:42:41 hmm, looks like you're not calling _that_ function, either 16:42:56 hmm 16:42:56 the last line says "sell))", but maybe it should instead say "(sell)))" 16:43:10 is this your first Scheme program? 16:43:19 not first one, but i'm rather new to it 16:43:51 still hangs... 16:45:18 it looks like it's getting stuck in the mutex acquire/release 16:45:33 this probably means nothing to you heh 16:45:33 (cond ((eq? m 'acquire) 16:45:34 (semaphore-wait cell)) 16:45:43 that's where it hangs inside my mutex function 16:45:50 -!- offby1 [n=user@q-static-138-125.avvanta.com] has quit [Read error: 110 (Connection timed out)] 16:47:35 -!- elias` [n=me@unaffiliated/elias/x-342423] has quit [Read error: 145 (Connection timed out)] 16:49:04 Have you worked with semaphores and locking much, LobsterMan? 16:49:09 nope 16:49:10 :\ 16:49:14 first time actually 16:49:27 my prof gave us this big chunk of code and was like "make it serialized" 16:50:33 i can paste it all if you'd like to take a look 16:50:42 jeez 16:50:45 i'm just down to fixing this last part to actually make it work...and it wont......and it's driving me crazy 16:51:05 jlongster [n=user@75.148.111.133] has joined #scheme 16:52:27 Generally when you wait on a semaphore and it hangs, that's because another thread has not incremented the semaphore. 16:52:39 i think i probably have some extra parenthesis somewhere 16:52:55 or missing some 16:53:08 Finding out which thread isn't acting right can be something of a challenge. 16:53:22 i just define 10 make-ticket-seller's 16:53:25 What editor are you using, LobsterMan? 16:53:28 drscheme 16:53:37 conforming to sicp standards 16:54:02 LobsterMan: I never use semaphores because they lead to confusion like yours 16:54:02 it looks like it's getting hung up on the release 16:54:12 yeah... 16:55:27 (define s (make-serializer)) 16:55:37 should that be inside or outside of my make-ticket-seller function 16:55:50 if i call m-t-s from a parallel-execute 16:56:23 Also, it just has to be serialized right? No need for semaphores. Near as I can tell, a "serializer" in MIT-scheme is another word for a lock. 16:56:25 So when you do (s thunk) it returns a procedure that locks, calls thunk, then unlocks, right? 16:56:36 yaeh 16:56:44 but it doesn't look like it's unlocking it 16:56:45 If two procedures try to do that in parallel, the first must unlock before the second can lock, so it happens in series. 16:56:55 that's the idea, but the first never lets go 16:56:56 ;p; 16:56:58 lol* 16:57:26 we'll never figure it out unless you paste _all_ your code. Note: this message does not constitute an offer to debug your code. 16:57:38 hehe i know ;P 16:58:10 lobsterman pasted "halp plz <3" at http://paste.lisp.org/display/71921 16:58:23 If you have one lock, that never gets unlocked, then one of your serialized procedures is probably never finishing... 16:58:43 well if anyone sees anyting glaring i'd appreciate if you say something, i'm still changing little things here and there 16:58:53 -!- jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has quit [Read error: 60 (Operation timed out)] 16:59:34 LobsterMan: Place the cursor to the right of a ), then press "Alt-left". Then press "Alt-right". That might help you keep your parentheses lined up. 17:00:24 hehe 17:01:43 my red arrow points to the first ( at ((s (lambda () (if 17:02:11 Oh, I see. You're implementing locks using semaphores. 17:02:13 langmartin [n=user@75.148.111.133] has joined #scheme 17:02:32 from semaphore-wait to, ((s , to (let ((value (apply p args))) 17:02:33 (mutex 'release) 17:02:40 then down to (test) 17:02:44 my instinct would be to protect the global *SEATS-LEFT* with a lock of some kind; I don't see why you'd need any locks besides that single one 17:02:49 So it's a special case, and most of the weirdness about semaphores doesn't apply. 17:03:12 there' both mutexes and semaphores in there :-( 17:03:13 confusing 17:03:48 No, there mutexes are defined in terms of semaphores. 17:04:07 but can't a ticket be sold by another parallel seller, say if there's 1 left, A checks and then waits, but B buys the last ticket in that time? 17:04:18 that's why i wanted it to query/modify all in one "cycle" 17:06:00 I (having been exposed to Erlang) might even write a little "ticket pool" server thread, that hands out tickets one at a time 17:06:07 sellers would get a ticket from it 17:06:11 hehe 17:06:16 i'm not trying to overcomplicate this anymore X| 17:06:22 eugh, my-sleep is awful 17:06:24 if I'm right, it'd vastly simplify it. 17:06:37 hmm 17:06:52 we're not supposed to change anything outside of make-ticket seller though 17:06:56 are you allowed to use any feature of the language, or are you required to use semaphores? If the latter, I give up. 17:07:12 whatever we want, as long as it's not outside of make-ticket-seller 17:07:13 lol 17:07:14 oh, so you're stuck with the *SEATS-LEFT* global? 17:07:20 Ah here's your problem LobsterMan.   (let ((seats *SEATS-LEFT*)) 17:07:25 VERY BAD IDEA 17:07:38 any suggestions? 17:07:52 -!- sam_ [n=Sami__@hoasnet-fe1add00-113.dhcp.inet.fi] has quit [] 17:07:56 *SEATS-LEFT* in parallel its value might change at any time. 17:08:18 When you  (let ((seats *SEATS-LEFT*)) you are saving its current value, but seats will never change since other threads have no access to it. 17:08:28 oh i see 17:08:34 so it really was permanently locked 17:08:45 So either you need to serialize the whole let statement (which would er, work) or just use *SEATS-LEFT* everywhere. 17:09:10 And be sure to serialize when you modify *SEATS-LEFT* 17:09:33 but if i dont serialize it all, can't it possibly change between the measure of its value and the ((s where i change it? 17:10:23 -!- vasa [n=vasa@mm-132-88-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 17:11:18 Freezing ... it was freezing code in that hotel. 17:11:18 it hangs at ((s (lambda () (if (customer-order seats).... 17:11:22 not on (let ((seats *SEATS-LEFT*)) 17:12:18 or maybe it's pointing to right after (let ((seats *SEATS-LEFT*)) 17:12:22 Forget about what it does. The important thing is that you have a good grasp of exactly what you're trying to do. Then the flaws will obviate themselves. 17:12:34 yeah...working on just that 17:12:34 lol 17:13:09 If I were you I'd make functions seats-decr! and seats-incr! that were already serialized, and decrement and increment *SEATS-LEFT*. Nothing else would need to be serialized, but don't use the let statement. 17:13:29 within make-ticket-seller? 17:14:13 Within the scope of *SEATS-LEFT* 17:14:47 i have an idea... 17:14:52 Also you probably should refuse to sell a ticket if seats left are 0. Don't increment tickets-sold, print an error, etc. I don't see any checks for that. 17:15:09 ((s (lambda () (if (customer-order *SEATS-LEFT*) 17:15:09 (begin (set! *SEATS-LEFT* (- *SEATS-LEFT* 1));record sale 17:15:09 ;globally 17:15:09 (set! total-tickets-sold (+ total-tickets-sold 1)) 17:15:09 ;local 17:15:10 ;record 17:15:12 (sell)) ;continue selling 17:15:14 (print-tickets-sold name total-tickets-sold))))))) 17:15:16 sorry about the spam lol 17:15:24 ack 17:15:58 watch yourself before you hit enter 17:16:04 same thing 17:16:11 i think it's something inside my 'begin' 17:16:44 LobsterMan, do you want to do the whole sell loop in a single atomic action, serialized by S? 17:16:49 yeah 17:16:51 ideally if i can 17:17:02 i'm not worried about performance, i just want the damn thing to work 17:17:02 lol 17:17:17 So that only one seller can be active for the duration of the sale, and all the others get locked out? 17:17:21 Yes, it is. 17:17:44 that's what i'm going for 17:17:51 and the other sellers do their business in the random wait period 17:17:55 Because you don't serialize decrementing the seats left. 17:17:55 Oh, well that's simple... 17:18:13 i thought it was serialized 17:18:17 jonrafkind [n=jon@wireless256.wireless.utah.edu] has joined #scheme 17:18:25 it's within the serialized lambda at least 17:18:26 -!- aneqrs [n=andreas@c83-253-104-206.bredband.comhem.se] has quit [Read error: 145 (Connection timed out)] 17:18:30 jeez I had a totally different idea, sorry. 17:18:41 No, LobsterMan, I think you misunderstand: You don't want *only*one*seller* ever. You want each seller to have control sometimes. 17:19:00 Also, does ((S (LAMBDA () ((S (LAMBDA () ...)))))) block the program? 17:19:13 LobsterMan: (let ((seats *SEATS-LEFT*)) is outside the serialized lambda. That's a bad idea. 17:19:54 i moved it back inside now 17:20:05 but i think i can take the total-tickets-sold incrementation ut 17:20:06 out 17:20:11 Ehe, Riastradh is so wise 17:20:37 Riastradh helped me for a while yesterday, this is still a work in progress :] 17:20:43 elias` [n=me@unaffiliated/elias/x-342423] has joined #scheme 17:21:14 Just serialize the whole sell procedure, LobsterMan, not just around part of it. Only one person will be able to sell then, but it should work. Do check if there are enough seats left though. 17:21:26 Right now, you basically have each seller try to grab the lock and then do all the sales, without ever relinquishing the lock until all seats are sold. No seller but the first one has an opportunity to sell anything. 17:21:43 And when you recurse, it'll still...double lock, ugh. It might be a bit more complicated. 17:21:49 so should the wait be outside of (define (sell ? 17:21:56 Only it's not quite that -- you may have the first seller grab the lock, do a sale, grab the lock *again*, &c. 17:22:20 Break it into two separate procedures, LobsterMan. One procedure to loop. One procedure to sell a single ticket (atomically) and to return a boolean of whether or not a ticket was sold. 17:22:52 so...serializing within serializations? 17:22:53 (define (sell) ((serialized (lambda () the entire sell procedure))) ; not serialized here (sell)) 17:22:56 *LobsterMan* has a headache 17:23:06 That might be a wiser idea, Riastradh. 17:23:20 NO 17:24:05 (define (sell-tickets) (if (sell-one-ticket) (sell-tickets) #f)) 17:24:32 so this is all taking place inside just make-ticket-seller 17:24:35 X_X 17:24:38 ok give me a sec 17:25:16 and then serialize the whole sell-one-ticket procedure, and have it return whether there are any tickets left. 17:25:36 yes LobsterMan. I'm just agreeing with Riastradh. 17:25:54 and where will sleep now come in? 17:26:02 between the loop and calling loop again? 17:26:21 Oh right... 17:26:35 (define (sell-tickets) (sleepytime) (if (sell-one-ticket) (sell-tickets) #f)) 17:26:40 aneqrs [n=andreas@c83-253-104-206.bredband.comhem.se] has joined #scheme 17:26:57 and sell-tickets is defined after all that mess? 17:27:01 Just make sure the sleep happens outside of serialization, really. 17:27:49 sell-tickets is define after sell-one-ticket, yes. 17:30:05 ok, i think i've got this... 17:30:11 putting it together....... 17:33:04 -!- peter_12 [n=peter@pool-71-105-154-91.lsanca.dsl-w.verizon.net] has quit [] 17:34:37 tizoc_ [n=user@r190-135-6-194.dialup.adsl.anteldata.net.uy] has joined #scheme 17:35:53 ot 17:35:59 it's giving me crap about my placement of (let ((total-tickets-sold 0)) 17:36:08 -!- tizoc [n=user@r190-135-30-34.dialup.adsl.anteldata.net.uy] has quit [Nick collision from services.] 17:36:25 -!- tizoc_ is now known as tizoc 17:41:30 lobsterman pasted "status update?" at http://paste.lisp.org/display/71924 17:44:41 (#T) makes no sense. 17:44:43 rudybot: eval (#t) 17:44:43 Riastradh: error: procedure application: expected procedure, given: #t (no arguments) 17:44:56 yeah i wasn't sure how to handle that 17:45:01 it needs to return true somehow 17:45:06 So write #T. 17:45:11 can i just do that? 17:45:11 No different from #F. 17:45:18 rudybot: eval #t 17:45:18 Riastradh: ; Value: #t 17:45:24 rudybot: eval (if #t #t 'lose) 17:45:24 Riastradh: ; Value: #t 17:45:31 rudybot: eval (begin (display 'fnord) #t) 17:45:31 Riastradh: ; Value: #t 17:45:31 Riastradh: ; stdout: "fnord" 17:45:41 nice XD 17:45:42 it works 17:45:50 You are missing a closing round bracket after (MY-SLEEP (RANDOM 2)). 17:46:02 yeah i fixed that 17:46:16 thanks very much <3 17:48:47 Yeah, oops. 17:48:47 The last expression of a begin statement is its value. 17:49:37 and now i know 17:49:49 *LobsterMan* says knowing is half the battle 17:50:02 By the way, you can simplify your definition of SELL-ONE? like so: 17:50:03 rudybot: eval (begin 42 23 #t) 17:50:03 awesome! 17:50:03 *synx* gets 17:50:04 synx: ; Value: #t 17:50:13 (define (sell-one?) ((s (lambda () (if ...))))) 17:50:15 ==> 17:50:23 (define sell-one? (s (lambda () (if ...)))) 17:51:05 i thought i need the extra parenthesis? 17:51:09 maybe not 17:52:00 if it doesn't add anything other than visual distinction i'm going to leave it (im used to very verbose c++ code :P) but does it actually affect performance? 17:52:04 The first defines a procedure SELL-ONE? that turns a non-serialized procedure into a serialized procedure and ccalls it. 17:52:14 The second defines SELL-ONE? to be the serialized procedure returned by S. 17:52:25 In this case, the two are equivalent. 17:53:18 i thought when dealing with serializers you needed the (( 17:53:49 What does `((' *mean*? That's more important than what it cosmetically looks like. 17:55:03 doesn't it pass a procedure 17:55:06 LobsterMan: parens in scheme are _never_ optional; they always have a precise meaning 17:55:07 and ( is just the result 17:55:08 it's not like C 17:55:45 is that correct? (( will return the procedure while ( returns the result? 17:55:47 ( ...) means an application of an operator, such as a procedure or a special operator (LET, DEFINE, &c.), to some operands. 17:56:07 (S (LAMBDA () ...)) creates a procedure of zero arguments and passes that procedure as an argument to S. 17:56:09 What does S return? 17:56:14 How old is Ann? 17:56:44 i thought the ((S was required in this instance 17:57:25 If I can write ((S (LAMBDA () ...))), then (S (LAMBDA () ...)) has an independent meaning, which the meaning of ((S (LAMBDA () ...))) is dependent on. 17:57:44 kilimanjaro [n=kilimanj@70.116.95.163] has joined #scheme 17:57:50 You are perfectly welcome to call S with an argument and not do anything interesting with what it returns. 17:57:50 ahhh well i'm just confusing myself even more now, i've got to head out to class 17:57:53 Try it, at the REPL. 17:58:00 Type (S (LAMBDA () 'FNORD)). 17:58:13 thanks again everyone, i'll probably be back later ;) 17:58:18 ERR: DONT-SEE-THE-FNORD (enter debugger) 17:58:19 rudybot: (S (LAMBDA () 'FNORD)) 17:58:28 rudybot eval (S (LAMBDA () 'FNORD)) 17:58:30 No, LobsterMan, it won't work with rudybot because he doesn't know what S is. 17:58:34 :D 17:58:39 and because he left out the colon 17:58:42 i need to take a nap and go to class 17:58:43 rudybot: eval (S (LAMBDA () 'FNORD)) 17:58:44 offby1`: error: eval:1:11: #%app: missing procedure expression; probably originally (), which is an illegal empty application in: (#%app) 17:58:48 cya everyone X} 17:58:56 weird 17:59:04 rudybot: eval (LAMBDA () 'FNORD) 17:59:04 offby1`: error: eval:1:8: #%app: missing procedure expression; probably originally (), which is an illegal empty application in: (#%app) 17:59:14 rudybot: eval (lambda () 'FNORD) 17:59:15 offby1`: ; Value: # 17:59:20 rudybot: eval (S (lambda () 'FNORD)) 17:59:20 offby1`: error: reference to undefined identifier: S 18:00:11 rudybot: eval (S ( () 'FNORD)) 18:00:12 offby1`: error: eval:1:6: #%app: missing procedure expression; probably originally (), which is an illegal empty application in: (#%app) 18:00:42 offby1`, rudybot is in non-standards-compliant mode. 18:00:50 rudybot: eval (S ( () 'FNORD)) 18:00:50 offby1`: error: reference to undefined identifier: S 18:00:59 case-sensitive 18:02:56 LobsterMan: This is a bit late, but (define (a b) c) is equivalent to (define a (lambda (b) c)). So (define (a) (lambda () b)) is like (define a (lambda () (lambda () b))) 18:04:33 kind of important to know 18:04:35 offby1 [n=eric@m3c0436d0.tmodns.net] has joined #scheme 18:08:27 :D 18:08:36 ok i'm afk for real now, thanks for the tidbit though 18:09:00 i do not envy. 18:17:14 melito [n=melito@70.99.250.82] has joined #scheme 18:20:03 I wouldn't mind being afk 18:21:43 easy to arrange -- just throw the kbd across the room 18:22:05 It's attached to the laptop and I don't want to throw that 18:23:37 geckosenator [n=sean@c-24-8-193-190.hsd1.co.comcast.net] has joined #scheme 18:25:57 -!- offby1 [n=eric@m3c0436d0.tmodns.net] has quit [Read error: 54 (Connection reset by peer)] 18:30:26 -!- mqt [i=tran@monaco.nirv.net] has quit [Read error: 60 (Operation timed out)] 18:33:12 mr_uggla [i=mzsillan@melkinpaasi.cs.helsinki.fi] has joined #scheme 18:33:26 mqt [i=tran@monaco.nirv.net] has joined #scheme 18:34:35 elf_ [i=elf@antenora.aculei.net] has joined #scheme 18:41:08 Debolaz [n=debolaz@nat.andersberle.com] has joined #scheme 18:42:36 -!- elf [i=elf@antenora.aculei.net] has quit [Read error: 104 (Connection reset by peer)] 18:44:52 -!- mr_uggla_ [i=mzsillan@melkinpaasi.cs.helsinki.fi] has quit [Read error: 110 (Connection timed out)] 18:46:35 -!- fschwidom [n=fschwido@dslb-088-068-124-061.pools.arcor-ip.net] has quit [Connection timed out] 18:47:26 hotblack23 [n=jh@p5B055BFB.dip.t-dialin.net] has joined #scheme 18:51:21 jgracin [n=jgracin@82.193.208.195] has joined #scheme 18:56:09 phao [n=phao@189.13.133.142] has joined #scheme 19:00:47 -!- szgyg [n=luni@dsl5401B2BA.pool.t-online.hu] has quit ["ChatZilla 0.9.84 [Firefox 3.0.4/2008102920]"] 19:01:05 exexex [n=chatzill@88.234.190.170] has joined #scheme 19:08:15 fschwidom [n=fschwido@dslb-088-068-124-061.pools.arcor-ip.net] has joined #scheme 19:09:29 -!- tizoc [n=user@r190-135-6-194.dialup.adsl.anteldata.net.uy] has quit [Read error: 54 (Connection reset by peer)] 19:09:58 tizoc [n=user@r190-135-33-74.dialup.adsl.anteldata.net.uy] has joined #scheme 19:15:16 REPLeffect [n=REPLeffe@69.54.115.254] has joined #scheme 19:16:25 mejja [n=user@c-4db6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 19:20:55 hmm...how can i merge 2 streams? 19:21:02 -!- incubot [n=incubot@24-205-65-135.dhcp.psdn.ca.charter.com] has quit [Read error: 113 (No route to host)] 19:22:27 incubot [n=incubot@24.205.65.135] has joined #scheme 19:22:28 is it a matter of interleaving the list tails? 19:32:01 vixey [n=vicky@amcant.demon.co.uk] has joined #scheme 19:38:45 ecraven [n=nex@140.78.42.103] has joined #scheme 19:38:56 (let ([s1car (stream-car s1)] 19:38:56 [s2car (stream-car s2)]) 19:38:58 hmmmmmm 19:39:17 LobsterMan, using tabs in the source code? 19:40:27 yeah 19:40:33 it doesn't copy and paste well to irc :) 19:40:46 LobsterMan do you use emacs or what? 19:40:55 AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has joined #scheme 19:41:04 i'm just piping drscheme in from my university's unix server via xterm 19:41:22 I thought drscheme converts tabs into spaces 19:41:43 if i select correctly it usually preserves it pretty well 19:41:46 but i didnt, so it didnt :P 19:42:01 (let ([s1car (stream-car s1)] 19:42:02 [s2car (stream-car s2)]) 19:42:06 did that come out correctly? 19:42:08 yeah 19:42:16 I just used drscheme 19:42:22 and tab to make it indent 19:42:26 .....so that's weird 19:42:53 oh well 19:43:07 ; it is possible to define most list functions for streams 19:43:07 ; takes a stream and a positive number and returns the nth 19:43:07 ; element of the stream 19:43:07 (define (stream-ref stream n) 19:43:07 (if (= n 0) 19:43:08 (stream-car stream) 19:43:10 (stream-ref (stream-cdr stream) (- n 1)))) 19:43:12 that's better 19:43:20 sometimes x is kind of iffy in windows 19:44:45 LobsterMan: do you not have a stream-map funtion? 19:44:47 Which are the list functions that are not "most list functions"? which you cannot define on a stream 19:45:08 or a stream-for-each proc? 19:45:36 let me see 19:46:04 (define (stream-for-each proc stream) 19:46:05 close to map 19:46:18 oh wait 19:46:18 (define (stream-map proc stream) 19:46:22 mkost list functions are elemtary, I even suggest you try rewrite them so you can see how 'simple' they are 19:46:24 hi leppie 19:46:35 i've been provided with them 19:46:53 (stream-map proc list1 . lists) would make more sense 19:47:09 for every list/stream 19:47:19 you add a parameter to proc 19:48:23 leppie,,,,,,, 19:48:35 yeah well, my prof gave these to us and i don't really feel like changing them lol 19:48:41 bogonflux [n=bogonflu@c-76-98-192-104.hsd1.nj.comcast.net] has joined #scheme 19:48:47 https://ironscheme.svn.codeplex.com/svn/IronScheme/IronSchemeConsole/build/lists.ss <-- all the elemetary list functions, if your interface do not support them, just write it yourself 19:48:49 -rudybot:#scheme- http://tinyurl.com/6hagvv 19:49:09 lol? 19:49:23 IronScheme is written in C# 19:49:31 so just rewrite for-each, to handle any arity procs 19:49:33 lame......... 19:49:34 i like the indents heh 19:49:45 vixey: your point is? 19:49:45 -!- bogonflux [n=bogonflu@c-76-98-192-104.hsd1.nj.comcast.net] has quit [Remote closed the connection] 19:49:59 pitui [n=pitui@c-76-98-192-104.hsd1.nj.comcast.net] has joined #scheme 19:50:12 sorry some indents are off, changes in editors... 19:50:13 leppie: lame......... 19:50:20 leppie, did you write it 19:50:27 your nick is lame... 19:50:40 leppie, are you the author of IronScheme 19:50:42 yes I am writing it 19:50:44 leppie, are you the author of IronScheme 19:50:47 leppie, lame 19:50:56 leppie, why didn't you use scheme 19:51:09 i was trying to make a point, you saying something without backing up your statement 19:51:35 well you cant bootstrap from fuckall, can you? i am getting there :p 19:51:39 leppie, IronScheme is a bad idea 19:51:51 vixey, please be either civil and coherent, or somewhere else. 19:51:56 what is different when scheme gains iron? 19:52:12 geckosenator: hardness :p 19:52:14 lol Riastradh 19:52:15 lol jk 19:52:22 I came here because everyone is asking stuff like "how do I get bigger ints?" and driving me nuts 19:52:33 *LobsterMan* is n00b 19:53:07 geckosenator: probably nothing, but at least I can say I tried my ass off, and still there was nothing :p 19:53:12 vixey, if you want to discuss the technical merits of Scheme implemented in C#, you are welcome to do that, but you are not welcome to idly deride someone who has chosen to do that because you have some personal vendetta against the concept. 19:53:33 you derided me when I said I was going to write my own scheme implementation! 19:53:35 -!- incubot [n=incubot@24.205.65.135] has quit [Read error: 104 (Connection reset by peer)] 19:53:50 do you remember ? :) 19:54:11 honesty I am starting to doubt the ability for .NET to run functional languages fast, but I am yet to proove that 19:54:23 I don't really care one way or the other 19:54:26 leppie, is there really no bytecode to target? 19:54:50 what do you mean? 19:55:16 I may have advised against the proliferation of Scheme implementations, because that detracts from the amount of effort that can be put into each one; I observe that most Scheme implementations out there are not very capable. That's very different from saying `Scheme on C# is lame and you have bad ideas'. 19:55:35 Riastradh ok 19:55:59 given F#'s semantics being damn close to SML, I would think a SCheme would fit in very nicely 19:56:17 leppie, why don't you compile scheme into F#? 19:56:17 if I dont get there , tough 19:56:19 Generally I don't approach someone to say that their ideas are lame without any qualification. 19:56:55 vixey, I can compile Ypsilon in .NET bytecode, and have it running 10 times faster than IronScheme, but that is not the point 19:57:08 I don't know what Ypsilon 19:57:26 yes, there you go 19:57:37 there I go 19:57:43 my professor is evil..... 19:57:45 take a look at #1 19:57:46 http://www.cis.udel.edu/~mccoy/courses/cisc280-08f/Homeworks/hw9/Homework9.htm 19:57:47 -rudybot:#scheme- http://tinyurl.com/56bj8u 19:58:35 Argh. 19:58:39 LobsterMan, that's so evil 19:58:43 incubot [n=incubot@24.205.65.135] has joined #scheme 19:58:43 The very first fragment of code on that page has an error, LobsterMan. 19:58:51 orly? 19:59:02 i'd love to be like "yo prof, you're wrong, gimme extra credit" 19:59:06 Inform your professor that mutation of literally quoted lists is an error. The initial definition should be (DEFINE L (LIST 1 2 3 4 5)), not (DEFINE L '(1 2 3 4 5)). 19:59:07 setting the CDR of a literal 19:59:30 yeah i was playing around with that 19:59:32 and it wasn't working 19:59:44 haha, Riastradh :) 19:59:46 i thought i just didn't know what i was doing, but it's kind of relieving to know my prof isn't 100% either :) 19:59:58 good catch 20:00:05 LebsterMan, it's a total noob mistake 20:00:11 LebsterMan, iyou should tell him that 20:00:13 most schemes does not enforce that though 20:00:54 haha it's a she 20:01:11 so you have to detect if a list has a cycle using EQ? 20:01:12 MichaelRaskin_ [n=raskin@gwh-1-177-mytn23k1.ln.rinet.ru] has joined #scheme 20:01:30 Few Scheme systems will exhibit the same behaviour, leppie, independent of whether the list was literal or dynamically built. 20:01:46 and then list the lengths of the unique part and the repeated part 20:01:49 :{ 20:01:59 you hsould be careful with like 20:02:02 name [n=name@sburn/devel/name] has joined #scheme 20:02:03 '(1 2 3 1 2 3 1 2 3) 20:02:07 if you said it's infinite 20:02:14 yeah i'm not sure how something like that would be handled 20:02:17 that would be wrong 20:02:25 r5rs EQ? 20:02:25 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_216 20:02:26 -rudybot:#scheme- http://tinyurl.com/6hr3jb 20:02:27 obviously this function is just supposed to be obnoxious and impractical for us 20:02:42 it's a good question actually 20:02:46 Your length procedure should be independent of the elements of the list. 20:02:50 -!- kniu [n=kniu@OLAWDYME.RES.CMU.EDU] has quit [Read error: 110 (Connection timed out)] 20:02:51 memq looks useful also 20:03:01 Riastradh you're giving away the hints! 20:03:12 so am II 20:03:25 *LobsterMan* loves charity 20:03:41 kniu [n=kniu@CMU-311358.WV.CC.CMU.EDU] has joined #scheme 20:04:59 -!- ventonegro [n=user@136.166.1.3] has quit [Remote closed the connection] 20:06:59 memq 20:07:00 heh... 20:07:42 -!- athos [n=philipp@92.250.204.223] has quit [Read error: 104 (Connection reset by peer)] 20:08:05 athos [n=philipp@92.250.204.223] has joined #scheme 20:10:32 can i do like 20:10:45 (and (not expr1) (not expr2)) 20:11:19 You can answer that yourself. 20:11:31 no you have to write (not (or expr1 expr2)) 20:11:55 that works too 20:14:53 rudybot: eval (cons-stream 'empty) 20:14:53 LobsterMan: error: reference to undefined identifier: cons-stream 20:14:59 will that work? 20:15:58 If you define CONS-STREAM in the usual way, consistent with SICP, then that will work to yield an error about a wrong number of arguments. 20:16:20 I thught SICP calls it STREAM-CONS 20:16:23 heh i have defined the-empty-stream 20:16:29 No, vixey. 20:16:34 (cons-stream the-empty-stream) seems to work 20:16:35 CONS usually takes exactly two arguments 20:16:41 SRFI forty-whatsit defines STREAM-CONS. 20:16:53 weard 20:17:01 they use STREAM-CAR STREAM-CDR and CONS-STREAM 20:17:05 hmm 20:17:08 maybe not 20:17:11 dsmith [i=txqq1vd3@cpe-71-74-230-225.neo.res.rr.com] has joined #scheme 20:17:29 (define-syntax cons-stream 20:17:29 (syntax-rules () 20:17:29 ((cons-stream value-expr call-expr) 20:17:29 (cons value-expr (delay call-expr))))) 20:19:44 -!- mfredrickson [n=mfredric@c-98-212-171-158.hsd1.il.comcast.net] has quit [] 20:22:00 what else is going on in scheme 20:23:12 Post-R6RS depression 20:23:24 why did you have to remind me :( 20:23:45 waterh [n=waterh@114.143.39.78] has joined #scheme 20:26:57 -!- jonrafkind [n=jon@wireless256.wireless.utah.edu] has quit ["Leaving"] 20:27:03 jonrafkind [n=jon@wireless256.wireless.utah.edu] has joined #scheme 20:29:22 -!- saccade_ [n=saccade@65.78.24.47] has quit ["This computer has gone to sleep"] 20:29:42 Riastradh: what do you think I Should do 20:32:18 vixey: flip a coin? 20:36:30 vixey: heads 20:38:12 do about what? 20:38:38 -!- jewel [n=jewel@41.247.196.124] has quit [Read error: 60 (Operation timed out)] 20:41:14 BW^- [i=Miranda@79.138.206.86.bredband.tre.se] has joined #scheme 20:41:44 -!- BW^- [i=Miranda@79.138.206.86.bredband.tre.se] has left #scheme 20:49:31 edico [n=Edico@unaffiliated/edico] has joined #scheme 20:49:42 hello 20:49:53 hi 20:50:16 this is a channel for scheme programming language? 20:50:22 yes 20:50:35 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 20:51:26 valiza1 [n=haroldo@r190-133-150-110.dialup.adsl.anteldata.net.uy] has joined #scheme 20:52:29 hi edico 20:52:32 jewel [n=jewel@dsl-242-150-157.telkomadsl.co.za] has joined #scheme 20:52:33 are you learning scheme 20:53:10 I just read somewhere that the best book for learn programming is SICP 20:53:18 oh that's true 20:53:52 in a critic of that book I read that a better book for learn programming is HTDP 20:54:08 I don't think so no, HTDP isn't great 20:54:10 SICP is great. 20:54:23 they both use scheme 20:54:28 Vaeshir [n=zane@c-66-31-28-121.hsd1.ma.comcast.net] has joined #scheme 20:55:15 other people say that I should begin with C so that I easily go further to C++ and java that are syntax like C 20:55:24 Lies. 20:55:29 :) 20:55:36 I'm a bit annoyed 20:55:45 everyone is learning C and C++ now 20:55:46 But you know what kind of responses you're going to get here. 20:55:54 it's a shame 20:56:26 they don't know what's good for them! 20:56:46 gigabytes [n=gigabyte@host57-236-dynamic.24-79-r.retail.telecomitalia.it] has joined #scheme 20:56:50 hello 20:56:57 Vaeshir, ok I understand 20:57:09 Vaeshir, yeah everyone here is totally biased 20:57:10 is there a nopaste service with Scheme syntax highlighting? 20:57:13 I just enter to verify that exist a such channel 20:57:18 paste.lisp.org 20:57:20 BW^- [i=Miranda@79.138.206.86.bredband.tre.se] has joined #scheme 20:57:21 -!- geckosenator [n=sean@c-24-8-193-190.hsd1.co.comcast.net] has quit [Read error: 110 (Connection timed out)] 20:57:24 thanks 20:58:29 -!- valiza2 [n=haroldo@r190-133-130-122.dialup.adsl.anteldata.net.uy] has quit [Read error: 145 (Connection timed out)] 21:01:36 lisppaste: url 21:01:37 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 21:03:27 gigabytes pasted "lambda" at http://paste.lisp.org/display/71939 21:03:51 lambda? I've not called it lambda :P 21:04:11 uh? 21:05:04 -!- jgracin [n=jgracin@82.193.208.195] has quit [Remote closed the connection] 21:05:36 gigabytes, :? 21:06:47 vixey: the bot said I've pasted that code 21:06:52 but I've not pasted it 21:06:57 gigabytes, I did it for you 21:07:08 ah 21:07:11 ok 21:07:14 why? XD 21:07:20 gigabytes, I'm just bored :/ 21:07:24 asd 21:07:31 but what does that code do? 21:07:45 dunno 21:07:48 vixey: you want some work to do? 21:07:55 no I don't want work to do 21:08:00 darn. 21:08:05 why? 21:08:26 I'd rather be programming scheme right now than doing web stuff. 21:08:33 web stuff is boring 21:08:58 A lot of it is. CSS/HTML, resource management, etc. Javascript is pretty interesting 21:08:58 web stuff in Scheme might be great 21:09:05 not even in scheme 21:09:35 at least i agree with you there vixey :p 21:09:37 I think an efficient Scheme->Javascript compiler specifically targeting browser Javascript would be really interesting 21:09:49 jlongster: I thought someone did that. 21:10:23 Look at Cappuccino 21:10:27 there's parenscript for lisp 21:10:31 if you think web it's boring XD 21:10:45 Dark-Star [i=Darkstar@p57B55BF2.dip.t-dialin.net] has joined #scheme 21:10:50 The only one I know of is Feeley's, but the Firefox javascript parser can't handled the resulting js (stack overflow when parsing) 21:10:52 I'd personally rather have a plugin for browsers that runs Scheme in the browser. 21:11:10 well, true 21:11:18 plugins are the evil 21:11:22 look at Flash.. 21:11:37 gigabytes: Just because they can be abused doesn't make them evil. 21:11:56 hardware drivers are plugins 21:12:21 leppie: I'm talking about Browsers plugins 21:12:29 not Firefox extensions 21:13:41 A plugin still makes it harder to manage and deploy web apps 21:13:52 Abuse should be expected and plugins should have a click to play blocker on by default 21:13:55 but, they have their place 21:14:55 arcfide: i can do a scheme-like language to run in Silverlight, but that wont really be Scheme... 21:15:08 wow, ParenScript looks cool 21:16:01 leppie: I'm afraid that's not really helpful. :-) 21:17:05 arcfide: maybe someday when the C# language support comes to Silverlight, I can write a fast Scheme interpreter for it 21:17:30 Nice. 21:17:41 I'm actually pondering the creation of a Scheme plugin myself. 21:17:45 some guy is doing a Clojure port now 21:17:57 but I dont really get Clojure 21:18:17 It seems like a lot of people like it, but I have not seen any reason to switch. 21:18:53 maybe jaba do not offer enough :) 21:19:34 Arelius [n=Indy@netblock-68-183-230-134.dslextreme.com] has joined #scheme 21:19:55 Man, why can't web developers use more technologies like ParenScript? It's hard to use something when it cuts them off from the whole community 21:20:29 -!- jonrafkind [n=jon@wireless256.wireless.utah.edu] has quit [Read error: 60 (Operation timed out)] 21:20:32 I like using S-expressions as a substiture for XML 21:21:06 so much simpler to write 21:21:18 puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has joined #scheme 21:21:20 and parse 21:21:34 -!- BW^- [i=Miranda@79.138.206.86.bredband.tre.se] has quit [Read error: 110 (Connection timed out)] 21:21:43 XML->S-expr is easy too 21:26:16 -!- aneqrs [n=andreas@c83-253-104-206.bredband.comhem.se] has quit [] 21:28:04 -!- Daemmerung [n=goetter@1133sae.mazama.net] has quit ["Smoove out."] 21:30:40 -!- Mr_Awesome [n=eric@isr5956.urh.uiuc.edu] has quit ["aunt jemima is the devil!"] 21:30:59 *mejja* high fives the OpenCL 1.0 specification 21:32:02 mejja: I've read them yesterday 21:32:05 it's cool! 21:32:33 -!- kniu [n=kniu@CMU-311358.WV.CC.CMU.EDU] has quit [Read error: 110 (Connection timed out)] 21:32:48 http://www.khronos.org/registry/cl/specs/opencl-1.0.29.pdf 21:33:08 1.0.29? 21:33:11 lol 21:33:18 -!- waterh [n=waterh@114.143.39.78] has quit ["later"] 21:35:29 This spec was made by the same guys who recently released the OpenGL 3.0 spec, right? 21:36:09 kniu [n=kniu@OLAWDYME.RES.CMU.EDU] has joined #scheme 21:40:37 saccade_ [n=saccade@dhcp-18-188-72-216.dyn.mit.edu] has joined #scheme 21:41:24 jlongster: made by Apple, Intel, AMD, nVidia and lots more, and ratified as standard by the group that released OpenGL and OpenAL 21:42:07 wingo-tp [n=wingo@131.Red-81-38-183.dynamicIP.rima-tde.net] has joined #scheme 21:43:26 gigabytes: ok. I thought Apple had worked on it 21:44:22 pchrist_ [n=spirit@gentoo/developer/pchrist] has joined #scheme 21:44:45 Apple had in practice invented it.. It will be supported first on OS X 10.6 shipping next year 21:45:40 Yep, Grand Central is going to be really interesting (that's what they call their computation dispatcher I think) 21:45:54 yes 21:46:00 I wish Apple would push for the next OpenGL standard, they make good interfaces 21:46:10 it's an hybrid scheduler 21:46:42 jonrafkind [n=jon@wireless256.wireless.utah.edu] has joined #scheme 21:47:06 ozy` [n=vt920@pool-71-184-104-97.prvdri.fios.verizon.net] has joined #scheme 21:47:09 after taking scheme this semester i kind of want to get a python scheme interpreter so i can do some crazy stuff with eventscripts on my counter strike server :] 21:47:40 Kopophex [n=kopophex@dtp-1.dyn.cs.washington.edu] has joined #scheme 21:48:26 there are various python-based lispy solutions 21:48:35 yeah i was looking around 21:48:43 you won't find call/cc tho ;) 21:49:04 CALL-WITH-CURRENT-CONTINUATION 21:49:11 lol 21:49:18 def: works just fine for my most of the time :P 21:49:34 my language of choice is assembly :] 21:50:52 -!- Dark-Star [i=Darkstar@p57B55BF2.dip.t-dialin.net] has quit [] 21:54:32 http://arstechnica.com/news.ars/post/20081209-gpgpu-opens-up-with-opencl-1-0-spec-release.html 21:54:33 -rudybot:#scheme- http://tinyurl.com/66c6yg 21:54:50 rudybot: thank you 21:58:29 open cl? 21:59:12 mejja: this is off topic to this channel, but will OpenCL replace CUDA for nvidia or is it different enough? 21:59:22 s/to/for/ 22:00:29 -!- pchrist [n=spirit@gentoo/developer/pchrist] has quit [Read error: 110 (Connection timed out)] 22:00:37 Replace I guess... 22:02:01 -!- MichaelRaskin_ [n=raskin@gwh-1-177-mytn23k1.ln.rinet.ru] has quit ["Leaving."] 22:04:06 -!- exexex [n=chatzill@88.234.190.170] has quit [Remote closed the connection] 22:04:28 no 22:04:39 OpenCL is built on top of CUDA 22:04:44 if you computer has an nVidia card 22:04:52 CUDA is more like a driver access layer 22:05:02 OpenCL replaces C for CUDA 22:05:16 which is a language, designed for CUDA 22:05:20 opencl=cuda++=c++> 22:05:24 lolpun 22:05:45 and if you haven't an nVidia card, OpenCL will be built upon ATI's implementation 22:05:48 or Intel's one 22:05:57 but they'll be compatible 22:06:04 ati/amd have gone downhill in recent years 22:06:31 AMD is in the group that written the standard 22:06:46 and said it will support officially OpenCL 22:07:05 as also nVidia and Intel did 22:07:59 meh 22:08:07 *LobsterMan* sits and waits to see who's around in 3 years 22:09:09 bye bye 22:09:14 -!- gigabytes [n=gigabyte@host57-236-dynamic.24-79-r.retail.telecomitalia.it] has quit [] 22:21:03 cya all 22:21:04 -!- LobsterMan [n=a@host72-50.student.udel.edu] has left #scheme 22:21:18 fnord123 [n=fnord123@78-105-27-133.zone3.bethere.co.uk] has joined #scheme 22:27:37 -!- Nshag [i=user@Mix-Orleans-106-1-64.w193-248.abo.wanadoo.fr] has quit [Read error: 110 (Connection timed out)] 22:29:16 certinally intel won't support opencl in intel integrated 22:30:19 -!- araujo [n=araujo@gentoo/developer/araujo] has quit [Read error: 110 (Connection timed out)] 22:30:44 lisppaste: ur 22:30:46 lisppaste: url 22:30:46 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 22:31:06 -!- edico [n=Edico@unaffiliated/edico] has left #scheme 22:39:44 -!- saccade_ [n=saccade@dhcp-18-188-72-216.dyn.mit.edu] has quit ["This computer has gone to sleep"] 22:42:14 -!- fnord123 [n=fnord123@78-105-27-133.zone3.bethere.co.uk] has quit ["Leaving."] 22:43:24 -!- langmartin [n=user@75.148.111.133] has quit [Read error: 60 (Operation timed out)] 22:54:12 -!- ecraven [n=nex@140.78.42.103] has quit ["bbl"] 22:57:58 synthasee [n=synthase@c-68-63-76-191.hsd1.al.comcast.net] has joined #scheme 23:00:49 exexex [n=chatzill@88.234.190.170] has joined #scheme 23:01:13 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 23:09:39 -!- jewel [n=jewel@dsl-242-150-157.telkomadsl.co.za] has quit [Read error: 113 (No route to host)] 23:13:02 CaptainMorgan [n=CaptainM@c-75-68-42-94.hsd1.nh.comcast.net] has joined #scheme 23:13:04 -!- hemulen [n=hemulen@cpe-069-134-114-252.nc.res.rr.com] has quit [Connection reset by peer] 23:13:44 hemulen [n=hemulen@cpe-069-134-114-252.nc.res.rr.com] has joined #scheme 23:14:37 -!- jlongster [n=user@75.148.111.133] has quit [Read error: 113 (No route to host)] 23:30:05 saccade_ [n=saccade@dhcp-18-188-72-216.dyn.mit.edu] has joined #scheme 23:53:09 -!- ilSignorCarlo [n=Mr_SpOOn@89-97-102-218.ip17.fastwebnet.it] has quit [Remote closed the connection] 23:53:09 -!- Mr_SpOOn [n=Mr_SpOOn@89-97-102-218.ip17.fastwebnet.it] has quit [Remote closed the connection] 23:57:52 Debolaz2 [n=debolaz@nat.andersberle.com] has joined #scheme