00:28 (join) tewk 00:29 (join) petey 00:32 (quit) em: Ping timeout: 276 seconds 00:41 (join) em 00:41 (quit) petey: Read error: Connection reset by peer 00:41 (join) petey 00:46 (quit) em: Ping timeout: 258 seconds 00:47 (join) em 00:52 (quit) em: Remote host closed the connection 01:05 (quit) jrslepak_: Quit: This computer has gone to sleep 01:13 (quit) jeapostrophe: Quit: jeapostrophe 01:59 (join) jeapostrophe 02:06 (quit) jeapostrophe: Quit: jeapostrophe 02:29 (quit) EmmanuelOga: Ping timeout: 240 seconds 02:32 (quit) tewk: Read error: Connection reset by peer 02:32 (quit) petey: Read error: Connection reset by peer 02:32 (join) tewk 02:33 (join) petey 02:52 (join) kudkudyak 03:47 (quit) realitygrill: Quit: realitygrill 04:32 (quit) dnolen: Quit: dnolen 05:07 (quit) Nanakhiel: Read error: Connection reset by peer 05:07 (join) Nanakhiel 05:37 (quit) Demosthenes: Quit: leaving 05:53 (join) molbdnilo 06:05 (quit) molbdnilo: Quit: molbdnilo 06:11 (quit) karswell: Ping timeout: 255 seconds 06:13 (join) karswell 06:17 (quit) Shviller: Disconnected by services 06:37 (join) molbdnilo 06:55 (join) Shviller 07:06 (quit) karswell: Ping timeout: 240 seconds 07:08 (join) karswell 07:13 (quit) karswell: Ping timeout: 252 seconds 07:27 (quit) fooki: Read error: Connection reset by peer 07:39 rapacity: how can I do a \usepackage{package} in scribble? 07:41 (join) karswell 07:56 (join) chturne 07:59 (quit) chturne: Client Quit 08:06 (join) MayDaniel 08:08 (quit) molbdnilo: Quit: molbdnilo 08:13 (quit) karswell: Remote host closed the connection 08:14 (join) karswell 08:19 (join) masm 08:42 (join) jrslepak_ 09:09 (join) Reox 09:09 Reox: Evening 09:10 (join) molbdnilo 09:10 (part) snorble 09:11 (join) snorble 09:16 (join) bluezenix 09:20 (quit) bluezenix: Ping timeout: 240 seconds 09:53 Reox: Evening 09:53 Reox: is there anyone around who can enlighten me on some issues? 09:54 bremner: Reox: can you be more specific? 09:54 Reox: I am learning more about depth first search in scheme 09:54 Reox: but i cant seems to go about doing it 09:55 Reox: dfs to my understand traverse form the start to it's child node n back. 09:55 Reox: but how do i go about telling scheme to go to the child nodes? 09:55 bremner: How is your graph represented? 09:55 Reox: using vectors 09:55 Reox: vectors that stores a list of it parent and child 09:56 bremner: your graph is directed? 09:57 Reox: yea 09:58 bremner: Reox: I would try to think about the problem in a recursive way. What are you supposed to return? 09:59 bremner: so "go to child nodes" is a sequence of recursive calls 09:59 bremner: non-scheme dfs is often implemented the same way 10:00 Reox: i am suppose to return 3 shortest path of nodes travel from 1 point to another point 10:00 Reox: the start point and the end points are my inputs 10:00 bremner: that is not really a job for DFS 10:00 Reox: then how should I go about solving this? 10:01 bremner: I think you first need to figure out the right algorithm. You didn't get any hints? 10:01 Reox: hmm no hints 10:02 bremner: well, breadth first search _might_ do the trick, but if the paths are required to be disjoint you need something fancier 10:02 (join) jeapostrophe 10:02 Reox: but will bfs be able to provide me with 3 shortest path? 10:03 Reox: i am really bad with both bfs and dfs. forgive me if i am illogical. 10:05 bremner: bfs will provide you with the tree of all short paths of length $k$ from the source. 10:05 bremner: I'm assuming this is homework, it sounds like you need to get clarification from the instructor. 10:06 Reox: yea, it homework. or rather labwork 10:07 Reox: my instructor just told us to try using the various languages to get 3 possible paths in a graph from a input-ed point to another. 10:07 Reox: so my friends are handling c#, another on prolog and I am trying out scheme 10:07 bremner: well, possible != shortest 10:07 Reox: oops. i meant shortest 10:08 Reox: putting that aside, is it possible for u to briefly explain to me how can BFS help me to achieve my required results? 10:10 bremner: well, run bfs, at the end you have all of the nodes at distance k-1 from start (where end is distance k). This lets you find different short paths 10:12 Reox: ohhh 10:13 Reox: but bgf starts from the root right? 10:13 Reox: bfs* 10:13 Reox: eh no. pardon me 10:13 Reox: that's dfs 10:14 bremner: by definition, whereever BFS starts is the root 10:15 Reox: hmm.. so in this case, it's refering to my ending point? 10:15 (join) mceier 10:15 Reox: and I will start from the top.. tranversing layer by layer downwards? 10:16 bremner: I'm not sure I understand the question. 10:17 Reox: hmm.. 10:17 bremner: are you asking how to do BFS? 10:17 Reox: yes 10:18 bremner: pretty much any algorithms book/wikipedia will have a description. 10:19 Reox: ok 10:19 (join) Jesus 10:19 Reox: shall go and read it up. =) 10:19 (nick) Jesus -> Guest68367 10:19 Guest68367: Hello there, I have a small question about the read-line procedure 10:19 Reox: Thanks so much for taking the time in explaining to me the stuffs. Hopefully I can handle it. 10:20 bremner: good luck, it sounds pretty tough for a programming languages assignment 10:20 bremner: maybe there is something about the graph that makes it easier 10:21 Guest68367: I want to know what type returns the procedure read-line. I know it does not return a string since it returns #f if you try to use string? 10:22 bremner: Guest68367: did you try searching in docs.racket-lang.org ? 10:22 Guest68367: yes but it says it returns a string 10:22 Guest68367: im pretty sure it does not though 10:23 bremner: well, what did you pass to string? the procedure or the return value? 10:23 bremner: rudybot: eval (string? string?) 10:23 rudybot: bremner: error: default-load-handler: cannot open input file: "/usr/local/racket/collects/scribble/main.rkt" (No such file or directory; errno=2) 10:23 Guest68367: the return value which is a text written in a file 10:24 Guest68367: Let me quote what I found on the help "Returns a string containing the next line of bytes from in." 10:24 bremner: here (string? (read-line)) returns #t 10:24 Guest68367: did you try that reading from a file? 10:25 Guest68367: it will return false 10:25 bremner: maybe pastebin a small example. (e.g. http://paste.lisp.org) 10:26 (join) anRch 10:27 Guest68367: let me check it out, thanks for the help guyys 10:27 (quit) jeapostrophe: Quit: jeapostrophe 10:40 (quit) molbdnilo: Quit: molbdnilo 10:48 (quit) Guest68367: Quit: Page closed 10:51 (quit) anRch: Read error: Connection reset by peer 10:53 (join) anRch 10:56 (join) molbdnilo 10:57 (join) jeapostrophe 10:58 (quit) jeapostrophe: Client Quit 11:28 (quit) MayDaniel: Read error: Connection reset by peer 11:28 (join) bluezenix 11:34 (nick) samth_away -> samth 11:48 (quit) molbdnilo: Quit: molbdnilo 11:57 (quit) anRch: Quit: anRch 12:03 (join) ohwow 12:11 (join) dnolen 12:13 (quit) bluezenix: Quit: Leaving. 12:21 (join) realitygrill 12:42 (join) jonrafkind 12:55 (join) EmmanuelOga 13:15 (join) emma 13:31 Shviller: Hello everyone. What do I use Racket instead of Common Lisp's #. ? 13:31 Shviller: *in Racket 13:32 offby1: what does #. do in Common Lisp? 13:32 Shviller: read-time evaluation 13:32 offby1: hmm 13:32 offby1: good question. 13:32 offby1: no idea. 13:32 Shviller: Here's an example of what I'm trying to do: http://pastebin.com/40WhRnPS 13:33 samth: Shviller: you could write a reader extension that did exactly #. 13:33 Shviller: Um, isn't there some less hardcore option? 13:33 samth: Shviller: pastebin seems to be down 13:33 samth: ah, back up 13:34 samth: Shviller: for that, you can use `local-expand' 13:35 samth: but i could perhaps give a more specific suggestion if i knew what the real program looked like 13:35 Shviller: Well, I'm trying to port the minimal UI the gears OpenGL demo has (5 buttons) to GUIML. 13:36 Shviller: And local-expand needs to be inserted into a_macro, right? Is there something I can do without touching GUIML's insides with my dirty, shaky hands? 13:38 samth: yes, you can't do anything without changing a_macro 13:38 Shviller: Ouchie 13:38 samth: you could write a very simple reader extension to do exactly your abstraction 13:39 Shviller: But that would still require changes in a_macro (well, guiml), wouldn't it? (just checking if I understand correctly) 13:39 samth: no, reader extensions would avoid changing guiml 13:39 Shviller: Aha! 13:39 Shviller: Okay then. 13:40 Shviller: Do you think I can find the stuff I need to know to implement the reader extension in the documentation? 13:41 samth: take a look at http://pre.racket-lang.org/docs/html/reference/readtables.html?q=reader#%28def._%28%28quote._~23~25kernel%29._make-readtable%29%29 13:41 rudybot: http://tinyurl.com/3bk3rvw 13:41 samth: specifically, the portion for 'dispatch-macro 13:42 Shviller: Got it. Thank you, guys. I'm afraid I'll be back after failing miserably. :) 13:47 samth: Shviller: https://gist.github.com/1326178 13:47 samth: that's #. implemented in racket 13:47 Shviller: Ooo. Thanks a ton! 13:54 samth: Shviller: now improved to show how to use it in a file 14:00 Shviller: Thanks a lot, samth, but I'm still failing at life. I tried to apply it to my example and I'm getting "reference to undefined identifier: m". 14:03 jonrafkind: are you trying to make a psuedo-macro? 14:03 Shviller: A what? 14:03 jonrafkind: you don't know what a macro is? 14:04 Shviller: I don't know what a pseudo-macro is supposed to be. 14:04 jonrafkind: something that acts similar to a macro 14:04 jonrafkind: im wondering if you are running into hygiene issues since common lisp ignores hygiene, afaik 14:04 Shviller: Not really. 14:05 Shviller: Not really running into hygiene issues, I mean. Well, not to my very limited knowledge, that is. 14:05 Shviller: Have you seen my paste? 14:07 jonrafkind: aha, so you if you are evaluating things at read-time then you don't have access to definitions 14:07 jonrafkind: because nothing is defined at read time 14:07 jonrafkind: anyway for your example you can use (m) to invoke the macro 14:07 jonrafkind: if you just wanted to use 'm' to expand to (abs -3) you can make it an identifier macro 14:08 Shviller: That's just because it's a toy example. It needs two parameters in the real code. 14:08 jonrafkind: so (m 2 3) 14:09 Shviller: Yup. 14:09 jonrafkind: so you're all set now?> 14:09 Shviller: Nope. :\ 14:09 jonrafkind: ok so you want to write #.m 2 3 instead of (m 2 3)? 14:10 Shviller: Nono. 14:10 Shviller: Try (a_macro 1 (m)) 14:10 Shviller: Is that what you suggested for my paste? 14:10 Shviller: Because it doesn't work. 14:10 jonrafkind: you want y to be substituted for abs and z for -3? 14:10 Shviller: Yes. 14:11 (join) MayDaniel 14:11 jonrafkind: hm.. ive never seen that use case before 14:12 Shviller: Well, I'm using GUIML, and since I have several nearly identical components with lengthy declarations, I tried to make a macro that expands into those declarations. 14:13 Shviller: But since the main payload of guiml is the guiml macro, well, I need my macros to expand before guiml gets to their arguments. 14:13 jonrafkind: can you show the real code, theres probably a different solution to the problem other than what you have pasted so far 14:15 Shviller: http://pastebin.com/BJf81DDd gears-canvas% is copypasted from gears.rkt as-is, so it can be ignored. 14:17 jonrafkind: so what do you want to macroize 14:18 jonrafkind: oh the gl-begin stuff i guess 14:18 Shviller: The button! macro would do just what I want, but it doesn't work. 14:18 jonrafkind: oh ok 14:20 jonrafkind: btw most people consider it bad form to put a closing ) on its own line 14:20 (quit) karswell: Write error: Connection reset by peer 14:20 (quit) MayDaniel: Read error: Connection reset by peer 14:20 Shviller: I know. It's just that 6 years of Ruby aren't going away anytime soon. :) 14:21 (join) karswell 14:23 jonrafkind: did you write guiml? 14:23 Shviller: No. 14:24 jonrafkind: what you are trying to do may not be possible really.. if guiml expects a literal button% syntax to appear then it won't know what to do with button! 14:24 jonrafkind: it would have to local-expand the expressions until it found button% 14:26 jonrafkind: yea it seems that guiml expects certain forms to appear, so you can't just insert a macro that will expand to that form and expect it to work 14:26 (join) jeapostrophe 14:27 jonrafkind: if you define button! using the reader extension then you should be able to use it later on 14:27 jonrafkind: like #.(define (button1 ...) (button% ...)) or something 14:33 Shviller: I take it there no way to make button!, I dunno, a meta-macro or a second-level macro, or somesuch? So that it is evaluated before guiml? I remember reading about meta-compile phase level, phase level 2. 14:43 rapacity: how can I use a latex package in scribble ? 14:50 (join) MayDaniel 14:50 (quit) MayDaniel: Changing host 14:50 (join) MayDaniel 15:16 samth: rapacity: you want to pass a style to @title, probably 15:17 samth: rapacity: something like this: 15:17 samth: @title[#:style (make-style #f (list (make-tex-addition "foo.tex")))] 15:18 samth: or you can put the \usepackage in a preamble that's passed on the scribble command line 15:18 samth: Shviller: when you're `read'ing the file, there are no definitions yet, so you can't refer to them 15:20 (quit) MayDaniel: Read error: Connection reset by peer 15:21 rapacity: thanks, it worked 15:23 samth: Shviller: you could put the defintion of the function you want to compute over syntax into another file 15:24 samth: and then do (eval '(require "myfile.rkt") ns) right before the other eval in read-eval.rkt 15:24 samth: the you'd have those defintions available 15:24 Shviller: Yup, I can, but this kinda makes the whole :make it more readable" point moot. 15:24 Shviller: I still haven't given up hope on finding a solution that doesn't require me to modify guiml. Not because I can't, I just want something general. Maybe produce a guiml-macronized macro that handles other macro calls in its arguments and then pushes the results off to the original guiml macro... 15:26 jonrafkind: you could write your own #lang language that has its own notion of meta macros and expand those first 15:27 jonrafkind: phase level 2 macros are macros that execute inside bodies of phase level 1 macros 15:27 samth: jonrafkind: that would be pretty tricky 15:27 jonrafkind: yea 15:27 jonrafkind: but what alternative does he have 15:28 Shviller: Well, I dunno, wrap guiml call in another macro call that tries to expand everything that isn't guiml? Can that work? 15:28 jonrafkind: its an interesting problem that I sometimes run into, when a macro expects some specific form but doesn't use local expand so i cant use my own macros where those forms would go 15:29 jonrafkind: Shviller, i guess you could local-expand all the sub-forms yourself and then re-create the guiml form again from the output 15:30 samth: Shviller: i just pushed a new version of that gist that shows how to fix your problem 15:31 Shviller: For the record: I'm not desperate about the whole thing, and you guys named a number of options I could take. So right now it's more about me absorbing knowledge of what one can and cannot do in Racket and how easily than me stubbornly insisting on doing things the way I first came up with and which doesn't work. :) So I'm doubly thankful for your help. 15:34 samth: Shviller: I think my latest version will actually do everything you need 15:38 Shviller: Uh-oh, looks like it overshot the mark a bit: " a_macro: use does not match pattern: (a_macro x (y z)) in: (a_macro 1 3)". I guess not just m got evaluated, but (abs -3) that it expands to was evaluated too. 15:46 samth: yeah, you need to produce syntax that does what you want 15:46 samth: so, something like (define (m) '(abs -3)) 15:46 samth: note the ' 15:47 Shviller: Aha! 15:49 samth: also, you just need to produce s-expressions, not actual syntax as in a macro, because this is all at read-time 15:49 Shviller: Yup. 15:51 Shviller: Worked fine, and it still looks very readable. :D Thank you so much! 15:53 samth: Shviller: happy to help 15:54 Shviller: samth, jonrafkind, thank you! 16:02 (quit) jonrafkind: Ping timeout: 255 seconds 16:04 (quit) jeapostrophe: Quit: jeapostrophe 16:25 (join) jao 17:00 (join) MayDaniel 17:05 (quit) emma: Ping timeout: 252 seconds 17:05 (quit) jrslepak_: Quit: Leaving 17:08 (join) emma 18:05 (join) jeapostrophe 18:07 (quit) jeapostrophe: Client Quit 18:51 (join) jeapostrophe 18:52 (quit) jeapostrophe: Client Quit 18:58 (quit) Reox: Quit: Page closed 19:03 (quit) masm: Quit: Leaving. 19:07 (quit) mceier: Quit: leaving 19:41 (nick) samth -> samth_away 19:42 (join) jonrafkind 20:20 (join) clklein 20:22 clklein: I have a repo on the plt git server which I'd like to move to github. I've started by forking plt/racket on github and adding that repo as a remote in my existing one. Then I git fetched from that remote. 20:22 clklein: Am I on the right track? What do I do next? 20:27 (quit) MayDaniel: Read error: Connection reset by peer 20:33 (quit) dnolen: Quit: dnolen 20:34 (join) dnolen 20:39 (quit) clklein: Quit: Page closed 20:57 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/-1_c9g 20:57 RacketCommitBot: [racket/master] data/order: added support for transparent structs, added tests - Ryan Culpepper 20:57 RacketCommitBot: [racket/master] db: added support for postgresql arrays - Ryan Culpepper 22:13 (join) jeapostrophe 22:24 (join) jeri 22:24 jeri: Evening 22:24 jeri: is there anyone around? 22:25 (quit) kudkudyak: Ping timeout: 258 seconds 22:34 offby1: nobody here but us zombie processes. 22:34 rudybot: And I, your obedient servant 22:35 (join) Demosthenes 23:25 (quit) emma: Ping timeout: 244 seconds 23:27 (join) emma 23:38 (quit) dnolen: Quit: dnolen 23:39 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/JBcLuA 23:39 RacketCommitBot: [racket/master] delay the construction of the compatible-closure grammar (the 'cross' thing) - Robby Findler