00:00 jonrafkind: the mathematical beauty of a specification is worthless if you can't do anything useful with it 00:00 Shambles_: I'm of that mind, but I think I may not really understand the people that want that sort of thing. 00:01 Shambles_: For example, I intimately understand the desire for semi-automatic verification of formally specified programs. I'm actually very interested in that sort of thing. 00:02 Shambles_: But if you try to deal with anyone in that field, they flat out refuse to deal with I/O and side effects. There's all these 'wonderful' (ignoring the notation...) tools that allow you to specify programs... so long as you don't do any assignment, or I/O, or care that in the real world in most languages variables are limited to a certain range, and if you get outside of that you have rollover or other unpleasant effects, or t 00:04 Shambles_: And I will admit, I've hurt myself with mutation, but honestly, I've never had a bug /because/ of I/O. I'm not sure why, ignoring that it'd be possible to actually try to hurt myself like using file I/O to abuse a file to work as a mutable variable, for the most part, we just don't 'assume' anything at points where I/O occurs, and mostly treat it as a no-op for output, and a "always check your input" at input. 00:08 Shambles_: Maybe someday someone will make a tool that uses a Pascal-ish or C-ish notation, with mutation and I/O support, and at least a minimal set of typical datatypes (i.e. 8-bit unsigned integer, not "infinitely sized integers"), and reason about it using something like Hoare logic. When that happens it might get used in the real world. 00:10 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 00:11 (join) Nisstyre 00:13 Twey: When a function returns two values, how can I bind them to names? 00:13 offby1: call-with-values ... let-values ... define-values ... 00:13 Twey: Ah, let-values is what I was looking for — thanks 00:15 Twey: Shambles_: That sounds like a very outdated view of formal verification techniques. Modern verification tools & type-system research (ATS, Idris, &c.) are explicitly focused on trying to handle things like assignment & I/O. 00:16 Twey: For a long while there was a sense of ‘argh, IO is hard, we'll leave that for someone else’, but there are a lot of interesting ideas popping up of late. 00:17 Shambles_: Twey: Could be. When last I tried to mess with it Coq was all the rage. It definitely was not suitable for real world use. It was considered to be a big deal when there was a package for 'computer like' (signed/unsigned, limited ranges) integers. I started thinking about it after I wrote the "C-like syntax" bit. There /is/ ACL2, which might actually be pretty usable. I never tried. 00:18 Shambles_: ACL2 is supposed to basically be a large subset of Common Lisp, so should be actually-executable, at least, and probably supports mutation. The syntax wouldn't be nasty. I guess the main concern would be whether the error messages were awful, as they usually are in formal verification tools. 00:20 jrslepak: isn't the second A for "applicative"? ¬_¬ 00:20 Shambles_: A tool for verifying Lisp would be nice, but I'd rather be able to verify assembly or C. If you can nail things down at that level, everything else should be fairly easy. 00:22 Shambles_: I don't know about a second A, but perhaps it does stand for "Applicative Common Lisp". Maybe the 2 is because it's a sequel, like that Jaws: This Time It's Personal thing. ;) 00:22 Twey: Shambles_: Read Hongwei Xi, ‘Imperative Programming with Dependent Types’ 00:22 (quit) bjz: Quit: Bye! 00:22 Twey: jrslepak: Well, the fact that the language is pure doesn't mean you can't use it to talk about impure things. 00:22 jrslepak: ok 00:23 Twey: Shambles_: Also ‘A Dependently Typed Assembly Language’, same author 00:24 Shambles_: Twey: I'll look it up. I know it's doable. Floyd and Hoare were both concerned with /practical/ formal verification (Hoare even dealt with GOTO), and they're the ones that started the field. It can be done. I just haven't seen many tools aimed at doing it. They all seem to be tools intended to help mathematicians (e.g. dealing with infinities), rather than programmers, though they're being pushed as for-programmers. 00:25 Twey: Shambles_: Yeah, that's why I like Xi ☺ ATS is actually a programming language with verification, rather than a proof assistant with program extraction. 00:26 Shambles_: Twey: How painful is ATS to learn? 00:27 Twey: Hm 00:27 Twey: Depends on your prior experience, but I'd say: reasonably 00:27 Shambles_: ;) At least you're honest. It does seem to be aimed squarely at the biggest sore spot. Looks like it's even dealing with manual memory managment. 00:28 Twey: ATS is a pretty nasty language IMO. The semantics are clumsy and the less said about the syntax the better. It's nice that it's trying, though, & none of the issues with it are fundamental in any way I can see. 00:28 Shambles_: Will I need to understand category theory and topology before I can write Hello World and prove it won't kill my neighbor's dog? 00:29 Twey: Ha. Yeah, ‘Hello World’ is a one-liner. 00:29 Shambles_: The Haskell test for "how painful is it" ;) 00:29 (quit) dented42: Quit: Computer has gone to sleep. 00:29 Twey: It's a one-liner in Haskell, too :þ 00:30 Shambles_: Admittedly, that's true. I'm not a big fan of the Perl-oid syntax, but honestly, the thing that drives me up the wall is the documentation. There's this /extreme/ hostility to explaining things in a operational manner, and any explanation you can wring out of it is always in obscure mathematical terminology, which results in another definition in obscure mathematical terminology... 00:30 Twey: In fact, if it were up to me, ATS would throw you in at the deep end quite a bit more. My biggest complaint with its syntax is that you can omit an awful lot of stuff, which is lovely except when you get an error from something you didn't write that you didn't even realize your code was doing. 00:31 Shambles_: You mean bugs can slip through from underspecification (I think this is unavoidable), or something else? 00:33 (quit) greghendershott: Quit: Leaving. 00:34 Twey: No, other things. Err, to give an example: in ATS you define the type of functions like: pow: (int, int) -> int. However, there are actually a lot of different function types depending on whether you want a garbage-collected or linear object, whether it should form/carry a closure, whether it should have side effects & what kind it should have, &c., which are specified by tagging the arrow like: pow: (int, int) - int 00:35 Shambles_: As for the "my dictionary is bigger than yours" dog-wagging, I'll give a concrete explanation. While reading about various features I ran into "monoids". Not to be confused with "monads". As far as I could tell, after digging through a lot of pages found by Googling, this is just a really intentionally obtuse way of saying "it concatenates things, you know, like sticking 'foo' and 'bar' together to get 'foobar'" which woul 00:35 Twey: But if you don't know that, & you've just written your first function, & then ATS tells you that you've used the wrong type of function for how you've used it… 00:35 Shambles_: which wouldn't even remotely impress anybody coming from another language, but man, it sure sounded nerdy! 00:36 Twey: Shambles_: Well yeah, but it *is* a much more concise way of saying that. 00:36 Shambles_: People that can't /type/ shouldn't be obsessed with /types/. :P 00:36 Twey: Hahaha. 00:36 Twey: But if you have to keep saying ‘thing with an identity that you can concatenate’ all the time, your readers are going to get really bored :þ 00:37 Shambles_: Seriously, it reminds me of ghetto black kids and 'ebonics'. Lets see if we can exclude everybody by talking in newspeak, and when they ask for definitions, make those in newspeak too! 00:37 Shambles_: It's all shizzle! 00:38 Twey: « a monoid is an algebraic structure with a single associative binary operation and an identity element. » — seems clear enough to me 00:39 Twey: In fairness to you, I remember when the Haskell community was a *lot* more obscure about such things 00:39 Shambles_: But see, I wouldn't explain it that way. If I was trying to teach someone Haskell, assuming I actually felt like I understood it well (which I don't), I'd say something like: "you can put a function here that concatenates two things, and the type checker will make sure it actually does that". I wouldn't be going on about identities and monoids. 00:39 Twey: Shambles_: But that's not how it works 00:40 Twey: And concatenation is just one example of a monoid: a monoid is *any* type that satisfies those properties 00:40 Twey: Integers are also monoids, for example (two monoids, actually: one under addition with 0, one under multiplication with 1) 00:40 Shambles_: If somebody said: "Golly gee, I was looking for the math department, but somehow got lost in this computer science place. Can you tell me if there's anything remotely like this in PhD level mathematics?" and I felt like I understood PhD level mathematics (which I don't) /then/ I might start rambling about identities and monoids. ;) 00:42 Twey: It's more like the language has its own jargon, which is necessary to talk about the way it does things in anything approaching reasonable efficiency. It's really a very small subset of mathematical jargon, & you don't need to understand it all that deeply in order to use the language, in the same way you can write a regular expression without knowing about regular languages. 00:42 Shambles_: Okay, admittedly it's been a long time since I read about this stuff. Perhaps the more accurate description would be "combines two things and results in something " (you'll need to tell me if the "of the same type" parts are required, since I don't remember). Either way, the concept is so simple it doesn't deserve a term, and could be explained operationally. 00:43 Twey: The ‘of the same type’ part is required, yes. 00:43 Shambles_: Perhaps, but I've actually read the formal explanation of regular expressions, and feel like I understood it without any undue pain. :P 00:44 Shambles_: And none of the explanations I read involved me chasing definitions of definitions. I think the worst thing I ran into was 'Kleen star'. 00:44 Twey: A more accurate explanation would be: ‘combines two things of the same type and produces a new value of that type, with a value that does nothing when combined, and such that it doesn't matter where you put the brackets’ 00:44 Twey: But you can't really name a typeclass that :þ 00:45 Shambles_: What is meant by "a value that does nothing when combined"? 00:45 Twey: A monoid must have an identity: a value such that, if you combine it with any other value, you get the original value back 00:45 Twey: 0 for addition, 1 for multiplication, the empty string for string concatenation 00:46 (quit) dnolen: Quit: ERC Version 5.3 (IRC client for Emacs) 00:47 Twey: Shambles_: You might like this book: http://learnyouahaskell.com/ 00:47 Twey: It has a lot of nice, non-technical explanations of things 00:47 Shambles_: I take it the bracket comment refers to it being associative? 00:47 Twey: Yes 00:48 Shambles_: Okay, I feel like I understood that explanation. But here's another thing that upsets me about Haskell. 00:48 Shambles_: Okay, we have a 'monoid' as a language feature. 00:48 Shambles_: I have quite often needed to add, or concatenate things. I understand the need for that. 00:49 Shambles_: I have also needed to check that the result of a operation is of the right type. For example, you can often pass a function to a sort routine that expects a true or false based on whether the first argument is 'greater than' the second. 00:50 Shambles_: But how often do I need a monoid? I can't think of a single time I've needed something that satisfied that specific set of rules. What makes it deserving of being built into the language? 00:50 Twey: Shambles_: It's not built into the language 00:50 Twey: (unless you consider the standard library to be ‘built into the language’) 00:50 Shambles_: Odd. The documentation gave that impression. 00:51 Twey: There's no special syntax for it or anything; it's just a typeclass. You can define it yourself. 00:51 Shambles_: I sort of do. :P I see what you're getting at as the difference, though. Let me word it a different way. "What sort of real world code needs, exactly, a monoid?" 00:51 Twey: You've probably never *directly* used a monoid: you've almost certainly just used *things that are* monoids. 00:52 Twey: (and duplicated code thereby) 00:52 Shambles_: Yes, but it's a typeclass, and thus used to check "is this here thing a monoid?" right? 00:52 Twey: Sure 00:52 Twey: The most obvious explanation that comes up is a logging facility 00:52 Twey: Well, s/explanation/example/ 00:53 Shambles_: So why have a standard library type for monoid, and not say "curlyness of hair", or "degree of cloudiness at sunset"? 00:53 Twey: Say you have a log. You want to execute some code, and as you do it, various outputs can be produced, all of which you want to get back (to display to the user, or save to a file, or whatever). 00:53 Shambles_: Guessing the logging example would be appending to the log. 00:54 Twey: So you create a system that lets you do that: your operations inside your logging facility can log strings, & they all get appended to this one big string, and at the end the string is returned to the user. 00:54 ozzloy: Shambles_, real world thing that needs a monoid: finding the sum of all the elements in a list 00:54 Shambles_: Takes a log (string) and a string and results in a string, right? 00:54 Twey: Sure 00:55 Twey: But then you decide that you want to be able to tell the log entries apart from one another when you get them out the other end 00:55 Shambles_: Alright, Twey, they need people like you writing the documentation for Haskell. 00:55 ozzloy: for example on your way to finding out the mean value 00:55 Shambles_: Because what you've said makes sense, and didn't make me jump through undue hoops. :P It also convinces me I've actually needed /exactly/ a monoid. :P 00:55 Twey: Now, if you've written your log framework based on strings, you're a bit screwed, unless you want to parse the strings out at the end (& make sure they're in a format that allows you to do that). 00:56 Twey: But if you've written your log framework based on arbitrary monoids, well, you're set: all you have to do is change the return type from strings to lists of strings, and you can use your logging framework for exactly that, because lists are a monoid (with concatenation & the empty list) too 00:57 Twey: Without changing any code 00:57 Twey: & indeed that's exactly what the Haskell ‘Writer’ monad does 00:57 Shambles_: If the book you mentioned is like your explanation just now, I'd be tempted to read it. The remaining things keeping me from doing so is really not liking the syntax (but I could live with that), the type system (gets in my face trying to prototype stuff, incomprehensible (to me) error messages), and the culture that thinks the kind of documentation I've seen is good. 00:58 Twey: It's all like that. 00:58 ozzloy: Shambles_, i've read a bit of learn you a haskell, it's kinda like why's poignant guide to ruby 00:58 ozzloy: in its tone 00:58 Shambles_: Haven't read "Why's Poignant Guide to Ruby". 00:59 Twey: The Haskell community has improved *tremendously* in the last half a decade or so. There's a lot more practically-oriented documentation nowadays. I had a nightmare getting into Haskell in ~2005, too. 00:59 Twey: The syntax makes a lot of sense once you understand it, though it's a bit heavy for my tastes. There are syntactic wrappers if you prefer, like Lisk. 00:59 Shambles_: What Twey said though, I perfectly understood that explanation, and the log example made it click. I'd be happy as I could be if you could typically /find/ that kind of documentation for Haskell. And honestly, I /have/ looked. A few blogs scattered about have somewhat readable explanations of parts, but most of it is excruciating. 01:00 Twey: Well, here, try it: http://learnyouahaskell.com/functors-applicative-functors-and-monoids 01:01 Twey: Scroll down to the bit on monoids 01:01 ozzloy: i had trouble understanding the maybe monad, until i read about the Option class in scala. that made it click. 01:01 ozzloy: i should take another whack at haskell 01:01 Shambles_: I'm not sure when I last made any serious effort. Was probably sometime around 2006 or so. I had no luck, and left with a serious distaste for the whole thing. I made several attempts before the last, since it was supposed to be the best thing since sliced bread. Still not convinced, but I probably wouldn't have hated the language if there'd been reasonable documentation. 01:02 Shambles_: I finally got my head around monads, I think. I wasn't terribly impressed in the end. 01:02 ozzloy: i'm sold on the utility of maybe monads 01:02 ozzloy: a whole class of null pointer exceptions GONE 01:02 Twey: Monads are very useful. They are probably the single feature I miss most in other languages. 01:03 ozzloy: "class" as in ... category 01:03 Twey: (especially languages without exceptions) 01:03 Shambles_: There's type checking support, but my impression of them was "they wrap a series of functions in a function, and this is good for forcing things to have the right type (or 'parent' type, at least; e.g. make sure that pure functions only call pure functions), or controlling order of evaluation (like the kind of things you often use Lisp macros for)". 01:03 Twey: Shambles_: That is not what monads are about at all. 01:04 Twey: Shambles_: They're a type-class, like monoids. The fact that impure code happens to be a monad is just a coincidence. 01:05 Shambles_: I think the maybe monad is equivalent to the nullable vs non-nullable pointer types in some languages (e.g. Cobra). Having everything nullable /is/ a bad thing, yeah. Probably unavoidable needing something like a null pointer in a C-like languages, but Lisps seem to mostly avoid the need by never returning Null (as in a value that, if read, makes you crash). 01:06 Shambles_: Well, read/written. 01:06 Twey: Shambles_: Basically, Haskell is a completely pure language. That means you can't do IO or other such things, which is annoying, because people generally need to do those things in code. The solution is to embed impure code as a first-class value inside the pure code, instead. A Haskell program never does impure things, it just returns a value describing the impure things to be done. 01:07 Twey: Shambles_: It just turned out that these ‘impure program’ values form a monad, which gives us a really nice, general way of expressing them. 01:07 Twey: (which is the motivation behind the special syntax for monads in Haskell) 01:08 Shambles_: Twey: I've heard the explanation you just gave, however, I reject it. I don't accept that "the language is pure, but we allow I/O by allowing you to write impure code". That's like telling me that "you can't take the square root of a negative number, oh wait, here's imaginary numbers!" :P 01:08 (quit) walter|r: Read error: Connection reset by peer 01:08 (join) walter|r 01:08 Twey: Shambles_: Well, you don't write impure code. You write code that writes impure code. It's kind of like Lisp macros. 01:08 Shambles_: And I think monads get used for the 'controlling order of evaluation' thing, not just impure code and avoiding null pointer errors. I'm pretty sure there was a throw-a-exception-like monad I read about. 01:09 Shambles_: Which basically 'backs up' when it encounters an error in one of the wrapped functions. 01:09 (quit) mceier: Quit: leaving 01:09 Twey: Shambles_: ‘Order of operations’ is one of the things monads give you, yes 01:09 (join) asvil 01:10 Twey: Shambles_: Basically the monad operation, >>=, takes a result from one program and feeds it into another program 01:11 Shambles_: Twey: I subscribe to the theory that any function that somehow causes a side-effect (like I/O) is, by definition, impure, no matter what sort of word games you want to play with it. Functions as values and wrapping hoodoo doesn't matter. A function that writes "Hello World!" to my screen is not the same as one that didn't perform any output. There's a observable difference. 01:11 Twey: The interesting part is in the definition of ‘program’, which is very loose. So, for example, you can have ‘programs’ in Maybe that can fail (& therefore not feed their result into the next program), in Either that can fail *and* return a value explaining why, programs that ‘feed output into the next operation’ by performing impure actions, &c. 01:12 mithos28: Shambles_: Is a thunk that casues a side effect when invoked, a pure value? 01:12 Shambles_: I do accept that it's possible to have side effects that /aren't/ observable, and still call it pure (like internal mutation, without retaining state). I mean that's the way the computer executes all programs anyway, but there's a real difference /in the computer/ by writing to the screen vs not, again, the whole observable aspect. 01:12 mithos28: assume I never invoke it. 01:12 Twey: Shambles_: That's just it, though: functions in Haskell do not write "Hello World" to your screen, & anything that does write "Hello World" to your screen is not a function 01:12 Shambles_: mithos28: The thing that /could/ call it, is impure, but the thunk itself is not (it's just data), according to me. 01:13 Twey: Shambles_: That data is what you create when you ‘do impure things’ in Haskell 01:13 mithos28: Ok so a value of type IO a, in haskell is that thunk 01:13 Shambles_: Twey: Somebody has to call the thunk. That 'somebody' is impure, so the language can't be pure. 01:14 Twey: Shambles_: Sure, but that ‘somebody’ is the runtime — it's outside the Haskell you're writing 01:14 Twey: Shambles_: You can't call that value from within Haskell 01:14 Shambles_: I consider the runtime to still be the language. There's also the issue of a language being pretty limited if it can't describe itself. 01:15 mithos28: Haskell is a pure language which returns a value of type IO a, the haskell runtime is a program which consumes such a value and executes it 01:15 Shambles_: Limited and useless aren't the same thing admittedly. 01:15 Twey: Shambles_: Haskell can describe itself. It's Turing-complete. 01:15 Twey: Regardless of whether or not you consider it part of the language as a whole, the runtime is not part of the code you write 01:16 Shambles_: Still not buying. I run the program. I/O happens. It's impure. If I run "(+ 2 2)" as my entire program outside the REPL, nothing happens. The program is pure. Useless, but pure. :P 01:16 Twey: Impure things do happen, obviously, but your code never does impure things. 01:17 Twey: The system as a whole is obviously impure. The interesting part is that the code you have to worry about isn't. 01:17 Shambles_: How would Haskell describe itself in I/O producing form? It's just a word game cop out. :P "Oh it's our /run time/ that's the evil impure thing, not the language!" 01:17 Twey: So, even though you get the benefit of being able to do impure things, you don't get the mental overhead of having to worry about it. 01:18 Twey: Shambles_: Except it's not — you don't code in the runtime. 01:18 Shambles_: I mean, you could say "It's the C /run time/ that causes all those bugs, not the language." I mean, if you never actually executed that buggy C code on your computer (it's just a 'thunk' for the program that /could/ be executed), it wouldn't misbehave! 01:19 Twey: Shambles_: Heh, there's actually a post on that… http://conal.net/blog/posts/the-c-language-is-purely-functional 01:19 mithos28: Shambles_: You are missing the point, any expression in haskell is pure. It has no side effects. Even an expression of type IO a. 01:20 Twey: And yes, you're quite right; the main difference is just that C doesn't let you write pure code, it only lets you write the impure language 01:20 Shambles_: Twey, I'm not convinced of the 'mental overhead' part either. While I can't think of any examples of where a bug has been caused by (want to emphasize that /caused by/ part) I/O, mutation has definitely bit me. I still consider it vital most of the time, at least when dealing with real world I/O where you often can't retain data across event handler runs any other way. 01:20 Twey: (well, there's the preprocessor, but that's very limited) 01:20 Twey: Shambles_: Mutation is considered ‘IO’ for purity purposes 01:20 Shambles_: If there's some way of doing mutation or I/O, no matter whether it's Haskell the language or Haskell the runtime doing it, you can still hurt yourself, so the thinking is just as difficult. 01:21 Twey: Shambles_: But you *know* when mutation can occur. 01:21 mithos28: Shambles_: Except you know you are doing it, and for certain programs you know it doesn't occur 01:21 Shambles_: There's no real advantage over the word-game style of doing it and having a "pure" type qualifier (which would actually help the optimizer if it was a part of C, and GCC actually includes it for that reason). 01:22 Twey: Shambles_: Haskell, unlike C, lets you write pure code. So if you're writing a map function that takes a function, you don't have to worry that you might execute the function you're passed in the wrong order; you're guaranteed by the fact that it's a function & not an IO value that it doesn't matter when you call it. 01:22 Twey: Shambles_: Well, there's the added advantage that it lets you do metaprogramming, like with Lisp macros. Because the IO program is a value, you can manipulate it like any other value. 01:23 Shambles_: Hmm, not sure whether metaprogramming is the right term, since I don't think it'd be possible to do that at compile time, but again, there's no reason a C-like language couldn't check the type of functions pointed-at to make sure they're pure. The type qualifier would be enough. 01:24 Twey: Shambles_: Again, there's the generalization argument too. By having it be a value, you can write lots of different types of ‘program’: programs that can fail on each step, programs that perform impure actions, programs that have local state (but don't let it escape), programs that can throw errors, &c., and you can handle them all with the same functions & write generic code over them like you would with, say, monoids 01:24 Shambles_: Yes, hence my description of 'wrapping functions', and mentioning the throw-a-exception monad. 01:25 (join) niels1 01:26 Twey: ‘Wrapping functions’ isn't something that makes sense, since the ‘programs’ aren't actually functions (they may not have a domain, they may not be deterministic, &c.) 01:27 Shambles_: If you consider Haskell pure (I don't, but you do) then they'd have to be functions. Otherwise we could say they "wrap a procedure". Haskell needs something like monads to achieve the control-flow modification languages like Lisp use macros for. 01:29 mithos28: Shambles_: Haskell cannot do what Lisp can do with macros, it can come close. But laziness is what is useful there not monads. 01:29 Shambles_: My impression was it could be used to sure something was of the right type, and could wrap things, which was useful for control flow, which seems pretty accurate unless I'm missing some additional functionality. I know I/O is handled as a monad. 01:29 Twey: Shambles_: They *are* procedures. 01:30 Shambles_: mithos28: I'm guessing you mean compile time evaluation. What I was referring to is adding new control-flow constructs, which is something people often use Lisp macros for, and something Haskell often uses monads for. 01:30 Twey: They're not *Haskell* procedures (Haskell has only functions). They're procedures belonging to whatever language you're using to write these embedded ‘programs’. 01:31 mithos28: Shambles_: Monads are not special, haskell uses laziness for control flow constructs usually 01:31 Twey: Shambles_: That is absolutely wrong; Haskell does not require monads to define new control-flow constructs. It's lazy, so standard functions can be used to define control-flow. 01:31 Shambles_: Twey: That's getting into the word game thing for me again. If what I'm typing is Haskell, and it's having side effects, its not pure. Otherwise it's pure, and it's all functions. I know that's the party line, but I just can't accept it. I'm not trying to be ignorant or trolling. :P 01:32 mithos28: Shambles_: If i write (system "echo foo") 01:32 mithos28: is that racket? 01:32 Shambles_: Twey: I do actually consider it to matter. For instance, it's really nice to know something actually won't have any side effects (as in really and for truely, no word games, no my runtime is naughty but my langauge isn't), because then you can eliminate or reorder calls to it in some cases, which is nice for optimization, which is nice for speed, so I care. 01:33 Shambles_: mithos28: Yes. 01:33 Twey: Shambles_: But what you're typing isn't having side-effects, any more than you have to worry about segfaulting whilst typing in the editor. You can write programs in the editor that may segfault when run, & then you have to worry about segfaults, but if you don't want to write segfault-capable code, you don't have to. 01:34 mithos28: Shambles_: Haskell expressions do not have side effects, no word games about it. 01:35 mithos28: Consider the expression ((lambda (x) 1) ) 01:35 Shambles_: Twey: I don't disagree with what you just wrote. On the other hand, it doesn't seem any different than the nullable/non-nullable pointer, or "pure" type qualifier example, other than those things don't get you the control-flow-controlling aspects of monads. 01:36 Twey: Shambles_: Again, monads do not give you control flow. They can give you sequencing, but only in the sense that they're a way to encode sequencing information (like lists are). 01:36 Shambles_: A Haskell expression may not have a side effect, due to lazy evaluation, but when that expression gets run, it does, if the program is capable of doing something useful or entertaining. 01:36 mithos28: even if is (println "Hello World"), that will just return 1 in haskell, where almost all other languages you get "Hello world" printed 01:36 Twey: Shambles_: Nullable/non-nullable pointers are completely different & not even related. 01:36 mithos28: Shambles_: No 01:36 Twey: Shambles_: When the expression gets run it does not have a side effect. 01:37 mithos28: Conside (seq (println "Hello World") 1) 01:37 Shambles_: If it had no side effect it would be impossible to perform I/O. 01:37 Twey: It may produce an expression that will have a side-effect later, if it eventually gets passed to the runtime (which isn't certain; some other code further up the stack may decide to do something else with it, instead). 01:37 mithos28: Thats because a haskell program is not a haskell expression 01:37 Twey: Shambles_: And that's why we've been saying it's impossible to perform IO in Haskell :þ 01:38 Twey: s/produce an expression/produce a value/ 01:39 Shambles_: And as I've said before, if it was written in Haskell, and when run it does I/O, the language cannot be pure. I've heard the word games. I understand. I'm not trying to be ignorant or trolling. I understand I can return a closure and that's not a side effect, but running the closure could cause a side effect, however, I /do/ insist that *the thing that runs the closure* is impure. To me, Haskell's runtime is just as much 01:39 Twey: Shambles_: You don't understand, though ☺ 01:39 Twey: Shambles_: Essentially, unlike other languages, the evaluation and execution stages are completely separated. The evaluation stage is what we write when we're ‘writing Haskell’. There is also an execution stage, which happens later on the value we produce during the evaluation stage, and that stage may have side effects. 01:40 Shambles_: For the same reason you don't hear people saying "Oh, C is a pure language. The mutation features are actually just shorthand. The runtime (e.g. standard library) is what's impure and bad." You /could/ do that. It just makes you sound silly. 01:41 (join) mye 01:41 Twey: Shambles_: You can do that, but the pure part of C is tiny & not very useful at all, whereas the pure part of Haskell is most of the system and whole of the language 01:41 mithos28: Shambles_: You seem to not understand the difference between returning a value that has type IO a and executing said value 01:41 Shambles_: Twey: Honest to god, I understand. The Haskell program is conceived of as returning a closure, that when run by the runtime, has side effects. And the excuse for calling Haskell pure is that a closure is just a value, and therefore pure. 01:42 Twey: Shambles_: C does a similar separation of evaluation and execution — the evaluation stage is the preprocessor. You can't really do anything at that stage, though, unlike Haskell. 01:42 mithos28: Shambles_: Write a haskell program that is 'not pure' and I will show you why it is pure 01:42 Shambles_: Really, I get it. I just don't accept that Haskell is pure, because it's possible to write programs that perform I/O in it. 01:42 Twey: Shambles_: The ‘closure’ thing was just an analogy. It's not really a closure. 01:42 Shambles_: It's /not okay/ by me to call a language pure, when it can perform I/O. 01:43 Twey: Shambles_: It's not possible to write programs that perform IO in Haskell. It is possible to write programs that return programs that perform IO. 01:44 Shambles_: Twey: Deep down I'm sure it's not a closure, because otherwise I can't imagine how it would perform I/O 'over time' which is important for anything reactive, like most network services and video games, which I know are possible to write. But I do grasp the notion of us pretending it's just a value, wink wink, nudge nudge. I just reject the whole "I can make programs that do useful things in this language, but still claim it 01:44 Twey: Shambles_: You seem to be confused between the system and the language. The language is completely pure: there is no impure instruction in the Haskell language, any more than there is an impure instruction in the C preprocessor language. 01:45 Shambles_: If we allow that: (1). we destroy most of what's useful in the notion of purity, which is actually handy for optimization, and knowing what's safe to evaluate for things like Light Table's live evaluation (2). saying lots of other silly things becomes possible, like C is a pure language, just the runtime is naughty. 01:45 mithos28: Shambles_: What is your argument that c is a pure language? 01:45 Twey: Shambles_: It *is* just a value; there's no ‘wink, wink, nudge, nudge’ about it. It could well be just a string, except that that would be horrible to manipulate. 01:45 Shambles_: Twey: I'm not confused, I juts don't agree. 01:46 Twey: Shambles_: Please point to a single Haskell instruction that makes IO happen. 01:46 mithos28: Shambles_: What does pure mean to you? 01:47 Shambles_: mithos28: Were I to argue C is a pure language, it would go much the same route as Haskell. C has no /language/ constructs (not including the standard library) that perform I/O. It *does* have notation for mutation built in. However, we can treat that as shorthand, much as Haskell does with it's 'state' monad, which really just passes extra arguments to functions, if memory serves. 01:47 Twey: Shambles_: The difference between ‘Haskell is a pure language’ and ‘C is a pure language’ is that C contains impure instructions, like ‘put these bits here’, or ‘print stuff to the console’. Haskell has no such instructions. 01:48 mithos28: Shambles_: So I/O is the only thing that you mean by pure? 01:48 Twey: Shambles_: You can't treat them the same: there's a fundamental semantic difference between the Haskell (immutable) State monad and mutable state 01:48 mithos28: Not referential transpancy? 01:48 Shambles_: mithos28: At that point C is pure, but the runtime is doing the I/O, which is pretty much the exact same situation as Haskell, except most Haskell programmers would probably get all frothy if you made the same claim about C. I'm not trying to make anybody frothy, I'm trying to explain why I can't accept the Haskell excuse. :P 01:48 Twey: Shambles_: It's not an excuse; you just don't understand the distinction :þ 01:49 mithos28: Shambles_: Pure to most people means something different than just no I/O, but is that all that you mean? 01:49 Twey: (& Conal made the same claim about C ages ago, and most Haskell programmers completely agreed :þ) 01:50 Shambles_: mithos28: Essentially, yes. If one performs mutation within a C procedure, but doesn't ever write to a location where a value will be retained (e.g. global or static value), it is, for all intents and purposes, pure. The compiler can treat it as such for purposes of removing unnecessary calls or reordering calls. The user will never /see/ any side effect. It's just as pure as any function written in a pure subset of say, 01:50 Shambles_: That probably got cut off: 01:50 Shambles_: . It's just as pure as any function written in a pure subset of say, Lisp, because /inside the machine/ unobservably, it's going to be mutating registers and memory locations. 01:51 mithos28: so is (lambda (x) (set-box! x 2)) a pure function? 01:51 mithos28: or is that value retained? 01:52 Shambles_: mithos28: And it's possible to convert any usage of a global variable or static variable into a form that doesn't require it, if you didn't have to live with a event-handling API (i.e. if you could always pass state you need to maintain as a argument to another function). So yeah, I/O is the only thing that matters, deep down. 01:52 Twey: Shambles_: And that's the difference between an impure language and an impure runtime. All languages have to have impure runtimes, because, as you say, computers are essentially state machines. However, the *language* is still pure if it doesn't *talk about* or *rely upon* those impurities. You could implement a Haskell interpreter that is completely pure, hypothetically, without changing the program. The same is not true of C. 01:52 mithos28: Shambles_: You cannot do conversion of global variables without whole program compilation 01:53 Shambles_: It's going to return a closure (pure) that when invoked (whatever does this is impure) is going to perform mutation. 01:53 mithos28: Shambles_: With the restrictions you are putting on C, I think I would call that subset pure 01:54 Shambles_: mithos28: Agreed. You also can't get rid of event handling API's if you want remotely efficient computation. I didn't say it was practical to be purely functional. I did say you can /in theory/ transform everything away *except* I/O. Mutation can always be thought of as shorthand. 01:56 Shambles_: Twey: I'm not sure I agree that all languages have impure runtimes. There are toy languages that do nothing but return values. You can observe the values in whatever the REPL is, but it's not possible to write "Hello World" (unless you just type that into the REPL and get the plain string back), because it's not possible to print strings within the language. 01:56 mithos28: imagine I had a c program written in that subset that would return a string 01:56 Shambles_: All practical languages are impure though. 01:56 Twey: Shambles_: They still have impurities happening inside the machine: there's state going on 01:56 mithos28: and another program which interpreted that string (for example as a c program) 01:57 Shambles_: Twey: Sure, but then all languages are impure, since you can't do anything on a Von Newmann machine without mutating a register (at least the instruction pointer). 01:57 Twey: Shambles_: No, all *runtimes* are impure. That's what I just said. 01:57 mithos28: You would call the combination of those two programs impure right? 01:57 (quit) scott_: Quit: Leaving 01:57 Shambles_: I wouldn't agree that basic 4-function mathematics is impure just because a calculator program returns the computed value though. I can't write a 'program' in 4-function math that will perform I/O. 01:58 Twey: Shambles_: A *language* is independent of its runtime, and a *language* is impure if the language *knows about* and *can directly manipulate* those impure aspects of its execution environment 01:59 Twey: Shambles_: Which Haskell cannot 01:59 Shambles_: I consider a language pure if it can't cause observable side effects, and impure if it can. Again, that's the /practical/ concern after all, for optimization and safety purposes. There's really no point in caring about purity for any reason other than optimization and safety. 01:59 mithos28: Shambles 01:59 mithos28: Shambles_: Then any expression in haskell is pure 01:59 Twey: Haskell's IO language can, but that is not the same thing as Haskell being able to. It would be plausible, for example, for the IO-language value generated by a Haskell program to be sent over the network to some sort of execution farm. 02:00 (join) shriphani 02:00 Twey: You get optimization and safety out of that, because the Haskell program isn't relying on the side effects 02:00 mithos28: Shambles_: is BSL (beginer student language) pure? 02:01 (join) scott_ 02:01 (quit) scott_: Changing host 02:01 (join) scott_ 02:02 Shambles_: Twey: Again, I understand the explanation, I just don't agree that it's pure. Doing basic math in a calculator is like looking at a program in a debugger. That's about all you can do with a pure language. Haskell may want to deny it's I/O causing subset, or deny the existence (or impurity of) its runtime, but, for example, Haskell's I/O causing subset has to be specified in Haskell. It doesn't exist without it. 02:02 Shambles_: I'm sure you could define a pure subset of Haskell, in the same sense you can in C, but it's not appreciably different. 02:02 (quit) niels1: Ping timeout: 268 seconds 02:02 Twey: Shambles_: But the ‘pure subset’ of Haskell is just Haskell; it's exactly the same language 02:02 Shambles_: And yes, I heard you about the returning a closure (or similar notions). It's possible to understand and still disagree. 02:03 Shambles_: I've heard, and understood, that some people like asparagus. Me, personally I can't stand the stuff. 02:03 mithos28: Shambles_: What is a haskell expression that is not pure? 02:03 Twey: Shambles_: It isn't, because you haven't accepted my definitions of the difference between a language and a runtime. 02:03 Shambles_: mithos28: One that causes I/O when the program is executed. 02:03 mithos28: give an example. 02:03 Twey: Also, you keep saying things that indicate that you haven't really understood what I've said previously. 02:04 Shambles_: mithos28: This probably isn't useful since I hardly know any Haskell, but I think this is Hello World. 02:04 Shambles_: mithos28: main = print "Hello World!" 02:04 Shambles_: That's impure. 02:05 mithos28: ok so 'print "Hello World!"' has side effects? 02:05 Twey: Shambles_: Haskell doesn't *have* an IO-causing subset. It has a subset that *creates a program* that can do IO; that is not the same thing. Those side effects are potentially very separate in time, space, &c. from the execution of the actual Haskell program. 02:05 Shambles_: mithos28: Yes. 02:05 Shambles_: When I run it at the command line it should print to standard output, if I understood what I read right. That's definitely impure. 02:05 mithos28: so 'let x = "print Hello World!" in x' has the same side effects? 02:06 mithos28: sorry got the quotes off on that 02:06 Twey: Shambles_: Again, like the difference between writing a C program in an editor and executing that program. The program you write in the editor might have side effects, but the writing of it doesn't. 02:07 mithos28: what about 'let x = print "hello World!" in x;x' 02:07 Twey: Haskell is just the editor: it's basically a set of really advanced editor macros for writing impure programs. 02:07 mithos28: if 'print "hello world!' had side effects I would expect that to print hello world once 02:07 mithos28: but it prints it twice 02:08 Twey: mithos28: Actually it's a syntax error :þ 02:08 Twey: {x; x} 02:08 mithos28: Twey: Thanks 02:08 Twey: er 02:08 Twey: do {x; x} 02:08 Shambles_: Twey: Again, I understand, but disagree. I don't know how to make the reasons any more clear that I already have. If the language can cause I/O, it's impure. 02:09 mithos28: Shambles_: Do you still argue that 'print "Hello World!" has side effects? 02:09 Shambles_: mithos28: Yes. 02:09 Shambles_: Because it prints to std out when run at the command line. 02:09 mithos28: then why when I only evaluate it once, but use the value it returns twice do I get the line twice 02:09 Twey: Shambles_: Okay, so how about this: I type an expression into a 4-function calculator. If the result is divisible by two, I will type some text onto my console; if it isn't, I won't. You are arguing that that makes the 4-function language impure. 02:10 Shambles_: mithos28: Again, I'm not that knowledgeable about Haskell, but I suspect the 'twice' is one is the side effect, and one is the REPL telling you the return value. 02:10 mithos28: no, I am using the value x twice 02:11 Shambles_: mithos28: Perhaps, then, it's causing the function to be called twice. 02:11 mithos28: let x = print "Hello World!" in do {x; x} 02:11 mithos28: No print is only called once 02:12 Shambles_: Well, then it's either showing you the two result values, or "the runtime is calling print twice" ;) 02:12 Shambles_: Durned ole evil runtime. 02:12 mithos28: The runtime is calling print twice, but the haskell print is only getting called once 02:12 (quit) jackhammer2022: Quit: Textual IRC Client: http://www.textualapp.com/ 02:13 Shambles_: Twey: A 4-function math isn't impure. A calculator can be seen as a debugger. You can't perform I/O with pure math. Said that when I gave it as an example. 02:13 mithos28: thus the haskell print cannot be calling the runtime print 02:13 (join) Raynes 02:13 Twey: Shambles_: But the 4-function language is causing side-effects. Different side effects are happening (or not happening) based on its output. 02:13 Shambles_: mithos28: I never said anything abou who called who. I said, and I quote: "If the language can cause I/O, it's impure." 02:13 Twey: ↑ 02:13 mithos28: Thats not what I'm asking you right now 02:14 Twey: The 4-function language is causing I/O. 02:14 mithos28: I'm asking you about the side effects of 'print "Hello World!"' 02:14 Twey: A better example to illustrate mithos28's point might be ‘let x = print "Hello World!" in 5’ 02:14 Shambles_: mithos28: However you prefer to think about it, the runitime or the language, it's being told to write to std out twice. 02:15 Raynes: Shambles_: Do you know what referential transparency means? 02:15 mithos28: Shambles_: Right but the question is does 'print "Hello World!"' have side effects? 02:15 Shambles_: And no, the 4-function language is just returning a result, which you can view in the calculator. There's no way to specify "write 1337 to standard output" in 4-function math. 02:16 mithos28: Shambles_: Actually there is, but that is a long digression 02:16 Twey: Shambles_: And that is exactly the case in Haskell 02:16 Shambles_: mithos28: The program has side effects, yes, because it writes to standard output, which is the point of "print". 02:17 Shambles_: If you just want to see Hello World, I suspect you can type the string into the REPL. 02:17 Twey: Shambles_: The Haskell program is just returning a result, which you can view in a REPL. There's no way to specify ‘write 1337 to standard output’ in Haskell. 02:17 mithos28: then why does the printing happen the number of times i use the value returned by print 02:17 Twey: Shambles_: The fact that something else is performing side effects based on the output of the pure program does not make the program itself impure 02:17 Shambles_: Twey, you can view a number or string as a 'value' but Haskell is capable of pictures and sound and sending things over the network and reading/writing files... It's not pure. It performs I/O. 02:18 mithos28: If 'print "Hello World!"' had side effects than it would matter how many times I used the value it returns it would only print once 02:18 Twey: Shambles_: Hey, I can encode a picture in 4-function algebra too. 02:18 Shambles_: It's also worth noting it can do this reactively (using arrows), not just "spit some result out and then die" or "spit out a series of results, then die". So yes, definitely impure. 02:20 Shambles_: mithos28: I'm not terribly sure of what you're getting at. I know there's lazy evaluation, and closures, in Haskell. Causing print to be called multiple times isn't much more interesting than calling it twice in Bash or Python. 02:20 Twey: Shambles_: I type an equation into a 4-function calculator. If the result is divisible by 2, I will draw a pony on my screen with the mouse. If the result is divisible by 3, I will type in another equation and repeat the process. If the result is divisible by 5, I will cease execution. 02:20 mithos28: Shambles_: the program has nothing to do with laziness or closures 02:21 Twey: s/equation/expression/g 02:21 Shambles_: mithos28: It writes to standard output, a side effect, specified in Haskell the language, thus the language is impure. 02:21 Twey: Shambles_: Is the 4-function language impure now? 02:22 (join) mceier 02:22 Twey: Shambles_: The program mithos28 just wrote does not write to standard output 02:22 Shambles_: Twey: If the 4 function language causes I/O, rather than just resulting in values you can view in the calculator, then yes, but then of course it's not conventional 4-function math any more. 02:23 Twey: Shambles_: But the language didn't change. There's still no ‘draw a pony’ command in the 4-function language. 02:23 Shambles_: Well, it's not writing Hello World to std out when run, then it's not what I intended as an example of impure code. 02:23 Twey: Shambles_: But there is no such example in Haskell. 02:24 Twey: Shambles_: For example: let x = print "Hello, world!" in 5 — this program does not print anything 02:24 mithos28: Shambles_: You failed to see how I modifiied your example 02:24 Shambles_: Twey: A calculator views results from math expressions, like a debugger views values in most programs. The language doesn't normally draw ponies. If you redefine basic math to draw ponies, then yeah, it's impure, it's just not basic math any more. 02:24 mithos28: even change the 5 to seq x 5, so there is no reason to call laziness into account 02:25 Shambles_: mithos28: If it's not doing any output, it's not impure, no. 02:25 Twey: Shambles_: The ‘print’ function takes a string and returns a value that *describes* the action of printing the string to the console. It doesn't actually do the printing itself. 02:25 Shambles_: Well, no input/output. 02:25 Twey: Shambles_: You can, for example, throw that value away, and never give it to the runtime. 02:25 Shambles_: Come on, you guys are sharp enough to figure out basic Haskell, you're just trolling me now, or being hard headed. I've been very explicit about the problem with calling Haskell pure. I'm sure you 'get it' by now. 02:26 Twey: Shambles_: We get it, you're just wrong :þ 02:26 Shambles_: If you can make executables that do I/O, it's not pure. You can do that in Haskell, so it's not pure. 02:26 Raynes: I'm not sure that they're the ones trolling here partner. 02:26 Twey: Shambles_: You can do that in 4-function arithmetic, too. 02:26 mithos28: Shambles_: Haskell expressions are pure 02:27 mithos28: That is what I have been arguing the whole time, you seem to keep on ignoring that fact 02:27 Twey: Shambles_: Say, write the result of each expression mod 256 as the value of the next byte in a binary file 02:27 Shambles_: Raynes: If i was a troll I think I'd have been figured out long ago. I've been on this channel for months now. I've corrected several errors in the documentation. Wrote on the mailing list about my problems trying to work with GUI's in Racket. 02:27 Raynes: I figured it out about 5 minutes ago. Does that count? 02:27 Raynes: <3 02:28 Shambles_: Raynes: Believe whatever you want. 02:29 (quit) mye: Quit: mye 02:32 ozzloy: wow 02:32 mithos28: ozzloy: Do you also need an explanation of why racket is eager? 02:32 ozzloy: what? no. 02:33 mithos28: Cause I think we could go on this road for a long time 02:33 ozzloy: in the slim chance that this will help: you disagree on the application of the term "pure" in the case of haskell 02:34 ozzloy: it seems to be purely a vocabulary issue 02:34 ozzloy: everyone involved understands all the concepts involved 02:34 ozzloy: you're all very smart and should get an A 02:34 mithos28: ozzloy: Can I get an A+? 02:35 ozzloy: lulz 02:36 ozzloy: when you say "why racket is eager" do you mean the thought process that went into making that decision, or explaining eager versus lazy? 02:36 ozzloy: i'm mildly interested in the former 02:36 Shambles_: I thought Scheme was eager, and Racket was mzScheme until recently. 02:37 mithos28: Oh I was choosing some stament that 'language' was 'property', and was trying to bring it back to the channels namesake 02:37 Shambles_: Err, sorry, PLT Scheme. I think maybe mzScheme before that. 02:37 jonrafkind: this is a marathon debate 02:37 jonrafkind: whos winning? 02:37 Shambles_: I don't know. According to Raynes I'm a troll. 02:37 mithos28: Shambles_: mzscheme was the name of the command line interpreter 02:37 Shambles_: So I either won or lost. I'm not sure which. Does somebody have to compare me to Hilter now? 02:37 jonrafkind: yea you kinda look like hitler 02:37 Shambles_: I mean we were already talking about purity, so why not. 02:38 jonrafkind: what with your mustache 02:38 (join) hkBst 02:38 (quit) hkBst: Changing host 02:38 (join) hkBst 02:38 (quit) ewemoa: Quit: Leaving. 02:40 (quit) Kaylin: Read error: Connection reset by peer 02:43 (join) nilyaK 02:46 Raynes: To be fair, you called everyone else trolls immediately prior to that. 02:46 ozzloy: i found the blog post about c being purely functional funny 02:46 ozzloy: thanks for that 02:54 Shambles_: ozzloy: I didn't have anything to do with a blog post, actually. 02:55 ozzloy: oh i know 02:55 ozzloy: i think Twey linked it 02:55 Shambles_: Raynes: As I said, believe what you want. I've been here quite a while, and worked to get some minor problems with documentation and a bug with some of the demo games working fixed. 02:56 mithos28: Shambles_: That just means you are playing the long game 02:56 Raynes: I think you're taking the word 'troll' too literally. 02:56 Shambles_: Raynes: I suspected I was being trolled when, after about a hour, two clearly pretty bright people seemed determined to argue I didn't understand something, when I actually clearly did, and explained why I made the claim I did. 02:56 mithos28: Shambles_: It was that or read a paper I don't understand 02:57 Raynes: Well, you can't just dismiss someone because they think you don't understand something. That's essentially declaring that it is not at all possible for you to be wrong. 02:57 Raynes: "They think I'm wrong? What's wrong with them." 02:57 Shambles_: mithos28: Actually I hang out here because I occasionally need to bother people with "how do I do X" questions, which will probably flair up again when I play with the book I'm getting, and maybe again after that when I try to teach a friend Clojure or Racket, if they pick Racket. I'm currently helping them learn Python. 02:58 ozzloy: can we all just hate on coldfusion for a bit? 02:58 Raynes: I second that motion. 02:58 Shambles_: I'd rather make sure they're used to the idea that shotgun formatting is bad before I give them a language that lets you write a first person shooter as a several hundred page one liner. :P 02:59 Shambles_: Raynes: I said it'd gone on over a hour, I didn't 'just dismiss someone'. Geez, read the history. :P 02:59 Haffe: An fps in RACKET. 03:00 Haffe: That would be awesome. 03:00 Shambles_: So long as it's not a one liner. :P 03:00 ozzloy: aw man, i can't find my cfml wtf doc 03:00 Shambles_: I hope there's never a International Obfuscated Scheme Source Smackdown. 03:01 Haffe: I wonder if RACKET would work well with procedural synthesis. 03:01 ozzloy: what is "procedural synthesis"? 03:01 mithos28: random generation under a cool new name 03:01 Shambles_: Probably. I bet you could even use macros to cook up fancy, efficient, shaders, since there's at least 2 OpenGL interfaces. 03:02 Raynes: Well, that still implies that you are undeniably correct and everyone who thinks you're wrong is silly an… sigh. I digress. I could be playing Castlevania or something. 03:02 Shambles_: Not necessarily (purely) random. It's doing things like generating textures of concrete at runtime, so it's seamless, with no repeats. 03:02 Shambles_: Hard to do well for anything organic, but often works well in metal and concrete worlds, or as parts of a engine that aren't /all/ procedural. 03:03 Shambles_: Some people have done really nice looking procedural plants though. 03:03 (join) mye 03:03 (nick) scott_ -> tsion 03:03 ozzloy: oh, i remember some game being launched and the presenter kept saying "and all of this is procedurally generated" and the crowd cheering 03:03 Shambles_: Raynes: No more so than people going on over a hour that I didn't understand. :P 03:03 ozzloy: spore? 03:04 Shambles_: ozzloy: Spore was one. The one you may be remembering was that tiny shooter at one of the programming contests. 03:05 Haffe: kkriger 03:05 (join) tsion 03:05 Haffe: There are also some very cool procedural synthesis demos on youtube. 03:05 Haffe: One of them generates strawberry plants. 03:06 Twey: Shambles_: You didn't understand :þ You thought the result of ‘let x = print "foo" in do { x; x }’ was the result of print being called multiple times 03:07 Shambles_: ozzloy: Took a bit to find, but here it is: http://www.mobygames.com/game/kkrieger-chapter-1 03:08 Shambles_: 96 kilobytes, most stuff procedurally generated, and doesn't look too awful! 03:08 Haffe: It eats loads and loads and loads of ram though. 03:08 ozzloy: wow, that's amazing 03:08 ozzloy: windows T_T 03:08 Shambles_: Twey: That wasn't the issue, though yes, I didn't understand that code. I said I wasn't extremely knowledgeable about Haskell when the discussion started. 03:09 Shambles_: I've seen some procedurally generated trees that were very realistic, and some ferns. I think the thing that impressed me the most was the bark. 03:09 Shambles_: It's hard to get decent looking bark textures. 03:10 Twey: Shambles_: It is very much the issue, because that was the core of what we were trying to explain 03:10 Shambles_: ozzloy: Might work in Wine. Dunno. 03:10 ozzloy: meh 03:11 Shambles_: Twey: Nothing to explain. I get that they want you to consider programs as values, so they can dodge taking responsibility for side effects. I get it, really. Still, side effects happen when it's run. That's where I take issue. It's describing I/O. The definition I use of purity says that's a no-no. 03:11 ozzloy: Twey, let me see if i understand correctly what you're saying about haskell wrt purity 03:13 Twey: Shambles_: But that's a *different language*. Just as in my calculator example — I was describing a different language composed of expression results that caused side effects to happen, quite orthogonally to the (pure) 4-function language. I even explained what it means for a language to be pure. 03:14 Shambles_: Twey: And I don't accept that definition. I'm not okay with saying Haskell is two languages. Haskell is Haskell. You write 'in this thing people call Haskell'. It makes I/O happen when you run the program. Thus, by my definition, it's impure. 03:15 Twey: Shambles_: Haskell isn't two languages. Haskell is one language that you write. 03:15 Twey: That language does not make IO happen, any more than 4-function arithmetic does. 03:15 ozzloy: when you write print "foo" in haskell, that's just a description of a program that would print when run 03:15 Twey: However, that language can be used to describe another language that makes IO happen; that's independent of how the first language actually works. 03:16 Twey: Importantly, it doesn't affect the safety of optimization concerns with regards to the first language. 03:16 Twey: s/of/or/ 03:16 Shambles_: Twey: To try to draw an analogy, assuming your really still don't understand the argument. You could say "Dogs are bad." I would say "I don't agree. /Some/ dogs are bad, but not all of them." Then you could say, "That species that isn't bad are called scoochie-snugga-wuggums." Then I say "I disagree. I consider them both dogs." Then you could claim I don't get it, and am wrong, and we could go back to the beginning of 03:17 Shambles_: The "other language" doesn't have a name besides Haskell. 03:17 Shambles_: At least not one people actually use. 03:18 Twey: Shambles_: I absolutely understand your argument. It's just wrong. There is a formal definition of ‘language’, and it's completely unrelated to the results of another agent reading the results of evaluating the language and doing things. 03:18 Raynes: wow 03:18 Twey: Shambles_: The name of the language is ‘IO’. 03:18 Twey: As in ‘the IO monad’, for example. 03:18 ozzloy: Twey, am i correct so far? 03:18 Twey: ozzloy: Yes 03:19 mithos28: http://i.imgur.com/tCp90.gif 03:19 ozzloy: ok. so in racket, it's like writing (lambda () (print "foo")) 03:19 Shambles_: The 'other language' isn't used for anything but Haskell. When somebody programs "in Haskell" the whole point is for it to be evaluated. You can say I'm wrong all day, but I'm not going to agree with you. 03:19 Twey: ozzloy: No 03:19 ozzloy: mithos28, lulz 03:19 Twey: ozzloy: More like '(print "foo") 03:19 ozzloy: Twey, no? 03:19 ozzloy: oh, sure 03:20 Twey: Shambles_: Again you show that you don't really understand 03:20 Twey: Shambles_: Like I've said a bunch of times, *evaluation is not the same as execution*. 03:20 Twey: Haskell is evaluated. That is a pure operation. 03:20 ozzloy: so haskell isn't executed 03:20 ozzloy: ? 03:20 Twey: The IO language can be executed. That is probably not a pure operation. 03:21 Twey: ozzloy: Not in any useful way, no 03:21 Twey: I mean, at some low level there's execution going on, but the evaluation is the part that is relevant to your program 03:21 ozzloy: so the name of the thing that gets executed is The IO Language? 03:21 (join) relrod 03:21 Shambles_: Okay, it's evaluated, then executed, which honestly probably doesn't break down to what actually happens in the machine, which is where my definition comes from. I don't deny that all programs mutate state in conventional computers when run. That's why I don't require a program that uses mutation internally to be considered impure. It's if it has observable side effects. 03:21 Twey: ozzloy: Usually just ‘IO’ 03:22 ozzloy: can i write IO? 03:22 Twey: Sure 03:22 ozzloy: not haskell that evaluates to IO 03:22 ozzloy: IO 03:22 ozzloy: ? 03:22 Shambles_: Programs written in Haskell, when run, have side effects, and therefore I insist on calling them impure. You're free to disagree, but I'm not changing my definition to allow Haskell to be pure, because if I do it, we start having to call a lot of things pure that I don't think make much sense. But if calling it pure helps you sleep at night, go right ahead. I can't stop you. :P 03:23 Twey: Well, yes, in theory: it's a language (in the mathematical meaning) so it's isomorphic to anything that has the same semantics and abstract syntax 03:23 Raynes: Is the definition of pure even debatable? Isn't there an actual definition of pure that makes one of your arguments invalid? 03:23 Twey: Shambles_: Programs written in Haskell *do not* have side effects when run. 03:24 Twey: That's where you appear to be confused. There is *nothing* in Haskell that explicitly causes a side effect to happen. 03:24 Raynes: Instead of "hurr hurr, my definiton says you're wrong" 03:24 Shambles_: Raynes: I don't think purity is 'pinned down' enough for either of us to be 'proven' right or wrong. For a concrete example, some people would say a function that mutates state /internally/ is impure. I understand where they're coming from. For those people, the definition of purity is in how the program is /represented/ not (just) what it does when they run it. 03:25 Twey: Side effects may or may not happen after the Haskell has been evaluated, but that's independent of the actual Haskell written. 03:25 Twey: Again, it's just like saying that you are causing a side effect to happen by typing out a ‘hello world’ program in your editor. 03:25 Shambles_: Raynes: However, in my case, I only care about the practical aspects. I care about whether something screws up optimization, or has observable behavior (as in, as a user, not somebody staring at it in a debugger). 03:25 Raynes: In any case, I'll stick to the definition that makes sense, which appears to be Twey's. 03:25 ozzloy: Twey, is it possible for me to write IO right now in a text editor? 03:26 Twey: ozzloy: Nope; it's an abstract language, it doesn't have a textual syntax 03:26 ozzloy: i see 03:26 Twey: Though of course you could make one if you felt like it 03:26 ozzloy: of course 03:27 Shambles_: Raynes: And I think it cheapens the term to start using the term 'pure' for things which /do/ have observable behavior, and thus can't be eliminated, have the numbers of calls changed, or be reorderd, because then you'd experience different behavior. I also don't like that we could start having reduced optimization opportunities. 03:27 Twey: Shambles_: And that's why we don't use the term ‘pure’ for those things. 03:28 mithos28: Shambles_: Many people don't treat non-termination as an effect but that cannot be eliminated 03:28 Twey: mithos28: In Haskell and up it's generally considered an effect 03:28 Shambles_: Twey: I think it's also misleading to call a language 'pure' and then start saying "all that impure stuff we're embarassed of is actually /another/ language that only exists to be described in this one, so we don't have to accept credit". 03:28 Twey: Well, Haskell's borderline. 03:28 Shambles_: I didn't kill that man officer! It was my /evil twin/! 03:28 mithos28: Twey: What languages consider it an effect? 03:29 Twey: Shambles_: But there is a significant difference between having one language and two. The two languages have different semantics, and those safety and optimization guarantees you were talking about don't cross-contaminate. 03:30 Twey: Shambles_: You *do* get all the benefits of purity in Haskell, because you have completely pure semantics. 03:30 Twey: mithos28: Haskell to some extent, though there's no syntactic support for it. Agda, Idris, ATS, &c. 03:30 mithos28: Twey: I think you are proving my point about most people 03:31 Twey: mithos28: Aye; I did say ‘Haskell and up’. :þ 03:31 Shambles_: Twey: I understand the purpose of how Haskell handles I/O. It's (if a function is pure it can only call pure ones, thus all the impure functions 'bubble up' the implementation toward the main function, leaving the majority of the code pure) the way it has to be if you want maximum optimization opportunities. 03:31 mithos28: Also Agda doesn't treat non-termination as an effect 03:31 mithos28: it doesn't have non termination 03:31 mithos28: I don't know about the others 03:32 Twey: mithos28: It has a non-termination monad that can be used to reify non-termination as an effect 03:32 mithos28: ah didn't know that 03:32 Twey: Sorry, a ‘Partiality’ monad 03:32 Shambles_: Twey: I hope, by now, you understand why I consider Haskell impure (because programs written in it can perform I/O when run), and why I consider it a word game (the whole pass the buck of blame) to claim it's pure. You can disagree. I'm sure you will. But you should be able to understand me by now. 03:32 Twey: http://www.cse.chalmers.se/~nad/repos/lib/src/Category/Monad/Partiality.agda 03:32 rudybot: http://tinyurl.com/7aofntw 03:33 Twey: Shambles_: I've understood you the whole time, but your definition stems from a lack of understanding of the formal concept of a language 03:33 Twey: And the way that language semantics interact (or rather don't, in this case) 03:34 ozzloy: surely you can appreciate that someone might use the term "language" to include the haskell runtime though? 03:34 Twey: ozzloy: Sure, but that's not a useful definition when you're talking about purity guarantees 03:35 ozzloy: Shambles_, do you consider a purely functional language useful? 03:35 Twey: The presence or absence of the runtime doesn't affect the guarantees of the language 03:35 Shambles_: Twey: Its not that my definition stems from a lack of understanding of the formal concept of a language. I understand programming languages can be formalized. I understand you can have more than one. I understand they can be pure or impure. I understand a impure on can call a pure one. 03:36 Twey: Shambles_: A language is a set of words over an alphabet with (in this case) a formal semantics 03:36 ozzloy: Twey, come on now 03:36 Twey: None of those things are shared between Haskell and IO. The set of valid words differs. The semantics differ. Even the alphabets differ. 03:36 Cryovat: What neither of you seem to understand is when to call it quits :P 03:36 Shambles_: Twey: I *also* understand that nobody uses the syntaxless "IO language" that Haskell uses as a cop-out to be able to claim it's pure while still being able to do I/O. It aught to just own up to the fact that to be useful, a programming language needs to be able to do I/O (and usually some mutation too). Haskell isn't 'special' in that respect. The /real/ special-ness is in the type system. 03:37 Twey sighs. 03:37 (quit) nilyaK: Quit: Leaving. 03:38 ozzloy: Twey, if you restrict "language" to "set of words over an alphabet" then what language isn't pure, and why? 03:39 ozzloy: surely a set of words over an alphabet could never cause mutation 03:39 ozzloy: or IO 03:39 ozzloy: or side effects at all 03:39 Twey: Shambles_: The presence or absence of the IO language doesn't change the guarantees on Haskell itself. You can't eliminate a statement from an IO program in Haskell and get the same answer for the same reason you can't eliminate an operand from an arithmetical sum and get the same answer — there's nothing impure about it. 03:39 Twey: ozzloy: It doesn't. An impure language is one that talks about or relies upon the side effects that happen in the course of its evaluation. 03:40 Shambles_: Twey: I'm sure that if we ignore the "IO language" we can make all the usual guarantees you can make about pure languages. However, Haskell isn't good for much without the "IO language", and once you involve it, its not appreciably different from other programming languages /except for its type system/ and perhaps lazy evaluation which, while not unique, isn't particularly widespread. 03:41 Shambles_: Well, implicit lazy evaluation anyway. Lots of languages let you mark areas as explicitly lazily evaluated. 03:41 Twey: ozzloy: You can't evaluate C, for example, without having a memory. C's semantics do not translate to a pure context. Haskell, on the other hand, doesn't directly rely on the presence of mutation or other side-effects for its evaluation. 03:41 hkBst: who cares about purity? Referential transparency is where it's at! 03:42 Twey: Shambles_: It's still appreciably different because the main part of Haskell programs are not written in the IO language 03:42 Twey: s/are/is/ 03:42 Shambles_: hkBst: Possibly "ha ha, only serious'. I did bring up the idea that a procedure could use mutation internally, and still effectively be a pure function earlier. :P 03:43 Twey: Shambles_: You lose the guarantees on the parts written in the IO language itself, obviously, but most of the program is written in Haskell, and so has the guarantees. That's why the distinction between the languages is important. 03:43 ozzloy: Twey, and you can evaluate haskell without memory? 03:43 Shambles_: Twey: The same could be said of /all religi... / Err, all programming languages with pure subsets. 03:43 (quit) mceier: Ping timeout: 260 seconds 03:44 (join) niels1 03:44 Twey: ozzloy: In theory, yes. Obviously in practice a stack or graph or something is necessary, but the language itself is independent of the implementation. 03:44 ozzloy: can you give a short example? 03:45 ozzloy: like, x = 3; print x; x = 4; print x; something like that isn't allowed? 03:46 ozzloy: i'm not too familiar with haskell 03:46 Twey: Shambles_: Yes, but a ‘language with a pure subset’ is going to be contaminated by the semantics of its impure subset. That's the problem that Haskell endeavours to solve by having *two* languages. 03:46 Twey: ozzloy: Correct, that is not allowed in Haskell 03:46 (quit) tsion: Quit: Leaving 03:46 ozzloy: because you can't do the x = 4 part? 03:47 Twey: ozzloy: Or the ‘print x’ parts, or the ‘x = 3’ part (with the same meaning). 03:47 ozzloy: ... 03:48 Shambles_: Twey: C is normally considered to be impure. GCC allows you to mark functions as pure. I'm not sure, but I think it enforces that pure functions can only call pure functions. If this is so, it isn't any more 'contaminated' than Haskell. It's just that people would still just say "it's C" not "it's C, and a IO language". 03:48 (quit) mye: Quit: mye 03:48 Twey: ozzloy: Writing something like that in Haskell would actually give you something like '((= x 3) (print x) (= x 4) (print x)) when evaluated 03:50 Twey: Shambles_: Well, technically the pure subset *is* then a different (sub-)language, since it has different semantics. I very much doubt that the pure subset is actually completely pure, though, because that's exceedingly difficult to do with C. 03:50 Twey: Shambles_: The main difference is that in the C case the code is part of the same language being written, not a first-class object in the main language 03:51 Shambles_: Twey: Now see, that's where most people (not just me) would disagree. They wouldn't say "they're two different languages". They'd say "some of these procedures [still in the C programming language] have a pure attribute". 03:51 (quit) mithos28: Quit: mithos28 03:51 Twey: Shambles_: They have different semantics, therefore they are different languages; please refer to the definition of ‘language’ I gave earlier 03:52 Twey: The IO language differs much more from Haskell than the pure subset of C does from standard C, though. 03:52 Shambles_: If we were to start using that definition, then all "programming languages" would have a vast explosion of "languages" within them. Doesn't make much practical sense to me. 03:53 Twey: Shambles_: I gave a technical definition that would help our argument along, not a vulgar definition based on what makes for easy conversation 03:53 Shambles_: You could pick most anything down to, possibly, a single statement or operator, and call it a language. More than likely each one would have unique attributes, and they might not be any more or less important for practical purposes (optimization, expressiveness, etc.) than a procedure being marked pure. 03:53 Twey: Yes, in practice people only consider things to be different languages when they are ‘substantially different’. 03:53 Twey: And not a subset of another language. 03:56 Shambles_: In practice people consider something a " programming language" when it's part of a unifying definition, generally used together, and has related semantics. For example, the ANSI C standard specifies what people call the C language (unifying definition). The syntax for pointer dereferencing is usually used with the syntax for pointer assignment, and thus aren't separate languages. It's all imperative and follows related ru 03:57 Shambles_: Which is where there's the issue for me with Haskell. The "IO language" is specified in the description of Haskell, /only/ useful with Haskell, and has related (but admittedly not the same, if you consider Haskell only the pure parts of Haskell) semantics. 03:57 Twey: Not related *at all*. 03:57 Twey: It's as different from Haskell as C is. 03:58 Shambles_: Related in that one (the impure part) dictates things about the order of evaluation in the other part. 03:58 Twey: That's actually not specified 03:58 Shambles_: Pretty necessary, unless you want it to delete a file, and then ask you if it's okay, rather than doing it in the sane order. :P 03:59 Twey: No, not really 03:59 Twey: All those things would be done in the IO language; the evaluation order of the IO language is specified 04:01 (quit) jonrafkind: Ping timeout: 260 seconds 04:01 Shambles_: There could be computation inbetween. The IO language would have to dictate the order of everything else. 04:01 Twey: The only relation is that the IO language can refer to Haskell values 04:02 ozzloy: why is this so infuriating 04:02 Twey: How & when Haskell generates them is an implementation detail 04:02 ozzloy: it's pretty clear what's going on 04:02 Twey: E.G. it's reasonable to ‘spark’ values & start evaluating them before they're needed, if it becomes clear that they will be 04:02 Twey: ozzloy: Hmm? 04:03 ozzloy: it's weird, isn't it? 04:03 ozzloy: from like an anthropological standpoint 04:05 ozzloy: Twey, you and Shambles_ are talking about different things 04:05 ozzloy: at least that's my read of the situation 04:06 Twey: ozzloy: I thought so, which was why I tried explaining more clearly what I was talking about 04:07 Twey: Right down to defining ‘language’ and why that's the interesting definition to use 04:07 Shambles_: My read is: I don't agree with Twey's definition of Haskel as pure. Twey thinks my definition is wrong, and can't accept that I won't change it to agree with them. 04:09 Twey: Shambles_: But you seem to think that your definition of ‘Haskell’ as impure has some bearing on the properties of the language itself, which it doesn't; I've been trying to explain *why* it doesn't make a difference 04:09 Twey: Haskell+IO is an impure system, I won't disagree. The problem I have with your definition is that you seem to believe that that means that Haskell misses out on some of the benefits of being pure, which is not the case. 04:10 Shambles_: I accept that Twey won't ever change their mind, but I don't accept that I'm wrong. By my reconing, Haskell is the *only* programming language that has ever pulled this stunt with calling itself pure, while still being able to do I/O, and when confronted with the fact that is impossible, shoves the blame onto a 'programming language' that is (1). defined in the Haskell standard (2). only useful as a part of Haskell (3). has 04:10 Twey: Shambles_: Also, I feel I should tell you that your messages often get cut off (that one after ‘(3). has’) 04:11 ozzloy: yeah, what's up with that? 04:11 Twey: There's a maximum message length, is all 04:11 ozzloy: ic 04:12 (join) bitonic 04:12 Shambles_: Reminds me of when Java, a looooong time ago, made the bold statement that it had no pointers, and thus all those bad things that happen with pointers in bad ole C and C++ can't happen. Then people pointed out you can't really get much done without /some/ way of building data structures, and they had to admit that they had references, which were C/C++ pointers - pointer arithmetic, that were sanity checked at run time. Of c 04:12 Twey: If you use a plugin like irssi's splitlong your IRC client will automatically break your message into multiple messages if your message would otherwise be cut off 04:12 Twey: Shambles_: ‘Of c’ 04:12 Shambles_: (3). has no syntax separate from Haskell. 04:12 Shambles_: Of course pretty much everything bad that happens with C/C++ pointers happens with references, except scribbling over bits of memory. 04:13 Shambles_: It made Java sound so much safer though. Just like the claim there would be no memory leaks with garbage collection... unless you consider the fact that if you don't ever set a reference to NULL, it'll hold onto things indefinitely, which is what causes most memory leaks in C/C++ anyway, since most programmers know you need to free when you set a pointer to NULL. 04:13 Twey: Shambles_: It does have a syntax that is completely separate from Haskell's. Don't confuse abstract syntax (which constructs may interact with one another in what ways) with concrete syntax (what the language looks like when written down). It doesn't have a concrete syntax (at all; it doesn't use Haskell's, either), but it does have an abstract syntax, which is quite different to Haskell's. 04:14 Twey: The abstract syntax is what defines how the language actually works; the concrete syntax can be changed on a whim without making a difference to the behaviour of the program (e.g. S-expressions vs. M-expressions are instances of different concrete syntaxes for a single abstract syntax). 04:15 Shambles_: Mmm... There's a parse tree (abstract syntax tree), but blurring the lines between syntax and semantics is pretty uncool too. Heck, the same language (program even) can have pretty different parse trees, if one semantic analysis performs different decoration than another. 04:16 ozzloy: well i'm off to sleep 04:16 Shambles_: In any case, I'm talking about the "concrete syntax" which is what most people mean when they say "syntax". i.e. "the stuff I wrote down" 04:16 Twey: Shambles_: It's not blurring the lines between syntax and semantics. Once again, there are perfectly well-specified formal definitions, to which the meanings I'm using here adhere perfectly well. 04:17 Twey: ozzloy: 'night! 04:17 Shambles_: If you say so. 04:17 Twey: ozzloy: You can join in with the discussion again when you wake up ;) 04:17 Shambles_: You gave a good explanation of monoids in the beginning, but I haven't really gotten anything out of the last several hours of running in circles with you. I'm sure you understand me, you just don't like what I'm saying. 04:17 Twey: Shambles_: The syntax is about what constructs go where; the semantics is about what those constructs mean & how they are evaluated 04:18 Twey: The syntax is what says you can't have a ‘print >>= getLine’ (take the return value of a print and feed it into a getLine) 04:19 Twey: The semantics is what says that ‘getLine >>= print’ means to take a line from the console, then print it out again 04:20 Twey: Shambles_: Did you see this message? 100937 < Twey> Haskell+IO is an impure system, I won't disagree. The problem I have with your definition is that you seem to believe that that means that Haskell misses out on some of the benefits of being pure, which is not the case. 04:21 Twey: That's why I don't like your argument: you're taking the vulgar definition of ‘language’ and using it to talk about semantics, where only the formal definition is really relevant. 04:37 (join) mammoth3 04:40 (quit) mammoth: Ping timeout: 252 seconds 04:43 (join) veer 04:43 (quit) cdidd: Remote host closed the connection 04:46 (join) mye 04:56 (quit) mammoth3: Ping timeout: 268 seconds 04:56 (join) noelw 05:00 (join) masm 05:08 (join) mceier 05:11 (quit) veer: *.net *.split 05:11 (quit) shriphani: *.net *.split 05:12 (quit) blubberdiblub: *.net *.split 05:12 (quit) stchang: *.net *.split 05:12 (quit) ChanServ: *.net *.split 05:12 (quit) JStoker: *.net *.split 05:12 (quit) ozzloy: *.net *.split 05:12 (quit) gf3: *.net *.split 05:12 (quit) stamourv: *.net *.split 05:12 (quit) bitonic: *.net *.split 05:12 (quit) sizz: *.net *.split 05:15 (join) veer 05:15 (join) bitonic 05:15 (join) shriphani 05:15 (join) JStoker 05:15 (join) sizz 05:15 (join) blubberdiblub 05:15 (join) stchang 05:15 (join) ozzloy 05:15 (join) gf3 05:15 (join) stamourv 05:15 (join) ChanServ 05:20 (quit) niels1: *.net *.split 05:20 (quit) hkBst: *.net *.split 05:20 (quit) asvil: *.net *.split 05:20 (quit) mario-goulart: *.net *.split 05:20 (quit) ormaaj: *.net *.split 05:20 (quit) jrslepak: *.net *.split 05:20 (quit) m4burns: *.net *.split 05:20 (quit) mceier: *.net *.split 05:20 (quit) noam: *.net *.split 05:20 (quit) SeanTAllen: *.net *.split 05:20 (quit) danking: *.net *.split 05:20 (quit) cky: *.net *.split 05:20 (quit) mye: *.net *.split 05:20 (quit) DT``: *.net *.split 05:20 (quit) Shviller: *.net *.split 05:20 (quit) Raynes: *.net *.split 05:22 (join) mceier 05:22 (join) mye 05:22 (join) niels1 05:22 (join) hkBst 05:22 (join) Raynes 05:22 (join) asvil 05:22 (join) DT`` 05:22 (join) Shviller 05:22 (join) mario-goulart 05:22 (join) ormaaj 05:22 (join) jrslepak 05:22 (join) noam 05:22 (join) m4burns 05:22 (join) cky 05:22 (join) danking 05:22 (join) SeanTAllen 05:23 (quit) mmc1: *.net *.split 05:23 (quit) SamB_MacG5: *.net *.split 05:23 (quit) DraX: *.net *.split 05:23 (quit) sid0: *.net *.split 05:24 (join) mmc1 05:24 (join) SamB_MacG5 05:24 (join) DraX 05:24 (join) sid0 05:24 (join) samth_away 05:25 (quit) mye: *.net *.split 05:25 (quit) DT``: *.net *.split 05:25 (quit) Shviller: *.net *.split 05:25 (quit) Raynes: *.net *.split 05:26 (quit) mceier: *.net *.split 05:26 (quit) noam: *.net *.split 05:26 (quit) SeanTAllen: *.net *.split 05:26 (quit) danking: *.net *.split 05:26 (quit) cky: *.net *.split 05:26 (join) mye 05:26 (join) Raynes 05:26 (join) DT`` 05:26 (join) Shviller 05:27 (join) mceier 05:27 (join) noam 05:27 (join) SeanTAllen 05:27 (join) danking 05:27 (join) cky 05:27 (quit) SamB_MacG5: Ping timeout: 246 seconds 05:28 (quit) Shambles_: *.net *.split 05:28 (join) niels2 05:28 (join) Shambles_ 05:30 (quit) acarrico: *.net *.split 05:30 (quit) offby1: *.net *.split 05:30 (quit) niels1: Ping timeout: 240 seconds 05:30 (join) acarrico 05:30 (join) offby1 05:31 (quit) mye: Quit: mye 05:43 (join) SamB_MacG5 05:58 (quit) bitonic: Ping timeout: 260 seconds 06:09 (join) MightyFoo 06:09 (nick) MightyFoo -> tim-brown 06:14 tim-brown: i'm running the optimisation coach in TR, but it's not "coaching me", rather it's just highlighting busy areas, just like running a profiler 06:14 tim-brown: how do i get hints? 06:30 (quit) veer: Quit: Leaving 06:31 (part) mmc1 06:51 (join) bitonic 06:58 (quit) bitonic: Ping timeout: 245 seconds 07:11 (join) bitonic 07:12 (quit) bitonic: Remote host closed the connection 07:12 (join) bitonic 07:13 (join) mye 07:39 (join) nathanpc 07:48 (join) jsj 07:48 (join) greghendershott 08:11 asvil: hi all, does anyone try to debug racket[3m]? I mean "c" side of racket. I have small problem with it. 08:28 (join) mizu_no_oto 08:32 (join) Shvillr_ 08:33 (quit) Shviller: Disconnected by services 08:33 (nick) Shvillr_ -> Shviller 08:34 (quit) Shvillr: Ping timeout: 252 seconds 08:35 (join) Shvillr 08:35 (quit) mye: Quit: mye 08:44 (quit) noelw: Quit: noelw 09:04 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:05 (quit) bitonic: Ping timeout: 245 seconds 09:06 (join) jeapostrophe 09:09 (join) bitonic 09:27 (join) anRch 09:32 asumu: tim-brown: right click on the colored areas, there should be a menu option to show them 09:36 (quit) bitonic: Ping timeout: 255 seconds 09:36 tim-brown: asumu: yeah... i've just read the docs 09:37 tim-brown: i'm having real problems with right-mouse menu popups on my X windows system 09:37 tim-brown: something keeps forcing the menu to pop down, and I can't figure out what it is. 09:38 asumu: tim-brown: I have the same problem with DrRacket on Linux. 09:38 tim-brown: takes me a bout 5 goes to get to "rename identifier" or "show optimisation hints" 09:38 asumu: A recent commit by Robby improved it a bit. 09:38 tim-brown: how recent, do you know? and what was the _cause_ 09:39 asumu: In the past week or so. It's not a 100% fix though, and I don't know what the cause is. It did seem like a regression. 09:39 tim-brown: i started noticiting it when i did a GNOME upgrade -- which now makes everything maximised by default. 09:39 tim-brown: i've been struggling with my GUI ever since 09:40 tim-brown: thought it was just me... so kept kinda quiet! 09:40 asumu: Hmm, I use xmonad. 09:44 (join) bitonic 09:47 asumu: tim-brown: http://lists.racket-lang.org/users/archive/2012-November/054610.html 09:47 tim-brown: rebuilding latest nightlies 09:51 (join) mizu_no_oto 10:04 (join) bitonic` 10:06 (quit) bitonic: Ping timeout: 248 seconds 10:14 (join) jao 10:15 (quit) jao: Changing host 10:15 (join) jao 10:15 (quit) niels2: Quit: WeeChat 0.3.8 10:15 tim-brown: asumu: is there any way to turn off the "binding arrows" in drracket? 10:15 asumu: tim-brown: turning off online check syntax should do it (click on the circle in the lower right corner of DrRacket) 10:16 (join) karswell 10:18 tim-brown: that's on option for background expansion, switching that off continues to give me arrows :-/ 10:19 tim-brown: hmm. the colouring in the optimisation coach seems to cause right-mouse-popup horror 10:21 stamourv: Fare: TR does support fixnums, and even finer-grained distinctions. 10:33 (quit) masm: Quit: Leaving. 10:34 (join) masm 10:55 (quit) anRch: Quit: anRch 10:58 tim-brown: asumu: i guess your gui experience still isn't wonderful? 10:58 tim-brown: (w.r.t rt-mouse-click) 10:58 (join) anRch 11:05 (quit) mceier: Quit: leaving 11:10 (quit) masm: Ping timeout: 255 seconds 11:11 greghendershott: Hi, all. I've been playing with a lightweight alternative to contracts I'm calling "term sheets". Mainly it's been a chance to apply some things I've learned lately about macros. Also it's highlighting how much more work contracts do compared to my naive understanding of them. When the naive version is acceptable, it seems things can be ~200x faster? This seems too good to be true, so I'm wondering if I'm being really dumb. What I have so far: https:/ 11:12 bremner: greghendershott: you were cut off at "https:/" 11:12 bremner: which is pretty light weight ;) 11:13 greghendershott: Sorry I'm an IRC noob who recently switched from ERC in Emacs, to using Adium. :) 11:13 greghendershott: https://github.com/greghendershott/termsheet 11:15 greghendershott: Is there a line-length etiquette for IRC? 11:15 bremner: it's a protocol/server limitation. 11:16 greghendershott: What's the magic number? 11:17 greghendershott: Deh Google says 510 11:17 greghendershott: TIL 11:17 asumu: tim-brown: yeah, still not there. 11:19 (quit) rapacity: Remote host closed the connection 11:20 (join) rapacity 11:20 (quit) anRch: Quit: anRch 11:22 (join) MayDaniel 11:26 (quit) spanner_: Read error: Connection reset by peer 11:29 (join) spanner 11:30 (join) masm 11:32 (quit) hkBst: Quit: Konversation terminated! 11:38 (quit) jeapostrophe: Read error: Operation timed out 11:41 (quit) jrslepak: Quit: What happened to Systems A through E? 11:43 (nick) bitonic` -> bitonic 11:51 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 11:51 (join) Shvillr_ 11:51 (nick) Shvillr_ -> Shviller 11:55 (join) anRch 11:57 asumu: Comments and feedback welcome! http://blog.racket-lang.org/2012/11/contracts-for-object-oriented_4671.html 11:57 rudybot: http://tinyurl.com/aem63ou 11:58 asumu: (which I will read after lunch :p) 11:59 (quit) asvil: Ping timeout: 240 seconds 12:01 (join) mithos28 12:05 Cryovat: asumu: Will have a look at it when I get home 12:07 (join) mizu_no_oto 12:11 tim-brown: does rudybot do TR? 12:11 mithos28: rudybot: init typed/racket 12:11 rudybot: mithos28: your typed/racket sandbox is ready 12:11 mithos28: rudybot: (+ 2 2) 12:11 rudybot: mithos28: ; Value: 4 12:11 rudybot: mithos28: ; stdout: "- : Integer [generalized from Positive-Index]\n" 12:11 tim-brown: mithos28: thx 12:11 tim-brown: rudybot: init typed/racket 12:11 rudybot: tim-brown: your typed/racket sandbox is ready 12:12 tim-brown: what's the difference between: 12:12 tim-brown: rudybot: (define (coords/v #{r : Integer}) 12:12 rudybot: tim-brown: 103 ..(integer) 12:12 tim-brown: (for*/vector: : (Vectorof (Pairof Integer Integer)) 12:12 tim-brown: ([x : Integer (in-range (- r) (+ r 1))] 12:12 tim-brown: [y : Integer (in-range (- r) (+ r 1))] 12:12 tim-brown: #:when (< (+ (sqr x) (sqr y)) (sqr r))) 12:12 tim-brown: (let: ([p : (Pairof Integer Integer) (cons x y)]) p))) 12:12 mithos28: You cannot do multiple lines 12:13 mithos28: just do a paste somewhere 12:13 tim-brown: rudybot: (define (coords/v #{r : Integer}) (for*/vector: : (Vectorof (Pairof Integer Integer)) ([x : Integer (in-range (- r) (+ r 1))] [y : Integer (in-range (- r) (+ r 1))] #:when (< (+ (sqr x) (sqr y)) (sqr r))) (let: ([p : (Pairof Integer Integer) (cons x y)]) p))) 12:13 rudybot: tim-brown: error: #:1:18: define: not an identifier, identifier with default, or keyword for procedure argument at: #(r : Integer) in: (define (coords/v #(r : Integer)) (for*/vector: : (Vectorof (Pairof Integer Integer)) ((x : Integer (in-range (- r) (+ r 1))) (y : Integer (in-range (- r) (+ r 1))) #:when (< (+ (sqr x) (sqr y)) (sqr r))) (let: ((p : (Pairof Integer Integer) (cons x y))... 12:13 tim-brown: rudybot: init typed/racket 12:13 rudybot: tim-brown: your typed/racket sandbox is ready 12:13 tim-brown: rudybot: (define (coords/v #{r : Integer}) (for*/vector: : (Vectorof (Pairof Integer Integer)) ([x : Integer (in-range (- r) (+ r 1))] [y : Integer (in-range (- r) (+ r 1))] #:when (< (+ (sqr x) (sqr y)) (sqr r))) (let: ([p : (Pairof Integer Integer) (cons x y)]) p))) 12:13 rudybot: tim-brown: error: #:1:18: define: not an identifier, identifier with default, or keyword for procedure argument at: #(r : Integer) in: (define (coords/v #(r : Integer)) (for*/vector: : (Vectorof (Pairof Integer Integer)) ((x : Integer (in-range (- r) (+ r 1))) (y : Integer (in-range (- r) (+ r 1))) #:when (< (+ (sqr x) (sqr y)) (sqr r))) (let: ((p : (Pairof Integer Integer) (cons x y))... 12:14 mithos28: say gist.github.com 12:14 tim-brown: mithos28: you talking to me? 12:14 mithos28: yes 12:14 tim-brown: gist.github.com 12:14 tim-brown: (or do i say it to the bot?) 12:14 mithos28: tim-brown: that was a figure of speech 12:15 tim-brown: over my head, i'm afraid 12:15 mithos28: tim-brown: just do a paste somewhere for example gist.github.com 12:15 mithos28: rudybot doesn't like long inputs 12:15 tim-brown: ah! 12:16 tim-brown: basically i was being too clever asking: what's the difference between for*/list: and for*/vector 12:16 tim-brown: i mean for*/vector: 12:16 tim-brown: ? 12:16 mithos28: one returns a list and one returns a vector 12:16 mithos28: rudybot (for/list ((i 5)) i) 12:17 mithos28: rudybot: (ann (for*/list: ((i 5) i) (Listof Integer)) 12:17 rudybot: mithos28: ((f (ann 'foo 'foo)) (ann 'bar 'bar)) 12:17 tim-brown: one of them seems to determin its type with two lists, and the other doesn't 12:17 mithos28: can you paste somewhere? 12:18 (quit) anRch: Quit: anRch 12:19 tim-brown: git://gist.github.com/4067092.git 12:19 tim-brown: (never used gist, so i hope this is ok...)( 12:19 mithos28: https://gist.github.com/4067092 12:19 (join) anRch 12:19 mithos28: thats the better link 12:20 tim-brown: there's not enough type information in the for*/list: version but the for*/vector: passes 12:21 tim-brown: as you said earlier, one should produce a list, and one a vector 12:21 tim-brown apologises for the mess i've left in the logs and on your IRC clients 12:24 mithos28: Its a bug 12:24 mithos28: for*/list doesn't want to be annotated 12:25 (quit) masm: Quit: Leaving. 12:25 tim-brown: bug in for*/list: , and not in my use, then? 12:25 mithos28: yes, I'm filing the bug now. I filed one for the same in issue in for*/hash as well 12:25 mithos28: but that has the issue that for/hash doesn't work either 12:26 tim-brown: thanks mithos28 12:26 (join) masm 12:26 tim-brown: so for/hash: is still outstanding, too? 12:27 mithos28: yes 12:27 tim-brown: is it the star variants, or starred and unstarred both? 12:27 mithos28: hash is both, list/vector is just the star 12:27 mithos28: you can write manual for/folds usually 12:28 tim-brown: for/fold will work for me, then? (at least i can fall back if that's so) 12:28 (join) aezx 12:28 mithos28: I believe so 12:28 aezx: hi 12:28 tim-brown: cool 12:28 mithos28: aezx: Hello 12:29 tim-brown: it's getting late; i'm abandoning shop! 12:29 tim-brown: night all 12:29 aezx: i had a few beginner questions for some of the more experienced 12:29 mithos28: tim-brown: morning to you 12:29 mithos28: aezx: Shoot! 12:29 (join) jrslepak 12:29 aezx: how would one go about writing a non temrinating loop? there does not seem to be a while function and I'm stumped 12:30 mithos28: aezx: Are you using one of the student languages? 12:30 aezx: no just regular #lang racket 12:30 mithos28: ok 12:30 mithos28: rudybot: init racket 12:30 rudybot: mithos28: your sandbox is ready 12:30 mithos28: rudybot: (define (f x) (f x)) 12:30 rudybot: mithos28: Done. 12:30 mithos28: rudybot: (f 3) 12:31 rudybot: mithos28: error: with-limit: out of time 12:31 aezx: ok I get it 12:35 aezx: i have one other question 12:35 mithos28: shoot 12:35 aezx: are there any actively maintained event libraries? for event driven programming 12:36 mithos28: what do you mean by event driven programming? 12:36 aezx: I searched the docs and PLT, but all I found was gui event stuff 12:36 aezx: something similar to nodejs's libev 12:36 aezx: set up a listener, emit events, react to emitted events 12:36 mithos28: Not that I know of 12:37 aezx: ok thats fine 12:37 aezx: well you were very helpful 12:37 aezx: thanks a ton mithros28 12:38 (join) RacketCommitBot 12:38 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/b3Ot5w 12:38 RacketCommitBot: racket/master d269817 Kevin Tew: typo fixes 12:38 RacketCommitBot: racket/master 06bc6d7 Kevin Tew: Places documentation clarification 12:38 RacketCommitBot: racket/master 46dc035 Kevin Tew: [Places] remove unused code 12:38 (part) RacketCommitBot 12:39 (join) jeapostrophe 12:39 (quit) jeapostrophe: Changing host 12:39 (join) jeapostrophe 12:41 (join) mceier 12:41 (quit) aezx: Ping timeout: 245 seconds 12:57 (join) jonrafkind 12:59 (join) dyoo 13:03 (join) snorble_ 13:03 (quit) mithos28: Quit: mithos28 13:04 (join) mithos28 13:08 (join) mye 13:14 (quit) mithos28: Quit: mithos28 13:15 (quit) anRch: Quit: anRch 13:24 (quit) shriphani: Ping timeout: 252 seconds 13:25 (join) anRch 13:30 (quit) nathanpc: Remote host closed the connection 13:53 (join) neilv 14:01 Cryovat: asumu: I know this kind of feedback is useless, but I found the tutorial good 14:01 (join) tfb 14:01 Cryovat: Can't point out anything in particular to complain about 14:03 (join) nilyaK 14:03 (join) agent-p 14:03 agent-p: Hi All, I'm new here, I study Racket at the University and I need a French or German Paper about lists in Racket .. 14:04 Cryovat: I liked the use of fish 14:04 Cryovat: Images are good for breaking up a big bunch of text 14:06 (quit) mye: Quit: mye 14:07 bartbes: standard-fish! 14:08 (quit) mizu_no_oto: Read error: Connection reset by peer 14:10 (join) mye 14:11 (join) Blkt 14:13 Blkt: good evening everyone 14:14 (join) bitonic 14:14 agent-p: Good evening Blkt ;9 14:18 (quit) anRch: Quit: anRch 14:19 greghendershott: asumu: I like your blog post. Although I'm not the exact target audience as I've barely used the Racket class system, I was able to follow along pretty well. The writing is nice. The graphic fish is a nice hook. 14:20 greghendershott: Oops, inadvertent pun. 14:21 Shambles_: I like the bit about the fish trying to eat the tire. 14:22 jaimef hunts for a json parsing example 14:23 Cryovat: asumu isn't very kind 14:23 mye: uhhm, I'm quite sure I'll slap my head soon: what is the predicate for true? 14:23 Cryovat: Feeding it tires and mold :( 14:24 (join) anRch 14:24 chandler: mye: `identity'? 14:25 Shambles_: asumu: I think it's doing a surprisingly good job explaining the motivations for the different ways of attaching contracts. 14:26 mye: there is (false? x) might go with that. 14:27 Shambles_: Cryovat: And hemlock too, apparently. ;) 14:27 mye: chandler: identity is not a predicate, or do you mean something else? 14:28 mye: I need this in a match patterns e.g match [(list (? true?) …)]) 14:28 Shambles_: And yummy poison and toxic sludge, just like Mom used to make. :P 14:28 mye: I'll just define it myself 14:28 chandler: mye: Anything which isn't #f is true, so `identity' works there, doesn't it? 14:29 chandler: rudybot: eval (match 42 [(? identity) #t] [else #f]) 14:29 rudybot: chandler: your sandbox is ready 14:29 rudybot: chandler: ; Value: #t 14:29 chandler: rudybot: eval (match #f [(? identity) #t] [else #f]) 14:29 rudybot: chandler: ; Value: #f 14:30 asumu: agent-p: hi, welcome! 14:30 asumu: greghendershott, Cryovat, Shambles_: thanks. :) 14:30 agent-p: hey Asumu Thank you :) 14:30 greghendershott: Is `identity' relatively new addition? From the mailing list and the style guide http://www.ccs.neu.edu/home/matthias/Style/style/Choosing_the_Right_Construct.html#(part._.Identity_.Functions) I had learned that `values' is the identity function. 14:30 rudybot: http://tinyurl.com/cfoef3d 14:30 greghendershott: Not that it's a big deal, just curious. 14:31 asumu: greghendershott: it is, but I think values is also more general 14:31 asumu: rudybot: (identity 5 3 2) 14:31 rudybot: asumu: your sandbox is ready 14:31 rudybot: asumu: error: procedure identity: expects 1 argument, given 3: 5 3 2 14:31 asumu: rudybot: (values 5 3 2) 14:31 rudybot: asumu: ; Value: 5 14:31 rudybot: asumu: ; Value#2: 3 14:31 rudybot: asumu: ; Value#3: 2 14:31 Shambles_: asumu: I don't see any problems with it. It made good sense, and explained the motivation for everything. I guess the only thing that could be better is maybe it aught to ship in the standard docs. 14:31 Cryovat: http://new.livestream.com/accounts/398160/events/1594566/player_pop_up 14:31 Cryovat: Not mine 14:32 mye: chandler: ah, it took me a while to grok this. but I'll probably define true? because it reads better :-). Thanks for the insight 14:33 (join) mithos28 14:35 (quit) nilyaK: Read error: Connection reset by peer 14:37 (quit) bitonic: Ping timeout: 252 seconds 14:42 asumu: agent-p: BTW, did you mean that you're looking for an explanation of how to use lists in French or German? 14:42 agent-p: Exactely 14:43 (quit) mithos28: Quit: mithos28 14:44 (join) uselpa 14:45 asumu: agent-p: I have never read it (I can't read German), but there is DMDa http://www.deinprogramm.de/dmda/index.html 14:45 asumu: Which uses Racket. 14:45 neilv: to use lists in german, you have to precede every identifier with "achtung", and preferably use all-caps and exclamation marks 14:46 asumu: The book "How to Design Programs" might have a French or German translation, though I can't find one on Google. 14:46 asumu: I can ask a Francophone colleague if he knows any good sources. 14:46 asumu: stamourv: ^ 14:47 agent-p: asumu .. thanks .. "I have this Book "How to Design Programs" but I can't really understand english ;) it's better when It's in French or German 14:47 agent-p: and No there is no French or German version of this Book ... 14:47 asumu: Oh, that's too bad. 14:47 neilv: i'm sorry, that might have sounded rude. i am part german 14:48 agent-p: neilv "hhhhhhh" 14:48 (quit) jonrafkind: Ping timeout: 268 seconds 14:49 (quit) anRch: Quit: anRch 14:50 (quit) masm: Quit: Leaving. 14:53 mye: agent-p: meiner Erfahrung nach muss man zum Racket lernen eh immer in die doku schauen. So it's best to get used to english sooner than later ;) 14:53 (join) masm 14:53 agent-p: Nadann das mache ich 14:54 agent-p: ;) 14:55 agent-p: es ist aber nicht so schlimm wenn es in English ist :) aber lieber wenn die Doku in Französisch ist .. 14:58 mye: agent-p: es gent um das aufrufen aux DrRacket, mit rechts-klick aug ein Symbol kann man "view Dokumentation in help desk" benutzen - really useful, and the Racket docs are english only, so no choice there. I use this very often because it's hard at first do memorise how all the different forms work 14:59 mye: I got attracted to Lisp and they said "there is so little syntax" it will be easy!!!11 Then I learn racket and now _everthing_ is syntax :O 15:00 stamourv: agent-p: Jean-Paul Roy a un livre sur la programmation en Racket. Donne-moi 2 secondes, je te trouve le lien. 15:00 agent-p: sa serait super stamourv ;) merci 15:00 stamourv: agent-p: http://deptinfo.unice.fr/~roy/ 15:01 agent-p: mye stamourv hat ein Buch in französisch für mich gefunden :P das ist wirklich was ich brauche aber danke :D 15:01 agent-p: Encore merci stamourv :)))) 15:04 (join) cdidd 15:05 (quit) uselpa: Remote host closed the connection 15:10 (join) mizu_no_oto 15:11 (join) Aune 15:18 agent-p: stamourv : non mais vraiment merci beaucoup sa m'a vraiment aidé .. maintenant j'ai compris ce que je voulais savoir ;) encore merci 15:20 stamourv: agent-p: Pas de probleme! 15:21 stamourv: Un jour, j'aimerais traduire How to Design Programs en français. C'est vraiment un excellent livre. 15:21 (join) jonrafkind 15:25 agent-p: Oui je trouve aussi que c'est un excellent livre .. en effet on nous demande de l'acheter ici a la Polytechnique ... 15:26 agent-p: dés que quelqu'un veut commencer a apprendre a programmer on lui dit d'acheter le livre ;) 15:26 (join) bitonic 15:28 stamourv: Quelle polytechnique? 15:28 stamourv: Juste par curiosité. 15:40 (join) ynniv 15:43 greghendershott: neilv: I think your identifiers need to be things like Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz 15:43 greghendershott: *also of German descent* 15:47 greghendershott: Has anyone used pdflatex on Mac OSX? I'm wanting to make a PDF from Scribble, but scratching my head at the MacTeK being a 2 GB download. 15:49 greghendershott: I'm wondering which is the least-insane option — that, or firing up an Amazon EC2 Linux instance to run pdflatex. 15:49 bremner: greghendershott: texlive on linux is pretty enormous as well. 15:50 greghendershott: So as a public service I should set up a free Latex -> PDF web service? :) 15:53 mye: greghendershott: maybe http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg 15:53 mye: I messed around with compiling tex from source in the past. It left scars. 15:54 greghendershott: mye: Thanks. Maybe dumb question but would that basic package include the Latex -> PDF functionality? 15:56 mye: greghendershott: depending on which tex implementation you use you get pdf directly 15:56 mye: e.g. xetex can write to pdf 15:57 mye: I didn't use this for some time, but I remember xetex supporting unicode, it's a pdftex fork AFAIK 15:58 greghendershott: I mean using `scribble —pdf` ("generate PDF-format output (with PDFLaTeX)") 15:59 neilv: if racket developers use pdflatex, i would use that. tex can easily turn into a huge time sink 15:59 neilv: as anyone who has written a thesis and spent over 100 hours tweaking tex can say 15:59 jonrafkind raises his hand 16:00 (quit) karswell: 16:01 asumu: I used rubber, until one day it magically stopped working with the SLaTeX plugin. 16:02 greghendershott: OK thanks all. It's more of a "hey I should try that" than a must-do-now. I think I'll loop back to trying it later. 16:04 (join) mithos28 16:04 mye: greghendershott: /usr/local/texlive/2012basic/bin/universal-darwin/pdflatex is included 16:04 neilv: if someone wants a really cool project... make a ddracket language for the tex web literate programming thing, to compile core tex to racket 16:05 mye: so if scribble can find this… I must say I have never used scribble, so I'm gonna try that too. What better excuse not to continue working on my real project 16:06 neilv: anyone know whether pdflatex requires any c code? 16:12 greghendershott: I'm not sure I want to go down the road of learning LaTeX. I keep hearing things like this: http://researchinprogress.tumblr.com/post/34692517685/changing-just-a-tiny-little-bit-in-my-latex-tabular 16:12 rudybot: http://tinyurl.com/9bhszvr 16:14 (quit) mithos28: Quit: mithos28 16:14 neilv: tabular environments have been one of the biggest sources of time-suck, although there are some decent ones standard in the distros nowadays 16:16 asumu: neilv: so you'd have TeX->Racket->Tex? ;) 16:16 neilv: asumu: something like that 16:17 neilv: asumu: i was thinking the idea would be to eliminate dependency on a 2GB tex distro just to print a pdf from scribble 16:18 neilv: you'd still need a few add-on packages, in tex source, and maybe fonts 16:18 asumu: Oh, you're saying run TeX's *implementation* in Racket? 16:18 neilv: it would also be a nice little demo of some dsl for legacy or somesuch 16:18 neilv: yes, replace web2c or whatever people are using now 16:18 asumu: That's an interesting idea. 16:19 SamB_MacG5: I'm pretty sure pdfTeX needs C, yes 16:19 neilv: nobody messes around with the original knuth code 16:19 agent-p: Good Night guys ;) 16:20 SamB_MacG5: they patch it 16:20 asumu: agent-p: good night. 16:20 (quit) agent-p: Remote host closed the connection 16:21 (join) nilyaK 16:31 dyoo: I'm much happier today compared to yesterday; I got my red-black trees working. Hurrah! 16:32 jonrafkind: so what you're saying is, its all down hill from here? 16:42 (join) deu5 16:53 (quit) nilyaK: Ping timeout: 265 seconds 16:54 (quit) ynniv: Quit: ynniv 16:55 greghendershott: asumu: re your blog post, did you want to define standard-fish for people who want to try the examples, or would that over-complicate things as it's not really the main topic of the post? 16:55 (join) ynniv 16:56 bartbes: neilv: I'd actually be interested in doing (la)tex with racket in there for scripting, its macros suck 16:56 asumu: greghendershott: standard-fish is defined in slideshow/pict (I should go and edit that into the text) 16:57 (quit) tfb: Quit: gone 17:02 asumu: greghendershott: ok, I added a pointer to (require slideshow/pict). Thanks! 17:03 greghendershott: asumu: That's a nicer fish than my temporary printf size weight color version of standard-fish. 17:09 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 17:18 mye: is there a built in function to add to a list only when the value is not in there yet (ok, I should probably switch to sets …) 17:18 greghendershott: *has a hankering for hamachi* 17:19 greghendershott: mye: Yeah these days I would use a set. 17:20 stamourv: rudybot: (require srfi/1) 17:20 rudybot: stamourv: your sandbox is ready 17:20 rudybot: stamourv: Done. 17:21 greghendershott: In the past I would sometimes use a hash with #f for the values, as a quick holdover until doing it the right way. Fortunately now we have sets. 17:21 stamourv: rudybot: (lset-add 1 '(1 2)) 17:21 rudybot: stamourv: error: reference to an identifier before its definition: lset-add in module: 'program 17:21 stamourv: rudybot: (lset-adjoin 1 '(1 2)) 17:21 rudybot: stamourv: error: lset-adjoin: expected procedure, given 1 17:21 stamourv: rudybot: (lset-adjoin = 1 '(1 2)) 17:21 rudybot: stamourv: error: null-list?: argument out of domain 1 17:21 stamourv: rudybot: (lset-adjoin = '(1 2) 1) 17:21 rudybot: stamourv: ; Value: (1 2) 17:21 stamourv: There we go. 17:27 stamourv: But yeah, using sets is probably a better idea. 17:27 stamourv: I'm not a big fan of srfi/1's names, or interface in general. 17:28 mye: ah, now I've started rewriting the test cases ;) The difficulty of changing data structures in a program seems to be proportional with the number of test cases. 17:28 stamourv: mye: Which is why we have generics now! :D 17:29 stamourv: (Although there's no generic interface for sets, yet.) 17:30 mye: I used symbols as test values, so with lists I could very conveniently have lots of values as '(foo bar …), with sets I must rewrite it all to (set 'foo 'bar) :\ 17:31 stamourv: Yeah, generics won't help with that. 17:31 stamourv: But emacs keyboard macros will. :D 17:36 mye: DrRacket should refresh the buffer if it changes on disk. 17:37 stamourv: Clicking the `run' button does that. 17:37 mye: Then I could do these editing tasks in vim and go back to drracket quickly 17:37 stamourv: Yeah, I usually do my editing in emacs, and use DrRacket for its awesome, awesome tools. 17:38 stamourv: There's also a menu entry to `revert' the file. 17:39 mye: stamourv: aha, pressing the run shortcut is good enough for me. (though auto revert is cool) 17:39 (quit) jrslepak_neu: Remote host closed the connection 17:40 (join) jrslepak_neu 17:49 (quit) mye: Quit: mye 17:57 (join) tfb 18:02 greghendershott: mye: You could also take any '(foo bar) and wrap them in (apply set '(foo bar)) 18:06 (join) mithos28 18:07 (quit) jeapostrophe: Ping timeout: 256 seconds 18:10 (join) samth 18:10 (quit) samth: Changing host 18:10 (join) samth 18:14 (quit) ynniv: Quit: ynniv 18:16 (quit) mithos28: Quit: mithos28 18:19 (quit) cky: Ping timeout: 276 seconds 18:24 (join) cky 18:24 (quit) MayDaniel: Read error: Connection reset by peer 18:25 (quit) Blkt: Quit: good night! 18:28 (quit) jrslepak: Quit: What happened to Systems A through E? 18:34 (quit) ivan\: Ping timeout: 252 seconds 18:39 (join) ivan\ 18:41 (quit) Shvillr: Ping timeout: 260 seconds 18:42 (join) Shvillr 18:46 (quit) Aune: Quit: L?mnar 18:52 (quit) mceier: Ping timeout: 264 seconds 18:53 (quit) tfb: Quit: sleeping 18:57 (join) anRch 19:00 (quit) bitonic: Ping timeout: 264 seconds 19:02 (join) jeapostrophe 19:02 (quit) jeapostrophe: Changing host 19:02 (join) jeapostrophe 19:09 (quit) dyoo: Quit: dyoo 19:16 (join) jrslepak 19:22 (join) dnolen 19:22 (join) tfb 19:26 (quit) tfb: Client Quit 19:27 (quit) anRch: Quit: anRch 19:37 (quit) jonrafkind: Ping timeout: 240 seconds 19:48 (join) mithos28 19:58 (quit) mithos28: Quit: mithos28 20:14 (join) mizu_no_oto 20:25 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 20:51 (join) ynniv 21:03 (quit) samth: Ping timeout: 260 seconds 21:14 (quit) dnolen: Ping timeout: 252 seconds 21:18 (join) mithos28 21:18 (join) Kaylin 21:23 (quit) jsj: Ping timeout: 260 seconds 21:28 (join) scott_ 21:28 (quit) scott_: Changing host 21:28 (join) scott_ 21:28 (quit) mithos28: Quit: mithos28 21:43 (quit) masm: Quit: Leaving. 21:59 (quit) Nisstyre: Quit: Leaving 22:08 asumu: https://tls.mirai.ca/ <-- see bottom 22:47 (join) mithos28 22:55 (join) Fare 22:57 (quit) mithos28: Quit: mithos28 23:02 (join) mithos28 23:02 (join) jonrafkind 23:07 (join) Nisstyre 23:10 (quit) Fare: Ping timeout: 276 seconds 23:21 (quit) scott_: Quit: Leaving 23:22 (quit) greghendershott: Quit: Leaving. 23:36 (join) dyoo 23:49 (join) adu 23:53 (part) mithos28 23:53 (quit) dyoo: Quit: dyoo 23:54 (join) mithos28