00:03 eli: sheikra: Thanks! 00:10 sheikra: eli: ah... back from errands 00:11 sheikra: eli: I spent my past month trying to design a type system, only to find that racket already has most of it... 00:12 sheikra: eli: did you make it? ;-) 00:14 eli: sheikra: No, that's Sam, but I've been one of his earliest clients... 00:15 sheikra: eli: but I bet you already know a lot about it. It seems to be a lot more expressive than the ones found in ML and Haskell.. 00:17 sheikra: eli: It has almost everything I wanted: record, (open) union, arrow, recursive, subtyping, parametric polymorphism.. 00:18 sheikra: eli: the only thing missing is overloading, do we really need it? 00:29 eli: sheikra: It has a (much) more sophisticated type system than the usual HM that ML/Haskell uses. It was created to accomodate idiomatic Scheme/Racket code. 00:29 eli: But there are some rough edges as a result. 00:29 sheikra: eli: what are the rough edges? 00:30 eli: Some notable ones are the lack of a strong inference (since it's much harder), and in some cases you need to explicitly instantiate polymorphic types (which is actually related). 00:30 eli: But it's definitely way more expressive, starting from subtypes and going up from there. 00:30 sheikra: what do you mean by "strong inference"? do you mean the one that uses unification as in HM? 00:31 eli: Yes -- in ML it's common to not write many types, in TR it's necessary. 00:31 eli: But subtypes makes it obvious 00:32 eli: (λ (x) (+ x 1)) can be typed as `Any -> Any' `Number -> Any' `Number -> Number' `Integer -> Integer' etc etc. 00:32 sheikra: That's one of my lessons. I tried to have "backwards" inference for subtyping, and failed that. 00:33 eli: Even just `Any' -- except that then you won't be able to call it since the type checker doesn't know that it's a function. 00:33 eli: So in a sense it's more stuff for students to learn... 00:33 sheikra: But I don't think type annotations is a drawback. 00:33 eli: In ML and Haskell (mostly) there is one type for such a function, 00:33 eli: but in TR you have a choice that can express different intentions. 00:34 sheikra: All we have to write is types for function parameters (and maybe output) right? 00:34 eli: Yes, the annotations are not too problematic. They can be annoying in `let's etc, but it mostly gets them right. 00:35 sheikra: I have the intuition that those internal ones can all be inferred 00:35 eli: Not all of them, but certainly enough that it's not too big of a problem. 00:35 eli: But getting there took some effort... 00:36 sheikra: It is not a problem, rather I think it an advantage to require annotations for function input and output 00:36 eli: I started very early to teach a class with the language, so I complained very frequently. 00:36 sheikra: eli: good. so you helped to improve it, and saved me lots of trouble. thank you :-) 00:36 eli: There were some cases with real problems, where student's need to use things that they don't understand. 00:37 eli: Yeah, I certainly suffered knowing that I want it to get better. 00:37 sheikra: eli: do you have examples where you need annotations for internal expressions? 00:37 sheikra: ah, have to have lunch... 00:37 sheikra: see you later 00:37 eli: OK. 00:48 sheikra: I'm back 00:59 (quit) sheikra: Read error: Connection reset by peer 00:59 (join) sheikra 00:59 (quit) dnolen: Quit: dnolen 01:08 (quit) sheikra: Quit: Leaving 01:29 (join) jeapostrophe 01:36 (quit) jeapostrophe: Quit: jeapostrophe 01:48 (join) sheikra 01:50 (nick) sheikra -> yw0 01:51 (nick) yw0 -> ywwy 01:51 (nick) ywwy -> wwyy 01:51 (nick) wwyy -> wii 01:51 (nick) wii -> yinw 01:52 (nick) yinw -> wyin 01:53 (nick) wyin -> yin 01:55 (nick) yin -> yinw 01:56 (quit) yinw: Quit: Leaving 01:56 (join) yinw 01:58 (nick) yinw -> yin 01:58 (nick) yin -> yinw 01:59 (quit) yinw: Client Quit 02:00 (join) yinw 02:00 (quit) yinw: Client Quit 02:01 (quit) ozzloy: Ping timeout: 258 seconds 02:02 (join) ozzloy 02:02 (quit) ozzloy: Changing host 02:02 (join) ozzloy 02:04 (join) yin 02:09 gf3: how can I make serve/servlet operate from the base path but also not consume assets? 02:10 gf3: the docs show how to do one or the other 02:10 gf3: but not both at the same time 02:10 gf3: I tried this: 02:10 gf3: (serve/servlet twatlr-dispatch 02:10 gf3: #:extra-files-paths (list (build-path "./public")) 02:10 gf3: #:servlet-regexp #rx"(?!.css)$") 02:10 gf3: no dice though 02:11 gf3: got it :) 02:12 gf3: somewhat 02:14 gf3: :( 02:18 (join) realitygrill 02:21 (quit) jonrafkind: Ping timeout: 252 seconds 02:26 (quit) yin: Ping timeout: 276 seconds 02:26 (join) yin 02:44 (join) hkBst 02:51 (quit) hkBst: Ping timeout: 255 seconds 03:43 (join) masm 04:18 (join) tfb 04:30 (quit) masm: Quit: Leaving. 04:30 (join) hkBst 04:32 (quit) realitygrill: Quit: realitygrill 05:25 (quit) kennyd: Read error: Connection reset by peer 06:04 (join) lucian 06:21 (quit) yin: Quit: Leaving 07:15 (join) misterncw 07:26 (join) MayDaniel 07:38 (quit) lucian: Ping timeout: 240 seconds 07:51 (join) yin 07:53 (quit) yin: Client Quit 07:59 (join) dnolen 08:14 (join) DGASAU 08:14 DGASAU: Alright, I've lost those notes again. :) 08:15 DGASAU: How do I check if racket supports SMP? 08:15 DGASAU: Also, how do I force it to use SMB and/or pthreads? 08:15 DGASAU: (How do I check threads?) 08:19 (join) jeapostrophe 08:22 DGASAU: Ah, right, I've found traces of those. 08:22 DGASAU: you could add --enable-places --enable-futures to configure 08:22 DGASAU: Is there a way to test whether those features are enabled? 08:41 DGASAU: Hm. 08:42 DGASAU: And that part about querying no. of available cpus and the rest I cannot find. 08:42 DGASAU: Is there apropos tool in racket? 08:43 DGASAU: OTOH, it cannot help, I remember "require"-ing something. 08:46 (join) masm 08:51 (join) mithos28 09:53 (quit) jeapostrophe: Quit: jeapostrophe 09:56 (join) yin 10:10 (quit) dnolen: Quit: dnolen 10:32 (quit) misterncw: Remote host closed the connection 10:34 (join) RacketCommitBot 10:34 RacketCommitBot: [racket] plt pushed 2 new commits to master: https://github.com/plt/racket/compare/37c43c2...6634332 10:34 RacketCommitBot: [racket/master] fix rendering of transparent structures - Matthew Flatt 10:34 RacketCommitBot: [racket/master] doc repairs - Matthew Flatt 10:34 (part) RacketCommitBot 10:40 (quit) hkBst: Remote host closed the connection 10:41 (join) RacketCommitBot 10:41 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/22c8cdec0b9b382ba5962ee6b0c06482f177fe73 10:41 RacketCommitBot: [racket/master] another more doc correction - Matthew Flatt 10:41 (part) RacketCommitBot 10:48 (join) RacketCommitBot 10:48 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/113f8895924974fbab59431e355133883736475e 10:48 RacketCommitBot: [racket/master] correct correction - Matthew Flatt 10:48 (part) RacketCommitBot 10:51 (join) ChibaPet 10:51 (join) dnolen 10:58 (join) RacketCommitBot 10:58 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/29a843ac379438a6b7540716c68537a09c62ac51 10:58 RacketCommitBot: [racket/master] get rid of a broken attempt to optimize the 20,000-ft overview refreshing - Robby Findler 10:58 (part) RacketCommitBot 11:12 (join) jeapostrophe 11:34 (join) RacketCommitBot 11:34 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/50386760dd78aca2f5db2112c3b0a5e7ea853799 11:34 RacketCommitBot: [racket/master] added launch-many-worlds/proc; Closes 10559 - Matthias Felleisen 11:34 (part) RacketCommitBot 11:35 (join) realitygrill 11:38 eli: stamourv: ping 11:39 DGASAU: Good evening. 11:39 eli: That, too. 11:40 DGASAU: eli: could you remind me how I check no. of cpus supported 11:40 DGASAU: and check whether threads are supported in racket. 11:40 DGASAU: I have lost that part of my notes. 11:41 eli: rudybot: init racket 11:41 rudybot: eli: your sandbox is ready 11:41 eli: rudybot: (processor-count) 11:41 rudybot: eli: error: eval:1:1: compile: access from an uncertified context to protected variable from module: '#%futures in: processor-count 11:41 eli: DGASAU: ...that. 11:42 (join) RacketCommitBot 11:42 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/ac919568a60295b5bdb1e028c24c98153bf2a122 11:42 RacketCommitBot: [racket/master] fix doc bug, with 50386760dd this truly; Closes PR 10559 - Matthias Felleisen 11:42 (part) RacketCommitBot 11:42 DGASAU: reference to undefined identifier: processor-count 11:43 eli: DGASAU: Also, in the new release places are enabled by default. 11:43 DGASAU: Welcome to DrRacket, version 5.1.2.3--2011-08-03(-/f) [3m]. 11:43 DGASAU: Language: Pretty Big; memory limit: 128 MB. 11:43 eli: ..and that release can start moving out as soon as I catch stamourv 11:43 eli: stamourv: ping 11:43 eli: DGASAU: It's part of the `racket' language, or `racket/future' to be more specific. 11:44 DGASAU: Why cannot I change it from IDE? 11:44 DGASAU: Anything broken? 11:45 eli: Change what? 11:45 DGASAU: I don't see "racket" language in the menu. 11:46 eli: You just use the default "detect language from source", and have a `#lang racket' at the top. 11:46 DGASAU: No way to set it at REPL? 11:47 eli: You can do the `require' on the repl. 11:47 eli: But using any other language is a pretty bad idea. 11:47 DGASAU: Ah, alright, I've got command line REPL. 11:48 DGASAU: Welcome to Racket v5.1.2.3. 11:48 DGASAU: > (processor-count) 11:48 DGASAU: 1 11:48 yin: morning, eli! 11:48 DGASAU: $ cpuctl list 11:48 DGASAU: Num HwId Unbound LWPs Interrupts Last change #Intr 11:48 DGASAU: ---- ---- ------------ ---------- ------------------------ ----- 11:48 DGASAU: 0 0 online intr Wed Aug 3 14:02:24 2011 16 11:48 DGASAU: 1 1 online intr Wed Aug 3 14:02:24 2011 0 11:48 eli: yin: Good morning. 11:48 DGASAU: Still no support. 11:49 DGASAU: Any knob I can check? 11:49 yin: eli: It's midnight here :-) 11:49 eli: DGASAU: still the same problem, not lack of support, did you report it? 11:50 eli: yin: as long as you're having fun... 11:50 DGASAU: Not yet. 11:50 eli: stamourv: >>!!PING!!<< 11:50 yin: eli: sure! I just downloaded sam's thesis and am about to do some research 11:50 DGASAU: I was interrupted, and decided to fix the build first. 11:51 eli: DGASAU: I told it was a good time to report it, a fix could have gone with this release. Way too late now... 11:51 DGASAU: No problem. 11:51 DGASAU: I can pull it up as necessary. 11:52 yin: eli: I'd like to know the cases where you encounter problems with the type system. Is it mostly related to predicates like pair? number? etc? 11:54 eli: yin: I remember you asked about that -- here's an example: http://tmp.barzilay.org/x 11:55 (join) lucian 12:02 yin: eli: thanks 12:03 DGASAU: From user perspective it isn't clear why drracket sets not "racket" language by default, 12:03 DGASAU: and why one cannot change it. 12:06 yin: eli: It seems that is because the type (: call : (All (A B) ((A -> B) A -> B))) doens't really capture the notion of subtyping? 12:09 eli: yin: I don't think so, it's just something that could be resolved with better unification of the type with the actual use, but that's much harder when there are subtypes. 12:10 eli: DGASAU: Which language do you have in drracket? 12:10 yin: eli: yeah you mentioned subtypes 12:11 stamourv: eli: pong 12:11 yin: eli: I think the type of call should be (All (A B) ((A -> B) C -> B))), for some C where C <: A. 12:11 stamourv: Sorry, I didn't look at my IRC client. 12:12 yin: eli: It seems the type system cannot express this .. 12:12 DGASAU: eli: PrettyBig, as you see above. 12:12 DGASAU: Though it seems to remember its latest state. 12:13 DGASAU: In any case, "racket" language isn't accessible through menu. 12:13 DGASAU: For an unknown reason. 12:13 eli: stamourv: Just tell me what you decide with that, if it doesn't go in I can release, otherwise it's a build and then a release. 12:13 (join) mblomqvist 12:14 eli: yin: For that level of questions you can ask stamourv here, (right after he's done checking something for the release...) 12:15 (quit) blomqvist: Read error: Connection reset by peer 12:15 stamourv: eli: Maybe this only affects the tests, I don't know. 12:15 yin: eli: okay. I guess I was wrong. the function type should have implied subtyping. 12:15 eli: DGASAU: Pretty big is a legacy language, it's not the default. the default should be to use the "detect language from source" and have "#lang racket" in the definitions which determines the interaction language. (And that text will be there for you in new windows.) 12:15 stamourv: This is the first time I see such an error, so I'm guessing. 12:16 eli: stamourv: Just run the nightly testing thing (from the release). 12:16 stamourv: That's what I'm planning to do. I'm building with the extra patch. 12:17 eli: stamourv: It doesn't barf like that on the nightly build. (And you should really fix that test.) 12:17 DGASAU: Well... 12:18 DGASAU: When I remove .racket, it does print 12:18 DGASAU: Language: No language chosen 12:18 yin: stamourv: Are you familiar with the type system of racket? 12:18 DGASAU: The question arises, how did I end in that state? 12:18 stamourv: eli: By fixing that test, you mean die in a more spectacular way? 12:18 stamourv: yin: Yes, I'm one of the maintainers of Typed Racket. 12:19 eli: stamourv: Yes -- throw an error, or (exit 1), see that file. 12:19 eli: DGASAU: Right, and then you pop up the dialog and the first option is the one you should always choose, the rest is noise. (And the only way you could have had that state is by explicitly choosing it at some point.) 12:20 yin: stamourv: great! I just asked eli for an example where he had trouble with the type system. http://tmp.barzilay.org/x. but I don't quite understand the type of "rest" 12:20 stamourv: eli: Shouldn't rackunit do this? That's what we're using, no extra complications. 12:20 stamourv: yin: I'll have a look. 12:20 yin: stamourv: thanks 12:21 yin: eli: I tried to make the unit system work for my case, and found too complicated to set it up.. Who is in charge of the unit system? 12:22 stamourv: yin: Type `rest' at the DrRacket REPL (in Typed Racket), that will show its type. 12:22 (join) jao 12:22 stamourv: yin: For now, you can ignore the parts after the `:', these are filters. 12:23 yin: stamourv: oh. I was about to ask. thank you 12:23 stamourv: The `case-lambda' part means that we have a funciton intersection type. 12:23 stamourv: So basically, a overleaded function type. 12:23 yin: stamourv: why does rest have a overloaded type? 12:24 stamourv: yin: `rest' works on pair types and on list types. 12:24 stamourv: Each part of the `case-lambda' takes care of one of these cases. 12:24 yin: stamourv: aren't all lists pairs? 12:24 DGASAU: Ah, that's it. 12:24 stamourv: No, there's the empty list. 12:25 DGASAU: It is like "eval-buffer". 12:25 stamourv: Which means that something of type `(Listof X)' may not be a pair. 12:25 DGASAU: Perhaps I should read the documentation. 12:26 stamourv: eli: Nightly tests running. 12:26 yin: stamourv: oh, right. are lists defined as a union of pair and '()? 12:26 stamourv: yin: Close. A recursive union of List and Null. 12:27 yin: stamourv: so I don't understand why this program doesn't type check. 12:27 DGASAU: eli: is that it doesn't capture stderr to direct it to the window a design decision? 12:28 stamourv: yin: The problem is that the inference is not powerful enough to figure it out. 12:28 stamourv: The program is perfectly valid. It works, once you nudge inference in the right direction using the type annotation. 12:29 stamourv: Inference is hard for interesting type systems. 12:30 yin: stamourv: definitely. this is the most interesting one I've ever seen in a real language :-) 12:30 (nick) mblomqvist -> blomqvist 12:30 stamourv: eli: Nightly tests pass if I add the extra commit. 12:30 eli: stamourv: OK, so you want it to be added? 12:31 stamourv: yin: We're pretty happy about it. IMO, it enables a lot of useful idioms that most typed languages can't accomodate. 12:31 stamourv: eli: Yes. 12:31 eli: DGASAU: stderr goes into the window; the only errors that would go in your shell's stderr would be internal drracket errors. 12:31 yin: stamourv: Do you know which part don't type check? The function or the parameter, or both? The error message doesn't tell me that. 12:31 stamourv: eli: I don't know if its absence would affect anything but the tests, though. 12:32 eli: yin: Re units -- Matthew is maintaining it, but best to send questions on the list. 12:32 yin: stamourv: yes. It almost solved all my complaints to the "typed" languages ;-) 12:32 eli: stamourv: whatever, I leave the decision for you... 12:33 eli: stamourv: Re rackunit -- I don't know what it does exactly, but clearly there's a problem that didn't used to happen with the tests. 12:33 stamourv: yin: What do you mean, which part doesn't type check? It's the interactions between the two. 12:34 (join) RacketCommitBot 12:34 RacketCommitBot: [racket] plt pushed 1 new commit to release: https://github.com/plt/racket/commit/f49b095c07a296419730e9880d6b63165f4dde8f 12:34 RacketCommitBot: [racket/release] Fix kernel-struct tests in TR. - Eric Dobson 12:34 (part) RacketCommitBot 12:34 stamourv: eli: Is it a lot of trouble to include it in the release? 12:34 stamourv: I have my answer ;). 12:35 yin: stamourv: Is there a difference between (List Positive-Byte) and (Listof Positive-Byte)? 12:35 eli: stamourv: The only hassle besides testing it is running a new build which will take 2-3 hours. 12:35 (join) jonrafkind 12:36 yin: eli: ah, maybe I should just chat here about the unit system... 12:38 stamourv: eli: Sorry about that. 12:39 stamourv: yin: Yes. `List' is for heterogenous lists of fixed length (kind of like tuples). `Listof' is for homogenous lists of any length. 12:39 stamourv: So `(List Positive-Byte)' is for lists containing a single `Positive-Byte' 12:40 yin: stamourv: Is that the problem? The functon takes (Listof a) in the second branch, but the input is (List Positive-Byte). They don't unify. 12:40 stamourv: And `(List Positive-Byte String Symbol)' is for lists of length 3, with a positive byte, a string and a symbol. 12:41 stamourv: yin: `List' is just syntactic sugar for a bunch of `Pair'. 12:41 stamourv: So `(List Positive-Byte)' is the same as `(Pair Positive-Byte Null)'. 12:41 stamourv: And that's handled by the first case. 12:42 stamourv: eli: Do you still need me right now? I'm planning to head out for lunch. 12:42 yin: stamourv: then it should have no problem.. 12:43 yin: stamourv: the type should be Null 12:44 stamourv: As I said, the types make perfect sense, and it's easy (for a human), to figure out how to make it work. 12:44 stamourv: But TR's inference cannot handle cases like this (yet). 12:44 yin: stamourv: a human is not much better than a computer ;-) 12:45 stamourv: (Basically, inferring the types of polymorphic arguments (`rest') to polymorphic functions `call'.) 12:45 stamourv: yin: You'd be surprised. 12:45 stamourv: But we're all working on it ;). 12:47 yin: stamourv: we need to check that (Pair Positive-Byte Null) <: (Pairof a (Listof b)). So we check that Positive-Byte <: a and Null <: (Listof b)... 12:48 stamourv: But what are A and B? That's what inference is trying to figure out. 12:48 stamourv: Anyway, I'll be right back, heading out for lunch. 12:48 yin: stamourv: they are anything :-) 12:49 yin: stamourv: see you later 12:58 (quit) tfb: Quit: sleeping 13:18 (join) Guest73359 13:19 (nick) Guest73359 -> rekahsoft 13:20 rekahsoft: hi all..i have been trying to play with some mysql stuff in racket but was having an issue connecting to my db..i am using jaz/mysql:1:7 from planet 13:21 rekahsoft: specifically i was doing: (connect "localhost" 3306 "rekahsoft" "password" #:setcurrent? #t) 13:25 (quit) dherman: Quit: dherman 13:28 (join) mceier 13:30 jonrafkind: eli, are the current release installers highly likely to be the final versions? 13:30 jonrafkind: i want to get a head start on making the ppa 13:31 jonrafkind: hm, i guess the version needs to be updated first 13:33 rekahsoft: specifically error=111 connection refused...thing is i can connect with "mysql -u rekahsoft -p password" 13:34 jonrafkind: rekahsoft, i have no idea but you can try ryanc/db 13:36 rekahsoft: jonrafkind: trying it now :P thanks :) 13:37 rekahsoft: looks a little better then using jaymccarthy/sqlite and jaz/mysql to provide multiple db support 13:40 stamourv: yin: Back. Any new questions? 13:40 stamourv: jonrafkind: He added a commit this morning, and as of ~1h ago, he was making a new build. 13:40 jonrafkind: oh nice 13:40 yin: stamourv: I was trying to work out a solution. but I guess there is a big trouble. The system doesn't seem to be able to restrict the type variables locally. 13:40 jonrafkind: stamourv, how do you get the release commits? 13:41 stamourv: rekahsoft: ryanc/db was designed to supercede all of these, IIRC. 13:41 stamourv: yin: What do you mean? 13:41 stamourv: jonrafkind: git checkout origin/release 13:41 jonrafkind: oh you dont get the commits emails to you, ok 13:41 yin: stamourv: this simple case seems easy to solve though 13:41 eli: jonrafkind: Yeah, it's not the final one yet. 13:42 jonrafkind: eli, but the commit you did ~1 hour ago might be? 13:42 stamourv: jonrafkind: Not for the release build, I don't. 13:42 rekahsoft: hmm...still no luck.. 13:42 rekahsoft: makes no sense :S 13:42 eli: jonrafkind: I don't know what "might be" refers to. 13:42 jonrafkind: might be the release.. 13:42 rekahsoft: i don;t see it being anything with iptables (my firewall).. 13:42 eli: jonrafkind: The release is not a commit, it's a bunch of built installers... 13:43 rekahsoft: i allow all tcp traffic on port 3306 on my local machine 13:43 eli: jonrafkind: If you're going from source then you should really wait for the move of the `stable' branch. 13:43 yin: stamourv: Positive-Byte <: a can be checked. We retain the partial order Positive-Byte <: a in the substitution. For Null <: (Listof b), we do a case analysis on Listof, then found that Null <: Null. Then we propagate Null through the subtyping relation, and the result is Null. 13:44 rekahsoft: do the passwords sent to mysql have to have special characters escaped or something? 13:44 stamourv: yin: The thing is, we don't what A and B are, so we can't check if Positive-Byte <: a holds. 13:44 jonrafkind: eli, and will that happen today? 13:45 yin: stamourv: the real problem I'm worry about is that if the cdr is not Null, but some other pair, in which case (Listof b) would instantiate some partial order on the type variable b and return (Listof b) as output type ... 13:45 stamourv: yin: Inference's goal is to figure out what A and B should be, so we can proceed with typechecking. But inference does not work with polymorphic arguments to polymorphic functions. 13:45 (quit) mceier: Quit: leaving 13:46 yin: stamourv: we don't need to check that Positive-Byte <: a holds if a is fresh, we just put the relation in the substitution, and have it validated everything we extend the partial order... 13:46 stamourv: yin: If we're dealing with fixed-length lists (the `List' constructor), the `Listof' part of the type won't matter. 13:46 yin: stamourv: in a sense you are right.. 13:47 eli: jonrafkind: Yes. If you want a specific reminder, add it in iplt/release/checklist 13:47 yin: stamourv: I was talking about the (Listof b) inside the first branche: (Pairof a (Listof b)) 13:47 jonrafkind: you mean, "Remind Jon Rafkind when the release branch has been moved to stable" ? 13:49 yin: stamourv: (Pairof a (Listof b)) -> (Listof b). We check that (List Positive-Byte) <: (Pairof a (Listof b)) -> (Listof b) 13:50 yin: stamourv: oh, ... it seems that Pairof should be inviant on its arguments? 13:51 stamourv: yin: I just realized that I spend the entire conversation thinking of `cdr' and not `rest'. `rest' does not work on arbitrary Pair structures. 13:51 (quit) p3n0id: Ping timeout: 258 seconds 13:51 stamourv: As for the variaance of `Pairof', since Racket's pairs are immutable, it should be covariant. 13:52 yin: stamourv: so... we check that Positive-Byte <: a and Null <: (Listof b) 13:52 stamourv: yin: Just to be sure I understand, are you suggesting a way to make it work, or are you trying to understand why it doesn't? 13:53 yin: stamourv: I'm trying to make it work :) 13:53 stamourv: Ah, ok, that makes sense. 13:53 stamourv: Then I should stop trying to explain the limitations of the current implementation ;). 13:54 yin: stamourv: I tried to make a inference system with subtyping some time ago, and it didn't quite work. but I hadn't annotations 13:55 stamourv: I don't think full inference is decidable for our system, but reducing the number of necessary annotations is always a win. 13:55 yin: stamourv: I almost thought it should work with annotations, but this example seems to suggest that my guess was not quite true... 13:55 yin: stamourv: yep, especially those type applications, are very annoying ;-) 13:57 stamourv: And since it seems you have an idea of how to fix it, it would be great if you could try to implement it. 13:57 stamourv: We like patches :). 13:58 yin: stamourv: I'd be happy to do it if I find a way :-) 13:58 rekahsoft: yeah..must be something with the connection to the mysql server..maybe my permisions for my users?.. 13:59 yin: stamourv: I seem to be able to fix this example, but I'm worrying about more general ones.. 14:01 yin: stamourv: I guess there must be type arguments to rest eventually.. such as ((rest (U Int Bool)) (list 4)). I hate that ... 14:01 stamourv: yin: We have some examples of code that doesn't currently work in the TR tests, some of which because of inference. Maybe that would be a starting point. 14:02 stamourv: These are in `collects/tests/typed-scheme/xfail'. 14:02 yin: stamourv: great. I'll take a look 14:02 stamourv: As for type arguments, `inst' does something slightly similar. 14:04 yin: stamourv: oh, there is an example there. (call (inst rest Number (Listof Number)) (list 4)) seems to work? 14:05 stamourv: It should, because you're explicitly instantiating A and B, so inference doesn't have to do anything. 14:06 yin: stamourv: I don't seem to see the file, do you mean the github repository? 14:07 stamourv: Which Racket distribution did you download? 14:10 yin: 5.1.1, but I downloaed it as a package, not from repository 14:10 yin: I'm looking at https://github.com/plt/racket/tree/master/collects/typed-scheme 14:13 rekahsoft: lol found it..nothing to do with racket...in my mysql conf i have skip-networking instead of bind-address :S 14:13 rekahsoft: still calls to question why it didn;t work with 14:14 stamourv: yin: It's in `collects/tests/typed-scheme/xfail'. You have the wrong collect. 14:14 rekahsoft: when* using the socket 14:14 yin: stamourv: yeah. got it 14:17 rekahsoft: hmm..when i try and use a socket i get the following error: 14:17 rekahsoft: parse-packet: internal error: bytes left over after parsing #(struct:handshake-packet 10 "5.5.15-log" 77 #"$igJyD&/XPf3g0XKN%mu" (long-password found-rows long-flag connect-with-db no-schema compress odbc local-files ignore-space protocol-41 interactive ignore-sigpipe transactions protocol-41-OLD secure-connection) utf8-general-ci 2); bytes were: #"mysql_native_password\0" 14:18 yin: stamourv: can you tell me what are "filters" in the types? 14:20 rekahsoft: but "mysql --socket=/var/run/mysqld/mysqld.sock" -u rekahsoft -p password" works 14:21 stamourv: yin: Filters are sets of propositions about the arguments of a function. 14:21 stamourv: To give you an example, if you do `(number? x)', and it returns `#t', you know that `x' is a number. 14:21 yin: stamourv: ah, got it 14:21 stamourv: Or, if it returns `#f', you know that `x' is not a number. 14:22 stamourv: These are used to refine types based on the control flow of the program. 14:22 stamourv: Say `x' is of type `(U Number String)'. 14:23 stamourv: (if (number? x) (+ x 1) (string-length x)) 14:23 (join) dherman 14:23 stamourv: works just fine, and returns a number. 14:23 yin: So what does ((! False @ (cdr) 0) | (False @ (cdr) 0)) (cdr 0)) mean in rest's type? 14:24 stamourv: It means that if `rest' returns false, then the `cdr' of the 0th argument to `rest' (its only argument) is false, and vice versa if it returns non-false. 14:25 stamourv: Propositions can refer to paths into arguments (here, the cdr of the argument) in addition to the arguments themselves. 14:26 (join) RacketCommitBot 14:26 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/c938fdf4190d12bf715fc6290f648554bc6c997c 14:26 RacketCommitBot: [racket/master] added syntax property 'disappeared-use so that keywords in world clauses point to origin and have docs - Matthias Felleisen 14:26 (part) RacketCommitBot 14:30 (join) RacketCommitBot 14:30 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/7de873f431ae197e1b7f6280b94a8a862637d85e 14:30 RacketCommitBot: [racket/master] added syntax property to universe 'disappeared-use so that keywords in world clauses point to origin and have docs - Matthias Felleisen 14:30 (part) RacketCommitBot 14:32 yin: stamourv: Why do we care whether it is true of false? Is it because any type can be used as a boolean test? 14:34 stamourv: In Racket, anything that's not `#f' counts as true, and can be used in an `if'. 14:46 (join) RacketCommitBot 14:46 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/595272d19a359c6e387a686748c7ac258673eeda 14:46 RacketCommitBot: [racket/master] use a (dark) red italic font for online check syntax errors - Robby Findler 14:46 (part) RacketCommitBot 15:00 rekahsoft: hi all..still stuggling with this stupid mysql stuff..specifically with ryanc/db:1:3 from planet 15:00 rekahsoft: i am trying to use a socket but i get the error: 15:00 rekahsoft: parse-packet: internal error: bytes left over after parsing #(struct:handshake-packet 10 "5.5.15-log" 83 #"7D3q`m#bGzUvqV Number)'. 15:55 stamourv: But a lot less that are `(case-lambda (Number -> Number) (String -> String))'. 15:55 stamourv: (Please forgive the fast and loose reasoning about the "number" of such functions.) 15:56 yin: hmmm why do I see more functions in the second case? 15:57 (join) dnolen_ 15:58 stamourv: yin: A function with the second type _must_ work on both Numbers and Strings, do `sqrt', '+' and others are in the first category, but not the second. 15:58 stamourv: In the second category, we have things like the identity and `(lambda (x) (if (number? x) (+ x 1) (string-append x "!")))'. 15:59 (quit) dnolen: Ping timeout: 252 seconds 16:00 yin: stamourv: oh, right. function of the second category must be one of the first but not the other way around 16:02 stamourv: yin: That's the idea. 16:02 yin: stamourv: Is this the standard defintion of intersection types? I did try to read Reynold's paper but ... ;-) 16:03 yin: stamourv: It makes sense here, but I don't know how intersection types can be used in other cases especially non-function ones 16:04 stamourv: yin: We're using a restricted definition of intersection types, but full intersections shouldn't be too different. 16:04 stamourv: As for non-function intersections, I don't have any examples. I haven't studied them all that much. 16:08 yin: stamourv: the only time I saw it used in a non-function case is at a talk about an OOP problem (diamond problem) and it got quite nasty in the end :P 16:10 stamourv: yin: Type systems for interesting OO features are still an active area of research. 16:11 yin: stamourv: Python has some features I hoped to have in racket 16:12 stamourv: Such as? 16:12 yin: for example getting a field from a structure using just its name ... 16:13 yin: def f(x): return x.a 16:13 jonrafkind: i have a convoluted macro for doing that 16:13 jonrafkind: (with-struct x foo x.a) 16:13 yin: jonrafkind: nice. can you point me to the code? 16:14 jonrafkind: hm, now i have to find it 16:14 yin: jonrafkind: what is foo in the example? 16:14 jonrafkind: the struct type 16:14 stamourv: yin: One issue with this is that if you do `x.a' and `x' doesn't have an `a' field, what does the error message say? 16:15 stamourv: Expected ??? got ? 16:15 yin: stamourv: type error ;) 16:15 stamourv: That's not very helpful. 16:15 jonrafkind: 'bad syntax'.. thats the usual help you get 16:15 yin: stamourv: hey we have typed scheme any way 16:15 stamourv: But if `foo-a' fails, at least it can tell you it was expecting a foo. 16:16 stamourv: yin: Yes, but _that_'s something I could imagine complicating the type system. 16:16 yin: stamourv: that's exactly what I tried to avoid. I don't want the function to be restricted to work on foo 16:16 jonrafkind: ah, duck typing 16:17 yin: stamourv: yep. but it should work out easily with may be an additional annotation 16:17 stamourv: Sure, but if you have a function that works on anything that has an `a', it's kind of hard to know what the function is supposed to do, since any struct can make `a' mean whatever it wants. 16:17 yin: stamourv: (define: f ([x : {.x : t}]) : t x) or something like that.. 16:18 yin: should be .a in the braces 16:18 yin: stamourv: the field needs to be annotated too .. 16:18 jonrafkind: with classes you can do (get-field obj a), i guess you want something like that 16:19 stamourv: We have someone working on extending TR to work with classes and mixins, and he probably has a solution to similar problems. 16:19 stamourv: asumu: ^ 16:19 yin: jonrafkind: probably, since this thing seems to come from python 16:22 yin: stamourv: do you also do CFA? 16:22 stamourv: No. 16:23 stamourv: I mean, if you squint, a type system is a weak flow analysis. And with occurrence typing, we have something slightly stronger. But we don't do any actual CFA. 16:24 stamourv: TR's optimizer also does a tiny bit of extra analysis, but no actual CFA. 16:28 yin: stamourv: your sexp-diff looks interesting 16:30 stamourv: yin: It's a port from some Common Lisp code I found. 16:30 stamourv: So it's probably crufty in places. 16:31 stamourv: But it works well enough for debugging. 16:31 yin: stamourv: cool. Is it using some kind of dynamic programming? 16:32 stamourv: I think so, but I haven't looked at it in ages, so I forget. 16:37 (join) dherman 16:38 (join) RacketCommitBot 16:38 RacketCommitBot: [racket] plt pushed 2 new commits to master: https://github.com/plt/racket/compare/89dfe3d...4324a1a 16:38 RacketCommitBot: [racket/master] [honu] return a parse error if the lexer couldnt find any other matching regex - Jon Rafkind 16:38 RacketCommitBot: [racket/master] [honu] add colored lexer so drracket can color honu syntax appropriately - Jon Rafkind 16:38 (part) RacketCommitBot 16:42 yin: stamourv: I didn't know that common lisp has such bad reputation ;-) 16:44 stamourv: yin: Well, it's nice in some regards, and not so nice in others. 16:44 yin: stamourv: Have you ever compared the performance of Racket with Chez scheme? 16:45 stamourv: That's kind of hard to do, considering the cost of a Chez licence. 16:46 stamourv: But I benchmark Racket against Gambit, Larceny, Chicken and Bigloo every once in a while. 16:46 (join) hussaibi 16:46 (join) hussaibi_ 16:48 yin: stamourv: how do they compare? 16:49 stamourv: Racket is quite competitive in general. 16:49 stamourv: And Typed Racket can improve performance significantly in some cases. 16:50 yin: stamourv: I should use typed racket after I got my code more modular. How much does it improve over untyped ones? 16:50 stamourv: There are some numbers in our PLDI paper of this year: http://www.ccs.neu.edu/home/stamourv/papers/lang-lib.pdf 16:52 yin: The difference seems to be smaller than I expected 16:53 stamourv: Between Racket and others, or between Typed and Untyped? 16:53 yin: with untyped. how can it even take longer in dderiv? 16:54 yin: do you count the compile time too? 16:55 stamourv: Compilation time is not counted. 16:55 stamourv: The slowdown is probably due to additional runtime checks that were inserted to get the program to typecheck. 16:56 stamourv: I just looked at the typed version of dderiv, and that seems to be the case. 16:59 yin: It is a little strange. The untyped version already has runtime checks, why would the typed version add more checks? 17:00 stamourv: Here's the culprit: 17:00 stamourv: (: get (Symbol Symbol -> ((Listof Deriv) -> Deriv))) 17:00 stamourv: (define (get sym d) 17:00 stamourv: (cdr (assert (assq sym pg-alist)))) 17:00 stamourv: 17:01 stamourv: This implements `get' for CL-like plists. 17:01 stamourv: The untyped implementation assumed that any key that's looked up will be there, and takes the `cdr' of the result, without making sure it's not `#f' beforehand. 17:02 stamourv: The typed implementation can't just assume, it needs to check. 17:02 yin: That's reasonable 17:03 stamourv: But that adds extra checks at runtime, which causes a slowdown. 17:03 yin: last time I run my program (which is quite time consuming) on Petite and Racket, racket beat petite. 17:03 (quit) mithos28: Read error: Connection reset by peer 17:04 stamourv: Other benchmarks read things from standard output, and assume that whatever it got was a number. Again, the typed version needs to add extra checks. 17:04 (join) mithos28 17:04 stamourv: yin: That's not too surprising. I don't believe petite compiles anything. 17:05 yin: stamourv: who know... closed source software ;-) 17:07 yin: stamourv: Is there a plan to build an operating system with racket? 17:08 stamourv: Some years ago, Racket could boot on the bare metal. 17:08 stamourv: And there's someone working on something similar these days, but I can't say much about it. 17:09 yin: that would be nice! 17:09 stamourv: yin: www.ccs.neu.edu/scheme/pubs/icfp99-ffkf.pdf 17:09 stamourv: And I agree! 17:09 (quit) anRch: Quit: anRch 17:09 yin: I'm thinking how much part of the processor is no longer necessary if the OS and programs are all built in a high level language 17:09 (quit) hussaibi_: Read error: Connection reset by peer 17:10 (join) hussaibi__ 17:10 (quit) realitygrill: Read error: Connection reset by peer 17:10 (join) realitygrill 17:11 stamourv: yin: Like what? 17:12 yin: stamourv: like the paging hardware, TLB etc. also the hardware protection part 17:13 yin: since scheme doesn't have address arithmetic, we no longer need any sandboxing. 17:14 yin: the memory is allocated per object and not per page, so no longer need paging.. 17:17 stamourv: Sure, you can do all of these in software, but the point of having them in hardware is to make them fast. 17:17 stamourv: If anything, some of this hardware can be even more useful. 17:18 yin: stamourv: paging hardware doesn't really make it any faster. Consider a field reference into a structure... 17:18 stamourv: If the language runtime has direct access to the paging hw, it can use it for efficient read/write barriers, etc. 17:19 yin: stamourv: I doubt we will still need any barriers in a language like scheme 17:19 stamourv: It has nothing to do with the language, it has to do with the runtime, in this case the GC. 17:20 (quit) dnolen_: Ping timeout: 252 seconds 17:20 yin: stamourv: If the language provides pointers and address arithmetic, there is no way to implement protection in software 17:21 yin: A user program can write into system's memory 17:22 stamourv: Sure, but having this protection in hardware is faster. 17:23 yin: but without address arithmetic, we no longer need this kind of "protection", so it is even faster :-) 17:24 stamourv: I'm not talking about a process tying to clobber another's data. I'm talking about GC barriers. 17:25 yin: oh, that's a thing I haven't really implemented ;-) sorry 17:25 yin: do you mean the barriers between objects? 17:27 stamourv: Here's a good explanation: 17:27 stamourv: http://www.iecc.com/gclist/GC-algorithms.html 17:27 stamourv: Look for "barrier". 17:31 yin: stamourv: got it. I really have to study run time system.. 17:32 (quit) hussaibi__: Ping timeout: 260 seconds 17:32 (quit) hussaibi: Ping timeout: 276 seconds 17:32 yin: stamourv: have to sleep.. It's nice talking to you today. 17:32 stamourv: yin: Sure, was a pleasure. 17:32 stamourv: Good night. 17:32 yin: stamourv: good day! bye~ 17:33 (quit) yin: Quit: Leaving 17:35 (quit) ChibaPet: Quit: Leaving. 17:52 (join) hussaibi 17:52 (join) hussaibi_ 18:02 (quit) jeapostrophe: Quit: jeapostrophe 18:08 (quit) realitygrill: Quit: realitygrill 18:10 stamourv: http://cufp.org/conference/sessions/2011/functional-mzscheme-dsls-game-development 18:11 (join) rudybot_ 18:13 (quit) rudybot: Ping timeout: 258 seconds 18:13 (nick) stchang -> schang 18:16 (join) RacketCommitBot 18:16 RacketCommitBot: [racket] plt pushed 3 new commits to master: https://github.com/plt/racket/compare/4324a1a...5d4e5ed 18:16 RacketCommitBot: [racket/master] Abstract printing of function types. - Vincent St-Amour 18:16 RacketCommitBot: [racket/master] Improve error message for calls to 'sort' when inference fails. - Vincent St-Amour 18:16 RacketCommitBot: [racket/master] Break long lines. - Vincent St-Amour 18:16 (part) RacketCommitBot 18:19 (nick) schang -> stchang 18:33 (quit) MayDaniel: Read error: Connection reset by peer 18:34 (quit) hussaibi_: Ping timeout: 240 seconds 18:35 (quit) hussaibi: Ping timeout: 258 seconds 19:03 (join) jeapostrophe 19:04 (quit) jeapostrophe: Client Quit 19:17 (quit) clklein: Ping timeout: 276 seconds 19:20 (quit) DT``: Ping timeout: 255 seconds 19:31 (join) realitygrill 19:31 (join) dnolen 19:31 (join) DT`` 19:34 (quit) lucian: Ping timeout: 264 seconds 19:37 (quit) DT``: Ping timeout: 255 seconds 19:50 (join) DT`` 19:57 tonyg: Hi all: Could I get some review of a couple simple patches? 19:57 tonyg: The first, https://github.com/tonyg/racket/commit/83bd5a8419ef981be2731888052f436ecd7ede1e, is one samth was going to take a look at a week ago or so 19:57 rudybot_: http://tinyurl.com/3zjqw3g 19:57 tonyg: The second, https://github.com/tonyg/racket/commit/d2c2ad64ad56cb5c26d3ab8a7d29a08f285d5d32, is a simple doc type correction 19:57 rudybot_: http://tinyurl.com/43sctkl 19:58 tonyg: stamourv: perhaps I should bother you about it tomorrow when I see you? 20:07 (join) hussaibi 20:08 (join) hussaibi_ 20:20 (join) groovy2shoes 20:28 (quit) groovy2shoes: Read error: Connection reset by peer 20:33 (join) groovy2shoes 20:42 (quit) masm: Ping timeout: 260 seconds 20:57 (quit) hussaibi_: Ping timeout: 252 seconds 20:57 (quit) hussaibi: Ping timeout: 250 seconds 21:05 (quit) dnolen: Quit: dnolen 21:06 (join) dnolen 21:07 (quit) dnolen: Client Quit 21:11 (join) jeapostrophe 21:14 (quit) jeapostrophe: Client Quit 21:18 (join) hussaibi 21:18 (join) hussaibi_ 21:19 (join) jeapostrophe 21:19 (quit) jeapostrophe: Client Quit 21:26 (quit) jonrafkind: Ping timeout: 260 seconds 21:52 (quit) mithos28: Quit: mithos28 21:55 eli: tonyg: I'll do the non-TR one. 21:58 tonyg: thanks eli :) 22:12 (quit) groovy2shoes: Quit: It is now safe to turn off your groovebot. 22:28 (join) RacketCommitBot 22:28 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/a6705c4f0790b64443097ec674efd4cb1658f74e 22:28 RacketCommitBot: [racket/master] Typo fix - Eli Barzilay 22:28 (part) RacketCommitBot 22:53 (join) dnolen 22:54 (quit) jao: Ping timeout: 252 seconds 23:18 (quit) littlebobby: Quit: Ex-Chat 23:43 (join) yin 23:52 (join) jeapostrophe 23:57 (quit) yin: Quit: Leaving