00:00:28 oh 00:00:50 in many languages the stack is severely confined in size, but scheme it's the same as the heap, not much saved by avoiding it. 00:01:35 gotcha 00:01:54 still, tail recursion and a precise garbage collector seem to be really good at cleaning up unnecessary memory 00:05:04 -!- bytecolor [n=user@32.157.230.101] has left #scheme 00:06:47 haesbaert [i=haesbaer@c925a8c5.virtua.com.br] has joined #scheme 00:08:04 r0bby_ [n=wakawaka@guifications/user/r0bby] has joined #scheme 00:08:07 Cowmoo [n=Cowmoo@c-98-218-214-24.hsd1.va.comcast.net] has joined #scheme 00:10:45 rudybot: eval (let () (define (square n) (if (= 0 n) 0 (* (square (/ n 2)) 4))) (square 10)) 00:10:49 ski: error: with-limit: out of time 00:11:15 -!- haesbaert [i=haesbaer@c925a8c5.virtua.com.br] has quit [Read error: 104 (Connection reset by peer)] 00:17:04 -!- db_dbus [n=Bob@pool-71-112-117-125.sttlwa.dsl-w.verizon.net] has quit [Client Quit] 00:18:40 -!- r0bby [n=wakawaka@guifications/user/r0bby] has quit [Connection timed out] 00:21:06 bit_shifter [n=bit_shif@netblock-68-183-144-49.dslextreme.com] has joined #scheme 00:25:08 Here I worked up a fun little test comparing the different ways to build up new lists. 00:25:24 https://synx.us.to/code/scheme/memory-users.ss 00:25:57 probably should admit that accumulation was most efficient....before garbage collection that is... by about 0.5%... 00:26:46 that's why I think recursion is kind of advanced to teach people... got to see the bones of it before you can just magic it off to the stack 00:26:59 underspecified_ [n=eric@softbank220043052007.bbtec.net] has joined #scheme 00:27:16 even I don't understand all the tricky efficiencies that 'recursion mode finagles. 00:28:13 steiger_ [n=steiger@20150136004.user.veloxzone.com.br] has joined #scheme 00:33:16 -!- steiger [n=steiger@20150136004.user.veloxzone.com.br] has quit [Read error: 60 (Operation timed out)] 00:35:06 -!- masm [n=masm@bl10-209-28.dsl.telepac.pt] has quit ["Leaving."] 00:36:50 haesbaert [i=haesbaer@c925a8c5.virtua.com.br] has joined #scheme 00:38:50 -!- haesbaert [i=haesbaer@c925a8c5.virtua.com.br] has quit [Read error: 54 (Connection reset by peer)] 00:42:21 synx : did you mean to write the condition (eq? mode 'build) twice in the conditional ? 00:45:04 -!- underspecified [n=eric@softbank220043052007.bbtec.net] has quit [Read error: 110 (Connection timed out)] 00:45:04 -!- underspecified_ is now known as underspecified 00:49:48 Summermute [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has joined #scheme 00:51:27 sphex [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has joined #scheme 00:54:45 -!- copumpkin [n=pumpkin@129.170.241.32] has quit [Read error: 110 (Connection timed out)] 01:00:31 *TimMc* temporarily returns from packing 01:00:47 Piratero: Yay! 01:04:42 -!- sphex_ [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has quit [Read error: 110 (Connection timed out)] 01:07:44 MononcQc [n=Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 01:10:47 copumpkin [n=pumpkin@129.170.241.32] has joined #scheme 01:12:34 ski: AUGH 01:12:46 Not the first time I ran it! No wonder the numbers are different! 01:23:11 haesbaert [i=haesbaer@c925a8c5.virtua.com.br] has joined #scheme 01:26:37 https://synx.us.to/code/scheme/memory-users.ss and this time I'm sure each test ran right 01:28:51 jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has joined #scheme 01:30:39 is it possible to run r5rs scheme scripts from the command line with plt-r5rs? 01:36:49 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 01:43:04 jedc: Try it! Put some PLT-specific stuff in a script, like WHEN or UNLESS. 01:43:29 (And report back. I hadn't considered that question until you asked it...) 01:45:46 -!- MononcQc [n=Ferd@modemcable062.225-20-96.mc.videotron.ca] has quit ["Leaving"] 01:51:10 i figured it out, you dont need any command line options, just plt-r5rs 01:51:52 i was confused because i thought it was -r like with mzscheme 01:53:17 slxix [n=randy@203.205.117.57] has joined #scheme 01:55:21 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 02:24:33 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 02:25:11 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 02:30:13 Fufie [n=innocent@86.80-203-225.nextgentel.com] has joined #scheme 02:36:54 -!- Foofie [n=innocent@86.80-203-225.nextgentel.com] has quit [Read error: 60 (Operation timed out)] 02:52:59 tjafk1 [n=timj@e176205097.adsl.alicedsl.de] has joined #scheme 03:00:21 -!- jonrafkind [n=jon@98.202.86.149] has quit [Read error: 110 (Connection timed out)] 03:02:36 synx, in many Schemes the stack size is just as constrained as in any other programming system. 03:02:48 `The stack' is not necessarily the same as `the heap'. 03:04:19 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 03:05:36 Riastradh: Okay... but those schemes are poo-poo :p 03:08:19 -!- Cowmoo [n=Cowmoo@c-98-218-214-24.hsd1.va.comcast.net] has left #scheme 03:09:09 -!- tjafk2 [n=timj@e176212156.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 03:15:13 cky_ [n=cky@cpe-024-211-255-249.nc.res.rr.com] has joined #scheme 03:26:54 -!- cky [n=cky@cpe-024-211-255-249.nc.res.rr.com] has quit [Nick collision from services.] 03:26:55 -!- cky_ is now known as cky 03:34:38 -!- Pepe_ [n=ppjet@78.114.138.72] has quit [Read error: 104 (Connection reset by peer)] 03:35:58 Shiba [n=Michael@64.142.31.232] has joined #scheme 03:39:47 I'm completely new to PLT Scheme, so please understand my total ignorance here. I'm trying to define a function "inject" that prepends a given value to an array. I've written "(define (inject a b) (list b a))" into mzscheme, which returns to a prompt (yay!) but ehwn I try to use it "(inject (list 1 3 5) 10)" I get an error. What am I doing wrong? 03:40:59 You're not telling me what the error says. 03:41:44 (also, that function does not do what you said it does.) 03:42:08 chandler: yes, I'm quite sure I'm not doing it correctly 03:42:13 thats why I'm here :) 03:42:39 lisppaste: url? 03:42:39 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 03:42:52 If you need to paste a few lines, do it there. 03:43:57 Shiba: If I wasn't clear enough, I need to see the error message before I can help. 03:44:21 Shiba pasted "function example?" at http://paste.lisp.org/display/86249 03:44:46 yeah 03:45:02 *sladegen* lols. 03:45:03 sorry, I'm on Windows right now and switching between my Linux machine 03:45:11 Try evaluating what you said you evaluated. 03:45:23 Not what you did evaluate. 03:45:56 sladegen: I just started reading the Scheme docs today. :( 03:46:06 incubot: chandler is so wise. 03:46:09 no, it's not. If you want to enable it, you pay a lot performance-wise. 03:47:31 Shiba: sure, it's mindbending stuff, sometimes. but with that sort of misprecision you won't get far. 03:47:36 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 03:47:57 sladegen: that was my typo 03:48:16 nonetheless, it should have appended the 10 03:48:38 No; try evaluating what you said at first you evaluated. 03:48:54 If that was a typo, it was accidentally correct! 03:48:58 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 03:49:33 chandler: I don't understand you. "try evaluating what you said at first you evaluated" 03:49:38 sorry :( 03:49:41 typo? type is mistiping a letr or sow, but not the order whole sentence. 03:49:56 (inject (list 1 3 5) 10) 03:51:05 Shiba, you were missing the outter most parens 03:51:06 It's what you said you evaluated, but it's not *actually* what you evaluated. 03:51:21 jedc: No. Adding parens would not help. 03:51:24 Shiba: (foo x) and foo(x) is not the same thing. first is proper scheme. the other is you thiking it's still C, python or other ruby land, still. 03:51:43 Shiba, my bad, you just didnt put the procedure name inside the first one 03:51:52 Pepe_ [n=ppjet@78.113.39.84] has joined #scheme 03:51:58 okay that makes a bit more sense 03:52:16 incubot: still stil still, still. 03:52:16 yeah, guilty as charged. I come from the far-away land of C. 03:52:20 I replaced ((filter itemsN) actionN) lines with ((filter itemsN #f) actionN) but it stil doesn't work. 03:53:33 okay. next question. is (10 (1 3 5)) == (10 1 3 5) ? 03:53:42 No. 03:54:37 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 03:54:42 but both are sytax errors... 03:55:10 I assume he's referring to datums. 03:55:15 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 03:55:23 okay, semantically no. but please correct my (probable) misunderstanding: (list 10 (list 1 3 5)) 03:55:28 ok no 03:55:30 rudybot: eval (let ((10 (lambda x x))) (10 1 3 5)) 03:55:31 sladegen: your sandbox is ready 03:55:32 sladegen: error: eval:1:7: let: bad syntax (not an identifier) at: 10 in: (let ((10 (lambda x x))) (10 1 3 5)) 03:56:02 incubot: (let ((10 (lambda x x))) (10 1 3 5)) 03:56:02 Error: (let) identifier expected: (let ((10 (lambda x x))) (10 1 3 5)) 03:56:10 Shiba: That returns a list of two elements. The first is 10; the second is a list of three elements. 03:56:30 chandler: thanks for saying something helpful :) 03:56:53 I've been helpful all along. 03:56:57 -!- Pepe_ [n=ppjet@78.113.39.84] has quit [Remote closed the connection] 03:57:01 It's true. 03:57:18 Do you know what a list is in Scheme, Shiba? 03:57:19 chandler: as opposed to sladegen saying things to incubot 03:57:27 Heh. :-) 03:57:29 well that is part of my problem I think 03:57:29 Oh. 03:57:40 I'm trying to define an array 03:57:47 but I only found references to list 03:57:51 *sladegen* pets his incubotomy. 03:57:58 You won't get that from `list'. 03:58:07 r5rs vector 03:58:08 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_540 03:58:08 You probably want `vector'. 03:58:09 -rudybot:#scheme- http://tinyurl.com/cbw7ux 03:58:24 *sladegen* frst! 03:58:51 Returns a newly allocated vector whose elements contain the given arguments. Analogous to list. 03:59:00 so if ventor == list how did I go wrong? 03:59:11 _dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has joined #scheme 03:59:12 s/vendot/vector 03:59:15 aggh 03:59:16 Yes, well, I'm typing complete sentences on a keyboard only large enough for my thumbs. Some slack please cut me. 03:59:17 you get the point 03:59:35 `Analogous' does not mean `identical'. 03:59:35 Shiba: "Analogous" is not "equal". 04:00:04 Shiba: Scheme lists are recursive data structures that are most analogous to what are known as "linked lists" in other languages. Vectors are the equivalent of arrays. 04:00:09 Oops, excuse me: more than one person to interact with is too much; please disregard me. 04:01:33 so hwo to grow (or shrink) a vector? 04:01:34 No, wait! I was just about to vanish. You or TimMc can step in now. 04:01:50 identical does not equal analoguous, much better. 04:01:54 -!- _dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has quit [Client Quit] 04:01:56 I'm about to vanish, too. 04:01:58 the same way as in C. 04:02:03 me too 04:02:10 create new vector and copy. 04:02:12 C is about to vanish? 04:02:17 Shiba: When the documentation says "vector is like list", it means "the function `vector` is like `list` in that it can create the whole thing at once" 04:02:27 foof: With my luck, no. 04:02:31 Wait! I'm not done with using C! 04:03:46 Shiba: (list 1 2 3) is to '(1 2 3) as (vector 1 2 3) is to '#(1 2 3) <-- analogous! 04:03:56 *Riastradh* vanishes. 04:04:34 TimMc: its great to know the shorthand but I think I'll stick with the longer versions for now 04:04:40 but I get the point 04:05:26 Shiba: So yeah, lists are used a great deal in Scheme. They are better suited to recursive programming. 04:07:38 Vectors (arrays) are available, but it only makes sense to use them when the length is fixed, known, and large, and you will be reading and writing arbitrary elements here and there. 04:07:58 -!- luz [n=davids@189.122.90.116] has quit [Read error: 104 (Connection reset by peer)] 04:08:31 ok so in my case I wish to define a function that prepends a value to an array (vedtor, or list, or however such a thing is best represented in Scheme) 04:08:32 There's no hard and fast rule as to when each is more appropriate, but lists are definitely more popular in functional languages than in the usual imperative languages. 04:09:41 -!- dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has quit ["ERC Version 5.2 (IRC client for Emacs)"] 04:09:53 dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has joined #scheme 04:10:12 Shiba: You're in luck! There already exists a function to construct a new list given a first element and the rest of the new list. 04:10:32 oh really? 04:10:35 heh 04:10:36 incubot: (cons 5 (list 1 2 3 4)) 04:10:36 (5 1 2 3 4) 04:10:50 incubot: (first (list 5 1 2 3 4)) 04:10:51 5 04:10:51 ooooooooh 04:10:57 and cars 04:11:02 so THATS what those are 04:11:13 incubot: (rest (list 5 1 2 3 4)) 04:11:13 Error: unbound variable: rest 04:11:24 incubot: (cdr (list 5 1 2 3 4)) 04:11:24 (1 2 3 4) 04:11:35 Wait, incubot knows first but not rest? 04:11:53 apparently. Seems weird, but.... 04:11:57 Shiba: not "shorthands" (list 1 2 3) is mutable while '(1 2 3) may be immutable. 04:12:15 incubot: (buttfirst '(1 2 3 4)) 04:12:15 Error: unbound variable: buttfirst 04:13:00 Nshag: I understand that the difference is important, but I can only take in so much in a given amount of time... 04:13:38 Shiba: In PLT, `first` is an alias for `car`, and `rest` is an alias for `cdr`. car and cdr are more portable, but less readable at first. 04:14:11 Shiba: Have you worked with linked lists in C? 04:15:05 TimMc: is the sky blue? 04:15:05 Shiba: the mnemonic I use is simple: a comes first in the alphabet, so obviously 'car' is the first element. 04:15:06 :) 04:15:40 (a Java programmer might insist that it is sometimes white) 04:15:46 dstorrs: Also, it stands for Content Address Register, and since we all still use Lisp Machine assembly, it's obvious! 04:16:18 hotblack23 [n=jh@p5B05610E.dip.t-dialin.net] has joined #scheme 04:16:26 TimMc: I'm a senior at a California Uni, sure I've used linked lists in C and other languages 04:16:51 but the idea of a non-imperative language is totally new to me 04:17:18 right now its like I haven't programmed at all, ever -- because it isn't helping me one bit 04:17:31 Shiba: Excellent. So, for now you should forget about modifying the `next` pointer in linked lists. 04:17:37 at least the jump from C to Java was somewhat easy 04:17:44 Also, there isn't a pointer to tail. 04:18:58 So, question for the room...I know how to store static data in funcs (e.g. currying), but how do I do it if I then want to update that data? 04:19:02 On the plus side, you don't have to worry about busting the stack when you walk down a list... as long as the value of the last recursive call is what you are returning all the way up. (Proper tail calls.) 04:19:39 dstorrs: Or read it. 04:19:40 Specifically, I'm trying to write a function with pseudo code like this: (define (db) (if (db-is-open) db_obj (open "path_to_db"))) 04:22:31 I have a feeling this must be a FAQ for new Schemers, but I can't find it anywhere. 04:22:46 so, a pointer to a FM would be most welcome 04:23:58 I swear to god I just had docs up that mentioned cars cons etc, but I can't find it now 04:24:07 can someone provide a link? 04:24:20 http://docs.plt-scheme.org/guide 04:24:27 check the section on Lists and Pairs 04:24:45 also, http://docs.plt-scheme.org/reference has the full details 04:24:53 but that's the brain-bending stuff 04:24:59 rudybot: doc cons 04:25:00 sladegen: http://docs.plt-scheme.org/reference/pairs.html#(def._((quote._~23~25kernel)._cons)) 04:25:18 Shiba: Just the core: http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-15.html 04:25:43 ^ index of R5RS functions and forms 04:26:15 dstorrs: dunno, what you mean exactly... message passing, perhaps. a la yasos, et al. 04:27:19 immortal, ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/swob.txt 04:28:27 sladegen: well, this code wouldn't work, but I want something like the following: http://paste.lisp.org/display/86250 04:28:55 Shiba: Any other questions before I DC from this screen? 04:29:58 *TimMc* 's awakeness timer runs out 04:30:02 sorry 04:30:13 have fun, I'll read up on the docs 04:30:18 thanks for your help 04:30:31 np. Enjoy Scheme. It's fun to work in. 04:30:47 Shiba: R5RS is actually not a bad read. Then again, I'm one of those freaks who learns best from reading APIs. 04:31:09 sladegen: I guess I could get fancy, turn the whole thing into an object and send it messages, but I thought that would be kinda heavyweight. can't this be done in a simpler way? 04:31:19 TimMc: I'm getting a bit frustrated 04:31:33 TimMc: how so? 04:31:39 TimMc: calculus taught me to read the tick ' as prime 04:31:46 Shiba: Oh dear. 04:31:52 heh 04:31:53 I'm seeing it everywhere and having to catch myself :) 04:32:36 Shiba: And that's causing more of a problem than strict parens? 04:32:44 haha well that too 04:32:53 dstorrs: (define (db-create db) (lambda () ... etc ...)) 04:32:56 so carS indicates a SET operation? 04:33:13 I had already dealt with prefix notations a bit before I ran into Scheme, which was good. 04:33:31 and can I do an equivalent cdrS? 04:33:33 Shiba: Where is "carS"? 04:33:39 for emphasis 04:33:41 cars 04:33:49 to emphasize the 's' 04:33:50 sladegen: check me though...doesn't that return a proc? I'm looking for something that returns a DB object value. 04:34:30 dstorrs: well, your paste does not, but it should. 04:34:32 I'm not familiar with a "cars". Where do you see this? 04:34:56 hmmmmm maybe I'm a bit confused 04:35:06 I thought I read about such a function on my professor's website 04:35:10 I would well be wrong 04:35:26 could* 04:35:50 "Pairs are created by the procedure cons' 04:35:58 well that could be useful 04:35:59 :) 04:36:13 sladegen: "it should" ? 04:36:27 could you expand on that? 04:36:35 how are 'car' and 'cdr' defined when I have a list with e.g. 9 elements in it? 04:37:16 Shiba: (car l) is the first value. 04:37:17 Shiba: car and cdr are primites. The car of a list is ALWAYS the first item. The cdr is ALWAYS the entire list other than the first element. 04:37:35 I see 04:37:36 s/primites/primitives/ 04:38:06 Shiba: If you want the 3rd element, (car (cdr (cdr (cdr l)))) 04:38:28 PLT actually defines (cadddr l), which I find highly silly. 04:38:56 Shiba: do you see why you need the "(car" on that? 04:38:57 Hmmm, I meant 4th element, I think. 04:39:08 dstorrs: http://paste.lisp.org/display/86250#1 04:39:09 I am too sleepy to count. Good night! 04:39:11 yeah I think so 04:39:23 but what happens when you need element 9274? 04:39:31 -!- Nshag [i=user@Mix-Orleans-106-4-130.w193-248.abo.wanadoo.fr] has quit ["Quitte"] 04:39:41 TimMc: thanks for all your help, night 04:40:01 Shiba: You cdr down the list and pass a counter along as one of the arguments. When it is 0, return the car! 04:40:27 (Or you use the handy list-ref built-in.) 04:40:27 dstorrs: create-db could take argument to open as its optinal argument, etc, etc. 04:40:41 ouch, you have to iterate over a list get at an element? 04:41:25 Shiba: If you need random access, you might want to use a vector instead. 04:41:29 zzzzzz 04:41:33 kk 04:41:35 night :) 04:42:33 Shiba: If you need random access, use vectors. Usually you don't though... 04:42:43 sladegen: aside from changing the name to something longer, and changing the return value to something that doesn't meet the requirements, how is this different? 04:42:55 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 04:43:21 -!- hotblack23 [n=jh@p5B05610E.dip.t-dialin.net] has quit ["Leaving."] 04:43:31 dstorrs: HA. 04:44:05 it's heaven and earth different... 04:46:25 ok, accept that for a moment. It still doesn't answer the question I was asking. Is there a way to store a static value inside a top level function, and update it upon subsequent calls to the func? 04:47:12 dstorrs: That sounds like a closure. 04:48:13 -!- underspecified [n=eric@softbank220043052007.bbtec.net] has quit [] 04:48:46 rudybot: eval (define foobar (let ((foo 19)) (lambda (bar) (+ foo bar)))) 04:48:47 synx: your scheme sandbox is ready 04:48:48 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 04:48:59 rudybot: (foobar 23) 04:49:00 synx: eh? Try "rudybot: help". 04:49:09 rudybot: eval (foobar 23) 04:49:10 synx: ; Value: 42 04:49:32 synx: yes. But I only know how to do closures that either involve constructed functions (i.e., not top level), or involve immutable static data--not both together. 04:49:50 ... 04:49:56 that is a top level function. 04:50:34 yep. and the static data that it contains [foo] doesn't change from one call to the next. 04:51:01 Well, you could use set! to change it. 04:51:22 rudybot: eval (define foobar (let ((foo 17)) (lambda (bar) (set! foo (+ foo 1)) (+ foo bar)))) 04:51:32 rudybot: eval (foobar 23) 04:51:32 synx: ; Value: 41 04:51:45 rudybot: eval (foobar 23) 04:51:45 synx: ; Value: 42 04:51:49 synx: take a look at the top version of this (the one that I pasted): http://paste.lisp.org/display/86250 04:51:55 that's what I'm trying to do. 04:52:04 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 04:52:09 dstorrs: http://paste.lisp.org/+1UJU/2 04:52:11 If I'm trying to solve the wrong problem, ok, but it just seems like this shouldn't be so hard. 04:52:15 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 04:52:34 Right, well I'd use a module level variable to hold a db object, but I do use closures for prepared statements. 04:53:05 Ooh yeah and sladegen's idea is good too. 04:53:29 Pepe_ [n=ppjet@78.114.138.181] has joined #scheme 04:54:18 (define db (make-parameter #f)) then (parameterize ((db (open "./listdata.db"))) (call-db-functions-that-use-db)) 04:55:00 But dstorrs, if you want a closure, you just use lambda instead of the shortcut define syntax. 04:55:12 (define (foobar bar) ...) is a shortcut syntax that gets exactly translated to (define foobar (lambda (bar) ...)) 04:55:43 rudybot: doc parameterize 04:55:44 dstorrs: your sandbox is ready 04:55:44 dstorrs: http://docs.plt-scheme.org/reference/parameters.html#(form._((lib._scheme%2Fprivate%2Fmore-scheme..ss)._parameterize)) 04:56:13 so (define foobar (let ((something a) (foo bar)) (lambda (bar) ...))) would let you have variables specific to that function. And as sladegen pointed out wrapping that in (define (create-foobar) ...) is even better because you can have different instances of foobar that way. 04:56:49 parameterize is a personal favorite of mine. It's like globals plus awesome. 04:58:13 cool, I'll read up on parameters again--IIRC, they may be just the thing. 04:59:03 sladegen: I appreciate your suggestions, and I acknowledge that they are powerful. I just found them frustrating because they weren't addressing the question I was asking, and weren't explaining why I should change the question. 04:59:04 I use parameters for things like database contexts. But I use closures for prepared statements, which only need to be visible in the context of a single procedure that streamlines the use of said statement. 04:59:30 but thank you for helping. 04:59:44 dunno seems like sladegen and I were both basically talking about the same thing. 05:00:19 nothing special about "top level" procedures. They're the same if you generate them inside a procedure or just on the top level. 05:00:31 yes, you both were. but neither one of you actually answered the question I asked, which is how to write a function that would return a *value*, not a func, that met certain criteria. 05:01:02 the difference, synx, is that the way you phrased it suggested a way I could change the requirements and still make it work. 05:01:43 Well um... thanks... *blush* 05:08:15 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 05:08:53 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 05:15:35 -!- stepnem [n=stepnem@topol.nat.praha12.net] has quit [Read error: 60 (Operation timed out)] 05:29:14 -!- copumpkin [n=pumpkin@129.170.241.32] has quit [Read error: 104 (Connection reset by peer)] 05:29:44 copumpkin [n=pumpkin@129.170.241.32] has joined #scheme 05:32:03 -!- ski_ [n=md9slj@remote1.student.chalmers.se] has quit ["Lost terminal"] 05:57:16 -!- kniu [n=kniu@ELMUNDO.RES.CMU.EDU] has quit ["Leaving"] 06:05:24 -!- copumpkin [n=pumpkin@129.170.241.32] has quit [Read error: 60 (Operation timed out)] 06:13:14 mongooseWA_ [n=mongoose@c-24-18-228-156.hsd1.wa.comcast.net] has joined #scheme 06:15:08 kniu [n=kniu@128.2.16.211] has joined #scheme 06:17:18 -!- mongooseWA_ is now known as mongooseWA 06:23:49 -!- Leonidas [n=Leonidas@unaffiliated/leonidas] has quit [Read error: 60 (Operation timed out)] 06:23:53 Leonidas [n=Leonidas@unaffiliated/leonidas] has joined #scheme 06:31:31 copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has joined #scheme 06:35:34 what is the difference between (first) and (car) 06:36:03 nothing, really. (first) is just a bit more semantic, if that's what you're into. 06:36:11 it seems like they can be use interchangeably 06:36:19 ok 06:36:49 would second be equivalent to cdr? 06:36:53 no 06:36:58 ok 06:37:04 yeah, i just ran a test -- i see 06:37:11 second would be like (car (cdr lst)) 06:37:17 yeah 06:37:24 it just returns a single element 06:40:50 It can be abbreviated to (cadr lst), by the way 06:42:16 -!- bit_shifter [n=bit_shif@netblock-68-183-144-49.dslextreme.com] has quit [] 06:43:17 (car (cdr lst)) can be abbreviated to (cadr list)? 06:44:42 yes 06:45:16 okay 06:45:23 this channel has been extremely helpful 06:45:25 and (car (cdr (cdr lst))) == (caddr lst), etc 06:45:29 abbyz [n=adkulkar@unaffiliated/abbyz] has joined #scheme 06:45:31 i managed to finish the first two hw problems! 06:45:37 oh boy 06:45:41 grats 06:45:45 yeah 06:46:06 it's crazy because i have extensive experience with other languages 06:46:11 this has been the most confusing 06:46:18 hell, sh-2 and mips assembler was easier than this! 06:46:39 i'm getting the hang of it 06:48:04 yeah, lisp can be tricky. 06:48:10 yup 06:48:14 but once you grok it, you'll achieve transcendence 06:48:17 yeah 06:48:30 my professor at another university praises scheme 06:48:39 it's rather elegant 06:55:15 -!- mongooseWA [n=mongoose@c-24-18-228-156.hsd1.wa.comcast.net] has quit [] 07:00:21 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 07:01:17 mongooseWA [n=mongoose@c-24-18-228-156.hsd1.wa.comcast.net] has joined #scheme 07:01:52 jewel_ [n=jewel@dsl-242-129-207.telkomadsl.co.za] has joined #scheme 07:16:08 attila_lendvai [n=ati@adsl-89-134-5-244.monradsl.monornet.hu] has joined #scheme 07:17:16 vatsal [n=vatsal@60.243.234.240] has joined #scheme 07:21:28 Piratero: generally car:first :: cdr:rest 07:21:40 ah, rest 07:21:43 many schemes allow the use of (rest) instead of (cdr) 07:28:58 -!- Shiba [n=Michael@64.142.31.232] has quit [Read error: 148 (No route to host)] 07:34:28 -!- copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has quit ["Leaving..."] 07:47:45 perdix [n=perdix@sxemacs/devel/perdix] has joined #scheme 07:53:48 -!- mongooseWA [n=mongoose@c-24-18-228-156.hsd1.wa.comcast.net] has quit [] 08:07:24 Jafet1 [n=Jafet@unaffiliated/jafet] has joined #scheme 08:07:38 -!- Jafet1 is now known as tefaj 08:15:30 Sveklo [n=sveklo@MMDCCCLXVI.gprs.sl-laajakaista.fi] has joined #scheme 08:20:17 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Success] 08:20:24 -!- vatsal [n=vatsal@60.243.234.240] has quit [] 08:21:30 -!- kilimanjaro [n=kilimanj@70.116.95.163] has quit [Remote closed the connection] 08:37:21 underspecified [n=eric@walnut.naist.jp] has joined #scheme 08:43:07 so, i have a homework problem where i have to check whether a list is in ascending order or not 08:43:26 i'm thinking of copying the list passed from the arguments of the procedure 08:43:30 bubble sorting it 08:43:38 then comparing it to the list passed from arguments 08:43:47 ...or am i over complicating this? 08:45:26 probably 08:45:45 i was thinking of just first comparing the head element with the tail element 08:45:57 oh, nevermind 08:46:04 i can't really think up of another way 08:48:21 -!- jewel_ [n=jewel@dsl-242-129-207.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 08:50:39 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 08:51:16 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 08:51:34 pemleco [n=sveklo@YYMYDCL.gprs.sl-laajakaista.fi] has joined #scheme 08:56:15 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 08:57:10 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 08:58:48 ejs [n=eugen@222-25-178-94.pool.ukrtel.net] has joined #scheme 09:00:05 vectors! in scheme! 09:01:20 Define what it means for a list to be in ascending order 09:01:42 all elements are sorted in ascending order 09:01:50 1,2,3,4,n 09:01:58 1,2,3,...,n 09:02:38 Well, what is an ascending order? 09:02:56 from least to greatest 09:03:27 So check if your list goes least to greatest 09:03:35 yeah 09:03:39 i would just sort it 09:03:56 well, first copy the list, sort the copy, compare the copy to original 09:03:59 Hmm, you seem to be new to this 09:04:20 how else would i do this? 09:04:33 Given two elements e_i and e_j in a list, and the list is sorted, what can you say about e_i and e_j? 09:04:56 both have to have the same number of elements 09:05:12 e_i and e_j are elements, not lists 09:05:20 oh, misread, sorry 09:05:53 one of the two is >= than the other 09:06:43 So given that e_i comes before e_j, what's the relationship between e_i and e_j? 09:08:25 damn 09:10:09 -!- Sveklo [n=sveklo@MMDCCCLXVI.gprs.sl-laajakaista.fi] has quit [Read error: 110 (Connection timed out)] 09:10:43 i'm back 09:11:04 the relationship? the only one i can think up of one is that e_i is smaller than e_j? 09:11:15 i can't think up of any other one 09:11:39 so use that 09:11:50 Not exactly. 09:12:09 Read what you said earlier about e_i and e_j. 09:12:26 one of the two is >= than the other? 09:13:01 Now try to answer the most recent question again. 09:13:05 which one? 09:13:37 which one of the 2 must be smaller to satisfy the sorted condition? 09:13:47 Careful, leppie 09:14:20 is my method to solving the problem incorrect? 09:14:20 -!- jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has quit [Read error: 60 (Operation timed out)] 09:14:31 or are we simply finding a 'better' solution to the problem? 09:14:44 It may be incorrect. 09:15:04 (Depending on how equal elements are treated.) 09:15:18 okay 09:15:25 Well, a correct solution is often 'better' than an incorrect one, anyway. 09:15:32 i should say that duplicates are not accounted for 09:15:55 the problem doesn't state that we should take duplicates into account 09:16:13 i don't wish to take them into account considering that this assignment is taking forever 09:16:37 Stop thinking about your assignment. Start thinking about the necessary condition on e_i and e_j. 09:16:39 my solution isn't incorrect; it might be an unoptimized method 09:17:15 That is quite disputable, but let's never mind with your other solution. 09:17:56 right now, i can't come up with any other condition that e_i and e_j might have other than one being >= than the other 09:18:09 So which is >= which? 09:18:33 off the top of my head, the first element? 09:18:55 This isn't a memory question... 09:19:13 what i mean is, the first thing that comes to mind 09:19:33 If you like, take any sorted sequence, pick any i < j, and look at the elements. 09:21:44 oh, != 09:21:50 doh 09:21:52 != or >= 09:23:24 I won't validate probabilistic thought simulation processes. 09:23:29 -!- thesnowdog [i=thesnowd@122.110.4.231] has quit ["Leaving"] 09:23:36 (Also called "guessing".) 09:24:28 i guess to say that (i < j) != true 09:24:39 oh, nevermind, it'd be == 09:25:01 i think i need sleep 09:25:14 i'll come back tomorrow morning 09:36:01 -!- m811 [n=user@84-50-207-42-dsl.est.estpak.ee] has quit [""If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will] 09:39:21 -!- attila_lendvai [n=ati@adsl-89-134-5-244.monradsl.monornet.hu] has quit ["..."] 10:09:25 Edico [n=Edico@unaffiliated/edico] has joined #scheme 10:17:56 cornucopic [n=r00t@202.3.77.134] has joined #scheme 10:31:13 sepult [n=user@xdsl-87-78-74-136.netcologne.de] has joined #scheme 10:34:56 -!- underspecified [n=eric@walnut.naist.jp] has quit [] 10:36:08 Summermute66 [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has joined #scheme 10:54:06 -!- Summermute [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has quit [Read error: 110 (Connection timed out)] 10:54:22 Summermute [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has joined #scheme 10:57:26 -!- Summermute66 [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has quit [Read error: 110 (Connection timed out)] 11:05:24 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 11:10:42 dzhus [n=sphinx@95-24-100-91.broadband.corbina.ru] has joined #scheme 11:10:47 Narrenschiff [n=ritchie@xolotl.plus.com] has joined #scheme 11:17:24 tagac [n=user@176.37.221.87.dynamic.jazztel.es] has joined #scheme 11:18:44 -!- sepult [n=user@xdsl-87-78-74-136.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 11:18:45 sepult` [n=user@xdsl-87-78-26-65.netcologne.de] has joined #scheme 11:21:34 -!- sepult` is now known as sepult 11:30:11 jewel_ [n=jewel@dsl-242-129-207.telkomadsl.co.za] has joined #scheme 11:32:44 xwl [n=user@222.35.122.219] has joined #scheme 11:38:25 underspecified [n=eric@softbank220043052007.bbtec.net] has joined #scheme 11:53:17 -!- elmex [i=elmex@ist.m8geil.de] has quit [Remote closed the connection] 11:54:04 -!- sepult [n=user@xdsl-87-78-26-65.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 11:54:20 elmex [n=elmex@ist.m8geil.de] has joined #scheme 12:08:26 masm [n=masm@bl10-209-28.dsl.telepac.pt] has joined #scheme 12:12:24 -!- perdix [n=perdix@sxemacs/devel/perdix] has quit [] 12:19:04 Summermute66 [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has joined #scheme 12:26:59 perdix [n=perdix@sxemacs/devel/perdix] has joined #scheme 12:27:15 Sveklo [n=sveklo@YYDCXX.gprs.sl-laajakaista.fi] has joined #scheme 12:27:57 MrFahrenheit [n=RageOfTh@users-42-158.vinet.ba] has joined #scheme 12:30:32 chylli [n=lchangyi@119.181.3.122] has joined #scheme 12:30:59 -!- Sveklo [n=sveklo@YYDCXX.gprs.sl-laajakaista.fi] has quit [Client Quit] 12:32:41 -!- masm [n=masm@bl10-209-28.dsl.telepac.pt] has quit ["Leaving."] 12:36:17 sepult [n=user@xdsl-87-78-26-65.netcologne.de] has joined #scheme 12:36:36 MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 12:43:15 -!- Summermute [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has quit [Read error: 110 (Connection timed out)] 12:45:12 -!- pemleco [n=sveklo@YYMYDCL.gprs.sl-laajakaista.fi] has quit [Read error: 110 (Connection timed out)] 12:46:35 HG` [n=HG@xdslam168.osnanet.de] has joined #scheme 12:50:41 dstorrs: I'm still reading scrollback, but... it sounds like what you want is an object. When I hear "a value I can change, wrapped in a closure", what I think is "object". 12:55:54 Piratero: You should be able to verify that a list is sorted in O(n) time. Let's say you were standing at a looooong shelf of library books. How would you *verify* they were sorted? 12:56:23 ASau` [n=user@83.69.240.52] has joined #scheme 12:56:49 -!- ASau [n=user@83.69.240.52] has quit [Read error: 54 (Connection reset by peer)] 13:08:09 jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has joined #scheme 13:09:42 Select all the possible ways to sort the sequence, and see if it matches one of them 13:12:39 tefaj: Bad Schemer, no cookie! 13:12:51 eli [n=eli@winooski.ccs.neu.edu] has joined #scheme 13:17:18 "You know, theyre schemers. Schemers trying to control their worlds. Im not a schemer. I try to show the schemers how, pathetic, their attempts to control things really are. Its the schemers that put you where you are. You were a schemer, you had plans, and uh, look where that got you." 13:19:05 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 13:19:17 -!- MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has quit ["DOWNLOADING LATEST VERSION OF THE INTERNET"] 13:19:48 datou [n=datou@124.205.137.170] has joined #scheme 13:22:22 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 13:23:17 tefaj: What's that from? 13:24:19 Ledger as the Joker 13:26:16 (I have about 0 pop culture knowledge, you see.) 13:28:38 -!- xwl [n=user@222.35.122.219] has quit [Remote closed the connection] 13:31:38 hehe 13:32:21 -!- dzhus [n=sphinx@95-24-100-91.broadband.corbina.ru] has quit [Remote closed the connection] 13:33:21 Pepe__ [n=ppjet@78.113.44.92] has joined #scheme 13:33:47 -!- underspecified [n=eric@softbank220043052007.bbtec.net] has quit [] 13:34:18 -!- slxix [n=randy@203.205.117.57] has quit ["brup"] 13:35:08 underspecified [n=eric@softbank220043052007.bbtec.net] has joined #scheme 13:37:37 -!- Leonidas [n=Leonidas@unaffiliated/leonidas] has quit [Read error: 60 (Operation timed out)] 13:37:40 Leonidas [n=Leonidas@unaffiliated/leonidas] has joined #scheme 13:38:59 TimMc: PLT defines `cadddr' because (a) it's traditional, (b) it's in r5rs, (c) it's common enough to have a specific meaning, (d) it's different from `fourth' 13:39:34 And BTW, `cddaar` is much more obscure than `cadddr' -- in case you really wanted to talk about odd stuff. 13:39:46 *eli* runs out 13:39:52 eli: Oh, I didn't know that was part of R5RS! 13:40:13 Might as well reserve all c(a|d)+r and require that they are implemented 13:40:27 I still think it's silly, even if it is traditional. 13:40:29 -!- ejs [n=eugen@222-25-178-94.pool.ukrtel.net] has quit [Read error: 110 (Connection timed out)] 13:41:36 incubot: What do you suppose eli ran out of? 13:41:40 or what you mean? 13:45:26 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 13:46:02 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 13:49:06 borism [n=boris@195.50.205.224] has joined #scheme 13:49:14 -!- Pepe_ [n=ppjet@78.114.138.181] has quit [Read error: 110 (Connection timed out)] 13:51:28 MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 13:55:51 -!- MrFahrenheit [n=RageOfTh@users-42-158.vinet.ba] has quit [Read error: 104 (Connection reset by peer)] 14:01:24 -!- Fufie [n=innocent@86.80-203-225.nextgentel.com] has quit ["Leaving"] 14:01:28 alexsuraci [n=alex@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #scheme 14:04:30 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 14:07:40 luz [n=davids@189.122.90.116] has joined #scheme 14:18:46 hotblack23 [n=jh@p5B05610E.dip.t-dialin.net] has joined #scheme 14:19:53 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 14:21:11 incubot: non-traditional excuses 14:21:14 To clarify, my parents are very conservative, traditional sort of people. 14:21:28 -!- MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has quit ["DOWNLOADING LATEST VERSION OF THE INTERNET"] 14:21:32 incubot: Whose aren't? 14:21:35 If your implementation records the location of every cons cell whose cdr is null, all you need to do is look at each element of your list and see if it corresponds to one of those indexed pointers. :-D 14:23:25 Nshag [i=user@193.248.206.89] has joined #scheme 14:24:41 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 14:36:02 Sveklo [n=sveklo@YKMMMCCL.gprs.sl-laajakaista.fi] has joined #scheme 15:09:01 -!- Sveklo [n=sveklo@YKMMMCCL.gprs.sl-laajakaista.fi] has quit [Read error: 60 (Operation timed out)] 15:10:28 Sveklo [n=sveklo@KDCCIII.gprs.sl-laajakaista.fi] has joined #scheme 15:10:36 -!- Sveklo [n=sveklo@KDCCIII.gprs.sl-laajakaista.fi] has quit [Remote closed the connection] 15:13:41 Sveklo [n=sveklo@KDCCIII.gprs.sl-laajakaista.fi] has joined #scheme 15:14:35 -!- Sveklo [n=sveklo@KDCCIII.gprs.sl-laajakaista.fi] has quit [Client Quit] 15:19:45 -!- cornucopic [n=r00t@202.3.77.134] has quit ["so long.."] 15:25:22 -!- ASau` is now known as ASau 15:29:35 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 15:32:51 MononcQc [i=MononcQc@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 15:33:07 masm [n=masm@85.243.209.28] has joined #scheme 15:33:33 mmc [n=mima@cs137104.pp.htv.fi] has joined #scheme 15:42:46 exexex [n=chatzill@88.234.191.186] has joined #scheme 15:47:10 copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has joined #scheme 15:51:31 -!- exexex [n=chatzill@88.234.191.186] has quit ["ChatZilla 0.9.85 [Firefox 3.5.2/20090729211433]"] 16:01:52 -!- ASau [n=user@83.69.240.52] has quit [Read error: 113 (No route to host)] 16:06:07 ASau [n=user@83.69.240.52] has joined #scheme 16:12:42 -!- ASau [n=user@83.69.240.52] has quit [Remote closed the connection] 16:12:51 ASau [n=user@83.69.240.52] has joined #scheme 16:13:40 vatsal [n=vatsal@60.243.234.240] has joined #scheme 16:14:40 jonrafkind [n=jon@98.202.86.149] has joined #scheme 16:20:23 -!- sepult [n=user@xdsl-87-78-26-65.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 16:25:03 -!- borism [n=boris@195.50.205.224] has quit [Read error: 145 (Connection timed out)] 16:27:19 -!- copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has quit [] 16:30:16 -!- ASau [n=user@83.69.240.52] has quit [Read error: 113 (No route to host)] 16:31:16 -!- vatsal [n=vatsal@60.243.234.240] has quit [] 16:34:10 -!- jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has quit [Read error: 110 (Connection timed out)] 16:36:48 jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has joined #scheme 16:38:25 -!- jewel_ [n=jewel@dsl-242-129-207.telkomadsl.co.za] has quit [Read error: 113 (No route to host)] 16:45:51 stepnem [n=stepnem@88.103.132.186] has joined #scheme 16:49:20 -!- wingo [n=wingo@58.Red-83-37-98.dynamicIP.rima-tde.net] has quit [Read error: 113 (No route to host)] 16:54:00 ASau [n=user@83.69.240.52] has joined #scheme 16:57:38 -!- jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has quit [Success] 16:58:08 jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has joined #scheme 17:01:29 sepult [n=user@87.78.26.65] has joined #scheme 17:07:31 -!- stepnem [n=stepnem@88.103.132.186] has quit [SendQ exceeded] 17:12:16 stepnem [n=stepnem@88.103.132.186] has joined #scheme 17:14:44 -!- stepnem [n=stepnem@88.103.132.186] has quit [SendQ exceeded] 17:14:46 niiice http://www.pawfal.org/fluxus/documentation/ 17:16:46 stepnem [n=stepnem@88.103.132.186] has joined #scheme 17:18:14 What Scheme is this based on? 17:18:25 -!- Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has quit ["This computer has gone to sleep"] 17:18:39 PLT I think 17:18:56 yep, PLT http://www.pawfal.org/fluxus/ 17:19:17 I saw some guile references around the wiki; it looks like they switched. 17:19:37 Oh, and you can use it in DrScheme. Nice. 17:19:48 Very nice, actually! 17:20:05 Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has joined #scheme 17:20:22 and a short pdf on it http://www.pawfal.org/dave/files/scheme-uk/scheme-uk-fluxus.pdf 17:21:08 explains how it's built 17:21:08 The GPL thing is a bit scary, but I'm sure there are plenty of users who don't care about that. 17:21:59 -!- jedc [n=jedc@c-98-232-225-102.hsd1.or.comcast.net] has quit [Read error: 104 (Connection reset by peer)] 17:22:29 Oh, they're using FrTime as well. Neat! 17:24:03 "Fluxus apparently needs jack but Ubuntu uses pulseaudio by default. I got this to work by starting qjackctl (which temporarily disables pulseaudio), playing songs using audacious with output set to jack, running (start-audio "0" 1024 44100) in fluxus, and lastly dragging the audacity output to the fluxus input under "connect" in qjackctl. 17:24:03 And then checking if you are getting any sound data by doing (every-frame (begin (display (gh 0)) (newline)))" 17:24:39 -!- stepnem [n=stepnem@88.103.132.186] has quit [Excess Flood] 17:25:38 stepnem [n=stepnem@88.103.132.186] has joined #scheme 17:26:05 Heh. Linux sound continues to be a disaster; film at 11. 17:26:18 yep 17:27:32 I have to wonder if using, say, Gambit wouldn't have been better, though, as (hopefully) not so much C++ would be necessary. 17:28:22 possible. 17:28:41 Why would Gambit versus PLT Scheme make a big difference concerning C++? 17:29:20 -!- stepnem [n=stepnem@88.103.132.186] has quit [Excess Flood] 17:30:33 stepnem [n=stepnem@88.103.132.186] has joined #scheme 17:30:51 bit_shifter [n=bit_shif@netblock-68-183-144-49.dslextreme.com] has joined #scheme 17:31:28 -!- tagac [n=user@176.37.221.87.dynamic.jazztel.es] has quit [Remote closed the connection] 17:34:09 Riastradh: The imlicaiton in the talk PDF linked seemed to be that mzscheme performance was a significant barrier to using Scheme for more operations; the last time I looked at such things, it was possible to coax better performance out of Gambit for heavily numeric operations. 17:34:15 er, "implication" 17:35:19 -!- bit_shifter [n=bit_shif@netblock-68-183-144-49.dslextreme.com] has quit [Remote closed the connection] 17:35:20 -!- chylli [n=lchangyi@119.181.3.122] has quit [Remote closed the connection] 17:35:44 -!- Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has quit [Read error: 104 (Connection reset by peer)] 17:36:16 Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has joined #scheme 17:36:38 chandler, what does that have to do with C++? 17:37:42 That's the language they're using for their core library, since they believe mzscheme not to be performant enough to handle it. 17:38:16 Oh, I see. 17:40:05 pfo [n=pfo@chello084114049188.14.vie.surfer.at] has joined #scheme 17:42:11 -!- stepnem [n=stepnem@88.103.132.186] has quit [SendQ exceeded] 17:42:42 bit_shifter [n=bit_shif@netblock-68-183-144-49.dslextreme.com] has joined #scheme 17:42:52 -!- ASau [n=user@83.69.240.52] has quit [Remote closed the connection] 17:42:58 ASau [n=user@83.69.240.52] has joined #scheme 17:46:19 -!- HG` [n=HG@xdslam168.osnanet.de] has quit [Client Quit] 17:47:58 -!- tefaj [n=Jafet@unaffiliated/jafet] has quit [Read error: 54 (Connection reset by peer)] 17:48:17 -!- pfo [n=pfo@chello084114049188.14.vie.surfer.at] has quit [Remote closed the connection] 17:48:49 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from services.] 17:48:58 sladegen [n=nemo@unaffiliated/sladegen] has joined #scheme 17:49:27 ski_ [n=md9slj@remote1.student.chalmers.se] has joined #scheme 17:50:46 pfo [n=pfo@chello084114049188.14.vie.surfer.at] has joined #scheme 17:53:45 -!- bit_shifter [n=bit_shif@netblock-68-183-144-49.dslextreme.com] has quit [] 17:54:42 borism [n=boris@195.50.205.224] has joined #scheme 17:57:33 -!- MononcQc [i=MononcQc@modemcable062.225-20-96.mc.videotron.ca] has quit ["DOWNLOADING NEXT VERSION OF INTERNET"] 17:57:35 stepnem [n=stepnem@88.103.132.186] has joined #scheme 18:03:29 TimMc: like many other things, having `c[ad]*r' bindings is not silly when you learn how to use it. 18:03:46 TimMc: (and the reason I'm running is that I'm not local now.) 18:05:49 copumpkin [n=pumpkin@129.170.241.32] has joined #scheme 18:07:59 -!- stepnem [n=stepnem@88.103.132.186] has quit [SendQ exceeded] 18:28:42 -!- cky [n=cky@cpe-024-211-255-249.nc.res.rr.com] has quit ["Rebooting...."] 18:30:53 EnglishGentv2 [n=pumpkin@129.170.241.32] has joined #scheme 18:31:04 -!- copumpkin [n=pumpkin@129.170.241.32] has quit [Read error: 104 (Connection reset by peer)] 18:36:56 -!- EnglishGentv2 is now known as copumpkin 18:43:16 HG` [n=HG@xdslgb234.osnanet.de] has joined #scheme 18:45:26 tagac [n=user@176.37.221.87.dynamic.jazztel.es] has joined #scheme 18:47:28 stepnem [n=stepnem@88.103.132.186] has joined #scheme 18:50:17 -!- Pepe__ is now known as Pepe_ 18:55:24 -!- borism [n=boris@195.50.205.224] has quit [Read error: 145 (Connection timed out)] 19:01:42 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit [Remote closed the connection] 19:03:29 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 19:04:47 sphex_ [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has joined #scheme 19:11:04 sphex__ [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has joined #scheme 19:16:06 sphex___ [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has joined #scheme 19:18:02 -!- sphex__ [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has quit [Read error: 60 (Operation timed out)] 19:21:05 -!- luz [n=davids@189.122.90.116] has quit [Read error: 104 (Connection reset by peer)] 19:21:26 -!- sphex [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has quit [Read error: 110 (Connection timed out)] 19:24:40 luz [n=davids@189.122.90.116] has joined #scheme 19:24:46 -!- sphex_ [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has quit [Read error: 110 (Connection timed out)] 19:34:40 devinus [n=devin@24.174.15.32] has joined #scheme 19:39:39 so, i never went to college but i've reached a point in my professional career that i'm proud of. however, something's definitely been missing, and i'm beginning to start to feel behind some of my peers. is going to sicp and htdp really going to help? 19:40:12 (for those interested, i'll be entering college as a CS major next year, i couldn't put it off any longer) 19:41:32 good luck, math is hard! I tried that, although after 10 years I managed to pass 1st years math at uni, it was so hard, it discouraged me from going further 19:41:52 but self-improvement is always good 19:42:16 CS is fun :) 19:42:34 the CS part was almost too easy though :( 19:42:52 yeah, i've only been out of the game for four years now and i was a top-student when i graduated. i've been trying to keep sharp, but it sure will be hard 19:42:52 but I did still learn a lot 19:57:03 -!- Narrenschiff [n=ritchie@xolotl.plus.com] has quit [] 19:57:37 mreggen [n=mreggen@cm-84.215.28.167.getinternet.no] has joined #scheme 19:59:42 -!- luz [n=davids@189.122.90.116] has quit [anthony.freenode.net irc.freenode.net] 19:59:42 -!- jonrafkind [n=jon@98.202.86.149] has quit [anthony.freenode.net irc.freenode.net] 19:59:42 -!- Pepe_ [n=ppjet@78.113.44.92] has quit [anthony.freenode.net irc.freenode.net] 19:59:42 -!- sad0ur [n=sad0ur@psi.cz] has quit [anthony.freenode.net irc.freenode.net] 19:59:42 -!- weinholt [i=weinholt@debian/emeritus/weinholt] has quit [anthony.freenode.net irc.freenode.net] 19:59:50 weinholt [n=weinholt@gula.csbnet.se] has joined #scheme 20:00:00 luz [n=davids@189.122.90.116] has joined #scheme 20:01:22 -!- tagac [n=user@176.37.221.87.dynamic.jazztel.es] has quit ["/* */"] 20:03:12 jonrafkind [n=jon@98.202.86.149] has joined #scheme 20:04:11 sad0ur [n=sad0ur@psi.cz] has joined #scheme 20:04:51 sad0ur_ [n=sad0ur@psi.cz] has joined #scheme 20:04:51 Pepe_ [n=ppjet@78.113.44.92] has joined #scheme 20:05:30 -!- sad0ur_ [n=sad0ur@psi.cz] has quit [Client Quit] 20:08:11 cky [n=cky@cpe-024-211-255-249.nc.res.rr.com] has joined #scheme 20:20:54 devinus: Having experience with Scheme will put you *ahead* of many of your peers. It will teach you new ways of thinking about programming besides what is appropriate in C and Java. 20:21:56 TimMc: well I have a functional programming background from Erlang, and also some functional programming i practice in Python, Ruby, and JS 20:22:03 is there more to it than that? 20:22:48 Function programming in Python and Ruby? Really? 20:22:58 *functional 20:23:08 there is so much more to it than what you can do in those three 20:23:35 masm: well, i did say *some* 20:23:54 devinus: Of those I only have extensive experience in JS, which only gives a hint of what Scheme is like. 20:24:18 That background will certainly help you learn Scheme, though! 20:24:31 TimMc: yeah, i read douglas crockford's littler javascripter comparing JS to Scheme 20:29:17 -!- masm [n=masm@85.243.209.28] has quit ["Leaving."] 20:43:33 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 20:44:57 mongooseWA [n=mongoose@c-24-18-243-100.hsd1.wa.comcast.net] has joined #scheme 20:47:53 -!- ASau [n=user@83.69.240.52] has quit [Remote closed the connection] 20:49:39 -!- datou [n=datou@124.205.137.170] has quit [Client Quit] 20:57:58 linas [n=linas@gnucash.org] has joined #scheme 21:01:13 Summermute [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has joined #scheme 21:01:37 -!- Summermute66 [n=scott@c-68-55-207-173.hsd1.dc.comcast.net] has quit [Read error: 60 (Operation timed out)] 21:02:38 Soo .. I need to invent a mini-language, which I need to interpret into scheme code. What's the best way to do this? 21:03:34 should I use macros? Some other approach? 21:03:55 (currently, I have some very ugly perl scripts that do this) 21:04:20 Should I read sicp again? 21:09:00 dmoerner [n=dmr@134.173.87.189] has joined #scheme 21:15:12 mapreduce [n=ricky@varenka.cime.net] has joined #scheme 21:16:25 -!- devinus [n=devin@24.174.15.32] has quit [] 21:16:55 Hello. I'm attempting to try out Typed Scheme, in PLT Scheme. The documentation suggests PLT Scheme comes with Typed Scheme support. 21:17:17 The Language -> Choose Language menu item appears to contradict that. Any suggestions? 21:24:07 tagac [n=user@176.37.221.87.dynamic.jazztel.es] has joined #scheme 21:28:48 the language menu is being phased out, you choose the module language and start your file with "#lang typed-scheme" 21:30:32 http://doc.plt-scheme.org/ts-guide/index.html 21:31:09 is there a (car) and (cdr) equivalent for vectors? 21:31:17 Hmm, I guessed that already and tried it. 21:31:21 *mapreduce* tries it again. 21:33:15 I was in the wrong language mode, one that didn't have 'module', afaict. I'm now in Pretty Big, typed #lang typed-scheme and found that it didn't terminate. 21:34:37 Same for #lang scheme. Windows XP, if that matters. 21:38:11 are you using some ancient version of PLT scheme that doesn't have the `Module' language? 21:38:59 I just downloaded it, DrScheme 4.2.1. 21:40:08 then you should be able to change the language to `Module' instead of `Pretty Big' (which is a legacy language) 21:41:48 -!- mongooseWA [n=mongoose@c-24-18-243-100.hsd1.wa.comcast.net] has quit [] 21:42:33 Ok, I can, via the menus, but still #lang typed-scheme never seems to terminate. 21:46:58 works fine here 21:48:20 Seems I was typing it in the REPL part rather than in a file, and that that doesn't work. 21:49:30 So, a two-line file: #lang typed-scheme \n (define: x : number 3) end of file.. "Internal Typechecker Error: erroneous syntax was not a syntax object: #f number while typechecking number" 21:49:50 Is this one of those programs that works great on Linux and is a bit flaky on Windows or something? 21:51:00 So -- ah -- writing application-specific languages in scheme just isn't very popular ? 21:51:19 no, number is not a type, Number is (case sensitive) 21:51:43 ASau [n=user@83.69.240.52] has joined #scheme 21:51:44 So the example here http://www.ccs.neu.edu/home/samth/typed-scheme/ is incorrect (first line of first screenshot) 21:52:18 Thanks, I'm good to go now. 21:54:05 linas: Hm? Normally, you don't write a complete application-specific language; rather, you specialize Scheme to the domain through syntactic extension. 21:54:31 linas: Don't assume that because you don't get an immediate answer to a question that there isn't an answer. 21:55:35 linas: Without knowing more details of your problem domain, I would say to start with macros, and see if that gets you to where you need to go. 22:01:48 -!- copumpkin [n=pumpkin@129.170.241.32] has quit [Read error: 110 (Connection timed out)] 22:02:29 -!- mmc [n=mima@cs137104.pp.htv.fi] has quit [Read error: 110 (Connection timed out)] 22:04:24 Narrenschiff [n=ritchie@xolotl.plus.com] has joined #scheme 22:05:45 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 22:11:35 Thanks chandler. I guess I was fishing for websites which might discuss this. I can provide details of the problem domain, but that could be a rather confusing cnoversation. 22:12:31 Basically, I need to turn something that looks prolog-like into a very specific set of scheme calls. 22:13:32 i.e. I have a rule engine, but its "hard to use", and putting a prolog-like interface on top of it should make it much easier to use. 22:15:49 -!- hotblack23 [n=jh@p5B05610E.dip.t-dialin.net] has quit ["Leaving."] 22:19:07 neilv [n=user@dsl092-071-029.bos1.dsl.speakeasy.net] has joined #scheme 22:19:14 lolcow [n=lolcow@196.210.200.241] has joined #scheme 22:19:15 -!- leppie [n=lolcow@196.210.200.241] has quit [Read error: 54 (Connection reset by peer)] 22:19:51 what was the trick for having a syntax-rules rule expand to include a literal "..."? 22:21:14 MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 22:23:07 neilv: (... ...) for those systems that support it 22:23:37 aha! thank you. that sounds familiar 22:25:48 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Read error: 104 (Connection reset by peer)] 22:29:19 (define-syntax ellipses (syntax-rules () ((_) (quote (... ...))))) 22:29:30 works in plt, which is all i need for now 22:30:39 Adamant [n=Adamant@unaffiliated/adamant] has joined #scheme 22:30:42 -!- annodomini [n=lambda@wikipedia/lambda] has quit [Client Quit] 22:31:33 linas: The approach is should mostly be based on it's usage... if you want to use it inline with scheme you should probally use macros... 22:32:08 linas: If you want to keep it seperate from the scheme, or if the syntax isn't in s-expressions 22:32:30 You might need to run conversion seperate 22:38:00 Arelius, thanks. I'd *like* to have inline scheme, but that's problematic. The syntax should be prolog-like and not s-expressions, due to the structure of the data. 22:38:16 I'll have to ponder and experiment a bit, I guess. 22:39:54 sphex [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has joined #scheme 22:40:43 -!- sphex___ [n=nobody@modemcable239.185-56-74.mc.videotron.ca] has quit [Read error: 60 (Operation timed out)] 22:46:09 I'm having some trouble wrapping my head around the module system, and the way that the require / provide rules interact with read / expand layers. 22:46:42 If I have a 3 line file named "model.ss", and it consists of the following: #lang scheme \n (require (planet jaymccarthy/sqlite)) \n (provide (all-from-out))\nEOF 22:47:15 -!- HG` [n=HG@xdslgb234.osnanet.de] has quit [Client Quit] 22:47:32 then should I be able to have bar.ss simply do: (require "model.ss") ?? 22:47:42 hello everyone 22:47:49 (assuming that both model.ss and foo.ss are in the same directory) 22:51:53 linas: Then you'll probally have to parse everything out manually, you can stil have inline scheme but you'll have to handle identfying that 22:52:06 does scheme provide any sort of logical xor binding? 22:54:33 Arelius: not as such, but it's easy to do 22:55:32 (define (xor a b) (or (and a (not b)) (and b (not a)))) 23:04:07 -!- tagac [n=user@176.37.221.87.dynamic.jazztel.es] has quit ["/* */"] 23:05:49 You can't use #lang ... syntax at the repl 23:06:22 type #lang typed-scheme at the top of a file. Works just great. BTW - Typed scheme is *very cool* 23:09:29 And typed scheme works just perfectly on Windows. The docs are short. Take a peak and try a few things out. 23:11:18 mongooseWA [n=mongoose@c-24-18-243-100.hsd1.wa.comcast.net] has joined #scheme 23:12:15 wy [n=wy@c-98-228-40-51.hsd1.in.comcast.net] has joined #scheme 23:12:23 dstorrs - mzscheme modules or r6rs modules? 23:17:39 -!- MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has quit ["DOWNLOADING LATEST VERSION OF THE INTERNET"] 23:18:02 linus - FWIW, I'm using the parser-tools library (lex/yacc) and it's very convenient to use (well, as convenient as yacc can be). This might be overkill, though. I'm a Scheme macro novice (I have a CL background), but macros would probably do the job nicely with the runtime and "primops" being the underlying scheme implementation. 23:19:39 arcfide [n=arcfide@adsl-99-14-211-8.dsl.bltnin.sbcglobal.net] has joined #scheme 23:28:13 yes, thatnks for jogging my brain Summermute. Yes, I need LALR for scheme, (since lex/yacc is C only last I looked). See, I knew I needed a kick in thehead. 23:29:08 -!- mongooseWA [n=mongoose@c-24-18-243-100.hsd1.wa.comcast.net] has quit [] 23:30:00 mongooseWA [n=mongoose@c-24-18-243-100.hsd1.wa.comcast.net] has joined #scheme 23:30:00 linas: I found parser combinators to be a nice applicable style to functional parsing 23:42:35 Summermute: the parser-tools code *is* constructing the parser as a macro, IOW it precompiles your parser specification into plain codeeeeeeeeee. 23:42:53 Arelius: parser combinators had some serious issues, IIRC. 23:43:04 Summermute: not quite sure actually 23:43:12 see here for example: http://paste.lisp.org/display/86276 23:44:27 dstorrs: You need (provide (all-from-out (planet jaymccarthy/sqlite))) 23:45:32 oh. so what is the command that exports everything in the current file?? 23:46:30 (all-defined-out) provides all of the *definitions* in the current module. 23:46:42 But that doesn't include stuff that you required in. 23:46:42 "Exports all identifiers that are defined at phase level 0 or phase level 1 within the exporting module..." 23:46:52 ahhhh... 23:46:57 Yes, all of the definitions. 23:47:02 ok, the light begins to dawn. 23:47:25 copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has joined #scheme 23:48:12 is there a version that just says "export everything that is in this module, either due to being defined here or from being imported" ? 23:48:48 I've been through the Reference a couple of times and the module im/export stuff is still rather murky 23:49:57 dstorrs: No -- but you can write a macro that will require and provide stuff. 23:50:05 heh. 23:50:31 At this point, I'm pretty convinced that the only thing you CAN'T write a macro to do is cook you a nice souffle. 23:50:51 I think I saw someone do that once 23:50:57 :> 23:51:34 or atleast something close enough 23:51:43 In the past that would be easy -- just use some RS232 port; now, all you need is to replace that with a USB port. (And hardware to match, of course.) 23:52:20 foo.ss:40:12: syntax error: insufficient eggs 23:52:25 yeah, keep me in the loop on your progress there. :>