00:03 (join) realitygrill_ 00:06 (quit) realitygrill: Ping timeout: 240 seconds 00:06 (nick) realitygrill_ -> realitygrill 00:11 (part) SinDoc 00:15 (quit) masm: Ping timeout: 260 seconds 00:19 (join) jmillikan 00:30 (join) jonrafkind 00:44 jmillikan: Is it expected that OpenGL programs don't work in 5.1 (or are incompatible somehow)? 00:53 eli: jmillikan: No. 00:57 jmillikan: The gears demo is working for me in 5.0 but not 5.1, looks like get-gl-context is returning #f. Any hints? Would you expect my Ubuntu version to make a difference? 00:58 (join) dnolen 00:59 eli: jmillikan: This came up today. 00:59 eli greps 00:59 eli: jmillikan: http://bugs.racket-lang.org/query/?cmd=view&pr=11739 01:00 jmillikan: Whoops. Googled but didn't check the bug list. Thanks (again), I'll watch that. 01:02 eli: Skip to the bottom -- it's a library that you're missing. 01:02 eli: (Probably.) 01:03 (quit) dnolen: Quit: dnolen 01:11 jmillikan: Perfect. libgtkglext1 in Ubuntu. 01:12 jmillikan: Package, that is. 01:15 jonrafkind: i forsee that being a really annoying issue. X doesnt work so install library Y, but most people would have no idea to do that 01:16 jonrafkind: probably there should be a FAQ for racket somewhere 01:24 (join) firas 01:26 jmillikan: Stackoverflow catches a lot of that stuff as it is. Eli has already answered a question of mine on there. 01:26 jonrafkind: i suppose. it seems a poor user experience to have to use 3rd party sites to figure out how to get racket running 01:29 firas: hello 01:30 jmillikan: As a Racket user, I'm satisfied with it. If I had asked there I almost certainly would have gotten an answer. 01:36 (quit) jmillikan: Quit: ERC Version 5.3 (IRC client for Emacs) 01:38 firas: hi 01:38 firas: any body there?? 01:38 jonrafkind: yea man.. 01:38 jonrafkind: did you not notice people talking? 01:40 firas: i need a help with Scheme, plz can you help me with?? 02:00 (part) jasond`: "ERC Version 5.3 (IRC client for Emacs)" 02:20 (join) mye 02:45 (quit) jonrafkind: Ping timeout: 272 seconds 03:07 (quit) mye: Quit: Leaving 03:34 (quit) firas: Quit: Page closed 03:35 (join) realitygrill_ 03:37 (quit) realitygrill: Ping timeout: 240 seconds 03:37 (nick) realitygrill_ -> realitygrill 04:11 (join) mye 04:17 (quit) cpach: Quit: hejhej 04:24 (join) tfb_ 04:24 (nick) tfb_ -> tfb 04:26 (join) cpach 04:54 (join) lucian 05:10 (join) lucian_ 05:12 (join) tauntaun 05:14 (quit) lucian: Ping timeout: 240 seconds 05:16 (nick) lucian_ -> lucian 05:22 (quit) tauntaun: Ping timeout: 240 seconds 05:25 (quit) lucian: Remote host closed the connection 05:33 (join) jesusito 06:01 (join) tauntaun 06:13 (join) masm 06:31 (join) firas 06:32 firas: i have this scheme grammar, i need tu use DrRacket to translate it 06:33 firas: expression -> number expression_tail 06:33 firas: expression_tail -> + expression expression_tail 06:33 cpach: firas: hey dude, did you even try to solve the problem yourself? 06:33 firas: expression_tail -> Ø 06:33 firas: yes too much 06:34 firas: bu no result as i want 06:34 cpach: firas: is it for a class? 06:34 firas: yes 06:34 cpach: firas: so did you try discussing the problem with your fellow students? 06:35 firas: yes befor 1 hour we try to solve it, but there is no clear idea for all how to start 06:36 firas: this is the first class 06:36 cpach: it seems like an exercise for a book (can't remember the title now). did you read the book? 06:37 firas: no it is not from the book 06:37 cpach: what course is it for? 06:38 firas: this is our book Programming Languages Application and Interpretation 06:38 cpach: yeah, that's the one i was thinking of 06:38 cpach: did you read it? 06:39 firas: yes, 2 chapter 06:39 bremner: I guess the prof just wants a define-type, but you should really ask her/him 06:40 firas: he siad, we want to use DrRacket to build a program using that grammar 06:44 (quit) firas: Ping timeout: 245 seconds 06:48 (quit) tauntaun: Ping timeout: 264 seconds 06:53 bremner: hmm. What we have here is a failure to communicate. 06:54 (quit) mye: Read error: Connection reset by peer 06:55 cpach: some men you just can't reach 07:16 Lajla: I find this quaestion he keeps asking vague 07:17 bremner: Lajla: me too, and I am teaching that course right now ;) 07:20 bremner: hence my (ignored) hint about define-type 07:26 (quit) masm: Ping timeout: 240 seconds 07:35 (join) tauntaun 07:45 bremner: so what is the advantage of using set-box! over set! ? Is it just a style thing? 07:52 (join) Agari 07:59 Lajla: Isn't set-box! a quick hack to let a function modify its outside enrvironment 08:03 (quit) tauntaun: Ping timeout: 240 seconds 08:21 (join) MayDaniel 08:26 (join) tauntaun 08:34 (join) masm 08:36 (quit) MayDaniel: Read error: Connection reset by peer 08:41 bremner: hmm. but doesn't (let ([foo 42]) (lambda (x) (set! foo x) 23)) do the same thing? 08:49 Lajla: bremner, yeah, but the idea of a box is that you can pass what you want to set as an argument 08:50 Lajla: OR well, it changes the contents of the box. 08:50 Lajla: See a box as a 1 element vector really. 08:50 Lajla: So that you can later get it out of the box again 08:50 Lajla: And sort of aemulate a pass-by-reference semantics 08:51 Lajla: Basically, you can pass as arguemnt that which you want to set 08:51 Lajla: Instead of it being a fixed property of the function 08:56 bremner: right, I see. Thanks. 08:57 (join) samth_ 09:34 (join) PLT_Notify 09:34 PLT_Notify: racket: master Matthew Flatt * e59b96e (1 files in 1 dirs): fix jpeg structs to better adapt to jpeglib versions and platforms ... - http://bit.ly/eltRam 09:34 (part) PLT_Notify 09:46 (quit) tfb: Quit: gone 09:47 (quit) masm: Ping timeout: 276 seconds 09:52 (join) lucian 09:52 (join) masm 09:59 (quit) samth_: Ping timeout: 240 seconds 10:14 (join) dnolen 10:14 (quit) masm: Ping timeout: 240 seconds 10:34 clklein: When the ISL documentation says "boolean" in a signature, does it really mean "any"? 10:35 clklein: For example, is it intentional that (filter (lambda (x) x) (list 1 2 3)) does not raise an error when filter's contract says its first argument should produce a boolean? 10:39 (quit) dnolen: Quit: dnolen 10:41 Lajla: It would make use of member kind of awkward. 10:41 Lajla: Still kind of strange. 10:41 Lajla: But this is because static typing is silly and that is because 'x is a list. 10:42 (quit) jesusito: Quit: ERC Version 5.3 (IRC client for Emacs) 10:43 (join) corruptmemory 10:47 samth: Lajla, 'x is a sequenece of symbols you typed on your keyboard 10:47 samth: it *evaluates* to a symbol, and *reads* to a list 10:47 samth: clklein, i think that's probably a bug 10:47 samth: most other boolean contexts in ISL require actual booleans 10:48 samth: such as `if' 10:50 clklein: `ormap' complains but `memf' does not 10:50 (join) dnolen 10:50 clklein: I think you're right. 10:50 clklein: (although the `ormap' error message is bad) 10:51 tauntaun: Out of curiosity, what is ISL? 10:51 samth: intermediate student language 10:51 tauntaun: thx 10:51 samth: it's one of the languages for using with the How to Design Programs textbook 10:51 tauntaun: yes, I know. 10:51 tauntaun: btw, I don't have my students use it. 10:52 tauntaun: I just give them full-blown Scheme and withhold knowledge until the right time. 10:52 samth: tauntaun, do they not trip over things like (cond [empty? x car x] ...) ? 10:53 tauntaun: nope 10:53 tauntaun: we're using Dybvig's book. 10:53 tauntaun: btw, it looks like that cond branch will always be taken. 10:53 (quit) dnolen: Client Quit 10:53 samth: right 10:54 samth: that program is not an error 10:54 tauntaun: yeah 10:54 samth: in full scheme or racket 10:54 samth: but almost certainly it's better to error than to produce x 10:54 samth: which is what the BSL/ISL versions of `cond' would do 10:55 tauntaun: oh I fully appreciate the sense behind ISL etc. 10:56 tauntaun: It's just that we're doing fine, somehow. 11:07 (join) mithos28 11:07 (part) mithos28 11:07 (join) mithos28 11:08 mithos28: I just switched over to 5.1 and I am getting typed-racket type errors that I was not getting before 11:10 mithos28: In an internal definition context I have (define a-dag (construct-dag ...)) and it gives me the type error Expected dag but got (U dag Undefined) 11:11 (join) MayDaniel 11:11 mithos28: I converted the defines to lets and it worked, but is there a reason for this change? 11:11 samth: mithos28, the reason is that the previous behavior was unsound 11:12 mithos28: ok, so even if I use defines as let* typed racket assumes I mean letrec? 11:12 samth: right, that's what internal define means 11:14 mithos28: Do letrecs have mutative semantics, even if they could be converted to let*s? 11:14 samth: i don't understand what you mean 11:14 samth: letrec has a different semantics from let* 11:14 samth: i believe that the semantics coincide when there are now backward references 11:15 (join) mario-go` 11:16 mithos28: Right so (letrec ((a 2) (b (f a))) (g b)) is equivalent to (let* ((a 2) (b (f a))) (g b)) 11:16 samth: yes 11:16 mithos28: but it seems like typed racket is going to give me a has type (U 2 Undefined) 11:17 samth: for that it can figure out that `a' can't be undefined 11:17 (join) anRch 11:17 samth: if you think TR should have figured out your example, report it as a bug and we'll take a look 11:17 mithos28: ok that makes sense, and what I was asking 11:18 mithos28: I'll see if I can reduce it 11:18 mithos28: thanks for the help 11:19 (quit) mario-go`: Client Quit 11:19 (quit) mario-goulart: Quit: ERC Version 5.3 (IRC client for Emacs) 11:20 (join) mario-goulart 11:26 (join) mceier 11:26 (join) PLT_Notify 11:26 PLT_Notify: racket: master Kevin Tew * f7d8900 (1 files in 1 dirs): [Scribble] Fix width of multicolumn table cells - http://bit.ly/grEA7M 11:26 (part) PLT_Notify 11:42 (join) tfb 11:48 (quit) mithos28: Quit: mithos28 11:49 (join) masm 11:54 (quit) tauntaun: Ping timeout: 240 seconds 11:55 (join) offby1 11:56 (join) mithos28 12:05 (join) jonrafkind 12:09 (quit) cow-orker: Read error: Connection reset by peer 12:10 (quit) mithos28: Quit: mithos28 12:13 (join) lucian_ 12:14 (quit) lucian: Ping timeout: 240 seconds 12:22 (join) lucian 12:24 (quit) lucian_: Ping timeout: 240 seconds 12:25 (join) mithos28 12:31 (join) tauntaun 12:33 (join) carleastlund 12:34 (quit) anRch: Quit: anRch 12:36 (join) lucian_ 12:36 (join) MayDaniel_ 12:37 (quit) lucian: Ping timeout: 264 seconds 12:39 (quit) MayDaniel: Ping timeout: 240 seconds 12:47 (nick) lucian_ -> lucian 12:56 (join) lucian_ 12:57 (join) anRch 12:58 (quit) lucian: Ping timeout: 272 seconds 13:00 (join) jesusito 13:12 (quit) Agari: Ping timeout: 240 seconds 13:18 (join) SinDoc 13:18 (quit) anRch: Quit: anRch 13:19 (quit) coyo: Read error: Connection reset by peer 13:19 (join) coyo 13:19 (quit) coyo: Changing host 13:19 (join) coyo 13:21 (quit) lucian_: Ping timeout: 240 seconds 13:24 (join) lucian_ 13:26 (quit) tauntaun: Ping timeout: 240 seconds 13:31 (join) misterm 13:44 (join) PLT_Notify 13:44 PLT_Notify: racket: master James Swaine * 6571bc0 (2 files in 2 dirs): Merge branch 'master' of pltgit:plt - http://bit.ly/ewhA30 13:44 (part) PLT_Notify 13:46 (nick) lucian_ -> lucian 13:53 (join) Agari 13:57 (join) tauntaun 14:22 (quit) tauntaun: Quit: Ex-Chat 14:25 (part) SinDoc 14:50 (join) lucian_ 14:52 (quit) lucian: Ping timeout: 240 seconds 14:52 (nick) lucian_ -> lucian 15:07 mithos28: Is there a way with ->i contract combinator to influence the error messages if the pre condition is violated? 15:12 (quit) saint_cypher: Quit: Leaving. 15:18 (join) anRch 15:20 (join) PLT_Notify 15:20 PLT_Notify: racket: master Matthew Flatt * 90b8296 (4 files in 1 dirs): fix minor problems that trigger C-compiler warnings - http://bit.ly/hUpavJ 15:20 (part) PLT_Notify 15:26 (join) PLT_Notify 15:26 PLT_Notify: racket: master Eli Barzilay * 0801525 (6 files in 2 dirs): Merge in the docs test into the rest of the scribble tests. ... 15:26 PLT_Notify: racket: master Eli Barzilay * 8886b87 (1 files in 1 dirs): Reformat this mess. 15:26 PLT_Notify: racket: master Eli Barzilay * 1be2640 (7 files in 4 dirs): Some random tidyings. 15:26 PLT_Notify: racket: master commits 90b8296...1be2640 - http://bit.ly/gKsIft 15:26 (part) PLT_Notify 15:27 (quit) mithos28: Quit: mithos28 15:27 (join) lucian_ 15:28 (quit) lucian: Disconnected by services 15:28 (nick) lucian_ -> lucian 15:28 (nick) lucian -> lucian_ 15:30 (nick) lucian_ -> lucian 15:36 (join) Eren 15:37 Eren: how can I define a function that takes infinite numbers of parameters? 15:37 (quit) MayDaniel_: Read error: Connection reset by peer 15:37 Eren: I mean, not infinite of course, but variable parameters :) 15:37 samth: Eren, have your function consume a single argument, which is a stream 15:37 samth: oh 15:38 samth: (lambda (x . y) (printf "i go ~a arguments (+ 1 (length y)))) 15:45 (join) mithos28 15:49 Lajla: Eren, if you let the formals of a function be an improper list, that is for instance (lambda (x y . r) ...) then the first two arguments get bound to x and y, whatever remains is bound to r in the form of a list. 15:49 Lajla: If you do (lambda r ...) then all arguments are bound to r in the form of a list. 15:50 Eren: Lajla: that's how map is implemented then. The first two parameters are bound, the rest is bound to something else 15:51 samth: Eren, yes 15:51 Eren: however, there seems to be something going on with my session in DrRacket :) 15:51 Eren: """ lambda: expected a parenthesized sequence of argument names after `lambda`, but found something else """ 15:51 samth: Eren, what language are you using 15:51 samth: ? 15:51 Eren: "advance student" is chosen right now 15:52 Eren: under HTDP 15:52 samth: choose "use the language declared in the source" 15:54 samth: unless you're using advanced for some particular reason 15:54 Eren: samth: ah no, our curriculum follows HTDPv2, and it states that we select advance student 15:55 Eren: "Module Language: there can only be one expression in the definitions window" 15:56 samth: if you have to used advanced student, there is no way to write such a function 15:57 Eren: well, now it is completely useless after selecting "use language declared in the source". I did not declared anything in the source, maybe it's caused by this? 15:57 samth: you should put the line "#lang racket" at the top 15:58 samth: but if you have to use advanced student, then you should use it 15:58 (quit) tfb: Ping timeout: 276 seconds 15:58 Eren: samth: I don't have to use advance student option right now 15:59 samth: ok 15:59 samth: then use the declared language, and put "#lang racket" at the top 15:59 samth: then you'll be able to write the functions i and Lajla described 15:59 Eren: yeah, thank you, now it works without a problem :) 15:59 Eren: Lajla: thank you as well 16:01 (quit) lucian: Ping timeout: 240 seconds 16:07 (quit) mceier: Quit: leaving 16:08 (part) jesusito: "ERC Version 5.3 (IRC client for Emacs)" 16:14 Eren: I think I should write a contract for variable-arity procedures like: "foo: Number X ... X", where the function will take anything similar after the first parameter 16:14 Eren: if it gets a list, it should continue with list, etc 16:20 (quit) anRch: Quit: anRch 16:24 (quit) realitygrill: Quit: realitygrill 16:36 carleastlund: Eren, how would you define "similar" for that contract? 16:36 (quit) Eren: Ping timeout: 245 seconds 16:40 (join) PLT_Notify 16:40 PLT_Notify: racket: master James Swaine * 825a931 (1 files in 1 dirs): Fix MSVC compiler errors for fsemaphore code generation - http://bit.ly/fH8lwd 16:40 (part) PLT_Notify 17:08 (quit) cpach: Quit: leaving 17:22 mithos28: I'm getting the following output at the end of my program 'error writing to stream port (Broken pipe; errno=32)'. Is there any way to silence this output or get some error when I write to the broken pipe, instead of getting this later? 17:24 jonrafkind: `with-handlers' ? 17:24 mithos28: it is not an exception 17:24 mithos28: It happens after my program finishes 17:25 rapacity: is C considered a strongly typed language? 17:26 bremner: not by schemers 17:26 mithos28: ok, I got it. Calling flush-output makes it raise that message as an exception, which I can then catch. 17:27 jonrafkind: mithos28, so you're calling flush-output on some port? 17:27 (join) tauntaun 17:27 jonrafkind: maybe i can add that to the docs so other people know about it 17:28 jonrafkind: rapacity, a strongly typed language is one where the type system prevents you from breaking the runtime. c allows breaking the runtime with casts 17:28 bremner: C allows implicit casts, which are much more evil 17:28 tauntaun: I am tauntaun, here for a tummyrub. 17:28 rapacity: :p I got into an argument with my professor over it 17:28 rapacity: but I decided to shut up 17:28 tauntaun: jonrafkind: a strongly typed language is one in which values are typed. 17:29 tauntaun: a statically typed language is one in which *variables* are typed. 17:29 bremner: tauntaun: yes, and, this has to do with C? 17:29 tauntaun: (ie., variables names) 17:29 jonrafkind: hm, are you sure about those definitions 17:29 tauntaun: bremner: no, as you probably know, C's type system is static but not strong. 17:29 jonrafkind: i was pretty sure my definition was right 17:29 mithos28: jonrafkind: I was not calling flush-output, so it looks the gc did before racket exited. This raised an exception, whose message got printed but not the continuation marks. Also the exit code was 0, instead of 1 as normal with exceptions. 17:29 tauntaun: jonrafkind: you and I are probably saying the same thing. 17:30 tauntaun: I just like my way better. :-) 17:30 jonrafkind: well is racket strongly typed in your opinion? 17:30 bremner: yes 17:31 jonrafkind: rudybot: (+ "5" 'apples) 17:31 rudybot: jonrafkind: your sandbox is ready 17:31 rudybot: jonrafkind: error: +: expects type as 1st argument, given: "5"; other arguments were: apples 17:31 jonrafkind: in ocaml you can't do that 17:31 tauntaun: jonrafkind: of course Scheme is strongly typed. 17:31 bremner: jonrafkind: the difference is just when the typing error is detected 17:31 bremner: for C, that could be never 17:31 jonrafkind: that seems like a weak defintion of 'strong' to me 17:31 bremner: heh. OK. 17:32 tauntaun: jonrafkind: why? It simply says that every value in the language has a unique type. 17:32 jonrafkind: whatever 'operations are only done to values for which they will succeed' seems like a good definitiont o me 17:32 tauntaun: unlike C, in which values are essentially just bit patterns. 17:32 tauntaun: jonrafkind: actually that's quite vague, no? 17:32 tauntaun: but again, we are all probably effectively in agreement. 17:32 bremner: well, you can't use a float as a boolean in C, there are some rules ;) 17:33 tauntaun: bremner: I could swear I've used floats as booleans in C. 17:33 bremner: casts are just functions IMHO. 17:33 tauntaun: bremner: casts are not "just functions" in C. 17:33 tauntaun: in the sense that they do not produce a fresh value. 17:34 bremner: tauntaun: not the automatic ones. no 17:34 tauntaun: even explicit casts in C are nothing more than a "change of view" of the underlying bit pattern. 17:34 bremner: that seems like an implementation detail ;) 17:34 carleastlund: My understanding of these terms: "statically typed" has a generally agreed-upon definition: types are determined prior to execution. "strongly typed" is just a buzzword people throw around. As far as I know, everyone has their own definition. It's a loaded word. 17:34 tauntaun: no new value is generated, as in Scheme, ML, etc. 17:35 tauntaun: bremner: it is not an implementation detail, 17:35 bremner: well, I don't care that much, but, why not? 17:35 tauntaun: guys, I don't see why there's confusion. In a strongly typed language, you can't decide to view an integer as, say, a floating point number. 17:35 tauntaun: Instead, you must *produce* (allocate elsewhere) a float from the int. 17:36 bremner: why is the allocation so important? 17:36 carleastlund: You're making some pretty strong claims about what sort of operations a "strongly typed" language is allowed to support. 17:36 carleastlund: Sorry. Let me avoid that word. Pretty bold claims. 17:37 tauntaun: bremner: because, for example in Haskell, the machine represents Integers differently from Ints. 17:37 bremner: and? 17:38 tauntaun: And so, you can't view the original Int as an Integer; the bit patterns are different. 17:38 carleastlund: tauntaun, I believe you have got a good intuition for what type systems achieve in safe languages, but your generalization of what "strongly typed" means is not precise enough to generalize to all safe languages. 17:38 bremner: tauntaun: I think the argument you are missing to convince me is about mutation 17:39 tauntaun: carleastlund: you may be right, but I don't yet see the problem with what I'm saying. Can you maybe illustrate with an example? 17:39 bremner: I can cast "lvalues" in C, that is pretty non-functional 17:40 tauntaun: an lvalue is a variable name, not a runtime value (right?) 17:40 carleastlund: Safe languages are those in which no operations have "undefined" outcomes. One way to achieve safety is types -- static or dynamic -- though it is not the only way. If one were to have a well-defined language that allowed integers to be interpreted as floating point numbers, it would be just as safe. The problem with C is not that interpreting integers as floats is bad, but that interpreting various things as pointers leads to undefined results. 17:41 tauntaun: carleastlund: I'm not sure I agree. First of all, we're trying to straighten out the meaning of "strong", not "safe." 17:41 tauntaun: Secondly... 17:41 tauntaun: static typing alone is no guarantee of safety, as demonstrate by C. 17:42 carleastlund: I have seen so many definitions of "strong", as far as I am concerned it could mean "umbrella". Or "hatrack". I think the word "safe" is much more meaningful. 17:42 carleastlund: I did not say all uses of static types achieve safety. 17:42 tauntaun: carleastlund: in fact the definitions of *both* "strong" and "static" were different as recently as 15 years ago. 17:42 carleastlund: What was "static"? 17:43 danking: I cant seem to find docs on the command line repl on the website. Is there a way to refer to the previously returned value? 17:43 carleastlund: danking, there is not. 17:43 mithos28: I am having trouble understanding how dynamic-wind interacts with exceptions, I don't understand why the following program outputs 'error: foo1' before 'error: foo2' (dynamic-wind void (lambda () (error 'foo1)) (lambda () (eprintf "a~n") (error 'foo2))) 17:43 tauntaun: I think, actually, that the meaning of "static" has indeed been stable. But I believe there was a time when "strong" was almost a synonym for "static." 17:43 tauntaun: Today it most certainly is not. 17:44 carleastlund: That is consistent with my claim that "strong" is a chimera. 17:44 danking: carleastlund: :/ Thanks carl. 17:44 tauntaun: mithos28: dynamic-wind will always invoke the first thunk. 17:44 (join) saint_cypher 17:44 carleastlund: Chameleon? Somethign with a "ch". 17:44 tauntaun: carleastlund: it's "chimera"...and I disagree. 17:44 carleastlund: In any event, its meaning "ch"anges. 17:44 tauntaun: Its meaning *has* changed and is now quite stable. 17:44 mithos28: tauntaun: but doesn't if have to go through the post thunk before reaching the exception handler? 17:44 tauntaun: Maybe I can scrounge up some references if you give me a couple of minutes to fish through my library. 17:45 tauntaun: mithos28: you'd better put the question to someone with more experience than I have :-) 17:45 carleastlund: I have never taken any minutes from you. You are welcome to all the minutes you like. 17:45 tauntaun: carleastlund: ??? did I sound defensive, there? (Didn't mean to.) 17:46 carleastlund: mithos28, exception handlers run at the current point in the continuation; they don't automatically jump out. Jumping out just happens to be what "with-handlers" does. 17:46 carleastlund: No, I was just being whimsical. 17:46 (join) jao 17:46 (quit) jao: Changing host 17:46 (join) jao 17:47 mithos28: carleastlund: But it also aborts to the default continuation-prompt. 17:47 carleastlund: Apparently it does so after printing out the error. 17:47 carleastlund: Rather than before. 17:48 mithos28: carleastlund: ah, ok. 17:48 tauntaun: carleastlund and bremner: answers can be found on pp. 18-19 of O'Reilly's "Real World Haskell", by O'Sullivan, Goerzen, and Stewart. 17:49 bremner: well, they have their axe to grind too of course. 17:49 tauntaun: bremner: I don't think this is about grinding axes. I think it's a ten-year-old consensus in the PL community. 17:50 bremner: but I don't think I actually disagree with their definitions (or yours). 17:50 tauntaun: (if not older) 17:50 carleastlund: Not that Wikipedia is the most precise collection of CS terminology, but their page on "type safety" lists a few variations on a theme, while the page on "strong typing" is a huge laundry list of different meanings. 17:50 (join) SinDoc 17:50 tauntaun: What RWH says, quite sensibly, is that there is such a thing as type *strength*, ie., a range of safety running from weak to strong, and some languages are stronger than others. 17:50 carleastlund: Note that their paragraph on strong types starts with "When we say" and "we mean". 17:51 tauntaun: But that strength is measured by how and how much the language allows you to coerce. 17:53 carleastlund: The entire notion of coercion seems language-specific to me. If I run "positive?" on an integer, is that an operation? Or am I coercing an integer to a boolean? I am skeptical of general PL principles phrased in terms of "coercions". 17:53 tauntaun: On the other hand, here is a suggestive sentence from Paul Kelly's "Functional Programming for Loosely-coupled Multiprocessors," published in 1989: 17:53 mithos28: tauntaun: is strength then just some measure on the property that the type system proves? 17:53 tauntaun: "We employ a strongly-typed (sic) language, that is, type errors cannot occur at run-time." 17:53 tauntaun: mithos28: no, this is not about proof, which I believe is a strictly static notion. 17:54 tauntaun: Btw, when I say "sic" I'm being prissy about the hyphen, not the adverb "strongly." 17:55 rapacity: so according to that scheme is not strongly typed? 17:55 rapacity: doesn't (+ 1 'thing) return a type error at runtime 17:56 carleastlund: Define "type error". 17:57 rapacity: rudybot: (+ 1 'thing) 17:57 rudybot: rapacity: your sandbox is ready 17:57 rudybot: rapacity: error: +: expects type as 2nd argument, given: thing; other arguments were: 1 17:57 (quit) SinDoc: Ping timeout: 272 seconds 17:57 carleastlund: If you mean "an error with the word type in it", I can do (raise (Fail "type")) in ML just fine. 17:57 tauntaun: rapacity: I believe you have the wrong idea there. 17:57 tauntaun: But I have a Skype interview right now and must go. 17:57 tauntaun: BBL! 17:58 (quit) tauntaun: Quit: Ex-Chat 17:59 rapacity: what is a type error at runtime supposed to look like? 17:59 bremner: the interesting thing about scheme (or at least racket), is that is has features of both static and dynamic typing. Contract failures occur during compilation for example. 17:59 bremner: sorry, an interesting thing. 17:59 Lajla: carleastlund, oh I see where you're going at. 17:59 Lajla: And I love it. 18:00 Lajla: (display "type" (current-error-port)) 18:00 carleastlund: Contract failures do not occur during compilation. 18:00 Lajla: Type error, baby. 18:00 bremner: carleastlund: no? I could well be confused. Or maybe you mean something more subtle than I do by compilation. 18:01 carleastlund: If the compiler does something wrong, there may be a runtime error from the compiler during compilation of some other code. But a contract in one piece of code will not trigger an error during the compilation of that piece of code. 18:02 (quit) mithos28: Quit: mithos28 18:02 bremner: right, I see it is actually at evaluation tim in the case I was looking at. 18:03 bremner: got my language and meta language mixed up ;) 18:03 bremner: my class was pretty impressed the other day we wrote a factorial function in the little calculator language in PLAI and it happily computed 10000! in a couple of seconds. 18:04 bremner: not that would be impressive for racket, but this was a Y combinator based interpreter running on racket. 18:05 (quit) corruptmemory: Remote host closed the connection 18:09 Agari: "Y combinator based interpreter running on racket", so... arc? 18:09 (join) lucian 18:09 Agari: (sorry, I'm bored) 18:10 bremner: umm. no, lexical scope ;) 18:10 (quit) jao: Remote host closed the connection 18:22 (join) mithos28 18:23 (join) lucian_ 18:24 (quit) lucian: Ping timeout: 240 seconds 18:24 (nick) lucian_ -> lucian 18:30 (join) lucian_ 18:30 (quit) lucian_: Remote host closed the connection 18:31 (quit) lucian: Ping timeout: 240 seconds 18:35 (join) lucian 19:12 (quit) Agari: Ping timeout: 260 seconds 19:18 (join) tfb 19:28 (join) lucian_ 19:29 (quit) misterm: Read error: Operation timed out 19:29 (join) misterm 19:30 (quit) lucian: Ping timeout: 276 seconds 19:39 (join) lucian 19:40 (join) tauntaun 19:41 (quit) lucian_: Ping timeout: 240 seconds 19:41 tauntaun: Well, folks, has progress been made on the question of typing? 19:41 (join) saint_cypher1 19:42 jonrafkind: everyone agrees typing was a terrible idea in the first place 19:42 (quit) saint_cypher: Read error: Connection reset by peer 19:42 tauntaun: jonrafkind: you're fired :) 19:45 jonrafkind: Luca Cardelli's article Typeful Programming describes strong typing simply as the absence of unchecked run-time type errors.[1] 19:45 jonrafkind: this sounds like your definition tauntaun 19:46 tauntaun: What does it mean for an error to be "checked"? 19:46 jonrafkind: i think of type systems as a conservative approximation of the runtime that should always be statically checkable, so properties of type systems should be static 19:47 tauntaun: That view strikes me as unusual. 19:47 jonrafkind: i guess they mean values of the wrong type wont flow through the system even if you pass an operator on them, as you can in C since everything is just bit patterns 19:47 Lajla: I think of type systems as simply a grammar that is not context free. 19:47 jonrafkind: so 1 + "5" is meaningful in C, but not in racket 19:47 Lajla: 1 + "5" should just be "6" 19:47 Lajla: 1 + "5a" should be "6b" 19:48 jonrafkind: i did that the other day in C, i meant to work with std::string but i accidentally did "foobar" + 5 and got some whacky segfault 19:48 tauntaun: Lajla, please pause for a while; I'm trying to have a serious convo. 19:49 tauntaun is still thinking... 19:49 jonrafkind: non-static safety checks are contracts, I suppose 19:49 jonrafkind: but i wouldn't really call 'contracts' part of the type system 19:50 Lajla: tauntaun, in all seriousness, an error is checked in mot terminology if the impementation can (must?) diagnose it. 19:50 tauntaun: mot? 19:50 Lajla: Some languages have unchecked errors, which is basically 'it's wrong, but if it happens what happens is arbitrary' 19:50 Lajla: tauntaun, most* 19:50 jonrafkind: and some languages will secretly coerce values for you, ala perl. which is the most evil thing ever 19:51 jonrafkind: well I guess c++ has some coercion evilness as well 19:52 tauntaun: Actually, I think Haskell does that too, in a more principled way, and it doesn't seem too bad. But anyway, I'm still pondering the original question... 19:52 Lajla: Perl coercion is magnificent, ahaha "0" is actually coerced to a number for you. 19:52 Lajla: Which is pretty cool, because "0 but true" is considered 0 in number context, but true in boolean context. 19:53 Lajla: tauntaun, where does haskell coerce? 19:53 Lajla: You mean the poly numbers? 19:53 jonrafkind: but its a pain in debugging.. print $x. prints 0. so $x + 1 should be 1 but its "01" ! 19:53 jonrafkind: or something like that, i thappened in python to me once, i forget exactly what perl will do 19:53 tauntaun: Lajla: I'm still thinking, and you're distracting me. 19:54 Lajla: jonrafkind, well, the Scheme display function has some of that. 19:55 Lajla: That (display 3) actually displays "3" I was never really comfortable with. 19:55 jonrafkind: but you can't do (+ "0" 1) 19:55 Lajla: That is true. 19:55 jonrafkind: it won't silently work, so yuo will know whats up 19:55 (join) lucian_ 19:55 Lajla: But you can do (display 3) 19:55 mithos28: is coercion part of the language or part of the function/operator? 19:55 tauntaun: jonrafkind: Cardelli's definition is consonant with the one I endorsed, for the only way to eliminate unchecked RTT errors is for every runtime value to be associated with a unique type. 19:55 Lajla: I like how OCaml has +. /. -. et cetera for float operations. 19:55 jonrafkind: i never use display 19:55 lucian_: Lajla: i think perl's coercion is dreadful :) 19:56 Lajla: mithos28, hard to say, as you can't add your own operators. 19:56 Lajla: lucian_, I think perl is dreadful. :) 19:56 lucian_: well, that too. and think ocaml goes a bit too far, too 19:56 Lajla: I don't. 19:56 tauntaun: btw, has E l i B a r z i l a y not weighed in on this? (I don't want to highlight his name and bother him if he's not interested in the discussion.) 19:56 Lajla: I luuuuv that part of OCaml. 19:56 lucian_: Lajla: why? the advantages are minimal 19:56 (quit) lucian: Ping timeout: 250 seconds 19:56 jonrafkind: who cares.. eli eli eli 19:57 (nick) lucian_ -> lucian 19:57 Lajla: The only thing about OCaml I dislike is that ; is not simply an operator with type unit -> 'a -> 'a, that would be fun. 19:57 lucian: i think that would be even more dreadful :) 19:57 Lajla: lucian, a big advantage is that the type system can infer if you're dealing with floats or not? 19:58 Lajla: lucian, why? 19:58 lucian: Lajla: but is that really important? 19:58 Lajla: I would think that is most elegant. 19:58 Lajla: lucian, yes 19:58 Lajla: It is pure and elegant. 19:58 lucian disagrees with ocaml's syntax, but not its semantics 19:58 lucian: and useless 19:58 tauntaun also dislikes ocaml's syntax. 19:58 Lajla: get outta here. 19:58 Lajla: I do too. 19:58 Lajla: Don't like the whitespace treatment 19:59 jonrafkind: ocaml reports way too many things as 'syntax error' and fails to tell you what caused the error 20:00 jonrafkind: i cant believe people use it professionaly 20:00 Lajla: But it does differnetiate + from +. 20:01 Lajla: THe first time I saw that I fell in love. 20:01 Lajla: Never have I seen a language do something that beautiful. 20:01 jonrafkind: made me want to puke 20:01 Lajla: Which would also be a beautiful sight. 20:01 (quit) saint_cypher1: Quit: Leaving. 20:02 (join) snaffu 20:02 (join) lucian__ 20:02 (quit) lucian: Ping timeout: 240 seconds 20:04 mithos28: Lajla: how is that better than haskell with the Num typeclass 20:05 Lajla: Because the num typeclass doesn't hold if you do like 3 + length xs I believe 20:05 Lajla: Or ehhh, wat was it again. 20:05 Lajla: घघI think 3 gets Inted 20:05 Lajla: But it's just not as beautiful. 20:06 bremner: you know what they say about beauty... 20:06 tauntaun: jonrafkind: as for your wondering whether contracts are part of the type system, I see no problem with that. In a sense, a type is nothing more than a contract. 20:06 lucian__ thinks +. is eminently ugly :) 20:06 (nick) lucian__ -> lucian 20:07 (quit) lucian: Remote host closed the connection 20:07 jonrafkind: typed racket uses contracts to ensure the soundness of types, thats for sure 20:07 mithos28: tauntaun: what about linear types, types involving security that require flow analysis 20:07 jonrafkind: but static types can be discharged statically, while contracts hang around at runtime 20:07 (quit) snaffu: Quit: leaving 20:08 Lajla: bremner, what do they say about it? 20:08 tauntaun: jonrafkind: yes, but even "dynamic" types are contracts. 20:08 tauntaun: (I say "contracts" in the general sense.) 20:08 jonrafkind: i think the word 'type' is just too overloaded, maybe we should call it a safety system, use types statically and contracts dynamically 20:08 tauntaun: jonrafkind: that does not harmonize with the fact of runtime types. 20:10 mithos28: tauntaun: arn't runtime types just a disjoint union and tag checking 20:11 tauntaun: mithos28: a disjoint union of what, exactly? 20:11 mithos28: all values representable in the language 20:11 tauntaun: and the "tag"---can you define that precisely too? 20:12 tauntaun: (I think I know what you mean; just want to be sure.) 20:12 jonrafkind: mithos28, thats an implemention of runtime types.. i mean so what 20:13 tauntaun: no, actually, that's the definition of type, static or dynamic. 20:13 tauntaun: well...let me back away from that a bit... 20:14 mithos28: i don't get tauntaun's point that contracts dynamically don't harmonize with runtime types 20:15 tauntaun: mithos28: I think you've misunderstood me, or I've misunderstood jonrafkind's use of the word "type" at 20:08. 20:15 jonrafkind: a type should just be something that prevents the machine from getting into a stuck state 20:16 tauntaun: jonrafkind: I'm sorry but that definition is too shallow and pragmatic. 20:16 (quit) mithos28: Quit: mithos28 20:18 jonrafkind: well if you consider operations on values for which the operation was not meant to be used as a 'stuck state' then it seems reasonable. c of course won't stop if you do 1 + "5" 20:19 tauntaun: my problem is that your definition is negative, whereas I'd prefer that the concept be defined in a positive way (a type is a "contract"). 20:19 jonrafkind: well, fwiw, hygiene is similarly defined negatively 20:19 tauntaun: btw, I confess I'm surprised that C allows 1 + "5" 20:20 jonrafkind: you can do anything in C! such a dynamic language! 20:20 tauntaun: are you sure that 1+"5" will fly? 20:20 tauntaun: I'm not sure it'll even compile. 20:20 jonrafkind: let me test real quick 20:20 tauntaun: thank you 20:20 bremner: sure, it's an array reference 20:20 bremner: "5"[1] 20:20 tauntaun: yes, but an array of chars. 20:20 jonrafkind: cc accepted it 20:20 jonrafkind: gcc 20:20 tauntaun: actually bremner, more like "5"[0] 20:21 jonrafkind: printf("%s\n", 1 + "5"); 20:21 bremner: should be zero 20:21 bremner: or empty string 20:21 tauntaun: jonrafkind: what's the output. 20:21 jonrafkind: i changed it to %d and it printed 134513857 20:21 jonrafkind: with %s its just a blank string 20:21 bremner: %d reads an int from that location 20:21 bremner: or something 20:21 jonrafkind: yea 20:22 jonrafkind: it just interprets the value as an int 20:22 bremner: "hello"[4]=0; 20:22 bremner: the road to hell... 20:22 jonrafkind: you mean "hello"[5] 20:22 tauntaun: jonrafkind: as for hygiene, I'm surprised you define it negatively and not positively. 20:22 jonrafkind: 4 is o 20:22 bremner: jonrafkind: no, that was an assignment 20:23 bremner: mutable string constants are (sometimes) legal 20:23 jonrafkind: ah, well thats illegal too because "hello" is immutable, allocated in the static area 20:23 jonrafkind: i guess its put in the .text section 20:23 bremner: it depends, I think, on compiler options/standards-versions/implementation-sanity 20:23 (join) dnolen 20:24 tauntaun: Btw, can anyone recommend a nice intro to contracts? 20:24 tauntaun: plt-help has only the reference. 20:25 jonrafkind: probably robby's paper on it would be good, although its not all the simple I suppose 20:26 tauntaun: Wait, no, plt-help has contracts in the Guide. 20:31 Lajla: Slightly different "string" is as an expression a pointer to the character s wih t next to it all to g and then null I believe. "string"[num] would not be "string"+num but *"string"+num, as in, considering the first character as a pointer I guess 20:31 Lajla: Or actually *("string"+num) 20:32 Lajla: As in, considering the num-th characte rof the string as a pointer and then referencing it. 20:33 (part) alexsuraci` 20:35 tauntaun: I believe there's a wee typo in one of the Racket Guide pages. Who might be interested in fixing it? 20:37 (quit) carleastlund: Quit: carleastlund 20:38 bremner: Lajla: true enough 20:39 Lajla: I believe by the way that all the C spec requires is that char is no longer than short int. 20:40 Lajla: I believe it even leaves signed or unsigned by default up the the implementation 20:40 tauntaun: OK, it's bedtime for me. For what it's worth, the two typos are in the first paragraph of http://etc.../racket/doc/guide/contract-func.html?q=contract, in the following clause: "a contract can ensure that a function receives only values in its range and produces only values in its domain." 20:47 (join) mithos28 20:50 (join) jmillikan 20:54 (quit) jonrafkind: Ping timeout: 255 seconds 20:56 (quit) mithos28: Quit: mithos28 21:05 (quit) masm: Quit: Leaving. 21:20 (join) mithos28 21:20 (quit) mithos28: Client Quit 21:23 (join) mithos28 21:26 (quit) mithos28: Client Quit 21:40 (join) mithos28 21:53 (join) realitygrill 21:57 (join) samth_ 21:57 (join) dnolen_ 22:00 (quit) dnolen: Ping timeout: 240 seconds 22:00 (nick) dnolen_ -> dnolen 22:14 (join) PLT_Notify 22:14 PLT_Notify: racket: master James Swaine * ca5c061 (2 files in 2 dirs): Fix fsemaphore-try-wait? so the sema's count is decremented. Make fsemaphore-wait and other futures-related functions cooperate with the GC better. - http://bit.ly/hBHsQS 22:14 (part) PLT_Notify 22:14 (quit) tauntaun: Ping timeout: 240 seconds 22:15 (quit) mithos28: Quit: mithos28 22:18 (quit) samth_: Ping timeout: 276 seconds 22:37 (join) mithos28 22:48 (quit) realitygrill: Ping timeout: 276 seconds 22:54 (join) realitygrill 23:47 (quit) misterm: Remote host closed the connection 23:58 (quit) mithos28: Quit: mithos28