00:20 (quit) bertorob: Quit: Ex-Chat 01:24 (join) carleastlund 02:31 (quit) carleastlund: Quit: carleastlund 02:31 (join) jonrafkind 03:10 (quit) hanDerPeder: Quit: hanDerPeder 03:48 (quit) jonrafkind: Ping timeout: 265 seconds 03:51 (join) spidermario 04:04 (quit) rbarraud: Read error: Connection reset by peer 04:07 (join) rbarraud 05:22 (join) masm 05:40 (join) maoo 06:10 (join) MayDaniel 06:41 (quit) rudybot: Ping timeout: 276 seconds 06:53 (join) rudybot 06:57 (quit) chturne: Quit: Leaving 06:59 (join) mceier 07:15 (join) rbarraud_ 07:15 (quit) MayDaniel: 07:15 (quit) rbarraud: Ping timeout: 252 seconds 07:44 (join) martinhex 08:11 (join) Karpenter 08:12 Karpenter: hey im a beguiner with scheme i just wanted to ask some questions, i know its not a big deal, but i cant seam to be able to code this. 08:12 Karpenter: i wanna make a procedure to count the number of digits 08:12 Karpenter: in a number 08:13 Karpenter: i know i can do ln(specific number)/ln(10) + 1 08:13 Karpenter: but i wanted to do it recursevly cant seam to know how 08:13 Karpenter: ex: (define (count-digit n) 08:13 Karpenter: (cond (= n 0) 08:14 Karpenter: after this i cant get the algorithm rigth 08:14 Karpenter: im not asking to make the code for me 08:14 Karpenter: but just give a tip or something 08:44 (join) MayDaniel 08:44 (quit) MayDaniel: Changing host 08:44 (join) MayDaniel 08:49 (join) jeapostrophe 08:51 Karpenter: or at least how the math is done 08:51 Karpenter: how to get the number of digits out of a number 08:51 Karpenter: mathematecaly speaking 08:52 (join) chturne 09:01 bremner: Karpenter: well, generally this is closely related to log base 10, right? 09:01 Karpenter: y 09:01 bremner: oh, you want to do it the hard way ;), I see. 09:01 Karpenter: precisely 09:01 bremner: well, how many times can you divide by 10? 09:02 Karpenter: :) 09:02 Karpenter: the point was to divide by 10 09:02 Karpenter: and assign 09:02 bremner: make a recursive formula for that first 09:02 Karpenter: 1 09:02 Karpenter: how to i assign (/ n 10) .-----> 1 09:02 Karpenter: an expretion to a number 09:02 bremner: doesn't make sense to me. 09:03 Karpenter: well take the number 560 09:03 Karpenter: 56,0 09:03 Karpenter: you divide by 10 09:03 Karpenter: you count 1 digit 09:03 Karpenter: you divide again 09:03 Karpenter: you count another 09:03 Karpenter: you divide again and again to reach 0 09:03 Karpenter: so the result would be 3 digits 09:04 bremner: so, think about how to write digits(560) in terms of digits(560/10) 09:04 Karpenter: i see 09:13 Karpenter: how do i tell it to stop 09:13 Karpenter: when it reaches 0 09:13 Karpenter: hmm 09:14 Karpenter: that well 09:14 Karpenter: pity scheme doesnt do loops 09:14 Karpenter: pff 09:17 bremner: Karpenter: you need a base case in your recursion 09:17 Karpenter: n=0 09:17 Karpenter: ? 09:17 bremner: Karpenter: this is not a scheme issue, it is a writing a recursive function issue. Have you done that before? 09:18 Karpenter: well yeah 09:18 Karpenter: its just i cant figure, this specific recursion 09:18 Karpenter: tbh 09:18 Karpenter: i know how to define factorials 09:18 Karpenter: and similar stuff 09:18 Karpenter: but to count 09:19 Karpenter: digits in a number 09:19 Karpenter: hmm 09:19 bremner: hint: what numbers have only one digit? 09:19 Karpenter: 0-9 09:19 bremner: (assuming non-negative integers) 09:19 bremner: and how do you check for 0-9? 09:20 Karpenter: 10000 09:20 Karpenter: 10 100 1000 09:20 Karpenter: hmm 09:20 Karpenter: first ten numbers are assigned 09:20 Karpenter: digit 1 09:20 Karpenter: next multiplyed by ten 09:20 Karpenter: 2 digits 09:21 Karpenter: i may try it this way 09:21 Karpenter: tx 09:29 Lajla: Karpenter: http://codepad.org/ObdBNn02 09:30 Lajla: The definiotn of 'helper' is the important one 09:30 Lajla: The rest around it is just to make you be able to specify the base. But assume base 10 with no base specified. 09:30 Karpenter: i see 09:30 Karpenter: thanks 09:31 Lajla: Basically you have a base case. If the number is smaller than the base, it is 1. And a recursion case if it's as large as the base or larger. Where it's 1+ the amount of digits in the numnber divided by the basd.e 09:32 Lajla: This only works on natural numbers though 09:32 Karpenter: i see 09:35 Lajla: bremner, no fault me for making people dependent on shitty R5RS when I should explain to them the wondrous optional arguments 09:36 (quit) martinhex: Remote host closed the connection 09:52 Karpenter: anyways im making an optional argument 09:52 Karpenter: now 10:00 Lajla: Using (define (count-digits number (base 10)) 10:00 Lajla: ? 10:19 Karpenter: something similar 10:19 Karpenter: but no 10:19 Karpenter: wasnt thinking going that way 10:19 Karpenter: using quotient 10:19 Karpenter: and remainer 10:20 Karpenter: that wont be recursive 10:20 Karpenter: if i go that way 10:20 Karpenter: i could just make (ln(number) /ln 10 ) 1 10:20 Karpenter: i could just make (ln(number) /ln 10 ) +1 10:21 Karpenter: and the integer part 10:21 Karpenter: being the number of digits 10:21 Karpenter: not recursive 10:21 Karpenter: :( 10:21 Karpenter: since im studying recursive cases 10:21 Karpenter: i need to do it this way 10:21 Karpenter: its not the easyest i know 10:21 Karpenter: or fastest 10:21 Karpenter: or the most comon 10:22 Karpenter: but it got to be this way 10:27 (join) b-man_ 10:29 (join) mije 10:48 (quit) b-man_: Remote host closed the connection 10:59 mije: "This is no Scheme programming sweatshop, such as you'll find in the north-eastern United States, where innumerable young men are forced to work twenty hours a week, or more, to produce code and dissertations. " <- why is this written on http://schematics.sourceforge.net/ ? 11:02 Lajla: Karpenter, I found my code to be surprisingly small easy. 11:02 Lajla: Karpenter: http://codepad.org/Pa0vaFYE 11:03 Lajla: This is the version using racket's extensions 11:06 Lajla: Karpenter: http://codepad.org/wbF14nQ3 here we have the same algorithm in PHP 11:10 Karpenter: you just crashed my head 11:11 Lajla: Why? 11:11 Karpenter: i was over this for so mutch time 11:11 Karpenter: i eventualy got tired 11:11 Lajla: Yes, but I am brilliant. 11:11 Karpenter: and made 11:11 Karpenter: this 11:11 Karpenter: (define (cd n) (if (< n 10) 1) (- (quotient (round (log n)) (round (log 10))) 1)) 11:11 Lajla: log 11:11 Karpenter: it works 11:11 Karpenter: xD 11:11 Karpenter: epicness to the last 11:11 Karpenter: and since it rounds 3.9 to 4.0 11:12 Karpenter: i have to subtract 11:12 Karpenter: 1 11:12 Lajla: 1+ the amount of digits in the thing divided by 10 works fine too. 11:12 Karpenter: in order for the maths to be good 11:12 Lajla: It only counts the digits before the 0 you see 172.178127134 counts a three 11:13 Karpenter: you know 11:13 Lajla: Some might argue that to do it superly clean you would need if you test 1234 1 + the amount of digits in 234 or 123 11:13 Karpenter: it seams so 11:13 Lajla: But it works anyway in this way. 11:14 Karpenter: well dont think ill need that 11:14 Karpenter: :D 11:14 Karpenter: yeah true 11:14 Lajla: (The latter case is just dividing by the base anr rounding) 11:14 Karpenter: so 11:14 Karpenter: in that code 11:14 Karpenter: you add +1 11:14 Lajla: which showcases my divine brilliance. 11:14 Lajla: Yes. 11:14 Karpenter: to the amount of digits 11:14 Lajla: to the amount of digits that the number divided by the base has. 11:15 Karpenter: oh i see 11:15 Lajla: You could use (floor (/ number base)) 11:15 Karpenter: witch is 11:15 Lajla: If you want to be supar clean 11:15 Karpenter: 1 11:15 Karpenter: briliant 11:15 Karpenter: xD 11:16 Lajla: Yes, it expans to (count-digits 1234) = 1 + (count-digits 123) = 1 + 1 + (count-digits 12) ... 11:16 Karpenter: ah now i get it 11:16 Karpenter: the thing was 11:16 Karpenter: start 11:16 Karpenter: i didnt had a base 11:16 Lajla: That I am brilliant, hence I solved this hands done. 11:16 Karpenter: that i understood 11:16 Karpenter: rofl 11:17 Karpenter: :) 11:17 Lajla: Base case is 1 digit. Which is the number being < 9 11:17 Karpenter: i shall name you Lajla the briliant one 11:17 Lajla: Good idea. 11:17 Lajla: I will eat you last of my minions. 11:18 Lajla: Actualyl most people in this channel would though. 11:23 (quit) jeapostrophe: Quit: jeapostrophe 11:25 (join) jeapostrophe 11:29 Karpenter: minions hmmm delicious 11:30 Lajla: Yes, let's take a bite of bremner 11:34 (quit) mije: Ping timeout: 265 seconds 11:38 (join) anRch 11:39 (join) rmitt 11:41 (quit) rmitt: Client Quit 12:01 (join) rmitt 12:02 rmitt: general question: is it wrong of me to dislike Java? 12:02 (join) jonrafkind 12:02 Karpenter: no 12:02 Karpenter: imo 12:03 Karpenter: some people think its a mess 12:03 Karpenter: others think its average 12:03 Karpenter: but is isnt bad to dislike java 12:03 Karpenter: im a python freak 12:03 Karpenter: so ... 12:03 Karpenter: :p 12:04 rmitt: I just worry about the consequences of my taste on my employability ;-) 12:04 Karpenter: lol 12:04 Karpenter: :D 12:04 Karpenter: a sugestion dont say your tastes 12:04 Karpenter: just go there 12:04 Karpenter: ill do anything 12:05 rmitt: I'd much rather have a job writing functional code 12:05 rmitt: and I like static typing as much as dynamic, but I prefer that the former be inferred. 12:06 Karpenter: work and likings to bond together 12:06 Lajla: rmitt, not at all, you'll fit right in our elitist circles. 12:06 Karpenter: one must dislike work in order to do it good 12:06 Karpenter: imo 12:07 Lajla: rmitt, the lack of inference isn't as much the piss as the lack of type variables. 12:07 rmitt: Karpenter: interesting perspective...and I wonder if you just might be right 12:07 Karpenter: yeah you know 12:07 rmitt: Lajla: I'd LOVE to fit into your elitist circles... if only I could afford it :-) 12:08 Karpenter: hahahah 12:09 Lajla: rmitt, just say all the time that racket is the most superior language for any purpose except human resource management and you should be fine. 12:09 Karpenter: even 3 dimentional representation 12:09 Karpenter: dont think so 12:10 Karpenter: it can be done 12:10 Karpenter: but i doubt anyone did a 3d environment out of racket 12:10 Karpenter: not saying its imposible 12:10 Karpenter: but is it easyer 12:10 Karpenter: or superior 12:10 Karpenter: ? 12:16 Lajla: You mean a Raquet 3D engine/ 12:16 Karpenter: y 12:17 Karpenter: or maybe 12:17 Karpenter: not go that far 12:17 Karpenter: just make a small 3d rendering 12:17 Karpenter: program 12:17 Karpenter: that acepts ligth sources 12:17 Karpenter: and a small .obj file 12:17 Karpenter: dunno how to do that 12:17 Karpenter: from what i know of scheme or racket 12:18 Karpenter: just curious if its possible to do that 12:19 Karpenter: i doubt it would be easy from my ligth experience with C and C++ 12:19 Karpenter: since there are some things c++ does better 12:19 Karpenter: from my perpective 12:19 Karpenter: than racket 12:21 (quit) jonrafkind: Ping timeout: 240 seconds 12:26 Karpenter: still got to say Lajla racket in a curriculum could be good :D 12:26 (quit) chandler: Ping timeout: 240 seconds 12:27 (join) chandler 12:27 (nick) chandler -> Guest24533 12:36 (quit) Guest24533: Changing host 12:36 (join) Guest24533 12:36 (nick) Guest24533 -> chandler 12:39 (quit) anRch: Quit: anRch 12:46 (join) Scifi 12:47 (quit) Karpenter: Quit: Page closed 12:47 Scifi: can someone help me 12:47 Scifi: oops 12:47 Scifi: http://racket-lang.org/irc-chat.html 12:47 Scifi: (define number 234) (define (existe-digito number x) (cond ((= number x) #t) ((= (* (remainder number 10) 10) x) x) (else (existe-digito (= (* (remainder number 10) 10) x) x)))) 12:47 Scifi: ill paste bin it 12:48 Scifi: http://pastebin.com/Zn0Wdchs 12:48 Scifi: dont understand 12:48 Scifi: =: expects type as 1st argument, given: #f; other arguments were: 4 12:49 Scifi: i was trying to 12:49 Scifi: make 12:49 Scifi: a identifier , identify if a digits is on the number 12:49 (quit) jeapostrophe: Quit: jeapostrophe 12:49 Scifi: if anyone can help id apretiate 12:57 (quit) chturne: Quit: Leaving 13:00 (join) karpenter 13:00 Scifi: wtf 13:00 Scifi: how come you have the same ip as mine 13:00 Scifi: are you my neighbour or something 13:01 karpenter: ´heh 13:01 karpenter: depends u«if we are using the same network 13:01 Lajla: Scifi, your else clause is fault.y 13:01 Lajla: You give existe-digito the result of (= (* (remainder number 10) 10) 13:01 Lajla: Which is always #t or #f 13:01 Lajla: And it expects a number 13:01 Scifi: hm i see 13:02 Lajla: You might also want to generalize it for bases. 13:03 Scifi: hm 13:03 Scifi: why does it expects a number 13:03 Scifi: the base 13:03 Scifi: is wrong 13:03 Scifi: it seams 13:04 Scifi: wow 13:04 Scifi: im doing it wrong 13:04 Scifi: y 13:05 (quit) Scifi: Quit: Page closed 13:16 (quit) spidermario: Remote host closed the connection 13:18 (quit) karpenter: Ping timeout: 265 seconds 13:28 (join) hanDerPeder 13:31 (join) jonrafkind 13:47 (quit) rmitt: Quit: Page closed 14:10 (join) chturne 14:24 (quit) MayDaniel: 14:26 (join) b-man_ 15:12 (join) MayDaniel 15:34 (join) rmitt 15:36 rmitt: ok, so why does DrRacket print '(a) when I enter '(a)? The repl should output (a) instead. 15:36 rmitt: (btw, this is with #lang racket) 15:41 eli: rmitt: Why should the repl print "(a)" instead? 15:41 eli: Why not "a list with a single element which is the symbol whose name is `a'"? 15:42 Lajla: rmitt, it prints the simplest expression it can find which evaluates to what your expression evaluates to I guess. 15:42 Lajla: Let me rephrase. 15:43 Lajla: It outputs a stream of characters which when read by the reader and the result of that evaluated in some environment whose properties I shan't be paedantic enough to fully specify evaluate to the result of the expresson you input. 15:46 Lajla: rmitt, I agree by the way that this outform form is 'counter intuitive' and only work insofar you consider the data as a program. 15:47 eli: Lajla: Speaking about majority of people etc, printing "'(a)" is by far much more intuitive than "(a)". 15:47 Lajla: It leaves me to wonder why (+ 1 2) outputs "3" and not "'3" or "(-10 7)" or "(string->number "11" 2)" 15:48 Lajla: Plus the slashes 15:48 Lajla: eli, I guess it doesn, that's the annoying part about 'intuitive', it differs for people. 15:48 Lajla: The fact that most REPL's of lisp do not, or historically haven't has led to some confusion I guess. 15:49 Lajla: The difference of a datum and its evaluation 15:49 eli: Yes, but that's a small minority. 15:49 eli: Why would you expect 3 to print as "'3"? 15:49 Lajla: rmitt, and I are the rebels man. 15:50 eli: It's pretty simple -- if you enter a number, you get to see a number. 15:50 eli: If you enter a string -- you get to see a string *in* double quotes. 15:50 eli: You don't want to see the string without the double quotes, since that's going to be confusing. 15:50 Lajla: Well, "3" is the external repraesentation of an expression which evaluates to the exact number 3. As is "'3" or "(+ 1 2)" and so forth. 15:50 eli: In exactly the same way, displaying the symbol `a' as just "a" is confusing. 15:51 Lajla: Well, I just quote all things now to indicate that output is still a sequence of characters. 15:51 Lajla: I guess but "a" is reader syntax for a symbol. 15:51 Lajla: And "\"a\"" for a string 15:52 eli: Actually, "a" is reader syntax for an *identifier*, not for a symbol. 15:52 Lajla: At least, what it seems to do to me is print the external repraesentation of the 'simplest' expressoin it can find which evaluates to our result. 15:52 (join) jao 15:53 eli: In any case, that's something that is more common in Scheme than in Lisps -- because in Scheme (most of them, at least) we have more than just plain "symbols". 15:53 Lajla: (symbol? (read (open-input-string "a"))) this evaluates to #t though 15:54 eli: This is because `read' discards some information -- and it happens that when you discard that information from an identifier you're left with a symbol. 15:54 Lajla: At least, I haven't bothered to exhaust this or read this at any point. But as it looks to me now. What it outputs is some thing that if read by the reader and then evaluated, it produces the result of the original expression in the REPL, unless you have a counter-example. 15:55 eli: Cointinuing the above -- see for example scsh/scheme48, which does exactly that quoting thing. 15:55 eli: Also see mit-scheme that does neither, and instead prints ";Value: a". 15:56 Lajla: Well, I have nothing against it per se. I'm just trying to explain to rmitt what it prints out. 15:56 eli: It's roughly that, doesn't work in all cases, obviously. 15:56 Lajla: Which makes me wonder though, why not print (lambda ....) instead of # 15:58 eli: Because you still can't print something evaluatable in all cases. 15:59 eli: This is *after* you'll solve the problem of displaying ((lambda (x) (lambda (y) (+ x y))) 3) as (lambda (y) (+ 3 y)). 16:00 Lajla: I guess. This is why I personally would not opt for the quote syntax for symbols, it seems some-what arbitrary. 16:00 Lajla: But I guess that is the nature of human intuition. 16:01 eli: I don't see how what I said is related to displaying quoted symbols. 16:01 Lajla: I mean to in one case (the symbols) do display an expression which evaluates to the result, and not in another case (the functions) 16:02 eli: So how is not printing the quote making things better? 16:03 eli: I'll save you the trouble -- 16:03 eli: Yes, the quote-less printout is supposed to be the external representation blah blah blah -- 16:03 eli: but even that is an approximation only, since functions *don't* have an external representation. Ever. 16:04 eli: Same goes for a whole bunch of stuff -- like ports and more, 16:04 eli: so the fact that there is some data without an external representation is still there -- whether you try to make it evaluatable or not. 16:04 Lajla: So you see this simply as 'some string of characters meant to give a human reader an idea of what it is'? 16:05 eli: It would have been arguably cleaner for `write' to just throw an error whenever it runs into a value that cannot be serialized in some way -- but that just didn't happen. 16:05 eli: Yes, exactly. 16:05 Lajla: I guess that would be a nice solution yes. GHC does that with show. 16:06 eli: And it happens that "giving a human reader an idea" is overall less confusing if it's written in the same langugae the human is using -- racket -- rather in some obscure semi-language of "external representations". 16:06 Lajla: Or make things like # actually readable by the reader depending on the definitions. 16:06 Lajla: I gues you're right. 16:07 eli: That would be impossible. It inherentrly refers to a name, rather than a function. 16:07 Lajla: I found it confusing at first though, but it isn't and won't be a formal thing I guess. 16:07 eli: But in DrRacket's student languages (at least in the beginner one) this is exactly what happens -- and there, the addition function is printed as ... "+". 16:07 eli: Without quote. 16:08 Lajla: Well, (eval '+) in that definition evaluates to that procedure, the reader could use that, right? 16:08 Lajla: Ahhh 16:08 Lajla: I did not know that. 16:09 eli: Oh, yes, an equivalent replacement for a printout of "+" is "(eval '+)" -- except that those languages will never have `eval' bound. 16:10 Lajla: No, I mean, to enable the reader in a program where + is defined or even lajla to read # as what-ever function the symbol lajla is bound to. 16:14 rmitt: well I never thought I'd provoke a debate :-) 16:14 rmitt: basically I'm asking why we can't stick to R5RS 16:14 rmitt: on this point 16:15 rmitt: More particularly, I once heard a nice challenge to devise a s-expression that "evaluates to itself" 16:15 Lajla: I'm pretty sure that R5RS says very little if any about repls and interfaces of implementations 16:15 rmitt: With the current #lang racket this is no longer a challenge 16:15 rmitt: which is a pity... 16:15 Lajla: You mean to the string? 16:15 Lajla: Or a quine? 16:16 rmitt: no, I mean an sexp that evalutes to itself 16:16 (quit) MayDaniel: 16:16 Lajla: As in, a program whose output is its own source. 16:16 rmitt: yes 16:16 Lajla: And sexp always does that, seeing that they are strings. 16:16 Lajla: Ahh 16:16 rmitt: ?? 16:16 Lajla: That's called a quine. 16:16 rmitt: one moment while I look up quine.... 16:16 (quit) b-man_: Remote host closed the connection 16:17 rmitt: (I assume it's named after the philosopher) 16:17 Lajla: A quine is simply a computer programme which outputs its own source code. 16:17 Lajla: Yes. 16:18 rmitt: yes, so quines are no longer challenges, which is a pity 16:18 (join) Tyr42 16:19 Lajla: rmitt, well, it's not really output. 16:19 Lajla: It's just the termination value of the program in a way. 16:19 Lajla: Hence racket colours them differently from stuff that came from display and print and write et cetera. 16:21 rmitt: what's weird is that mzscheme does NOT do this funky quote thing, whereas DrRacket does 16:21 rmitt: any reason for that? 16:21 rmitt: (and I certainly hope that this comment won't prod the PLT team to change mzscheme too) 16:22 Lajla: DrRacket is aimed at noobs such at I who are too lazy to use a commandline properly. =) 16:22 rmitt: I don't think that's the real reason, do you? 16:23 rmitt: eli's response was earnest, and not really blase about noobs 16:23 Lajla: I like to think they give me special treatment because of my incompetence. 16:26 rmitt: speaking of which (not), has anyone built a Scheme that runs on the JVM? 16:27 rapacity: kawa scheme 16:27 offby1: yep 16:27 offby1: there's another one too, I think 16:27 offby1: SISC maybe 16:30 eli: Yes, and also jscheme. 16:30 eli: rmitt: It should print the same in r5rs, except for the mutable thing. 16:30 Lajla: rmitt, they have a tendency to not give TCO and some other cool stuff, unless you really really beg them though. 16:30 eli: rmitt: As for `mzscheme' -- that uses the `scheme' language by default, instead of `racket'. 16:30 eli: IIRC, SISC does have tail calls. 16:31 eli: rmitt: And what you're talking about are quines -- and they're stil; the same kind of challenge. 16:32 eli: "Write an expression that evaluates to its own representation as an s-expression" is still the same problem. 16:32 eli: And 'foo is not doing that -- it evaluates to 'foo but the question asks for something that would make it evaluate to ''foo . 16:32 eli: There's a ton of these kind of problems. 16:32 Lajla: I think the idea of a quine is 'whose evaluation has a side-effect of printing that s-expression' though. 16:33 eli: No, there's nothing explicit about printouts. 16:33 eli: Though I can see mainstreamers butchering it into that -- since they have no good representation for syntax. 16:35 rmitt: no quines should not be about side effects 16:35 rmitt: "mainstreamers"? Is that the official pejorative for folks who hack C, Java, etc? 16:36 Lajla: Blokes without long hair obviously. 16:36 Lajla: Unlike Richard Stallman. 16:36 Lajla: He's underground. 16:36 Lajla: At least under all the dirt in his hair. 16:36 rmitt: ew 16:36 rmitt: btw, is he in Boston? 16:36 rmitt: (I'm full of questions until I finish my bagel) 16:37 eli: rmitt: Yeah. "People who are high on side-effect drugs." 16:37 eli: For them, making it *return* an expression is meaningless unless they happen to be compiler hackers. 16:38 rmitt: So are mainstreamers the kind to think that quines are impossible (or "undecidable", which is not the right word)? ;-) 16:38 eli: No, just the kind that think that it must be something related to some printout. 16:38 Lajla: Well, it is generally undecidable if a program is a quine. 16:39 eli: Otherwise they can have almost the same kind of fun. 16:39 rmitt: I guess I've forgotten my theory: why is quine-detection considered undecidable when a computer could just simulate the computation? 16:41 Lajla: rmitt, you can't know if it will terminate in advance. 16:41 Lajla: MAybe it will enter an infinite loop. 16:41 Lajla points at Rice's theorem 16:47 offby1 points at Lajla's behind 16:47 Lajla: To be fair, it is where the money's at. 16:50 rmitt: i'm point at my own behind. It's pleasing, but the folks at Starbucks are looking at me funny. 16:53 Lajla: The people at Starbucks will look at you funny if you drink coffee there. 16:53 Lajla: They are mainstream 16:53 Lajla: we are the underground man. 16:53 Lajla: Like the people in London's subway network. 16:54 Lajla: ain't that right, Eli my brother from another mother? 16:56 Tyr42: Hello 16:56 Lajla: Yo Blair 16:58 Tyr42: I'm having some trouble running amb 16:58 Tyr42: http://planet.racket-lang.org/display.ss?package=amb.plt&owner=murphy 16:58 Tyr42: I'm getting 16:58 Tyr42: abort-current-continuation: continuation includes no prompt with the given tag: # 16:58 Tyr42: when I run the example from the doc 17:01 offby1: you gotta tell us what you're typing 17:01 jonrafkind: he means this http://planet.racket-lang.org/package-source/murphy/amb.plt/1/1/planet-docs/amb/index.html 17:01 (notice) rudybot: http://tinyurl.com/2eb3lca 17:02 jonrafkind: maybe.. Tyr42 that example worked for me 17:02 Tyr42: Oh 17:02 Tyr42: I see what I forgot 17:03 offby1: *shrug* works for me 17:03 Tyr42: (amb-collect (solve-kalotan-puzzle)) 17:03 (quit) lisppaste: Quit: Want lisppaste in your channel? Email lisppaste-requests AT common-lisp.net. 17:03 Tyr42: not just (solve-kalotan-puzzle) 17:03 Tyr42: thanks 17:04 (join) lisppaste 17:12 eli: jonrafkind: ping 17:12 jonrafkind: pong 17:13 eli: You don't have any opinions? 17:13 jonrafkind: i briefly read the email but didnt have any strong emotions 17:13 jonrafkind: something about replacing => with more specific arrows? 17:13 eli: There were two important points. 17:14 eli: One of them was the confusion of doing (test (+ 1 3) 5) instead of (test (+ 1 3) => 5). 17:14 eli: This mistake means two passing tests instead of one failure. 17:14 eli: That's the thing about `tests' etc. 17:14 eli: The other issue is that `=>' catches all errors, 17:15 eli: which means that if you do, for example, (define (fact n) (if (< n 1) n (* n (fact (- n 1))))) 17:15 eli: and then (test (fact 5) => (* 5 (fact 4))), you'll get a bogus success. 17:16 eli: Um, wrong error. 17:16 jonrafkind: i think => should awlays be present 17:16 eli: (define (fact n) (if (< n 1) 1 (* n (fact (- n "one"))))) 17:16 eli: You'd get a bogus success since both sides are evaluated with catching errors, and the error will be the same. 17:16 jonrafkind: right, if the LHS wasn't supposed to be an error then there shouldnt be an equivalence between the error on the RHS 17:17 eli: Re the first point -- that was Robby's conclusion, 17:17 eli: but it gets in the way of conveniently specifying just expressions to test. 17:17 eli: Eg, (test (fact 5) => 120 (even? (fact 120))) 17:17 jonrafkind: (even? (fact 120) => #t 17:17 jonrafkind: I always use that style 17:18 jonrafkind: I think its better since it makes it extremely explicit whats going on 17:18 eli: What about (memq ...) 17:18 eli: What Robby suggested for that was some pred thing 17:18 jonrafkind: how is memq different 17:18 eli: It doesn't return #t/#f. 17:18 jonrafkind: neither does (+ 1 2) 17:19 eli: So what Robby suggested was (test (even? (fact 120)) =pred> values) 17:19 eli: Either way, that becomes very inconvenient when you're dealing with calls to functions that have more tests. 17:19 eli: As in (test ... (run-some-tests) ...) 17:19 jonrafkind: you mean (test (f)) where f has a (test) expression inside it? 17:19 eli: Yes. 17:20 jonrafkind: oh because it doesnt return anything (or void maybe) ? 17:20 eli: Yes. 17:20 jonrafkind: hm, ok i never use that style 17:20 eli: I (and Jay) use it very extensively. 17:20 eli: "tests/lazy/main.rkt" 17:20 eli: "tests/scribble/main.rkt" 17:20 eli: etc. 17:21 jonrafkind: well im reasonablly happy with the way eli-tester works right now, if it changes drastically ill probably fork it 17:21 jonrafkind: but if you are just adding things that I will never use, thats ok 17:21 eli: Forking will be bad -- it's (roughly) the way testing has been done for ages. 17:21 jonrafkind: i cant remember the last time i got stuck by having a syntax error on both sides and inadvertently had a test pass that should have failed 17:21 eli: Ie, each one writes their own little macro. 17:22 eli: So you did have that happen? 17:22 jonrafkind: I agree, but I like the current interface and if you change it to something I dont like I will probably do something about it 17:22 eli: (That's the other problem, btw.) 17:22 jonrafkind: no ive never had inadvertent errors 17:22 jonrafkind: that i can remember 17:23 eli: In any case, re the first problem -- you won't need to fork it more than (require (rename-in tests/eli-tester [test* test])) 17:23 eli: But the question is what should the default `test' be, in face of that problem. 17:23 jonrafkind: so the one test vs multiple tests? 17:23 eli: Yes. 17:23 eli: Robby's last suggestion was: 17:24 eli: - (tests ...) is like the current `test', except that you *must* write arrows. 17:24 eli: (Making this roughly like what you want) 17:24 eli: - and if you want a single non-arrow test, then you wrap it in a `test'. 17:24 jonrafkind: ok but what about your use-case of (tests (f)) 17:24 eli: So: (tests (fact 5) => 120 (test (even? (fact 10))) (test (> (fact 10) (fact 9)))) 17:25 jonrafkind: oh ok 17:25 eli: Yes, that's exactly the problem. 17:25 eli: It becomes very inconvenient: 17:25 jonrafkind: so (test (f)) ? 17:25 eli: (tests (test (foo)) (test (bar))) 17:25 jonrafkind: well.. i would say you (eli and jay) should write some macro to make that case more convient 17:25 eli: Or (tests (test (begin (foo) (bar)))) 17:25 jonrafkind: (sub-tests (foo) (bar)) 17:26 eli: There's no need for that -- since that would be `test*'. 17:26 eli: Again, the question is what's the better default. 17:26 jonrafkind: i vote for robby's behavior 17:26 eli: Considering that people *will* want to write "test suites". 17:27 eli: OK, and what about the second problem then? 17:27 eli: The one where `=>' catches all errors on both sides. 17:27 jonrafkind: i think the default behavior should treat errors specially 17:27 jonrafkind: and if you want to test equivalence between errors then use some other form 17:27 jonrafkind: =error> or whatever 17:27 eli: What do you mean "treat errors specially"? 17:28 jonrafkind: if the LHS produces an error then make `test' signal some error instead of doing (eq? LHS RHS) 17:28 eli: Robby's suggestion there is to *not* catch them, so if there are errors, you will get the errors. 17:28 jonrafkind: or whatever it does 17:28 jonrafkind: uh yea ok that too 17:28 jonrafkind: just pass them on 17:28 jonrafkind: ok i guess the current behavior has a with-handlers, so just get rid of that 17:28 eli: Then there would be `=error>' (there already is that) which will catch runtime errors. 17:29 eli: But even that won't catch syntax errors -- that will be a new `=stxerror>' arrow. 17:29 eli: (Possibly different name.) 17:29 jonrafkind: yea ok 17:29 (part) Tyr42 17:30 eli: "Yea" == "I like it", or == "whatever"? 17:30 jonrafkind: "i like it -- but ill probably never use it so whatever" 17:30 eli: You never test errors?? 17:30 jonrafkind: no 17:31 eli: Weird. 17:31 jonrafkind: errors dont exist, what are you a bad programmer or something? 17:31 jonrafkind: we dont need no steenking type system! 17:31 eli: Anyway, do you mind sharing your opinion on both of these on the thread? 17:31 jonrafkind: ok 17:32 jonrafkind: btw about the ppa thing. i had some insane problems setting it up, but long story short ill fix it soon 17:32 jonrafkind: basically i tried to test the build in a virtual machine and got a ton of impossible to debug errors, so ill switch virtual machine technologies to something that actually works 17:32 eli: ppa? 17:32 jonrafkind: ubuntu 17:33 eli: Oh, that. 17:45 (quit) jonrafkind: Ping timeout: 252 seconds 18:29 (quit) rmitt: Ping timeout: 265 seconds 18:47 (join) b-man_ 19:12 (quit) mceier: Quit: leaving 19:18 (join) kingless 19:23 (quit) kingless: Remote host closed the connection 20:05 (quit) masm: Quit: Leaving. 20:12 (join) rmitt 20:32 (join) danbrown 21:21 (quit) rmitt: Quit: Page closed 21:43 (quit) b-man_: Remote host closed the connection 21:56 (quit) danbrown: Quit: danbrown 21:56 (join) danbrown 21:58 (join) jeapostrophe 22:07 (quit) danbrown: Quit: danbrown