00:40 (join) samth_ 00:45 (join) mithos28 00:49 (join) misterm 01:11 (quit) mithos28: Quit: mithos28 01:12 (quit) samth_: Ping timeout: 264 seconds 01:14 (join) coyotama|2 01:15 (quit) coyo: Ping timeout: 260 seconds 01:33 (quit) dnolen: Quit: dnolen 03:16 (join) lucian 03:24 (quit) lucian: Remote host closed the connection 03:27 (quit) tfb: Quit: sleeping 04:42 (quit) coyotama|2: Ping timeout: 240 seconds 04:51 (join) tfb 04:59 (quit) abbe: Ping timeout: 276 seconds 05:35 (join) jesusito 05:40 (join) cderici 05:41 (quit) cderici: Client Quit 05:48 (join) tauntaun 05:55 (join) Agari 06:12 bremner: it would be nice to have checksums published for the racket tarballs 06:13 bremner: or better, gpg signatures 06:13 (quit) evhan: Ping timeout: 246 seconds 06:32 (quit) tauntaun: Remote host closed the connection 06:34 (quit) realitygrill: Quit: realitygrill 06:48 (quit) jesusito: Quit: ERC Version 5.3 (IRC client for Emacs) 07:05 (join) mye 07:10 mye: I'm trying to find the definitions of core forms, say 'or': what do I have to grep for? I tried variations of: grep -R '.*(syntax.*[ (]or$' .; sind I presume it's a macro of some kind. 07:11 mye: (grepping from the collects folder) 07:11 rapacity: have you tried using git's grep ? 07:11 mye: no 07:11 (quit) Agari: Ping timeout: 240 seconds 07:12 mye: also, this is in the normal windows binary installation folder 07:12 mye: not a git repo 07:13 rapacity: or 07:13 rapacity: oops 07:13 mye: I tried searching the tags file, and I jumped to (or ... with Vim but that goes to some kind of Or struct definition 07:14 mye: ctags -R . seems to need some modification to what ctags recognizes as definitions 07:16 (join) Snaffu 07:23 (join) tauntaun 07:48 (join) realitygrill 07:50 (quit) realitygrill: Client Quit 07:56 (quit) tauntaun: Ping timeout: 246 seconds 08:12 (join) masm 08:20 (join) MayDaniel 08:29 (quit) MayDaniel: Read error: Connection reset by peer 08:58 (join) realitygrill 09:53 (join) cpach 10:01 (part) shofetim: "ERC Version 5.3 (IRC client for Emacs)" 10:04 (join) mithos28 10:06 (join) dnolen 10:13 (quit) mithos28: Quit: mithos28 10:33 (join) abbe 10:36 (join) tauntaun 10:36 (join) evhan 10:42 (join) coyotama|2 10:42 (join) MayDaniel 10:43 (nick) coyotama|2 -> coyo 10:43 (quit) coyo: Changing host 10:43 (join) coyo 10:58 (join) SinDoc 11:06 (quit) dnolen: Quit: dnolen 11:34 (join) samth_ 11:40 (join) corruptmemory 11:46 (join) mceier 12:00 (quit) masm: Ping timeout: 260 seconds 12:03 (quit) MayDaniel: Read error: Connection reset by peer 12:08 (quit) realitygrill: Quit: realitygrill 12:18 (join) jfalcon 12:19 (join) carleastlund 12:19 (quit) mye: Ping timeout: 240 seconds 12:20 (join) anRch 12:23 (join) jonrafkind 12:25 (join) masm 12:33 (join) mithos28 12:36 (quit) SinDoc: Ping timeout: 264 seconds 12:43 (join) realitygrill 12:51 (quit) anRch: Quit: anRch 12:53 (part) jfalcon 13:05 (join) SinDoc 13:18 (quit) tauntaun: Ping timeout: 255 seconds 13:21 (join) lucian 13:22 (join) MayDaniel 13:22 (part) SinDoc 13:25 (join) kenjin2201 13:29 (join) PLT_Notify 13:29 PLT_Notify: racket: master Robby Findler * 7cc3465 (1 files in 1 dirs): clarify the style<%>'s get-delta's docs 13:29 PLT_Notify: racket: master Robby Findler * 87e637a (4 files in 4 dirs): - adjust the teaching language test coverage style implementation ... 13:29 PLT_Notify: racket: master Robby Findler * 3cb3b9f (1 files in 1 dirs): fix a bug in PLTDRPAR 13:29 PLT_Notify: racket: master commits ca5c061...3cb3b9f - http://bit.ly/ggJNxi 13:29 (part) PLT_Notify 13:31 bremner: eli: I (and the debian ftp-masters) have a few questions about some of the licenses in files in the racket distribution. Should I file a ticket, send to the devel list, or something else? 13:32 (quit) samth_: Ping timeout: 276 seconds 13:34 (quit) MayDaniel: 13:35 (quit) realitygrill: Quit: realitygrill 13:38 (quit) tfb: Ping timeout: 240 seconds 13:55 (join) Agari 14:03 (join) realitygrill 14:05 (join) MayDaniel 14:10 (join) anRch 14:13 (join) Fare 14:23 jeapostrophe: for some reason "open" doesn't work on one of my macs with drracket 14:24 jeapostrophe: does anyone have any idea why that would be? 14:24 jeapostrophe: it focuses drracket but it doesn't load the file 14:24 clklein: I see that intermittently. 14:25 clklein: Running open a second time always (or almost always) works though 14:25 jeapostrophe: i think mine used to do that but it doesn't work at all now 14:25 clklein: oh, I am several days behind HEAD 14:37 jeapostrophe: naturally when i just updated it works great 14:38 jeapostrophe: weird 14:38 clklein: DrR knows that the next step after "git pull" is "Submit PR" :) 14:39 jeapostrophe: i think the updated queue handling for the repl bug fix did it 14:40 clklein: I suppose that's more likely. 14:40 jeapostrophe: :P 14:43 (join) tauntaun 14:46 (quit) evhan: Quit: Lost terminal 14:48 (quit) mithos28: Quit: mithos28 14:50 (join) evhan 14:51 (join) mithos28 14:53 (join) PLT_Notify 14:53 PLT_Notify: racket: master Robby Findler * 1cf98d3 (1 files in 1 dirs): fix when check syntax is clearing out its error message editor ... - http://bit.ly/hYHXO1 14:53 (part) PLT_Notify 14:54 (quit) mithos28: Client Quit 14:54 (join) saint_cypher 14:57 (join) mithos28 15:06 (quit) mithos28: Quit: mithos28 15:10 (join) mithos28 15:11 (quit) Agari: Ping timeout: 240 seconds 15:12 (join) mithos28_ 15:12 (quit) mithos28: Read error: Connection reset by peer 15:12 (nick) mithos28_ -> mithos28 15:28 (join) Agari 15:32 (quit) anRch: Quit: anRch 15:44 (quit) kenjin2201: Ping timeout: 276 seconds 15:52 (join) Slipyx 15:53 (join) samth_ 16:06 (join) kenjin2201 16:09 (quit) realitygrill: Quit: realitygrill 16:28 (quit) samth_: Ping timeout: 246 seconds 16:43 (join) jfalcon 16:47 (quit) rapacity: Ping timeout: 260 seconds 16:48 (join) rapacity 16:48 (quit) rapacity: Changing host 16:48 (join) rapacity 17:03 (quit) MayDaniel: Read error: Connection reset by peer 17:05 (quit) coyo: Quit: KVIrc 4.0.2 Insomnia http://www.kvirc.net/ 17:06 (join) samth_ 17:09 (quit) Snaffu: Quit: Leaving 17:18 (join) Hydrant 17:19 Hydrant: hey all.. I'm still learning racket (from years of C++) and I have some beginner questions as I go through the language :-) 17:19 Hydrant: what is the difference between define and let? Is it that let is locally scoped and returns its value, whereas define is a global definition ? 17:25 jonrafkind: yea basically 17:26 Lajla: Hydrant, you can also locally use define 17:26 Lajla: In fact, inside a let 17:26 (quit) kenjin2201: Ping timeout: 240 seconds 17:26 Lajla: rudybot, (let ((a 3)) (define b a) b) 17:26 rudybot: Lajla: your sandbox is ready 17:26 rudybot: Lajla: ; Value: 3 17:27 Lajla: the definition of b with define is local to the let block 17:27 Hydrant: what is the real difference between let and define? It seems that racket has a lot of redundancy... let, let*... define, and it's not clear to me how these are different or why they are 17:27 Lajla: anything outside it can't see it. 17:27 Lajla: Hydrant, well, define allows for mutual recursion. 17:28 Lajla: As a common example: (define (even? n) (or (zero? n) (odd? (- (abs n) 1)))) (define (odd? n) (even? (- (abs n) 1)))) 17:28 Lajla: If you use let, they won't 'see' each other. 17:29 Hydrant: o let is basically a locally scoped thing 17:29 Hydrant: *so 17:29 Lajla: (let ((x )) ...) basically is in the scope outside of the let. 17:29 Lajla: It won't see any bindings you make _with_ the let. 17:30 Lajla: Also, let also immediately constructs a block 17:30 Lajla: So any new binding you make is local to the block 17:30 Lajla: which is extremely common in racket to use, often up to very deep. 17:30 Lajla: 'variables' are typically not used to be variable, but rather just shorthands for more complex expressions to keep the code more readable. 17:31 Hydrant: (let ((x )) ...) <-- can you clarify? 17:31 Hydrant: you mean that can use things defined outside of the let, right ? 17:31 Lajla: Hydrant, yeah 17:31 Hydrant: but outside scope can't see inside the let 17:31 Lajla: and not things defined inside the let. 17:31 Hydrant: okay 17:32 (part) Slipyx: "Leaving" 17:32 Lajla: Yeah 17:32 Lajla: Like, if you use (let ((x ) (y )) ) 17:32 Lajla: the two bindings, x and y are said to be visible in 17:32 Lajla: But they are not visible in both 17:32 Lajla: So it doesn't allow for recursive definitions. 17:32 Hydrant: right 17:32 Hydrant: which is what let* is for 17:32 Hydrant: but why? 17:32 Hydrant: it seems to complicate the language 17:32 Lajla: Well, no, let* does not allow recursive definitions either 17:33 Hydrant: I thought let* would allow x to be visible to y, and y to be visible to x 17:33 Lajla: If you have (let* ((x ) (y )) ) then x is visible in , but not the reverse. 17:33 carleastlund: letrec makes them all visible to each other; let* makes them all visible below but not above themselves. 17:34 Lajla: No, (let* ((x ) (y )) ) is just sugar for (let ((x )) (let ((y )) )) 17:34 carleastlund: We have them all because some programs call for one, and some for the other. And they're essential for being able to write different kinds of macros. 17:34 Hydrant: okay.... does anyone else find it odd that there is let, let* and letrec rather than just the most powerful one being used as the norm ? 17:34 carleastlund: Hydrant, none of them are "most powerful". 17:34 tauntaun: Hydrant: you should not be thinking about let* and letrec until you master more basic things. 17:34 Hydrant: it would seem letrec would be best, because it appears to do the same as let* and let 17:35 Hydrant: what more basic things are there to master ? 17:35 carleastlund: You can write a let* with five different bindings of X, for instance, but not a let or letrec. You can build recursion with letrec, but not with let or let*. You can swap x and y's bindings with let, but not with let* and letrec. 17:35 Agari: It might be helpful to understand let in terms of an abstraction over lambda too. 17:35 tauntaun: Hydrant: exactly how are you teaching yourself Scheme? (Which book(s)?) 17:35 jonrafkind: i recommend not using let/let* or anything like that, just use define 17:35 Hydrant: tauntaun: a die-hard professor that believes the racket guide is the best way to learn ;-) 17:35 tauntaun: and the name of this professor is...? 17:36 Lajla: Hydrant, well, the point about letrec is that you some-times want to locally use the same name as you use one globally. 17:36 Agari: As in: (let ((x 20)) (* x x)) vs ((lambda (x) (* x x)) 20) 17:36 Lajla: For instance, say you have a variable the-list in your environment and you use (let ((the-list (cdr the-list)) ...) 17:36 Lajla: If you use letrec, this would fail. 17:36 (quit) mithos28: Quit: mithos28 17:37 Hydrant: so let will hide variables with new scope 17:37 carleastlund: I think the main answer, though, is that Racket has a huge amount of tools because sometimes, you need just the right tool for the job. 99% of the time? I use define for recursion at the top level of a module, and let* for pretty much all other bindings. I rarely use explicit let or letrec. Just because all the options are there, doesn't mean you should be using them all, all the time. 17:37 tauntaun: hide?? 17:38 tauntaun: Hydrant: it's simple. let creates bindings, roughly like declaring and defining local variables in C/C++ in a curly-braced block. 17:38 carleastlund: shadow 17:38 tauntaun: As for let* and letrec, don't think about them until you understand let thoroughly. 17:38 Lajla: That's a good thing to do for now yeah. 17:39 Lajla: Basically, you shouldn't use letrec or let* if you don't have a reason as they are more expensive. 17:39 tauntaun: Lajla: exactly how is let* more expensive than let? 17:39 carleastlund: Ex... expensive? 17:40 tauntaun: (let* just gets macro-rewritten into nested lets, as you probably know...) 17:40 Lajla: Yeah 17:40 Lajla: So you have two lets instead of one. 17:40 Lajla: Have to create two environments 17:40 carleastlund: Untrue. Neither let nor let* are primitive in Racket. 17:40 Lajla: don't know if the compiler optimizes for this. 17:40 tauntaun: carleastlund: yes, they in turn get macro-rewritten into lambda applications. 17:40 carleastlund: Please do not give out blanket advice on which macros to use based on unfounded assumptions about their expansion. 17:41 carleastlund: tauntaun: also false, neither's expansion involves lambda. 17:41 tauntaun: what? 17:41 Lajla: Yeah, but like, (let ((a b) (c d)) ...) becomes ((lambda (a c) ....) c d), which I reckon is cheaper than a double application 17:41 tauntaun: carleastlund: okay, I believe in Racket they expand to letrec* 17:41 carleastlund: Nope. 17:41 tauntaun: or let-values 17:41 carleastlund: Yes. 17:41 tauntaun: something like that 17:41 tauntaun: ok fine. 17:41 Lajla: And let-values is a primiive? 17:41 carleastlund: But more importantly? Don't give advice about "don't use this macro because of its expansion" as a programming tip. It's like the last thing one should ever worry about. 17:42 tauntaun: argh! I never did that! 17:42 eli: bremner: You can just mail me. (Or ask here, etc.) 17:42 tauntaun: Please read my words carefully. 17:42 carleastlund: It's like saying "don't drive that car because it has fuzzy dice in the window, the mass of which may hurt fuel economy". 17:42 carleastlund: You didn't. That part was to Lajla. 17:43 (quit) samth_: Ping timeout: 240 seconds 17:43 jonrafkind: bremner, i am at a loss for words as to 5.0.2 being rejected in debian 17:44 eli: 5.0.2 got rejected? 17:44 eli: Why? 17:45 jonrafkind: because of the licensing stuff that debian requires 17:45 jonrafkind: im just reading james vega's email 17:46 Hydrant: this might be a simple question... but I can't find it in the docs... what does _ represent ? I saw some code today like (lambda (_)...) 17:46 jonrafkind: its just a convention meaning 'i dont care about this argument' 17:46 Hydrant: as I recall ML has something like that to indicate "I don't care" 17:47 Hydrant: that expands to one argument, or many? 17:47 Fare: one 17:47 Hydrant: okay, thanks a lot :-) 17:47 Fare: unless it's (lambda _ ...) 17:47 carleastlund: It's a regular argument. You can use it just like x or whatever, but people tend to use _ when they aren't going to refer to it. 17:47 Hydrant: you're helping to fill in gaps in my mind from documentation and lectures ;-) 17:47 eli: jonrafkind: What was the licensing issue? 17:47 Hydrant: soon I will be a racket jedi ;-) 17:47 jonrafkind: no idea 17:48 jonrafkind: but i mean who cares.. we have a ppa 17:48 Fare: eli: maybe what I need is (1) a parser and (2) a system of tree rewrite rules 17:48 Lajla: carleastlund, that is true. 17:48 Lajla: I require copious amounts of spanking for my crimes. 17:48 Fare: (3) a pretty printer 17:49 Lajla: I still think using let* or letrec without a reason is some-what unhealthy. 17:49 carleastlund: I agree that sticking to one, most of the time, is a good idea. I prefer let*; I find myself needing it more often, and rarely do I need let in specific. 17:50 eli: jonrafkind: Well, it would be much more convenient if it was in the official repo. 17:50 eli: But I'm really annoyed at their whole thing with the licensing. 17:50 eli: They get really anal about it. 17:50 jonrafkind: yes 17:50 (quit) Fare: Quit: Leaving 17:51 jonrafkind: i think its appualing how close to their own specifications they adhere to, and the fact that they have such specifications at all 17:51 jonrafkind: it sounds like a complete waste of time to me 17:51 eli: They even had an issue in the past about us distributing R5RS -- I had to get an OK from from Will and Kent. (Clarifying that they really intend it to be public, or something like that.) 17:51 jonrafkind: lulz 17:52 Hydrant: Debian being anal about licensing is a very important thing... despite how annoying they can be 17:53 carleastlund: Yeah, hilarious that they insist on being careful about not violating the law, and getting explicit permission for intellectual property. Hilarious that they should not be intimately familiar with Scheme standards. 17:53 eli: Hydrant: It's important to get a completely free distro, but it's extremely annoying for a project like this where the project is obviously trying to do its best to be as open as possible. 17:53 carleastlund: How should it be obvious to them? 17:53 eli: The R5RS example was this sentence: "We intend this report to belong to the entire Scheme community, and so we grant permission to copy it in whole or in part without fee." 17:54 tauntaun: also in R6RS 17:54 carleastlund: If their concern is an ability to hold up in court, I can see why they'd want that clarified. The terms "entire Scheme community" seem shaky. 17:55 carleastlund: Also it says copy, and not (re)distribute. 17:55 tauntaun: ?? out of curiosity, where is the ambiguity in "entire Scheme community"? 17:55 eli: It is still annoying. 17:55 carleastlund: Do the debian package repository maintainers qualify as part of the Scheme community? 17:56 carleastlund: Is the permission granted to just the Scheme community, or to anyone? 17:56 carleastlund: etc., etc. 17:56 eli: bremner: Feel free to send licensing questions to carleastlund here who just volunteered by not being annoyed. 17:56 tauntaun: the *belonging* is to the entire Scheme community; the *copying* is for everyone. 17:56 carleastlund: eli, yes, I volunteer to not be annoyed by the questions. I also assert that I won't know any of the answers. 17:57 eli: In that case I reserve the right to be annoyed, and to be even more annoyed at spending more time when I'm expected to justify my "annoyement". 17:58 carleastlund: Pardon me. I inferred from your statement about annoyance that you thought they were unjustified in their practices. Apparently I was in error, and you meant no more than you said. 17:59 eli: Not more. People can be justified or think that they're justified or whatever. 18:00 eli: I could always raise the point of the difficulty of suing someone over something like the r5rs wording or any number of such similarly vague licenses, which gained a v2.0 as a result -- but that only contributes to the mess and forces me to spend more time on something that I really don't want to know anything about. 18:00 eli: (DWTFYW is a nice example of such a license.) 18:05 (nick) tauntaun -> tautaun_away_to_ 18:08 (join) MayDaniel 18:09 Hydrant: can someone suggest a good book or reference for learning about what exactly S-expressions are? None of my usual CS books seem to have it... a textbook on compilers maybe? 18:11 carleastlund: Hydrant, an s-expression is just something written with symbols (basically variable names) and parenthesis-delimited lists. So banana is an s-expression. (apple (banana (pear))) is an s-expression. (apple banana pear) is an s-expression. Depending on context, other elements like strings and numbers may be allowed. That's all there is to it. 18:11 samth: Hydrant, http://en.wikipedia.org/wiki/S-expression might be a useful reference 18:13 Hydrant: yah, I looked at wikipedia and it has no references and is completely unclear 18:14 Hydrant: parenthesis-delimited lists is all I need... thx 18:15 (join) kisom_dev 18:20 (quit) corruptmemory: Ping timeout: 240 seconds 18:21 (nick) tautaun_away_to_ -> tauntaun 18:22 (quit) Hydrant: Remote host closed the connection 18:23 (quit) mceier: Quit: leaving 18:27 tauntaun: Funny. Wikipedia says sexp stands for "symbolic expression" whereas I always thought it meant "syntax expression." I assume I was wrong the whole time... 18:34 (join) stamourv 18:34 (quit) stamourv: Remote host closed the connection 18:34 (join) stamourv 18:44 (join) samth_ 18:52 (quit) samth_: Ping timeout: 240 seconds 18:53 (nick) samth -> samth_away 19:04 (quit) jfalcon: Quit: jfalcon 19:05 (join) mithos28 19:06 (join) PLT_Notify 19:06 PLT_Notify: racket: master Kevin Tew * ad0c22a (1 files in 1 dirs): parallel-do refactor 19:06 PLT_Notify: racket: master Kevin Tew * bdbb9fe (1 files in 1 dirs): Parallel Places Build 19:06 PLT_Notify: racket: master commits 1cf98d3...bdbb9fe - http://bit.ly/eqZjhJ 19:06 (part) PLT_Notify 19:09 (join) jao 19:09 (quit) jao: Changing host 19:09 (join) jao 19:10 (quit) MayDaniel: Read error: Connection reset by peer 19:15 (quit) jao: Read error: Connection reset by peer 19:21 (quit) mithos28: Quit: mithos28 19:22 em: any plans to get racket into gentoo? 19:25 (quit) lucian: Remote host closed the connection 19:25 (quit) Agari: Quit: Quit 19:26 (join) lucian 19:28 jonrafkind: em, fwiw, plt scheme 4.2.2 is in there 19:29 jonrafkind: http://gpo.zugaina.org/dev-scheme/racket/Bugs seems you can use this overlay to get 5.0 19:30 Lajla: What does fwiw stand for? 19:30 Lajla: For what it's worth? 19:31 jonrafkind: yea 19:42 em: jonrafkind: is PLT Scheme 4.2.2 very similar to racket? 19:42 jonrafkind: its made by the same people, racket is the rename of plt scheme 19:42 jonrafkind: 4.2.2 is about a year old now 19:42 em: Yeah I know that, just wondered if Racket has changed much since then. 19:42 (join) mithos28 19:43 jonrafkind: 4.2.2 -> 5.0 is a minor change more or less, the major change is 5.0 -> 5.1 19:43 jonrafkind: it would have been nice for racket and the gui rewrite to happen in the same version change, but alas.. twas not to be 19:43 (quit) masm: Ping timeout: 255 seconds 19:44 jonrafkind: i guess the only real major changes in 4.2.2 -> 5.0 are name changes, #lang scheme -> #lang racket, and stuff like that. mzc -> raco 19:47 (quit) mithos28: Quit: mithos28 19:48 (join) masm 19:49 (join) mithos28 19:52 (quit) masm: Ping timeout: 240 seconds 20:01 (quit) carleastlund: Quit: carleastlund 20:02 (quit) mithos28: Quit: mithos28 20:04 (join) mithos28 20:13 (join) masm 20:16 (quit) mithos28: Quit: mithos28 20:32 (join) realitygrill 20:35 (quit) jonrafkind: Ping timeout: 276 seconds 20:53 (join) mithos28 20:55 (join) Hydrant 21:04 tauntaun: eli: sorry for the typo. 21:05 (quit) mithos28: Quit: mithos28 21:07 (quit) lucian: Remote host closed the connection 21:37 (quit) tauntaun: Quit: Ex-Chat 21:44 Hydrant: another question... how do I accumulate results as things get processed? 21:45 Hydrant: i.e. if I want to walk a tree, and perform actions recursively as I walk it (like XSLT) 21:45 Hydrant: do I just do string-append and pass around a result.... or just return the appending I guess.. or perhaps a global variable? 21:46 Hydrant: if there is a doc which better answers my question, feel free to let me know ;-) 21:46 (quit) realitygrill: Quit: realitygrill 22:04 (join) jfalcon 22:10 (quit) jfalcon: Quit: jfalcon 22:13 (quit) jmillikan: Remote host closed the connection 22:22 (join) realitygrill 22:23 (join) dnolen 22:29 Hydrant: I'm a bit confused on what the . operator actually does... the guide doesn't describe it well... any other references ? 22:30 Lajla: Hydrant, you mean (x . y) ? 22:30 Hydrant: yes 22:30 Lajla: reader notation for a pair, basically. 22:31 Lajla: It just happens that (x y z) is actually (x . (y . (z . ()))) in disguise 22:31 Hydrant: (+ 1 . (2)) this in particular confuses me 22:31 Lajla: THis is how lists are built up. 22:31 Lajla: Same as (+ 1 2) 22:31 Hydrant: okay 22:31 Lajla: Hydrant, are you familar with the structure of linked lists? 22:31 Hydrant: '(0 1 . 2) 22:31 Hydrant: that doens't make sense to me though 22:32 Hydrant: yes, I'm an experienced C++ guru... just new to racket ;-) 22:32 Lajla: Well, that is just a shorthant for '(0 . (1 . 2)) 22:32 Lajla: Ahhh 22:32 (join) jfalcon 22:32 Lajla: Well, (1 2 3 4) is a linked list. 22:32 Lajla: So it's just a nice sugar for (1 . (2 . (3 . (4 . ())))) 22:32 Hydrant: the guide shows: (cons 0 (cons 1 2)) giving '(0 1 . 2) which I can't parse 22:32 Hydrant: it says this is not a list 22:32 Lajla: And (x y . z) is just for (x . (y . z)) (called an 'improper list') 22:32 Hydrant: right 22:33 Hydrant: which, interpreting as linked lists means no NULL terminator ? 22:33 Lajla: Yeah 22:33 Lajla: You generally want that 22:33 Hydrant: why no segfault then 22:33 Lajla: So you want to do (cons 0 (cons 1 (cons 2 '())))) basically. 22:33 Lajla: Because you can create improper lists. 22:33 Lajla: Also, racket won't really segfault on you. 22:34 Hydrant: right, but the underlying question was addressing the linked list metaphore 22:34 Hydrant: which means there is other info than just the linked lsit 22:34 Hydrant: ahh... can't type 22:34 bremner: Hydrant: (cons a b) makes a pair 22:34 bremner: Hydrant: if b is a list, so is (cons a b) 22:34 Lajla: Hydrant, well, racket has a latent type system. 22:35 Lajla: So it will only cry when you pass an improper list to a function which expects a proper one. 22:35 Hydrant: such a strange world 22:35 Lajla: rudybot, (map sqrt '(1 2 3 4 . 5)) 22:35 rudybot: Lajla: error: map: expects type as 2nd argument, given: (1 2 3 4 . 5); other arguments were: # 22:35 Hydrant: can I think of . as "list append" ? 22:36 Lajla: rudybot, (if #f (map sqrt '(1 2 3 4 . 5)) "everything went okay") 22:36 rudybot: Lajla: ; Value: "everything went okay" 22:36 Lajla: Hydrant, cons? 22:36 Hydrant: . is cons 22:36 Lajla: Ehhh, yes and no I suppose. 22:36 Lajla: rudybot, (1 . 2) 22:36 rudybot: Lajla: error: eval:1:0: application: bad syntax in: (1 . 2) 22:36 Lajla: rudybot, (cons 1 2) 22:36 rudybot: Lajla: ; Value: (1 . 2) 22:37 (quit) jfalcon: Quit: jfalcon 22:39 Hydrant: umm... can I just safely ignore the . until I get more advanced? 22:40 Hydrant: I seem to get more confused the deeper I try to understand things 22:41 Lajla: Depends on what you call 'advanced' 22:41 Lajla: It's not an operator by the way. 22:41 Lajla: (x . y) is a pair of two values. 22:41 Lajla: A list is just a nesting of pairs terminated with () 22:41 Lajla: Which you can look at like null. 22:42 Hydrant: okay... so a pair of lists would look like '(1, 2, 3) . '(4, 5, 6) ? 22:42 Lajla: Now where did you get that comma. 22:43 Lajla: And it would look like ((1 2 3) . (4 5 6)) 22:43 Hydrant: habit :-) 22:43 Lajla: brackets cannot be dropped or added. 22:43 Lajla: x is different from (x) 22:43 Lajla: x is just ... x, (x) is a list containing only x. 22:43 Hydrant: right... (x) executes x whereas x is the value right 22:43 Hydrant: oh 22:43 Lajla: Well (x) is a call to x with no arguments considered as code. 22:44 Lajla: Hydrant, have you seen the term 'homo-iconic' come by? 22:44 Lajla: Or 'code as data'? 22:44 Hydrant: code as data yes 22:44 Hydrant: homo-iconic no 22:44 Lajla: Well, the latter is just fancy schmancy greek for same. 22:44 Lajla: But as data (x) is a list containing a symbol x. 22:44 Lajla: As code, it's a function call to the function stored in the variable x with no arguments. 22:45 Lajla: as code (x . y) is nothing, it's an error. 22:45 Lajla: As data, it's a pair. 22:45 bremner: (let ((y empty)) (x.y)) 22:46 Lajla: rudybot, (let ((y empty)) (x.y)) 22:46 rudybot: Lajla: error: reference to undefined identifier: x.y 22:46 Hydrant: so racket requires runtime analysis to determine if something is data or code, and the operations differ depending upon runtime types right ? 22:46 Lajla: rudybot, (let ((y empty)) (x . y)) 22:46 rudybot: Lajla: error: eval:1:17: application: bad syntax in: (x . y) 22:47 Lajla: Hydrant, no, not really. 22:47 Lajla: code is data 22:47 Lajla: It's just a data structure you give to your compiler and say 'compile this, mofo' 22:47 Lajla: You could see it like a description of a computer program encoded in some complex data structure. 22:48 bremner: parse trees, basically 22:48 Lajla: Like, (+ 1 2 3) this is a list of 1 symbol and 3 numbers as data 22:48 Lajla: If you give this to your implementation, it will read it and consider it a program that adds 3 numbers 22:48 Lajla: Yeah 22:48 Lajla: you basically enter your parse tree manually 22:48 Lajla: you could see it like that 22:48 Hydrant: the object I get back after compiling is callable though, right 22:49 Hydrant: so I would imagine there are different supported characteristics 22:49 Hydrant: whereas data is not callable 22:50 Lajla: Well, you basically enter a data structure in your compiler which describes a program 22:50 Lajla: and it then compiles the program it describes. 22:50 Lajla: You can also give the same data structure as data, as argument to anoher program. 22:50 Lajla: Which then analyses it and does stuff with it. 22:51 Lajla: Like, compiles it, perhaps? =P 22:53 Hydrant: how do I differentiate between the types 22:53 Hydrant: if x is callable... (x) is a call right 22:53 Hydrant: but you've also said (x) is a list if it's just data 22:53 bremner: contex 22:53 Hydrant: so this implies to me that racket 'knows' that it is data 22:53 bremner: t 22:54 Hydrant: okay 22:54 Hydrant: so I could just do ('(1 2)) and it knows "this guy is a n00b" 22:54 Hydrant: whereas (x) it has to figure out an assignment to x and it could be either 22:54 bremner: nothing so complex. 22:55 bremner: Hydrant: I suggest you go through a few simple tutorials, the philosphical things will be less puzzling then 22:55 Lajla: Hydrant, well, let's have this (let ((x (list 1 2 3)) (x)) 22:56 Lajla: rudybot, (let ((x (list 1 2 3)) (x)) 22:56 rudybot: Lajla: error: eval:1:0: read: expected a `)' to close `(' 22:56 Hydrant: yah, I'll go back to my tutorials... the . was very unclear to me which is where I got stuck 22:56 Lajla: rudybot, (let ((x (list 1 2 3)) (x))) 22:56 rudybot: Lajla: error: eval:1:0: let: bad syntax in: (let ((x (list 1 2 3)) (x))) 22:56 Lajla: rudybot, (let ((x (list 1 2 3))) (x)) 22:56 rudybot: Lajla: error: procedure application: expected procedure, given: (1 2 3) (no arguments) 22:56 Lajla: 'm usually very good at this. 22:56 Lajla: Anyway, x housed a list 22:56 Lajla: I tried to call it with no arguments 22:56 Lajla: error. 22:56 Lajla: Scheme is a 'lisp-1' as they call it, functions and values share the same namespace. 22:57 Lajla: Basically, functions are 'callable values' that are stored in variables like any other values. 22:57 bremner: rudybot, (let ((x (list 1 2 3)) x) 22:57 rudybot: bremner: (defun largest-width-in-region (start end) (interactive "_r") (save-excursion (goto-char start) (let ((column (loop while (< (point) end) maximize (- (point-at-eol) (point-at-bol)) do (forward-line 1)))) (message "Largest column is %s" column) column))) 22:57 Lajla: a variable can contain a number like 3 in one place, and a function in another place. 22:57 Lajla: wth is that. 22:57 Lajla: You missed a parentheses too. 22:58 Lajla: Hydrant, there is very little static typing going on. 22:58 Lajla: Like, you can have like (+ 3 x) where x depending on runtime info is a list or a number 22:58 Hydrant: right, I would expect it to be fully dynamic typing 22:58 Lajla: if it's a list, you've done something wrong. 23:01 Lajla: Hydrant, but basically, procedures are callable values, that's the idea, if you try to call a value that is not callable, that's a runtime error, a variable can contain a callable or uncalalble value depending on runtime information. 23:01 Lajla: You can like do (set! + 3) 23:01 Hydrant: right, Python is similar 23:01 Lajla: You've suddenly made the variable + no longer house the addition function but the number 3. 23:01 Lajla: Yeah 23:01 Lajla: But they so stole it from Scheme. 23:01 Lajla: Scheme already did this in like 1980 23:01 Hydrant: I don't think much CS isn't stolen from somewhere 23:02 Lajla: Yeah 23:02 Lajla: good thing 23:02 Lajla: like, if it was chemistry 23:02 Lajla: They would have gotten a patent on it or soemthing. 23:02 Hydrant: umm 23:02 Hydrant: all software concepts are patented now 23:03 Hydrant: even "efficiently solving NP complete problems, perhaps by approximation" is patented 23:03 Lajla: Wat 23:03 Hydrant: P=NP, P!=NP... either way, we got the patent baby 23:03 Hydrant: yah 23:03 Lajla: I'm pretty sure that you cannot patent algorithms in the EU at the least. 23:03 Lajla: You cannot patent mathematical discoveries here. 23:03 Hydrant: sure, but computers aren't math 23:03 Hydrant: not according to the local computer guy 23:03 Lajla: The point about patent is that you can only patent things you could otherwise keep a secret. 23:04 Lajla: The pointa bout a patent is that you are granted a monopoly in exchange for revealing your technique. 23:04 Lajla: Thus you cannot patent mathematical discoveries, as they are generally useless if you don't reveal them at all. 23:05 Hydrant: well, what about "single-click purchase" 23:05 Hydrant: does that deserve a patent? 23:06 Hydrant: http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&p=1&u=%2Fnetahtml%2FPTO%2Fsearch-bool.html&r=10&f=G&l=50&co1=AND&d=PTXT&s1=20101228.PD.&s2=%28PA.INST.%29&OS=ISD/12/28/2010+AND+IS/PA&RS=ISD/12/28/2010+AND+IS/PA 23:06 rudybot: http://tinyurl.com/4t9dff3 23:29 (join) Senjai 23:37 (quit) masm: Ping timeout: 240 seconds