00:13 (join) jeapostrophe 00:18 (join) Hugglesworth 00:19 Hugglesworth: any haskell peeps here? 00:19 Hugglesworth: I'm trying to convert haskell into scheme 00:19 Hugglesworth: and I'm having a lot of trouble finding equivilant functions 00:19 freakazoid: We tried that already. They wouldn't let us. 00:20 Hugglesworth: >_> 00:22 Hugglesworth: I still have to find things like haskell's takeWhile, dropWhile, and span 00:22 Hugglesworth: takeWhile and dropWhile look easy enough ot hack together 00:23 Hugglesworth: span is pretty much partition, but it should be keeping the order 00:23 Hugglesworth: is there any way to do that easily? 00:24 Hugglesworth: by keeping the order, I mean actuallying partitioning when the condition goes false 00:28 Hugglesworth: shachaf: xu djuno 00:35 (quit) Hugglesworth: Ping timeout: 245 seconds 00:36 (join) Hugglesworth 00:58 shachaf: Hugglesworth: What are you trying to do exactly? 00:58 shachaf: Haskell's lists are pretty different from Scheme's lists. 00:59 Hugglesworth: true 00:59 Hugglesworth: I have to write an infix expression to postfix converter 00:59 shachaf: Also most other things are different. :-) 00:59 Hugglesworth: it's still functional code based around lists 00:59 Hugglesworth: the logic should be the same 01:00 shachaf: Why are you converting Haskell code to do it rather than using some Scheme code that does it? 01:00 Hugglesworth: because then I'd have to write it in scheme first 01:01 Hugglesworth: and I'm only really used to haskell for functional logic 01:01 Hugglesworth: (this is for a class BTW) 01:01 shachaf: I would vaguely think that you'd do it in a rather different style. 01:03 Hugglesworth: I mean, the logic seems to transfer over fairly easily 01:03 Hugglesworth: all I'm really missing out on is a few functions for easily handling and splitting lists 01:05 freakazoid: Hugglesworth: You may also find it helpful to use Lazy Racket 01:05 freakazoid: if any of your code relies on Haskell's laziness. 01:05 Hugglesworth: none of it does 01:05 freakazoid: Oh, if it's for a class it would probably be cheating anyway 01:06 freakazoid: (to use lazy racket) 01:06 Hugglesworth: maybe 01:06 Hugglesworth: he said were were supposed to use "Big" something 01:06 Hugglesworth: can't remember the name 01:06 freakazoid: I would be surprised if partition, dropWhile, and takeWhile didn't exist 01:07 Hugglesworth: yeah 01:09 freakazoid: http://docs.racket-lang.org/reference/pairs.html has a pretty large number of functions that can be combined to do pretty much anything with lists 01:09 Hugglesworth: yeah, I looked through a whole bunch on that page 01:11 freakazoid: Isn't "big" just #lang racket? 01:11 Hugglesworth: maybe 01:13 Hugglesworth: additional question, how do I use brackets in a list? 01:13 Hugglesworth: `(+ - #\()) // but I don't think that's right 01:14 Hugglesworth: err, extra paren on there 01:14 freakazoid: My company just hired the author of Real World Haskell 01:15 freakazoid: what do you mean by using brackets in a list? 01:15 freakazoid: a bracket character would be, as you typed, #\( 01:15 freakazoid: but character is a specific datatype 01:16 freakazoid: and that's a character while the other two there are symbols 01:16 freakazoid: a symbol that was an open-paren would be |(| 01:16 freakazoid: but I'm not sure why you'd want such a thing. 01:17 Hugglesworth: I'm matching out of a string 01:18 Hugglesworth: should they all be characters instead of symbols? 01:18 freakazoid: yeah 01:18 Hugglesworth: k 01:18 freakazoid: you might want to use regular expressions if you're allowed 01:18 Hugglesworth: I think we are 01:18 Hugglesworth: hadn't thought of that 01:21 Hugglesworth: freakazoid: is your company the one doing the email thingy? or am I thinking too far back? 01:24 (quit) RackN00b: Quit: RackN00b 01:27 freakazoid: His was. MailRank 01:27 freakazoid: We bought them for their people. 01:28 freakazoid: well, and their knowledge, since we're doing a similar messagey thing. 01:28 Hugglesworth: cool 01:30 (join) realitygrill 01:39 (join) RackN00b 01:50 (quit) RackN00b: Quit: RackN00b 01:59 RacketCommitBot: [racket] plt pushed 9 new commits to master: http://git.io/0AUW0Q 01:59 RacketCommitBot: [racket/master] Click and drag to zoom 2D plots - Neil Toronto 01:59 RacketCommitBot: [racket/master] Plot snips no longer get focus - Neil Toronto 01:59 RacketCommitBot: [racket/master] Focus tweaks to capture off-snip movement; account for split editor - Neil Toronto 02:16 (quit) freakazoid: Quit: Computer has gone to sleep. 02:36 (quit) noam: Read error: Connection reset by peer 02:36 (join) noam 02:43 (quit) jeapostrophe: Ping timeout: 244 seconds 02:52 (quit) noam: Read error: Connection reset by peer 02:52 (join) noam 02:52 (join) snorble 03:30 (quit) Shvillr: Read error: Connection reset by peer 03:36 (join) Blkt 03:48 (join) masm 03:54 (quit) jonrafkind: Ping timeout: 260 seconds 03:54 Blkt: good morning everyone 03:57 (join) ahinki 04:02 (join) mithos28 04:02 (quit) realitygrill: Quit: realitygrill 04:08 loz`: hi, where can i find racket api? 04:08 (quit) SidH_: Remote host closed the connection 04:08 mithos28: loz`: The documentation is available at docs.racket-lang.org 04:08 (join) SidH_ 04:09 loz`: mithos28: what about modules/functions list or index? 04:09 mithos28: There is a search box on top of the page. I don't think there is one page with everything on it. 04:10 mithos28: Is there something in particular you are looking for? 04:11 loz`: i'm looking for multidimensional vector's manipulation 04:11 noelw: loz': numeric vectors? 04:11 loz`: yes 04:12 noelw: I have some old code on github 04:13 noelw: I want to update it, but haven't found the time 04:13 noelw: https://github.com/noelwelsh 04:13 noelw: mzgsl or numeric 04:13 noelw: depending on what you want to do 04:15 loz`: well, i'g going to make life game 04:15 loz`: *i'm 04:15 (quit) noam: Read error: Connection reset by peer 04:16 mithos28: loz`: A possibility might be to use a hash for a multidimensional vector 04:16 mithos28: you lose bounds and size information, but it easy to set up 04:16 loz`: btw what the difference between vectors with numbers or anything else? vector is just a container, isnt' it? 04:17 mithos28: loz`: there are some specific 'vectors' that are only for numbers like fxvector and flvector 04:17 mithos28: which are faster for those, but normal vectors don't care what is put inside them 04:27 (quit) crk: Ping timeout: 244 seconds 04:41 (join) crk 05:07 (quit) SidH_: Remote host closed the connection 05:08 (join) SidH_ 06:13 (quit) mithos28: Quit: mithos28 06:24 (join) noam 06:58 (quit) masm: Ping timeout: 240 seconds 07:49 (join) RackN00b 07:50 (join) RackN00b_ 07:50 (quit) RackN00b: Read error: Connection reset by peer 07:50 (nick) RackN00b_ -> RackN00b 08:09 (join) keenbug 08:13 (join) masm 08:37 Shviller: Guys, is it a sane idea to use a generator to consume values instead of producing them? I want to encapsulate a chunk of code that proceses a sequence, only instead of pulling values from it it waits for the next value to become available. 08:37 Shviller: It seems that since 4.2.5 generators can be used like that. The question is, should they? And if not, what should I use instead? 08:42 (join) kenjin_ 08:45 kenjin_: Hello, I need to do some works with matrices like what Numpy package in Python does. Can Racket help those jobs? 08:48 noelw: https://github.com/noelwelsh 08:48 noelw: p 08:48 noelw: ackages mzgsl and/or numeric 08:49 noelw: It's a bit old; not sure if it still runs 08:49 kenjin_: Thank you. I'll try 08:54 noelw: Let me know how you get on. I want to return to that code but I just haven't had time 08:55 kenjin_: I'm installing mzgsl through planet. DrRacket shows some "red" letters. 08:55 (join) veer 09:12 (quit) kenjin_: Ping timeout: 265 seconds 09:27 (join) kewne 09:27 kewne: Hi. 09:29 kewne: I know it's a small thing but I'm happy my first Racket program is progressing. 09:30 kewne: So I would like to share the first image it generated. :) 09:30 kewne: http://i.imgur.com/qK0N0.png 09:32 noelw: Looks great! 09:33 kewne: Thanks. :)) 09:34 kewne: racket/cmdline really helps. 09:34 kewne: So I can do: chess-plot position --dark-square-color ... --size ... etc... and customize the output. 09:35 kewne: That would really be a pain to parse manually. 10:02 (join) fridim_ 10:03 (join) epsil 10:09 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/Wht04g 10:09 RacketCommitBot: [racket/master] rename contract-generate to contract-random-generate - Robby Findler 10:14 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/MG--1w 10:14 RacketCommitBot: [racket/master] add hook to force a minor GC - Matthew Flatt 10:14 RacketCommitBot: [racket/master] fix GC bug in futures when a blocking result is a tail call - Matthew Flatt 10:30 (quit) fridim_: Ping timeout: 244 seconds 10:31 epsil: there's something I really don't get about immutable data structures 10:31 epsil: if one always has to return a new object instead of modifying one, isn't there a lot of overhead with regard to copying? 10:31 epsil: say I want to write my own routine for pushing an element to the beginning of a list (simple example) 10:32 epsil: with a mutable list, I'd make a quick modification to the beginning of the list and be done with it (an O(1) operation, the details don't matter) 10:32 epsil: with an immutable list, I have to create a new list and copy all the old elements over (an O(n) operation ...) 10:32 epsil: to take things further, if I write a procedure which recurs down a list, then there's going to be a lot of O(n) copying -- one per function call 10:32 epsil: i.e., I get O(n * n) for the immutable list, versus O(1 * n) for the mutable list 10:32 noelw: Not adding an element to the beginning of a list… but for adding to the end of a list 10:32 epsil: am I missing something? 10:33 noelw: There are lots of interesting functional data structures that are immutable while have costs O(log n) or better for typical operations. 10:33 noelw: You'll find some on Planet (planet.racket-lang.org) 10:34 epsil: so (cons 'a list) is an O(1) operation even for immutable lists? 10:34 noelw: Yes 10:34 epsil: interesting 10:34 epsil: how does that work? 10:34 noelw: It's a singly linked list 10:35 noelw: a cons cell contains a value and a pointer to the rest of the list 10:35 epsil: hm 10:35 epsil: so behind the scenes, several immutable lists may share the same links? 10:35 noelw: Yes. 10:35 noelw: (define tail (list 1 2 3)) 10:35 noelw: (define list1 (cons 'hi tail)) 10:36 noelw: (define list2 (cons 'bye tail)) 10:36 noelw: tail is not copied 10:36 (quit) masm: Ping timeout: 240 seconds 10:36 epsil: so you've just created a tree there :) 10:37 epsil: in a sense 10:37 noelw: Not in the usual sense, but yes 10:37 Shviller: Yeah, a tree no one can observe. Does it make a sound when it falls? 10:37 epsil: lol 10:50 (join) anRch 10:58 (quit) ahinki: Quit: ChatZilla 0.9.87 [Firefox 9.0/20111116091359] 11:02 (quit) veer: Quit: Leaving 11:06 kewne: If I recall correctly, most (all?) Clojure data structures are immutable, but their updates don't copy the whole thing. 11:08 noelw: If you're interested in immutable data structures, start here: http://www.eecs.usma.edu/webs/people/okasaki/pubs.html 11:10 noelw: Also see persistent data structures 11:10 (join) emma_ 11:10 (quit) anRch: Quit: anRch 11:11 noelw: Ok, enough lecturing from me 11:12 (join) anRch 11:12 (nick) emma_ -> em 11:13 noelw: laters 11:13 (quit) noelw: Quit: noelw 11:20 (quit) anRch: Ping timeout: 252 seconds 11:21 (join) anRch 11:26 (quit) anRch: Ping timeout: 258 seconds 11:28 (join) anRch 11:31 (join) jeapostrophe 11:31 (part) RackN00b 11:38 (join) MayDaniel 11:49 (quit) anRch: Ping timeout: 240 seconds 11:50 (join) masm 12:06 (join) anRch 12:14 (quit) noam: Read error: Connection reset by peer 12:14 (join) noam 12:23 (quit) anRch: Quit: anRch 12:31 (join) samth 12:32 (quit) kewne: Ping timeout: 240 seconds 12:35 (quit) Blkt: Quit: ERC Version 5.3 (IRC client for Emacs) 13:06 (quit) jeapostrophe: Ping timeout: 276 seconds 13:08 (join) Ipquarx 13:08 Ipquarx: hi 13:09 Ipquarx: I need help with the Racket program 13:09 Ipquarx: Whenever i use it, it's very laggy and slow. Is there a way to fix this? 13:11 Ipquarx: Hello? 13:12 Ipquarx: Ugh, I don't have time for this. 13:17 (quit) Ipquarx: Ping timeout: 265 seconds 13:18 (join) freakazoid 13:26 (join) yoklov1 13:49 (join) anRch 13:58 (join) Shvillr 14:05 (join) jonrafkind 14:14 (join) jeapostrophe 14:29 (join) mithos28 14:30 (quit) freakazoid: Quit: Computer has gone to sleep. 14:30 (quit) Hugglesworth: Quit: fe'o 14:33 (join) freakazoid 14:37 (quit) freakazoid: Client Quit 14:38 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/aP8BhA 14:38 RacketCommitBot: [racket/master] missed one place to rename contract-generate - Robby Findler 14:47 (join) freakazoid 14:52 (join) avarus 14:57 (quit) anRch: Quit: anRch 15:12 (quit) jeapostrophe: Ping timeout: 260 seconds 15:14 ozzloy: rudybot, (equal? #px"a" #px"a") 15:14 rudybot: ozzloy: your sandbox is ready 15:14 rudybot: ozzloy: ; Value: #f 15:15 jonrafkind: rofl 15:15 jonrafkind: rudybot, (equal? #rx"a" #rx"a") 15:15 rudybot: jonrafkind: your sandbox is ready 15:15 rudybot: jonrafkind: ; Value: #f 15:16 (quit) acarrico: Ping timeout: 252 seconds 15:17 ozzloy: jonrafkind, any idea how to check for regex equality? 15:17 jonrafkind: hm 15:17 ozzloy: i don't see anything obvious in the guide TOC 15:19 jonrafkind: yea thats too bad really 15:19 jonrafkind: maybe it can be added if you ask on the list 15:19 samth: rudybot: (object-name #px"a") 15:19 rudybot: samth: your racket/init sandbox is ready 15:19 rudybot: samth: ; Value: "a" 15:19 samth: rudybot: (object-name #rx"a") 15:19 rudybot: samth: ; Value: "a" 15:19 samth: ozzloy: you can use that 15:20 ozzloy: rudybot, (equal? (object-name #rx"a") (object-name #rx"a")) 15:20 rudybot: ozzloy: ; Value: #t 15:20 jonrafkind: could equal? be extended to work with regexes? 15:20 samth: jonrafkind: what would it mean? 15:21 samth: ozzloy: note that that method will equate some px and rx regular expressions that aren't the same 15:21 jonrafkind: cal object-name on the regex's and (equal?) on the result 15:21 ozzloy: the trivial interpretation of are the regexes exactly the same? 15:21 ozzloy: not whether they match exactly the same set and don't match exactly the same set 15:22 ozzloy: i take it this question has come up before and given due consideration 15:23 ozzloy: i could use pregexp? i guess 15:25 samth: at the moment, you should test that they're the same kind of regexp and that they have the same `object-name' 15:25 ozzloy: yeah, i'm going to do that. looking at docs for "object-name" right now 15:27 (join) jeapostrophe 15:30 RacketCommitBot: [racket] plt pushed 4 new commits to master: http://git.io/1665qA 15:30 RacketCommitBot: [racket/master] fix treatment of caps lock in keymap% - Matthew Flatt 15:30 RacketCommitBot: [racket/master] cocoa: make sure app wakes up on file event - Matthew Flatt 15:30 RacketCommitBot: [racket/master] racket/class: add `send/keyword-apply' - Matthew Flatt 15:32 ozzloy: would this be a users or dev question 15:39 samth: ozzloy: either way, really 15:48 (join) acarrico 16:15 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/nbYnmA 16:15 RacketCommitBot: [racket/master] contract random cleanup - Robby Findler 16:15 RacketCommitBot: [racket/master] add some debugging to see if I get more useful info for the module language test intermeittent failure - Robby Findler 16:43 (quit) jeapostrophe: Ping timeout: 258 seconds 16:45 (quit) freakazoid: Quit: Computer has gone to sleep. 16:52 mithos28: has the new version of planet made any progress or is it still in the planning stages? 16:52 jonrafkind: i havent heard anything about it 16:54 samth: still planning 16:55 samth: i think there are a number of things it's waiting on 16:55 samth: (a) matthew supporting facets/submodules/etc 16:55 samth: (b) a new packaging system 16:55 samth: then (c) planet 2.0 16:56 mithos28: ok, I just remember all these cool things from RacketCon and wanted to see how they actually worked 16:56 mithos28: but it looks like I'll still have to wait 16:57 mithos28: has the typed ffi made any progress? 16:57 jonrafkind: was that discussed at racketcon? 16:58 mithos28: no, sam had mentioned that he was working on something to me when I was trying to use the ffi in TR a month or two ago 16:59 ozzloy: is racketcon an annual thing? 16:59 jonrafkind: yea 16:59 mithos28: but there has only been the first annual one right? 16:59 jonrafkind: there was one last year but it was somewhat internal 16:59 mithos28: ah 17:00 jonrafkind: well 2 years ago there was a purely internal one, then last year there was one that was semi-internal (some outside people were invited) 17:01 mithos28: well that would explain why I didn't know about them 17:01 samth: i wouldn't even describe them as the same thing as racketcon 17:01 samth: but yes, we're doing racketcon again next year 17:02 samth: no, no progress on typed ffi -- i should get back to that 17:02 mithos28: will the videos from this year be out before then? 17:02 jonrafkind: thats a hot topic button 17:03 ozzloy: i'd like to go to the next one and i am only an 8 hour drive from where the last one was 17:04 ozzloy: http://www.youtube.com/user/nuACM/ mithos28 17:04 ozzloy: look for ones with matthias felleisen and other racketeers 17:05 ozzloy: i'm just guessing 17:06 mithos28: ozzloy: I don't see them. 17:06 ozzloy: http://www.youtube.com/watch?v=m3be1PHW5X0 17:06 mithos28: I don't think that one is from racketcon 17:07 samth: yeah, while that's a nice lecture, it's not from racketcon 17:07 ozzloy: maybe i guessed wrong. also that's the only one i can see 17:07 samth: i certainly plan for the videos to be up by then 17:07 mithos28: I was there, I was just teasing them that there have been many troubles getting them up 17:08 ozzloy: i'd like to see the data collected about teaching using HtDP 17:08 ozzloy: ah 17:08 mithos28: Is it going to be at Northeastern again in 2012? 17:08 ozzloy: i'd like to see them too 17:13 samth: mithos28: probably 17:32 (join) jao 17:43 (join) dnolen 17:57 (join) freakazoid 18:09 (quit) mithos28: Quit: mithos28 18:19 (quit) MayDaniel: Read error: Connection reset by peer 18:30 (quit) Qfriegel-: Ping timeout: 252 seconds 18:38 (quit) keenbug: Ping timeout: 260 seconds 18:51 (quit) epsil: Quit: WeeChat 0.3.5 19:02 (quit) jao: Ping timeout: 240 seconds 19:07 (join) realitygrill 19:27 (join) jao 19:41 (quit) avarus: Remote host closed the connection 19:43 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/IdoKAg 19:43 RacketCommitBot: [racket/master] add another printf for drdr's consumption - Robby Findler 19:50 (join) jeapostrophe 19:53 (quit) realitygrill: Quit: realitygrill 20:07 (quit) jeapostrophe: Ping timeout: 252 seconds 20:28 (join) malkomalko 20:29 (quit) karswell: Ping timeout: 260 seconds 20:31 (quit) masm: Quit: Leaving. 20:42 (quit) malkomalko: Remote host closed the connection 20:42 (join) malkomalko 20:49 (join) karswell 20:54 (quit) yoklov1: Quit: Leaving. 21:02 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/tVkwsA 21:02 RacketCommitBot: [racket/master] Arrows disappear immediately upon scroll; reduce scroll delay - Neil Toronto 21:02 RacketCommitBot: [racket/master] Moved some flonum stuff (e.g. flatan2, flnext, +max.0, +min.0, etc.) to unstable/flonum (will document in another commit) - Neil Toronto 21:02 RacketCommitBot: [racket/master] Fixed some tests - Neil Toronto 21:12 (nick) samth -> samth_away 21:22 (quit) freakazoid: Quit: Computer has gone to sleep. 21:45 (join) Pauan 21:51 (join) freakazoid 22:09 Pauan: Hey, uh, I'm not sure if this is the proper place to discuss this, but I've been working on an Arc compiler (written in Racket, of course), and I've run into a couple issues: 22:09 Pauan: --- 22:09 Pauan: 1) Modules don't allow for redefining global variables. In other words, if a module defines a global function "foo", then you can't redefine "foo" later on; you get the error "set!: cannot mutate module-required identifier in: foo". 22:09 Pauan: This is important because I want the Arc compiler to be in the Arc namespace, so that it's possible to hack the compiler from within Arc. 22:09 Pauan: I can, of course, write the compiler inside of Arc, but that's really verbose and clunky. It's also probably a bit slower. So I'd really like to be able to write the Arc compiler in Racket, and then "namespace-require" it into Arc's namespace. 22:09 Pauan: I tried setting the "compile-enforce-module-constants" parameter to #f before requiring the module, but that doesn't seem to help. I'm guessing this is something that requires changes on Racket's side, but I'd love to be proven wrong. 22:09 Pauan: --- 22:09 Pauan: 2) make-keyword-procedure doesn't work with inferred names. In other words, this function: 22:09 Pauan: (define foo (make-keyword-procedure (lambda ...))) 22:09 Pauan: Doesn't have the name "foo" like I want. And you can't use procedure-rename to change its name either, because that breaks the keyword functionality. 22:11 Pauan: Ah, procedure-rename not working with keyword procedures seems to be a bug in mzscheme 4... upgrading to Racket 5 seems to fix the problem. My first issue still seems to be there, though. 22:45 (quit) freakazoid: Quit: Computer has gone to sleep. 23:15 asumu: Pauan: Do you mean you want to set! a binding within a module? Because that's possible. 23:15 asumu: If you want to set! a binding in another module you are requiring, I'm not sure that's possible. 23:15 Pauan: yeah, that's what I figured 23:17 (join) freakazoid 23:17 (quit) malkomalko: Remote host closed the connection 23:18 asumu: Pauan: In particular, the docs for set! state " Racket's side, but I'd love to be proven wrong. 23:18 asumu: Whoops 23:18 asumu: "If id refers to an imported binding, a syntax error is reported." 23:18 asumu: (sorry on Windows and pasting in Cygwin is weird) 23:20 asumu: Pauan: Also see http://pre.racket-lang.org/docs/html/guide/module-set.html 23:21 Pauan: Yes, but it also says "compile-enforce-module-constants" can be used to mark the global variables as constant or not, which led me to believe that by setting it to #f, it would let me rebind module variables. That doesn't seem to be the case. 23:21 Pauan: I already saw that page, thanks. 23:22 Pauan: So unless there's a better way of doing things, I'd like some way to enable redefining global variables in a module, for instance by setting a parameter, with the implication that the compiler would then generate slower code. 23:22 Pauan: If that's too much work on the Racket side, then I'll just stick with what I have for now. 23:57 (join) tomku|two