00:00 (quit) jrslepak: Ping timeout: 260 seconds 00:01 offby1: the docs should tell you which languages have it. 00:01 ben_: and is it possible to assign images values, for example if i have a set of cards and I want to say your hand adds to 10 or yours adds to 35 00:01 (quit) SeanTAllen: Ping timeout: 240 seconds 00:06 offby1: sure 00:06 offby1: well. 00:06 offby1: You can't modify the image itself, by sticking a value into it. 00:06 offby1: But you could make something that contains both an image and your value, and use that. 00:07 offby1: that's a typical use of "structs". 00:07 offby1: You could also use a cons or a vector or a list 00:08 offby1: rudybot: (struct image-and-value (im val)) 00:08 rudybot: offby1: Done. 00:08 offby1: rudybot: (define i (image-and-value 'pretend-im-an-image 10)) 00:08 rudybot: offby1: Done. 00:08 offby1: rudybot: (image-and-value-im i) 00:08 rudybot: offby1: ; Value: pretend-im-an-image 00:08 offby1: rudybot: (image-and-value-value i) 00:08 rudybot: offby1: error: reference to an identifier before its definition: image-and-value-value in module: 'program 00:09 offby1: rudybot: (image-and-value-val i) 00:09 rudybot: offby1: ; Value: 10 00:13 (quit) em: Ping timeout: 240 seconds 00:13 ben_: so it would be something like (define Ace1 (image-and-value *image* 11) 00:13 (join) SeanTAllen 00:14 jonrafkind: ben_, where did you learn to put *'s around your constant names? 00:15 offby1: ben_: yep 00:15 offby1: you could also keep them separate -- have, say, a vector of images; the index of the vector would be the card's value. 00:15 (join) em 00:16 ben_: jonrafkind I was just trying to show that in my racket window I would have an image there if that makes sense 00:16 jonrafkind: ah 00:19 ben_: image-and-value is defined right? 00:19 offby1: if you first say (struct image-and-value (something or other)) 00:19 offby1: Try It And Seeā„¢. 00:19 offby1: rudybot speaks scheme. 00:20 offby1: rudybot: init lang/htdp-beginner 00:20 rudybot: offby1: your lang/htdp-beginner sandbox is ready 00:21 offby1: rudybot: (cons 3 4) 00:21 rudybot: offby1: error: cons: second argument must be a list, but received 3 and 4 00:21 offby1: ha, slick 00:21 offby1: rudybot: (cons 3 (cons 4 empty)) 00:21 rudybot: offby1: ; Value: (3 4) 00:21 offby1: rudybot: (first 'wut) 00:21 rudybot: offby1: error: first: expected argument of type ; given 'wut 00:21 offby1: rudybot: (first ' (stuff and nonsense)) 00:21 rudybot: offby1: error: #:1:7: quote: expected the name of the symbol after the quote, but found a part in: (quote (stuff and nonsense)) 00:21 offby1: rudybot: (first (list 'stuff 'and 'nonsense)) 00:21 rudybot: offby1: ; Value: stuff 00:24 ben_: hmm ok 00:28 ben_: so i need to use first and stuff 00:31 (join) jrslepak 00:31 (quit) ivan`: Ping timeout: 252 seconds 00:32 offby1: I dunno. 00:32 offby1: I'd be surprised if you didn't need it, but there's no law that says you do. 00:33 (join) tcard 00:37 (part) tcard 00:38 ben_: offby1 thanks for your help I'm going to go 00:40 (quit) eMBee: Ping timeout: 240 seconds 00:43 (quit) jeapostrophe: Ping timeout: 248 seconds 00:43 (join) new-racketeer 00:44 new-racketeer: Hi guys! Does someone use drracket on Linux? 00:44 offby1: nah 00:44 (join) eMBee 00:45 (quit) ben_: Quit: Page closed 00:52 jrslepak: new-racketeer: having trouble with it? 00:53 new-racketeer: jrslepak: highlighting :\ 00:56 jrslepak just uses the check-syntax feature 01:00 (join) gciolli 01:00 (quit) jrslepak: Quit: Leaving 01:11 (quit) rsimoes: Ping timeout: 255 seconds 01:17 (quit) gciolli: Ping timeout: 255 seconds 01:26 (join) rsimoes 01:28 (quit) kudkudyak: Quit: Leaving. 01:32 (quit) realitygrill: Quit: realitygrill 01:32 (quit) new-racketeer: Quit: Page closed 01:32 (quit) yoklov: Quit: computer sleeping 01:45 (quit) dnolen: Remote host closed the connection 02:03 (join) jeapostrophe 02:22 (quit) jeapostrophe: Ping timeout: 245 seconds 02:40 (quit) mithos28: Quit: mithos28 02:46 (quit) jonrafkind: Ping timeout: 255 seconds 02:59 (quit) jyc: Remote host closed the connection 03:01 (join) bluezenix 03:07 (join) sindoc 03:09 (quit) bluezenix: Ping timeout: 244 seconds 03:19 (quit) acarrico: *.net *.split 03:19 (quit) Twey: *.net *.split 03:19 (quit) ozzloy: *.net *.split 03:19 (quit) mattmight: *.net *.split 03:19 (quit) kandinski: *.net *.split 03:20 (join) kandinski 03:20 (join) ozzloy 03:21 (join) Twey 03:23 (join) mattmight 03:24 (join) acarrico 03:34 (join) Blkt 03:38 Blkt: good day everyone 03:42 (quit) DGASAU: Remote host closed the connection 03:43 (nick) chaozzbubi -> ChaozZBubi 03:48 (join) ahinki 03:51 (join) Shvillr_ 03:51 (quit) Shviller: Disconnected by services 03:51 (nick) Shvillr_ -> Shviller 03:52 (nick) ChaozZBubi -> chaozzbubi 04:02 (join) bluezenix 04:04 (join) bluezenix1 04:06 (quit) bluezenix: Ping timeout: 240 seconds 04:08 (quit) sindoc: Quit: Leaving. 05:02 (join) masm 05:19 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/0imIcg 05:19 RacketCommitBot: [racket/master] `sort' now infers properly -- test passes. - Sam Tobin-Hochstadt 05:34 (join) q0tw4 05:46 (join) ahinki_ 05:48 (quit) ahinki: Ping timeout: 245 seconds 05:48 (nick) ahinki_ -> ahinki 05:49 (join) ahinki_ 05:50 (quit) ahinki_: Client Quit 05:50 (join) ahinki_ 05:52 (quit) ahinki: Ping timeout: 245 seconds 05:55 (quit) ahinki_: Ping timeout: 245 seconds 05:56 (join) ivan` 06:13 (join) ahinki 06:13 (join) noelw 06:13 (quit) noelw: Quit: noelw 06:14 (join) noelw 06:21 (nick) chaozzbubi -> ChaozZBubi 06:35 (quit) stchang: Read error: Operation timed out 06:39 (join) stchang 06:40 (join) sindoc 06:57 (quit) m4burns: Ping timeout: 252 seconds 06:58 (join) m4burns 07:08 (join) DGASAU 07:15 (join) mceier 07:23 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/AZa8xg 07:23 RacketCommitBot: [racket/master] Include the platform in the windows installer's "human name". - Eli Barzilay 07:28 eli: offby1: You could submit a bug report about our lack of environment variable utilities -- like listing them, removing some, or modifying some in a parameterize-style (which is what you get in elisp, and is very convenient). 07:35 (join) dnolen 07:37 (join) sf17k 07:41 (quit) dspt: Ping timeout: 240 seconds 07:41 (join) dspt 07:41 sf17k: hey all, I've been working with bitmap% as an intermediary to save and load png files for basically image editing 07:42 sf17k: I'd like support for monochrome bitmaps but bitmap% only provides get-argb-pixels and set-argb-pixels so I can't seem to access the data 07:43 sf17k: is there another easy way to save/load pngs? 07:45 (join) veer_ 07:45 (quit) veer: Read error: Connection reset by peer 07:52 AlbireoX: ?? 08:04 veer_: To free foreign pointer by foreign-free(fn in foreign lib), is this correct way to declare new-type? 08:04 veer_: (define new-type (make-ctype _pointer #f (lambda (x) (printf "free\n") (register-finalizer x foreign-free)))) 08:05 veer_: oh! x is returned in (lambda (x) ...) 08:15 (join) yoklov 08:16 (quit) yoklov: Client Quit 08:20 (quit) dous: Remote host closed the connection 08:21 (join) dous 08:33 veer_: sorry the above code is wrong , just ignore for now. 08:51 Gertm: What's a good way to check if a port is closed or catch the moment when the port closes? 08:51 Gertm: I'm browsing through the docs but I can't seem to find a good starting point for this. 08:53 (quit) karswell: Ping timeout: 240 seconds 08:53 (join) karswell 08:59 noelw: "For any kind of port, after it is closed, attempting to read from or write to the port raises exn:fail." 09:00 noelw: You can sync on almost any port event, but not apparently when it is closed 09:01 noelw: HTH 09:03 (join) jeapostrophe 09:07 Gertm: noelw: strange thing though, I had a network failure but my port I had open to a host on the inet never raised that exception. 09:07 Gertm: Or do I need to explicitly catch it? 09:08 noelw: Shouldn't need to explicitly catch it 09:08 noelw: but maybe the error never reached Racket? 09:08 Gertm: Well my code didn't crash, it just sat there waiting. 09:08 noelw: Might be buffering or something in the way that masked the error if it was short 09:08 (join) yoklov 09:08 Gertm: Not sure how long it was.. could be half an hour or something. 09:24 noelw: Sorry, I don't know the inner workings 09:24 Gertm: I'll dig a little deeper into the docs. Thanks for your help. 09:26 veer_: haha and sobsob, after spending many hours to see printf message to 09:26 veer_: check if finalizer was freeing the memory , it turnout that message was 09:26 veer_: printed in linux console instead of repl, hidden from the view 09:27 (join) Blkt` 09:27 (quit) Blkt`: Remote host closed the connection 09:29 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/EHNeMQ 09:29 RacketCommitBot: [racket/master] fix some typos in a comment - Robby Findler 09:43 (quit) jeapostrophe: Ping timeout: 276 seconds 10:21 scyrmion: How do you do default parameters? I read that you use [varname 'value], but I can't get this to work. 10:21 scyrmion: rudybot: (define (func [varname 1]) (display varname)) 10:21 rudybot: scyrmion: your sandbox is ready 10:21 rudybot: scyrmion: Done. 10:21 scyrmion: what? 10:22 scyrmion: rudybot: (func) 10:22 rudybot: scyrmion: ; stdout: "1" 10:22 noelw: Works for me. 10:22 scyrmion: on my computer I got lambda~: not an identifier in: (param 1) 10:22 noelw: Maybe your #lang is wrong? 10:22 scyrmion: I'm using swindle-full 10:22 noelw: Ok, you have probably defined a curried function by accident 10:23 noelw: o.O 10:23 scyrmion: what is that? 10:23 noelw: My eyes buggin' out 10:23 noelw: I don't think swindle is actively maintained these days 10:23 noelw: though I could be wrong 10:23 noelw: If you're using Swindle, I don't know the answer 10:24 noelw: Sorry. 10:25 noelw: Just note that the Swindle language is not the same as the Racket language, so make sure you're reading the right docs 10:25 scyrmion: ok, thanks. 10:28 scyrmion: alright. swindle requires "&optional" before the [varname 'value 10:28 scyrmion: pair 10:33 (join) jrslepak 10:45 (quit) yoklov: Quit: computer sleeping 10:45 (quit) ahinki: Quit: ChatZilla 0.9.88 [Firefox 10.0/20120118081945] 10:46 (join) realitygrill 10:47 (quit) dnolen: Ping timeout: 248 seconds 10:50 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/_NCFIA 10:50 RacketCommitBot: [racket/master] Typed Racket HISTORY for 5.2.1. - Sam Tobin-Hochstadt 10:52 (join) yoklov 11:00 (join) sd 11:02 (quit) yoklov: Quit: bye! 11:06 (quit) sd: Quit: Page closed 11:18 (join) jeapostrophe 11:22 (quit) DGASAU: Read error: Connection reset by peer 11:29 (join) anRch 11:38 (quit) bluezenix1: Quit: Leaving. 11:39 (join) bill_h 11:44 (quit) bill_h: Quit: leaving 11:46 (quit) veer_: Quit: Leaving 11:47 (join) bill_h 11:47 (quit) sf17k: Quit: Page closed 11:58 (quit) dsantiago: Quit: Computer has gone to sleep. 12:04 (quit) jrslepak: Quit: This computer has gone to sleep 12:13 (quit) noelw: Quit: noelw 12:19 (quit) anRch: Quit: anRch 12:20 (quit) realitygrill: Quit: realitygrill 12:25 (quit) Blkt: Read error: Connection reset by peer 12:25 (join) bluezenix 12:25 (quit) asumu: Ping timeout: 252 seconds 12:26 (join) asumu 12:32 (join) jonrafkind 12:34 (join) anRch 12:35 (join) mithos28 12:54 (quit) jonrafkind: Ping timeout: 276 seconds 13:00 (part) sindoc 13:00 (quit) anRch: Ping timeout: 240 seconds 13:06 (quit) q0tw4: Remote host closed the connection 13:29 (join) MayDaniel 13:30 (join) dnolen 13:31 (quit) MayDaniel: Read error: Connection reset by peer 13:32 (quit) bluezenix: Quit: Leaving. 13:33 (join) MayDaniel 13:53 (quit) MayDaniel: 14:12 (quit) ivan`: Ping timeout: 252 seconds 15:10 (join) jonrafkind 15:46 (join) anRch 16:07 (join) ben__ 16:08 ben__: can you have a tickhandler, on tick stop-when time so it would be (define (tickhandler model) (stop-when 10 seconds)) 16:09 ben__: is it possible to make that 10 seconds something? 16:11 (join) bluezenix 16:12 (quit) rudybot: Read error: Connection reset by peer 16:12 (quit) offby1_: Quit: ZNC - http://znc.sourceforge.net 16:12 (quit) offby1: Read error: Connection reset by peer 16:13 (join) rudybot 16:13 (quit) anRch: Quit: anRch 16:13 (quit) bluezenix: Read error: Connection reset by peer 16:14 (join) bluezenix1 16:19 (join) offby1` 16:20 (nick) offby1` -> offby1 16:25 (quit) ben__: Ping timeout: 264 seconds 16:32 (join) shadgregory 16:34 (quit) shadgregory: Quit: ERC Version 5.3 (IRC client for Emacs) 16:35 (join) shadgregory 17:02 (quit) bluezenix1: Quit: Leaving. 17:02 (join) bluezenix 17:27 (quit) bluezenix: Quit: Leaving. 17:27 (join) bluezenix 17:31 (join) yoklov 17:33 (nick) elliottcable -> efc` 17:36 (join) jrslepak 17:39 (nick) efc` -> elli 17:41 (join) Sag1 17:41 (quit) SeanTAllen: Remote host closed the connection 17:42 (quit) jrslepak: Ping timeout: 252 seconds 17:47 (join) ivan` 17:48 Sag1: Could someone elaborate what, key=?: expects a KEY-EVTS as first argument, given an image is saying? 17:48 Sag1: (define (handle-key key) (cond [(key=? key "escape") (stop-with key)] [(key=? key "w") (win blackjack2)] [(key=? key "l") (loss blackjack2)])) 17:48 Sag1: second part is my function 17:49 (quit) bluezenix: Ping timeout: 244 seconds 17:55 (nick) elli -> ecececececececec 17:56 (nick) ecececececececec -> elliottcable 18:02 (join) bluezenix 18:03 (join) DanBurton 18:03 (join) jakky 18:06 (quit) bluezenix: Ping timeout: 252 seconds 18:10 (join) bluezenix 18:12 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/wgts0A 18:12 RacketCommitBot: [racket/master] db: fix sqlite3 #:use-place for raco exe - Ryan Culpepper 18:15 (join) SeanTAllen 18:15 (quit) jeapostrophe: Ping timeout: 252 seconds 18:24 (quit) bluezenix: Ping timeout: 244 seconds 18:28 (join) bluezenix 18:41 (quit) elliottcable: Ping timeout: 252 seconds 18:41 (join) elliottcable 18:50 Sag1: Could someone elaborate what, key=?: expects a KEY-EVTS as first argument, given an image is saying? 19:05 (quit) DanBurton: Quit: Leaving 19:14 ianjneu: The function key=? expects two arguments, both of which should be KEY-EVTS. The first argument supplied was not a KEY-EVT, but an image. 19:15 (quit) shadgregory: Quit: ERC Version 5.3 (IRC client for Emacs) 19:16 Sag1: well, (define (handle-key key) (cond [(key=? key "escape") (stop-with "escape")] [(key=? key "w") (win blackjack2)] [(key=? key "l") (loss blackjack2)])) 19:17 (join) jeapostrophe 19:17 Sag1: it is saying key is an image? 19:18 (join) shadgregory 19:19 ianjneu: no, it's saying you failed to call handle-key with a KEY-EVT and that's why it's complaining. 19:21 Sag1: KEY-EVT is key event right... 19:23 ianjneu: yes, which is one of several special strings, like "up" or "down", not images. 19:25 Sag1: grrr so, I need (define (handle-key key key-event) or somthing like that?? 19:26 ianjneu: No. Why do you want to compare an image with a key event? 19:26 ianjneu: Look at where you call handle-key. Make sure you're only giving it key events and not images. 19:31 (quit) bluezenix: Quit: Leaving. 19:31 Sag1: ooohhh ianjneu, I am using big-bang so I am feeding it an image in my animation so that is where the image is comming from? 19:47 (join) frewsxcv 19:49 (quit) mceier: Quit: leaving 19:51 (part) frewsxcv: "WeeChat 0.3.6" 20:31 (nick) ChaozZBubi -> chaozzbubi 20:36 (quit) jonrafkind: Ping timeout: 260 seconds 20:50 (join) realitygrill 20:51 (join) kvda 21:37 (part) ChibaPet 21:45 (quit) yoklov: Quit: computer sleeping 21:59 (join) yoklov 22:14 ozzloy: is there such a thing as #lang c89 or some other really popular language? 22:17 (join) veer 22:19 chandler: there's #lang algol60. can you get more popular than that? 22:24 asumu: ozzloy: you could try pyret. ;) http://planet.racket-lang.org/display.ss?package=pyret.plt&owner=wrturtle 22:24 (quit) masm: Quit: Leaving. 22:24 asumu: There are also various javascript related packages on planet but I don't know how many of them build/work. 22:26 (quit) em: Ping timeout: 252 seconds 22:32 (join) em 22:34 ozzloy: asumu, whoa 22:35 ozzloy: i was thinking that it would be a shortcut to getting tons of libs in racket 22:36 ozzloy: i'm kinda fuzzy on the details of how that would work though 23:05 Sag1: (define (handle-key key key-event) (cond [(key=? key "escape") (stop-with "escape")] [(key=? key "w") (place-image single-card 500 365)] [(key=? key "l") (place-image single-card 700 365)])) 23:06 Sag1: Does anyone know why this doesn't work I get this error on-tick: expected function of one argument as first argument; given function of 2 arguments 23:06 Sag1: im using big-bang which consumes an image 23:10 ozzloy: Sag1, at a high-level, handle-key is a fucnction with 2 arguments 23:11 ozzloy: so you could break it up into a function of 1 argument that returns a function of 1 argument 23:11 (join) jonrafkind 23:12 ozzloy: (define (handle-key key) (lambda (key-event) ...)) 23:12 ozzloy: i've not dealt with big-bang though, so not sure if that's the right direction to go in 23:14 ozzloy: shorthand for that is (define ((handle-key key) key-event) ...) 23:14 ozzloy: Sag1, is that helpful at all? 23:15 Sag1: Yes I see what you are saying I am using your idea just working through error messages thanks, I might have 1 more question about this on-key =) 23:17 ozzloy: awesome 23:17 ozzloy: glad that's helpful 23:24 Sag1: key=?: expects a KEY-EVTS as first argument, given an image is my error, now with my revised body 23:24 Sag1: (define (handle-key key key-event) (cond [(key=? key "escape") (stop-with key)] [(key=? key "W") (place-image single-card 500 365)] [(key=? key "l") (place-image single-card 700 365)])) 23:28 (join) Frozenlock 23:28 Sag1: OK ignore all my questions ozzyloy I misunderstood at first works now thanks! 23:30 ozzloy: Sag1, woo! 23:30 ozzloy: glad i came back to the channel after you both had trouble and figured it out, and before you left 23:32 ozzloy: like asking "hey, can i help?" when just about all the work is done. you can still look like you offered help, but without having to actually do anything 23:33 Sag1: haha yeah 23:35 Sag1: Is it possible to assign a picture values? I was trying to this yesterday? 23:41 ozzloy: idk 23:41 Sag1: hmm 23:46 ozzloy: is there a reason other than performance for having let, let* and letrec? 23:47 mithos28: ozzloy: they are useful for different things 23:47 ozzloy: oh nm, shadowing 23:47 mithos28: exactly 23:48 ozzloy: is performance also a reason? 23:48 ozzloy: like is performance of letrec much slower than let? 23:48 mithos28: depends on what you are doing, in most simple cases I bet they are optimized to the same thing 23:50 mithos28: given that you can write your example as a let and so don't need the recursive part 23:50 ozzloy: interesting 23:51 mithos28: letrec is slower if the mutation that is required by it semantics is possibly visible 23:56 ozzloy: makes sense vaguely. i'm getting a foggy picture of compiler const-folding-like tricks happening 23:57 mithos28: do you have an application where this is relevant, or are you just trying to understand how it works?