00:07 (quit) rpr`: Remote host closed the connection 00:13 Lajla: Just a few thousand clicks away. 00:22 Fare: does it intend to implement the full module logic and racket language? 00:22 jonrafkind: dunno, email danny 00:23 Lajla: How are events managed? 00:23 Lajla: Continuations? 00:23 Lajla: That would be pretty cool. 00:24 Lajla: (call/cc onmouseover) 00:28 (quit) jonrafkind: Ping timeout: 260 seconds 00:41 (join) jonrafkind 00:55 (quit) jonrafkind: Ping timeout: 276 seconds 00:58 (join) jonrafkind 02:19 (quit) shkk: 02:30 (join) masm 02:37 (quit) jonrafkind: Read error: Operation timed out 03:36 (join) pdelgallego 08:32 (quit) jao: Read error: Connection reset by peer 09:28 (join) hanDerPeder 09:47 (quit) masm: Quit: Leaving. 11:04 (quit) mahsohn: Ping timeout: 276 seconds 11:07 (join) mahsohn 11:25 (join) shkk 12:15 (join) _Pb 12:16 _Pb: are there any tutorials out there on writing simple games in racket? 12:40 (join) masm 12:48 (quit) _Pb: Read error: Connection reset by peer 12:51 (join) rpr` 12:51 rpr`: Is there a way, either as some sort of "project" configuration, or at 12:51 rpr`: least when starting up drracket to tell it what collections directories 12:51 rpr`: to use? 13:03 (quit) masm: Quit: Leaving. 13:10 chandler: rpr`: You can customize the `current-library-collection-paths' parameter. If you'd like to set a custom collection path within DrRacket, you can go to Language -> Choose Language, click on Show Details, and add a new collection path. 13:31 rpr`: Thanks Thatis what I was looking for. I've been soft linking into the standard ~/.racket/... and figured there had to be a better way. 14:06 rpr`: Might be just me, but (require (filtered-in ...)) is broken at least for the latest from git. 14:09 (join) jeeve 14:09 (quit) jeeve: Client Quit 15:22 (quit) mahsohn: Ping timeout: 260 seconds 15:38 (quit) hanDerPeder: Quit: hanDerPeder 16:10 (join) mahsohn 16:10 (join) jao 16:12 (join) jonrafkind 16:59 (join) masm 17:26 (quit) masm: Quit: Leaving. 18:09 (quit) jonrafkind: Ping timeout: 265 seconds 18:22 (join) jonrafkind 19:12 (quit) Fare: Quit: Leaving 19:52 (join) hanDerPeder 20:15 (quit) hanDerPeder: Quit: hanDerPeder 20:42 (quit) pdelgallego: Ping timeout: 260 seconds 21:07 bremner: hi all. I need a short description for the debian racket package. I'm thinking of something like "racket - programming language in the scheme family." 21:22 jonrafkind: that sounds ok to me 21:23 jonrafkind: or maybe "racket - extensible programming language that is a variant on scheme" 21:25 Lajla: bremner, "Racket, it beats the MacBook wheel by far." 21:25 Lajla: bremner, or maybe you should put 'lisp' there at some point 21:25 bremner: heh. Yeah. That will convince debian users :) 21:25 Lajla: Like 'Racket, lisp language based on Scheme' 21:41 Lajla: jonrafkind, what do you think of this idea? http://codepad.org/s9BML295 21:42 jonrafkind: whats `lstc' 21:42 jonrafkind: your choice of variable names gives me a headache 21:44 (join) pdelgallego 21:44 Lajla: jonrafkind, it's always a battle between the people that like long variable names and those that like short eh? =P 21:44 Lajla: But lstc is list constructor. 21:44 Lajla: Basically cons 21:45 Lajla: But it checks if its second argument is of type list 21:45 jonrafkind: if i started talking in aol speak im sure you would get pissed off 21:45 jonrafkind: shall I try it? 21:45 Lajla: Yeah, sure, but this is programming. 21:45 jonrafkind: OH HO 21:45 Lajla: I mean, C uses strcpy 21:45 Lajla: Because writing function names in full isn't easy on the fingers and surface area can make code less readable. 21:45 jonrafkind wields his mega-ultra saber of 15,000,000 hydrogen bombs 21:45 jonrafkind stabs earth 21:45 jonrafkind: EARTH EXPLODES 21:46 Lajla: I mean call/cc is a lot more common than call-with-current-continuation 21:46 Lajla: jonrafkind, I kind of liked that place. 21:46 jonrafkind: you just wrote some long sentences 21:46 jonrafkind: dont your fingers hurt now? 21:47 Lajla: jonrafkind, I get your point here, and I agree that this is not the biggest point. 21:47 Lajla: The biggest point is that surface area of code is for most people inversely proportional to readability of it. 21:47 Lajla: As soon as you just know what things mean, it's often easier to have names abbreviated. 21:47 Lajla: Most languages do it. 21:48 jonrafkind: there is some scale of readability: too long names result in too big code and thus unreadable. too short names result in complete confusion and thus unreadable 21:48 Lajla: list-constructor the whole time just increases code surace so much. 21:48 Lajla: I guess that's true. 21:48 jonrafkind: ok but list-cons maybe would be reasonable 21:48 jonrafkind: lstc is just... awful 21:48 Lajla: But we all use car and cdr, even though to most people what they would mean is pretty vague. 21:48 Lajla: Well, car and cdr is an example that has been kept pretty long even though nowadays it's a misnomer. 21:48 jonrafkind: some things get grandfathered in, but new names should be made with some sense involved 21:48 Lajla: As soon as you get used to it, it helps. 21:49 jonrafkind: do you read calvin and hobbes? my favorite saying is "someday language will be a complete impediment to understanding" 21:49 jonrafkind: this is how I feel when people make up gibberish names for their code 21:50 Lajla: I guess we're going to have to agree that we disagree on praeferences here. But, it's actually not that bad since I'm probably going to give each function two initial bindings, a long and a short one. 21:50 jonrafkind: ok anyway whats this `abstr' thing if not a list of elements 21:50 jonrafkind: so its like a symbol? 21:50 Lajla: I mean, in Clojure, lambda is actually (fn [x y] (+ x y)) 21:50 jonrafkind BARF 21:50 jonrafkind: one reason I will never use clojure.. 21:51 Lajla: abstr is an identifier I guess, it's basically the most generalized way of identifying data. 21:51 Lajla: Like {set ...} {lst ...} {vec ...} 21:51 jonrafkind: its a meta-constructor? 21:51 Lajla: jonrafkind, well, this is personal praeference at best. 21:51 jonrafkind: abstr = {set, lst, vector} ? 21:51 jonrafkind: or it is a constructor itself 21:51 Lajla: jonrafkind, no, it's just a notation, a literal one. 21:51 Lajla: Like {vec x y z} is the equivalent of #(x y z) 21:53 Lajla: (vec x y z) is something else, that is actually written out in total {lstc {symb \v \e \c} {lstc x {lstc y {lstc z {lst}}}}} 21:53 Lajla: Of course, no one will use that, but it's possible. 21:53 Lajla: Oh, and x y and z can also be written out in total like {symb \x} of course 21:53 jonrafkind: ok so you want to use ... as a notation for specifying the type of a parameter, in this case `...' means a list 21:54 Lajla: Well, it ś basically like Scheme's high level macro there. 21:54 jonrafkind: so you are imagining other notations, like #{x y z} so the parameter has to be a vector of 3 elements, or something? 21:54 Lajla: You can use it, don't need to. 21:54 jonrafkind: ... is useful in macros for generating more code, but in this case it seems you just want a type system 21:54 jonrafkind: unless you want to destructure arguments on the way in 21:55 Lajla: It would be possible to use {abst (k {vec x ...}) yeah 21:55 Lajla: jonrafkind, that is exactly what it is for. 21:55 Lajla: I mean, in a lot of cases, the compiler can at compile time destructure this, rather than at runtime dissasemble it. 21:55 Lajla: Not always, of course. 21:55 jonrafkind: sure, i mean you can even write that in a macro that expands to `match' 21:56 jonrafkind: well I guess the compiler could destructure some stuff as long as its applied directly and the compiler knows which function it is 21:56 Lajla: Well, except that this also works at runtime, like if the count of arguments is not known. 21:56 Lajla: But that gives a penalty. 21:56 jonrafkind: but if you use `apply' or pass around functions then it becomes hard 21:56 Lajla: THen it's done at runtime at a penalty. 21:56 Lajla: but of course, apply always carries a certain penalty 21:56 Lajla: It's in any case cheaper than the normal way of destructuring lists I guess. 21:57 jonrafkind: I suppose.. do you know if destructing function arguments is a bottle neck in any applications? 21:58 Lajla: Hardly, but the main advantage is that it amkes writing them a little bit easier. =P 21:58 Lajla: I would have to use a loop without this to write it 21:58 Lajla: The performance is just nicely taken with it 21:58 jonrafkind: ah well then I would give up on static destructing and just use match (at runtime) 21:58 Lajla: Well, the compiler is free to choose itself which it thinks is best. 21:59 Lajla: But in a lot of cases, doing it at compile time is going to enhance performance. 21:59 Lajla: It's mainly just a nifty way to define functions in a more concise and more readable way. 22:00 Lajla: Of course, our definitions of 'readable' are pretty much 180 degrees apart. =P 22:00 Lajla: I'm with the Clojure and C gang on this, even though I don't like either language, I find long variable names more difficult to read than short ones. 22:02 Lajla: Clojure also supports the notation #(* %1 (+72 %2)) for function literals, which I think is pretty cool. 22:02 jonrafkind: i really dont see a difference *at all* between english and programming 22:02 jonrafkind: I think there is some horrible misconception that programming is like math and therefore should be really short, but I think math expressions are short because people used to write themby hand, where shortness matters 22:02 Lajla: Well, some people like to read their code as English, python is geared towards this, some people don't. 22:03 jonrafkind: im sure peopple can read their own code, but how can you read someone else code when its not intuiative? 22:03 Lajla: Well, accordingly some wiki article I once read, studies did seem to indicate that readability of code is hampered by surface area of it. 22:03 jonrafkind: so the question is, whats intuiative? english seems like a reasonable compromise 22:03 jonrafkind: I think there are other techniques to mitigate the verboseness of identifiers 22:03 Lajla: English is then again a pretty bad language for expressing the logic behind computation, better use Lojban. 22:03 Lajla: Hmm, such as? 22:04 jonrafkind: take complex expressions and break them up, either with intermediate results or macros 22:04 Lajla: Sure, we all do that, but it still makes function names quite long. 22:04 Lajla: And doesn't decrease surface area of code. 22:05 Lajla: jonrafkind, but you're working on an infix Scheme aren't you? 22:05 jonrafkind: mm im unconvinced. when I see some variable that I can't decipher my train of thought completely stops while I decipher it. reading long code just slows me down instead 22:05 jonrafkind: yea, infix scheme 22:06 Lajla: jonrafkind, well, it's more surface area of code in general. 22:07 Lajla: Like, if code has a high surface area, it sarts to look like a block. 22:07 Lajla: Like in COBOL 22:07 Lajla: jonrafkind, well, to each their own I suppose, this is probably a personal thing, I'm sure there are some people who like it and there's a market for it. 22:07 jonrafkind: oh you mean like 40 lines where each line has 60 characters, just a wall of text 22:07 Lajla: Yeah 22:07 Lajla: The longer the variable names are, the more it starts to look like that to most people 22:08 Lajla: The 'blackness' increases as typographers call it. 22:08 Lajla: Apparently a high blackness also makes long texts hard to read. 22:08 Lajla: Like when you ustify a paragraph, as in, you align it left and right, as it turns out, people need irregularity to stay focussed. 22:08 jonrafkind: I think theres a lot of skill in expressing powerful something in few words, its the same with literary writers 22:09 Lajla: Like, an entire paragraph written in IMPACT and in UPPERCASE and monospaced reads really annoying. 22:09 jonrafkind: but they still use english, instead of some made up language to help them reduce verboseness 22:09 Lajla: Well, I agree, but a lot of times when people abbreviate or compacten texts, they leave out info. 22:09 Lajla: Well, most paragraphs aren't about describing a flow of computation 22:10 Lajla: Like people say 'maths is not an oral language', if you explain a formula to some one in English, it's hard to understand, just seeing the aequation is a lot simpler to read. 22:10 jonrafkind: yea 22:10 Lajla: Like, when I say E = mcc/sqrt(1-vv/c/c) 22:11 jonrafkind: looks like nonsense because i dont know any of the varaibles there 22:11 Lajla: Most people find that a loooot easier to read then 'Energy is mass times the lightspeed squared divided by the square root of one minutes v square divided by c square 22:11 jonrafkind: energy = mass * light^2 / sqrt(1 - velocity / light^2) 22:11 Lajla: Most people who are doing relativity sort of already know that E is energy, m is rest mass, c is speed of light, and v is the mass of the object 22:11 jonrafkind: not so bad 22:12 Lajla: Well, most physicists will still not use a variable longer than one letter. 22:12 jonrafkind: complete failure 22:12 Lajla: In fact, they ended up using greek letters just so that they can keep them to one letter length. 22:12 Lajla: I don't agree, specially typesetted, try to latex it. 22:13 Lajla: But I tend to use E=mcc and not E=mc^2 22:13 jonrafkind: now that is wierd.. most people in america use E=mc^2 22:13 Lajla: I think the square sign is nonsense if your variable is one letter long and concactenation of symbols implies multiplication 22:13 (quit) pdelgallego: Ping timeout: 276 seconds 22:14 Lajla: Most people in europe too, but more people are starting to turn around from using ² and just use aa instead of a² 22:14 Lajla: Especially a^2 just looks strange when aa is shorter and clearer. 22:15 Lajla: But what I'm saying is, I understand that this may help you read, but most people feel the other way around. 22:16 jonrafkind: dont you ever read code, see some variable name you can't decipher and think "gosh, what is v here?" 22:16 Lajla: Lexical scope solves that problem a lot I guess. =P 22:17 jonrafkind: and then think "if only the author spelled out what v was, I would know. instead of spending 5-20 minutes trying to figure it out" 22:17 jonrafkind: ha.. you should read some of the code in the racket source 22:17 jonrafkind: say goodbye to your sanity 22:17 Lajla: But no, not really, I mean, I know what the standard function names are, and the restis defined in times of them. 22:17 Lajla: Well, when you prototype a function 22:17 Lajla: You usually say what each is at the top. 22:17 Lajla: and a good function definition is not longer than 15 lines max. 22:17 jonrafkind: thats extremely rare 22:17 jonrafkind: you must be living in a programming utopia 22:18 Lajla: http://stackoverflow.com/questions/3173316/overhead-of-call-by-need-call-by-name-lisp-interpreter-strategy here, look at the top piece of code excerpt. 22:18 Lajla: Yeah, I used names like 'd' but I commented their meaning on top 22:19 Lajla: function definitions that are properly commented? 22:19 Lajla: THose are rare? 22:19 jonrafkind: ive seen code that uses about 10 single letter variables, confusing them is extremely easy 22:19 jonrafkind: yes, properly commented functiond definitions are extremely rare 22:20 jonrafkind: ok when i read that guys code I read it like "is datum quoted? if it is then dequote the datum" 22:20 jonrafkind: instead of "is d quoted? if it is then dequote the d" 22:21 Lajla: d is the datum that it evaluates. 22:21 Lajla: Its an eval 22:21 jonrafkind: yea I know 22:21 jonrafkind: but do you read it as "datum" or "d" ? 22:21 jonrafkind: in your mind 22:21 Lajla: I read it as 'if quoted, just dequote' I guess. 22:22 Lajla: I don't read my code like English in my mind. 22:22 Lajla: Some people do, some people don't. 22:22 jonrafkind: I think these examples are too easy not to misunderstand 22:23 Lajla: Well, maybe this is my programming style, but my functions tend to be short and do one thing and do them well. 22:23 jonrafkind: yes I wish more people had that style 22:23 Lajla: Which is what more people recommend. 22:24 Lajla: I agree with you there. =P 22:24 Lajla: But that's not only readability, that's also scalability, portability, just good coding. 22:24 jonrafkind: but ok you know scheme rather well, but how about other languages/systems? 22:24 jonrafkind: your readability in one language (scheme) seems highly dependant on your knowledge of the context 22:24 Lajla: Well, some languages do have code which is ... atrocious 22:24 Lajla: Like javascript. 22:24 Lajla: That's true. 22:24 Lajla: But I don't read languages I don't now that often. 22:24 Lajla: I'm not forking something in a language I don't relaly know of course. 22:25 jonrafkind: oh heh,w ell i routinely read/use half a dozen languages every week 22:25 Lajla: But there are lot of languages, which are often used by people who're not that good in programming like javascript and php, what a mess... 22:25 Lajla: Hmm, I guess I use about that much, but read a lot less. 22:25 jonrafkind: yes and there verboseness would help tremendously because they lack the ability to express things in an otherwise readable way 22:25 Lajla: But I take you encounter a lot of code which is badly written. 22:25 Lajla: Ahh, yeah. 22:25 Lajla: well, yeah, then I agree. 22:26 Lajla: I rephrase my point then to 'verbosity isn't needed if you program things in a good way' 22:26 jonrafkind: the worst ive ever seen is perl: bad naming conventions + zillions of little operators = barf 22:27 jonrafkind: + context-sensitive operators.. omfg 22:27 Lajla: Ahaha 22:27 Lajla: Perl code can be sooo unreadable. 22:27 Lajla: also, perl function definitions... 22:28 Lajla: Passing all arguments as a call by reference array, worsh mistake ever. 22:28 Lajla: Especailly the flattening 22:28 Lajla: And the sigls. 22:28 Lajla: $array[2] 22:28 jonrafkind: #@$#$array.. what????? 22:28 Lajla: If you have an array of arrays, then I don't even know which to use. =P 22:28 Lajla: There is no logic. 22:28 jonrafkind: you should see the perl6 parser written in perl. its... impressive 22:28 Lajla: PHP thankfully realized that different sigils are just some stupid mistake some one thought was cool which have no real reason. 22:29 Lajla: Or that wantarray? hack in perl. 22:30 Lajla: jonrafkind, but I take it you like the layout of Haskell then? 22:30 jonrafkind: ive never written any haskell and ive only seen it a few dozen times. it looks sort of ok I guess 22:30 jonrafkind: a littl ebit wierd, but i could probably get used to it 22:31 Lajla: Once you realize that : is cons and ++ is list append then: 22:31 Lajla: reverse [] = [] 22:31 Lajla: reverse (x : xs) = reverse xs ++ [x] 22:31 Lajla: That's a pretty clear definition of the reverse function 22:32 jonrafkind: oh yea thats the same as in ocaml, i use ocaml occasionally 22:32 jonrafkind: actually is ++ list append in ocaml? maybe its something else 22:32 jonrafkind: :: is cons 22:32 Lajla: :: is cons, @ is list append 22:32 jonrafkind: ah right 22:32 Lajla: In OCaml 22:33 Lajla: But in OCaml you use let rec reverse [] = [] \n\t | x :: y = reverse xs @ [x], right? 22:34 jonrafkind: yea 22:34 jonrafkind: reverse y @ [x] 22:35 Lajla: What do you think about python's syntax then? 22:36 Lajla: Python is designed to enforce proper indenting 22:36 jonrafkind: i like it, the forced indentation doesnt bother me at all 22:36 jonrafkind: until i have to copy/paste code from another buffer.. then it screws up :p 22:38 Lajla: Ahaha, yeah 22:39 Lajla: I'm not too much of a fan of explicit return statements though. 22:39 Lajla: Some times they just make things annoying. 22:39 Lajla: I just like the last computed expression rule. 22:39 Lajla: And maybe an escape statement if it's really needed. 22:39 jonrafkind: yes that is convenient 22:40 Lajla: Having to type so many returns after every branch in python is annyogin. 22:40 Lajla: you could have just typed one at the top, but in python, if is a not an expression 22:40 jonrafkind: yea heh 22:41 Lajla: You can't return if x < 0: -1 elif: x == 0: 0 else: 1 22:41 jonrafkind: for shame 22:41 Lajla: Besides, since I favour the functional style, in most cases my function only has one expression 22:42 Lajla: Like, I was coding the parser for that language of mine lately, and I used the imperative style, and I suddently realized how strange it felt for me to call a function without using its return value after all those months of functional-only programming 22:43 jonrafkind: well thats good 22:46 Lajla: Well, for the functional style I guess, I like to stay versatile and that it felt a little bit weird at first made me realize that I lost some feeling for imperative, but it's back now. 22:46 Lajla: http://codepad.org/NZp6PCeb this is also quite handy, you can force captures because of the bigger expansion. 22:46 jonrafkind: sometimes i can only code things imperitavely. i know theres a functional way and I *could* do it, but its usually so much easier to use mutation instead 22:47 Lajla: You can even match the characters in symbols then like {symb x ...} to match the invidual characters 22:47 Lajla: What kind of things? 22:47 jonrafkind: i dunno, things like iterating over a list of things and shoving them into a hashmap 22:49 Lajla: Hmm, and map doesn't work? 22:49 jonrafkind: sometimes i have multiple lists and i need to shove elements in different places 22:49 jonrafkind: so combining the lists and then using map is a pain 22:50 Lajla: Hmm 22:50 Lajla: give me a description of such a problem 22:50 Lajla: I'm willing to see if I can take it on 22:50 jonrafkind: heh well I dont have one handy, i just vaguely recall dealing with it in the past 22:50 jonrafkind: i mean, usually I would use map or something 22:52 Lajla: I never really use hashtables though 22:52 Lajla: Do they have some large advantage over using numerical indices? 22:52 Lajla: What I really think is funny is that in php, even if you use indices you still use hash tables, ahah 22:52 Lajla: And that $array[0] can actually index the fifth element 22:53 Lajla: array(4 => "hello", -2 => "world") 23:54 Lajla: jonrafkind, by the way, give me an example of veeery poorly written code. 23:54 Lajla: I want to see if I can take it on.