Re: [racket-users] Load and execute files

2020-03-20 Thread Ben Greenman
On 3/20/20, Alexandre Rademaker wrote: > > It works! Thank you. The B.rkt (or check.rkt in my last message) can’t have > the `#lang racket` line. I am still confused about the implications of the > `#lang racket` line in the file and the module system of Racket. Great! In this case, adding #lang

Re: [racket-users] Load and execute files

2020-03-20 Thread Alexandre Rademaker
It works! Thank you. The B.rkt (or check.rkt in my last message) can’t have the `#lang racket` line. I am still confused about the implications of the `#lang racket` line in the file and the module system of Racket. > On 20 Mar 2020, at 11:08, Ben Greenman wrote: > > Does check.rkt start wi

Re: [racket-users] Load and execute files

2020-03-20 Thread Ben Greenman
Does check.rkt start with a #lang line? My B.rkt from the last message didn't have a #lang On 3/19/20, Alexandre Rademaker wrote: > > Not yet. To be more concrete: > > % racket --lib racket -t ex-1.2-3.rkt -t ex-1.7.rkt -t ex-1.8.rkt -r > check.rkt > check.rkt:31:7: sum-of-squares-max3: unbound

Re: [racket-users] Load and execute files

2020-03-19 Thread Alexandre Rademaker
Not yet. To be more concrete: % racket --lib racket -t ex-1.2-3.rkt -t ex-1.7.rkt -t ex-1.8.rkt -r check.rkt check.rkt:31:7: sum-of-squares-max3: unbound identifier in: sum-of-squares-max3 location...: check.rkt:31:7 context...: do-raise-syntax-error for-loop [repeats 1 more ti

Re: [racket-users] Load and execute files

2020-03-19 Thread Ben Greenman
> But I was really expecting that the option -t in the racket command should > replace the explicit (require…) in B.rkt. Something like > >> racket -t A.rkt -f B.rkt > default-load-handler: expected a `module' declaration, but found something > else Yes that almost works, but A.rkt needs to provid

Re: [racket-users] Load and execute files

2020-03-19 Thread Alexandre Rademaker
Oh… That is great Ben. Thank you. This is very closer to what I am looking for, so I can avoid having to add the (provide …) in A.rkt and (require …) in B.rkt !! I should not be so hard to remove the lines `#lang racket` in all files from the students. But I was really expecting that the opt

Re: [racket-users] Load and execute files

2020-03-19 Thread Ben Greenman
On 3/19/20, Alexandre Rademaker wrote: > > Suppose I have some functions defined in a file A.rkt and some tests defined > in the file B.rkt. How can I execute the tests in the command line? > > I was expecting to be able to run > >> racket A.rkt B.rkt > > But this does not evaluate the expressions

[racket-users] Load and execute files

2020-03-19 Thread Alexandre Rademaker
Suppose I have some functions defined in a file A.rkt and some tests defined in the file B.rkt. How can I execute the tests in the command line? I was expecting to be able to run > racket A.rkt B.rkt But this does not evaluate the expressions on B.rkt as I was expecting! 1. Do I need to exp