00:00 (join) hanDerPeder 00:15 askhader: I'm surprised that nobody wanted to scrutinize my scheme function and tell me how utterly stupid I am for computing a value twice or something like that =] 00:31 (join) offby2 00:37 (quit) Kevin_: Quit: Page closed 00:45 (join) vu3rdd 00:49 (join) alexsuraci 00:50 (join) jonrafkind 00:59 (quit) offby2: Remote host closed the connection 01:17 (join) offby2 01:32 (quit) offby2: Quit: Colloquy for iPad - http://colloquy.mobi 01:36 (quit) jonrafkind: Ping timeout: 245 seconds 02:04 offby1 scrutinizes 02:05 offby1: well ... you're using mutation, which in my country is considered to be in poor taste 02:05 (quit) hanDerPeder: Quit: hanDerPeder 02:06 offby1: sounds like you're doing two fairly separate things: 1) returning all elements of one list that aren't in a second list; 2) removing duplicates (or, as I call it, "uniquifying") 02:06 offby1: if I'm right about that, then it'd be cleaner to write two functions that do exactly those things 02:42 (join) hanDerPeder 03:03 (quit) hanDerPeder: Remote host closed the connection 03:03 (join) hanDerPeder 04:32 (join) dzhus 05:08 (quit) jao: Ping timeout: 245 seconds 05:08 (quit) writer: Quit: writer 05:25 (join) stamourv` 05:25 (quit) stamourv: Remote host closed the connection 05:33 (join) b-man_ 05:53 (join) jao 05:58 (quit) hanDerPeder: Remote host closed the connection 05:58 (join) hanDerPeder 06:01 (quit) rotty: Ping timeout: 265 seconds 06:02 (join) rotty 06:03 (quit) dzhus: Read error: Connection reset by peer 06:03 (join) dzhus 06:21 (join) masm 07:30 (quit) Guest66121: Read error: Operation timed out 07:38 (join) ASD 07:39 (nick) ASD -> Guest1821 08:15 (quit) alexsuraci: Quit: Lost terminal 08:18 (join) MayDaniel 08:21 (quit) MayDaniel: Client Quit 08:22 (quit) b-man_: Read error: Connection reset by peer 08:23 (join) mceier 08:24 (join) alexsuraci 08:25 (quit) Lajla: Read error: Connection reset by peer 08:25 (join) Lajla 08:28 (quit) vu3rdd: Remote host closed the connection 08:31 (join) jeapostrophe_ 08:33 (join) bill_h 08:35 (quit) alexsuraci: Quit: Lost terminal 08:50 (quit) jeapostrophe_: Quit: jeapostrophe_ 08:58 (join) jeapostrophe_ 09:02 (quit) Quetzalcoatl_: Ping timeout: 250 seconds 09:02 (join) Quetzalcoatl_ 09:14 (join) samth 09:24 (join) alexsuraci 09:31 (quit) alexsuraci: Quit: Lost terminal 09:31 (join) alexsuraci 09:31 (quit) alexsuraci: Client Quit 10:00 (quit) jeapostrophe_: Quit: jeapostrophe_ 10:06 (join) jeapostrophe_ 10:07 (quit) hanDerPeder: Quit: hanDerPeder 10:20 (join) MayDaniel 10:20 (quit) jeapostrophe_: Quit: jeapostrophe_ 10:21 (join) mapcadr_ 10:24 (quit) mapcadr: Ping timeout: 245 seconds 10:26 (join) jeapostrophe_ 10:28 (quit) samth: Quit: Ex-Chat 10:30 (quit) rudybot: Ping timeout: 260 seconds 10:31 (quit) rapacity: Ping timeout: 260 seconds 10:34 (join) samth 10:45 (quit) jeapostrophe_: Quit: jeapostrophe_ 10:47 (join) b-man_ 11:00 (join) hanDerPeder 11:28 (quit) MayDaniel: 11:29 (join) rapacity 11:48 Lajla: offby1, shouldn't you rather pay attention when I generalize binary variadic relationships to n-ary? 11:48 Lajla: binary order relationshups* 11:53 (join) Bob__ 11:53 Bob__: hey everyone 11:56 Lajla: Bob, don't sob with your mob, it'll make your life complob, my bob baybe take it easy. 11:56 (join) rudybot 11:57 Lajla: Ohhh Boooob, I know you love my cob. 11:57 offby1: .oO("complob"?) 11:57 (join) vu3rdd 11:57 offby1: opposite of simplob? 11:58 Lajla: offby1, I had to rhyme it. 11:58 Lajla: You know the original? 11:58 offby1 stares blankly 12:05 Lajla: offby1, what is this blasphemy you practice here? 12:05 Lajla: You, offby1 of the templar, have betrayed the sacred principles of the Khala and the will of the conclave. 12:05 Lajla: You have allied yourself with the forsaken dark templar, and in doing so you have not only condemned yourself as well as them, but all who were foolish enough to follow your sacreligious ways. 12:05 Lajla: What is your answer? 12:08 offby1: duh? 12:09 Lajla: =( 12:09 Lajla: Oh well, let the execution commence 12:17 Bob__: sorry for not responding there 12:17 Bob__: anyways, is there some sort of predicate to compare two symbols? 12:17 Bob__: apart from symbol=? 12:18 Bob__: so, ifr symbol1 is less that symbol2 alphabetically 12:18 Lajla: Bob__, you can write it. 12:19 Bob__: I was thinking of that 12:19 Bob__: but how? 12:19 Bob__: would you turn the symbol into characters or something? 12:20 Lajla: (define (symbol<=? . symbs) (apply string<=? (map symbol->string symbs))) 12:20 Lajla: Ain't I a miracle worker 12:21 Bob__: you certainly are 12:21 Lajla: http://codepad.org/CzC4sNCO 12:21 Bob__: yeah, I didn't know there was a symbol->string 12:21 Lajla: Well 12:22 Lajla: it's basically the only way to get characters from a symbol. 12:22 Lajla: Like 12:22 Lajla: I never got,y ou have string->symbol 12:22 Lajla: But not like (symbol 12:22 Lajla: But you can write it! 12:22 Lajla: (define (symbol . chars) (string->symbol (apply string chars))) 12:22 Lajla: I would jut sortof expect that just symbol was the primitive 12:23 Lajla: Because it strikes me as more memory efficient 12:23 Lajla: Not having to allocate a string to memory et cetera. 12:23 Lajla: But I am an ignorant fool who knows nothing about this language, so maybe there's a good reason 12:24 (quit) jao: Ping timeout: 260 seconds 12:26 Bob__: ok, epic 12:26 Bob__: it worked 12:26 Bob__: thanks a bunch 12:26 Lajla: You dare to imply that my code is not perfect? 12:26 Lajla: You Bob__ of the templar 12:27 Lajla: have disgraced the sacred will of the Khala 12:27 Bob__: I...what? 12:28 Lajla: No one gets my obscure references. =( 12:28 Bob__: starcraft? 12:29 Lajla: OHhhhhh 12:29 Lajla: You do. 12:29 Lajla: Episode III 12:29 Lajla: When Tassadar gets captured 12:29 Lajla: And Aldaris talks smack on him 12:30 Bob__: haha, sorry, I don't actually know all that 12:30 Bob__: I just saw "templar" 12:30 Bob__: and assumed starcraft...I dunno 12:32 Lajla: Ahhh 12:32 Lajla: well, it is true. 12:32 Lajla: You played it/ 12:32 Lajla: http://www.youtube.com/watch?v=HW0hoLMdzuQ#t=2m18 12:37 Lajla: (define (symbol-length symb) (string-length (symbol->string symb))) 12:42 (quit) masm: Quit: Leaving. 12:43 (join) anRch 12:46 (quit) tv|z: Ping timeout: 255 seconds 12:48 (join) tv|z 12:58 (quit) b-man_: Remote host closed the connection 13:26 (quit) vu3rdd: Remote host closed the connection 13:35 (join) carleastlund 13:35 (join) jonrafkind 13:49 (join) jao 14:11 Lajla: jonrafkind, theoretical maths is exciting, isn't i. 14:11 Lajla: What have you studied? 14:12 jonrafkind: stuff 14:12 Lajla: Ah 14:12 Lajla: you are jobless and education-less 14:12 Lajla: as am I, as am I. 14:13 (quit) Bob__: Quit: Page closed 14:16 (join) b-man_ 14:20 (quit) hanDerPeder: Quit: hanDerPeder 14:41 (join) MayDaniel 15:09 (quit) anRch: Quit: anRch 15:30 (join) Bob___ 15:30 Bob___: hello everyone 15:31 carleastlund: Hello, Bob__. 15:31 (quit) b-man_: Remote host closed the connection 15:31 Bob___: I was wondering: 15:31 Bob___: is there some sort of predicate to check if an items index in a list is odd? 15:32 Bob___: or maybe a function to return an items index number in a list? 15:32 Bob___: so (index 5 (list 1 2 5)) would return 3 15:32 carleastlund: No, but you could do the following: (for/or ([i (in-naturals)] [y (in-list ys)] #:when (odd? i)) (equal? x y)) 15:33 carleastlund: Change (in-naturals), which is 0-based, to (in-naturals 1) if you want 1-based indexing. 15:37 Lajla: Bob___, what do you mean with 'is there' 15:37 Lajla: Imean, is tere in what? 15:37 Lajla: There are multiple layers of racket. 15:37 Lajla: But you can make it. 15:37 Lajla: Like 15:38 Bob___: the problem is 15:38 Bob___: for the particular quesution 15:38 Bob___: (it's for a CS assignment) I kind of can't use recursion 15:38 Bob___: I know i can make it 15:38 Bob___: it's just, I'm not allowed to 15:38 carleastlund: Okay, that implies there's a huge number of things you can't use. What *are* you allowed to use? 15:39 Bob___: uh, well 15:39 Bob___: in a nutshell 15:39 Bob___: I gotta make an abstract list function 15:39 carleastlund: Because there's no way to do this that doesn't use *some* kind of recursion. But it might be by calling a library function that is recursive. 15:39 Lajla: (define (first-satisfies pred lst) (let loop ((counter 0) (lst lst)) (cond ((null? lst) #f ) ((pred (car lst)) counter) (else (loop (+ counter 1) (cdr lst))))) 15:39 Bob___: and then there are these 4 functions that I must define through that abstract list function 15:39 Lajla: Bob___, why are you not allowed to use recursion? 15:39 Bob___: the abstract list function can use recursion 15:39 carleastlund: Ah. So can the abstract list function be recursive? 15:39 Bob___: that's the only thing that can though 15:39 Bob___: yes 15:39 carleastlund: Right, ok. 15:39 carleastlund: Is this using the HtDP curriculum? 15:40 Bob___: yeah, pretty much 15:40 carleastlund: Okay, do you know the design recipe for abstraction? 15:40 Bob___: in this particular case? 15:40 Lajla: Bob___, what is an 'abstract list function'? 15:40 Lajla: Which funtion? 15:40 carleastlund: There's no "case". There's one design recipe for abstraction. 15:41 Bob___: my abstract list function might consume something different from another abstract list function 15:41 carleastlund: Lajla: in HtDP it means a list-processing function that accepts some other function as an argument. 15:42 Lajla: http://codepad.org/vKJRW8TJ 15:42 Lajla: Like that? 15:42 Lajla: It consumes an even? or an odd? 15:42 carleastlund: Bob__: here's the essence of the design recipe for abstraction. First, write two of the functions you need to abstract over. The normal way. They will probably be recursive. 15:42 Lajla: Or a (lambda (n) (> 6 n)) 15:42 carleastlund: Lajla -- we probably don't want to do this guy's homework for him. 15:42 Bob___: yeah, and look for where you need to abstract, rigt? 15:42 Lajla: carleastlund, we don't? 15:42 carleastlund: Lajla, he should learn for himself, shouldn't he? 15:42 Bob___: oh, I'm not asking you to do it for me or anything 15:43 Lajla: carleastlund, only if we cared for his well being instead of showing off our superior knowledge. 15:43 carleastlund: Yes, look for where to abstract. If you need to define all 4 to feel confident you've found the right set of similarities, you can. 15:43 Lajla: Which quite cleary I don't seem to. 15:43 carleastlund: Lajla, I have no superior knowledge. Just a lot of pertinent questions. 15:43 Lajla: I'm not even sure what you're talking about here. 15:43 Lajla: carleastlund, netiher have I, but it's easy to impress a gobo. 15:44 carleastlund: Then write the function that has all the similarities built in, and takes the other parts as arguments. 15:44 carleastlund: Then define the first four to pass the differences in along with their normal arguments. 15:44 carleastlund: So you probably knew all that. Where in that process are you stuck? 15:44 Bob___: I was able to define the first 3 15:45 Bob___: using the abstract function 15:45 carleastlund: And the last one didn't fit? 15:45 Bob___: nope 15:45 Bob___: I should explain though 15:45 Bob___: exactly what these functions do? 15:45 Bob___: otherwise, it makes no sense to you 15:45 carleastlund: Not sure it'll really help to know. 15:45 carleastlund: I'll ask if I run out of good stuff to ask you, how's that. 15:45 Bob___: k 15:46 carleastlund: So probably the first 3 have stuff in common the 4th one doesn't. So by abstracting from the first 2, you didn't get a good enough abstraction for #4. Does that sound right? 15:46 Bob___: so anyways, yeah, I'm not sure how to define the fourth one 15:46 Bob___: pretty much 15:46 carleastlund: If that's so, then go back and re-build your abstract function, but this time use #4 as one of the functions you compare to find the similarities. 15:47 carleastlund: Then you can be sure you can define #4 in terms of the abstraction. 15:47 Bob___: hmm..allright, that sounds good 15:47 Bob___: I'll give it a shot 15:47 Bob___: thank you 15:47 carleastlund: Good luck! Feel free to come back for more answering-questions-with-questions if you get stuck again :) 15:47 Bob___: haha, will do, thanks again 15:50 (join) jeapostrophe_ 15:54 (join) masm 16:01 (quit) MayDaniel: 16:04 (quit) Bob___: Quit: Page closed 16:06 (quit) jeapostrophe_: Quit: jeapostrophe_ 16:20 (join) alexsuraci 16:31 (join) jeapostrophe_ 16:40 (quit) jeapostrophe_: Quit: jeapostrophe_ 16:47 (join) lucian 16:47 lucian: i was wondering if there are plugins for DrRacket 16:47 lucian: it's a nice IDE, but I can't live without vim 16:48 lucian: so either implement vim mode in DrRacket or write a vim interaction mode for racket 16:49 (join) b-man_ 16:49 Lajla: I read your ultimatum and choose the latter. 16:49 Lajla: Just for you 16:54 jonrafkind: lucian, http://planet.racket-lang.org/display.ss?package=vi.plt&owner=kazzmir 16:54 jonrafkind: its not complete yet though 16:54 lucian: Lajla: i couldn't find any vim plugins for it 16:55 jonrafkind: where did you search for plugins? 16:55 lucian: jonrafkind: looks pretty good, though. thanks 16:55 lucian: jonrafkind: google and vim.org 16:55 lucian: the constant name changes this language goes through probably didn't help :) 16:55 jonrafkind: if you are willing to hack on the code i would gladly accept patches (im the author) 16:57 lucian: jonrafkind: i'm probably not yet proficient enough in scheme for that 16:57 jonrafkind: ok 16:58 (join) philo 16:58 lucian: jonrafkind: but I will do if I end up using it and missing some vi(m) feature 16:58 lucian: thanks 16:58 philo: hi 16:59 philo: is there anyway to get RELP in r5rs mode ? 17:03 lucian: jonrafkind: it's great! thanks a lot 17:03 jonrafkind: no problem 17:06 philo: anyone ? 17:07 philo: is there a way to interect with the interpreter in the r5rs mode ? 17:08 offby1: philo: I'd be surprised if you couldn't do that with DrRacket 17:08 philo: i meant r6rs 17:08 philo: Interactions disabled: r6rs does not support a REPL (no #%top-interaction) 17:09 jonrafkind: philo, #lang r6rs, (import (rnrs base (6)) 17:09 jonrafkind: run that adn you will get a repl 17:10 philo: thanks 17:10 philo: is there a good book on racket ? 17:10 philo: beside how to design program 17:11 jonrafkind: well do you want to learn racket or r6rs 17:11 jonrafkind: http://docs.racket-lang.org/guide/index.html 17:11 jonrafkind: you can read through the guide if you want 17:12 philo: well i am looking for somewhere where the difference are explained 17:12 philo: i am new to scheme alltogether 17:13 jonrafkind: if you are completely new i recommend using #lang racket and following htdp 17:13 jonrafkind: the only real motivation to use r6rs would be if you want portability 17:15 philo: my main concern is that there are more ressource on r5rs r6rs than on racket 17:16 philo: any way 17:16 philo: why import doesnt work in the relp ? 17:16 jonrafkind: id guess there are fewer resources for r6rs than r5rs or racket 17:16 jonrafkind: its repl, not relp 17:16 jonrafkind: dont typpe it into the repl, put that import into the definitions window and hit run 17:17 philo: ok 17:17 philo: thanks for your help 17:19 (quit) dzhus: Ping timeout: 264 seconds 17:20 philo: try with r5rs why doesnt import work ? 17:20 jonrafkind: import doesnt work with r5rs 17:20 jonrafkind: its for r6rs 17:20 jonrafkind: do you want to use r5rs or r6rs? 17:21 jonrafkind: you dont have to do anyting to get a repl for r5rs, just type #lang r5rs and hit run 17:22 philo: well really i just want one with the most ressources to learn, and the most library to do real stuff 17:22 philo: compatibility is not an issue 17:23 philo: so how do i import libs in r5rs mode ? 17:23 jonrafkind: just use #lang racket 17:23 jonrafkind: racket comes with a bunch of lbiraries 17:24 philo: ok 17:25 Lajla: r5rs might be thw worst choice on the planet of you want a bunch of lib. 17:25 philo: why is that ? 17:25 Lajla: Always bet on racket. 17:25 Lajla: philo, the R5RS standard is comically smaller than the index alone of another standard of another language that likes to compete with it. 17:25 Lajla: R5RS is small, very small. 17:25 jonrafkind: r5rs is a very minimal set of stuff that lets you compute something 17:25 Lajla: It takes maybe 10 a4 pages to print it on. 17:26 philo: really ? 17:26 Lajla: philo, scheme is not 'monolithical' unlike most languages. 17:26 philo: interresting 17:26 Lajla: There are different standards and layers. 17:26 Lajla: R5RS is today commonly seen as the absolute core I guess. 17:26 Lajla: THen you have SRFI's, Scheme Requaests For Implementation 17:26 Lajla: Which basically anyone can author 17:27 Lajla: So an implementation can say 'We fully support R5RS, and SFRI 1-50' 17:27 Lajla: Or something like that 17:27 (quit) askhader: Quit: leaving 17:27 philo: what deos drRacket support ? 17:27 Lajla: racket 17:27 Lajla: drRacket is an IDE though, not a compiler per se, but it basically links to racket as a program. 17:27 philo: i thought Drracket what the tools suit ? 17:27 Lajla: But racket is not a superset of R5RS if I recall correctly. 17:28 Lajla: racket is both an implementation and a language. 17:28 philo: i mean racket in r5rs mode 17:28 Lajla: Basically the language that racket uses in rough lines. 17:28 Lajla: Ah 17:28 Lajla: Then it supports R5Rs 17:28 Lajla: No more, no less. 17:28 philo: lol 17:28 Lajla: Which is why only freaks such as myself run it in R5RS mode. 17:28 philo: so that why even import doesnt work ? 17:28 Lajla: Actually I don't really 17:28 Lajla: I just make sure to not use any additional stuff. 17:28 Lajla: import is not part of R5RS 17:29 philo: what ? 17:29 Lajla: R5RS doesn't really define a lot of implementation related things such as loading and including. 17:29 jonrafkind: philo, import is for r6rs, not r5rs 17:29 jonrafkind: for the 3rd time 17:29 Lajla: it does recommend I think that implementations use load to load files. 17:29 Lajla: But does not require it, if I'm correct. 17:30 philo: and i thought haskell was mess up lol 17:30 Lajla: Haskell 98 is a lot less minimal than R5RS. 17:31 philo: the minimality is not the issue 17:31 Lajla: Philo, anyway, R5RS is not meant as 'a practical language' 17:31 Lajla: It is meant as 'a framework to define a practical language in' 17:31 philo: ok let simplify things ... 17:31 Lajla: philo, then what is? 17:31 philo: i want to learn scheme , what do i do ? 17:31 philo: i bought SCIP , now i need a platform to work in/on 17:32 philo: all implementations,dialects differences, it is confusing 17:32 Lajla: I guess R5 is enough for SCIP. 17:32 Lajla: Nahh, it works differently. 17:33 Lajla: THe standard is not about letting all implementations support the same thing, what's the use then for more than one implementation? Why would you have to choose then? 17:33 Lajla: It's about getting them to treat the things they do support in the same way. 17:33 Lajla: You can make a scheme implementation optimized for FLOPS, you don't need exact numbers then, it will just slow you down. 17:34 Lajla: So R5 doesn't require you to support exact numbers, it just tells you how they should behave when you do. 17:34 philo: ok 17:34 (quit) mceier: Quit: leaving 17:34 Lajla: But SCIP basically builds all those things on the fly. 17:34 Lajla: Like, it let's you build all those fancy things yourself. 17:34 philo: yea 17:34 Lajla: That's why. 17:34 Lajla: You don't really need more than R5 17:35 philo: i was just afraid of racket because they says continuation doesnt work similar to r5rs 17:35 Lajla: But the point is that #lang racket is almost a superset of R5, but there are some things that might conflict, most prominently that pairs are by default not mutable. 17:35 Lajla: Hmm 17:35 Lajla: where do they say that? 17:36 philo: dont remember 17:36 philo: a sec 17:37 philo: http://docs.racket-lang.org/guide/Continuations.html 17:37 philo: call-with-composable-continuation 17:39 carleastlund: R5RS doesn't have that function, so of course it can't work the same as R5RS. 17:39 Lajla: philo, http://docs.racket-lang.org/reference/cont.html#(def._((quote._~23~25kernel)._call-with-current-continuation)) 17:39 Lajla: THis is the one R5 has 17:39 carleastlund: Both R5RS and Racket have call-with-current-continuation, though, and they should work the same 17:39 carleastlund: (what Lajla said) 17:39 Lajla: What I said indeed. 17:40 Lajla: carleastlund, great minds think like Lajla. 17:41 carleastlund: Lajla, you realize you just dragged yourself down to *my* level by saying that, don't you? Bwahahaha! ;p 17:42 Lajla: No, I am so narcissistic I can't realize anything that might put me into bad light. 17:42 Lajla: THat is how it goes for us. 17:42 (quit) jeapostrophe: Quit: jeapostrophe 17:42 Lajla: philo, you have to excuse us, this is how this channel goes, or at least when I'm around. 17:42 philo: lol 17:42 Lajla: jonrafkind sometimes joins the madness though. 17:43 philo: just for asking , there is not Qt bindings is there ? 17:43 carleastlund: You just said "madness"... does one of us have to reference the line from 300 now, or has it been long enough we can let it pass? 17:43 Lajla: I was thnking 17:43 Lajla: about it 17:43 Lajla: but could find nothing. 17:43 lucian: philo: there's got to be a wx one, since that's what drracket seems to be using 17:43 lucian: but yeah, wx < qt 17:45 carleastlund: DrRacket's wx is an idiosyncratic fork, and our GUI library is undergoing a major overhaul, so the issue of what GUI toolkits we support is about to change a lot, I think. 17:45 philo: brw why wasnt racket made a superset of r5rs or r6rs since rnrs are so flexible ? 17:45 carleastlund: Because they're not flexible enough for some of the things we have invented in the meantime. 17:45 philo: wow 17:46 philo: are you guys part of the commity that made r6rs ? 17:46 lucian: philo: i think expecting lisps to be compatible is asking too much of them :) 17:46 lucian: but that's a good thing in many ways 17:46 philo: lol 17:46 carleastlund: Matthew Flatt is both a Racket implementer and a former R6RS committee member (former in that R6RS is finished now), so in that sense yes. 17:47 Lajla: Who's Mattew Flatt. 17:47 Lajla: Is that that German guy who started PLT. 17:47 Lajla: His name was Mattias I though. 17:48 philo: looking at the doc they seems to be many interesting thing in racket , just not enought ressources to learn them 17:48 carleastlund: Matthias Felleisen was Matthew Flatt's advisor. Matthew is now a professor at the U of Utah, and implements the Racket compiler, GUI, and many of its libraries. 17:48 Lajla: Never heard of it. 17:48 Lajla: But then again. 17:48 carleastlund: Which thing have you never heard of? 17:48 Lajla: I don't even know that Stephen Hawkin is a famous drooling phycisist. 17:48 Lajla: this matthew flatt. 17:48 (join) emma 17:48 carleastlund: He doesn't use IRC much. :) 17:48 Lajla: Emma, emma I heard of though. 17:49 Lajla: Yeah, and Donald Knuth doesn't use email, they are all weirdoes. 17:49 lucian: Lajla: maybe they have twitter accounts 17:49 Lajla: I don't use that. 17:49 lucian: i was being ironic 17:49 Lajla: I use email, IRC, and naïve unsuspecting women 17:49 Lajla: Well, you were bad 17:50 carleastlund: Matthew is generally too busy coding to respond to more than the occasional email. He responds very quickly to bug reports, though. 17:50 Lajla: because I didn't laugh. 17:50 Lajla: THat is how it goes. 17:52 philo: any one knows about a good graph (as in edges and nodes) libs working on racket 17:53 philo: i found one for chiken... 17:57 carleastlund: philo, my initial search (of PLaneT packages and the Racket docs) didn't turn up anything obvious, sorry. 17:57 philo: yea i tried there 17:57 philo: thanks 17:57 philo: i dont want to implement the data structure myself 17:58 Lajla: Then python or Java is your friend 17:59 philo: more of a ruby guy 17:59 carleastlund: As data structures go, graphs are pretty simple. There are several fairly straightforward ways to implement them. 17:59 philo: but the project is just an excuse to learn scheme 18:00 carleastlund: If you're trying to learn Scheme from the ground up and are already confident programming in general, implementing a graph library should be a good introduction. 18:00 philo: carleastlund: yes , but i need more, like transitive closure , connected component etc... 18:00 carleastlund: Ah, you don't want to reimplement all of the standard algorithms. That I can understand. 18:01 carleastlund: (Having gone through the same experience in a course project I was implementing in Perl for insane reasons [that, fortunately, I at least knew were insane at the time].) 18:03 philo: lol 18:03 philo: we all are 18:03 philo: otherwise we would be all using visual studio 18:04 carleastlund: If I'd known about Scheme at the time I would have used it; I was just trying to get away from languages I'd already done tons of course work in (C++, ML) and languages I never wanted to program in (C++, Java) and C++. 18:06 philo: lol 18:06 philo: the new c++0x seems great 18:07 philo: not as a good as D yet, but fairly good 18:07 carleastlund: Do they replace C++ with Racket? Because otherwise I'm not terribly impressed. ;) 18:07 philo: lol 18:10 philo: how does one define agebraic datatype ? 18:12 carleastlund: philo, can you clarify your question? Do you mean "what does that phrase mean", or "how do I define them in Racket", or something else? 18:12 jonrafkind: Tree = Leaf Tree Tree | Node 18:12 carleastlund: jonrafkind, that is the most inside out binary tree I have ever seen 18:12 philo: how to do them in racket 18:12 carleastlund: Look up "struct". 18:13 philo: i tought struct was for composite types ? 18:13 carleastlund: For example: (struct leaf []) (struct node [left right]) 18:13 carleastlund: Right. Once you have multiple structs, you have an algebraic datatype. You can combine them any way you want. 18:13 carleastlund: This isn't a typed language; you don't have to decide or declare which struct types "go together". 18:15 philo: ok 18:16 philo: so their basicly unrelated object 18:16 philo: that i decice to treat in a consistent way 18:16 carleastlund: Yep. 18:17 carleastlund: You could, for instance, reuse existing types along with your own, and decide a "philoTree" is either a Leaf, or a Node, or an Integer. No problem. 18:17 philo: this is why i need a book lol 18:18 carleastlund: If you want the very basics of how to program in a Scheme-like language, I would point out www.htdp.org -- it's a textbook at a more basic level than SICP, which I believe you mentioned upstream. 18:18 carleastlund: Er, upthread. 18:18 philo: i thought htpd assume no programming experience ... 18:19 philo: i am more looking for something that would teach of to think "scheme" 18:19 carleastlund: It will. It doesn't assume programming experience, but it doesn't assume you don't have it either. 18:20 carleastlund: If you find parts of it easy, they'll go fast and it won't waste your time. But I bet some parts will be new and enlightening. 18:23 philo: downloading lol 18:30 Lajla: philo, Ruby and Python are to me exemplary of what is wrong with programming today. 18:30 Lajla: Even more so than PHP. 18:30 philo: Lajla: why is that ? 18:38 Lajla: philo, because they pile so many features on top of features without really thinking or planning ahead well or making it all fit that they often dig themselves in. 18:38 Lajla: Also, I feel both teach unhealty programming practices. 18:38 Lajla: Such as x < y < z 18:38 Lajla: That kind of stuf 18:39 Lajla: Which is neither (x < y) < z nor x < (y < z) 18:39 Lajla: they're sort of designed to force the programmer to NOT think about what he's doing structurally, because structurally it tends to make no sense. 18:39 Lajla: Principle of least surprise and all. 18:40 jonrafkind: 1<2<3, thats pretty cool 18:40 jonrafkind: i should use that more often 18:40 Lajla: jonrafkind, don't scare the regulars. 18:40 jonrafkind: you know its the same as (< 1 2 3) 18:40 Lajla: Yes 18:41 Lajla: but it's neither (1 < 2) < 3 nor that other thing. 18:41 jonrafkind: so why is the infix version worse 18:41 Lajla: It's not infix. 18:41 Lajla: It's that basically to formalize this thing here 18:41 jonrafkind: well, multifix 18:41 Lajla: You have to make the language non context free. 18:41 Lajla: It would be fine 18:41 jonrafkind: horror of horrors 18:41 Lajla: if all expressions require ( ... ) around them. 18:42 Lajla: Like, if you had to say ((1 < 2) == true) 18:42 Lajla: And so used (1 < 2 < 3) 18:42 jonrafkind: 1 < 2 == 1 < 2 < 3 ? 18:42 carleastlund: There are languages that do multifix better than others. I know Fortress has a rather sophisticated system for things like 1 < 2 < 3, for instance, and Fortress is not a slapdash language (I say as one of the minor players in its development). 18:42 Lajla: Fortress was developed by Steele, no? 18:43 carleastlund: Yes. 18:43 Lajla: But x ? y : z is fine 18:43 Lajla: Because x ? y itself does not have a meaning already 18:43 Lajla: But x < y does have a meaning. 18:43 Lajla: Also 18:43 Lajla: NO CHARACTER DATATYPE 18:43 Lajla: A character is not a string of length 1 ! 18:43 carleastlund: What about no character datatype? 18:43 jonrafkind: who cares 18:43 Lajla: That is horendous 18:43 carleastlund: I've heard a proposal of doing things that way in Scheme. I like the idea. 18:44 Lajla: wot? 18:44 Lajla: Get outa here. 18:44 carleastlund: Tell me the difference between a string of length 1 and a character. 18:44 Lajla: Ehh, recursive definitions? 18:44 carleastlund: What? 18:44 carleastlund: What about recursive definitions? 18:44 Lajla: I might have a rest function defined which is generic and takes all sequences. 18:45 carleastlund: Okay. 18:45 Lajla: Or sequences in general. 18:45 carleastlund: Okay. 18:46 Lajla: THere is a reason why in formal grammar theory a symbol is different from a sequence of one symbol. 18:46 Lajla: You always end up deriving contradictions if you don't make that destinction. 18:46 Lajla: Those are perhaps less problematic if you program imperatively, but if you program functionally often you end up with weird stuff 18:46 Lajla: Especially if strings are just ordinary sequences of characters. 18:47 carleastlund: Lajla, I'll be frank. None of what you just said makes any sense to me. 18:47 carleastlund: And even if you explain it, I don't see how it has bearing on how Scheme (or similar language) libraries are designed. 18:48 carleastlund: I don't know that in any of my coursework on formal languages, a distinction was made between a symbol and a sequence of one symbol. I'm not sure the question came up. 18:48 Lajla: What. 18:48 carleastlund: Where does the question come up? 18:48 Lajla: Try formalizing symbols as sequences of length 1. 18:49 Lajla: carleastlund, you'll basically go to infinity. 18:49 Lajla: Try formalizing a character as a sequence of length 1. 18:49 Lajla: What should it contain? 18:49 Lajla: I mean, traditionally, symbols are encoded as naturals. 18:49 carleastlund: Okay. Type Sequence = Empty | NonEmptySequence. Type NonEmptySequence = Symbol | Append NonEmptySequence NonEmptySequence. There. A one-length Sequence is a one-length NonEmptySequence is a Symbol. Algebraic datatypes to the rescue. 18:49 Lajla: Of which there are numereous encodings. 18:50 Lajla: carleastlund, and now differentiate between those different symbols / characters. 18:50 Lajla: And define your alphabet. 18:50 Lajla: and stuff like that. 18:50 carleastlund: Differentiate between what? What are "characters" here? I have symbols and sequences. 18:51 Lajla: a symbol is the same as a character basically. 18:51 carleastlund: I don't *need* to differentiate between symbols and sequences. 18:51 Lajla: Not between symbols and sequences 18:51 Lajla: But between different symbols. 18:51 Lajla: Let's say our alphabet consists of {a,b,c} 18:51 Lajla: What is the difference between them? 18:51 carleastlund: Who cares. That definition works for any countable alphabet that doesn't contain the Append or Empty constructors. 18:51 Lajla: Why not a = b? 18:52 Lajla: That remains to be seen. 18:52 carleastlund: What does that have to do with the definition of Sequence? 18:52 Lajla: It does with the definition of characters / symbols. 18:52 carleastlund: We define Symbol to be the set of three distinct elements, {a,b,c}. Done. 18:52 carleastlund: They're different because we assume they are. 18:52 carleastlund: We define them to be. 18:52 Lajla: With symbol I mean like in formal grammar 18:52 Lajla: not in scheme. 18:52 Lajla: And show that they are not aequivalent. 18:53 Lajla: Give mea definition of an identity relation, and show that they are not identical under that relation. 18:53 carleastlund: I'm talking in formal grammar. There's no way to "show" they are not equivalent. You just have to pluck a set out of thin air. It's in the axioms of set theory that you can do this. 18:53 Lajla: Not at all. 18:53 Lajla: I can encode symbols as numbers. 18:53 Lajla: Where I define for instance a :=0 , b := 1 ... 18:53 Lajla: And use the '=' aequality on the naturals. 18:54 Lajla: And then I can show that not ( a = b) 18:54 Lajla: Then I can define aequality on strings, which are sequences of symbols. 18:54 carleastlund: You can do all that, sure. But it is absolutely unnecessary. 18:54 Lajla: In your case, where a = "a", basically. 18:54 Lajla: What? 18:55 Lajla: You cannot say that you attempt to formalize this without a proof of the possobility to differentiate between symbols. 18:55 carleastlund: Your choice of representation doesn't work the same as mine. But mine is not invalid just because I did it differently than you. 18:55 Lajla: If we don't know that a != b 18:55 Lajla: THen 18:55 Lajla: "ab" can be identical to "bb" and "aa" and what not. 18:55 carleastlund: How do you know that 0 != 1? 18:55 Lajla: I'm not saying yours is invalid, I challenge you to show the validity. 18:55 Lajla: From our definition of = 18:55 Lajla: depending on how we construct the naturals. 18:56 carleastlund: Fine. I define my own = such that a != b and b != c and c != a. Done. Moving on. 18:56 Lajla: But let's just assume the standard one, like 0 : = {}, 1 :={0}, 2 := {0,1} et cetera. 18:56 Lajla: But you have no definition of a! 18:56 Lajla: You have no set of properties of a you can use to build theorems on. 18:56 Lajla: I have one atom {} 18:56 Lajla: the empty set. 18:57 Lajla: It's singular. 18:57 Lajla: I define {} := x : forall y : not (y in x) 18:57 carleastlund: a = 57, b = 79, c = 83. Empty = 7. Append X Y = 2^X * 3^Y. 18:57 Lajla: Where the axioms of ZFC define the behaviour of the 'in'relationship 18:57 carleastlund: Oh wait, 57 is a multiple of 3. Make it 59. 18:58 Lajla: But now a is not a string of length 1. 18:58 Lajla: It's a number. 18:58 carleastlund: Yes it is. 18:58 carleastlund: It's a set, and a number, and a symbol, and a sequence. 18:58 Lajla: Okay 18:58 Lajla: let me rephrase 18:58 Lajla: It is of course only a sequence with respect to accessor operations. 18:58 carleastlund: The same rules in ZFC that let you pluck the natural numbers out of thin air let you pluck any countable set you want out of thin air. 18:59 carleastlund: Lajla, that's all a sequence is. Something you can put elements into and out of. There's no "one true representation" of sequences. 18:59 Lajla: So, give me some accesor operations with respect to that number and show that they satisfy a sequence. 18:59 Lajla: No 18:59 Lajla: the elements much have an order. 18:59 Lajla: A sequence is a key-value pair where the keys are naturals. 18:59 carleastlund: If something has the form 2^X * 3*Y, X comes first and Y comes second. Unique factorization tells us that will not be ambiguous. 19:00 Lajla: So basically the keys must be between 0 and n where n is a natural. 19:00 Lajla: Or 0 and above. 19:00 Lajla: carleastlund, you have not yet shown that the elements have an order. 19:00 Lajla: A set is not a sequence for instance. 19:00 Lajla: Because its elements have no order. 19:01 Lajla: And a sequence also of course must only have countably many elements. 19:01 carleastlund: Lajla, I'm done here. I should not have to explain "I can define lists multiple ways" at such length. I'm just using binary trees, for goodness sake. 19:02 Lajla: I'm not saying you can't define them in multiple ways. 19:02 Lajla: I'm saying that they still must obey certain rules. 19:02 Lajla: THere are multiple ways to encode natural.s 19:02 Lajla: but they must satisfy the peano axioms. 19:02 Lajla: I'm asking you to demonstrate that your encoding satisfies the requirements to be a sequence. 19:02 carleastlund: I realize I have not boiled everything down to a formal proof from first principles. I was hoping you had the intuition to figure out how my representation works. You didn't, that's fine. Maybe you don't understand or maybe I was unclear. But I am certain that it works, and I am not interested enough in convincing you of something I consider simple to go to these elaborate lengths. 19:03 Lajla: THat is, encode a key-value pair collection where the keys basically are naturals. 19:03 Lajla: =( 19:03 Lajla: Can I at least get a hug? 19:04 carleastlund: Can you prove that a hug is not equal to a frown? 19:04 Lajla: Yes 19:05 Lajla: Now gimme. 19:06 carleastlund: Ah. Perhaps I see part of the confusion. 19:06 carleastlund: As I wrote it, that definition does not work as a generic list representation. 19:07 carleastlund: Because you cannot distinguish a list inside a list from two concatenated lists. Perhaps this was your point? 19:07 carleastlund: Strings do not have this problem, because you cannot nest strings. 19:07 carleastlund: So as long as the set of characters (equivalent to the set of length-1 strings) is disjoint from the Empty and Append constructors, there will never be ambiguity. 19:08 Lajla: Well, yes and no. 19:09 Lajla: The point is that to make that function 19:09 Lajla: or at least, make it computably. 19:09 carleastlund: What function? 19:09 Lajla: that constructs strings or what not. 19:09 Lajla: Well, the function that makes strings. 19:09 carleastlund: It's really easy. 19:09 Lajla: Oh wait no 19:09 Lajla: I'm off here. 19:09 Lajla: Sorry. =( 19:09 carleastlund: I could define the entire Scheme string library in terms of this stuff. 19:09 Lajla: Maybe 19:09 carleastlund: Well, except that char? and string? would not have the same relationship. 19:10 Lajla: But like, string->list 19:10 carleastlund: But we knew that. 19:10 carleastlund: string->list is easy 19:10 Lajla: Would produce like ("h" "e" "l" "l" "o"), right? 19:10 carleastlund: (string->list Empty) = '() | (string->list (Append X Y)) = (append (string->list X) (string->list Y)) | (string->list Char) = (list Char). 19:11 carleastlund: Right. Exactly. 19:11 carleastlund: Would produce a list of length-1 strings. 19:11 Lajla: Okay, and say there is a string->vector 19:11 Lajla: Does the same with #( in front of it? 19:12 carleastlund: (string->vector S) = (list->vector (string->list S)) 19:12 Lajla: So basically, the string function becomes an alias of string-append, more or less? 19:13 carleastlund: Yep. 19:13 Lajla: And (string->list "h") becomes ("h") ? 19:13 carleastlund: Yup. 19:14 Lajla: What if you have a recursively-transform-sequences-to-a-matrix function 19:14 Lajla: let's say you have a list of lists 19:14 Lajla: it makes a 2d matrix 19:15 Lajla: array of arrays 19:15 Lajla: to-a-tensor* 19:15 Lajla: Et cetera 19:15 Lajla: And you try that function on a string? 19:16 carleastlund: If you mean "recur on sequences until the elements are not sequences any more", that recursion would not be well-founded on strings under this system, no. 19:17 carleastlund: On the other hand, given (share ([xs (cons xs xs)]) xs), you're never guaranteed that. Plenty of kinds of sequences can contain themselves. 19:17 carleastlund: Mutable vectors, easily. 19:17 Lajla: Yeah 19:17 Lajla: but those are 'infinite sequences' 19:17 carleastlund: So, strings just join that parade. 19:17 Lajla: Yeah 19:17 carleastlund: Mutable vectors need not be infinite. 19:18 Lajla: I rephrase 19:18 Lajla: I'm by the way not talking about termination, as much as that it basically never ends. 19:18 Lajla: A string of length 1 contains itself per definition 19:18 carleastlund: You're going to have to explain to me the difference. 19:18 Lajla: with termination I mean the computation 19:18 carleastlund: Termination is a synonym for ending in most cases. 19:18 Lajla: with 'it' I mean the structure of the string. 19:19 Lajla: Ya. 19:19 Lajla: I phrase badly. 19:19 Lajla: THat is why chandler doesn't like me, or actually just because I'm a total noob, silly me. 19:19 carleastlund: It only "contains" itself because we define the word "contains" that way. The actual representation doesn't have a pointer to itself or anything. 19:21 carleastlund: I could take the existing representation of Scheme strings and define a "carleastlund-string" library (carl-eastlund-string?, carleastlund-string-ref, etc.) that gives this behavior but uses Scheme's regular strings. The one-length strings would contain themselves in the carleastlund-string-ref sense, but they'd still be the same finite representation. 19:22 Lajla: Well, sure. 19:22 Lajla: It depends on your contains? praedicate. 19:22 Lajla: But it's more like ehhh. 19:22 Lajla: You end up with satisfying string-equal? after string-ref 19:23 Lajla: (string-equal? (string-ref x 0) x) 19:23 Lajla: But that huug 19:23 Lajla: I must have it. 19:23 carleastlund: Right. The representation as straightforward, disjoint, algebraic types is stranger in this system. But the pragmatics of programming? MUUUUCH easier. You no longer have to convert between characters and strings, or have different procedures for appending characters onto strings versus strings onto strings, or for displaying characters versus strings... a whole slew of redundancy just vanishes. 19:24 carleastlund: I value my personal space on IRC. [draws line in sand] My side, your side. 19:25 Lajla: =( 19:25 Lajla: I never converted characters to string 19:25 Lajla: s 19:25 Lajla: that's nonsensical. 19:25 Lajla: Only strings to list of characters 19:25 Lajla: and the reverse. 19:26 Lajla: And I don't know, you end up using the same procedures for all sequences anyway. 19:26 Lajla: I don't likthe 'string datatype' 19:26 Lajla: vector of chars suffices. 19:26 carleastlund: http://www.youtube.com/watch?v=UXo1SC3PHOg 19:26 Lajla: That way you can use all the original procedures 19:27 carleastlund: [above video is amusing reference to "my side, your side"] 19:29 carleastlund: My understanding is that using naive "string = vector of char" representations doesn't mesh well with certain internationalization issues, like languages where putting character 1 next to character 2 turns them into a different character 3. Suddenly your indexing is off, your length is off, etc. So if you leave strings as fairly abstract sequences, suddenly you can play all kinds of games. 19:29 carleastlund: But I am not a language encodings expert, so this is like third or fourth hand. 19:31 Lajla: Well, yeah, if you use ascii alone. 19:31 Lajla: But I guess 19:32 Lajla: scheme vectors are heterogenous 19:32 Lajla: So to declare the type only once can be pretty advantageous. 19:32 Lajla: But CL solves this with 'typed vectors', where a string is a typed vector of char 19:32 Lajla: Enabling some optimization 19:32 Lajla: Like CL's bit vector 19:33 Lajla: And strings are quite common in applications that manly deal with I/O, so yeah. 19:38 carleastlund: Anyway, I have to run. Happy stringifying, Lajla! 19:38 (quit) carleastlund: Quit: carleastlund 19:47 lucian: Lajla: unicode != vector of chars 19:47 lucian: it's about as simple as that 19:49 (quit) jonrafkind: Ping timeout: 272 seconds 19:51 Lajla: lucian, I don't see that. 19:51 Lajla: A vector could just like any vector be a row of pointers initially to the char data. 19:51 Lajla: Similar to how a list of chars works. 19:51 lucian: Lajla: efficient unicode (utf-8) is variable-length 19:51 Lajla: But, this is unoptimal. 19:51 Lajla: lucian, no one said you had to inline it. 19:51 lucian: in fact, even inefficient unicode (utf-32) is possibly variable-length 19:52 Lajla: THat's when you inline the vector. 19:52 Lajla: It can just be a pointer to it. 19:52 lucian: that's not the point 19:52 Lajla: I mean, I can just forgo strings in scheme and use #(#\a #\b #\c) 19:52 Lajla: It's not optimal. 19:52 Lajla: But it does work. 19:52 lucian: even getting the length of a utf-8 string is very, very hard 19:52 lucian: it's a silly implementation detail 19:52 Lajla: Not if you don't inline it. 19:53 lucian: what do you mean by "inline"? 19:53 Lajla: That your vector is stored like that bitstream in memory. 19:53 lucian: that's irrelevant 19:53 Lajla: Instead of a vector of pointers to the vector chars. 19:53 Lajla: That's very relevant. 19:53 Lajla: to the chars* 19:53 lucian: utf-8 can't work with ropes very well 19:53 lucian: i mean it can, but not the way you're describing it 19:54 Lajla: utf-8 and unicode are two different things. 19:54 lucian: utf-8 is an example 19:54 Lajla: To store it in utf-8 internally is just bizarre. 19:54 lucian: of unicode 19:54 Lajla: utf-8 is a very space inefficient format. 19:54 lucian: there are way weirder unicodes 19:54 Lajla: but it's self-synchronizing. 19:54 Lajla: And backwards-compatible. 19:54 lucian: and there are much, much weirder encodings out there 19:55 lucian: my point is that string encoding is extremely complicated 19:55 Lajla: utf-8 is not an encoding 19:55 Lajla: unicode is an encoding. 19:55 Lajla: strings do not need to be encoded. 19:55 Lajla: strings are sequences of natural numbers. 19:55 Lajla: THat's it. 19:55 Lajla: THe natural numbers encode characters however. 19:55 Lajla: What you ŕe thinking about is storing it internally as a utf-8 octet stream 19:55 lucian: Lajla: no, they're not. strings are sequences of letters 19:55 Lajla: which is not an encoding 19:55 Lajla: but a transition format 19:56 Lajla: unicode only defines what number corresponds to what letter. 19:56 Lajla: or character 19:56 lucian: but it's not that simple 19:56 Lajla: utf8 was developed by plan 9 I think 19:56 lucian: no one number corresponds to any one letter 19:56 Lajla: Not even the unicode consortium. 19:56 Lajla: Yes it does. 19:56 Lajla: You're talking about a _transition format_ 19:56 Lajla: Not an encoding 19:56 lucian: no 19:56 Lajla: I know how utf-8 works. 19:57 Lajla: And it ś not an encoding 19:57 Lajla: It's a transition format. 19:57 Lajla: Where the t f stands for. 19:57 (quit) philo: Ping timeout: 265 seconds 19:57 lucian: i'm talking about unicode, not utf 19:57 lucian: there are so many combined letters it's silly 19:57 Lajla: Ohh, you mean that. 19:57 Lajla: combination characters. 19:57 Lajla: combining macros and that. 19:58 lucian: and this is just unicode 19:58 lucian: text representation is extremely complicated 19:58 lucian: and racket deals with it very nicely, with strings 19:58 lucian: there's a good reason why languages have strings and not just chars 19:59 Lajla: Ehh, a lot of languages don't. 19:59 Lajla: Erlang doesn'teven have chars. 19:59 Lajla: Strings there are sequences of numbers. 19:59 lucian: Lajla: and that's one reason why it sucks immensely 19:59 Lajla: Haskell also just uses lists of characters. 19:59 lucian: there are some libs to do sane strings, but they suck a bit too 19:59 Lajla: Most 'serious' languages if the phrasing does not offend just use sequences of characters. 20:00 Lajla: A lot of languages just have a string datatype for ease of use. 20:00 lucian: Lajla: and they fail at anything but a subset of english 20:00 Lajla: In the case of scheme, I guess it's for efficiency because scheme lacks typed vectors 20:00 Lajla: In CL they are typed char factors. 20:00 lucian: most good languages have strings, for more reasons than just efficiency 20:00 Lajla: THat is nonsense, and a lot of languages which do have the string datatype fail harder. 20:01 lucian: Lajla: that's a different matter 20:01 Lajla: Most haskell implementations support unicode as far as I know. 20:01 lucian: yes, with strings 20:01 Lajla: strings in haskell are lists of characters. 20:01 lucian: not in the unicode libs afaik 20:01 Lajla: Can you link me those libs? 20:02 lucian: uh, i'd have to look 20:02 Lajla: As far as I know the String type is an alias of [Char] 20:03 lucian: i may have misread that at some point 20:03 lucian: i don't use haskell, so i don't really know, just read about t 20:03 Lajla: Well 20:04 Lajla: the unicode lib just uses that I guess. 20:04 lucian: i have used erlang however, and strin handling truly sucks ass 20:04 Lajla: Why? 20:04 Lajla: Well, there is no string there 20:04 Lajla: it's quite ad-hoc. 20:04 lucian: exactly 20:04 lucian: you have lists of ints 20:04 Lajla: I just think erlang sucks arse. 20:04 Lajla: Yeah, ahaha 20:04 lucian: which really sucks for any string handling 20:04 lucian: there are libs that implement strings, of course 20:04 lucian: and those are ok 20:05 Lajla: I'm still not completely decided about character datatypes to begin with though. 20:05 Lajla: I mean, they contain basically the same info as an unsigned, but with a tag saying 'I'm not an unsigned, I'm a char!' 20:06 lucian: Lajla: that's because they're broken by design 20:06 Lajla: characters? 20:06 lucian: you might get away with lists of chars if chars represented letters 20:06 lucian: yep 20:07 (quit) masm: Quit: Leaving. 20:07 lucian: but chars represent a small subset of letters and a few other things 20:07 Lajla: Ahhh 20:07 Lajla: So what you want is like that combining stuff represents one char? 20:07 Lajla: unicode combining characters? 20:07 lucian: maybe 20:07 Lajla: Hmm 20:07 Lajla: I got to say 20:07 Lajla: I might really like this idea. 20:07 lucian: if a char could be a katakana letter, yeah 20:07 Lajla: But they can be, rigt? 20:08 lucian: well, if you're willing to break everything 20:08 Lajla: I'm sure haskell chars go to that range. 20:08 lucian: but it might work as an internal representation 20:08 lucian: it's not about range, it's about extreme attention to detail 20:08 Lajla: The unicode BMP is handilly 2^16 different codepoints 20:08 lucian: i don't know if haskell does it, they might 20:08 lucian: but even that is broken 20:08 lucian: meh 20:09 lucian: i get really sad when I think of text representation in computers 20:09 lucian: even unicode is broken, but at least it's close enough 20:09 lucian: it's a relatively simple problem, and it's usually broken 20:10 Lajla: I also love how this 'standard latin alphabet' 20:10 Lajla: Has a W in it 20:10 Lajla: a letter only used in six languages apparently. 20:10 lucian: it's fun, yeah 20:10 Lajla: Only six languages use the W natively. 20:10 Lajla: I never even thought of that. 20:10 Lajla: And I speak three of them. 20:11 lucian: but then you have naïve in english 20:11 lucian: Lajla: which are? 20:12 Lajla: I spell naïve like naïve actually. 20:12 Lajla: English, Dutch, German. 20:12 lucian: well yeah, technically that's the correct spelling 20:12 Lajla: I also speak a bit of Finnish, but they don't have it. 20:13 lucian: anyway, i like strings :) 20:14 lucian: they're a very useful abstraction for a very hairy problem 20:14 lucian: and it's even better since they're immutable (usually anyway) 20:15 Lajla: Well 20:15 Lajla: I don't write much I/O stuff 20:15 Lajla: I'm usually asking myself things like 'Well, what would be the sum of all sexy primes under 1252732' 20:16 lucian: ah. then go back to your numbers :P 20:16 Lajla: Or 'I'd love to know what's the largest number that divides these numbers' 20:16 Lajla: Well, not only that. 20:16 Lajla: Also, ehh. 20:16 Lajla: Solving the liar paradox or stuff like that. 20:16 Lajla: Call/cc baybe! 20:16 Lajla: Exhausting all paths until you're there. 20:16 Lajla: I lately wrote amb in the form of a function 20:16 Lajla: Like, it takes a solution space as argument in the form of a list. 20:16 Lajla: But it's sloooooooowww. 20:17 Lajla: And amb on its own is sloooooooowwww enough 20:17 lucian: i'm not very familiar with call/cc or amb 20:18 lucian: i get roughly what it does, though 20:19 Lajla: Ahh 20:19 Lajla: both are cool. 20:20 Lajla: Also, call/cc is cool. 20:20 Lajla: Because it's next to useless. 20:20 Lajla: But it's still part of the standard. 20:20 Lajla: And I learnt it 20:20 lucian: meh, i could fine uses for continuations 20:20 Lajla: so that I can say 'Yeah, but I know how continuations work!' 20:20 Lajla: Well, I did 20:20 Lajla: In my amb function 20:20 Lajla: Usually amb is a macro. 20:21 Lajla: I guess because my amb function is about as slow as Hitler's realization that he was losing the war. 20:21 lucian: i like python's generators a lot 20:22 Lajla: What do they do exactly? 20:22 lucian: first of all, you can yield instead of return and the next call will continue from there 20:23 Lajla: Hmm what 20:23 Lajla: I don't follow. 20:23 lucian: and secondly, you can send stuff into a yield and it can use it 20:23 lucian: you know imperative programming? 20:24 offby1: lucian: I think Danny Yoo has written a generator package that emulates that. Check Plaet. 20:24 offby1: Planet. 20:24 lucian: offby1: cool 20:24 lucian: anyway, there are many nice uses for it 20:24 lucian: call/cc i mean 20:25 lucian: Lajla: http://en.wikipedia.org/wiki/Generator_(computer_science) 20:25 offby1: damn, building Guile is bringing my box to its knees. 20:25 offby1: just like building racket :) 20:25 offby1: I have never used call/cc directly once. 20:26 Lajla: lucian, so it's just a lazy for-loop? 20:26 Lajla: Basically? 20:26 lucian: Lajla: kind of 20:26 lucian: but that's just one use 20:26 Lajla: offby1, I am, that means that my e-penis is significantly larger than yours. 20:26 lucian: you can also do f.send(2) to inject things into the function 20:26 lucian: so you could write x = yield y 20:27 lucian: and if you do f.send(2) the function resumes with x=2 20:27 lucian: it's really nice for processing data lazily 20:28 lucian: and you can write a kernel with it too :) 20:28 (quit) alexsuraci: Remote host closed the connection 20:28 lucian: call/cc is your trap 20:29 Lajla: call/cc is my chick magnet. 20:29 Lajla: I like go to a bar. 20:29 Lajla: And I call/cc before there and carry that continuation with me. 20:29 Lajla: And if it fails. 20:29 Lajla: It just apply it to myself. 20:29 Lajla: And start over again. 20:29 Lajla: Until I get the perfect pickup line. 20:31 lucian goes to slee 20:32 lucian: p 20:32 lucian: bye 20:32 (quit) lucian: Remote host closed the connection 20:45 (join) ari__ 20:59 (join) alexsuraci 21:11 (join) utauu 21:11 (part) utauu 21:12 (join) lisppaste 21:12 Lajla: (call/cc offby1) 21:13 Lajla: What are you going to do with it babe. 21:13 offby1: rudybot: give Lajla (curry values 10) 21:13 rudybot: Lajla: offby1 has given you a value, say "rudybot: eval (GRAB)" to get it (case sensitive) 21:15 Lajla: rudybot, eval (GRAB) 21:15 rudybot: Lajla: your sandbox is ready 21:15 rudybot: Lajla: ; Value: # 21:16 offby1: Try it over some Basmati rice 21:17 Lajla: Hoaskall curry. 21:17 offby1: Skoal 21:17 Lajla: rudybot, eval (call/cc call/cc) 21:17 rudybot: Lajla: ; Value: # 21:18 offby1: rudybot: (buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo) 21:18 rudybot: *offby1: error: reference to an identifier before its definition: buffalo in module: 'program 21:18 offby1: rudybot: (buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo) 21:18 rudybot: *offby1: ; Value: # 21:18 rudybot: *offby1: ; Value#2: # 21:18 rudybot: *offby1: ; Value#3: # 21:18 rudybot: *offby1: ; Value#4: # 21:18 rudybot: *offby1: ; Value#5: # 21:18 rudybot: *offby1: ; five values is enough for anybody; here's the rest in a list: (# #) 21:18 offby1: why I don't know what's gotten into him 21:18 offby1: rudybot: fritz 21:18 rudybot: *offby1: ; Value: frotz 21:18 offby1: hmm 21:18 offby1: rudybot: let's 21:18 rudybot: *offby1: let's follow the dysfunctional programming paradigm 21:32 ari__: what is rudyot 21:33 ari__: rudybot 21:35 (join) jonrafkind 21:39 offby1: an IRC bot that I wrote. 21:39 offby1: rudybot: source 21:39 rudybot: *offby1: git clone git://github.com/offby1/rudybot.git 21:40 offby1: it has one arguably-useful trick: it can eval scheme code (actually, racket code) 21:40 offby1: rudybot: (+ 1 2 3 4) 21:40 rudybot: *offby1: ; Value: 10 21:40 offby1: it has a bunch of not-useful-but-amusing-if-you-have-a-primitive-sense-of-humor tricks: 21:41 offby1: rudybot: say something interesting 21:41 rudybot: *offby1: error: reference to an identifier before its definition: say in module: 'program 21:41 offby1: er, that's actually a bug, not a trick. 21:41 offby1: rudybot: say something interesting 21:41 rudybot: *offby1: That could be either interesting or dull. 21:45 Lajla: offby1, rudybot is your work? 21:46 Lajla: Why is it called rudybot? 21:46 (join) sts193 21:46 sts193: Does anyone know how to setup racket in emacs with quack? 21:46 offby1: Lajla: it is indeed. 21:47 Lajla: offby1, tell me how you did it and where you host it. 21:47 offby1: Lajla: I originally named it "fartbot", but someone pointed out that that name was rude, so I called it "rudebot" ... I no longer remember how it morphed from there to "rudybot". 21:47 Lajla: I have been looking for an interface to write one of those. 21:47 Lajla: Ahhh 21:47 Lajla: fartbot is cooler. 21:47 offby1: Lajla: hold on for how I did it: 21:47 offby1: rudybot: source 21:47 rudybot: *offby1: git clone git://github.com/offby1/rudybot.git 21:47 offby1: that's how I did it. 21:48 offby1: I host it at the moment at prgmr.com, which is _really_ cheap but kinda unreliable. 21:48 Lajla: offby1, that's not as much the issue for me as the protocoll and how to host it and all. 21:48 Lajla: Like, how it connects to IRC and all that 21:48 offby1: I used to host it on EC2, which I will probably resume doing once my prepaid year's worth of hosting at prgmr expires 21:48 (part) sts193 21:48 offby1: Lajla: well, it's all in the source. 21:48 offby1: basically it just makes a simple low-level tcp socket connection to freenode.org, port ... uh .. whatever it is; and reads and writes lines to it. 21:49 Lajla: Ahhh 21:49 Lajla: Hey 21:49 Lajla: if it works like that 21:49 Lajla: even I can do it. 21:49 offby1: the current source is (naturally) a hairy mess. 21:49 offby1: wind the repo back in time, though, and you might see some simplicity peek out. 21:49 Lajla: I would call my bot FartbotII 21:49 Lajla: In remembrance 21:49 offby1: you're welcome to do so 21:50 Lajla: I hate it when people can't stomach such names of bots. 21:50 offby1: I've stolen a chunk of ideas from a bot called "incubot" 21:50 offby1: that's the feature whereby it responds with a vaguely-apropos message when you talk to it 21:50 offby1: rudybot: can you respond in a appropriate manner? 21:50 rudybot: *offby1: watches tumbleweed pass by in a disinterested manner 21:50 offby1: for some value of of "appropriate", of course. 21:51 offby1: anyway I ripped that off from klutometis' "incubot". It's my favorite feature by far. 21:54 Lajla: offby1, and you made this bot without using continuations right? 21:54 Lajla: I once implemented do with continuations instead of tail recursion because I was boooore 21:54 Lajla: d 21:54 Lajla: No idea if its less efficient 21:55 Lajla: But offby1 I just had this really annoying PvP 21:55 Lajla: Where this guy keeps dt'ing me. 21:55 Lajla: Like 21:55 Lajla: first he moves in, focuses down my static d, then the dark templar come. 21:55 Lajla: So I actually had to make observers the whole time because he kept taking those out too. 22:06 (join) askhader 22:13 (quit) b-man_: Remote host closed the connection 22:25 offby1: Lajla: I never used call/cc. I might have a let/ec in there somewhere. 22:35 Lajla: offby1, so you admit that I am better than you every possible respect 22:35 Lajla: I actually only used call/cc once in any serious practical problem solving task. 22:35 Lajla: But that was to implement an amb function 22:45 (quit) alexsuraci: Remote host closed the connection 22:46 (quit) ari__: Quit: Page closed 22:53 (join) alexsuraci 23:12 (quit) alexsuraci: Remote host closed the connection 23:41 (quit) rapacity: Ping timeout: 265 seconds 23:41 (join) rapacity