Re: [racket-dev] Testing mode

2011-06-28 Thread Eli Barzilay
6 hours ago, Eli Barzilay wrote: 15 minutes ago, Jay McCarthy wrote: We've talked before about having a testing mode so that tests could be written inline, but not run when the module is normally run. I've attached a patch that adds a simple way of doing this. racket/test gives you -

Re: [racket-dev] Testing mode

2011-06-28 Thread Neil Van Dyke
I like the testing part, but am uneasy with the deploying part. Unit testing is so commonplace, and sometimes you want to have unit tests of private stuff within a module, without having to break up the module to expose the private stuff for testing. So, in that very common, almost universal

Re: [racket-dev] Testing mode

2011-06-28 Thread Eli Barzilay
25 minutes ago, Neil Van Dyke wrote: Just one example: just like some people might have mode called deploying or production, I might have particular modules that have a run mode in which there are multiple implementations of the same function, and at run time both the simple and the

Re: [racket-dev] [racket] getting symbol documentation URL quickly within Emacs

2011-06-28 Thread Matthias Felleisen
On Jun 28, 2011, at 3:00 AM, Eli Barzilay wrote: I feel lucky thing is not going to be a useful feature. It can work nicely in cases where bindings are relatively unique (for example, `get-impure-port'), but getting it to do the right thing for common names (like `cons') will be challenging,

Re: [racket-dev] Testing mode

2011-06-28 Thread Matthias Felleisen
I have come to accept that all modules should come with their tests included, as an exportable test suite: -- you don't need to expose any 'private' identifiers -- they are next to the function they test -- it is easy to run them from the repl after loading the file -- ... and from some

Re: [racket-dev] Testing mode

2011-06-28 Thread Eli Barzilay
About a minute ago, Matthias Felleisen wrote: I have come to accept that all modules should come with their tests included, as an exportable test suite: -- you don't need to expose any 'private' identifiers -- they are next to the function they test -- it is easy to run them from the repl

Re: [racket-dev] [racket] getting symbol documentation URL quickly within Emacs

2011-06-28 Thread Sam Tobin-Hochstadt
On Tue, Jun 28, 2011 at 9:58 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Jun 28, 2011, at 9:55 AM, Eli Barzilay wrote: (2) things from libraries can be excluded from specific languages     because we know they won't run That won't work right too...  Should I list a whole bunch of

Re: [racket-dev] [racket] getting symbol documentation URL quickly within Emacs

2011-06-28 Thread Eli Barzilay
Four minutes ago, Matthias Felleisen wrote: On Jun 28, 2011, at 9:55 AM, Eli Barzilay wrote: (2) things from libraries can be excluded from specific languages because we know they won't run That won't work right too... Should I list a whole bunch of modules for my language?

Re: [racket-dev] Racket startup

2011-06-28 Thread Neil Van Dyke
Eli Barzilay wrote at 06/28/2011 09:52 AM: This makes `MAIN' the Racket equivalent of Python's `__main__' thing. As for the name, if you could promise me that this name isn't a slippery slope to a proliferation of all-uppercase variable names... (By convention, I use all-uppercase for

Re: [racket-dev] Racket startup

2011-06-28 Thread Carl Eastlund
On Tue, Jun 28, 2011 at 10:06 AM, Neil Van Dyke n...@neilvandyke.org wrote: Eli Barzilay wrote at 06/28/2011 09:52 AM: This makes `MAIN' the Racket equivalent of Python's `__main__' thing. As for the name, if you could promise me that this name isn't a slippery slope to a proliferation of

Re: [racket-dev] Racket startup

2011-06-28 Thread Eli Barzilay
8 minutes ago, Neil Van Dyke wrote: Eli Barzilay wrote at 06/28/2011 09:52 AM: This makes `MAIN' the Racket equivalent of Python's `__main__' thing. As for the name, if you could promise me that this name isn't a slippery slope to a proliferation of all-uppercase variable names... (By

Re: [racket-dev] Racket startup

2011-06-28 Thread Carl Eastlund
On Tue, Jun 28, 2011 at 10:20 AM, Eli Barzilay e...@barzilay.org wrote: Three minutes ago, Carl Eastlund wrote: The Racketish name would be #%main, wouldn't it? Yes.  But the problem is that `#%foo' names are intended to be things that you don't write in end-user code, only if you implement

Re: [racket-dev] Testing mode

2011-06-28 Thread Jay McCarthy
2011/6/28 Matthias Felleisen matth...@ccs.neu.edu: I have come to accept that all modules should come with their tests included, as an exportable test suite: -- you don't need to expose any 'private' identifiers -- they are next to the function they test -- it is easy to run them from the

Re: [racket-dev] [racket] getting symbol documentation URL quickly within Emacs

2011-06-28 Thread Matthias Felleisen
On Jun 28, 2011, at 10:04 AM, Eli Barzilay wrote: Regardless of this, you're missing the main problem. If you're in drracket (or in a racket repl), you won't get to `set-car!', unless you explicitly search everything. But the problem is when the neabies just points their browsers to

Re: [racket-dev] Testing mode

2011-06-28 Thread Matthias Felleisen
Apologies. I didn't understand your original message then, and all I understand now is that I misunderstood it. But I will say that I already organize my files according to Eli's style. I have considered writing tests right below a function, but in the end I decided that this wasn't any good

Re: [racket-dev] Testing mode

2011-06-28 Thread Eli Barzilay
20 minutes ago, Jay McCarthy wrote: I was worried about situations where you had some code that had module toplevel code that starts up a long running process that shouldn't be run in test mode, so I wanted to cordon off that. I wasn't imagining anything as complicated as what Neil or Eli seem

Re: [racket-dev] [racket] getting symbol documentation URL quickly within Emacs

2011-06-28 Thread Eli Barzilay
10 minutes ago, Matthias Felleisen wrote: On Jun 28, 2011, at 10:04 AM, Eli Barzilay wrote: Regardless of this, you're missing the main problem. If you're in drracket (or in a racket repl), you won't get to `set-car!', unless you explicitly search everything. But the problem is when

Re: [racket-dev] [racket] getting symbol documentation URL quickly within Emacs

2011-06-28 Thread Matthias Felleisen
On Jun 28, 2011, at 11:23 AM, Eli Barzilay wrote: 10 minutes ago, Matthias Felleisen wrote: On Jun 28, 2011, at 10:04 AM, Eli Barzilay wrote: Regardless of this, you're missing the main problem. If you're in drracket (or in a racket repl), you won't get to `set-car!', unless you

Re: [racket-dev] Testing mode

2011-06-28 Thread Neil Van Dyke
Jay McCarthy wrote at 06/28/2011 10:52 AM: My patch was supposed to address this by setting up a protocol for code to be test only or not test (that's what I intended by with-deploying.) It was deploying in the name that I thought was problematic. when-testing-mode and unless-testing-mode,

Re: [racket-dev] Racket startup

2011-06-28 Thread Carl Eastlund
On Tue, Jun 28, 2011 at 11:27 AM, Eli Barzilay e...@barzilay.org wrote: An hour ago, Carl Eastlund wrote: On Tue, Jun 28, 2011 at 10:20 AM, Eli Barzilay e...@barzilay.org wrote: Three minutes ago, Carl Eastlund wrote: The Racketish name would be #%main, wouldn't it? Yes.  But the

Re: [racket-dev] Racket startup

2011-06-28 Thread Matthew Flatt
I am too buried in syntax-certificate work at the moment to follow along reply properly, but for what it's worth, I have a very different proposal in mind: a single file can have multiple loadable things (maybe modulets), and a program `main' should be one of those loadable things --- not an

[racket-dev] okay to require rackunit in modules required at startup?

2011-06-28 Thread John Clements
In certain places, I know that we're trying to be careful to minimize 'require's that occur as part of DrRacket startup. Is 'rackunit' something we're trying to avoid? Specifically, I have old unit tests in collects/stepper/private/shared.rkt that I'd like to revive as rackunit tests. John