00:04 (quit) _p4bl0: Read error: Connection reset by peer 00:04 (join) cipher- 00:04 (join) _p4bl0` 00:04 (quit) cipher: Ping timeout: 252 seconds 00:04 (quit) jamessan: Ping timeout: 252 seconds 00:04 (join) jamessan` 00:04 (quit) jamessan`: Changing host 00:04 (join) jamessan` 00:19 danking: Is there a #lang name for the student langauges? Opening DrRacket to try something is a pain 00:20 mithos28: #lang htdp/bsl 00:20 danking: mithos28: Excellent. 00:20 mithos28: I think that works, it has minor differences with the language level 00:29 (quit) haruki_zaemon: Ping timeout: 240 seconds 00:29 (join) haruki_zaemon 00:52 mithos28: If I have two pattern variables both bound with ellipses is there an easy way to generate the sequence of them alternating 00:53 mithos28: say (a …) = (a1 a2) and (b …) = (b1 b2). I want something that => (a1 b1 a2 b2) 00:54 mithos28: ((a b) …) gets me ((a1 b1) (a2 b2)) but that has an extra level of parentheses 00:57 jonrafkind: i guess you could just zip them together 00:57 jonrafkind: (with-syntax ([((both ...) ...) (zip as bs)]) #'(both ...)) 00:58 asumu: Need a flatten too? 00:58 jonrafkind: the nested destructuring matcher should be an effective flatten 00:58 asumu: Ah, right. 00:58 jonrafkind: or you can just use flatten, either way 00:58 jonrafkind: #'(both ... ...) 00:59 mithos28: that is my current solution, it just seems like it should be easier 01:01 jonrafkind: the alternative, and my dream, is to have a better set of tools in templates instead of just ellipses, possibly to bind ellipses to a function that can do arbitrary computation, and then you can bind other ellipses types things 01:02 jonrafkind: (define-my-ellipses-thing zip... blah) #'((as bs) zip...) 01:02 jonrafkind: but of course you would have to reimplement 'syntax' to do so, of course I do that in honu 01:03 mithos28: that would be cool 01:06 mithos28: what is the racket style on make-noun vs noun as the constructor for a data type? 01:06 jonrafkind: it seems to have shifted to just noun 01:07 asumu: It seems inconsistent though. make-parameter vs. class. 01:07 asumu: (okay class is a bad example) 01:09 mithos28: ok, I just see so much make- names from the core libraries, it is disconcerting making my constructors not have the make- 02:08 (quit) jonrafkind: Ping timeout: 240 seconds 02:09 (quit) realitygrill: Quit: realitygrill 02:10 (join) realitygrill 02:11 (join) wishbone_ 02:13 (quit) wishbone4: Ping timeout: 256 seconds 02:13 (quit) MayDaniel: Read error: Connection reset by peer 02:52 (quit) mithos28: Quit: mithos28 03:16 Gertm: morning 03:20 (join) hkBst 03:25 (join) Blkt 03:29 Blkt: good morning everyone 03:37 (join) ahinki 03:42 (join) noelw 03:47 noelw: epw: if you're still around, i might be able to help 04:08 (nick) _p4bl0` -> _p4bl0 05:05 (quit) ahinki: Read error: Connection reset by peer 05:05 (join) ahinki_ 05:05 (nick) ahinki_ -> ahinki 05:08 (join) ahinki_ 05:11 (quit) ahinki: Ping timeout: 260 seconds 05:11 (nick) ahinki_ -> ahinki 05:32 (nick) jamessan` -> jamessan 05:42 (quit) noelw: Quit: noelw 05:43 (quit) Blkt: Remote host closed the connection 05:43 (join) Blkt 05:54 (part) haruki_zaemon: "Laterz" 06:11 (join) oiiii 06:20 (join) tim-brown 06:30 _p4bl0: is there any reason Racket's webserver enforce to have a "Content-Type" header in the HTTP response? Even when there is no content at all (HEADER or OPTIONS methods for instance) 06:30 (quit) cipher-: Read error: Operation timed out 06:37 (join) cipher 06:37 (nick) cipher -> Guest935 07:06 (quit) tim-brown: Quit: Leaving 07:12 (join) francisl 07:14 RacketCommitBot: [racket] plt pushed 7 new commits to release: http://git.io/MGZLhw 07:14 RacketCommitBot: [racket/release] fix cocoa `get-clipboard-string' to never return #f; fix docs - Matthew Flatt 07:14 RacketCommitBot: [racket/release] update Racket history for v5.2 - Matthew Flatt 07:14 RacketCommitBot: [racket/release] history for teachpacks updated; please propagate - Matthias Felleisen 07:33 (join) tim-brown 08:17 (quit) francisl: Quit: francisl 08:32 (join) noelw 08:44 (join) jeapostrophe 08:47 (quit) noelw: Quit: noelw 09:22 (quit) si14: Remote host closed the connection 09:23 (join) si14 09:23 (quit) si14: Remote host closed the connection 09:47 (join) noelw 10:23 (quit) asumu: Ping timeout: 240 seconds 10:24 (join) asumu 10:28 (join) epw 10:29 (nick) samth_away -> samth 10:30 samth: _p4bl0: probably it would be easy to fix 10:30 samth: make a patch, submit a pull request 10:34 (part) Gertm: "WeeChat 0.3.5" 10:47 _p4bl0: samth: oh, actually it seems it's already been taken care of (commit e9a9d7949030faab94d0223a6ebebe3ad9e8b602) 10:49 _p4bl0: I guess it will be in 5.2 10:49 _p4bl0: good :-) 10:50 _p4bl0: I'll use #"text/plain; charset=utf-8" instead of #f as request-mime in the mean time 10:50 (quit) realitygrill: Quit: realitygrill 11:08 (quit) ahinki: Quit: ChatZilla 0.9.87 [Firefox 8.0/20111011182523] 11:17 (join) dnolen 11:25 (quit) jeapostrophe: Quit: jeapostrophe 11:36 danking: My favorite error message: "expected the identifier `TOKENS' at: TOKENS" 11:37 noelw: Error messages regarding generative structures are fun 11:37 noelw: Expected value of type foo, but got value of type foo 11:37 noelw: or similar 11:37 noelw: Hilarity ensues 11:41 (join) jonrafkind 11:44 (join) mithos28 11:51 (join) jeapostrophe 11:52 (join) anRch 11:59 (nick) wishbone_ -> wishbone4 12:03 (join) davegurnell 12:05 tim-brown worries increasingly about noelw's sense of humour 12:07 davegurnell: you're not the only one :) 12:11 noelw: Alright haters, I'm out of here 12:14 (join) dingfeng 12:19 (quit) oiiii: Remote host closed the connection 12:22 (join) mye 12:22 dingfeng: what's a good way to wrap a data structure to give it it's own type? using a struct with 1 field? 12:22 mithos28: Thats what I usually use 12:23 (quit) Blkt: Remote host closed the connection 12:24 dingfeng: and unwrap it every time it's used? 12:24 mithos28: yep 12:24 mithos28: what is the point of making it its own type? 12:25 dingfeng: hmm.... what if i just want to know that the data structure is true for some predicate 12:25 dingfeng: like, (< (length x) 10). i see things like pairof types, positive-bytes. 12:26 mithos28: In typed racket, or at the contract level? 12:26 dingfeng: typed racket 12:26 mithos28: You can use refinement types 12:27 mithos28: not sure how well they work, they are experimental 12:27 mithos28: but the basic idea is you get a subtype for values which pass the predicate 12:27 dingfeng: oh 12:27 dingfeng: a subtype? 12:27 mithos28: and then you pass the proof that it passes the predicate throughout the type system 12:28 dingfeng: not a value that satisfies two types? 12:28 mithos28: Well integer is a subtype of number 12:28 mithos28: and an integer value is a member of both types 12:28 dingfeng: like the number 12, could it be a type of integer, a type of number 12:29 mithos28: yep 12:29 dingfeng: and a type of even number, and a type of divisible by 3 number? 12:29 mithos28: yes 12:30 dingfeng: ok! 12:30 dingfeng: it's int he guide? 12:30 mithos28: multiple partially overlapping refinement types might not work all that well though 12:30 mithos28: rudy 12:30 mithos28: rudy-bot: help define-refinement-type 12:30 mithos28: rudybot: doc define-refinement-type 12:30 rudybot: mithos28: your sandbox is ready 12:30 rudybot: mithos28: not found in any library's documentation: define-refinement-type 12:31 mithos28: rudybot: (require typed/racket) 12:31 rudybot: mithos28: Done. 12:31 mithos28: rudybot: doc define-refinement-type 12:31 rudybot: mithos28: not found in any library's documentation: define-refinement-type 12:31 dingfeng: was just curious. i don't have an actual use-case for multiple partially overlapping refinement types. only for refinement types, yes. 12:31 mithos28: it should be, I cannot remember the name 12:31 (quit) hkBst: Remote host closed the connection 12:32 mithos28: rudybot: doc declare-refinement 12:32 rudybot: mithos28: http://docs.racket-lang.org/ts-reference/Experimental_Features.html#(form._((lib._typed-scheme%2Fbase-env%2Fprims..rkt)._declare-refinement)) 12:32 dingfeng: subtyping? 12:32 (join) polann 12:32 dingfeng: mm 12:32 dingfeng: but if it's experimental, how were the positive bytes and integers done? 12:33 mithos28: union types 12:33 mithos28: the integer type is actually a union of other types 12:34 dingfeng: oh! 12:36 mithos28: and all of those don't partially overlap 12:36 dingfeng: this is cool. i've never used refinements in any other language at work. 12:37 mithos28: java sub typing with instance of casts is of similar behavior 12:37 mithos28: but only for the instance of predicate instead of arbitrary ones 12:40 dingfeng: which leads to a huge difference in practice 12:40 dingfeng: what about the type of list? 12:40 dingfeng: (Any -> Boolean : (Listof Any)) 12:40 dingfeng: is that a refinement type? 12:41 mithos28: no, that is a predicate type 12:41 mithos28: it says that if the function returns true, then the argument has the type (Listof Any) 12:41 mithos28: i've got to go, I'll be on later if you have more questions 12:41 (quit) mithos28: Quit: mithos28 12:41 dingfeng: alright. thanks! 12:44 (join) haruki_zaemon 12:55 (quit) anRch: Quit: anRch 12:55 (quit) jeapostrophe: Quit: jeapostrophe 12:59 (part) tim-brown: "Leaving" 13:10 (join) mithos28 13:12 (join) MayDaniel 13:25 (quit) noelw: Quit: noelw 13:33 danking: How come define-binary-check expects to be passed two identifiers for actual and expected? http://docs.racket-lang.org/rackunit/api.html?q=rackunit#(form._((lib._rackunit/main..rkt)._define-binary-check)) 13:36 (quit) davegurnell: Quit: davegurnell 13:39 (quit) MayDaniel: Read error: Connection reset by peer 13:41 asumu: danking: Looks like it binds them in the expression. 13:42 (quit) dnolen: Quit: dnolen 13:43 (quit) jonrafkind: Ping timeout: 244 seconds 13:58 (join) MayDaniel 14:02 (join) DanBurton 14:03 (join) jonrafkind 14:07 (join) dnolen 14:19 (quit) dnolen: Remote host closed the connection 14:48 dingfeng: how do i call untyped functions in typed racket? 14:49 mithos28: you cannot, you can import untyped functions as typed functions using require/typed 14:49 mithos28: rudybot: doc require/typed 14:49 rudybot: mithos28: http://docs.racket-lang.org/ts-reference/special-forms.html#(form._((lib._typed-scheme%2Fbase-env%2Fprims..rkt)._require%2Ftyped)) 14:51 dingfeng: thanks (: 14:53 (quit) polann: Quit: Lost terminal 15:03 (join) shofetim 15:11 (join) mceier 15:14 DanBurton: Can Typed Racket infer the type of a top level function? 15:14 (quit) Nanakhiel: Read error: Connection reset by peer 15:14 (join) Nanakhiel 15:15 mithos28: Typed Racket does local inference, so in practice you need to annotate every function 15:17 DanBurton: *could* it infer the type of top level functions? 15:17 DanBurton: or is there some type weirdness that would prevent that? 15:19 dingfeng: *could* it infer the type of top level functions where it is possible? 15:19 mithos28: I think the reason is exponential time and not necessarily useful types instead of decidability 15:20 mithos28: So maybe, samth or stamourv would be able to better answer this if they are around 15:22 dingfeng: typed racket compiles in linear time? 15:22 dingfeng: it takes around 6s to compile my code 15:23 mithos28: I think some things are quadratic, but the ones I know about are bugs 15:23 (join) jeapostrophe 15:23 mithos28: do you use raco make? 15:23 mithos28: I have never had one file take 6s to compile 15:24 mithos28: actually maybe I have, 6s isn't that long 15:29 dingfeng: i just press ctrl+T in drracket 15:29 dingfeng: my typed racket code consistently compiles at 6s for a single file of around 2 pages 15:30 dingfeng: that's on an i5 mobile processor, windows 15:30 mithos28: Check if you have the option to save compiled files in the change language menu 15:30 mithos28: I mispoke about never seeing 6s, that is not that long 15:31 mithos28: also I assume you are on a released version of racket 15:31 mithos28: there were speedups that I think are still only in the development version, and will be in the soon to be released version 15:32 (join) dingfeng_quek 15:34 dingfeng_quek: gg sleep. i'll try it another time =) 15:34 (quit) dingfeng_quek: Client Quit 15:34 (quit) dingfeng: Ping timeout: 265 seconds 15:54 (join) EmmanuelOga 16:01 samth: mithos28: the subtyping algorithm is defintely super-linear 16:02 samth: also, the reasons not to do global inference are (a) that it's very hard in the presence of subtyping and (b) it produces terrible error messages 16:28 mithos28: samth: what part is super linear? 16:30 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/xylO5A 16:30 RacketCommitBot: [racket/master] switch Mac OS X build default (32-bit vs 64-bit) to compiler default - Matthew Flatt 16:30 RacketCommitBot: [racket/master] CGC fix for OpenBSD x86_64 - Matthew Flatt 16:30 RacketCommitBot: [racket/master] fix JIT early reference to JIT generated address - Matthew Flatt 16:36 samth: mithos28: union subtyping, for example, is quadratic 16:37 mithos28: ok, is it linear in the number of expressions? 16:47 DanBurton: does #racket have a favorite pastebin? 16:49 mithos28: I use gist.github.com 16:52 samth: mithos28: the number of types is linear in the number of expressions in the worst case 16:52 DanBurton: Thoughts on this? https://gist.github.com/1302347 16:53 (quit) epw: Quit: Lost terminal 16:54 mithos28: What is the problem with it being too generic? I don't have racket installed on my current machine. 16:54 samth: DanBurton: try this: 16:54 samth: (: tree-sum-int ((Tree Integer) -> Integer)) 16:54 samth: (define (tree-sum-int t) 16:54 samth: (tree-fold (inst id Integer) + t)) 16:55 samth: mithos28, DanBurton: the problem is applying a polymorphic function to a polymorphic argument 16:55 samth: which Typed Racket doesn't allow 16:55 samth: which is why the explicit instantiation is required there 16:55 samth: DanBurton: note that the `plus' function isn't necessary in either version 16:56 samth: other than that, i like it :) 16:56 DanBurton: :) 17:00 (quit) shofetim: Read error: Connection reset by peer 17:00 DanBurton: Is there a reason Racket can't apply polymorphic functions to polymorphic arguments? 17:01 (quit) MayDaniel: Read error: Connection reset by peer 17:01 samth: DanBurton: it's hard to infer the instantiation 17:02 samth: DanBurton: hopefully, we'll eventually be able to do it for simple cases like the one you have 17:04 DanBurton: I guess Haskell has spoiled me when it comes to my expectations on a type system :P 17:04 samth: DanBurton: haskell makes different choices that make inference possible in some cases where it isn't in Typed Racket 17:06 DanBurton: I do like the ease of union types in Racket 17:06 DanBurton: TR, I mean 17:06 samth: yes, that's one of the big differences 17:10 DanBurton: variadic arguments look a lot easier, too 17:10 (part) haruki_zaemon: "Laterz" 17:11 (quit) karswell: Excess Flood 17:12 (join) karswell 17:23 (quit) DanBurton: Quit: ChatZilla 0.9.87 [Firefox 6.0/20110811165603] 17:35 (quit) jeapostrophe: Ping timeout: 255 seconds 17:39 danking: Does anyone have examples of using a syntax-class which accepts formal arguments? name:(stx-class arg1) doesn't seem to work as expected, nor does it look parsable in a sane way. 17:40 jonrafkind: (~var name (stx-class arg1)) 17:41 stamourv: danking: There's an example in collects/typed-racket/optimizer/float.rkt 31:0 17:42 stamourv: Use site at 93:24. 17:42 stamourv: (Which is basically what jonrafkind said.) 17:43 danking: stamourv, jonrafkind: Thanks. 17:43 danking: stamourv: Syntax-classes definitely aren't higher order in the manner we were speaking, the arguments seem to be normal variables you can use in, for example, #:with clauses. 17:45 jonrafkind: you mean syntax-classes aren't first class 17:51 (quit) mceier: Quit: leaving 17:54 (join) jeapostrophe 18:07 (join) Fare 18:10 (join) francisl 18:45 (quit) jeapostrophe: Quit: jeapostrophe 19:12 (join) jeapostrophe 19:13 (quit) Fare: Quit: Leaving 19:15 (join) Fare 19:17 (quit) karswell: Excess Flood 19:17 (join) karswell 19:56 (quit) mithos28: Quit: mithos28 20:08 (nick) samth -> samth_away 20:09 (quit) Fare: Ping timeout: 240 seconds 20:10 (join) mithos28 20:18 (join) jrslepak_ 20:21 (quit) jrslepak_: Client Quit 20:30 (join) spdegabrielle 20:30 (quit) jonrafkind: Read error: Operation timed out 20:36 (join) spdegabrielle_ 20:36 (quit) spdegabrielle: Read error: Connection reset by peer 20:36 (nick) spdegabrielle_ -> spdegabrielle 20:40 (quit) spdegabrielle: Client Quit 20:45 (quit) mithos28: Quit: mithos28 20:57 (join) mithos28 21:03 (quit) acarrico: Remote host closed the connection 21:15 (join) jrslepak_ 21:23 (quit) mithos28: Ping timeout: 240 seconds 21:41 (join) niarch 21:44 (quit) Nanakhiel: Ping timeout: 258 seconds 21:58 (join) anRch 22:02 (join) acarrico 22:05 (join) realitygrill 22:26 (join) anRch_ 22:30 (quit) anRch: Ping timeout: 248 seconds 22:38 (quit) realitygrill: Ping timeout: 256 seconds 22:38 (join) realitygrill 22:43 (quit) anRch_: Read error: Connection timed out 22:44 (join) anRch 22:45 (quit) anRch: Client Quit 22:45 (join) jonrafkind 22:51 (quit) jonrafkind: Ping timeout: 253 seconds 22:52 (quit) francisl: Remote host closed the connection 22:52 (join) francisl 23:03 (join) jonrafkind 23:09 (join) dingfeng 23:24 dingfeng: hii 23:24 dingfeng: i get this issue with typed racket 23:24 dingfeng: after i do some predicate checks on a list, it becomes a 23:24 dingfeng: (mkdir ((dir "${temp.config.dir}" . #) . #) . #) 23:24 dingfeng: it no longer cons to a (), and it's no longer considered a list! 23:42 (join) francisl_ 23:46 (quit) francisl: Ping timeout: 248 seconds 23:46 (nick) francisl_ -> francisl