00:06 (quit) 50UAANW5T: Read error: Connection reset by peer 00:18 (quit) leo2007: Ping timeout: 240 seconds 00:54 (join) ckrailo 01:17 (quit) masm: Quit: Leaving. 01:20 (quit) yoklov1: Quit: Leaving. 01:32 (quit) jonrafkind: Read error: Connection reset by peer 01:33 (join) jonrafkind 01:41 (quit) jonrafkind: Ping timeout: 240 seconds 02:50 (join) hkBst 03:41 (quit) ckrailo: Quit: Computer has gone to sleep. 04:18 (join) mceier 04:20 (join) PLT_Notify 04:20 PLT_Notify: racket: master Ryan Culpepper * d9f05a6 (3 files in 1 dirs): syntax/parse: better error message for unbound literals 04:20 PLT_Notify: racket: master Ryan Culpepper * abb8f63 (2 files in 1 dirs): syntax/parse: made link to pattern-directive docs more prominent, indexed ... 04:20 PLT_Notify: racket: master commits d40b43c...abb8f63 - http://bit.ly/m3yyEC 04:20 (part) PLT_Notify 06:06 (quit) ohwow: Ping timeout: 260 seconds 06:06 (join) ohwow 06:59 (join) masm 07:11 (join) tauntaun 07:26 (join) lucian 07:50 (quit) lucian: Ping timeout: 240 seconds 07:52 (join) lucian 07:54 (quit) tauntaun: Quit: Ex-Chat 07:58 (join) lucian_ 07:58 (quit) lucian_: Remote host closed the connection 08:00 (quit) lucian: Ping timeout: 246 seconds 08:04 (quit) masm: Ping timeout: 240 seconds 08:25 (join) yoklov 08:41 (join) masm 09:30 (join) ChibaPet 09:31 ChibaPet: Good morning, all. 09:44 (join) mithos28 09:55 (join) sheikra 10:03 (part) ChibaPet 10:03 (quit) mithos28: Quit: mithos28 10:03 (join) achim 10:12 (part) achim: "Leaving..." 10:25 (join) MayDaniel 10:30 (quit) hkBst: Remote host closed the connection 10:40 (join) cssteve 10:40 cssteve: hello 10:40 cssteve: is anyone there 10:40 cssteve: ? 10:41 cssteve: how do I check is something is a predicate? You can check for number like number? or symbol? or list?, how do you check for predicate????? 10:43 (nick) samth_away -> samth 10:46 samth: cssteve, what would that mean? 10:46 samth: also, why do you want to do this? 10:47 cssteve: i just want to check if a statement like symbol or number is a predicate 10:48 cssteve: when given a predicate and list, return if the car of the list matches the predicate 10:48 cssteve: list this: 10:48 samth: i think that means you take the predicate as an input 10:48 yoklov: what do you mean by predicate 10:48 yoklov: racklog predicate? 10:49 samth: not that you check that the first element *is* a predicate, but that you check that the first element produces #t when provided to the predicate 10:49 cssteve: (filter number? '(a 2 4 () sb) = '(2 4) 10:49 cssteve: (filter symbol? '(a 2 4 () sb) = '(a sb) 10:50 samth: cssteve, you don't need to check if something's a predicate to implement filter 10:50 cssteve: oh ok 10:50 cssteve: so I just accept it as an input without checking? 10:52 samth: cssteve, right 10:52 (join) Zorlin 10:52 samth: are you planning to check that the second input is a list? 10:52 cssteve: here, this is what I have, but how do I make it recursive to return the output 10:52 cssteve: (define filter (lambda (p ls) (p (car ls)))) 10:54 samth: cssteve, if (p (car ls)) produces #t, what do you want to do with it? 10:55 cssteve: input = (filter number? '(1 as 3 () 2)) 10:55 cssteve: output = '(1 3 2) 10:55 samth: right, but more specifically, in your definition of filter 10:55 cssteve: i want to put it in a list and do the same thing with the cdr of the list 10:56 samth: ok, so lets think about how to deal with the rest of the list 10:56 samth: how what you want to do is go through the rest of the list and get only the elements that match p 10:57 samth: so we need something to fill in this blank: (____ p (cdr ls)) 10:57 sheikra: samth: I see to have another reason to put match in the compiler ... 10:57 cssteve: if the pred returns true on car of list, I want to place car of list in a new list, and return (filter p (cdr ls)). 10:58 samth: sheikra, ? 10:58 cssteve: if pred returns false on car of list, I want to just return (filter p (cdr ls)) 10:58 cssteve: I know how to do it logically, but I am having a hard time coding it 10:58 samth: ok, so how can we decide what to do based on whether (p (car ls)) produces #t? 10:58 sheikra: samth: (match `(,u ,v) [((TVar name) (TVar name)) ...] ... )) doesn't seem to work .. 10:59 samth: sheikra, that's because you need to write (list (TVar name) (TVar name)) 10:59 samth: as your pattern 10:59 samth: that or use `match*' 10:59 samth: (p1 p2) is not a list pattern 11:00 cssteve: oh wait, there is suppose to be a cons in there somewhere 11:01 samth: well, cssteve, cons is how you combine a single element with a list, so it seems like it would be useful here 11:01 sheikra: samth: oh, never mind. I should have used (match `(,u ,v) [`(,(TVar name) ,(TVar name)) ...] ... )) doesn't seem to work .. 11:02 sheikra: samth: so there no restriction how I construct the expression being matched? 11:02 samth: sheikra, right, the first form is just an arbitrary expression 11:03 cssteve: I kind of got it, but I keep getting an error which I dont know how to fix 11:03 cssteve: (define filter (lambda (p ls) (p (car ls)) (cons (car ls) (filter p (cdr ls))) (filter p (cdr ls)))) 11:04 samth: cssteve, that's very close, but you need to make a decision based on whether (p (car ls)) is true or false? 11:04 samth: do you know of a construct that behaves differently conditionally depending on whether something is true or false? 11:05 sheikra: samth: cool. thanks :) 11:05 cssteve: I did know before, but with other programming languages, I forgot 11:05 samth: how about `if', cssteve? 11:05 cssteve: do you need an if statment? 11:07 cssteve: (define filter (lambda (p ls) (if(p (car ls)) (cons (car ls) (filter p (cdr ls)))) (filter p (cdr ls)))) 11:07 samth: does that work? 11:07 cssteve: is that a correct placement of the "if"? 11:09 samth: what's the syntax of if? 11:10 cssteve: is it if then? 11:11 samth: no, it's (if test then else) 11:11 samth: cssteve, are you working with a textbook or tutorial? 11:14 cssteve: no I dont have a book or tutorial, I am just studying for finals and my professor is the worst 11:14 samth: does your class have a web page? 11:14 samth: do you have any references for the syntax of the language? 11:14 cssteve: ya, but its on blackboard 11:14 samth: does it say anything about syntax? 11:15 cssteve: yes, it says that then and else aren't identifiers 11:16 samth: right, that's true 11:16 samth: what does it say about the syntax of if? 11:17 samth: cssteve, you might also want to look at htdp.org 11:18 samth: which is an excellent introductory textbook for programming that uses similar languages 11:22 (join) anRch 11:27 yoklov: cssteve, your class doesn't use at textbook at all? 11:35 (join) cmatheson 11:40 (join) ckrailo 11:41 (quit) rekahsoft: Ping timeout: 252 seconds 11:46 (quit) yoklov: Quit: Leaving. 11:57 (quit) cssteve: Ping timeout: 252 seconds 12:01 (join) tauntaun 12:02 (quit) anRch: Quit: anRch 12:05 (join) shofetim 12:05 (quit) tauntaun: Client Quit 12:11 (join) anRch 12:19 (quit) anRch: Ping timeout: 248 seconds 12:21 (quit) sheikra: Quit: Leaving 12:24 (join) jonrafkind 12:26 (join) yoklov 12:27 (join) anRch 12:32 (quit) anRch: Ping timeout: 240 seconds 12:36 (join) dnolen 12:39 (join) anRch 12:48 (quit) anRch: Quit: anRch 13:04 (join) anRch 13:33 (join) rekahsoft 13:42 (quit) yoklov: Quit: Leaving. 14:08 (part) shofetim: "ERC Version 5.3 (IRC client for Emacs)" 14:08 (join) gfds 14:08 gfds: dsa 14:08 gfds: anybody out there? 14:09 stamourv: yes 14:09 stamourv: just ask your question 14:14 (quit) gfds: Ping timeout: 252 seconds 14:21 (join) simonh 14:31 (join) Blkt 14:34 Blkt: good evening everyone 14:43 (part) anRch 14:44 (quit) realitygrill: Ping timeout: 240 seconds 14:45 (join) yoklov 14:52 (join) realitygrill 14:52 pfox__: "Go cons a piece of cake onto your mouth". hee. 15:07 (join) carleastlund 15:08 askhader: I'm just gonna cadr it back... 15:13 (join) realitygrill_ 15:16 (quit) realitygrill: Ping timeout: 240 seconds 15:16 (nick) realitygrill_ -> realitygrill 15:28 (join) mithos28 15:54 (quit) yoklov: Quit: Leaving. 16:16 pfox__: hey, what's the diff between '() and quote() ? 16:17 (part) simonh 16:17 pfox__: im working through the little schemer, and i've been using the former as a shortcut for quote() in a lot of functions 16:17 pfox__: but it wouldn't work.. on a whim i swapped w/ quote() and now it works.. so im curious how i was misusing '() and why it worked 16:18 pfox__: usually was using it as the value when (null? l) was true 16:19 pfox__: but it wouldn't work on a certain question i was working through, even 16:19 pfox__: and curious why it worked on previous questions 16:23 samth: 'e is the same as (quote e), where e is an arbitrary s-expression 16:27 pfox__: https://gist.github.com/957856 16:27 pfox__: im just curious why subst works w/ '() while multirember doesn't 16:27 pfox__: so it's something with the way im writing it 16:27 pfox__: even though both the "bad" multirember and working subst seem to work basically the same 16:28 pfox__: with where they test/return the empty list at the end of the recursion chain 16:28 pfox__: i guess the difference is with how that list gets used. 16:28 bremner_: parens matter 16:28 bremner_: ('()) != '() 16:28 pfox__: yeah, i figured it was something like that 16:29 bremner_: ((quote ())) won't work either 16:32 pfox__: the "good" multirember in that gist works 16:33 bremner_: yes. count patens 16:34 bremner_: parens even 16:36 bremner_: (quote ....). is fine 16:39 (quit) edw: Remote host closed the connection 16:40 pfox__ nods. thanks. 16:46 pfox__: i can see from messing around on the repl what you're talking about 16:47 pfox__: still interesting why it i don't get an error in some applications and not others 16:47 pfox__: hm. 16:48 (join) tauntaun 17:09 (quit) tauntaun: Quit: Ex-Chat 17:11 (quit) MayDaniel: Read error: Connection reset by peer 17:12 (join) PLT_Notify 17:12 PLT_Notify: racket: master Robby Findler * 507b1cd (74 files in 74 dirs): moved the docs-complete library into rackunit ... - http://bit.ly/ifqE9n 17:12 (part) PLT_Notify 17:33 (join) Fare 17:45 (join) tauntaun 17:46 (join) misterm 17:47 (quit) mceier: Quit: leaving 18:04 (quit) dnolen: Ping timeout: 252 seconds 18:30 (quit) cmatheson: Ping timeout: 240 seconds 18:30 (join) cmatheson 18:30 (quit) cmatheson: Client Quit 18:31 (join) PLT_Notify 18:31 PLT_Notify: racket: master Eli Barzilay * b4b490b (1 files in 1 dirs): Win64 build should be working now - http://bit.ly/kKwXkI 18:31 (part) PLT_Notify 18:40 (join) yoklov 18:52 (join) JuanDaugherty 19:00 (join) PLT_Notify 19:00 PLT_Notify: racket: master Vincent St-Amour * 850d4d3 (1 files in 1 dirs): Don't display name of non-test files. 19:00 PLT_Notify: racket: master Vincent St-Amour * fa016ea (2 files in 2 dirs): Keep running TR tests even if optimizer tests fail. 19:00 PLT_Notify: racket: master Vincent St-Amour * 7b6edb4 (1 files in 1 dirs): Rewrite the optimizer test suite to use rackunit. 19:00 PLT_Notify: racket: master Vincent St-Amour * 4ea9b29 (1 files in 1 dirs): Remove redundant checks from TR's optimizer tests. ... 19:00 PLT_Notify: racket: master Vincent St-Amour * 4b03ecd (3 files in 2 dirs): Integrate the TR and TR optimizer test suites. 19:00 PLT_Notify: racket: master Vincent St-Amour * d7fd2b2 (1 files in 1 dirs): Add extra early failure cases to subtype* to avoid inference failures. 19:00 PLT_Notify: racket: master commits b4b490b...d7fd2b2 - http://bit.ly/lk4iM7 19:00 (part) PLT_Notify 19:05 (join) dnolen 19:05 (join) PLT_Notify 19:05 PLT_Notify: racket: master Sam Tobin-Hochstadt * 507db7e (1 files in 1 dirs): Include extra-procs in the #:use-sources. 19:05 PLT_Notify: racket: master Sam Tobin-Hochstadt * af56616 (1 files in 1 dirs): Require numeric-predicates at the correct phase. ... 19:05 PLT_Notify: racket: master commits d7fd2b2...af56616 - http://bit.ly/jU68wY 19:05 (part) PLT_Notify 19:31 (quit) Fare: Quit: Leaving 19:42 (quit) carleastlund: Read error: Connection reset by peer 19:43 (join) carleastlund 19:51 (quit) jonrafkind: Ping timeout: 248 seconds 19:54 (quit) masm: Quit: Leaving. 20:05 (quit) ckrailo: Quit: Computer has gone to sleep. 20:30 (join) ckrailo 20:34 (join) Counterspell 20:34 Counterspell: hey 20:35 Counterspell: Can Racket show me the recursive growth of a function visually? 20:35 Counterspell: For example: http://mitpress.mit.edu/sicp/full-text/book/ch1-Z-G-7.gif 20:38 mithos28: Counterspell: There is trace which might be helpful. http://docs.racket-lang.org/reference/debugging.html?q=trace#(form._((lib._racket/trace..rkt)._trace)) 20:38 Counterspell: mithos28, cool, thanks 20:49 (quit) mithos28: Quit: mithos28 20:51 (quit) yoklov: Quit: Leaving. 20:52 (quit) ckrailo: Quit: Computer has gone to sleep. 20:58 (join) mithos28 21:03 (join) lucian 21:10 (nick) samth -> samth_awak 21:10 (nick) samth_awak -> samth_away 21:20 (quit) JuanDaugherty: Ping timeout: 246 seconds 21:21 (join) JuanDaugherty 21:27 (quit) lucian: Remote host closed the connection 21:33 EM03: why in old scheme implementations would define (x) 10) work? 21:33 EM03: I noticed in racket it does not 21:47 (quit) Blkt: Ping timeout: 248 seconds 21:47 (join) Demosthenes 22:01 (join) yoklov 22:02 (join) yoklov1 22:02 (quit) yoklov: Read error: Connection reset by peer 22:03 (quit) yoklov1: Client Quit 22:42 (join) yoklov 22:43 (join) yoklov1 22:43 (quit) yoklov: Read error: Connection reset by peer 22:53 (quit) Demosthenes: Ping timeout: 252 seconds 23:02 (join) ckrailo 23:15 (quit) dnolen: Quit: dnolen 23:17 (join) Demosthenes 23:32 (quit) Demosthenes: Ping timeout: 276 seconds 23:32 (join) Demosthenes 23:36 (quit) mithos28: Quit: mithos28 23:56 Demosthenes: ok, so i know i can do things like (number? 1), but is there a (type-of 1) -> 'number function?