00:04 (quit) adu: Quit: adu 00:25 (part) chimeracoder 00:27 (nick) _tca_ -> _tca 00:37 (join) adu 00:41 (quit) jeapostrophe: Ping timeout: 244 seconds 00:45 (join) chimeracoder 00:46 chimeracoder: Is there a recommended json parsing library? Supposedly one is being released "summer of 2012" 00:50 adu: neil and dherman seem to have json parsing libraries on planet 00:51 chimeracoder: Yeah, I saw dherman's, but if one's being released soon, I wasn't sure if that's still the most recent (last updated Feb) 00:51 chimeracoder: thanks 00:52 eli: chimeracoder: Yes, there is a json library that will be included in the next release: http://pre.racket-lang.org/docs/html/json/ 00:53 eli: It should be compatible with 5.2.1, so you can just get the directory if you want to start using it now. 00:53 eli: (Or you can use a nightly build.) 00:54 chimeracoder: oh great, thanks 01:00 adu: chimeracoder: I'm releasing my uber-compile-every-language-to-racket in about 50 years, can you wait until then? 01:06 chimeracoder: adu: just compile Javascript to Racket, then mooch off of all 'X in Y lines of Javascript' posts that flood HackerNews every day ;-) 01:07 adu: wtf does 'X in Y' mean? 01:07 chimeracoder: eg, 'Python in 40 lines of Javascript' 01:07 adu: oh haha 01:07 chimeracoder: At least a few months ago, there used to be at least one of those posts per day on the front page, haha 01:08 adu: or, use all the X->C impls and compile C->LLVM, then LLVM->JS, then JS->Racket 01:09 adu: we seriously need a function database 01:10 adu: for the sake of humanity 01:10 chimeracoder: adu++ 01:11 chimeracoder: In all seriousness, though, I'm confused about how to use the Json library - I can write something like (jsexpr? "{asdf : 4}") which returns true, but how do I actually access the value? 01:12 eli: chimeracoder: `jsexpr?' tests for racket values that correspond to json values (which are called jsexprs). 01:13 eli: So (jsexpr? "blah {{{") also returns #t, since all strings are jsexprs. 01:13 chimeracoder: oh *facepalm* 01:14 chimeracoder: so is there a function that parses those, or do I have to write that myself? 01:14 adu: chimeracoder: all I want to do (it's either unbelievable or common sense, depending on who I ask) is generate binaries and documentation from the same source, I mean doxygen was designed for that purpose, right? 01:14 eli: If you want to convert a string to a jsexpr, then the unsurprising name for it is `string->jsexpr'. 01:14 eli: For example, (string->jsexpr "{asdf : 4}") 01:14 eli: Which is "of course" an error, since it's invalid json. 01:14 eli: What you really want is (string->jsexpr "{\"asdf\" : 4}") 01:15 eli: adu: That's not necessarily a good idea. You can get easy but relatively bad documentation using it. 01:16 eli: (And BTW, IIRC, neilv's mcfly is a recent package that does that.) 01:16 chimeracoder: herm, so what would be the better approach? 01:16 eli: chimeracoder: To `string->jsexpr'? 01:16 eli: There's `read-jsexpr' that works directly on input. 01:17 eli: s/input/an input port/ 01:17 eli: Sorry, `read-json'. 01:18 eli: The names are explained in the documentation, btw -- the idea is that these use "json" since they deal with real json, as coming form a file or on a network line. 01:18 (join) neilv 01:19 adu: eli: my favorite documentation is the navigable kind 01:19 chimeracoder: ah 01:19 chimeracoder: I think I was getting the json/jsexpr mixed up 01:19 eli: adu: Huh? Rendering documentation as html can be done either way. 01:20 eli: chimeracoder: That's one of the things that we changed from Dave's library. 01:20 eli: chimeracoder: Also, note the different treatment of json nulls. 01:22 chimeracoder: yeah, thanks 01:48 (join) kvda 02:06 (quit) Kaylin: Quit: Leaving. 02:12 (quit) mceier: Read error: Connection reset by peer 02:28 (quit) jacius: Remote host closed the connection 02:31 (quit) ozzloy: Ping timeout: 265 seconds 03:12 (join) antithesis 03:26 neilv: today i dusted off the `new' emacs mode, meow 03:45 (join) Kaylin 03:49 (join) dalaing 03:53 (quit) adu: Ping timeout: 246 seconds 04:01 (join) soegaard 04:19 (join) MayDaniel 04:20 (quit) Kaylin: Quit: Leaving. 04:53 (quit) Fare: Ping timeout: 252 seconds 04:57 (quit) jyc: Read error: Connection reset by peer 05:13 (quit) dalaing: Ping timeout: 265 seconds 05:17 (join) dalaing 05:25 (quit) soegaard: Quit: soegaard 05:32 (quit) MayDaniel: 05:35 (join) mceier 05:39 (join) bitonic 06:14 (join) lcc 06:15 (quit) ssbr__: Ping timeout: 265 seconds 06:28 (join) ssbr__ 06:37 (quit) noam_: Ping timeout: 248 seconds 07:10 (join) noam 07:32 (part) dalaing 07:38 (quit) lcc: Quit: ERC Version 5.3 (IRC client for Emacs) 07:44 (join) lcc 07:46 (quit) rbarraud: Ping timeout: 255 seconds 07:57 (join) Shvillr_ 07:58 (quit) Shviller: Disconnected by services 07:58 (nick) Shvillr_ -> Shviller 08:00 (join) masm 08:14 (quit) masm: Quit: Leaving. 08:14 (join) masm 08:15 (join) soegaard 08:22 (join) pooya72 08:42 pooya72: Is there any way to get arabic/persian to show up correctly in Dr.Racket? 08:52 (join) wlsn 08:54 (join) MayDaniel 09:02 soegaard: Don't know. 09:02 neilv: ask on the email list 09:02 soegaard: good advice 09:13 (quit) masm: Quit: Leaving. 09:17 (join) jao 09:17 (quit) jao: Changing host 09:17 (join) jao 09:25 (join) jeapostrophe 09:25 (quit) jeapostrophe: Changing host 09:25 (join) jeapostrophe 09:27 (quit) MayDaniel: Read error: Connection reset by peer 09:47 (quit) pooya72: Quit: pooya72 09:51 eli: Bah... 09:52 eli: FWIW, there is no way to do RTL text in drracket ATM. 09:57 (join) anRch 09:59 (quit) anRch: Read error: Connection reset by peer 10:00 soegaard: Does anyone know anything about https://github.com/Pylipala/racket-hack/blob/master/README ? 10:00 (join) anRch 10:04 (join) pooya72 10:05 soegaard: pooya72: You missed eli's remark. I quote: FWIW, there is no way to do RTL text in drracket ATM. 10:06 pooya72: soegaard: thanks. my internet got disconnected. That sucks. It such a great platform for teaching kids. But the kids I want to teach don't have English as their first language. 10:07 soegaard: How old are they? 10:07 pooya72: soegaard: the characters show up fine. they just aren't connected. 10:07 eli: pooya72: Yeah, what soegaard quoted; I've looked into it once, and it looked messy -- these days it might be easier since we're using a modern gui layer on linux, and windows/mac should be easy too, but it wasn't done. 10:07 pooya72: they're 16 10:07 pooya72: eli: thanks eli. 10:07 soegaard: okay 10:08 eli: And recently it came up in a similar context -- making it possible for young kids to use drracket... 10:08 pooya72: eli: I was teaching them ruby, since ruby doesn't have much syntax symbols like : $ etc... 10:09 pooya72: but Dr.Racket gives good feedback 10:09 pooya72: it shows where the mistake was 10:10 eli: pooya72: Well, once RTL is possible, then it should be very easy to have a language with bindings in different languages, which is even better., 10:10 eli: The only tricky issue would be translating error messages. 10:10 pooya72: eli: well I wouldn't do that. 10:10 pooya72: I mean translate error messages 10:10 eli: Heh, yeah, like I said, it would be difficult... 10:11 pooya72: not just that, they expect it to be in english 10:11 eli: One crazy idea that I played with is hooking into the error display handler, and pass the text through google translate... 10:11 pooya72: lol. that would be a funny experience. 10:11 (quit) noam: Read error: Connection reset by peer 10:12 eli: Well, if the bindings are in a different language, then english error messages wouldn't be too great... 10:12 eli: And using google is not too hard, btw. 10:12 eli: rudybot: t8 en ar Hellow world 10:12 rudybot: eli: Hellow العالم 10:12 eli: rudybot: t8 en ar Hello world 10:12 rudybot: eli: مرحبا العالم 10:13 eli: (rudybot is written in racket...) 10:13 pooya72: well, I think all they would wan't is to have strings show up correctly 10:13 pooya72: oh nice 10:13 jamessan: isn't the translate API being paywalled or does rudybot just screen scrape? 10:13 eli: (I don't know, the usual thing for them to do is to limit how much you can use it without paying.) 10:14 soegaard: FWIW Texas Instruments tried translating function names to local languages on the TI89. They went back to english function names with NSpire. In NSpire the names in the menu is translated, but when a menu item is chosen, the standard english function name is inserted into the editor. 10:15 eli: soegaard: We were (are, still) discussing teaching in middle school, where the language could be more of a problem... 10:16 eli: 7th grade to 9th, I think. 10:16 eli: (Translating from hebrew.) 10:16 chandler: Are there any other examples of programming languages that are localized? 10:16 eli: rudybot: t8 en he 8th grade 10:16 rudybot: eli: 8 כיתה 10:16 pooya72: on a positive note, arabic/farsi works when creating a gui. 10:16 eli: Bah. 10:17 soegaard: It is difficult - if function names are translated, then they can't use materials from internet. 10:17 eli: pooya72: If you mean buttons and menus etc, then that's not too surprising... 10:17 soegaard: On the OTH, they will grasp the meaning of some things faster. 10:17 chandler: It seems like you'd need a module system on the order of Racket's to be able to do it right. 10:18 eli: soegaard: At that stage looking stuff up on the web isn't important... 10:18 (quit) wlsn: Quit: Leaving 10:18 eli: It's roughly things at the bootstrap level, if you know about that. 10:18 soegaard: A little. I have looked at WeScheme. 10:19 pooya72: So I looked into ruby shoes, and really Dr.Racket's gui is a lot more complete. 10:19 pooya72: though shoes is a little simpler 10:21 soegaard: jamessan: True (I believe this is a change). 20$ for 1M text is okay for translating error messages, that can be cached. 10:21 (join) dnolen 10:22 (join) jeremyheiler 10:23 pooya72: Ok, so how is it that everything in Dr.Racket works so well? 10:23 pooya72: seriously 10:24 pooya72: The gui is beautiful on the mac, it's easy to mac, and it's easy to make it into an app. 10:24 pooya72: it's easy to make 10:25 pooya72: come guys, it's like I'm not even programming. where's the hours of frustration? 10:25 (join) jesyspa 10:27 soegaard: ;-) 10:28 chandler: pooya72: I think you should write to the list and ask these questions. :-) 10:29 soegaard: eli: Thanks for reminding me of Bootstrap. I think, I'll steal some for my class next next year. 10:30 soegaard: that is, steal some ideas 10:34 pooya72: Is there any way to to compile a standalone app from an Intel Mac to a PPC Mac? 10:42 (quit) anRch: Quit: anRch 10:47 (quit) jeapostrophe: Remote host closed the connection 10:48 (join) jeapostrophe 10:48 (quit) jeapostrophe: Changing host 10:48 (join) jeapostrophe 11:06 (quit) jeapostrophe: Ping timeout: 246 seconds 11:09 (quit) neilv: Quit: Leaving 11:13 (quit) pooya72: Remote host closed the connection 11:14 (join) pooya72 11:22 (join) pooya72_ 11:23 (quit) soegaard: Quit: soegaard 11:24 (join) Fare 11:25 (quit) pooya72: Ping timeout: 246 seconds 11:25 (nick) pooya72_ -> pooya72 11:25 (join) RacketCommitBot 11:25 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/P0BvXA 11:25 RacketCommitBot: [racket/master] typo - Matthew Flatt 11:25 RacketCommitBot: [racket/master] `raco decompile' fix - Matthew Flatt 11:25 RacketCommitBot: [racket/master] *SL: fix `check-expect' syntax checking - Matthew Flatt 11:25 (part) RacketCommitBot 11:31 (join) roelof 11:33 roelof: Can someone explain me why this : (check-expect (links-of-draaien-cham (make-Vcham 20 100 "left")) (make-Vcham 17 99.9 "left")) get this error message : Vcham-Xcham: expects a Vcham; given (make-signature ...) 11:33 (quit) Fare: Ping timeout: 246 seconds 11:34 (join) soegaard 11:45 (join) bitonic` 11:46 (quit) bitonic: Ping timeout: 246 seconds 11:47 (join) Fare 11:49 roelof: nobody who can help me figure out why I get this message : Vcat-Xcat: expects a Vcat; given (make-signature ...) on this script : http://pastebin.com/V2r5RfBa 11:49 (nick) bitonic` -> bitonic 11:52 (join) jeapostrophe 11:52 (quit) jeapostrophe: Changing host 11:52 (join) jeapostrophe 11:55 (quit) antithesis: Remote host closed the connection 12:01 asumu: roelof: what kind of thing does the Vcham-Xcham function expect as input? 12:02 roelof: I would say a Vcham 12:04 asumu: roelof: and what are you giving it in the body of your function? 12:04 asumu: (in `links-of-draaien-cham`) 12:04 (join) bitonic 12:05 (join) RacketCommitBot 12:05 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/MtE3zg 12:05 RacketCommitBot: [racket/master] scribble Latex: add \SNumberOfAuthors{} in output - Matthew Flatt 12:05 (part) RacketCommitBot 12:06 (quit) bitonic: Remote host closed the connection 12:06 roelof: I use there a s for short for the structure Vcham 12:06 asumu: Not here: "( < (Vcham-Xcham Vcham) ondergrens-cham)" 12:07 asumu: That's what the error was trying to tell you. `Vcham` is a structure definition. Not the Vcham you got as input to the functino. 12:07 asumu: *function 12:07 asumu: (unfortunately, using the structure name is not an error in BSL) 12:07 asumu: (I think because it's needed to write signatures) 12:11 (join) bitonic 12:11 (quit) bitonic: Remote host closed the connection 12:12 roelof: asuma : thanks I now can debug the rest 12:21 (join) bitonic 12:22 (quit) ssbr__: Ping timeout: 245 seconds 12:23 (quit) Fare: Ping timeout: 246 seconds 12:24 (join) Fare 12:24 (quit) dnolen: Ping timeout: 240 seconds 12:25 roelof: asuma :"may I ask you one more question : how can I solve this one : rectangle: expects a non negative real number as first argument, given -1 12:26 roelof: according to my knowlegde if happiness is zero the script stops 12:28 (join) jonrafkind 12:28 (quit) jonrafkind: Changing host 12:28 (join) jonrafkind 12:32 (part) chimeracoder 12:43 (quit) vu3rdd: Remote host closed the connection 12:43 (join) jacius 12:50 (quit) jeapostrophe: Ping timeout: 252 seconds 12:52 (quit) bitonic: Remote host closed the connection 12:59 (join) bitonic 13:01 (join) dnolen 13:02 (quit) bitonic: Remote host closed the connection 13:02 (join) bitonic 13:05 (join) Shviller 13:08 (join) pooya72 13:09 roelof: anyone else who can help me ? 13:11 (join) Kaylin 13:12 (quit) bitonic: Remote host closed the connection 13:15 (join) skchrko 13:17 offby1: I don't understand your question 13:22 roelof: I have this script : http://pastebin.com/amfsCUSi and now I see this error message appear : rectangle: expects a non negative real number as first argument, given -1 13:22 offby1: yikes that's a big script. 13:22 offby1: what language is it in? 13:23 offby1: have you tried running it inside DrRacket? That's got a sort of debugger built in 13:23 offby1: it might point out where the problem is 13:24 roelof: it's in racket and im running it into DrRacket. There is where I get the error-message 13:25 roelof: and the debugger I cannot use because Im still in the beginner student language 13:26 soegaard: roelof: It is easier for everybody if you reveal the line number. Then people do not not have to copy the program, open DrRacket, run it etc. 13:27 (quit) pooya72: Quit: pooya72 13:27 (quit) Fare: Ping timeout: 246 seconds 13:28 roelof: soegaard : I know but DrRacket does not say which line number the problem is 13:28 soegaard: Did you click the error icon ? 13:31 roelof: I don't see a error icon just the text 13:32 (quit) dnolen: Ping timeout: 246 seconds 13:32 jsnikeris: Is there a better way to generate responses from templates than what is posted here: http://docs.racket-lang.org/web-server/templates.html#(part._.H.T.T.P_.Responses) 13:36 soegaard: roelof: What happens a screen just before you get the message? 13:38 roelof: then I see what I expected a cat running around the screen. The message appears when the script stops because happiness is zero 13:40 soegaard: So you are the red bar is a rectangle that gets smaller and smaller. You keep counting down and down. Do you check the value before you count down? 13:43 roelof: nope, I only check if the value is zero 13:43 soegaard: Only count down if the value is positive. 13:44 soegaard: Alternative: Use (max 0 happiness) as the width of the rectangle. 13:45 roelof: oke, I will try your first solution and see if it's helping 13:46 roelof: everyone thanks for the help and have a good evening 13:50 jsnikeris: I'm having a hard time deciding when to use "#lang web-server" vs. "#lang racket" 13:50 jsnikeris: Would you use #lang web-server in modules that represent various views? 13:51 jsnikeris: These view modules require some of the modules that are automatically required by #lang web-server 13:52 jsnikeris: Alternatively, I could just use #lang racket and require only the needed modules 13:52 jsnikeris: Thoughts? 13:52 (quit) roelof: Quit: Page closed 13:54 (quit) soegaard: Quit: soegaard 13:54 (join) snearch 13:54 (join) soegaard 13:56 (join) Fare 13:59 (join) pooya72 14:01 (join) MayDaniel 14:11 (quit) jesyspa: Quit: leaving 14:16 soegaard: jsnikeris: The perfect question for jeapostrophe 14:26 (quit) soegaard: Quit: soegaard 14:33 (join) soegaard 14:44 (join) jyc 14:47 (quit) snearch: Quit: Verlassend 15:21 (join) adu 15:26 (quit) MayDaniel: Read error: Connection reset by peer 15:28 (quit) adu: Quit: adu 15:34 pooya72: How do i provide a predicate for find-files? http://docs.racket-lang.org/reference/Filesystem.html#(def._((lib._racket/file..rkt)._find-files)) 15:38 (join) MayDaniel 15:39 jamessan: provide a function that matches the signature (path? . -> . any/c) as the first argument to find-files. if you just want to find everything, (find-files (lambda (path) #t)) will do that 15:45 pooya72: jamessan: sorry I'm really new. don't know the syntax yet. How would i search for files ending in .txt? 15:52 (join) anon5164 15:56 (quit) MayDaniel: Read error: Connection reset by peer 15:57 (quit) Myk267: Quit: Myk267 16:04 (join) adu 16:09 (quit) jyc: Read error: Connection reset by peer 16:15 (join) jyc 16:26 (quit) pooya72: Ping timeout: 265 seconds 16:32 offby1: (define (is-text-file? filename) (regexp-match "\\.txt$" filename)) or something like that. 16:32 offby1: rudybot: (define (is-text-file? filename (regexp-match "\\.txt" filename))) 16:32 rudybot: *offby1: your sandbox is ready 16:32 rudybot: *offby1: error: #:1:32: define: not an identifier, identifier with default, or keyword for procedure argument at: (regexp-match "\\.txt" filename) in: (define (is-text-file? filename (regexp-match "\\.txt" filename))) 16:32 offby1 rubs chin 16:33 offby1: rudybot: init racket 16:33 rudybot: *offby1: your sandbox is ready 16:33 offby1: rudybot: (define (is-text-file? filename (regexp-match "\\.txt" filename))) 16:33 rudybot: *offby1: error: #:1:32: define: not an identifier, identifier with default, or keyword for procedure argument at: (regexp-match "\\.txt" filename) in: (define (is-text-file? filename (regexp-match "\\.txt" filename))) 16:33 offby1: rudybot: (define (is-text-file? filename) (regexp-match "\\.txt" filename)) 16:33 rudybot: *offby1: Done. 16:33 offby1: *ahem* 16:33 offby1: rudybot: (is-text-file? "foo.bar") 16:33 rudybot: *offby1: ; Value: #f 16:33 offby1: rudybot: (is-text-file? "foo.bar.txt") 16:33 rudybot: *offby1: ; Value: (".txt") 16:33 offby1: \o/ 16:33 offby1: ~ 16:33 offby1: / \ 16:33 offby1: poo, he's gone 16:33 offby1: all that effort! Wasted! 16:33 offby1 sobs 16:35 (quit) adu: Quit: adu 16:37 soegaard: So do Italy. 16:44 (quit) Kaylin: Quit: Leaving. 16:45 (join) pooya72 16:47 pooya72: Got it! http://pastebin.com/CPu089Lt 16:47 pooya72: Aww yeaahh... 16:47 pooya72: do a little racket! 16:47 pooya72: make a little lambda! 16:53 (join) jeapostrophe 16:53 (quit) jeapostrophe: Changing host 16:53 (join) jeapostrophe 16:54 (quit) skchrko: Read error: Operation timed out 16:54 (quit) pooya72: Quit: pooya72 16:57 (join) Demosthenes 17:05 (quit) lcc: Quit: ERC Version 5.3 (IRC client for Emacs) 17:07 (join) adu 17:10 adu: hi offby1 17:17 (quit) jeapostrophe: Ping timeout: 245 seconds 17:36 (quit) adu: Quit: adu 18:01 (join) Myk267 18:44 (quit) soegaard: Quit: soegaard 18:46 (quit) kvda: Quit: -___- 18:47 (quit) Demosthenes: Ping timeout: 240 seconds 19:04 (quit) Fare: Ping timeout: 252 seconds 19:33 (join) SrPx 19:47 (join) Demosthenes 19:53 (join) dnolen 19:54 (join) jeapostrophe 19:54 (quit) jeapostrophe: Changing host 19:54 (join) jeapostrophe 20:06 (join) duomo 20:16 (quit) stchang: Read error: Operation timed out 20:19 (join) stchang 20:20 (quit) acarrico: Ping timeout: 252 seconds 20:27 (join) yoklov 20:32 (join) Kaylin 20:34 (quit) Kaylin: Client Quit 20:34 (quit) mceier: Quit: leaving 20:35 (quit) Demosthenes: Ping timeout: 250 seconds 20:36 (join) Kaylin 20:46 (quit) jeapostrophe: Ping timeout: 240 seconds 20:50 (join) Demosthenes 21:02 (quit) Kaylin: Quit: Leaving. 21:02 (join) Kaylin 21:04 (join) bitonic 21:04 (quit) Kaylin: Client Quit 21:05 (join) Kaylin 21:06 (quit) Kaylin: Read error: Connection reset by peer 21:07 (join) Kaylin 21:07 (quit) Kaylin: Read error: Connection reset by peer 21:08 (join) Kaylin 21:12 (quit) jonrafkind: Ping timeout: 244 seconds 21:20 (quit) cdidd: Remote host closed the connection 21:26 (quit) bitonic: Remote host closed the connection 21:32 (join) bitonic 21:34 (quit) bitonic: Remote host closed the connection 21:39 (quit) ChanServ: *.net *.split 22:06 (quit) jeremyheiler: Quit: Computer has gone to sleep. 22:08 (join) Fare 22:29 (join) jeapostrophe 22:40 (quit) Demosthenes: Ping timeout: 240 seconds 22:50 (quit) SrPx: Ping timeout: 245 seconds 23:00 (join) ChanServ 23:01 (nick) Fare -> Guest95559 23:04 (quit) duomo: Quit: Linkinus - http://linkinus.com 23:05 (join) Demosthenes 23:06 (quit) Demosthenes: Client Quit 23:06 (join) Demosthenes 23:14 (quit) jeapostrophe: Ping timeout: 240 seconds 23:33 (join) adu