00:44 (part) neilv: "Leaving" 01:53 (join) writer_ 01:55 (quit) rbarraud: Ping timeout: 252 seconds 01:55 (quit) writer: Disconnected by services 01:55 (nick) writer_ -> writer 01:55 (quit) writer: Changing host 01:55 (join) writer 02:06 (quit) jonrafkind: Ping timeout: 255 seconds 03:51 (quit) mao_: Quit: leaving 03:59 (join) masm 04:46 (join) firatcan 04:51 (join) spidermario 04:51 (quit) writer: Quit: writer 06:44 (join) MayDaniel 06:44 (join) MayDaniel_ 06:45 (quit) MayDaniel_: Client Quit 08:02 (join) hanDerPeder 08:21 (quit) firatcan: Quit: firatcan 08:22 (join) firatcan 08:25 (join) mceier 08:26 (quit) firatcan: Ping timeout: 265 seconds 09:05 (join) jao 09:41 (join) anRch 09:42 (join) writer 10:02 (quit) masm: Ping timeout: 265 seconds 10:16 (join) masm 10:43 (join) confounds 10:46 (quit) Lajla: Ping timeout: 264 seconds 11:05 (quit) hanDerPeder: Ping timeout: 276 seconds 11:07 (join) hanDerPeder 11:11 (quit) masm: Read error: Operation timed out 11:13 (join) masm 11:17 (quit) anRch: Quit: anRch 11:30 (quit) spidermario: Remote host closed the connection 11:33 (quit) masm: Ping timeout: 265 seconds 11:34 (join) masm 11:45 (quit) masm: Ping timeout: 252 seconds 11:45 (join) masm 11:46 (join) Lajla 11:47 (join) firatcan 11:48 (quit) firatcan: Client Quit 12:10 (quit) masm: Ping timeout: 240 seconds 12:12 (join) masm 12:30 (join) MayDaniel_ 12:30 (join) hugbug 12:30 hugbug: hi peeps 12:31 hugbug: i need help with dr. racket 12:31 hugbug: anyone can help? 12:31 (quit) MayDaniel: Ping timeout: 240 seconds 12:32 hugbug: hellooooooooooo 12:38 confounds: hugbug: all quiet on the western front 12:38 (join) jonrafkind 12:42 offby1: hugbug: weren't you in the first scene of "Pulp Fiction", with Tim Roth? 13:04 hugbug: no 13:04 hugbug: very funny 13:05 bremner: hugbug: learn IRC in 10 easy lessons. Lesson 1. IRC is asynchronous. Ask your question, and wait for an answer. 13:06 hugbug: In August 2010, the University of Waterloo hosted the International Olympiad in Informatics (http://www.ioi2010.org). Every contestant, leader, and guest was given a bag of swag items when they arrived. The bags were assembled in the Math building and later transported to Village 1. The packing room had large, medium, and small boxes that could hold 10, 8, or 6 of the bags respectively for transportation. 13:06 hugbug: Write a function called total-boxes that will determine the total number of boxes used to transport the bags. The function will consume the total number of bags needing to be transported, the number of large boxes, the number of medium boxes, and the number of small boxes. You should use up the boxes that hold 10 first, then if necessary use boxes that hold 8, then if necessary use boxes that hold 6 bags 13:06 hugbug: Note that you may not need to use any boxes holding 8 or 6 bags, and it is possible that the final box used is not filled to capacity. You may assume that there are at least enough boxes available to transport all of the bags. 13:06 bremner: Lesson 2, people are wary of doing your homework for you. 13:07 hugbug: For example (total-boxes 1000 50 50 50) will produce 117. The built‐in functions min, max, and/or ceiling may be useful. 13:07 hugbug: i'm not asking you to do my homework 13:07 hugbug: i am asking for assistance in understanding the problem and coding the solution 13:07 bremner: Lesson 3. for more than a few lines of text, consider a pastebin site, or a link 13:08 hugbug: again, bremner, i'm not the greatest in programming. i'm new to this and require help 13:09 offby1: hugbug: try asking a question :) 13:09 hugbug: offby1, what is the math behind this question? 13:10 offby1: hell if I know. 13:10 hugbug: then your useless 13:10 offby1: for this particular problem, indeed. 13:10 offby1: thank you for pointing that out, though; sometimes I get too full of myself, y'know? 13:10 hugbug: haha 13:11 offby1: I have the vague sense that I'd fill up all the largest boxes first, then move to smaller ones. 13:11 hugbug: i know that but how would you begin to code this 13:11 offby1: I also suspect that once you hand in this assignment, the teacher will turn around and say "OK, now do the same assignment again, except this time there are five sizes of box, holding 12, 10, 9, 7, and 3 bags respectively" 13:11 bremner leaves before he learns that he too is useless 13:12 offby1: I think you could get away with simple integer division. 13:12 offby1: in fact it sounds very much like converting an integer to a sequence of digits. 13:12 hugbug: i can use the ceiling function to round 13:12 offby1: are you forced to use some generic scheme with no interesting libraries? 13:13 offby1: If not, I'd use racket's quotient/remainder function or whatever it's called. 13:13 offby1: rudybot: quotient/remainder 13:13 rudybot: *offby1: eval (quotient/remainder (/ 120 17) (/ 18 7)) ; foo 13:13 offby1: eval (quotient/remainder (/ 120 17) (/ 18 7)) 13:13 offby1: rudybot: eval (quotient/remainder (/ 120 17) (/ 18 7)) 13:13 rudybot: *offby1: error: quotient/remainder: expects type as 1st argument, given: 120/17; other arguments were: 18/7 13:13 offby1: rudybot: eval (quotient/remainder 120 17) 13:13 rudybot: *offby1: ; Value: 7 13:13 rudybot: *offby1: ; Value#2: 1 13:13 offby1: slick 13:14 hugbug: what did you and rubybot just do? 13:14 offby1: hugbug: he'll evaluate racket code if you put "rudybot: eval" in front of it 13:14 offby1: given 193 bags, how many of the 10-bag boxes can you completely fill? (hint: the answer is 19) 13:15 offby1: given 3 bags, how many of the 8-bag boxes can you completely fill? (hint: the answer is "none") 13:15 offby1: given those same 3 bags, how many of the 6-bag boxes can you completely fill? (hint: the answer is again "none", but you can half-fill one of them) 13:15 offby1: I think that's the general idea 13:16 offby1: it's basically long division. 13:16 hugbug: mhmm 13:16 hugbug: i get what your saying 13:24 (quit) masm: Ping timeout: 240 seconds 13:25 (quit) hugbug: Quit: Page closed 13:27 (join) masm 13:28 (join) hanDerPeder_ 13:29 (quit) hanDerPeder: Ping timeout: 250 seconds 13:29 (nick) hanDerPeder_ -> hanDerPeder 13:36 (quit) masm: Ping timeout: 255 seconds 13:44 (quit) jonrafkind: Ping timeout: 252 seconds 13:44 (join) lisppaste 13:51 (join) masm 14:53 (quit) MayDaniel_: 15:01 (quit) writer: Ping timeout: 252 seconds 15:06 (join) b-man_ 15:09 (join) writer 15:38 (quit) writer: Quit: writer 15:46 (join) ahc_ 15:46 (quit) confounds: Remote host closed the connection 15:48 ahc_: is there a way to do async IO with racket? do any of the std libs have support for that? 15:54 offby1: pretty sure there must be 15:54 offby1: ... although I can't think of any specifics 15:54 offby1: hm, the word "asynchronous" only appears once in the index, in some other context. 15:57 eli: ahc_: Yes, and in probably every style you prefer. 15:58 eli: There are functions that read as much of the input as possible, so you can do polling, and you can also use the normal functions inside a thread, so it blocks until it has enough input while the rest is running. And there's also CML-style events that could be used on top of all of this. 16:02 ahc_: ah, right. thanks. 16:03 ahc_: do you see any problem in working through all the stuff in The Little Schemer with racket? 16:04 ahc_: language-feature-wise 16:05 offby1: there will probably be minor quirks that you'll have to accommodate. 16:05 offby1: Perhaps The Little Schemer assumes that conses are mutable, e.g. 16:05 offby1: in that case you might want to use one of the "legacy" languages 16:11 ahc_: ok, that doesn't sound bad 16:29 (join) firatcan 16:30 (quit) firatcan: Client Quit 16:33 offby1: I suspect it'll be tolerable. 16:39 (quit) mceier: Quit: leaving 17:17 (quit) hanDerPeder: Read error: No route to host 17:18 (join) hanDerPeder 17:30 (join) rbarraud 17:33 (quit) hanDerPeder: Ping timeout: 276 seconds 17:37 (join) tommc 17:49 (join) jonrafkind 17:51 (quit) tommc: Ping timeout: 265 seconds 18:01 (join) hanDerPeder 18:19 (quit) rbarraud: Ping timeout: 240 seconds 18:25 (join) rbarraud 18:34 (quit) hanDerPeder: Quit: hanDerPeder 18:40 (quit) rbarraud: Read error: Connection reset by peer 18:41 (join) rbarraud 18:44 (join) kingless 18:46 (quit) rbarraud: Excess Flood 18:49 (join) offby1` 18:50 (join) rudybot_ 18:51 (quit) rudybot: Ping timeout: 240 seconds 18:51 (quit) chandler: Ping timeout: 240 seconds 18:51 (quit) offby1: Ping timeout: 240 seconds 18:52 (join) chandler 18:52 (nick) chandler -> Guest43380 18:53 (quit) kingless: Quit: Colloquy for iPad - http://colloquy.mobi 18:55 (join) hanDerPeder 19:19 (quit) Guest43380: Changing host 19:19 (join) Guest43380 19:20 (join) neilv 19:20 (nick) offby1` -> offby1 19:20 (quit) offby1: Changing host 19:20 (join) offby1 19:21 (nick) Guest43380 -> chandler 19:47 (quit) b-man_: Ping timeout: 265 seconds 19:57 (join) rbarraud 20:01 (join) offby1` 20:03 (quit) offby1: Disconnected by services 20:03 (nick) offby1` -> offby1 20:03 (quit) offby1: Changing host 20:03 (join) offby1 20:12 (join) dherman 20:13 dherman: I'm having trouble getting stack traces in DrRacket 5.0.1 20:13 dherman: anyone available to help me out? 20:13 (quit) rbarraud: Quit: Konversation terminated! 20:13 (join) rbarraud 20:13 jonrafkind: turn off debugging in the preferences 20:13 jonrafkind: for some reason that helps 20:13 dherman: jonrafkind: turn it *off*? 20:13 jonrafkind: yea 20:13 dherman: weird 20:14 (quit) rudybot_: Remote host closed the connection 20:17 (join) rudybot 20:19 (quit) rudybot: Remote host closed the connection 20:19 (join) rudybot 20:33 (quit) hanDerPeder: Quit: hanDerPeder 20:35 (join) hanDerPeder 20:36 (quit) hanDerPeder: Client Quit 20:39 (join) hanDerPeder 20:44 (quit) dherman: Quit: dherman 20:46 (quit) rbarraud: Ping timeout: 272 seconds 20:49 (join) Publius 20:50 Publius: anyone here?? 21:00 jonrafkind: no 21:00 jonrafkind: everyone is here is a robot 21:14 (quit) hanDerPeder: Quit: hanDerPeder 21:21 Publius: I am getting started with Racket. I don't get the teachpacks?? 21:24 (quit) Publius: Quit: Ex-Chat 21:36 (quit) masm: Quit: Leaving. 22:09 (join) Parkotron 22:24 Parkotron: In the racket interpreter, how can I tell if a call to "load" succeeds? 22:26 neilv: i believe you can catch the exception 22:27 Parkotron: neilv: As someone just starting with Lisp today, that seems a bit over my head. :) 22:27 neilv: also, unless you're sure you want to use "load", you probably want to use something else 22:28 neilv: Parkotron: are you trying to code something, or trying to learn? 22:28 Parkotron: neilv: That's probably the case. I have some definitions in a file and I'd like to load them into the interpreter to play with. 22:28 Parkotron: neilv: Learn. 22:28 neilv: ok, you probably want to use modules and "require" 22:29 neilv: and for learning, try working your way through htdp, the racket guide, or some intro to scheme book 22:29 jonrafkind: that would force him to use provide and all that stuff, load is probably easier for fooling around 22:29 Parkotron: neilv: I'm restricted to R5RS, so modules aren't an option, right? 22:29 Parkotron: This is homework. 22:30 neilv: ah 22:30 neilv: yes, you can use "load" in r5rs. but you can't catch exceptions in it 22:31 Parkotron: I just want to figure out why, after calling (load "mystuff.scm") none of the identifiers are in scope. 22:31 neilv: are you using drracket? 22:32 Parkotron: neilv: No. I have no X11. I'm using the racket executable. 22:32 Parkotron: neilv: I've played with DrRacket before, though. 22:35 neilv: you're in the repl, and you enter (load "mystuff.scm") and then you get another ">" prompt, and you enter one of the identifiers, and it says undefined? 22:35 Parkotron: neilv: That's exactly it. 22:35 neilv: you don't get an error message right after the "load"? 22:35 Parkotron: Nope. 22:36 neilv: maybe there's something funny with mystuff.scm 22:36 Parkotron: neilv: Could be. It's just a half dozen function definitions. 22:38 neilv: why not make a simple test file that contains one line and try that. like: (define x 42) 22:39 Parkotron: neilv: Okay, that works. 22:40 Parkotron: Okay, it turns out I had to remove the #lang r5rs line. 22:41 neilv: yeah, that would do it 22:41 Parkotron: neilv: Does the racket repl only support the Racket language? 22:42 neilv: didn't used to. let me double-check 22:42 neilv: racket -il r5rs 22:42 neilv: try that 22:42 Parkotron: neilv: The man page is a little brief. :) 22:43 neilv: er, wait 22:44 neilv: yeah, that should work 22:44 neilv: are you running it inside of emacs, or just from terminal window? 22:45 Parkotron: neilv: Separate terminal. 22:45 neilv: if you're familiar with emacs, you can use emacs in the terminal, which will make things much easier 22:46 neilv: but if you're comfortable with the terminal, and are in a hurry, that will work too 22:46 neilv: racket -ill r5rs readline 22:47 Parkotron: neilv: Thanks a lot! 22:47 neilv: in a terminal, readline will let you do things like use up-arrow to recall earlier commands 22:47 Parkotron: Yeah, I've been missing that. ;) 22:47 Parkotron: Is there a way to clear all definitions from a running repl? 22:48 Parkotron: Or does load do that automatically? 22:48 neilv: assume that you can't clear anything 22:49 Parkotron: neilv: I can live with that. Thanks. 22:50 neilv: try to get use of drracket somehow. it runs on most computers made in the last several years 22:50 neilv: you can do simple assignments with just the repl, but you're missing out on lots of goodness 22:52 Parkotron: Nah, I think I'm fine now. I have vim and screen setup so I can quickly copy stuff from vim to the repl. 22:52 Parkotron: Hmm. r5rs mode makes list values a hard to read jumble of mcons. 22:54 neilv: hold on 23:00 neilv: (#%require (only scheme/base print-mpair-curly-braces print-as-expression)) 23:00 neilv: (print-as-expression #f) 23:00 neilv: (print-mpair-curly-braces #f) 23:25 (join) dherman