[racket] serializing/deserializing structs (and read/writing them over ports)

2012-10-04 Thread Dominick LoBraico
Hello! I have defined a struct in some file (create.rkt) like this: ... (provide create make-create) (define-serializable-struct create (name key assigned-date due-date)) … In client.rkt, given name, key, assigned-date, and due-date as well as an out-port called out, I do: (require "create.rkt"

Re: [racket] Vast performance differences with minute syntactic differences

2012-10-04 Thread J. Ian Johnson
I wrote two set-adds? Ugh, I didn't mean to. That code wouldn't even work due to arity mismatch. (set-add res (let ([v v]) v)) is more likely. -Ian - Original Message - From: Sam Tobin-Hochstadt To: J. Ian Johnson Cc: users Sent: Thu, 4 Oct 2012 19:46:36 -0400 (EDT) Subject: Re: [racke

Re: [racket] Vast performance differences with minute syntactic differences

2012-10-04 Thread Sam Tobin-Hochstadt
On Thu, Oct 4, 2012 at 7:01 PM, J. Ian Johnson wrote: > > By almost exactly I mean > (let () (set-add res v)) > > versus > > (let ([res res]) > (set-add (let ([v v]) > (set-add res (let () v) These seem importantly different, in that: (set-add v (set-add res v)) and (set-add

[racket] Vast performance differences with minute syntactic differences

2012-10-04 Thread J. Ian Johnson
In many cases this is a "no duh" since speed-up loops can be inconspicuously small. This post is regarding the macro writers' bill of rights, which I think Racket is violating. I have two definitional interpreters that are run in an "abstract interpretation monad" if you will. One is syntactica

Re: [racket] cube-all

2012-10-04 Thread Marco Morazan
On Thu, Oct 4, 2012 at 4:21 PM, Ashley Fowler wrote: > 1. I need to cube (car ls) right? > 2. I need to use cons to combine both. > That sounds pretty reasonable to me. Try it out! Marco > From: Marco Morazan [moraz...@gmail.com] > Sent: Thursday, October

Re: [racket] cube-all

2012-10-04 Thread Ashley Fowler
I developed my code using a recursive analysis. From: Marco Morazan [moraz...@gmail.com] Sent: Thursday, October 04, 2012 1:40 PM To: Ashley Fowler Cc: users@racket-lang.org Subject: Re: [racket] cube-all Tell us how you developed your code and we might be

Re: [racket] cube-all

2012-10-04 Thread Ashley Fowler
From: Stephen Bloch [bl...@adelphi.edu] Sent: Thursday, October 04, 2012 3:38 PM To: Ashley Fowler Cc: users@racket-lang.org Subject: Re: [racket] cube-all On Oct 4, 2012, at 12:17 PM, Ashley Fowler mailto:afowl...@broncos.uncfsu.edu>> wrote: I need to write a

Re: [racket] cube-all

2012-10-04 Thread Stephen Bloch
On Oct 4, 2012, at 12:17 PM, Ashley Fowler wrote: > I need to write a function that takes a list and cubes the whole list, for > instance, (cube-all '(3 4 2 5)) returns (27 64 8 125). OK, that's one good test case. My students would be dinged for writing only one, but maybe your instructor

Re: [racket] cube-all

2012-10-04 Thread Marco Morazan
Tell us how you developed your code and we might be able to tell you where you went wrong. On Thu, Oct 4, 2012 at 12:17 PM, Ashley Fowler wrote: > I need to write a function that takes a list and cubes the whole list, for > instance, (cube-all '(3 4 2 5)) returns (27 64 8 125). > > So far I have

Re: [racket] cube-all

2012-10-04 Thread Matthias Felleisen
;; [Listof Number] -> [Listof Number] ;; cube all numbers on l and collect in list (define (cube-all l) (map (λ (n) (expt n 3)) l)) (check-expect (cube-all '(3 4 2 5)) '(27 64 8 125)) On Oct 4, 2012, at 12:17 PM, Ashley Fowler wrote: > I need to write a function that takes a list and cubes

[racket] cube-all

2012-10-04 Thread Ashley Fowler
I need to write a function that takes a list and cubes the whole list, for instance, (cube-all '(3 4 2 5)) returns (27 64 8 125). So far I have the code below, but it is not working out like I want it to. Any advice or suggestions? (define cube-all (lambda (ls) (if (null? ls) ls (cons(car l

Re: [racket] details on hackathon after racketcon?

2012-10-04 Thread Matthias Felleisen
Once again: checked signatures are available in ASL with German documentation. When I know how to integrate them and what I am paying for them, I may change the teaching languages. On Oct 4, 2012, at 9:18 AM, Stephen Bloch wrote: > > On Oct 4, 2012, at 8:33 AM, Matthias Felleisen wrote: >

Re: [racket] details on hackathon after racketcon?

2012-10-04 Thread Sam Tobin-Hochstadt
As Asumu said, we're going to tackle small improvements that don't require lots of design and coordination, and that can be distributed among lots of people in parallel. Of course, people are free to hack on whatever they like, but I wouldn't encourage large projects like revising the teaching lan

Re: [racket] details on hackathon after racketcon?

2012-10-04 Thread Stephen Bloch
On Oct 4, 2012, at 8:33 AM, Matthias Felleisen wrote: > That wouldn't help much because none of the 2htdp/* libraries provide checked > signatures. But if we had a good signature system for the teaching languages, we could easily add signatures to 2htdp/*, couldn't we? Seriously, I'd love t

Re: [racket] details on hackathon after racketcon?

2012-10-04 Thread Matthias Felleisen
That wouldn't help much because none of the 2htdp/* libraries provide checked signatures. On Oct 4, 2012, at 4:55 AM, Todd O'Bryan wrote: > Maybe signatures for the teaching languages? Maybe? > > On Wed, Oct 3, 2012 at 9:37 PM, Asumu Takikawa wrote: >> On 2012-10-03 16:21:10 -0600, Danny Yo

[racket] slow response in DrR 5.2.1

2012-10-04 Thread Stephen Bloch
We've got a couple of Windows labs with DrRacket 5.2.1 installed, and we're seeing really terrible response times: with a fairly short, simple graphics program (using the picturing-programs library) operating on small images, we click "run" and wait 20-30 seconds for a response. I'm not actuall

Re: [racket] details on hackathon after racketcon?

2012-10-04 Thread Todd O'Bryan
Maybe signatures for the teaching languages? Maybe? On Wed, Oct 3, 2012 at 9:37 PM, Asumu Takikawa wrote: > On 2012-10-03 16:21:10 -0600, Danny Yoo wrote: >> Any details on what we'll be hacking on after Racketcon? > > The plan is to hack on small, self-contained improvements such as > documentat