00:05 (quit) francisl: Quit: francisl 00:09 RacketCommitBot: [racket] plt pushed 4 new commits to master: http://git.io/bFliVQ 00:09 RacketCommitBot: [racket/master] Add #:opaque keyword to class/c. - Asumu Takikawa 00:09 RacketCommitBot: [racket/master] Opaque class/c should treat field opaquely too. - Asumu Takikawa 00:09 RacketCommitBot: [racket/master] Added tests for opaque class/c contracts. - Asumu Takikawa 00:16 (nick) LeNsTR|off -> LeNsTR 00:29 (join) mithos28 00:30 (quit) jonrafkind: Ping timeout: 248 seconds 00:31 (quit) yoklov: Read error: Connection reset by peer 00:31 mithos28: What is the easiest way to reuse forms matching a splicing syntax class in the template for syntax/parse? 00:31 (join) yoklov 00:31 mithos28: I have an example here: https://gist.github.com/1777599 00:31 (quit) yoklov: Remote host closed the connection 00:32 mithos28: But it adds an extra list layer around the forms because there might be multiple ones 00:45 (join) veer 00:45 (quit) cataska: Ping timeout: 252 seconds 00:48 (join) jeapostrophe 00:52 (quit) dspt: Ping timeout: 265 seconds 00:53 (join) dspt 00:53 (join) cataska 00:56 (quit) asdfhjkl: Quit: Leaving 01:01 mithos28: anyone around with good macro-fu? I'm trying to write a curried macro and cannot see a way of doing it. 01:03 veer: mithos28: from your gist (baz) produces (bar + ()) 01:03 mithos28: veer: yeah, I was trying to splice it back in 01:03 veer: which is not same as (bar +) I think 01:04 mithos28: that is the problem, I cannot use a syntax class to check that the input matches what i want, and then pass it along to get processed 01:04 veer: You can use attributes 01:04 RacketCommitBot: [racket] plt pushed 7 new commits to master: http://git.io/o5ADuA 01:04 RacketCommitBot: [racket/master] db: clean up and reogranize common impl code - Ryan Culpepper 01:04 RacketCommitBot: [racket/master] db: finalize close-on-exec psts within lock - Ryan Culpepper 01:04 RacketCommitBot: [racket/master] db: added cursors - Ryan Culpepper 01:05 veer: wait let me try 01:05 mithos28: here is my solution: https://gist.github.com/1777744 01:05 mithos28: it is ugly 01:06 mithos28: which is why I want something nicer 01:09 veer: mithos28: see your first gist I have added comment 01:10 veer: oh 01:10 mithos28: but I have to do something for every case, where I just want to be able to splice in all the forms that matched that pattern variable 01:10 veer: right 01:10 veer: let me check again 01:27 (quit) jrslepak: Quit: Leaving 01:30 veer: well I don't know , may be you need to provide another syntax class for whole baz pattern may be? :) 01:31 mithos28: my solution is working, it just feels ugly 01:31 veer: there is nothing ugly in macros :) 01:31 veer: they all are 01:31 veer: ugly 01:32 mithos28: or pretty in their own unique way 01:34 veer: btw what was the context or the actual problem 01:35 mithos28: the second gist shows it mostly 01:35 mithos28: I was trying to add a provide subform to one of my macros 01:35 mithos28: so that I could provide out the bindings it created 01:36 mithos28: I have a wrapper macro that takes in many identifiers and creates many calls to the first macro 01:37 mithos28: Thus I wanted to have the many argument one do a check on the syntax of the provide subform, and then pass it on to the main macro 01:38 mithos28: now I need to figure out how to combine contracts and ctypes 01:39 veer: cool :) 01:39 veer: there is also define-provide-syntax in racket , just in case .. 01:40 mithos28: that is doing something different 01:41 mithos28: I have a macro (define-my-thing (foobar) c-type) 01:41 mithos28: and now I have (define-my-thing (foobar) #:provide c-type) 01:41 mithos28: and (define-my-thing (foobar) #:provide/contract contract c-type) 01:44 veer: I see , my mistake :) 01:47 (quit) PfhorSlayer: *.net *.split 01:47 (quit) mario-goulart: *.net *.split 01:47 (quit) sethalves: *.net *.split 01:47 (quit) elliottcable: *.net *.split 01:47 (join) elliottcable 01:51 (join) PfhorSlayer 01:51 (join) mario-goulart 01:51 (join) sethalves 01:56 (join) sindoc 02:07 (quit) jeapostrophe: Read error: Operation timed out 02:35 (quit) ivan\: Ping timeout: 240 seconds 02:36 (join) ivan\ 02:42 (join) hkBst 02:42 (quit) hkBst: Changing host 02:42 (join) hkBst 03:13 (quit) angusiguess: Read error: Connection reset by peer 03:14 (join) angusiguess 03:18 (join) bluezenix 03:18 (quit) bluezenix: Client Quit 03:21 (nick) LeNsTR -> LeNsTR|off 03:22 (part) sindoc 03:23 (quit) mithos28: Quit: mithos28 03:33 (join) Blkt 03:39 (join) tfb 03:41 (join) Blkt` 03:41 (quit) Blkt`: Read error: Connection reset by peer 03:55 (join) Shvillr 03:57 (join) Patterngazer 03:57 (quit) Patterngazer: Client Quit 03:58 (join) Patterngazer 03:58 (quit) Shviller: Ping timeout: 248 seconds 04:04 (join) bluezenix 04:06 (quit) tfb: Quit: sleeping 04:08 (nick) LeNsTR|off -> LeNsTR 04:12 (join) ASau`` 04:17 (quit) ASau`: Ping timeout: 260 seconds 04:35 (quit) Shvillr_: Quit: bye 04:36 (join) Shviller 05:02 (join) sindoc 05:04 (join) mceier 05:06 (quit) hkBst: Remote host closed the connection 05:07 (join) hkBst 05:11 (quit) snorble: Read error: Connection reset by peer 05:11 (quit) shaatar: Max SendQ exceeded 05:11 (join) shaatar 05:12 (nick) chaozzbubi -> ChaozZBubi 05:13 (join) ahinki 05:14 (join) dous_ 05:17 (quit) dous: Ping timeout: 276 seconds 05:18 (quit) angusiguess: Read error: Connection reset by peer 05:19 (join) angusiguess 05:33 (nick) LeNsTR -> LeNsTR|off 05:36 (quit) hkBst: Ping timeout: 276 seconds 05:36 (join) hkBst 05:37 veer: is there an example for how to use prop:set!-transformer , I can't seem to get it 05:46 (join) Mordae 05:46 Mordae: Hi everybody. 05:46 (nick) LeNsTR|off -> LeNsTR 05:47 Mordae: I have this little confusing behavior of send/suspend and I'd like to ask if anyone knows about it. 05:49 (join) spdegabrielle 05:51 Mordae: When I (send/suspend), I get a nice URL, that should be /current/url;(kont), but I get /some/url/ive/visited/recently;(kont), which breaks things. 05:52 Mordae: Any ideas why this happens? I am using stateless web servlets and dispach-rules. 05:53 (quit) bluezenix: Read error: Connection reset by peer 05:57 (join) bluezenix 06:00 (join) asdfhjkl 06:01 (quit) spdegabrielle: Quit: Colloquy for iPhone - http://colloquy.mobi 06:17 (quit) hadriano: Read error: Connection reset by peer 06:18 tim-brown: morning all. 06:19 tim-brown: is there an "accepted" way of declaring a time_t in racket's FFI? 06:19 tim-brown: as in how to wrap "char *ctime(const time_t *timep);" 06:28 (join) masm 06:39 (quit) bluezenix: Quit: Leaving. 06:39 (join) tfb 06:41 (nick) LeNsTR -> LeNsTR|off 06:48 veer: @tim-brown just out of curiosity why not (_fun _pointer -> _string) 06:53 (nick) LeNsTR|off -> LeNsTR 06:58 (nick) ChaozZBubi -> chaozzbubi 06:59 (nick) chaozzbubi -> ChaozZBubi 07:01 tim-brown: veer: it's more what is the pointer a pointer to... 07:03 veer: tim-brown : ok , are you asking that it should check if pointer is of type time_t right? 07:06 veer: if that is so then you can create tagged pointer (define time_t (_cpointer 'time_t)) 07:07 veer: and use it in all function that need it 07:08 (join) bluezenix 07:11 (quit) tfb: Quit: sleeping 07:11 tim-brown: er... i can't find anything that takes a raw time_t (as opposed to a pointer to time_t) 07:12 tim-brown: it's the actual type of time_t I'm concerned about (bad example, using ctime) 07:12 tim-brown: i have some time functions that need wrapping 07:13 (join) noelw_ 07:14 (quit) noelw: Ping timeout: 244 seconds 07:14 (nick) noelw_ -> noelw 07:15 veer: ok ,right I get it. 07:17 veer: wikipedia says time_t is unspecified type , how cool is that :) 07:29 tim-brown: yeah... wondered if there was something internal to racket that i could _somehow_ get a handle on 07:29 tim-brown: otherwise, I'll call it a _long and wait for the earth-shattering kaboom 07:32 (nick) LeNsTR -> LeNsTR|off 07:44 (join) EmmanuelOga 07:47 (quit) veer: Quit: Leaving 07:53 (join) jeapostrophe 07:59 (join) vkz 08:03 (quit) kanak: Quit: Leaving. 08:13 (part) Mordae 08:14 (join) kanak 08:15 (quit) vkz: Quit: vkz 08:24 (join) ahinki_ 08:27 (quit) ahinki: Ping timeout: 245 seconds 08:28 (join) ahinki__ 08:30 (quit) ahinki_: Ping timeout: 245 seconds 08:31 (join) ahinki 08:34 (quit) ahinki__: Ping timeout: 245 seconds 08:41 (join) darkjh 08:43 darkjh: Hello, I'm trying to do some gui programming using racket. But when I enter (define frame (new frame% [label "Example"])), just following the guide, it keeps telling me "frame%" is not defined. 08:44 darkjh: reference to undefined identifier: frame% is all I got 08:49 (quit) duomo: Quit: Linkinus - http://linkinus.com 08:51 (quit) darkjh: Remote host closed the connection 09:01 (nick) LeNsTR|off -> LeNsTR 09:06 (join) hkBst_ 09:06 (quit) hkBst: Read error: Connection reset by peer 09:18 (quit) dspt: Remote host closed the connection 09:20 (join) dspt 09:22 (nick) LeNsTR -> LeNsTR|off 09:29 (quit) Twey: Excess Flood 09:30 (quit) mario-goulart: Remote host closed the connection 09:30 (join) mario-go` 09:31 (join) Twey 09:36 (join) dzhus 09:43 (quit) dous_: Remote host closed the connection 09:43 (join) francisl 09:47 (join) dous 09:50 (join) dous_ 09:53 (quit) dous: Ping timeout: 245 seconds 09:57 (join) veer 09:59 (nick) samth_away -> samth 10:08 (nick) LeNsTR|off -> LeNsTR 10:14 (join) realitygrill 10:24 (nick) mario-go` -> mario-goulart 10:25 asumu: Popularity rank for Racket: http://skitch.com/sogrady/g97x7/dataists-020711 (about the middle of the chart) 10:29 samth: yeah, i saw that 10:30 (nick) jschuster_away -> jschuster 10:30 samth: some of those languages are winning in a silly way, like VimL 10:32 asumu: I also wonder if some of those Scheme projects might be PLT Scheme projects. 10:33 samth: asumu: i think many are 10:33 samth: and many "scheme" questions on SO are racket questions 10:34 asumu: Delphi is surprisingly alive on that chart though. 10:36 (quit) dspt: Remote host closed the connection 10:51 (quit) ahinki: Quit: ChatZilla 0.9.88 [Firefox 11.0/20120201153158] 10:53 (join) jrslepak 10:57 (join) swartzcr 10:57 swartzcr: how do I set a pointer to null, like if I want to drop the last part of a list (set! (cdr a) null) 10:58 samth: swartzcr: i hate to say this, but probably the right answer is to thing about the problem differently 10:59 samth: *think 10:59 samth: but if you want to mutate a list, see the `racket/mlist' library 10:59 samth: rudybot: doc set-mcdr! 10:59 rudybot: samth: your sandbox is ready 10:59 rudybot: samth: http://docs.racket-lang.org/reference/mpairs.html#(def._((quote._~23~25kernel)._set-mcdr!)) 11:00 swartzcr: oh, so it'd be better to construct a new list by iterating through the first and just stop appending when I get to the point I want to cut it at? 11:00 swartzcr: that seems do-able 11:01 samth: swartzcr: right 11:01 samth: see the `take' function, for example 11:01 samth: rudybot: doc take 11:01 rudybot: samth: http://docs.racket-lang.org/reference/pairs.html#(def._((lib._racket%2Flist..rkt)._take)) 11:01 samth: also, take-while 11:01 samth: rudybot: doc take-while 11:01 rudybot: samth: no docs for a current binding, but provided by: srfi/1 11:01 swartzcr: thanks! 11:03 (quit) shadgregory: Quit: ERC Version 5.3 (IRC client for Emacs) 11:09 (quit) veer: Quit: Leaving 11:12 (join) bmp 11:13 (join) DanBurton 11:14 (quit) hkBst_: Quit: Konversation terminated! 11:15 (quit) jeapostrophe: Ping timeout: 246 seconds 11:18 (quit) angusiguess: Read error: Connection reset by peer 11:19 (join) angusiguess 11:21 (part) tim-brown: "Leaving" 11:23 (join) dzhus89 11:24 (quit) dzhus: Ping timeout: 252 seconds 11:28 (join) Sicp 11:29 Sicp: racket bug 12553 anyone? 11:29 Sicp: about being unable to access Preferences, not through Edit > preferences nor through Ctrl + ; 11:30 (join) shadgregory 11:31 (join) anRch 11:31 (quit) bluezenix: Quit: Leaving. 11:32 (join) bluezenix 11:34 (quit) angusiguess: Read error: Connection reset by peer 11:34 (join) angusiguess 11:36 (quit) bluezenix: Ping timeout: 260 seconds 11:41 (part) DanBurton 11:42 bremner: what platform? 11:44 Sicp: im on Arch 11:44 Sicp: running DrRacket 5.2.1 11:45 asumu: Sicp: I think samth replied to your bug report, did you see that? 11:45 bremner: hmm. either works ok on debian with 5.2 11:45 Sicp: yes of course 11:45 Sicp: that's why I am here again 11:45 Sicp: to see if he's here 11:46 Sicp: but I didn't call his name maybe he doesn't want it out there .. 11:46 asumu: Sicp: he is currently teaching a course so it is unlikely he will respond quickly 11:46 Sicp: ok 11:57 jaimef hunts for a simple file open/parse contents example 11:57 swartzcr: what is a textbook doing in this channel? 11:57 (join) jonrafkind 12:00 Sicp: yea, real smart, swartzcr 12:01 swartzcr: you can't shame me out of my bad joke ways 12:02 Sicp: I would've made the same joke if you had this nickname 12:02 Sicp: :J 12:02 (quit) sindoc: Quit: Leaving. 12:12 (join) MayDaniel 12:14 (join) GeneralMaximus 12:15 (quit) francisl: Quit: francisl 12:16 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/4PaK0g 12:16 RacketCommitBot: [racket/master] Pretty up places test code - Kevin Tew 12:16 RacketCommitBot: [racket/master] fix multiple places imported into the same module - Kevin Tew 12:24 (quit) anRch: Quit: anRch 12:25 (join) mithos28 12:31 (join) Patterngazer_ 12:32 (quit) Patterngazer: Ping timeout: 246 seconds 12:33 (quit) ticking: Quit: Leaving... 12:35 (join) ticking 12:40 (quit) Patterngazer_: Ping timeout: 252 seconds 12:40 (quit) shadgregory: Remote host closed the connection 12:41 (join) anRch 12:42 jonrafkind: eli, ping 12:47 (join) francisl 12:48 (join) bluezenix 12:56 (quit) MayDaniel: Read error: Connection reset by peer 12:58 (join) shadgregory 13:03 (join) tfb 13:04 (quit) anRch: Quit: anRch 13:06 (join) Patterngazer_ 13:08 (join) mjhoy 13:09 (join) tfb_ 13:09 (quit) tfb: Disconnected by services 13:09 mjhoy: I have a beginner's question about racket, about logging and servlets. Is anyone available to help me? Or is there a better place to ask... 13:09 (nick) tfb_ -> tfb 13:11 asumu: mjhoy: this is a good place to ask, but unfortunately I don't know anything about servlets. If you wait around someone might answer. 13:11 asumu: You can also ask on the mailing list or StackOverflow (mailing list is probably better). 13:11 (quit) EmmanuelOga: Quit: WeeChat 0.3.7-dev 13:12 mjhoy: asumu: OK, thanks! Also, if you know of a good place to get information about logging in racket (besides the documentation for make-logger etc) that might be helpful. 13:16 (quit) tfb: Ping timeout: 255 seconds 13:23 (join) tfb 13:30 jonrafkind: hm I'm getting an extra set of parentheses in the output of my template variables, how is that possible 13:30 jonrafkind: #'(z ...) expands to ((x) (y) (z)) instead of (x y z) 13:38 (quit) angusiguess: Read error: Connection reset by peer 13:39 (join) angusiguess 13:43 (part) francisl 13:58 (join) MayDaniel 13:58 jonrafkind: ah itsbecause I have an extra level of indirection in my syntax-class 13:59 RacketCommitBot: [racket] plt pushed 4 new commits to master: http://git.io/4-uhAw 13:59 RacketCommitBot: [racket/master] Lib path typo. - Eli Barzilay 13:59 RacketCommitBot: [racket/master] Disable Win/i386-crashing test. (See comment for the reason.) - Eli Barzilay 13:59 RacketCommitBot: [racket/master] Two typos. - Rodolfo Henrique Carvalho 14:01 (quit) bluezenix: Quit: Leaving. 14:02 (quit) danlndi: Quit: Lost terminal 14:03 (quit) GeneralMaximus: Quit: See you in another life. 14:08 eli: jonrafkind: ? 14:08 eli: noelw: ping 14:08 jonrafkind: eli, sukyoung needs grader.rkt 14:08 jonrafkind: but its in your git pl-grading directory 14:08 jonrafkind: which neither me nor she has access to 14:08 eli: I'll reply to her. 14:09 eli: I saw her email. 14:09 (join) ale` 14:09 eli: CCs would reduce these confusions. 14:09 jonrafkind: what confusions 14:09 jonrafkind: she asks me because you don't respond 14:10 eli: You asking me every time she asks me... 14:11 jonrafkind: there is a presumption that I get better service than her 14:11 eli: Yeah, I know. 14:13 ale`: hi,I'm playing with racket since yesterday (I'm no expert at all, just started learning some scheme/racket). Is there a way to retrieve a procedure's lambda list (possibly using non-portable racket-only code)? 14:16 (quit) Blkt: Remote host closed the connection 14:17 (quit) jrslepak: Quit: This computer has gone to sleep 14:27 ale`: /j #geiser 14:37 (join) vkz 14:43 (quit) angusiguess: Read error: Connection reset by peer 14:44 (join) angusiguess 14:49 asumu: ale`: What exactly do you mean by that? You want to extract the argument names? 14:49 asumu: (I don't think you can do that. You can extract keyword arguments or the arity of a procedure though) 14:50 ale`: asumu: yep, I want the argument names 14:50 (join) jrslepak 14:51 ale`: asumu: it would be nice to have emacs display (substring seq start (end)) in the minibuffer help instead of (substring _ _ (_)) 14:53 ale`: I don't know if I understood well what geiser is doing, it can retrieve some parameter names, but not others. Is it parsing the sources? @.@ 14:56 jonrafkind: how do you match a literal ellipses in syntax/parse? 14:57 jonrafkind: oh nevermind, i found my old email about it 14:57 asumu: jonrafkind: Does (~literal ...) work? 14:57 jonrafkind: Im gonna use #:literals ([ellipses ...]) 15:02 (join) jeapostrophe 15:05 (quit) dzhus89: Remote host closed the connection 15:13 (join) sindoc 15:15 (nick) ASau`` -> ASau 15:35 samth: Sicp: btw, when your reply to the bug report message, please try to maintain the cc list so that the information goes in the bug database 15:37 Sicp: ok 15:44 (quit) Patterngazer_: Quit: If you think nobody cares, try missing a few payments 15:52 (quit) vkz: Quit: vkz 15:59 (quit) ticking: Quit: Leaving... 16:04 tonyg: (do) loops rule 16:04 tonyg: ;-) 16:06 (join) bluezenix 16:10 samth: tonyg: no, that's false :) 16:10 (join) ticking 16:10 tonyg: samth: i use them as folds over multiple accumulators 16:10 tonyg: but it is also true that "(do) loops suck" 16:10 samth: tonyg: does `for/fold' not work? 16:11 tonyg: yes, but I don't like multiple-values generally 16:11 tonyg: perhaps it's better to use for/fold though 16:11 tonyg: i'll try it and see 16:12 tonyg: in this case, i have multiple-values anyway, so nothing to lose 16:13 tonyg: actually for/fold will improve my code 16:13 tonyg: :) 16:13 tonyg: I'll avoid an (append (set->list set1) (set->list set2) ...) by using in-sequence 16:13 samth: do probably requires mutation instead of multiple values 16:13 tonyg: samth: no, it's pure-functional 16:14 tonyg: all done with letrec, after all 16:14 jaimef: anyone have an example of opening and parsing the contents of a file? 16:14 samth: jaimef: parsing in what sense? 16:15 samth: tonyg: the docs for `do' say that the body is evaluated only for effect 16:15 jaimef: convert to a list of words that I can cdr/car on 16:15 tonyg: samth: I'm not using the body (I seldom do) 16:15 tonyg: samth: instead, I have three things in the binding list of the do: one for the structure I'm walking, and two for the accumulators 16:15 tonyg: for/fold is better for this case 16:16 jaimef: really something as simple as the equivalent of 'foo = JSON.parse(File.open("/tmp/foo.json") { |f| f.read })' 16:16 jaimef: but I guess getting the contents into a list of lists would be ideal 16:16 samth: jaimef: probably (file->value "/tmp/foo.sexp") is what you want 16:17 jaimef: k thanks 16:17 samth: or maybe `file->list' depending on whether there are multiple s-exps in the file 16:22 (quit) Sicp: Quit: Leaving 16:26 (join) EmmanuelOga 16:30 (join) DanBurton 16:32 (quit) mjhoy: Quit: mjhoy 16:36 (quit) bluezenix: Remote host closed the connection 16:39 (quit) EmmanuelOga: Ping timeout: 244 seconds 16:42 (join) snorble 16:43 (quit) snorble: Client Quit 16:43 (join) snorble 16:52 (join) bluezenix 16:52 (quit) sindoc: Quit: Leaving. 16:53 (quit) MayDaniel: Read error: Connection reset by peer 16:55 (quit) jeapostrophe: Ping timeout: 260 seconds 16:59 (join) tauntaun 17:04 (join) dnolen 17:05 (join) sindoc 17:30 (quit) realitygrill: Quit: realitygrill 17:38 flying_rhino: are there examples of different loop constructs in action? I kinda have difficulty figuring out how DO works 17:38 jonrafkind: I don't really like the new logo.. oh well 17:38 samth: flying_rhino: i think do is basically never useful 17:38 samth: jonrafkind: what don't you like? 17:38 stamourv: flying_rhino: Use `for/*' instead. 17:38 jonrafkind: looks goofy, like its for kids 17:38 samth: jonrafkind: that's kind of my feeling as well 17:39 jonrafkind: i liked the povray rendered lambda thing 17:40 flying_rhino: I use recursion, but I would like to see if racket supports more classic loops and stuff 17:40 flying_rhino: something like for in C/C++ would be nice 17:40 samth: flying_rhino: see the `for' and `for/list' loops 17:40 samth: flying_rhino: http://pre.racket-lang.org/docs/html/guide/for.html 17:40 flying_rhino: I tried but for some reason (maybe I am dense) I can't figure out how they work. Maybe more examples or something? 17:41 samth: rudybot: eval (for/list ([i (list 1 2 3)]) (add1 i)) 17:41 rudybot: samth: ; Value: (2 3 4) 17:41 jonrafkind: flying_rhino, what is your thought process when you see the examples on that page? 17:42 jonrafkind: im sympathetic to alternative understandings of things in general, but that page seems pretty obvious to me 17:43 flying_rhino: now it does seem kinda obvious... I guess I was too locked into C/Java/PHP thinking so everything I saw was bunch of parentheses 17:43 (join) realitygrill 17:43 flying_rhino: anyway thanks for your time 17:44 samth: flying_rhino: np 17:47 (quit) bluezenix: Quit: Leaving. 17:54 flying_rhino: Also I find the way racket deals with structs a little odd. It seems that compiler automatically generates bunch of 'helper' functions (or whatever it is called). For example, if strutct is mutable it creates bunch of 'set-mystruct-field!' How do I know what functions are created? 17:54 (nick) jschuster -> jschuster_away 17:55 (quit) jrslepak: Quit: This computer has gone to sleep 17:56 samth: flying_rhino: they're documented here 17:56 samth: rudybot: doc struct 17:56 rudybot: samth: http://docs.racket-lang.org/reference/define-struct.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._struct)) 17:58 (join) jrslepak 17:59 (nick) LeNsTR -> LeNsTR|off 18:04 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/NiZoyQ 18:04 RacketCommitBot: [racket/master] improve types for literal hash tables - Sam Tobin-Hochstadt 18:04 RacketCommitBot: [racket/master] Relax type of `filter'. - Sam Tobin-Hochstadt 18:05 (quit) realitygrill: Quit: realitygrill 18:06 flying_rhino: okay.... now real question. I have created mutable dubly linked list for racket. It is not much to look at to be honest, just node struct that holds data and prev/next references, and container stuct that keeps track of current node, first node and last node. I have created bunch of functions for creating list, adding nodes and stuff. It seems to work fine. However I don't actually know almost 18:06 flying_rhino: anything about how racket OOP inheritance (or interface) model works and I would like to be able to use my dubly linked list like a normal list (for iteration and stuff). How am I supposed to 'implement' (or whateve equivalend term here) racket list's methods? 18:07 flying_rhino: TL;DR I have I have created doubly linked list, how to make it behave like normal list? 18:07 samth: flying_rhino: if you mean "have your list work with the built-in `map' function", then that's not possible 18:08 flying_rhino: bummer 18:08 samth: probably the best thing to do is to implement the sequence protocol, so that your doubly-linked lists can be used with `for' and such 18:08 samth: a good example of a comprehensively-implemented data structure is https://github.com/dvanhorn/ralist 18:09 (quit) mithos28: *.net *.split 18:09 (quit) asdfhjkl: *.net *.split 18:09 (quit) cataska: *.net *.split 18:09 (join) cataska 18:09 (join) asdfhjkl 18:13 (quit) mceier: Quit: leaving 18:13 (nick) ChaozZBubi -> chaozzbubi 18:14 (nick) LeNsTR|off -> LeNsTR 18:18 samth: mithos28: apropos your question about syntax-parse from last night, you should look at `~optional' 18:19 (join) realitygrill 18:19 flying_rhino: samth: thanks for help, but this is kind of ... disheartening. Part of the reason why I dived into this whole lisp/clojure/scheme/racket thing was the promise of great metaprograming facilities and ability to mold language the way I want. And to be sure there is stuff I really love about lisp. Macros are great. I also prefer 'code as data' thing over 'XML everywhere' of Java and the like. 18:19 flying_rhino: However there seem to be bolts and duck tape the whole thing looks a little ... strange. I Still generally like what I see, but it is discouraging how many little flaws and inconsistancies there are. 18:20 samth: flying_rhino: i don't see how these are related 18:20 samth: `map' is a function on lists, whereas sequences are an extensible abstraction 18:20 samth: there's `sequence-map' as well 18:21 samth: it's somewhat unfortunate at this point that `map' has the good name, but that's about it 18:22 (join) dyoo 18:23 dyoo: hi everyone, good evening! 18:23 flying_rhino: samth: well it is also inability to use my doubly linked list in functions that use 'map', right? 18:24 flying_rhino: dyoo: good evening 18:24 dyoo: flying_rhino: hi! I feel like I'm in the middle of a conversation. :) But the general sequence functions will work. Have you seen sequences? 18:24 samth: flying_rhino: it wouldn't be right to use them there -- your lists are mutable, for example 18:25 flying_rhino: samth:to be honest.. no. Sorry for my general noobness 18:25 dyoo: http://docs.racket-lang.org/reference/sequences.html 18:25 samth: flying_rhino: if they're not mutable, how do they work? 18:26 flying_rhino: samth: Yes my lists are mutable. I am saying that I haven't looked into sequences 18:26 dyoo: flying_rhino: ah, then definitely look at that. I think that's what you're asking: a generic way to walk through things. That's what sequences are for. 18:27 flying_rhino: yeah that's sort of what I need 18:27 dyoo: Here's a quick and dirty sequence, using the generators in Racket: 18:27 chandler: samth: I think this is an example of legacy cruft. If you were designing Racket from first principles, would you maintain the centrality of singly linked lists? 18:27 dyoo: (require racket/sequence) (define myseq (in-generator (yield "hello") (yield "world"))) 18:27 samth: chandler: no 18:28 samth: definitely no 18:28 dyoo: Then `myseq` is something you can feed into anything that eats a sequence, like for loops 18:29 dyoo: oops: you might need `(require racket/generator) as well to make that work. 18:31 flying_rhino: dyoo: Just to emphasize one thing: I use typed racket. 18:32 dyoo: flying_rhino: ... oh. :) I'm not exactly sure what the support is for TR and generators. Let me try it... 18:33 (quit) tfb: Ping timeout: 244 seconds 18:34 flying_rhino: thanks for helping me, by the way 18:36 dyoo: flying_rhino: darn. Ok, so I don't think generators are going to work easily in TR, and I am hitting some issues trying to use the sequence libraries in TR. 18:38 (quit) dnolen: Quit: Page closed 18:40 (nick) LeNsTR -> LeNsTR|off 18:42 tauntaun: samth: can you point to a doc page on the sequence protocol? I can't seem to find it. 18:42 (join) kvda 18:43 (quit) ticking: Quit: Linkinus - http://linkinus.com 18:43 dyoo: flying_rhino: what I think I can do is write a function that takes a data structure in untyped code, and then export that out to Typed Racket via require/typed 18:44 flying_rhino: basically I use typed because I want high performace doubly linked list 18:44 flying_rhino: if you have other ideas, I am opened to them 18:46 dyoo: tauntaun: see http://docs.racket-lang.org/reference/sequences.html 18:47 tauntaun: dyoo: there's no mention of protocols on that page. 18:47 tauntaun: Anyway, I now think 'structure type property' was intended. 18:48 tauntaun: I thought samth meant 'protocol' in the sense of Clojure. 18:48 dyoo: tauntaun, yeah. Most of the protocols are implemented via structure properties 18:48 dyoo: the other big one I see often is prop:procedure, which makes structures callable like functions 18:48 tauntaun: dyoo: yes, I've used that prop:proc before. 18:49 dyoo: flying_rhino: sorry, I'm pretty much a consumer of TR, so when I get stuck, I start looking for Sam frantically... :) 18:50 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/rvve2Q 18:50 RacketCommitBot: [racket/master] doc correction - Matthew Flatt 18:50 RacketCommitBot: [racket/master] win32: accept Unicode error-message strings from the system - Matthew Flatt 18:50 RacketCommitBot: [racket/master] fix reported arity of `map' et al. - Matthew Flatt 18:51 (join) tfb 18:52 flying_rhino: samth: So how does a dude implement sequences in typed racket? 18:56 (quit) dyoo: Ping timeout: 245 seconds 18:58 samth: flying_rhino: sadly, you can't yet 18:58 flying_rhino: samth: :( 18:59 (join) ticking 19:00 flying_rhino: and that's why racket looks kinda unfinished to me. It is pretty good but there is just something lacking. Which is a damn shame 19:02 (quit) asdfhjkl: Quit: Leaving 19:02 flying_rhino: don't get me wrong, I genuinely respect what you guys did here 19:11 flying_rhino: I thought typed racket can do everything untyped version can, only faster. What other problems there are? 19:12 chandler: flying_rhino: Not to put words in samth's mouth (or hands, as the case may be), but I don't think Typed Racket has ever been claimed to be "finished". 19:13 chandler: Racket itself doesn't seem unfinished to me; on the contrary, it's very polished, and just keeps getting better. 19:14 flying_rhino: chandler: what I am trying to do is create several (relatively) fast data structures I can use. Therefore I choose typed racket. If untyped racket can do that, that's great ;) 19:15 flying_rhino: othervise, I can't do what I want to do. 19:18 (join) duomo 19:18 (join) sindoc1 19:19 samth: chandler is 100% right about typed racket 19:19 samth: it's certainly not finished, either in the sense of being able to do everything in racket, or in the sense of me being done with it 19:20 DanBurton: TR is certainly on the right track :) 19:20 samth: DanBurton: glad you like it 19:20 flying_rhino: samth: You are one of racket creators? It is an honor 19:20 (quit) sindoc: Read error: Operation timed out 19:20 samth: samth: i'm the creator of Typed Racket 19:21 flying_rhino: samth: Is there a way to optimize noramal racket? Type hinting or anything? 19:21 flying_rhino: *normal 19:21 flying_rhino: to make it perform as fast as typed 19:22 samth: flying_rhino: you can optimize lots of things by using the unsafe operations (from racket/unsafe/ops) 19:22 samth: rudybot: doc unsafe-struct-ref 19:22 rudybot: samth: no docs for a current binding, but provided by: racket/unsafe/ops 19:22 samth: rudybot: (require racket/unsafe/ops) 19:22 rudybot: samth: Done. 19:22 samth: rudybot: doc unsafe-struct-ref 19:22 rudybot: samth: http://docs.racket-lang.org/reference/unsafe.html#(def._((lib._racket%2Funsafe%2Fops..rkt)._unsafe-struct-ref)) 19:24 flying_rhino: samth:I never really understood all this need for multiple languages. Why not just implement optional typing in main racket and be done with it? 19:25 samth: flying_rhino: i don't understand what the difference would be 19:25 samth: or rather, what do you think the difference would be 19:26 flying_rhino: for one, it would be possible to define untyped variables, without having to set them for 'any' 19:27 samth: flying_rhino: there are a number of reasons why we think that putting the boundary between typed and untyped code at the module boundary is the right choice 19:27 flying_rhino: but you are right, that doesn't matter much 19:27 samth: first, it improves performance predicatbility 19:27 samth: second, code is easier to reason about when you know that say, a whole function, is typed 19:28 samth: third, it fits into the racket language architecture, which supports a wide variety of interoperating languages 19:28 samth: we wrote a paper about this, here: http://bit.ly/langlib 19:30 (quit) tauntaun: Quit: leaving 19:31 flying_rhino: okay... thanks 19:38 (nick) ianjneu -> ianj_away 19:48 (join) snorble_ 19:49 (join) dnolen 19:50 (quit) snorble: Ping timeout: 260 seconds 20:07 (join) jeapostrophe 20:07 (quit) DanBurton: Quit: Leaving 20:09 (join) JohnnyL 20:15 (nick) samth -> samth_away 20:17 JohnnyL: are there any captchas written in racket? 20:21 (join) Sicp 20:36 (quit) jonrafkind: Read error: Operation timed out 20:37 (quit) tfb: Quit: sleeping 20:42 (quit) jrslepak: Quit: This computer has gone to sleep 20:45 (quit) kvda: Quit: -___- 20:50 (quit) cataska: Ping timeout: 252 seconds 21:03 (join) cataska 21:05 (quit) ticking: Quit: Leaving... 21:05 (join) JdpB42 21:05 JdpB42: racket web developmet, is there any way to use templates instead of the s expression language its using for html generation? 21:06 (join) ticking 21:11 (join) jrslepak 21:16 (quit) jeapostrophe: Ping timeout: 252 seconds 21:16 (join) kvda 21:19 (quit) ticking: Quit: Linkinus - http://linkinus.com 21:21 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/uQk-OA 21:21 RacketCommitBot: [racket/master] fix problems with marks and module for-syntax - Matthew Flatt 21:21 RacketCommitBot: [racket/master] errortrace: skip annotation in namespace with wrong base phase - Matthew Flatt 22:12 (join) jeapostrophe 22:14 (part) JdpB42 22:16 (quit) cataska: Ping timeout: 252 seconds 22:30 (quit) masm: Quit: Leaving. 22:57 (join) jonrafkind 23:00 (quit) Sicp: Quit: Leaving 23:01 (join) mithos28 23:02 (join) cataska 23:20 (quit) dnolen: Ping timeout: 248 seconds 23:36 (join) veer 23:45 veer: What I wish and some initial thought about online class : https://gist.github.com/1786630 , no flames please :) 23:50 mithos28: Anyone know why I would be getting unreadable symbols here? https://gist.github.com/1786710 23:59 asumu: veer: That would be nice, but it's a lot of work. BTW, this would probably get more discussion on the mailing list. 23:59 asumu: veer: Also, as an aside, did you know that there is an unstable/generics library? I just found out about this recently too.