00:03 (join) dnolen 00:09 (quit) spike2251: Ping timeout: 244 seconds 00:13 (quit) dnolen: Ping timeout: 248 seconds 00:29 (quit) EmmanuelOga: Ping timeout: 244 seconds 01:29 (join) realitygrill 02:02 (quit) freakazoid: Quit: Computer has gone to sleep. 02:08 (join) veer 02:14 (quit) realitygrill: Remote host closed the connection 02:14 (join) realitygrill 02:32 (quit) yoklov: Quit: Leaving. 02:39 (quit) veer: Read error: Connection reset by peer 03:10 (quit) jonrafkind: Ping timeout: 252 seconds 03:13 (quit) realitygrill: Quit: realitygrill 03:23 (quit) tfb: Quit: gone 03:27 (quit) mithos28: Quit: mithos28 03:30 (join) Blkt 03:35 Blkt: good morning everyone 03:35 Blkt: (yes, it is a /amsg, but I love to greet everyone) 03:36 (join) karswell 03:42 (quit) Shviller: Read error: Connection reset by peer 03:42 (join) Shviller 04:20 (join) sindoc 04:31 (join) ahinki 04:43 (join) Demosthenes 04:43 (quit) sethalves: Ping timeout: 252 seconds 04:46 (join) sethalves 04:47 (quit) Demosthenes: Read error: Connection reset by peer 04:48 (join) Demosthenes 05:15 (join) masm 05:58 (quit) ahinki: Ping timeout: 252 seconds 06:03 (join) ahinki 06:08 (quit) ahinki: Ping timeout: 252 seconds 06:09 (join) ahinki 06:11 (quit) Demosthenes: Ping timeout: 255 seconds 06:12 (join) Demosthenes 06:24 (quit) SeanTAllen: Remote host closed the connection 06:42 (join) SeanTAllen 06:44 (join) ahinki_ 06:47 (quit) ahinki: Ping timeout: 252 seconds 06:47 (nick) ahinki_ -> ahinki 06:47 (quit) karswell: Ping timeout: 252 seconds 06:48 (join) karswell 07:09 (nick) chaozzbubi -> ChaozZBubi 07:11 (quit) Demosthenes: Read error: Connection reset by peer 07:12 (join) Demosthenes 07:29 (quit) karswell: Ping timeout: 255 seconds 07:32 (quit) ahinki: Ping timeout: 252 seconds 07:38 (join) ahinki 07:43 (nick) ChaozZBubi -> chaozzbubi 08:07 (join) karswell 08:14 (quit) karswell: Ping timeout: 252 seconds 08:30 (nick) chaozzbubi -> ChaozZBubi 08:31 (quit) sethalves: Quit: ERC Version 5.1.4 (IRC client for Emacs) 08:33 (join) veer 08:38 (join) sethalves 08:48 (quit) Demosthenes: Ping timeout: 240 seconds 09:11 (join) ahinki_ 09:13 (quit) ahinki: Ping timeout: 252 seconds 09:13 (nick) ahinki_ -> ahinki 09:14 (nick) sethalves -> sethAway 09:20 (join) dnolen 09:20 (quit) dnolen: Client Quit 09:21 (join) metadave 09:27 (join) EmmanuelOga 09:36 (part) metadave: "Leaving" 09:37 (nick) ChaozZBubi -> chaozzbubi 10:14 (join) shadgregory 10:23 (quit) ahinki: Ping timeout: 252 seconds 10:25 (quit) shadgregory: Quit: leaving 10:39 (join) leandrosansilva 10:44 (nick) Nanakhiel -> Qaxz 10:49 (join) freakazoid 11:13 (nick) sethAway -> sethalves 11:13 (quit) freakazoid: Quit: Computer has gone to sleep. 11:16 tauntaun: Whatever happened to that syntactic sugar that lets you define a function in let/letrec without having to write "lambda" explicitly? I don't see it in the Reference. 11:17 danking: tauntaun: local? 11:18 danking: tauntaun: (local [(define (fact n) (if (zero? n) 1 (* n (fact (sub1 n)))))] ...) 11:19 (join) freakazoid 11:19 tauntaun: danking: 'local' will do, but it's not as terse as the sugar I'm recalling. 11:20 danking: tauntaun: hmm. I don't know then. 11:21 (join) yoklov 11:25 (join) RPR 11:48 (nick) chaozzbubi -> ChaozZBubi 11:49 (quit) veer: Remote host closed the connection 11:56 (quit) freakazoid: Quit: Computer has gone to sleep. 11:59 (join) malkomalko 11:59 (quit) masm: Ping timeout: 268 seconds 12:02 (join) shadgregory 12:04 (join) karswell 12:11 (quit) Blkt: Quit: ERC Version 5.3 (IRC client for Emacs) 12:27 asumu: tauntaun: Do you mean the let loop style? 12:28 asumu: rudybot: eval (let loop ([x 5]) (if (zero? x) (0) (cons x (loop (- x 1))))) 12:28 rudybot: asumu: your sandbox is ready 12:28 rudybot: asumu: error: procedure application: expected procedure, given: 0 (no arguments) 12:29 asumu: rudybot: eval (let loop ([x 5]) (if (zero? x) '(0) (cons x (loop (- x 1))))) 12:29 rudybot: asumu: ; Value: (5 4 3 2 1 0) 12:40 (join) mithos28 12:49 (join) masm 12:50 tauntaun: asumu: no, I'm not talking about named let. 12:51 tauntaun: The syntax I'm recalling was available in PLT Scheme about 14 years ago. Was just wondering if it's still around. 12:55 (quit) mithos28: Quit: mithos28 13:20 (join) freakazoid 13:29 (join) shofetim 13:29 shofetim: is there a list of latex dependancies for scribble anywhere? scribble --pdf is dying and it looks like latex can't find everything it wants... 13:33 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/pKI62Q 13:33 RacketCommitBot: [racket/master] fix for `scribble --text' and tables - Matthew Flatt 13:33 RacketCommitBot: [racket/master] int -> intptr_t fixes - Matthew Flatt 13:33 RacketCommitBot: [racket/master] win64: fix JIT SSE-based FP - Matthew Flatt 13:35 (part) sindoc 13:52 (quit) leandrosansilva: Read error: Connection reset by peer 14:08 offby1: eli, or whoever's responsible: it is a real pleasure to use the racket documentation on the web; it's so fast -- even searching -- that I don't feel the need to use the local pages. 14:12 (quit) Oxryly: 14:16 (join) Oxryly 14:18 bremner: yeah, that is nice. 14:18 (join) jonrafkind 14:28 offby1: hmm, with gracket-text, I just evaluated (plot), and got back a #(struct:object:image-snip% ...). How do I render that? 14:33 yoklov: they have a "draw" function which can take a dc. (also i think drracket will automatically draw them as output) 14:34 yoklov: http://docs.racket-lang.org/gui/snip_.html?q=image-snip#(meth._(((lib._racket/snip..rkt)._snip~25)._draw)) ? 14:38 yoklov: is that what you mean? 14:45 (quit) yoklov: Quit: Page closed 14:46 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/TN7IcA 14:46 RacketCommitBot: [racket/master] Fixes and improvements to `net/unihead'. - Eli Barzilay 14:46 RacketCommitBot: [racket/master] More fixes and improvements to `net/unihead'. - Eli Barzilay 14:47 eli: offby1: But you've used it for a ton of time now... 14:59 (join) JoelMcCracken 15:17 Oxryly: eli: (define enum-test (_enum '(a b c d))) 15:17 Oxryly: eli: how do I write an expression to get the value of a (or b or c ....)? 15:21 jonrafkind: you want a bitmask I think 15:21 jonrafkind: and then you can (arith-or) them 15:21 jonrafkind: enums are meant to be mutally exclusive 15:22 Oxryly: heh, my question is more basic. the value of a is zero, how do I access that? 15:22 jonrafkind: what do you mean 'access it' 15:23 jonrafkind: you want to get the value of an enum? 15:23 (join) anRch 15:23 Oxryly: jonrafkind: yes 15:24 jonrafkind: well.. you should never need it 15:24 jonrafkind: what do you need it for? 15:24 Oxryly: jonrafkind: I'm connecting to an API that's returning an enum type and I need to check its value 15:25 jonrafkind: C makes no distinction between enum and bitmasks, so people abuse enum and put bitmasks in there, but you have that ability in racket 15:25 jonrafkind: if it was truly an enum then you wouldn't need the value since there would only be one value for any enum 15:26 jonrafkind: but you are saying the API returns 0x1 | 0x4000 or something and you want to check for each of those values, right? 15:26 Oxryly: jonrafkind: yes... by referring to the names I've typed out defining the enum type 15:26 jonrafkind: but im saying you can use a bitmask instead of an enum to accomplish this 15:27 jonrafkind: just change _enum to _bitmask 15:27 Oxryly: jonrafkind: no, I have a foreign function that is returning a value of type enum-test (as I defined above). I'd like to see if that value equals a, b, c, or d. I just don't know the syntax to do that 15:28 jonrafkind: (case (some-ffi-function) [(a) ...] [(b) ...]) ...) 15:28 Oxryly: oh 15:28 jonrafkind: you will get a symbol out of it so you can call (member (some-ffi-function) '(a b c)) too 15:28 Oxryly: oh the ffi turns the value into a symbol! i see 15:29 Oxryly: I thought I could type something like enum-test-a and it would yield 0 15:30 (quit) RPR: Read error: Operation timed out 15:31 (join) RPR 15:32 jonrafkind: thats a good question I think, how to get the actual value of an enum 15:33 jonrafkind: probably a function should be added to the ffi 15:34 Oxryly: well I believe the symbol approach will work well for my purposes 15:36 (join) yoklov 15:36 jonrafkind: yea, its worked for me too. i havent needed to convert an enum to a number in racket yet 15:38 (quit) RPR: Ping timeout: 240 seconds 15:44 (join) MayDaniel 15:50 (quit) karswell: Read error: Operation timed out 16:01 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/A69DpQ 16:01 RacketCommitBot: [racket/master] mysterx: fix private/mxmain hack to avoid cross-module optimization - Matthew Flatt 16:05 offby1: eli: sure, I've used it for a ton of time. But better late than never 16:05 offby1: yoklov: I haven't read the doc you pointed me to (too busy) but if it "takes a DC", it's probably not what I want, since I don't know what a DC is nor how to get one. 16:08 yoklov: oh 16:09 yoklov: how would you like to render it? 16:09 yoklov: to an image? 16:09 yoklov: dc=drawing context (i think) 16:13 (join) dyoo 16:13 yoklov: regardless, (send (send an-image-snip get-bitmap) save-file "an-image-snip.png" 'png) would save it to a file 16:16 yoklov: if you just want to look at it your best bet is using drracket as it automatically displays image snips. 16:20 (quit) dyoo: Ping timeout: 240 seconds 16:28 (quit) EmmanuelOga: Ping timeout: 244 seconds 16:32 yoklov: or if you want it to be in an window you can do it like this https://gist.github.com/1507796 16:37 (quit) JoelMcCracken: Ping timeout: 252 seconds 17:04 (nick) ChaozZBubi -> chaozzbubi 17:07 (quit) shofetim: Read error: Connection reset by peer 17:16 eli: offby1: :) 17:17 eli: Oxryly: Using _enum means that you send out these symbols and you receive the symbols back -- the ffi is taking care to translate input symbols to numbers, and translate output numbers to symbols for you. 17:22 (quit) malkomalko: Remote host closed the connection 17:23 (quit) MayDaniel: Read error: Connection reset by peer 17:30 tonyg: I find myself requiring both racket/set and racket/match. I should clearly first require racket/game. 17:31 jao: tonyg, :) 17:36 (join) RPR 17:49 Oxryly: eli: got it... thanks! 18:06 (quit) anRch: Quit: anRch 18:24 (join) AlbireoX 18:24 Qaxz: offby1, do you still love me? 18:24 AlbireoX: Hey 18:24 AlbireoX: what's so good about racket? 18:25 Qaxz: Euhhrr 18:25 yoklov: haha, compared to what? 18:25 Qaxz: It has batteries included some would say. 18:25 yoklov: ^ 18:25 Qaxz: Compared to cake, it doesn't ruin your teeth. 18:25 Qaxz: Compared to women, it never menstruates 18:25 Qaxz: compared to men, it doesn't become a total jerk all off the sudden 18:26 Qaxz: compared to US head of states, it doesn't start wars for vaguely inexplicable reasons 18:26 Qaxz: So yeah 18:26 Qaxz: good stuff there 18:27 (quit) shadgregory: Quit: leaving 18:27 jonrafkind: AlbireoX, it has an extensive macro system 18:27 yoklov: seriously though, it's a really great programming language with a really full and diverse standard library 18:28 Qaxz: You mean 'library', there is no 'standard' libarry since it has only one implementation 18:28 yoklov: yup, that's what i mean then 18:28 Qaxz: Not to mention the macro system is hygienic 18:28 Qaxz: so even better for your teeth. 18:32 (join) realitygrill 18:33 (join) jeapostrophe 18:35 (quit) jeapostrophe: Client Quit 18:35 (join) jeapostrophe 18:37 (join) realitygrill_ 18:37 (quit) realitygrill: Read error: Connection reset by peer 18:37 (nick) realitygrill_ -> realitygrill 18:42 (quit) realitygrill: Ping timeout: 276 seconds 18:48 (join) malkomalko 18:53 (quit) jeapostrophe: Quit: leaving 19:13 (quit) acarrico: Ping timeout: 252 seconds 19:27 (quit) masm: Quit: Leaving. 19:31 asumu: AlbireoX: You can program in functional or OO (or ...) style in Racket. 19:31 asumu: And using macros you can turn it into whatever language you want (mostly). 19:39 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/XRS5sA 19:39 RacketCommitBot: [racket/master] remove libfit - Matthew Flatt 19:39 RacketCommitBot: [racket/master] slight modernization of the Slideshow tutorial - Matthew Flatt 19:39 RacketCommitBot: [racket/master] src/README corrections (of out-of-date information) - Matthew Flatt 19:49 yoklov: you can't have a first class, er, method, can you? 19:50 yoklov: i guess the term would probably be first class message 19:51 AlbireoX: So why is RAcket better than Python? 19:51 yoklov: more to learn in racket 19:52 yoklov: also its a lisp :P 19:53 (join) sindoc 19:55 yoklov: seriously though AlbireoX, why one programming language is better than another is a hard to say, and the answer is really subjective. 19:56 yoklov: if you value syntactic extensibility in your language, you might prefer racket over python 19:56 yoklov: however if you value the overall readability of the expressions, you might prefer python over racket 19:58 yoklov: those are just examples, but you get my point. 20:01 (join) karswell 20:03 (part) sindoc 20:05 tauntaun: Doesn't Python restrict the length of lambda expressions to one line? 20:05 asumu: yoklov: What do you mean by first class message? 20:06 asumu: (local member names might fit the bill depending on what you mean) 20:06 asumu: rudybot: doc define-local-member-name 20:06 rudybot: asumu: http://docs.racket-lang.org/reference/createclass.html#(form._((lib._racket%2Fprivate%2Fclass-internal..rkt)._define-local-member-name)) 20:06 asumu: yoklov: ^ 20:06 tauntaun: yoklov: I'm afraid the answer is not as subjective as all that. 20:07 asumu: AlbireoX: In many people's opinions, Racket has fewer bad design choices than Python. More uniformity. 20:07 asumu: Also, it is extensible so you can fix Racket's warts if you so feel. 20:07 asumu: However, there's no objective answer here. 20:07 tauntaun: ?! 20:07 tauntaun: Excuse me, but it seems to me that Python is *objectively* inferior to Racket. 20:10 bremner: unless you really hate parentheses 20:10 (quit) karswell: Ping timeout: 240 seconds 20:10 asumu: I do think Racket is superior to Python, but I think it depends on what you value. 20:11 asumu: (also, this is a fascinating discussion but I have to go eat dinner so BBL) 20:12 tauntaun: asumu & bremner: it seems to me that the putative "inconvenience" of parentheses is insignificant when compared to the constant silliness of Python's colons, elifs, etc. 20:12 yoklov: parentheses suck when you have to write mathematical expressions. 20:12 yoklov: that is when writing in a lisp is… 20:12 yoklov: less awesome :( 20:12 offby1: it seems to me that dinner is *objectively* superior to all programming languages 20:12 tauntaun: yoklov: and since when is Python used as a substitute for matlab? 20:13 asumu: yoklov: you could write reader syntax for that if it hasn't already. :) 20:13 bremner: since sage/scipy/etc.. 20:13 tauntaun: asumu: you keep stressing the extensibility of the parser and the syntax. But why? 20:13 yoklov: er, at the end of the day you're gonna have to do math in any programming language you choose if you use it long enough 20:13 tauntaun: Racket is *already* superior. 20:14 tauntaun: (and with Racket I include other Schemes and maybe also CL.) 20:14 chandler writes fully parenthesized expressions in any language 20:14 yoklov: I agree, but you have to /learn/ racket before you can extend the reader syntax to be more friendly 20:14 yoklov: by then you dont care 20:15 bremner: syntax wise, I think a more interesting comparison is Haskell, where they really thought about what the syntax should be. 20:15 tauntaun: yoklov: your comment about math is misleading. None of these languages is commonly used for heavy-duty numerical work. 20:15 yoklov: right 20:15 yoklov: but 20:15 yoklov: this is from real code i've written: 20:15 yoklov: (lerp (fl+ y-center (fl* (fl/ (fl* (fl- 0.5 cz) 2.0) z0) fov)) 20:15 yoklov: (fl+ y-center (fl* (fl/ (fl* (fl- 0.5 cz) 2.0) z1) fov)) 20:16 bremner: tauntaun: I know several working mathematicians who exclusively use python. Math != numbers 20:16 yoklov: that just sucks. 20:16 tauntaun: bremner: I love Haskell; it's the only language I know who's syntax is arguably (only arguably) better than those of the Lisps. 20:16 bremner: err, numerics 20:16 jonrafkind: people who like prefix syntax suffer from stockholm syndrome 20:16 yoklov: lol 20:17 yoklov: honestly i love writing in lisp, but i think of the syntax as a tradeoff 20:17 jonrafkind: hopefully honu will make you feel better about it 20:17 yoklov: you write the abstract syntax tree directly 20:17 jonrafkind: its racket just with better syntax 20:17 yoklov: and you get the benefits of that 20:17 bremner: I think PLAI explains the lisp position well; something along the lines of, "in this book, we are not very interested in concrete syntax, but very interested in abstract syntax" 20:18 tauntaun: yoklov: well perhaps you might profit from more extensive use of cut & curry? 20:19 offby1 notices the little stick figured in the lower-right of drracket ... after he's been running a few minutes he starts to sweat 20:19 tauntaun: Before anyone fusses about Scheme's concrete syntax, they should take a hard look at those of Python, Ruby, etc. 20:19 offby1: *figure 20:20 yoklov: python and ruby look like pseudocode. that makes them really attractive to people 20:21 tauntaun: yoklov: Yes, and the concrete syntax of pseudocode is attractive to flies, being something akin to a piece of shit. 20:21 yoklov: lol 20:21 bremner: ok, now you're just being silly/defensive 20:21 yoklov: i'm don't disagree entirely 20:22 yoklov: i just think that prefix notation can be a bit... 20:22 tauntaun: bremner: silly/defensive is a bit wide of the mark. I am *bitter*. 20:22 bremner: about what? that no-one loves scheme? 20:22 tauntaun: Yes! 20:22 chandler: yoklov: your messy expression would look better without the "fl" operators. 20:23 yoklov: right 20:23 AlbireoX: tauntaun: how are colons sillier than ()()() 20:23 yoklov: i did just copy it right out of existing code though. 20:23 tauntaun: That my students have already heard of crap languages like Ruby and then ask me why we're not studying *that*. 20:23 yoklov: AlbireoX: the parentheses allow you to see what your code is really doing 20:23 AlbireoX: So do the : 20:23 yoklov: not really 20:23 tauntaun: AlbireoX: exactly what is that, anyway? 20:23 yoklov: you have to have significant whitespace 20:23 AlbireoX: Because everything is indented 20:23 yoklov: and the whitespace… sometimes its not clear 20:24 yoklov: indentation doesn't matter at all in racket or lisps 20:24 AlbireoX: when is whitespace not clear 20:24 yoklov: its not clear if you are writing code 20:24 AlbireoX: Yeah, but the indentation allows you to see your code 20:24 yoklov: which writes code 20:24 AlbireoX: How so? 20:24 tauntaun: AlbireoX: you haven't answered my question. Where did you cook up ()()() from? 20:24 AlbireoX: tauntaun: Experience with racket 20:24 AlbireoX: I'm just saying it uses a lot of parentheses 20:24 tauntaun: AlbireoX: please supply a context. 20:25 tauntaun: ()()() is itself not an expression; just three in a row. 20:25 tauntaun: Where did you find this code? 20:25 yoklov: don't be a jerk 20:25 AlbireoX: -_- 20:26 AlbireoX: I'm just saying it uses a lot of parentheses 20:26 yoklov: it does. 20:26 yoklov: there is actually a benefit to that though. 20:26 AlbireoX: (blah (blah))[(blah)] 20:26 AlbireoX: How is that a benefit? 20:26 yoklov: it is not a benefit in and of itself 20:26 yoklov: but 20:26 yoklov: it allows you to perform really incredible metaprogramming 20:26 chandler: AlbireoX: Parens and significant whitespace are actually quite similar. If you are used to indentation signifying blocks of code, then you can quickly eyeball a program and see its structure. Similarly, if you're used to s-expressions, you see past the parens and read the abstract syntax of the program. 20:27 tauntaun: AlbirreoX: because it's better than if ( blah ): then blah(blah) else: blah 20:27 tauntaun: (or whatever) 20:27 AlbireoX: tauntaun: how so? 20:27 tauntaun: Guess which one's terser? 20:27 tauntaun: og 20:27 AlbireoX: python is less terse 20:27 tauntaun: Exactly. 20:27 AlbireoX: i mean 20:27 AlbireoX: less words 20:27 chandler: Significant whitespace seems intuitive if you're used to the common indentation style used in languages like C and JavaScript. But it wouldn't have been so intuitive to me when I was starting programming, because nobody used indentation in Applesoft BASIC. 20:28 chandler: (well, I'm sure *somebody* did, but it wasn't me!) 20:28 AlbireoX: Ok, so let's say you have a 1000 line program in python 20:28 tauntaun: ...yes? 20:28 AlbireoX: Since you guys don't think whitespace matters, it'd be 200 in racket 20:28 AlbireoX: Could you really read that racket better? 20:28 tauntaun: Of *course* 20:28 chandler: Lines aren't really a good measure of anything. 20:28 yoklov: ^ 20:29 AlbireoX: (define (divideByZero num1 num2)(if (= num2 0) "Infinity and beyond." (/ num1 num2)) 20:29 tauntaun: Btw, whitespace and indentation do matter to good Scheme style. 20:29 AlbireoX: tauntaun: so why not use Python 20:29 AlbireoX: if you're indenting anyway 20:29 chandler: And it might not be 200 lines of Racket. It might be 1500 lines of Racket. Nobody outside of the very passionate set of language warriors on the internet cares. 20:29 yoklov: the parentheses just help remove any ambiguity 20:29 AlbireoX: One : vs 3 ( if () 20:29 AlbireoX: How is indentation ambiguous at all? 20:30 tauntaun: AlbireoX: we're just going around in circles now. The Python equivalent of what you wrote takes longer to read and longer to write. 20:30 AlbireoX: longer to read? 20:30 AlbireoX: how? 20:30 bremner: anyway if terseness is your main issue, apl, haskell and probably ten other languages are terser than both python and racket 20:31 tauntaun: Because you're eye has to scan and parse silly keywords like 'then' and 'else' and even sillier colons, and the whole thing has to be laid out on more lines than is necessary. I feel like I'm repeating myself. :-( 20:31 yoklov: the parentheses make it syntactically pure 20:31 bremner: terseness doesn't matter until you lose it completely and get java 20:31 tauntaun: you're -> your 20:31 AlbireoX: "then" and "else" aren't silly 20:31 AlbireoX: they're readable 20:31 bremner: tauntaun: thank you for that important point. 20:31 yoklov: yeah, but they dont really mean anything. 20:32 yoklov: lisps express exactly the same thing without those 20:32 tauntaun: AlbireoX: Best of luck! Happy Holidays! :-) 20:32 yoklov: just using parentehses to indicate the structure 20:32 AlbireoX: luck? 20:32 AlbireoX: They mean the same thing 20:32 AlbireoX: they're just more readable 20:33 AlbireoX: and you still need ( if () 20:33 AlbireoX: vs if blah: 20:33 chandler: It's not more readable or less readable. It's just different. 20:33 bremner: AlbireoX: you're not going to convert anyone here to python. Most of us already know python 20:34 AlbireoX: But you're adding extra symbols with Racket 20:34 AlbireoX: ( if () = 3 20:34 AlbireoX: if : = 1 20:34 bremner: ok, either say something interesting, or I'm out of this conversation. 20:35 AlbireoX: I'm saying, why use Racket when you can use python? 20:35 yoklov: AlbireoX: have you ever heard of a macro 20:35 chandler: AlbireoX: To answer your original question, which I don't think has yet received a satisfactory answer, where Racket excels is in solving a fundamental challenge of software design that's ill addressed outside of the Lisp family. 20:35 AlbireoX: so far all the arguments for racket are bad 20:35 AlbireoX: What is that challenge, chandler 20:35 yoklov: again, have you ever heard of a macro 20:36 AlbireoX: Not in programming, what is it 20:36 yoklov: it allows you to do things like add keywords to the language. 20:36 yoklov: so you could just 20:36 yoklov: define a conditional form 20:36 yoklov: like if 20:36 yoklov: or define a new looping construct 20:36 yoklov: or 20:36 AlbireoX: but why would you need a new construct? 20:37 yoklov: who knows? 20:37 AlbireoX: what's an example 20:37 AlbireoX: If there is one needed, someone can just add to python's source code 20:37 AlbireoX: do you use any macros? 20:37 AlbireoX: that are out of the ordinary 20:37 yoklov: regularly? 20:37 yoklov: i have a few in my init file 20:37 yoklov: h/o 20:37 AlbireoX: like what 20:38 chandler: When writing code, often times the design of the system becomes obscured by the mechanics of making the computer do what you want to do. You're trying to express an idea, and you have in your head certain concepts about how that idea should be expressed, but you find yourself doing certain things - shuffling around state, calling functions to take certain side effects at certain well-defined points in the program execution, etc. - that ... 20:38 chandler: ... detract from the task at hand. Eventually, you become bogged down by these operations. They slow your progress and your understanding of the task at hand. 20:38 tauntaun: AlbireoX: why troll #racket when you could troll #stubborn? 20:38 yoklov: and Albireox: "someone can just add to python's source code" isn't really true. 20:38 AlbireoX: yoklov: it's an open source project 20:38 yoklov: right 20:38 yoklov: but 20:38 yoklov: they might not add it 20:39 yoklov: and then you'd be rolling it yourself 20:39 yoklov: and its really 20:39 yoklov: a terrible idea 20:39 yoklov: and plus it would be harder 20:39 yoklov: you could introduce variable capture 20:39 yoklov: and have very hard to detect bugs 20:39 yoklov: and you can't just 20:39 chandler: Where Racket excels is that it gives you the power to clean that cruft away from your program - to write it *once* as it ought to be written, and not spread across dozens of places where it blocks your ability to see what your program is actually doing. 20:39 yoklov: add a few lines of code 20:39 yoklov: and have this new piece of syntax in your program 20:40 yoklov: easy as writing a function 20:40 yoklov: in terms of typing at least 20:40 AlbireoX: so why not use a function? 20:40 yoklov: also python is in c, right? 20:40 yoklov: macros are a lot like functions 20:40 yoklov: but 20:40 yoklov: macros operate on the code they are given 20:40 yoklov: wheras 20:41 chandler: Very occasionally, the maintainers of languages like Python will add something new to the language to address a very common concern, but the authors of Racket have also done so, and further empowered you to do so when you need it, even if *your* concerns aren't the same as the concerns of other users of the language. 20:41 yoklov: functions operate on the values in that code 20:41 chandler: yoklov: You're missing the forest for the trees. 20:41 yoklov: i know its not a really great explanation 20:41 yoklov: but 20:41 (join) Camaroow 20:42 AlbireoX: So why would you need to use a macro/ 20:42 AlbireoX: Why not just import a library? 20:42 Camaroow: Macros can be made in many different languages, what makes racket special? 20:42 yoklov: are you referring to c macros? 20:43 yoklov: or other lisp macros 20:43 Camaroow: Or are you referring to TeachPacks? 20:43 yoklov: what? 20:43 AlbireoX: ? 20:43 AlbireoX: No, I'm saying, why not use a python module to accomplish what you want? 20:44 yoklov: what if you wanted to add javascript style prototypal inheritance to your language. 20:44 yoklov: for example. 20:44 Camaroow: Or why not use Scheme? 20:44 yoklov: oh. 20:44 yoklov: racket has more libraries than scheem 20:45 yoklov: thats why i use it over scheme at least 20:45 Camaroow: But you can't redfine in racket, there are only constants. 20:45 Camaroow: redefine* 20:45 yoklov: err 20:45 (quit) jonrafkind: Ping timeout: 240 seconds 20:45 chandler: AlbireoX: Recently I found myself working with a binary data format which was defined as a sequence of tuples. The tag was four bytes, the length also four bytes, and the value had the specified length. 20:46 yoklov: Camaroow: that's not true /at all/ 20:46 yoklov: how do you use rudybot? 20:46 chandler: Each type of tag had to be handled in a very specific way. But I wasn't just working with one such format; there were several such formats, and each tag meant something different in each one. 20:47 yoklov: rudybot init racket 20:47 yoklov: *crosses fingers* 20:47 chandler: Wouldn't it be nice if my programming language had a control structure that would deal with this directly? 20:47 AlbireoX: chandler: Yeah, it's called an object 20:47 chandler: ? 20:47 yoklov: Camaroow: do (define x 3) (set! x 5) (displayln x) in racket 20:47 yoklov: and 20:47 chandler: This tag-length-value format is handled in Python directly? 20:48 yoklov: you'll see 5 20:48 yoklov: not constant. 20:48 AlbireoX: make a MyTuple(data) 20:48 bremner: rudybot: init racket 20:48 rudybot: bremner: your sandbox is ready 20:48 AlbireoX: you can define the class yourself 20:48 AlbireoX: You don't have to modify the behavior of the language 20:48 AlbireoX: Just add a new class 20:48 chandler: Macros don't modify the behavior of the language; they *extend* the behavior of the language. 20:49 AlbireoX: Ok, you don't have to extend the language 20:49 AlbireoX: Just define the class yourself 20:50 Camaroow: yoklov: They are teaching Racket at my school and you can not do: 20:50 Camaroow: (define x = 5) 20:50 Camaroow: (x = 2) 20:50 yoklov: ah 20:50 yoklov: well 20:50 yoklov: you can't have an = sign there 20:50 yoklov: rudybot: init racket 20:50 rudybot: yoklov: your sandbox is ready 20:50 yoklov: rudybot: (define x 3) 20:50 rudybot: yoklov: Done. 20:50 yoklov: rudybot: (display x) 20:50 rudybot: yoklov: ; stdout: "3" 20:50 Camaroow: Well I forget the racket syntax, but it will say "X is already defined you can not redfine it". 20:51 yoklov: rudybot: (set! x 5) 20:51 rudybot: yoklov: Done. 20:51 yoklov: rudybot: (display x) 20:51 rudybot: yoklov: ; stdout: "5" 20:51 Camaroow: I use the ide DrRacket... 20:51 yoklov: Right 20:51 Camaroow: My teacher is MrSchmurr. 20:51 yoklov: err 20:51 yoklov: okay. 20:51 offby1: Camaroow: a new tool in the Racket toolkit 20:52 AlbireoX: yoklov: (set! x 5) is not easier than "x = 5" 20:52 Camaroow: offby1: What? i am not sure what version we use, all I know is that you can't redfine variables. 20:52 yoklov: AlbireoX: thats true, but you shouldn't be changing the value of variables anyway 20:53 yoklov: Camaroow: you can't use define twice on the same variable. 20:53 Camaroow: Plus there aren't any classes in racket, there are rkt files but you can say class className implements otherClassName { 20:53 yoklov: so... 20:53 Camaroow: } 20:53 yoklov: err 20:53 yoklov: just don't. 20:53 Camaroow: Just don't what? 20:53 Camaroow: Just don't use a better language? 20:53 yoklov: define the same thing twice 20:53 yoklov: no 20:53 yoklov: and racket has classes 20:53 yoklov: (require racket/class) 20:54 Camaroow: That adds a racket file but you don't have to put define the class name at the top or anything 20:54 AlbireoX: yoklov: Why not change the value of a variable? It's a variable. 20:54 yoklov: (define class-name (class other-class-name … ) ) 20:54 yoklov: AlbireoX, because if you dont change the state of the variables, you don't have to worry about timing. 20:55 yoklov: if you don't mutate any values 20:55 yoklov: time doesnt exist 20:55 AlbireoX: timing? 20:55 Camaroow: File>new file>nameofFile 20:55 yoklov: and you never have to wonder what the value of x is 20:55 Camaroow: then just start typing: 20:55 Camaroow: (define x 5) 20:55 Camaroow: (string-append "no") or something similar 20:55 AlbireoX: what? 20:55 yoklov: by not changing the state of variables you eliminate a /huge/ class of bugs 20:55 yoklov: where you thought something was in this state 20:55 yoklov: but 20:55 Camaroow: /huge/ 20:55 yoklov: it wasnt 20:56 yoklov: huge. 20:56 Camaroow: How is racket better then an OOP programing language? 20:56 Camaroow: like java. 20:56 yoklov: hahah 20:56 yoklov: learn scheme and find out. 20:56 bremner: is it sunday? 20:56 yoklov: thats all i can say. 20:56 yoklov: java is painful. 20:56 chandler: AlbireoX: Sorry, I had gotten called away. The point wasn't whether you could *write* a parser for that format in Python (of course you can!) or whether you could use classes to stucture it. The point was to pose a thought experiment: what if that functionality was already built into the language? What if I could just write (in a C-ish pseudocode) tlvSwitch (value in myData) { case TAG_1: ...; case TAG_2: ...; } 20:57 Camaroow: Learn Java, then you will be like "Damn, I should of been coding in java all this time :O." 20:57 yoklov: i know java 20:57 AlbireoX: chandler: There's enums in java where you can do that. Or constants. 20:57 Camaroow: Then you are lieing through your teeth when you say "racket is better" 20:57 chandler: AlbireoX: That doesn't do all the work for you. 20:57 AlbireoX: and in python, you can also do something similar 20:57 AlbireoX: AlbireoX: how does it not do all the work? 20:57 yoklov: alright now i know you are a troll. 20:57 bremner: yep 20:58 chandler: Enums don't magically parse out the value parts based on the tag. You still have to write the mechanics of that yourself. 20:58 Camaroow: TROLOLOLOLOLOLOLOLOLOLOLOLO RACKET SUCKS TORLOLOLOLLOLO TORTILLAS!!!!!!!!!! JAVA RULESSSS!!!!!! OOP NOT PROCEDURAL! 20:58 Camaroow: sadlsad 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 AlbireoX: chandler: define "value parts" 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: sa;' 20:58 Camaroow: dl;sa 20:58 Camaroow: d 20:58 Camaroow: as;' 20:58 Camaroow: dsa; 20:58 Camaroow: das;;d 20:58 Camaroow: ;' 20:58 AlbireoX: :o 20:58 Camaroow: SA 20:58 chandler: AlbireoX: As I said, the format consisted of a number of tag-length-value tuples, which are all in one byte stream. 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:58 Camaroow: d 20:59 Camaroow: d 20:59 (part) Camaroow 20:59 chandler: AlbireoX: So the first four bytes are a tag, the second four bytes are a length, and then the N bytes following that are a value. Then another tag-length-value tuple, etc. until the byte string is exhausted. 20:59 AlbireoX: chandler: They don't magically do it. But racket doesn't magically do it either. You have to code a macro. 20:59 chandler: Yes. I'm getting to that. 21:00 chandler: Suppose handling these formats was already baked into your language. Would you use that language feature if you needed it, or would you go write it out longhand each time you needed it? Would you define your own class abstraction and implement some kind of visitor pattern instead of just writing the obvious tlvSwitch statement? 21:01 AlbireoX: You don't even have to do that 21:01 AlbireoX: Make an abstract class 21:01 AlbireoX: inherit from that class 21:01 AlbireoX: Make a class.getValue() thing 21:01 AlbireoX: you won't even need a switch 21:01 AlbireoX: And you can always copy and paste from your own code instead of " write it out longhand each time" 21:02 chandler: You haven't answered the question. Would you do that in preference to using the built-in language feature? 21:02 AlbireoX: Yes, I would do that 21:02 AlbireoX: Because it really isn't built in 21:02 AlbireoX: It's a macro 21:02 chandler: OK. I don't know what to do with that answer. Have fun using Python. 21:02 AlbireoX: And if you move to a different computer, you'll need to copy and paste everything. 21:03 yoklov: thats true with every language. 21:03 AlbireoX: Not really 21:03 (join) Camaroow 21:03 yoklov: err. 21:03 chandler: That applies to your class file too. 21:03 yoklov: ^ 21:03 chandler: Macros are just code. 21:03 AlbireoX: chandler: it does, but the class file is part of the code 21:03 chandler: So are macros. 21:04 AlbireoX: Unless macros are stored in the same folder as the project 21:04 Camaroow: package com.bireosoft.opengl; 21:04 Camaroow: import static org.lwjgl.opengl.GL11.*; 21:04 Camaroow: import static org.lwjgl.opengl.GL15.*; 21:04 Camaroow: import java.nio.FloatBuffer; 21:04 Camaroow: import java.nio.IntBuffer; 21:04 (quit) Camaroow: Excess Flood 21:04 chandler: Of course they are. 21:04 chandler: They're stored in the same *file*. 21:04 AlbireoX: Some languages have dependency management, like Java and Maven 21:04 (join) Camaroow 21:04 chandler: Macros are just little bits of code that let me tell the compiler "when I say tlv-switch, this is what I mean: it's a control structure used to parse a byte string...". 21:05 chandler: They're part of the code. They refer to functions I write and are used in functions I write. 21:05 AlbireoX: chandler: so basically it's just an inline function? 21:05 Camaroow: public class Teaching { 21:05 Camaroow: public static void main(String[] args) { 21:05 Camaroow: String stringName = "lol"; 21:05 Camaroow: if (stringName.equals("bob")) { 21:05 Camaroow: System.out.println("Hello World!"); 21:05 Camaroow: } else if (stringName.equals("david")) { 21:05 Camaroow: System.out.println("Your string does not equal bob, it equals david."); 21:05 Camaroow: } 21:05 Camaroow: } 21:05 Camaroow: public class Teaching { 21:05 Camaroow: public static void main(String[] args) { 21:05 (quit) Camaroow: Excess Flood 21:05 yoklov: lol 21:05 yoklov: what an ass 21:05 AlbireoX: lol 21:06 (join) Camaroow 21:06 AlbireoX: chandler: so why use a macro when a class is just about the same thing? 21:06 yoklov: AlbireoX, you're going to have to just trust that macros aren't just an inline function or class. 21:06 yoklov: really, they're weird. 21:06 chandler: AlbireoX: Sort of. The very first macro systems were built around functions which took parameters that weren't evaluated - in other words, if you called one with the argument X, the function would actually get the symbol X, not the value of the variable X. Over time, the systems have evolved to become easier to program with. 21:06 yoklov: they're unique to lisp 21:07 offby1: I think there are a few non-lisp languages with lisp-like macros 21:07 offby1: can't think of their names offhand 21:07 chandler: Dylan. 21:07 yoklov: factor 21:07 offby1: perl 6 21:07 AlbireoX: so why use a macro when a class is just about the same thing? 21:07 yoklov: lol 21:07 yoklov: its nto 21:07 yoklov: not* 21:07 yoklov: at all. 21:07 Camaroow: rudybot: (for ([i '(1 2 3)])    (display i)) 21:07 rudybot: Camaroow: your sandbox is ready 21:07 rudybot: Camaroow: ; stdout: "123" 21:07 AlbireoX: yoklov: what is the difference? 21:07 AlbireoX: IF all you're doing is the tuple stuff 21:08 yoklov: well 21:08 yoklov: i mean 21:08 yoklov: obviously you can do anything in any language 21:08 yoklov: heck 21:08 chandler: AlbireoX: Classes are a very useful way of structuring programs. They aren't a one-size-fits-all tool, though. When you start to see people talking about "design patterns", you can be sure that classes aren't really providing the necessary abstractions. 21:08 offby1: yoklov: well, uh 21:08 yoklov: you could do the tuple stuff in assembly 21:08 yoklov: but 21:08 yoklov: it would suck. 21:08 AlbireoX: chandler: How are they not 1 size fits all? 21:08 yoklov: program more and you'll see yourself writing the same classes a lot 21:08 chandler: Classes are not control structures, for instance. 21:08 AlbireoX: yoklov: No, I'll use a library 21:09 AlbireoX: or a module 21:09 Camaroow: rudybot: (for ([i (in-naturals)])    (display i))) 21:09 rudybot: Camaroow: i guess the real question is... what should EDITOR be set to when [ ! -z $INSIDE_EMACS ] and [ -z $DISPLAY ]? 21:09 yoklov: can't always do that. 21:09 Camaroow: opps 21:09 AlbireoX: yoklov: why not 21:09 Camaroow: (for ([i (in-naturals)])   (display i)) 21:09 Camaroow: rudybot: (for ([i (in-naturals)])   (display i)) 21:09 chandler: You can implement control structures using classes, but that doesn't mean they *are* classes. The program still screams "I'm using classes here to try to implement a control structure!". The medium becomes the message. 21:09 (quit) rudybot: Remote host closed the connection 21:09 yoklov: sometimes one doesnt exist for what you want to do 21:10 Camaroow: lol 21:10 yoklov: so you have to write a /slightly/ different one. 21:10 Camaroow: rudybot left :( 21:10 Camaroow: rudybot: (define x 5) 21:10 Camaroow: D: 21:10 AlbireoX: chandler: The classes still fit all. They fulfill all of the design patterns. 21:11 AlbireoX: yoklov: You just get the source of the library and modify it 21:11 yoklov: okay well you really can't always do that 21:11 yoklov: has to be open source 21:11 yoklov: also 21:11 AlbireoX: yoklov: and wouldn't mean modifying the macro, anyways? 21:11 yoklov: if you write this as a macro it will just be using the macro differently 21:11 yoklov: not writing a different one. 21:12 AlbireoX: So why not use the library differently? 21:12 Camaroow: rudybot: (for ([i (in-range 1 4)])    (display i)) 21:12 chandler: AlbireoX: And given a hammer, all thumbs are nails, etc. 21:12 yoklov: okay so one key thing to think about with programming languages is what abstractions they provide 21:12 AlbireoX: chandler: that's my point. Why use a macro when you already have classes? 21:13 yoklov: ... 21:13 yoklov: nevermind. 21:13 yoklov gives up 21:13 chandler: Because I don't like hitting my thumb with a hammer? 21:13 yoklov: everybody here is a troll. 21:13 yoklov: well 21:13 AlbireoX: chandler: But you guys just proved that they're about the same thing 21:13 Camaroow: yoklov: add back rudybot plesae. 21:13 Camaroow: please 21:13 AlbireoX: if you write this as a macro it will just be using the macro differently 21:13 chandler: I didn't even understand that. 21:13 AlbireoX: You can use libraries differently 21:13 yoklov: lol 21:13 chandler: Libraries are just things other people have written. 21:13 AlbireoX: Yeah 21:13 chandler: Racket has classes, by the way. They're just macros other people have written. 21:14 AlbireoX: And macros are things you've written 21:14 chandler: That doesn't solve all problems. 21:14 AlbireoX: Yoklov said you don't change them 21:14 AlbireoX: You just use them differently 21:14 Camaroow: Macros, as in Keyboard Macros lolzol:? 21:14 AlbireoX: People use libraries for different things 21:14 AlbireoX: That's why they exist 21:14 Camaroow: Libraries are easy with Maven. 21:14 chandler: OK, I give up. 21:14 Camaroow: is there RacketToMaven? 21:15 Camaroow: or MavenToDrRacket? 21:15 Camaroow: So giving up meaning: racket is not superior? 21:15 AlbireoX: So basically, macros are more powerful than classes, but their power doesn't really matter as it just creates new languages. 21:16 Camaroow: Who wants Albireox's ASL? 21:16 Camaroow: Age, Sex, Location? 21:16 AlbireoX: ? 21:16 bremner: AlbireoX: ok, you win. Python is better. We're all going away now. 21:17 tauntaun: AlbireoX: Let's face it. You're a genius. Why don't you go join your genius brethen in #brilliant-syntax-better-semantics. 21:18 Camaroow: No his brilliant friends are all at #bukkitdev/#spoutdev 21:19 (part) Camaroow 21:20 AlbireoX: tauntaun: I'm not a genius. The people who made python are the geniuses. 21:21 tauntaun: AlbireoX: Amen. Feel free to join them in #python ;-) 21:22 AlbireoX: i'm already there 21:24 asumu: tauntaun: I stress extensibility because Racketeers often use multiple languages. #lang racket itself is built on a smaller core. 21:24 (join) acarrico 21:24 (join) Camaroow 21:27 tauntaun: asumu: My point was that Scheme syntax is superior even without extensibility. 21:28 (part) Camaroow 21:28 asumu: tauntaun: While I agree with you, I don't think that argument would win over a Pythonista. 21:30 asumu: AlbireoX: If you ever decide you don't like Python's OO system, how do you change it in Python? You're basically beholden to Guido's vision of the language. 21:30 asumu: Not so in Racket or Scheme. You don't like the OO system? Write a macro wrapper over it or write your own. 21:31 asumu: There are also just weird warts in Python. Why are statements and expressions separate? Why is lambda crippled? 21:32 yoklov: tauntaun: honestly i do agree with you almost always 21:32 yoklov: i just think that s expressions have one fatal flaw 21:32 yoklov: and its numeric expressions 21:33 yoklov: 3 + 7 * 5 / 2 - 4 is easier to read and write than (- (+ 3 (* 7 (/ 5 2))) 4) 21:34 asumu: yoklov: http://planet.racket-lang.org/package-source/soegaard/infix.plt/1/0/scribblings/manual.html 21:34 yoklov: i mean, yeah you cna do stuff like that 21:34 asumu: (I would try it interactively, but rudybot seems to be gone?) 21:34 yoklov: yeah that troll crashed him 21:35 yoklov: but its really not worth it to me to import a library 21:35 yoklov: its a really minor inconvenience 21:35 tauntaun: yoklov: i agree; that's where special reader syntax comes in handy. 21:35 yoklov: yeah 21:36 yoklov: i mean that's not really a feature of s expressions though :p 21:39 yoklov: and really i'm a lisp noob who barely understands normal macros, extending the syntax of the reader sounds like an entire level beyond my comprehension 21:40 asumu: yoklov: It's not too bad. Joan Arnaldich wrote a tutorial sort of article a while back: http://jarnaldich.me/2011/08/07/raw-strings-in-racket.html 21:40 tauntaun: tauntaun: yoklov: yes, I'm agreeing with you on that point. That is a weakness of S-expressions. 21:41 asumu: I'd argue though that s-expressions are verbose, but it's nice that the order of operations is explicit. 21:41 yoklov: ^ 21:42 asumu: Or maybe RPN like on HP calculators would be better. 21:43 yoklov: eh, always seemed equivalent to s expressions to me. 21:46 (quit) freakazoid: Quit: Computer has gone to sleep. 21:48 yoklov: really though, overall, i <3 the parentheses. they make my code feel so much more comfortable 21:53 (part) RPR: "ERC Version 5.3 (IRC client for Emacs)" 21:57 (join) RPR 22:04 (part) rsimoes 22:07 (join) rsimoes 22:15 AlbireoX: asumu: I just don't use python if I don't like Python's OO system. o_0 22:15 AlbireoX: that's kind of the point when using a language 22:15 AlbireoX: If you don't like it, use a different one 22:17 rsimoes: OO in general makes me want to kick puppies =[ 22:22 jamessan: it's just like any other paradigm. there are places it makes sense to use and places it doesn't. 22:32 (quit) malkomalko: Remote host closed the connection 22:34 (quit) RPR: Remote host closed the connection 22:35 Qaxz: AlbireoX, well, what if you like part of the language but dislike anther part? 22:35 Qaxz: The point about Racket, scheme, lisp in general is the extend of customization you enjoy. 22:36 (join) veer 22:38 (join) rackitrocks 22:47 (quit) rackitrocks: Quit: Leaving 22:56 (join) mithos28 23:09 AlbireoX: Qaxz: Then you make your own language. 23:12 Qaxz: Well, there's a investment/reward system, writing a macro is a lot easier than specifiying a whole language an implementing it. 23:13 Qaxz: Anyway, that's one of the things that makes racket cool, the macros, there's other stuff, such as the clearness and simplicity of the language, and it doesn't menstruate, but neither does python I hear/ 23:13 Qaxz: In my own person opinion, python is sheer poison to the mind and its use should be prohibited on pain of death, but luckily I have yet to become Dear Leader of this planet. =) 23:15 mithos28: Qaxz: what makes python so bad in your opinion? 23:16 Qaxz: mithos28, I find the syntax exceptionally hard to read and it's pretty clear the language is basically stuck in itself currently 23:16 (join) jonrafkind 23:16 Qaxz: As in the hack upon hack with no foresight syndrome, the discussions on adding a conditional expression were amusing to read 23:16 Qaxz: it was pretty clear they worked themselves in a corner. 23:17 AlbireoX: Qaxz: what's hard to read about it? 23:18 Qaxz: Stuff like a = b if cond else c gets completely cryptic for sufficiently complex expressions, at least to me anyway 23:19 Qaxz: Also, I find the whitespace stuff without a type system tha at least constantly bugs you if you screw it up a bit awkward to work with. 23:19 AlbireoX: Whitespace isn't annoying 23:19 AlbireoX: your editor is just bad 23:19 Qaxz: Anyway, if you want this language to be prohibited on pain of death, then vote for me for Dear Leader of the World, Supreme Commander, Aeternal Praesident. 23:19 Qaxz: Yes it is. 23:20 Qaxz: It is svery annoying 23:20 Qaxz: *objectively* 23:20 AlbireoX: how so? 23:20 mithos28: Qaxz: have you used haskell? 23:20 Qaxz: mithos28, painful painful memories 23:21 Qaxz: "unexpected use of ;, maybe bad layouting" 23:21 mithos28: because of the whitespace or other things? 23:21 Qaxz: 99% of the time, 1% of the time an actual type error 23:21 tauntaun: Qaxz: what's so bad about Haskell? 23:21 Qaxz: well, one of the reasons 23:21 Qaxz: Well, haskell isn't so bad, I just felt they could have gone with less 'mathematical textbook notation' esque syntax. 23:22 Qaxz: And well, I think the typesystem is in the end more impractical than that it's worth a lot 23:22 Qaxz: At least, the errors it caught for me weren't type errors 23:22 tauntaun likes types 23:22 mithos28: what kind of type system do you like then? 23:22 tauntaun: Qaxz: what do you mean? 23:22 Qaxz: they were either due to bad layouting or operator praecidence 23:22 tauntaun: a type error is a type error. 23:22 Qaxz: No, I mean, errors as in bad layouting 23:22 Qaxz: And stuff 23:23 tauntaun: 'layout' isn't a verb. 23:23 Qaxz: Well, you know wha tI mean. 23:23 mithos28: tauntaun: the difference between a conceptual type error, and an error in what you wrote 23:23 Qaxz: Like, especially with using the | notation 23:23 Qaxz: For cas 23:23 Qaxz: For cond* 23:23 Qaxz: Basically 23:23 tauntaun: I don't get it. That's just syntax. I never had a problem with that. 23:23 Qaxz: I never really got around how that works, it always says bad layout and I just get it right on trial on error. 23:23 Qaxz: Well, I had. 23:24 Qaxz: It always gives me errors like 'unexpected ;, possibly due to bad layout' 23:24 Qaxz: Then I trial and error some whitespaces and then it works. 23:24 tauntaun: Have you tried getting a Haskell book and imitating its code listings? 23:24 Qaxz: Sure, but I'm pretty bad at it 23:24 (join) aed 23:24 Qaxz: Like, the formal rules for whitespace are pretty complex 23:24 tauntaun: ...bad at typing in code? 23:24 (part) aed 23:24 Qaxz: I think they like you to do it 'on feeling' 23:25 Qaxz: And for some reason I never got a feeling for how to do it in Haskell. 23:25 tauntaun: Well if you're in Emacs, you just hit tab. 23:25 mithos28: It is pretty much indent more if it is a sub expression 23:25 Qaxz: THat'swhat they say 23:25 Qaxz: And I find it a flat out lie. 23:25 tauntaun: Were you using a controlled substance when typing? 23:25 yoklov: is that really what the rule is? 23:26 yoklov: like, is that all it takes to make it work? 23:26 mithos28: yoklov: That is my rule of thumb, I cannot think of a time where it has failed me. But it might not be 100% 23:26 tauntaun: Why are there all these questions? You just hit tab. 23:27 yoklov: emacs one cycles through a bunch 23:27 yoklov: sometimes the first one looks wrong for the expression i'm about to type 23:27 mithos28: tauntaun: some of use use editors that are from a more civilized age 23:27 tauntaun: ...then hit tab again. 23:27 yoklov: i.e. this needs to be 'where' 23:27 yoklov: and i'm unsure if it matters 23:28 yoklov: if the rule is just "more for subexpressions" i feel like a fool for worrying. 23:28 tauntaun: mithos28: hey, I like emacs, vi, and gedit. They should all let you just hit tab. 23:28 yoklov: emacs for life 23:28 mithos28: I'm a vim person, but I don't trust its tabbing at all 23:28 AlbireoX: vim 23:29 AlbireoX: vim on unix, sublime on windows 23:29 yoklov: heathens :p 23:29 mithos28: especially in racket, it is awful 23:29 mithos28: but so is anything trying to indent racket, besides maybe check-syntax 23:29 tauntaun: gedit has a nice Haskell mode. 23:30 Qaxz: tauntaun: http://codepad.org/vfko7AHN 23:30 Qaxz: Here we go 23:30 mithos28: the problem is that indentation needs to be more aware than regexps, which is what editors use 23:30 Qaxz: I just made that 23:31 tauntaun: Qaxz: it's nice that you can just make stuff up. But the way to learn a language is to read a book and imitate it. 23:31 tauntaun is just getting snarkier and snarkier tonight. 23:32 mithos28: just indent because it is a sub expression 23:32 mithos28: line 3 and 4 are sub expressions of the factorial definition 23:33 mithos28: so must be indented more than it 23:33 mithos28: putting 4 spaces at the beginning of those lines fixes the layout errors 23:33 tauntaun: Actually I wouldn't indent the guards at all; I'd start them on the same line as 'factorial n'. 23:33 tauntaun: But even that's wrong. 23:34 tauntaun: You should have two 'fact' lines: one for 0, and one for n. 23:34 tauntaun: But what's the point of fixing specific errors? The way to learn is to learn systematically, from a book. 23:36 mithos28: tauntaun: the '|' needs to be at least on the 'a' column of factorial otherwise it is a parse error. Also I agree that two fact lines is the better way to write it 23:37 Qaxz: tauntaun, http://codepad.org/yNuQvDME ah, I got it to work 23:38 Qaxz: tauntaun, books seldom explain the layouting, they just say 'indend sub expressions a level deeper', and they are flat out lying when they say that because it doesn't work at all in a lot of cases. 23:38 tauntaun rolls his eyes. 23:38 mithos28: which cases? 23:38 tauntaun: I liked you better when you were a misogynist, and I definitely liked you better when you were Lajla. 23:39 tauntaun: Btw, prefer 'where' to 'let'. This is Haskell, not Scheme. 23:39 Qaxz: mithos28, the case right there 23:39 Qaxz: where apparently indenting deeper wasn't enough, it had to be intended even deeper or something. 23:40 Qaxz: And apparently (++ " " ++) doesn't work, oh well. 23:40 Qaxz: I expected it to, never used it. 23:40 mithos28: you indented the guard even less than the definition of factorial, so yes it didn't work 23:40 Qaxz: Why is it not a nesting of let but of factorial? 23:41 mithos28: because factorial is nested inside the let 23:41 Qaxz: THen why is factorial not indented? 23:41 Qaxz: Can you put the guards on the same line by the way? 23:41 Qaxz: I never tried 23:41 mithos28: what do you mean factorial is not indented? 23:42 (join) dnolen 23:42 Qaxz: http://codepad.org/TQb8in3Y this works 23:42 Qaxz: Ahh, yeah 23:42 Qaxz: I can dick that 23:42 Qaxz: ehh 23:42 Qaxz: dig 23:42 Qaxz: Yeah, totally dig that. 23:42 mithos28: Qaxz: it is indented two more columns then let in that example 23:43 Qaxz: But it's on the same line 23:43 Qaxz: there's just a space. 23:43 mithos28: in the previous one (where they are on the same line) it is 4 more columns 23:45 Qaxz: What 23:45 Qaxz: I do not follow. 23:45 mithos28: look at what column the 'f' is on versus the 'l' 23:46 (quit) jao: Ping timeout: 240 seconds 23:50 mithos28: has anyone on here used whalesong? 23:52 offby1: dyoo shows up occasionally 23:52 mithos28: yeah, i'd ask him but its late in providence, and he's not online 23:53 (join) rudybot 23:56 (quit) acarrico: Ping timeout: 240 seconds 23:56 Qaxz: mithos28, I do not understand, this is much too advanced for me. 23:57 mithos28: Just look at examples and eventually it will become second nature