[racket-dev] `managed-compile-zo` seems to eat debug-level log messages

2013-01-16 Thread Sam Tobin-Hochstadt
I'm trying to use logging to time various portions of Typed Racket
compilation, and I'm running into trouble.  In particular, when I do
something like this:

(managed-compile-zo
"/tests/typed-racket/succeed/null-program.rkt")

with Typed Racket instrumented to do logging on a logger built with
`define-logger`, I never see the log messages at `'debug` level.  This
is true regardless of the log receiver spec that I provide.  If I
switch the log level to `'error`, I get the logs.

Similarly, if I switch to using `compile-file` from `mzlib/compile`,
the logs work just fine.

I think the problem is that the `accomplice-logger` in `compiler/cm`
line 377 only gets looked at at level `'info`.  If I change 'info on
line 380 to 'debug, then the behavior changes to what I'd expect.  Is
this an OK change to make?

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] replacing current-load/use-compiled

2013-01-16 Thread Dan Liebgold
Does anyone know if there's a way to replace current-load/use-compiled at
startup time without changing cstartup.inc and rebuilding executables?

-- 
Dan Liebgold[dan.liebg...@gmail.com]
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] request to move cfg-parser from algol60 into parser-tools

2013-01-16 Thread Matthew Flatt
At Wed, 16 Jan 2013 10:28:23 -0700, Danny Yoo wrote:
> > Cut-and-paste worries me. Instead of copying the documentation for X to
> > Y, usually it works better to document X as "Like Y, except...". Could
> > that work in this case?
> 
> 
> Ok, I can change it so it just documents the delta.  How does this look?
> 
> https://github.com/dyoo/racket/commit/3a3b0f90084b2292afee52f00317ea484f76fad8

That looks great.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] request to move cfg-parser from algol60 into parser-tools

2013-01-16 Thread Danny Yoo
> Cut-and-paste worries me. Instead of copying the documentation for X to
> Y, usually it works better to document X as "Like Y, except...". Could
> that work in this case?


Ok, I can change it so it just documents the delta.  How does this look?

https://github.com/dyoo/racket/commit/3a3b0f90084b2292afee52f00317ea484f76fad8
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] request to move cfg-parser from algol60 into parser-tools

2013-01-16 Thread Matthew Flatt
At Wed, 16 Jan 2013 08:44:33 -0700, Danny Yoo wrote:
> Ok, done.  I've also did a copy-and-paste of the documentation for
> parser-tools/yacc, but adjusted the prose where cfg-parser deviates
> from the standard parser interface.  Does it look ok?

Cut-and-paste worries me. Instead of copying the documentation for X to
Y, usually it works better to document X as "Like Y, except...". Could
that work in this case?

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Running in DrRacket changes behavior of the `compiler/cm` library

2013-01-16 Thread Sam Tobin-Hochstadt
On Wed, Jan 16, 2013 at 10:55 AM, Robby Findler
 wrote:
> The former.

Ok, great.  Happily back to using DrRacket. :)

>
> And maybe there is a problem with drracket sharing too much with the user
> program too.
>
> Robby
>
> On Wednesday, January 16, 2013, Sam Tobin-Hochstadt wrote:
>>
>> Do you mean the "automatically populate compiled directories" setting,
>> or the "online compilation"?
>>
>> Sam
>>
>> On Wed, Jan 16, 2013 at 10:37 AM, Robby Findler
>>  wrote:
>> > It may be possible to change drracket to only set that parameter when it
>> > is
>> > compiling files, but for now I think you have to disable drracket's auto
>> > compilation (in the language dialog's show details section) to develop
>> > programs like this.
>> >
>> > Robby
>> >
>> >
>> > On Wednesday, January 16, 2013, Sam Tobin-Hochstadt wrote:
>> >>
>> >> I'm not sure if this is a bug or not, so I'm bringing it up on the
>> >> list.  But when I do the following:
>> >>
>> >> #lang racket
>> >> (require compiler/cm)
>> >> (manager-compile-notify-handler displayln)
>> >> (managed-compile-zo
>> >>
>> >> "/home/samth/sw/plt/collects/tests/typed-racket/succeed/null-program.rkt")
>> >>
>> >> Then the compiler places the compiled files in the
>> >> `compiled/drracket/` directory, and looks for compiled files there as
>> >> well.  The `displayln` handler shows that basically all of Racket is
>> >> being recompiled.  I found this quite surprising, and worse it means I
>> >> can't use DrRacket to develop this program.  Would there be a way for
>> >> DrRacket not to change whatever parameter is being changed here in the
>> >> user program's context?
>> >>
>> >> Sam
>> >> _
>> >>   Racket Developers list:
>> >>   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Running in DrRacket changes behavior of the `compiler/cm` library

2013-01-16 Thread Robby Findler
The former.

And maybe there is a problem with drracket sharing too much with the user
program too.

Robby

On Wednesday, January 16, 2013, Sam Tobin-Hochstadt wrote:

> Do you mean the "automatically populate compiled directories" setting,
> or the "online compilation"?
>
> Sam
>
> On Wed, Jan 16, 2013 at 10:37 AM, Robby Findler
> > wrote:
> > It may be possible to change drracket to only set that parameter when it
> is
> > compiling files, but for now I think you have to disable drracket's auto
> > compilation (in the language dialog's show details section) to develop
> > programs like this.
> >
> > Robby
> >
> >
> > On Wednesday, January 16, 2013, Sam Tobin-Hochstadt wrote:
> >>
> >> I'm not sure if this is a bug or not, so I'm bringing it up on the
> >> list.  But when I do the following:
> >>
> >> #lang racket
> >> (require compiler/cm)
> >> (manager-compile-notify-handler displayln)
> >> (managed-compile-zo
> >>
> "/home/samth/sw/plt/collects/tests/typed-racket/succeed/null-program.rkt")
> >>
> >> Then the compiler places the compiled files in the
> >> `compiled/drracket/` directory, and looks for compiled files there as
> >> well.  The `displayln` handler shows that basically all of Racket is
> >> being recompiled.  I found this quite surprising, and worse it means I
> >> can't use DrRacket to develop this program.  Would there be a way for
> >> DrRacket not to change whatever parameter is being changed here in the
> >> user program's context?
> >>
> >> Sam
> >> _
> >>   Racket Developers list:
> >>   http://lists.racket-lang.org/dev
>
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] request to move cfg-parser from algol60 into parser-tools

2013-01-16 Thread Danny Yoo
Ok, done.  I've also did a copy-and-paste of the documentation for
parser-tools/yacc, but adjusted the prose where cfg-parser deviates
from the standard parser interface.  Does it look ok?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Running in DrRacket changes behavior of the `compiler/cm` library

2013-01-16 Thread Sam Tobin-Hochstadt
Do you mean the "automatically populate compiled directories" setting,
or the "online compilation"?

Sam

On Wed, Jan 16, 2013 at 10:37 AM, Robby Findler
 wrote:
> It may be possible to change drracket to only set that parameter when it is
> compiling files, but for now I think you have to disable drracket's auto
> compilation (in the language dialog's show details section) to develop
> programs like this.
>
> Robby
>
>
> On Wednesday, January 16, 2013, Sam Tobin-Hochstadt wrote:
>>
>> I'm not sure if this is a bug or not, so I'm bringing it up on the
>> list.  But when I do the following:
>>
>> #lang racket
>> (require compiler/cm)
>> (manager-compile-notify-handler displayln)
>> (managed-compile-zo
>> "/home/samth/sw/plt/collects/tests/typed-racket/succeed/null-program.rkt")
>>
>> Then the compiler places the compiled files in the
>> `compiled/drracket/` directory, and looks for compiled files there as
>> well.  The `displayln` handler shows that basically all of Racket is
>> being recompiled.  I found this quite surprising, and worse it means I
>> can't use DrRacket to develop this program.  Would there be a way for
>> DrRacket not to change whatever parameter is being changed here in the
>> user program's context?
>>
>> Sam
>> _
>>   Racket Developers list:
>>   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] DrRacket, automatic compilation, and images in files

2013-01-16 Thread Sam Tobin-Hochstadt
In the first-year course that David and I are teaching, we use custom
languages specified with #lang, multiple files, DrRacket, and images
embedded in .rkt files.  Unfortunately, these features, which are all
great on their own, don't play nicely together.  As a result, I ended
up writing this course blog post:

  
http://www.ccs.neu.edu/course/cs2510h/Blog.html#%28part._.Fixing_image_errors_in_.Dr.Racket%29

This happens only when the file in the definitions window `require`s a
file which has an embedded image, but it provides a totally
inscrutable error message.  We run into this more than we otherwise
would because we encourage students to put inline images in separate
files, since the WXME format is opaque and thus harder to
read/grade/diff/etc.

Would it be possible to either avoid this error altogether by simply
not trying to compile WXME-format files, or having DrRacket handle
this error behind the scenes, or even provide a more student-friendly
error message?  Any of these would be a significant help for us.

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Running in DrRacket changes behavior of the `compiler/cm` library

2013-01-16 Thread Robby Findler
It may be possible to change drracket to only set that parameter when it is
compiling files, but for now I think you have to disable drracket's auto
compilation (in the language dialog's show details section) to develop
programs like this.

Robby

On Wednesday, January 16, 2013, Sam Tobin-Hochstadt wrote:

> I'm not sure if this is a bug or not, so I'm bringing it up on the
> list.  But when I do the following:
>
> #lang racket
> (require compiler/cm)
> (manager-compile-notify-handler displayln)
> (managed-compile-zo
> "/home/samth/sw/plt/collects/tests/typed-racket/succeed/null-program.rkt")
>
> Then the compiler places the compiled files in the
> `compiled/drracket/` directory, and looks for compiled files there as
> well.  The `displayln` handler shows that basically all of Racket is
> being recompiled.  I found this quite surprising, and worse it means I
> can't use DrRacket to develop this program.  Would there be a way for
> DrRacket not to change whatever parameter is being changed here in the
> user program's context?
>
> Sam
> _
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
>
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Running in DrRacket changes behavior of the `compiler/cm` library

2013-01-16 Thread Sam Tobin-Hochstadt
I'm not sure if this is a bug or not, so I'm bringing it up on the
list.  But when I do the following:

#lang racket
(require compiler/cm)
(manager-compile-notify-handler displayln)
(managed-compile-zo
"/home/samth/sw/plt/collects/tests/typed-racket/succeed/null-program.rkt")

Then the compiler places the compiled files in the
`compiled/drracket/` directory, and looks for compiled files there as
well.  The `displayln` handler shows that basically all of Racket is
being recompiled.  I found this quite surprising, and worse it means I
can't use DrRacket to develop this program.  Would there be a way for
DrRacket not to change whatever parameter is being changed here in the
user program's context?

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev