00:01 (quit) cornihilio: Quit: Leaving 00:03 lewis1711: http://pastebin.com/ajJR5aPx woo I am levelling up with this whole FP thing 00:12 (quit) jeapostrophe: Ping timeout: 252 seconds 00:13 (join) sw2wolf 00:16 (join) mizu_no_oto 00:23 (join) dyoo 00:25 lewis1711: https://gist.github.com/4222007 spoke to soon - that's hideously ugly code 00:28 (quit) dyoo: Ping timeout: 265 seconds 00:28 (join) dyoo 00:29 mye: is eli-tester documented somewhere? 00:32 (join) RacketCommitBot 00:32 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/N0wteQ 00:32 RacketCommitBot: racket/master 2ac2262 Neil Toronto: Removed fallback to 'mpfr_set_z_exp - didn't work, probably never existed 00:32 (part) RacketCommitBot 00:47 (quit) masm: Quit: Leaving. 00:47 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 01:08 (quit) dyoo: Quit: dyoo 01:11 (quit) Kaylin: Read error: Connection reset by peer 01:33 (quit) mceier: Quit: leaving 01:40 (quit) nejucomo: Ping timeout: 276 seconds 01:45 (join) nejucomo 01:49 nejucomo: I want to implement a lexical context rule with two syntaxes. Let's call them A and B, where if B appears inside A's arguments, a syntax error might be raised. 01:49 nejucomo: How can I do this? 01:50 nejucomo: I started by sharing a parameter between A and B, and A templatizes a parameter and B checks the parameter... 01:50 nejucomo: -but this doesn't seem to work. 01:51 nejucomo: I guess in (A ... (B ...)) the A transformation completes before the B transformation occurs? 01:51 (join) PCChris 01:52 nejucomo: Another way to implement the rule is if B refers to one syntax outside of A but another inside of A, but that seems to violate the lexical definitions of syntax transformers. 01:54 nejucomo: Perhaps a solution is to have A recursively scan all its argument syntaxes to find B's and expand them differently. 01:54 (quit) dca: Ping timeout: 260 seconds 02:03 nejucomo: Ah, maybe I want syntax-parameters... 02:15 (join) nilyaK 02:19 jonrafkind: yea i think you want syntax-parameters 02:20 jonrafkind: A can do (syntax-parameterize ([B ...]) stuff..) 02:21 (join) tsion 02:21 (quit) tsion: Changing host 02:21 (join) tsion 02:25 nejucomo: In your example, you didn't mean to imply I could change the definition of B in the "syntactic dynamic extent" of A, right? 02:26 jonrafkind: yes, that is what syntax parameters do 02:26 jonrafkind: you can dynamically alter the binding of B 02:26 nejucomo: My assumption was: A can do (syntax-parameterize ([lexical-state ...]) stuff...) -and B has to check the value of lexical-state with syntax-parameter-value. 02:27 nejucomo: -but you're saying I can just swap out the definition of B dynamically inside the arguments to A? 02:27 nejucomo: That's exactly what I want to do. 02:27 nejucomo writes a test. 02:29 nejucomo: So can I export a syntax-parameter? 02:29 jonrafkind: yea 02:29 nejucomo: This is a module language and I'm exporting #%app... What I want to do is have different application rules depending on lexical scope. 02:29 nejucomo: Ok, that sounds perfect. 02:29 jonrafkind: you can export any binding 02:29 jonrafkind: afaik 02:31 (join) mceier 02:32 nejucomo: Hm... so if I have a syntax-case which results in a semiquote-syntax, like: #`(foo bar) -should I unquote the parameterize-syntax, like: #`(foo #,(parameterize-syntax ([B ...]) #'bar)) ? 02:33 jonrafkind: no you dont need to unsyntax it 02:34 jonrafkind: just do #'(foo (syntax-parameterize ([B ...]) more-stuff..) 02:34 jonrafkind: also its called quasisyntax I think 02:36 nejucomo: ok. 02:37 (join) tilde` 02:43 (join) hkBst 02:48 (quit) tilde`: Quit: kthxbai 02:50 (join) tilde` 02:51 lewis1711: sometimes I think there's a generalisation of a fold out there. a meta-fold, if you will. if there is I'm sure i'm not the first one to think of it 02:52 (quit) hkBst: Ping timeout: 246 seconds 03:00 (quit) jonrafkind: Ping timeout: 255 seconds 03:01 (join) hkBst 03:01 (quit) hkBst: Changing host 03:01 (join) hkBst 03:02 (quit) nejucomo: Ping timeout: 276 seconds 03:05 (quit) dsantiago: Ping timeout: 264 seconds 03:07 (join) bitonic 03:13 (join) didi` 03:19 (quit) parcha: *.net *.split 03:19 (quit) roderic: *.net *.split 03:19 (join) roderic 03:20 (quit) bitonic: Remote host closed the connection 03:20 (join) bitonic 03:20 (join) parcha 03:37 (quit) bitonic: Ping timeout: 265 seconds 03:42 (quit) tsion: Quit: Leaving 04:00 (quit) mithos28: Quit: mithos28 04:06 (quit) didi`: Remote host closed the connection 04:10 (part) sw2wolf: "ERC Version 5.3 (IRC client for Emacs)" 04:15 (quit) nilyaK: Ping timeout: 256 seconds 04:18 (join) bitonic 04:29 tewk: lewis1711: not sure what you're trying to do. 04:31 lewis1711: lewis1711: oh i was just mausing how the function I wrote looked sort of like a fault, but used numbers instead of lists 04:31 lewis1711: *fold 04:32 lewis1711: could've done the same thing with some kind of... church numeresque thing. like cons cell numerals, if that exists 04:33 tewk: lewis1711: sorry, I accidentity up-arrow repeated a comment I made hours earlier. :) 04:38 lewis1711: tewk: oh well don't feel bad, I directed a comment to myself instead of you LOL 04:44 (join) didi` 04:44 lewis1711: is gensym suitable for use as a unique ID? say, if I wanted every instance of struct foo to be distinguishable 04:45 (nick) didi` -> didi 04:56 (quit) gatlin: Ping timeout: 240 seconds 05:15 (join) dsantiago 05:50 (quit) lewis1711: Ping timeout: 264 seconds 06:08 (quit) bitonic: Ping timeout: 260 seconds 06:16 (join) bitonic 06:26 (quit) mceier: Quit: leaving 06:30 (quit) bitonic: Read error: Connection reset by peer 06:31 (join) bitonic 06:40 (quit) hkBst: Ping timeout: 246 seconds 06:42 (join) hkBst 07:11 (join) nathanpc 07:20 (join) jeapostrophe 07:21 (join) torog 07:22 torog: is there any website for exchanging racket source code? i am looking for some nice fractal implentations in racket. 07:29 (join) kofno 07:29 didi: torog: http://planet.racket-lang.org/ 07:41 (join) hkBst_ 07:41 (quit) hkBst: Ping timeout: 246 seconds 07:43 (join) ambrosebs 07:47 torog: didi: thx 07:47 (quit) hkBst_: Ping timeout: 264 seconds 07:47 (join) hkBst__ 07:50 ambrosebs: A Practical Optional Type System for Clojure - Final version https://github.com/downloads/frenchy64/papers/ambrose-honours.pdf 08:03 kofno instapapers that for later 08:07 (quit) torog: Ping timeout: 240 seconds 08:07 (join) jao 08:08 (quit) jao: Changing host 08:08 (join) jao 08:09 (join) masm 08:10 (quit) jrslepak: Quit: What happened to Systems A through E? 08:21 (join) mizu_no_oto 08:22 (quit) vu3rdd: Ping timeout: 240 seconds 08:40 (join) francisl 08:45 (quit) jeapostrophe: Ping timeout: 256 seconds 08:48 (join) jrslepak 08:51 samth: ambrosebs: congrats! 08:51 samth: lewis1711: use `eq?` 08:52 ambrosebs: samth: thanks! and thanks for all your help! 09:04 (quit) kofno: Remote host closed the connection 09:06 (quit) SeanTAllen: Read error: Operation timed out 09:06 (join) SeanTAllen 09:10 (quit) bitonic: Ping timeout: 264 seconds 09:15 (join) jeapostrophe 09:16 (quit) jeapostrophe: Changing host 09:16 (join) jeapostrophe 09:16 (join) kofno 09:20 (join) samth_ 09:25 (quit) jeapostrophe: Ping timeout: 244 seconds 09:28 (join) hash_table 09:29 (join) soegaard 09:31 (join) PCChris_ 09:35 (quit) hash_table: Ping timeout: 256 seconds 09:35 (quit) PCChris: Ping timeout: 244 seconds 09:38 (quit) ambrosebs: Ping timeout: 255 seconds 09:41 (quit) PCChris_: Ping timeout: 260 seconds 09:45 (join) jeapostrophe 09:45 (join) myx 09:52 (join) bitonic 09:58 (join) PCChris 10:05 (join) ambrosebs 10:09 (join) anRch 10:14 (join) mceier 10:21 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 10:25 (join) mye 10:28 (quit) hkBst__: Remote host closed the connection 10:28 (join) hkBst__ 10:28 (quit) PCChris: Ping timeout: 260 seconds 10:29 (join) mizu_no_oto 10:36 (quit) ambrosebs: Read error: Connection reset by peer 10:37 (quit) kofno: Remote host closed the connection 10:38 (quit) BeLucid_: Read error: Connection reset by peer 10:41 (join) BeLucid 10:42 (join) hash_table 10:43 (join) PCChris 10:46 (join) kofno 10:49 (join) ambrosebs 10:52 mye: to induce an ordering on a set, there's nothing built-in except to turn it to a list and sort. Maybe a generator that produces elements with an ordering function would be nice, I guess it could be implemented more efficiently than allocating a new list. 10:53 mye: On the other hand, set->list is probably quite fast, it just needs to link the elements disregarding order. 10:53 mye: I find it hard still to judge when racket does allocation. 10:57 (quit) francisl: Quit: francisl 10:58 (quit) Nisstyre-laptop: Ping timeout: 244 seconds 11:00 (quit) ambrosebs: Read error: Connection reset by peer 11:11 (quit) hkBst__: Quit: Konversation terminated! 11:12 (join) francisl 11:15 (join) masm1 11:16 (quit) masm: Ping timeout: 264 seconds 11:26 (quit) mizu_no_oto: Ping timeout: 246 seconds 11:27 (quit) anRch: Quit: anRch 11:27 (join) mizu_no_oto 11:38 asumu: Is there a good way to match a list with "at least one of 'pat' pattern"? Short of using a ? or app pattern, I mean. 11:44 asumu: A match expander worked, but I wonder if there's a simpler way: https://gist.github.com/4225930 11:46 soegaard: Does ..1 work? 11:47 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 11:47 asumu: You mean something like (list x ... pat y ...) ? 11:48 asumu: Oh, there's an actual ..k pattern. 11:48 (join) torog 11:48 torog: hi there 11:48 torog: i want to implement a 3d sierpinski triangle in racket 11:48 torog: what libraries would you recommend to use? 11:49 torog: *which 11:49 asumu: If you know how to use OpenGL, someone has FFI bindings for it. 11:49 (quit) francisl: Quit: francisl 11:50 asumu: http://planet.racket-lang.org/display.ss?package=RacketGL.plt&owner=stephanh 11:50 rudybot: http://tinyurl.com/6e4h7xp 11:50 (quit) jeapostrophe: Ping timeout: 250 seconds 11:50 asumu: Not sure that's the easiest way to do it. I don't do 3D stuff much. 11:50 torog: hmkay 11:51 torog: any other proposals for 3d stuff? 11:51 (join) jeapostrophe 11:51 (quit) jeapostrophe: Changing host 11:51 (join) jeapostrophe 11:52 (quit) ozzloy: Ping timeout: 248 seconds 11:52 soegaard: Is any of the games in the games collection in 3d? 11:53 stamourv: ozzloy: Re equal? on structs: Generativity is a red herring in your example. 11:53 asumu: Gobblet is 3d. 11:53 stamourv: ozzloy: `equal?' on opaque structs acts like `eq?' by default. 11:53 (join) didi` 11:54 asumu: I think the 3d games in PLT games just use OpenGL. 11:54 stamourv: If you make the struct `#:transparent', `equal?' will compare fields pointwise. 11:54 (join) ozzloy 11:54 (quit) ozzloy: Changing host 11:54 (join) ozzloy 11:54 stamourv: You can also define equality yourself for your structs by using `gen:equal+hash'. 11:54 stamourv: ozzloy: Ah, you're back. 11:55 (join) francisl 11:55 stamourv: I was answering your questions from lsat night. 11:55 soegaard: https://github.com/plt/racket/tree/master/collects/games/gobblet 11:55 asumu: In particular, the SGL and GL board game libraries that ship with Racket. 11:55 (quit) ChibaPet: Ping timeout: 248 seconds 11:55 stamourv: ozzloy: Should I re-paste my answers, or would you prefer reading the logs? 11:56 asumu: (also, for some reason they don't work on this machine... I thought I had 3d acceleration) 11:56 (join) ChibaPet 11:56 (quit) noelw: Quit: noelw 11:59 (quit) ozzloy: Remote host closed the connection 11:59 (join) ozzloy 11:59 (quit) ozzloy: Changing host 11:59 (join) ozzloy 12:03 (join) MayDaniel 12:05 (join) mithos28 12:11 (quit) tilde`: Quit: kthxbai 12:25 (quit) masm1: Ping timeout: 246 seconds 12:26 (join) mizu_no_oto 12:26 (quit) torog: Ping timeout: 252 seconds 12:32 (join) jonrafkind 12:34 (join) RacketCommitBot 12:34 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/hY0u_Q 12:34 RacketCommitBot: racket/master c7162ec Asumu Takikawa: Fix TR error for missing mandatory keywords 12:34 (part) RacketCommitBot 12:42 (join) tilde` 12:43 (quit) soegaard: Quit: soegaard 12:44 (quit) francisl: Quit: francisl 12:55 (quit) cdidd: Remote host closed the connection 12:57 (join) francisl 12:58 (join) gatlin 13:02 asumu: Hah. Someone tried to vandalize the Wikipedia page with "Rocket Man" again. They usually aren't that persistent... 13:06 (quit) tilde`: Read error: Connection reset by peer 13:06 (join) tilde` 13:06 bremner: maybe you should just rewrite the history in the git repo so that it really used to be called Rocket Man? 13:06 bremner: I bet they're not expecting that! 13:07 didi`: Or "Racket: The Rocket Man" 13:08 mithos28: Thats not as bad as good intentioned changes 13:08 mithos28: We had someone change our instructions on an internal wiki because they thought the method was deprecated 13:17 (quit) kofno: Read error: Connection reset by peer 13:37 didi`: Why does `read-xml' from `xml' separates elements like `</a>'? An example explains it better 13:38 jonrafkind: you mean why didnt it make a new (a ...) tag? 13:40 didi`: jonrafkind: More like why not . 13:40 jonrafkind: chromes xml parser shows the ... as raw text as well 13:40 didi`: jonrafkind: Yes. It's originally `', but Racket produces a `< /a >'. 13:40 jonrafkind: oh hm i dunno 13:41 didi`: jonrafkind: AFAICT, it's `read-xml' which is separating them. 13:41 (join) kofno 13:43 didi`: It seems to add whitespaces around `<' and `>'. 13:45 (join) spiderweb 13:45 (join) dyoo 13:50 dyoo: mye: about inducing order on a set: does the data/order library address your question? http://docs.racket-lang.org/data/Orders_and_Ordered_Dictionaries.html?q=data/order 13:50 rudybot: http://tinyurl.com/aeknrdz 13:54 dyoo: didi: investigating; it does look odd. 13:55 didi`: dyoo: Right? I was just about to send an e-mail to users@. 13:55 (nick) didi` -> didi 13:55 didi: I'll wait. 13:56 (quit) gatlin: Ping timeout: 240 seconds 13:57 dyoo: I don't think it's a bug yet, if I'm looking at the same thing as you. It's technically ok that "<a>" be parsed into three separate chunks, as long as the structure's preserved. 13:58 didi: dyoo: Although it changes the original text. 13:58 dyoo: Does it? Checking… 13:58 didi: dyoo: I mean, originally it didn't have these whitespaces. 13:59 dyoo: I've never tried rudybot before… let me see... 13:59 dyoo: how do I ask it to evaluate something for me? 13:59 didi: rudybot: (write "hello, world") 13:59 rudybot: didi: hello. speaking about elisp & cl, does anyone of you use emacs as a gui-toolkit for cl? i mean like ltk, controlling emacs-widgets from cl? 14:00 dyoo: What the? 14:00 didi: rudybot: (+ 1 2) 14:00 rudybot: didi: ; Value: 3 14:00 dyoo: ah 14:00 dyoo: ok 14:00 dyoo: rudybot: (require xml) 14:00 rudybot: dyoo: your sandbox is ready 14:00 rudybot: dyoo: Done. 14:00 didi: dyoo: It likes to misbehave. 14:00 didi: Naughty bot. 14:00 dyoo: rudybot: (xexpr->string '(p "this is" "a test")) 14:00 rudybot: dyoo: error: car: expects argument of type ; given: #f 14:00 dyoo: the heck? 14:01 didi: dyoo: yeah, it works at my REPL. 14:02 dyoo: rudybot: (xexpr->string '(p "How do Americans…" "<" "a href=\"http://howe.iki.rssi.ru/GCTC/gctc_e.htm\"" 14:02 rudybot: dyoo: actually, i'm thinking there is a bug in xexpr->string 14:02 dyoo: ">" 14:02 dyoo: "Star City")) 14:02 (join) mye_ 14:02 stamourv: dyoo, didi: When rudybot misbehaves, try prefixing your code with the "eval" command. 14:02 stamourv: rudybot: init racket 14:02 rudybot: stamourv: your sandbox is ready 14:03 stamourv: rudybot: (require xml) 14:03 rudybot: stamourv: Done. 14:03 dyoo: rudybot: eval (xexpr->string '(p "How do Americans…" "<" "a href=\"http://howe.iki.rssi.ru/GCTC/gctc_e.htm\"" ">" "Star City")) 14:03 rudybot: dyoo: error: car: expects argument of type ; given: #f 14:03 stamourv: rudybot: eval (xexpr->string '(p "How do Americans…" "<" "a href=\"http://howe.iki.rssi.ru/GCTC/gctc_e.htm\"" ">" "Star City")) 14:03 rudybot: stamourv: error: car: expects argument of type ; given: #f 14:03 stamourv: Heh. 14:03 dyoo: Uh, didi, can you try evaluating that snippet? :) 14:03 stamourv: rudybot: (banner) 14:03 rudybot: stamourv: ; Value: "Welcome to Racket v5.2.900.1.\n" 14:04 stamourv: That may be the issue. 14:04 didi: dyoo: Sure. 14:04 didi: dyoo: `"

How do Americans…<a\n href=\"http://howe.iki.rssi.ru/GCTC/gctc_e.htm\">Star City

"' 14:05 (quit) mye: Ping timeout: 260 seconds 14:05 (nick) mye_ -> mye 14:05 dyoo: So the fact that it's breaking up the less than and greater than into separate chunks doesn't affect how it renders to xml later on. 14:05 dyoo: That is, it's not introducing spaces: it's just breaking up the string into multiple chunks. XML does that. 14:06 didi: dyoo: So each chunk has whitespaces around it? 14:07 (join) untrusted 14:07 dyoo: More concretely, if you parse something like "

hello world

", it's technically possible to get back as an xexpr: '(p "h" "e" "l" "l" "o" " " "w" "o" "r" "l" "d") 14:07 dyoo: (It probably won't happen, but it's not illegal) 14:07 dyoo: Each chunk does _not_ represent whitespace. 14:07 dyoo: or should not be interpreted as having whitespace around it. 14:08 didi: So who is adding them? 14:09 dyoo: didi: the xml parser is allowed to chunk string content however it wishes. Some chunk because they have fixed buffer size. Others chunk where it might simplify the internal implementation. But this is just something that XML does: it's not a Racket thing. 14:09 dyoo: which is another reason why I don't like XML, but that's besides the point. :) 14:10 (quit) mithos28: Quit: mithos28 14:11 didi: dyoo: Well, but it has practical implications. While it's still valid, it changes the text. If you end a sentence with a link, for example, now you have a new whitespace before `.' Or now you have double spaces between things. 14:11 dyoo: No, there are _no_ extra spacing being introduced. Example: 14:12 didi: OIC. 14:12 didi: It's a list. 14:12 didi: It's not a string. 14:12 dyoo: right 14:13 didi: Dumb didi. 14:13 didi: dyoo: Thank you! 14:13 dyoo: didi: https://gist.github.com/4227342 14:14 asumu: dyoo: BTW, is this relevant for you? (WeScheme, etc.) http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2012-11.html#e2012-11-28T18_34_12.htm 14:14 rudybot: http://tinyurl.com/a5sffb9 14:14 dyoo: Yup. But it's definitely one of those things that trip people up using xml: it's all too easy to assume that if you have an xexpr with text, that it only has one child element. And that's absolutely not the case: the text can be broken up into multiple children chunks. 14:15 didi: dyoo: Thank you for the help and patience. 14:16 dyoo: asumu: relevant. Thank you! 14:24 mye: dyoo: data/order looks like it could do what I want. I don't understand how to apply it to sets though. 14:25 mye: is this something I'd use when implementing my own sorting algo? 14:26 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 14:26 dyoo: mye: I believe it provides tools for defining your own comparators, which can be used for sorting. 14:28 (join) mizu_no_oto 14:29 (join) nejucomo 14:29 mye: Probably a method to order a set could make direct use of the data structure the set is implemented with. So I don't think there's a "better" way than set->list without adding an internal function 14:30 dyoo: mye: yeah, but my understanding is sets are implemented with hash tables, in which case it's not ordered, but rather organized through equal-hash-code or eq-hash-code (modulo hash table size). 14:32 dyoo: I did code up a red-black tree implementation that might come in handy for you: https://github.com/dyoo/data-red-black 14:43 (quit) nejucomo: Ping timeout: 276 seconds 14:50 (join) masm 15:05 (join) Kaylin 15:08 (join) nejucomo 15:09 (quit) samth_: Ping timeout: 240 seconds 15:28 (join) mithos28 15:44 (join) RacketCommitBot 15:44 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/wRxoyg 15:44 RacketCommitBot: racket/master 6e02d12 Neil Toronto: Reimplemented `mpfr_set_z_2exp' in Racket as a fallback for older versions... 15:44 (part) RacketCommitBot 15:46 (quit) jonrafkind: Ping timeout: 248 seconds 15:47 (join) gatlin 15:57 (quit) untrusted: Remote host closed the connection 15:58 dyoo: mye: for example of something quick-and-dirty to code up ordered sets: https://github.com/dyoo/data-red-black/blob/ordered-set/data/red-black/ordered-set.rkt 15:58 rudybot: http://tinyurl.com/a69p3cs 16:00 (join) jonrafkind 16:00 (quit) jonrafkind: Changing host 16:00 (join) jonrafkind 16:05 mye: dyoo: that's awesome! 16:06 mye: I'll definitely try this (when I figure out planet2 anyway) 16:06 dyoo: mye: not heavily tested: I just coded this up 10 minutes ago. ;) But it should hopefully not break too badly. If you don't want to use planet2 for the moment, just check out the repo 16:07 dyoo: go into the directory, and then just raco link it in. Let me try it in racket 5.3.1 to make sure this actually works.. :) 16:08 dyoo: Yeah, you should be able to do something like this: 16:08 dyoo: git checkout git://github.com/dyoo/data-red-black.git && raco link -d data-red-black 16:09 samth: dyoo: there's an 'update' button on planet2, btw 16:15 dyoo: mye: oh, whoose, got the checkout line wrong. It's: git clone git://github.com/dyoo/data-red-black.git && git checkout ordered-set && raco link -d data-red-black 16:15 dyoo: mye: since the ordered-set stuff is still half-baked, I put it in a separate branch (not master) 16:17 mye: dyoo: thx. How do I require it after linking? there doesn't seem to be an example in the raco link docs. 16:18 dyoo: no documentation yet, but see: https://gist.github.com/4228535 for an example interaction 16:18 dyoo: I just coded this thing up between 12:32pm and 1:58pm, and I need to get lunch! :) 16:19 mye: dyoo: enjoy your meal! 16:21 dyoo: (gah, ordered-set->list has a borken contract. I knew I should have tested the external interface…) 16:22 (quit) dyoo: Quit: dyoo 16:22 mye: looks like I need to restart drracket for it to get the new link table :) dyoo I'll manage, go get your meal 16:22 mye: aww, 1 sec late 16:23 didi: Hum, `se-path*/list' seems to append all the values specified by the path but it might be more useful to have a list of values. 16:24 didi: rudybot: (require xml/path) 16:24 rudybot: didi: Done. 16:25 didi: rudybot: (se-path*/list '(p) '(html (body (p ([class "awesome"]) "Hey" "Your") (p "Bar")))) 16:25 rudybot: didi: error: car: expects argument of type ; given: #f 16:25 didi: rudybot: eval (se-path*/list '(p) '(html (body (p ([class "awesome"]) "Hey" "Your") (p "Bar")))) 16:25 rudybot: didi: error: car: expects argument of type ; given: #f 16:25 didi: Oh well. 16:26 didi: => '("Hey" "Your" "Bar") 16:26 didi: You don't know how many matched nor can process each one separately. 16:27 didi: As in (map process (se-path*/list ...)) 16:28 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 16:29 (quit) mithos28: Quit: mithos28 16:30 (join) mizu_no_oto 16:41 mye: weird, to remove a link (I added $HOME by accident) raco link -r ~ should work right? 16:41 mye: I get path-element->string: contract violation expected: path? given: 'up 16:43 stamourv: mye: I don't know if ~-expansion works in that context. 16:43 mye: and (require data/red-black/ordered-set) works in a terminal racket but not drracket 16:43 stamourv: But I agree that the error message is pretty bad. 16:44 stamourv: The error message alone makes this worth a bug report, IMO. 16:44 mye: stamourv: I tried absolute path, same thing 16:44 stamourv: Oh, that's weird, then. 16:44 mye: stamourv: I believe the raco command wouldn't even see the tilde 16:45 mye: but the $HOME really IS linked -.- 16:45 stamourv: I'm a bit rusty on shell expansion rules, so maybe. 16:47 mye: stamourv: when I added $HOME I think I used (in ~): raco link . 16:47 mye: that might cause this error 16:47 (join) dyoo 16:47 mye: but I'm not sure what raco link sees in this case 16:50 stamourv: What's the output of "raco link -l"? 16:51 mye: "/Users/lo/" and "/Users/lo/build/data-red-black" 16:52 mye: and I just found out that (find-system-path 'links-file) has two different values for terminal racket and drracket (from I'm quite sure) the same installation 16:52 stamourv: Right, probably one for user links and one for installation links. 16:53 stamourv: Ok, try that: "raco link -r -n lo" 16:54 mye: stamourv: [no links removed] it says 16:55 (part) mye 16:55 stamourv: What if you throw in "--repair", or "-i"/"-u" (depending on the kind of link). 16:55 (quit) kofno: Remote host closed the connection 16:56 (join) mye 16:56 (quit) mye: Quit: mye 16:56 (join) mye 16:56 mye: test (disc) 16:57 stamourv: Have you tried editing the links file manually? 16:57 mye: stamourv: was about to do :) 16:59 mye: stamourv: it has (root "../../../") for the $HOME, I presume that causes an error 16:59 (quit) hash_table: Ping timeout: 260 seconds 16:59 stamourv: Yeah, that looks wrong. 17:04 mye: what could explain that racket > (find-system-path 'links-file) sees but DrRacket sees /Users/lo/Library/Racket/links.rktd (which does not exist) /Users/lo/build/plt/add-on/links.rktd ? 17:05 mye: eh, that last path is what terminal racket sees 17:05 stamourv: Do you have 2 Racket installations? 17:06 mye: stamourv: both say they're 5.1.3.9 and of that I'm sure I have only the one. But maybe there's another one somewhere 17:06 (quit) tilde`: Quit: BBL 17:09 stamourv: How did you install Racket? 17:09 mye: stamourv: git 17:09 stamourv: In-place install? 17:09 stamourv: Or prefix? 17:10 mye: in-place 17:10 mye: and I use these script to set PLT_HOME 17:10 mye: maybe the cmdline racket actually uses that? 17:10 stamourv: Which scripts? 17:11 mye: https://github.com/takikawa/racket-dev-goodies 17:12 (quit) gatlin: Ping timeout: 264 seconds 17:12 stamourv: Right, I use these too. 17:12 mye: maybe I should just soft-link the two files so drracket is happy? 17:12 stamourv: They depend on having symlinks for `racket', `drracket', etc. right? 17:12 stamourv: Are you launching DrRacket via that symlink? 17:14 mye: stamourv: It IS the env. variable. I started one from the doc and one from the terminal and the terminal drracket sees the same link file 17:14 stamourv: Ah, interesting. 17:15 stamourv: So making the dock icon point to the symlink sounds like it should fix the problem. 17:17 (quit) MayDaniel: Read error: Connection reset by peer 17:17 mye: I don't think one can add symlinks as dock items, probably requires editing some plists. And the PLTHOME variable is not set globally (on mac, it's weird, must use launchd or something). 17:20 stamourv doesn't know anything about macs. 17:20 stamourv: Correction: stamourv doesn't know anything about Mac OS. 17:21 stamourv is running Debian on an old mac mini hand-me-down. 17:21 mye: stamourv: grepping through the source, PLTHOME:is used 4 times in src and lots of times in collects/ 17:22 mye: so somewhere there must be logic to set the links file to ~/Library/Racket when PLTHOME is not set 17:22 stamourv: None of the uses in collects/ should matter. 17:23 stamourv: And the ones in src/ don't look relevant. 17:23 stamourv: So I'm not sure what's going on. 17:23 (join) tilde` 17:26 (quit) Kaylin: Read error: Connection reset by peer 17:27 (join) Kaylin 17:28 (join) soegaard 17:33 (join) dca 17:36 (quit) mye: Ping timeout: 252 seconds 17:36 (quit) mizu_no_oto: Ping timeout: 240 seconds 17:50 (join) mithos28 18:03 (quit) myx: Ping timeout: 250 seconds 18:05 (join) luft 18:05 luft: hi 18:05 samth: hi 18:05 luft: I'm trying to execute a modular acl2 script with racket 18:05 luft: it works fine with drracket, but running racket -r scriptName.lisp doesn't do anything 18:07 (quit) Kaylin: Read error: Connection reset by peer 18:08 (join) Kaylin 18:08 dyoo: luft: checking... 18:08 (join) sirdancealot7 18:09 (join) luft_ 18:09 luft_: sorry about that 18:09 dyoo: Does the very top of the program have the lang line "#lang planet cce/dracula" 18:09 dyoo: If so, you should just be able to do: "racket scriptName.lisp" without the '-r' options 18:09 luft_: #reader(planet "reader.rkt" ("cce" "dracula.plt") "modular" "lang") 18:10 dyoo: yeah, that looks about right. Try just running it with racket, no other command line options other than the filename 18:10 (quit) Kaylin: Read error: Connection reset by peer 18:10 (quit) luft: Ping timeout: 252 seconds 18:10 luft_: maybe it's to do with my expectations of what the script should do 18:10 luft_: hold on 18:12 (join) RacketCommitBot 18:12 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/qjilBw 18:12 RacketCommitBot: racket/master cc8bd4f Vincent St-Amour: Make srclocs serializable. 18:12 (part) RacketCommitBot 18:14 (join) lewis1711 18:16 luft_: ok figured out what I was doing wrong 18:16 luft_: how do I load a file and then execute a function from the file? 18:17 dyoo: luft: not sure how modular ACL2 programs integrate with the rest of Racket's module system. 18:18 dyoo: luft: Regular Racket modules can be "required": http://docs.racket-lang.org/guide/module-basics.html 18:19 luft_: yeah, that's how the modular acl2 looks 18:19 luft_: http://pastebin.com/C0bKrVPp 18:20 luft_: I need to run a function named (stockAnalyzer ..) 18:20 dyoo: http://planet.racket-lang.org/package-source/cce/dracula.plt/8/10/planet-docs/guide/modular.html#(part._.Multiple_.Files) 18:20 dyoo: That looks relevant. 18:20 rudybot: http://tinyurl.com/a8gbrvm 18:20 dyoo: The last part in section 4.6.2, where they have a "run.lisp" program that requires the others, sounds like what you want. 18:21 (quit) francisl: Quit: francisl 18:21 dyoo: Afer writing run.lisp, just run it. :) 18:21 luft_: sort of 18:21 luft_: dyoo: I want to be able to change what inputs I use via command line 18:23 dyoo: testing... 18:23 luft_: got it I think 18:24 luft_: nope 18:24 luft_: tried racket -u rStockAnalyzer.lisp -e '(stockAnalyzer "hist.txt" "requests.txt" "out.html")' 18:24 dyoo: luft: I'm installing the package off of planet; taking a while... 18:28 dyoo: luft: darn. what I hoped would work didn't. You may need to check with cce to find out what's the right way to connect modular acl programs to the outside world. 18:28 (join) Nisstyre 18:29 luft_: damn 18:31 stamourv: luft_: He sometimes hangs around here as carleastlund. 18:31 stamourv: luft_: Have you tried `(enter! "rStockAnalyser.lisp")' from the REPL? 18:33 (quit) luft_: Ping timeout: 245 seconds 18:34 dyoo: stamourv: the problem is that the exports of anything written in modular acl2 all look like syntax bindings that can't be used in expression position 18:35 stamourv: Oh, that would be an issue. 18:35 dyoo: At least, that's what it looked like at first glance. Would have to get input from a modular acl2 user who knows what he's doing. That person is not me. 18:37 (quit) dyoo: Quit: dyoo 18:41 didi: What about this as a version of `se-path*/list' that discriminates each match? 18:45 didi: And the present functionality is only a `append*' away. 18:49 didi: Hum, suddenly I remembered the `match' thing. I don't know how to use it though. 18:51 (quit) mithos28: Quit: mithos28 18:53 (join) luft__ 19:03 stamourv: jeapostrophe: DrDr looks borked. 19:06 (quit) jeapostrophe: Ping timeout: 252 seconds 19:06 (join) noelw 19:08 (quit) jrslepak: Quit: What happened to Systems A through E? 19:15 (join) PCChris_ 19:17 (quit) sirdancealot7: Ping timeout: 240 seconds 19:18 (quit) PCChris: Ping timeout: 260 seconds 19:22 (join) jeapostrophe 19:22 (quit) jeapostrophe: Changing host 19:22 (join) jeapostrophe 19:25 (quit) PCChris_: Quit: Leaving 19:25 (quit) tilde`: Quit: kthxbai 19:39 (quit) jonrafkind: Ping timeout: 264 seconds 19:45 (join) sirdancealot7 19:48 (quit) sirdancealot7: Max SendQ exceeded 19:49 (join) sirdancealot7 19:49 (quit) soegaard: Quit: soegaard 19:58 (join) Kaylin 20:01 (join) mizu_no_oto 20:04 (quit) Kaylin: Read error: Connection reset by peer 20:04 (join) gridaphobe 20:04 (join) Kaylin 20:05 (join) gatlin_ 20:10 (join) mithos28 20:11 (join) cdidd 20:16 (join) hash_table 20:17 (quit) spiderweb: Quit: ERC Version 5.3 (IRC client for Emacs) 20:20 (quit) nejucomo: Ping timeout: 276 seconds 20:22 (quit) luft__: Ping timeout: 255 seconds 20:25 (join) jrslepak 20:47 (join) didi 20:52 (quit) karswell: Read error: Connection reset by peer 20:52 (join) karswell 20:55 (quit) karswell: Read error: Connection reset by peer 20:55 (quit) hash_table: Ping timeout: 255 seconds 21:01 (quit) mithos28: Quit: mithos28 21:01 (quit) gridaphobe: Ping timeout: 255 seconds 21:02 (join) masm1 21:03 (quit) masm: Ping timeout: 252 seconds 21:11 (join) karswell 21:19 (join) sw2wolf 21:19 (quit) gatlin_: Ping timeout: 264 seconds 21:31 (join) francisl 21:45 (join) luft__ 21:48 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 21:50 (quit) bitonic: Ping timeout: 252 seconds 21:51 (join) kofno 21:51 lewis1711: is there anything that can generate unique integers in racket? like such that (unique-int) will never equal a subsequent call of (unique-int) 21:55 (join) francisl_ 22:02 didi: rudybot: (define (make-unique-int) (let ((i 0)) (lambda () (set! i (+ i 1)) i))) 22:02 rudybot: didi: Done. 22:02 didi: rudybot: (define unique-int (make-unique-int)) 22:02 rudybot: didi: Done. 22:02 didi: rudybot: (unique-int) 22:02 rudybot: didi: ; Value: 1 22:02 didi: rudybot: (unique-int) 22:02 rudybot: didi: ; Value: 2 22:02 didi: rudybot: (unique-int) 22:02 rudybot: didi: ; Value: 3 22:03 didi: lewis1711: ^ 22:03 lewis1711: huh, i did not know you could do that. I wrote something similar in C once, but no idea how to do it in racket without the magic 'static' LOL. ty didi 22:04 didi: lewis1711: ;^) 22:04 didi: lewis1711: It's much better than `static' though. 22:04 didi: lewis1711: You can have an infinite number of `unique-int's. 22:04 didi: rudybot: (define unique-int-1 (make-unique-int)) 22:04 rudybot: didi: Done. 22:05 didi: rudybot: (define unique-int-2 (make-unique-int)) 22:05 rudybot: didi: Done. 22:05 didi: rudybot: (unique-int-1) 22:05 rudybot: didi: ; Value: 1 22:05 didi: rudybot: (unique-int-1) 22:05 rudybot: didi: ; Value: 2 22:05 didi: rudybot: (unique-int-1) 22:05 rudybot: didi: ; Value: 3 22:05 didi: rudybot: (unique-int-2) 22:05 rudybot: didi: ; Value: 1 22:06 lewis1711: that is pretty handy 22:06 lewis1711: ugh, i wish racket had dynamic vectors 22:07 didi: lewis1711: What do you mean? 22:08 lewis1711: vectors you can grow in place 22:08 didi: oic 22:10 asumu: lewis1711: do you know about the data/gvector library? 22:11 lewis1711: asumu: no! I was searching for "dynamic array" and "dynaic vectors". that's perfect 22:11 lewis1711: oh, I could implement a mutable stack with that too 22:12 lewis1711: http://docs.racket-lang.org/data/index.html?q=data&q=data/gvector&q=vector-append! how did I not know about this library 22:12 rudybot: http://tinyurl.com/as92fbz 22:16 (join) vu3rdd 22:16 (quit) vu3rdd: Changing host 22:16 (join) vu3rdd 22:22 didi: lewis1711: If you are starting to learn Racket, may I point out that it's an awesome language to use in a more functional way. So you could implement a stack with a list. 22:36 (quit) SamB: Ping timeout: 260 seconds 22:37 (join) SamB 22:44 (quit) masm1: Quit: Leaving. 22:45 (quit) nathanpc: Quit: Computer has gone to sleep. 22:51 (quit) Shviller: Ping timeout: 255 seconds 22:51 (join) Shviller 22:54 (quit) francisl_: Quit: francisl_ 22:55 lewis1711: didi: yeah I read how to do that in okasaki I think, and *usually* yes immutable structures, recursion, functional updates. But the use case is - a 2d array of tiles in for a 2d grid based game. The number of tiles may be large and a functional update is not feasible. I will use mutable stacks to represent the occupants of a tile (so a tile may have an n items, a monster, etc). Though if you can think of a way to do this functionally I 22:55 (join) jonrafkind 22:57 (quit) jschuster: Quit: Coyote finally caught me 22:59 (join) jschuster 23:01 didi: lewis1711: Oh, you should obviously use the right tool to the job. But with some argument fiddling, you can use a 2d array with immutable stacks. 23:01 didi: s/to/for 23:01 didi: lewis1711: But only if it makes sense. 23:04 lewis1711: I could use immutable stacks, but then I still have to modify the "occupants" field of the tile struct where the stack would reside 23:04 lewis1711: so I'd just end up doing a nifty functional update then overwriting something anyway 23:12 (join) mizu_no_oto 23:16 (join) mithos28 23:19 didi: lewis1711: I see what you mean. Yes, if you use `vector', I agree. 23:21 (nick) luft__ -> luft 23:25 (quit) francisl: Quit: francisl 23:25 lewis1711: https://gist.github.com/4230734 that was difficult, time for a break 23:28 (join) francisl 23:43 (quit) kofno: Remote host closed the connection 23:59 (join) rck