Re: [racket-dev] struct:name exports from 2htdp/image, mrlib/image-core, etc.

2013-08-07 Thread Matthias Felleisen

When you inject new names, things might break. 



On Aug 6, 2013, at 9:04 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 Can you explain what uses would break?
 
 Sam
 
 On Aug 6, 2013 4:21 PM, Matthias Felleisen matth...@ccs.neu.edu wrote:
 
 That might interfere with normal uses of these libraries in *SL. -- Matthias
 
 
 
 On Aug 6, 2013, at 6:50 PM, Asumu Takikawa as...@ccs.neu.edu wrote:
 
  Hi all,
 
  A few teaching libraries like `2htdp/image` provide struct constructors
  and accessors, but don't export the struct type descriptor values. Does
  anyone mind if I add the exports to libraries like `2htdp/image`,
  `mrlib/image-core`, etc.?
 
  (it's needed for Typed Racket with require/typed)
 
  Cheers,
  Asumu
  _
   Racket Developers list:
   http://lists.racket-lang.org/dev
 
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev


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


Re: [racket-dev] Too many struct definitions leads to literal local-code error

2013-08-07 Thread Matthew Flatt
Thanks --- I've pushed a repair, finally.

Unless I'm confused, the problem was a bug in the bytecode format that
has been around since v300 or so.

At Mon, 5 Aug 2013 15:20:17 -0400 (EDT), J. Ian Johnson wrote:
 Pushed current branch to
 https://github.com/dvanhorn/oaam/tree/thocon
 
 kcfa.rkt has an mflatt comment that will point you at the problem lines of 
 code.
 
 The entry point for the project is kcfa-instanstantiations.rkt
 -Ian
 - Original Message -
 From: Matthew Flatt mfl...@cs.utah.edu
 To: J. Ian Johnson i...@ccs.neu.edu
 Cc: dev dev@racket-lang.org
 Sent: Monday, August 5, 2013 3:09:50 PM GMT -05:00 US/Canada Eastern
 Subject: Re: [racket-dev] Too many struct definitions leads to literal 
 local-code error
 
 Seeing #local-code is about the same as a seg fault.
 
 Can you send me something to replicate the crash on my machine?
 
 
 
 On Aug 5, 2013, at 11:55 AM, J. Ian Johnson i...@ccs.neu.edu wrote:
 
  I'm working more on my analysis framework, and added many different kinds 
  of 
 new continuation frames. I get to a point where I comment out all definitions 
 past a certain point (and their uses) and the program 
  compiles. I add one more (any one) and I get the following error:
  
  kcfa-instantiations.rkt:136:6: ?: literal data is not allowed;
  no #%datum syntax transformer is bound
   in: #local-code
   context...:
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/private/modbeg.rkt:46:4
/home/ianj/racket/racket/collects/compiler/cm.rkt:345:0: compile-zo*
/home/ianj/racket/racket/collects/compiler/cm.rkt:552:26
/home/ianj/racket/racket/collects/compiler/cm.rkt:545:42...
  
  This is blocking progress. I'm about to pull and hope for the best. Any 
  ideas 
 what might be causing this kind of behavior in the expander?
  -Ian
  _
   Racket Developers list:
   http://lists.racket-lang.org/dev
  
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Too many struct definitions leads to literal local-code error

2013-08-07 Thread J. Ian Johnson
Many thanks. First call-with-values/begin0 and now this. I should be the 
dep bug finder, heh.
-Ian
- Original Message -
From: Matthew Flatt mfl...@cs.utah.edu
To: J. Ian Johnson i...@ccs.neu.edu
Cc: dev dev@racket-lang.org
Sent: Wed, 7 Aug 2013 11:43:12 -0400 (EDT)
Subject: Re: [racket-dev] Too many struct definitions leads to literal 
local-code error

Thanks --- I've pushed a repair, finally.

Unless I'm confused, the problem was a bug in the bytecode format that
has been around since v300 or so.

At Mon, 5 Aug 2013 15:20:17 -0400 (EDT), J. Ian Johnson wrote:
 Pushed current branch to
 https://github.com/dvanhorn/oaam/tree/thocon
 
 kcfa.rkt has an mflatt comment that will point you at the problem lines of 
 code.
 
 The entry point for the project is kcfa-instanstantiations.rkt
 -Ian
 - Original Message -
 From: Matthew Flatt mfl...@cs.utah.edu
 To: J. Ian Johnson i...@ccs.neu.edu
 Cc: dev dev@racket-lang.org
 Sent: Monday, August 5, 2013 3:09:50 PM GMT -05:00 US/Canada Eastern
 Subject: Re: [racket-dev] Too many struct definitions leads to literal 
 local-code error
 
 Seeing #local-code is about the same as a seg fault.
 
 Can you send me something to replicate the crash on my machine?
 
 
 
 On Aug 5, 2013, at 11:55 AM, J. Ian Johnson i...@ccs.neu.edu wrote:
 
  I'm working more on my analysis framework, and added many different kinds 
  of 
 new continuation frames. I get to a point where I comment out all definitions 
 past a certain point (and their uses) and the program 
  compiles. I add one more (any one) and I get the following error:
  
  kcfa-instantiations.rkt:136:6: ?: literal data is not allowed;
  no #%datum syntax transformer is bound
   in: #local-code
   context...:
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:234:0
/home/ianj/racket/racket/collects/racket/splicing.rkt:181:0
/home/ianj/racket/racket/collects/racket/private/modbeg.rkt:46:4
/home/ianj/racket/racket/collects/compiler/cm.rkt:345:0: compile-zo*
/home/ianj/racket/racket/collects/compiler/cm.rkt:552:26
/home/ianj/racket/racket/collects/compiler/cm.rkt:545:42...
  
  This is blocking progress. I'm about to pull and hope for the best. Any 
  ideas 
 what might be causing this kind of behavior in the expander?
  -Ian
  _
   Racket Developers list:
   http://lists.racket-lang.org/dev
  

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


[racket-dev] continuation-mark-set-context : Empty Stack Traces?

2013-08-07 Thread Vincent St-Amour

I'm profiling one of the contract benchmarks[1], and I noticed that
sometimes (about 10 out of 300 samples), `continuation-mark-set-context'
would return an empty stack trace. This number is cut down by about half
if I disable the JIT. These samples seem to be spread out throughout
execution (i.e. not all at the beginning or at the end).

I think this may be a regression. At least I've never observed that
before (and since this causes the contract profiler to error (a bug
which I'll fix), I probably would have noticed).

This may be a problem because it would reduce the precision of the
profiler by undercounting what actually was on the stack while these
empty samples are taken.


To observe this, clone the contract benchmarks repository[1], then run
the attached version of render-guide.rkt inside that directory. To count
the number of empty stack traces, apply the attached patch to the
profiler.


Vincent


[1] https://github.com/stamourv/contract-benchmarks




render-guide.rkt
Description: Binary data


0001-Have-profiler-print-number-of-empty-stack-traces.patch
Description: Binary data
_
  Racket Developers list:
  http://lists.racket-lang.org/dev