01:50 (join) Bob__ 01:50 Bob__: hey everyone 02:06 Lajla: Hey Bob__. 02:11 (quit) stamourv`: Ping timeout: 265 seconds 02:18 Bob__: I was wondering if one of you could help me? 02:19 Bob__: with a particular question 02:21 Lajla: Bob__, spit it. 02:21 Lajla: As you know, I am the expert on all things related to giving answers that seem plausibly correct to newbies but are gravely incorrect to the trained eye. 02:21 Bob__: so I need to write a function to insert the missing decades into a list of decades 02:22 Bob__: basically it consumes three things: 02:22 Bob__: start decade, end decade, list of decades 02:22 Lajla: Ahh 02:23 Bob__: basically, if there are any decades in the list of decades that are missing in the period set by start decade - end decade 02:23 Bob__: you add them in 02:23 Lajla: And these decades are just integers? 02:23 Bob__: yes 02:23 Bob__: the restriction is 02:23 Lajla: Seems easy enough 02:23 Lajla: Ahh 02:23 Lajla: restriction 02:23 Bob__: I can only use these for recursion: http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-27.html#node_sec_21.2 02:23 Lajla: Ahhh 02:23 Bob__: so far, I've been able to create a predicate 02:23 Bob__: that will consume a decade and a list of decades 02:24 Bob__: and determine whether that decade is missing from the list 02:24 Bob__: but that's it 02:25 Lajla: Ehh, Bob__ one thing 02:25 Bob__: go on 02:25 Lajla: can you assume the original list is ordered? 02:25 Bob__: yes 02:25 Lajla: Like, from lower to upper decade? 02:25 Bob__: oh yeah 02:25 Bob__: forgot to mention 02:25 Bob__: that's very important 02:25 Lajla: Ahh, good. 02:25 Lajla: Yeah 02:25 Lajla: thought so 02:26 Bob__: oh yeah 02:27 Bob__: there was a hint given, which makes sense to me 02:27 Bob__: basically, it says to determine all the missing decades 02:27 Bob__: I assume that once you have the original list and the list of missing decades 02:27 Bob__: you can append them 02:27 Bob__: and then sort 02:28 Bob__: to get the completed list with all the decades correctly inserted 02:32 Lajla: Hmm 02:33 Lajla: that would be a very inefficent and borderline-imperative way to do it. 02:33 Lajla: I'm not quite sure of it either if I can only use those functions for recrusion. 02:33 Bob__: that's allright 02:43 (quit) jonrafkind: Ping timeout: 265 seconds 02:48 Bob__: wow holy crap 02:48 Bob__: I dunno what I just did 02:48 Bob__: but it worked 02:48 (join) hanDerPeder 03:06 (join) alexsuraci 03:37 (join) masm 03:43 (quit) Bob__: Ping timeout: 265 seconds 03:50 (join) lucian 04:04 (join) b4283 04:04 b4283: hi there 04:04 b4283: i have a question about the mzscheme shell 04:05 b4283: the arrow keys and libreadline keys doesn't work 04:06 b4283: there's just ^P ^[[A ^[[B, stuffs like this 04:18 lucian: b4283: try rlwrap 04:20 b4283: lucian: it worked, thanks so much 04:20 b4283: does this mean there's something wrong with my setup 04:20 lucian: b4283: you're welcome. it's a nice trick for broken consoles :) 04:20 lucian: b4283: no, there's something wrong with mzscheme. it doesn't use readline or an equivalent 04:21 b4283: i see 04:21 b4283: then it will be interesting to investigate this "rlwrap" tool 04:21 b4283: might gain some knowledge about linux system 04:21 b4283: :P 04:26 b4283: i see.. rlwrap simply faking the input for the user 04:51 (quit) offby1: Ping timeout: 245 seconds 05:02 (quit) Quetzalcoatl_: Ping timeout: 250 seconds 05:02 (join) Quetzalcoatl_ 05:05 lucian: b4283: yeah, it's a readline buffer 05:16 (quit) jao: Ping timeout: 240 seconds 05:38 (quit) Quetzalcoatl_: Ping timeout: 240 seconds 05:38 (join) mceier 05:48 (join) Quetzalcoatl_ 05:59 eli: b4283: http://docs.racket-lang.org/readline/ 05:59 eli: lucian: And this part explains why it's not on by default: http://docs.racket-lang.org/readline/index.html#%28part._.License_.Issues%29 05:59 rudybot: http://tinyurl.com/2cbsat7 06:05 (quit) Quetzalcoatl_: Ping timeout: 245 seconds 06:11 (join) b-man_ 06:27 (join) jao 06:28 lucian: eli: well, there are other implementations of readline 06:28 lucian: it's not even that complicated a library, it could be written in racket 06:30 eli: lucian: readline? not complicated? You're kidding, right? 06:30 lucian: eli: all of its features are complicated 06:30 eli: And re other implementations, the only one that I'm aware of is editline, which is incompatible with readline. 06:30 lucian: eli: but just a write buffer + history isn't all that hard 06:30 eli: Any kind of console interaction is insanely complicated, IME. 06:31 lucian: eli: depends how much you want to support 06:32 eli: I know of one project that was supposed to implmenet a readline thing in scheme, which didn't get anywhere. 06:32 lucian: eli: like http://newcenturycomputers.net/projects/readline.html 06:32 lucian: eli: and there's linenoise, which is rather small 06:32 lucian: not sure if it's still supported, though 06:33 (join) Quetzalcoatl_ 06:33 eli: (That page says "... on Windows" where there isn't such a problem to begin with.) 06:34 lucian: eli: https://github.com/antirez/linenoise 06:35 lucian: eli: i might just port linenoise to scheme to learn it better :) 06:37 lucian: eli: it'd be much better if racket shipped with a minimal readline, that you can replace with gnu readline if you need its features 06:40 eli: lucian: That code looks extremely naive, and all hard-wired. 06:41 lucian: eli: it is, both 06:41 lucian: but it works quite well in most cases 06:41 lucian: so it's a significant improvement over nothing 06:41 b4283: so i had to recompile racket with readline 06:42 eli: lucian: Racket is big enough that you can't get by with just a few random terminals that you happen to have around, 06:42 eli: but it's certainly a small piece of code and converting it to racket can make it even smaller -- 06:42 lucian: eli: yeah, that's what i meant 06:42 lucian: sure, it may not cover all cases 06:43 eli: if you do that then it would be nice to see if it's useful to everyone that needs it, and if so (given some time to use it), we can certainly switch. 06:43 eli: b4283: You don't need to recompile anything for readline to work. 06:44 b4283: ah 06:44 lucian: eli: yeah, sure. planet is great 06:44 eli: lucian: But doing this involves an intimidating maintenance -- the nightmarish kind where things fail for other people with no clue why or how. 06:44 b4283: i found the docs, thanks 06:44 lucian: eli: i'll have a look at porting it when i have time 06:45 lucian: eli: well, it can have a whitelist of platform&terminal combinations where it obviously works 06:45 eli: BTW, we also use readline's completion, and it also has paren matching etc. 06:45 lucian: eli: yeah, i know 06:45 lucian: readline's way better 06:45 lucian: but not even having history is silly 06:45 eli: ? 06:45 eli: It certainly does... 07:02 (join) neilv 07:27 (join) martinhex 07:44 (quit) Quetzalcoatl_: Ping timeout: 276 seconds 07:48 (join) Quetzalcoatl_ 07:49 (quit) mceier: Ping timeout: 255 seconds 07:51 (join) mceier 07:55 (join) dzhus 08:06 (quit) Quetzalcoatl_: Ping timeout: 264 seconds 08:12 (join) Quetzalcoatl_ 08:15 (quit) neilv: Quit: Leaving 08:17 (quit) masm: Quit: Leaving. 08:19 (join) MayDaniel 08:29 (quit) MayDaniel: 08:52 (quit) martinhex: Remote host closed the connection 08:54 (join) kevin01123 09:01 (quit) b-man_: Read error: Connection reset by peer 09:01 (part) kevin01123: "ERC Version 5.3 (IRC client for Emacs)" 09:21 (quit) alexsuraci: Read error: Connection reset by peer 09:23 (quit) hanDerPeder: Quit: hanDerPeder 09:27 (join) alexsuraci 09:28 (join) hanDerPeder 09:39 (join) kevin01123 09:40 kevin01123: If I wanted to compile racket version 5.0.2 from the git repo, would I just clone it and the issue a "git checkout v5.0.2" and compile it? 09:42 (join) b-man_ 10:07 (quit) kevin01123: Remote host closed the connection 10:21 (quit) rudybot: *.net *.split 10:21 (quit) Lajla: *.net *.split 10:21 (quit) Guest1821: *.net *.split 10:23 (quit) Ogion: Ping timeout: 276 seconds 10:24 (join) MayDaniel 10:24 (join) rudybot 10:24 (join) Lajla 10:24 (join) Guest1821 10:24 (join) Ogion 10:41 (join) rmitt__ 11:05 (quit) alexsuraci: Quit: Lost terminal 11:15 (quit) rmitt__: Ping timeout: 265 seconds 11:32 (quit) b4283: Ping timeout: 272 seconds 11:40 (join) anRch 11:55 (join) offby1 11:56 (quit) jao: Ping timeout: 240 seconds 11:56 (join) samth_ 11:57 (quit) samth_: Remote host closed the connection 11:58 (quit) b-man_: Remote host closed the connection 11:58 (join) alexsuraci 11:59 lucian: i can't find any tty libs for racket 12:00 (join) stamourv 12:01 offby1: it is often the case that one cannot find any X libs for Racket, for various values of X. 12:02 offby1: by "tty libs" to you mean "libraries that manipulate the cursor position, background color, etc of old-fashioned terminal emulators like 'xterm'"? 12:03 lucian: offby1: something like termios.h i guess 12:03 offby1: remember that Racket has a decent C FFI, so if there's a _c_ library that does what you want, then you'll be able to use it (in theory anyway) 12:03 lucian: offby1: yeah, that's what I'll probably have to do 12:03 lucian: i was hoping for something nicer 12:04 offby1: welcome to the world of minority languages :-| 12:04 lucian: offby1: it sucks, man :) 12:04 lucian is primarily a python guy 12:05 offby1: ooh 12:05 offby1: no batteries included here :) 12:05 lucian: offby1: so the racket homepage lies? :P 12:06 offby1: probably not 12:06 offby1: what are you looking at? 12:08 samth: offby1, he is refererring to this "Racket includes both batteries ..." on the home page 12:08 lucian: offby1: "Draw more pictures or build a web server from scratch. Racket includes both batteries and a programming environment, so get started!" 12:08 samth: lucian, Racket certainly comes with batteries, in the form of extensive libraries 12:08 (quit) MayDaniel: 12:09 offby1: lucian: ah, well, compared to other Scheme implementations, racket has lots of nice libraries. 12:09 samth: it doesn't happen to have one to bind to termio 12:09 offby1: But compared to, say, Python ... :-| 12:09 offby1: or C# or Java ... 12:09 offby1: lucian: so this is your chance to contribute! 12:10 lucian: yeah, i realise racket is one of the richer schemes 12:10 lucian: offby1: my goal was implementing something like linenoise https://github.com/antirez/linenoise/ 12:11 lucian: i was hoping there's a termios or similar binding bundled with racket, so that my racknoise would work out of the box 12:11 offby1: ha, antirez! 12:11 offby1 big redis fan 12:11 lucian: but if i have to bind to C, i might as well bind to linenoise directly 12:11 samth: then you'd have to ship linenoise 12:12 samth: also, there are some benefits from readline 12:12 samth: for example, it gives you tab-completion based on bound identifiers in Racket 12:14 samth: also, isn't there a bsd-licensed reimplementation of readline? 12:14 (quit) alexsuraci: Read error: Connection reset by peer 12:14 lucian: samth: i haven't found one that was maintained 12:14 lucian: linenoise is tiny by comparison, too 12:15 samth: ah, it's called editline 12:15 samth: Racket includes both batteries 12:15 samth: http://www.thrysoee.dk/editline/ 12:16 lucian: samth: libedit isn't compatible with readline afaik 12:19 samth: in what sense? 12:20 lucian: samth: different API, so it needs a binding 12:20 samth: ah 12:23 lucian: samth: so I was thinking porting linenoise to scheme would be a good exercise, since i'm new to scheme 12:24 samth: i agree 12:24 samth: it should be easy to write a binding to the necessary parts of termio 12:25 lucian: samth: i guess. i was hoping i wouldn't have to touch the ffi yet :) 12:25 samth: the ffi is really easy 12:26 (quit) Ogion: Ping timeout: 240 seconds 12:27 (join) Ogion 12:35 (quit) anRch: Quit: anRch 12:44 (join) asumu 12:45 (join) MayDaniel 12:46 (quit) tv|z: Ping timeout: 245 seconds 12:48 (join) tv|z 12:48 (join) jao 12:57 (join) alexsuraci 13:11 (join) jonrafkind 13:22 lucian: samth: apparently termios is always compiled statically, so the ffi can't use it unless i make a .so/.dylib 13:34 (join) rmitt__ 13:35 (quit) rmitt__: Client Quit 13:41 (quit) MayDaniel: 14:08 samth: lucian, that's strange 14:09 lucian: samth: there's no .so for termios, not so strange i guess 14:10 samth: i have /usr/lib/python2.6/lib-dynload/termios.so on my system, so some people do it 14:15 lucian: samth: that's python's binding 14:15 samth: ah, ok 14:17 lucian: samth: bah, terminals suck all around apparently 14:18 lucian: samth: so I can either make a C module for racket or a dummy .so for ffi to load 14:19 lucian: damn, this is harder than I'd have liked 14:19 lucian: i was hoping to learn some scheme, instead i'm fighting C ... 14:20 (join) _mo_ 14:22 (join) b-man_ 14:28 samth: lucian, it seems that languages just typically ship a termios.so with their bindings 14:43 (join) masm 14:54 (join) anRch 14:54 (quit) dzhus: Ping timeout: 255 seconds 14:55 (quit) masm: Quit: Leaving. 14:56 (join) masm 15:00 (join) MayDaniel 15:07 eli: termios.h looks like a kernel header, so it's not something to statically link, there's just not code to link to. 15:08 (quit) MayDaniel: Read error: Connection reset by peer 15:17 lucian: eli: depends on platform, it seems 15:17 eli: Even more fun then. 15:18 eli: (I get the feeling that this will not help you in having fun hacking...) 15:18 lucian: eli: it won't, indeed 15:19 lucian: eli: although it seems it is a kernel API on interesting platforms 15:21 lucian: eli: so how do I do system calls with the ffi? 15:23 eli: lucian: probably like other functions, but seriously -- if you're relatively new, it's not a good direction. 15:23 eli: (As much as I'd like to have an in-racket readline thin...) 15:40 clklein: Is disabling the stdout diff the only effect of the drdr:random prop? 15:42 (quit) anRch: Quit: anRch 15:42 samth: clklein, it also doesn't tell the committer when they "break" it 15:43 clklein: samth: Oh, we should decouple those. 15:44 samth: i think random failure and random output probably go together 15:44 clklein: Here's my situation. 15:44 clklein: I'm using random testing to compare the delimited continuations model to Racket. 15:44 (quit) asumu: Read error: Operation timed out 15:44 clklein: Sometimes a random program will segfault Racket. 15:45 lucian: eli: meh, I'd like to see how io works in a lisp 15:45 lucian: eli: i mean play with it 15:45 clklein: I could eval it in a separate Racket process and then notice the non-zero exit status, but it's easier to jsut print the program then run it in-process 15:46 clklein: (also much faster than starting new VMs) 15:46 eli: lucian: You're getting into an a awfully heavy case of "IO"... 15:46 lucian: eli: i can go back to simpler things if I can't dig myself out of it 15:46 lucian: eli: now I'm trying to figure out how to make system calls 15:46 lucian: (termios.h is kinda horrible) 15:46 clklein: samth: Nevermind, I get it teh connection now. 15:48 samth: clklein, you should print the random seed and make it take the seed as a command line argument 15:49 clklein: How is that better than printing the program? 15:49 samth: that's good to do too, but it's really easy to rerun if you provide a command line that always behaves that way 15:52 lucian: eli: well, I know how to do it in Python, easily 15:53 lucian: eli: and i can write scheme code decently. so i might as well try this 15:53 lucian: eli: but it seems system calls are beyond the ffi's capabilities 15:53 eli: lucian: Something like this: (get-ffi-obj 'puts #f (_fun _string -> _int)) 15:53 eli: ? 15:53 lucian: eli: hmm, i'll try 15:54 lucian: eli: it's not documented, though 15:54 eli: lucian: You'll need to (require ffi/unsafe) 15:54 lucian: eli: that's there 15:55 eli: And if you do that and then (help get-ffi-obj) on the repl you should see the documentation. 15:59 lucian: eli: heh, seems to work. I just called setuid 15:59 eli: ThereYoGo. 16:00 eli: If you have any experience with ctypes in python, the racket ffi stuff is similar, except that it's more advanced in how it deals with callbacks. 16:01 eli: And except that it's less advanced in the libffi stuff -- there's no array types and no unions. 16:01 eli: But samth is working on adding those. 16:01 samth: eli, ! 16:01 eli: He's also from canada. 16:01 samth: eli, the canadians are protesting 16:01 eli: :) 16:03 lucian: eli: and not having termios.h will be kinda horrible 16:03 lucian: bah 16:03 samth: lucian, check out http://planet.racket-lang.org/display.ss?package=c.plt&owner=dherman 16:04 eli: I think that Jay's thing was similar but better, no? 16:04 samth: eli, i think it's rather different 16:05 samth: jay' 16:05 samth: jay's package just runs a c program 16:05 samth: dave's is for ffi generation 16:06 lucian: samth: ah, looks nice. thanks 16:06 eli: Well, IIRC, Dave's code creates a C stub file to runs once and get the information, 16:06 eli: wheras Jay's just allows any random C code, 16:07 samth: yes 16:07 eli: So there's not that much difference -- and if you're getting down to C you can just as well write some simple code that is easier on the glue side. 16:08 lucian: eli: yeah, if I write any C, i'll write a wrapper for termios.h 16:09 eli: lucian: Yeah, it (the other package I'm talking about) *might* be a saner approach for you if you do such a low-level library. 16:09 (quit) askhader: Quit: leaving 16:09 lucian: eli: do you have a name/link? 16:09 (join) askhader 16:09 eli: For example, it sounded like some "functions" are actually going to be macros in some platforms, and some obscure __functions on others. 16:10 samth: i think they always have to be function prototypes, or at least that's what the man page says 16:10 lucian: eli: oh yeah, that's such a horrible feature of C 16:10 eli: lucian: So if samth is right and there's always function prototypes, and they're relatively easy to interface, then you can go with that. 16:11 lucian: eli: yeah, but I'm not sure that's true. i guess I can test it after 16:12 eli: Even if the interface is complicated -- for example, if it makes you run down obscure chains of pointers or whatever horrible things you can do in C -- in this case the C-wrapper approach can be overall easier. 16:12 eli: For example, you write some C code that deals with such a mess then exposes some simple int->int interface, and that's extremely simple on the racket side. 16:12 eli: In any case, that oter package is: http://planet.racket-lang.org/display.ss?package=superc.plt&owner=jaymccarthy 16:12 rudybot: http://tinyurl.com/2g4hoy3 16:15 lucian: eli: yeah, but ideally i'd not have any C code 16:15 lucian: i'll see 16:15 lucian: eli: oh, superC only works on osx 16:16 eli: It is? That's a surprise. 16:17 lucian: eli: so I guess what i'd like is something that can parse termios.h and spit out some gen-ffi-obj 16:18 eli: lucian: That passage on the documentation is probably an attempt to say that on OSX it requires the developer tools. 16:18 eli: I'd be very surprised if it doesn't work on linux or any other system with a well behaved C compiler. 16:18 eli: (Even windows should be mostly fine.) 16:19 lucian: eli: hmm, now that I've re-read it I agree 16:19 eli: You should bug him (Jay) about that confusing bit. 16:20 eli disappears 16:21 lucian: eli: samth: this looks like what I want http://planet.racket-lang.org/package-source/dherman/c.plt/3/2/planet-docs/c/header.html 16:21 rudybot: http://tinyurl.com/33lm6cw 16:21 samth: lucian, yes, that's exactly what i was thinking of 16:26 (quit) lucian: Remote host closed the connection 16:27 (join) lucian 16:35 (join) timmcd 16:35 timmcd: hello 16:35 timmcd: I am using some of the OO/class features, and I was wondering if there were any sort of shortcuts for field and method access on objects? 16:36 timmcd: Ie, (my-object field-or-method-to-access), vs. (get-field field my-object) 16:39 (part) timmcd 16:40 (nick) samth -> samth_tofurkey 16:41 (quit) samth_tofurkey: Quit: Ex-Chat 16:44 (quit) lisppaste: Ping timeout: 240 seconds 16:44 (join) stevwonder 16:46 stevwonder: hey, can anyone help me with racket on linux? 16:47 (quit) stevwonder: Client Quit 16:58 (quit) lucian: Remote host closed the connection 17:00 (quit) b-man_: Ping timeout: 252 seconds 17:03 (quit) _mo_: Quit: Leaving 17:30 bremner: stevwonder: you'll have better luck asking a specific question. It sometimes takes a while for answers in this channel. 17:34 askhader: Did they d/c? 17:34 (quit) hanDerPeder: Quit: hanDerPeder 17:35 bremner: dunno, they tab completed. 17:35 bremner: hmm. irssi completion seems not so good at noticing people disconnect. 17:36 bremner: blame the tools, that's my motto. 17:40 askhader: Well i've rigged my irc client to filter out parts and joins for this particular channel, so tab completion is all I have to determine if someone is around short of actually doing a /name 17:54 (quit) mceier: Quit: Lost terminal 17:56 (join) mceier 18:10 (quit) mceier: Quit: leaving 19:00 (quit) Quetzalcoatl_: Ping timeout: 245 seconds 19:28 (join) b-man_ 19:39 (quit) jonrafkind: Ping timeout: 255 seconds 19:55 (join) lisppaste 20:22 (quit) b-man_: Ping timeout: 260 seconds 20:40 (join) Quetzalcoatl_ 21:06 (quit) Quetzalcoatl_: Ping timeout: 252 seconds 21:25 (part) masm 21:33 (quit) mapcadr_: Ping timeout: 272 seconds 21:38 (join) mapcadr 21:55 (join) Quetzalcoatl_