Re: [racket-dev] problem with require and frtime

2012-01-19 Thread Marijn
On 18-01-12 17:47, Matthew Flatt wrote:
 At Wed, 18 Jan 2012 12:02:10 +0100, Marijn wrote:
 I would expect both forms to work. This is a reduction of a different
 problem possibly caused by these issues here.

So I tried to cut down my program to a reasonably sized test-case which
is attached to this email. model.rkt contains (what's left of) the model
macro, demo1.rkt contains a small model and a (require frtime). If you
do racket demo1.rkt then you get the following error:


model.rkt:30:17: make-entry: bad syntax in: (make-entry (= profit
(for/hash ((y years)) (values y (- (hash-ref income y 0) (hash-ref
expenses y 0) (years income expenses profit))

 === context ===
standard-module-name-resolver


but if you comment the (require frtime) then the error goes away. I have
other code that tests this same simple-economy model with the
non-cutdown version of the model macro and supporting code and
everything seems to work fine.

Any idea what's going on here?

Marijn
#lang racket/gui

;;; comment this line to make error go away
(require frtime)

(require model.rkt)

(define simple-economy
  (model make-immutable-hash hash-ref
   ((? years #f)
(? income (hash))
(? expenses (hash))

(= profit   
   (for/hash ((y years))
 (values
  y
  (- (hash-ref income y 0)
 (hash-ref expenses y 0)   )))
#lang racket

(provide model)

(struct variable ((value #:mutable) rule))

(define-syntax make-store
  (syntax-rules ()
((_ _make-store_ _get-value_ ((_type_ _id_ _args_ ...) ...))
 (let-syntax
 ((make-entry
   (syntax-rules (? =)
 ((_ (? __id__  __init-value__) __other-ids__)
  `(__id__ . ,(variable __init-value__ #f)))
 ((_ (= __id__ __rule__) (__other-id__ (... ...)))
  `(__id__
.
,(variable
  #f
  (lambda ()
(let-syntax
((__other-id__
  (syntax-id-rules ()
(_ (_get-value_ '__other-id__
 (... ...))
  __rule__
   (letrec
   ((store
 (_make-store_
  `(,(make-entry (_type_ _id_ _args_ ...) (_id_ ...)) ...)) ))
 store)

(define-syntax model
  (syntax-rules ()
((_ _make-store_ _store-ref_ ((_type_ _id_ _args_ ...) ...))
 (let ()
   (define (get-variable id) (_store-ref_ store id))
   (define (get-value id) (variable-value (get-variable id)))
   (define store (make-store _make-store_ get-value ((_type_ _id_ _args_ 
...) ...)))

   (match-lambda*
((list 'get id) (get-value id)))
   


signature.asc
Description: OpenPGP digital signature
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Strange error with gui and ffi

2012-01-19 Thread Tobias Hammer

Hi,

i am getting a strange error message from racket if i use racket/gui in 
the main module and only racket in a required one. If i load another 
shared lib in the required module i get the following output:


jpeg: unsupported library version: unknown

 === context ===
racket-5.2.0.1/collects/racket/draw/unsafe/jpeg.rkt: [running body]
racket-5.2.0.1/collects/racket/draw/private/bitmap.rkt: [traversing imports]
racket-5.2.0.1/collects/racket/draw/private/dc.rkt: [traversing imports]
racket-5.2.0.1/collects/racket/draw/private/svg-dc.rkt: [traversing imports]
racket-5.2.0.1/collects/racket/draw.rkt: [traversing imports]
racket-5.2.0.1/collects/mred/private/kernel.rkt: [traversing imports]
racket-5.2.0.1/collects/mred/private/const.rkt: [traversing imports]
racket-5.2.0.1/collects/mred/private/check.rkt: [traversing imports]
racket-5.2.0.1/collects/mred/private/mred.rkt: [traversing imports]
racket-5.2.0.1/collects/mred/mred.rkt: [traversing imports]
racket-5.2.0.1/collects/mred/main.rkt: [traversing imports]
racket-5.2.0.1/collects/racket/gui/base.rkt: [traversing imports]
racket-5.2.0.1/collects/racket/gui.rkt: [traversing imports]
guibug.rkt: [traversing imports]

Same problem with last nightly. It seems like it is happening only if 
the shared lib is statically linked to another libjpeg but as far as i 
understand that should have no invfuence on anything. It's also not 
happening if i use racket/gui instead of only racket as lang in the 
required module.


I used the following code to produce the error.

guibug.rkt:
#lang racket/gui
(require guibug_req.rkt)

guibug_req.rkt
#lang racket
(require ffi/unsafe)
(require racket/runtime-path)

(define-runtime-path lib-path libVLCore)
(define lib-handle (ffi-lib lib-path))

Has anyone an idea what is happening there?

Tobias


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


Re: [racket-dev] Strange error with gui and ffi

2012-01-19 Thread Matthew Flatt
At Thu, 19 Jan 2012 13:30:40 +0100, Tobias Hammer wrote:
 i am getting a strange error message from racket if i use racket/gui in 
 the main module and only racket in a required one. If i load another 
 shared lib in the required module i get the following output:
 
 jpeg: unsupported library version: unknown

It does seem that loading libVLCore interferes with the use of libjpeg;
if you use `racket/gui' in guibug_req.rkt, that would avoid the
problem by initializing the libjpeg use in `racket/draw' (via
`racket/gui') before libVLCore is loaded.

Even if libVLCore is statically linked to a libjpeg, I think it could
interact with dynamic loading of another libjpeg, depending on the
platform and linking options.

Can you say more about the platform, libVLCore's linking, and the
libjpeg that libVLCore uses?

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


Re: [racket-dev] problem with require and frtime

2012-01-19 Thread Matthew Flatt
The `frtime' language exports an `=' that isn't the same as `=' in
`racket', so that's why the pattern doesn't match. (This seems like a
further weakness of the `frtime' docs to specify the exports
precisely.)

You could avoid bound names like `=' as literals in the macro.
Normally, it works best for a form-exporting macro to also export
bindings for any literals in the form. Otherwise, this kind of
confusion is common.

Alternatively, you may want to match literals in your macro
symbolically instead of by binding. You can't do that easily with
`syntax-rules', but you can use `syntax-case*' and supply `(lambda (a
b) (eq? (syntax-e a) (syntax-e b)))' as the literal-comparison
function.

If it were me and I decided to go in the direction of symbol equality,
I'd use keywords instead --- `#:?' and `#:=' instead of `?' and `=' ---
which makes clear that there's no question of binding.


At Thu, 19 Jan 2012 10:46:37 +0100, Marijn wrote:
 On 18-01-12 17:47, Matthew Flatt wrote:
  At Wed, 18 Jan 2012 12:02:10 +0100, Marijn wrote:
  I would expect both forms to work. This is a reduction of a different
  problem possibly caused by these issues here.
 
 So I tried to cut down my program to a reasonably sized test-case which
 is attached to this email. model.rkt contains (what's left of) the model
 macro, demo1.rkt contains a small model and a (require frtime). If you
 do racket demo1.rkt then you get the following error:
 
 
 model.rkt:30:17: make-entry: bad syntax in: (make-entry (= profit
 (for/hash ((y years)) (values y (- (hash-ref income y 0) (hash-ref
 expenses y 0) (years income expenses profit))
 
  === context ===
 standard-module-name-resolver
 
 
 but if you comment the (require frtime) then the error goes away. I have
 other code that tests this same simple-economy model with the
 non-cutdown version of the model macro and supporting code and
 everything seems to work fine.
 
 Any idea what's going on here?
 
 Marijn
 
 --
 [text/plain demo1.rkt] [~/Desktop  open] [~/Temp  open]
 
 --
 [text/plain model.rkt] [~/Desktop  open] [~/Temp  open]
 
 --
 [application/pgp-signature signature.asc] [~/Desktop  open] [~/Temp  open]
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] problem with require and frtime

2012-01-19 Thread Matthias Felleisen

Greg, how difficult would it be to migrate frtime to #lang racket? -- Matthias



On Jan 19, 2012, at 8:13 AM, Matthew Flatt wrote:

 The `frtime' language exports an `=' that isn't the same as `=' in
 `racket', so that's why the pattern doesn't match. (This seems like a
 further weakness of the `frtime' docs to specify the exports
 precisely.)
 
 You could avoid bound names like `=' as literals in the macro.
 Normally, it works best for a form-exporting macro to also export
 bindings for any literals in the form. Otherwise, this kind of
 confusion is common.
 
 Alternatively, you may want to match literals in your macro
 symbolically instead of by binding. You can't do that easily with
 `syntax-rules', but you can use `syntax-case*' and supply `(lambda (a
 b) (eq? (syntax-e a) (syntax-e b)))' as the literal-comparison
 function.
 
 If it were me and I decided to go in the direction of symbol equality,
 I'd use keywords instead --- `#:?' and `#:=' instead of `?' and `=' ---
 which makes clear that there's no question of binding.
 
 
 At Thu, 19 Jan 2012 10:46:37 +0100, Marijn wrote:
 On 18-01-12 17:47, Matthew Flatt wrote:
 At Wed, 18 Jan 2012 12:02:10 +0100, Marijn wrote:
 I would expect both forms to work. This is a reduction of a different
 problem possibly caused by these issues here.
 
 So I tried to cut down my program to a reasonably sized test-case which
 is attached to this email. model.rkt contains (what's left of) the model
 macro, demo1.rkt contains a small model and a (require frtime). If you
 do racket demo1.rkt then you get the following error:
 
 
 model.rkt:30:17: make-entry: bad syntax in: (make-entry (= profit
 (for/hash ((y years)) (values y (- (hash-ref income y 0) (hash-ref
 expenses y 0) (years income expenses profit))
 
 === context ===
 standard-module-name-resolver
 
 
 but if you comment the (require frtime) then the error goes away. I have
 other code that tests this same simple-economy model with the
 non-cutdown version of the model macro and supporting code and
 everything seems to work fine.
 
 Any idea what's going on here?
 
 Marijn
 
 --
 [text/plain demo1.rkt] [~/Desktop  open] [~/Temp  open]
 
 --
 [text/plain model.rkt] [~/Desktop  open] [~/Temp  open]
 
 --
 [application/pgp-signature signature.asc] [~/Desktop  open] [~/Temp  
 open]
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] problem with require and frtime

2012-01-19 Thread Matthew Flatt
(Just to be clear, that wouldn't solve the problem this time. The `='
from `scheme' and `racket' are the same, but `frtime' has its own `='.)

At Thu, 19 Jan 2012 08:19:59 -0500, Matthias Felleisen wrote:
 
 Greg, how difficult would it be to migrate frtime to #lang racket? -- Matthias
 
 
 
 On Jan 19, 2012, at 8:13 AM, Matthew Flatt wrote:
 
  The `frtime' language exports an `=' that isn't the same as `=' in
  `racket', so that's why the pattern doesn't match. (This seems like a
  further weakness of the `frtime' docs to specify the exports
  precisely.)
  
  You could avoid bound names like `=' as literals in the macro.
  Normally, it works best for a form-exporting macro to also export
  bindings for any literals in the form. Otherwise, this kind of
  confusion is common.
  
  Alternatively, you may want to match literals in your macro
  symbolically instead of by binding. You can't do that easily with
  `syntax-rules', but you can use `syntax-case*' and supply `(lambda (a
  b) (eq? (syntax-e a) (syntax-e b)))' as the literal-comparison
  function.
  
  If it were me and I decided to go in the direction of symbol equality,
  I'd use keywords instead --- `#:?' and `#:=' instead of `?' and `=' ---
  which makes clear that there's no question of binding.
  
  
  At Thu, 19 Jan 2012 10:46:37 +0100, Marijn wrote:
  On 18-01-12 17:47, Matthew Flatt wrote:
  At Wed, 18 Jan 2012 12:02:10 +0100, Marijn wrote:
  I would expect both forms to work. This is a reduction of a different
  problem possibly caused by these issues here.
  
  So I tried to cut down my program to a reasonably sized test-case which
  is attached to this email. model.rkt contains (what's left of) the model
  macro, demo1.rkt contains a small model and a (require frtime). If you
  do racket demo1.rkt then you get the following error:
  
  
  model.rkt:30:17: make-entry: bad syntax in: (make-entry (= profit
  (for/hash ((y years)) (values y (- (hash-ref income y 0) (hash-ref
  expenses y 0) (years income expenses profit))
  
  === context ===
  standard-module-name-resolver
  
  
  but if you comment the (require frtime) then the error goes away. I have
  other code that tests this same simple-economy model with the
  non-cutdown version of the model macro and supporting code and
  everything seems to work fine.
  
  Any idea what's going on here?
  
  Marijn
  
  
 --
  [text/plain demo1.rkt] [~/Desktop  open] [~/Temp  open]
  
  
 --
  [text/plain model.rkt] [~/Desktop  open] [~/Temp  open]
  
  
 --
  [application/pgp-signature signature.asc] [~/Desktop  open] [~/Temp  
 open]
  _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Pre-Release Checklist for v5.2.1

2012-01-19 Thread Doug Williams
The plots in the science collection and related packages work as expected.

On Tue, Jan 17, 2012 at 4:44 PM, Ryan Culpepper r...@cs.utah.edu wrote:

 Checklist items for the v5.2.1 release
  (using the v5.2.0.900 release candidate build)

 Search for your name to find relevant items, reply when you finish an
 item (please indicate which item/s is/are done).  Also, if you have any
 commits that should have been picked, make sure that the changes are in.

 Important: new builds are created without announcement, usually whenever
 I pick a few commits.  If you need to commit changes, please make sure
 you tell me to pick it into the release branch.

 -- Release candidates are at
 --   http://pre.racket-lang.org/release/installers

 Please use these installers (or source bundles) -- don't test from
 your own git clone (don't test v5.2.1.1 by mistake!).  To get
 the tests directory in such a directory, you can do this:
  cd ...racket-root...
  git archive --remote=git://git.racket-lang.org/plt.git release \
  -- collects/tests | tar x

 --

 * Matthew Flatt mfl...@cs.utah.edu
  - Racket Tests
  - Languages Tests
  - GRacket Tests (Also check that `gracket -z' and `gracket-text' still
works in Windows and Mac OS X)
  - mzc --exe tests
  - .plt-packing Tests
  - Games Tests
  - Unit Tests
  - Syntax Color Tests
  - R6RS Tests
  - JPR's test suite.
  - Create an executable from a BSL program.
  Updates:
  - Racket Updates: update HISTORY
  (updates should show v5.2.1 as the most current version)
  - Update man pages in racket/man/man1: racket.1, gracket.1, raco.1
  Email me to pick the changes when they're done, or tell me if there
  are no such changes.

 * Robby Findler ro...@eecs.northwestern.edu
  - DrRacket Tests
  - Framework Tests
  - Contracts Tests
  - Games Tests
  - Teachpacks Tests: image tests
  - PLaneT Tests
  - Redex Tests
  Updates:
  - DrRacket Updates: update HISTORY
  - Redex Updates: update HISTORY
  (updates should show v5.2.1 as the most current version)
  - Ensure that previous version of DrRacket's preference files still
starts up with new DrRacket
  - Update man pages in racket/man/man1: drracket.1
  Email me to pick the changes when they're done, or tell me if there
  are no such changes.

 * John Clements cleme...@brinckerhoff.org
  - Stepper Tests
  Updates:
  - Stepper Updates: update HISTORY
  (updates should show v5.2.1 as the most current version; email me
  to pick the changes when they're done, or tell me if there are no such
  changes.)

 * Sam Tobin-Hochstadt sa...@ccs.neu.edu,
   Vincent St-Amour stamo...@ccs.neu.edu
  - Match Tests
  - Typed Racket Tests
  - Typed Racket Updates: update HISTORY
  (updates should show v5.2.1 as the most current version; email me
  to pick the changes when they're done, or tell me if there are no such
  changes.)

 * Matthias Felleisen matth...@ccs.neu.edu
  - Teachpacks Tests: check that new teachpacks are addable
  - Teachpack Docs: check teachpack docs in the bundles
  Updates:
  - Teachpack Updates: update HISTORY
  (updates should show v5.2.1 as the most current version; email me
  to pick the changes when they're done, or tell me if there are no such
  changes.)

 * Ryan Culpepper ry...@ccs.neu.edu
  - Macro Debugger Tests
  - Syntax Classifier Tests
  - RackUnit GUI Tests
  - Data Tests
  - DB Tests

 * Jay McCarthy jay.mccar...@gmail.com
  - Web Server Tests
  - XML Tests
  - HTML Tests
  - PLAI Tests
  - Racklog tests
  - Datalog tests

 * Paul Steckler st...@stecksoft.com
  - MysterX Tests
  - MzCOM Tests

 * Kathy Gray kathryn.g...@cl.cam.ac.uk
  - Test Engine Tests

 * Noel Welsh noelwe...@gmail.com
  - Rackunit Tests
  - SRFI Tests
  - Ensure that all claimed srfi's are in the installer and they all
load into racket or drracket (as appropriate)

 * Stevie Strickland sstri...@ccs.neu.edu
  - Unit Contract Tests
  - Contract Region Tests

 * Stephen Chang stch...@ccs.neu.edu
  - Lazy Racket Tests
  - Lazy stepper tests

 * Eli Barzilay e...@barzilay.org
  - Swindle Tests
  - XREPL Tests
  - Racket Tree: compare new distribution tree to previous one
  - Run the unix installer tests
  Version Updates: if a major change has happened, update the version
  number in:
  - racket/collects/mzscheme/info.rkt
  - racket/collects/mred/info.rkt

 * Stephen Bloch sbl...@adelphi.edu
  - Picturing Programs Tests

 * Greg Cooper g...@cs.brown.edu
  - FrTime Tests

 * Carl Eastlund c...@ccs.neu.edu
  - Dracula Tests (confirm that Dracula runs from PLaneT)

 * Jon Rafkind rafk...@cs.utah.edu
  Release tests for (one of the) linux releases:
  - Test that the `racket' and `racket-textual' source releases
compile fine (note that they're still called `plt' and `mz' at
this stage).
  - Test that the binary installers for both work, try each one in
both normal and unix-style installation modes. (just ubuntu)
  [Note: get the release candidates from the URL in 

Re: [racket-dev] how to disable intra-module constant inlining?

2012-01-19 Thread Matthew Flatt
Do you mean the situation with one module, like this one?

 ;; a.rkt
 #lang racket

 (provide f c)

 (define (f x) x)
 (f 3) ; call might be inlined

 (define c 10)
 (define use-c c) ; constant might be folded

Or are two modules involved, like this second one?

 ;; b.rkt
 #lang racket
 (require a.rkt)

 c ; constant from other module might be folded
 (f 3) ; function from other module might be inlined

?

If you set `compile-enforce-module-constants' to #f while compiling
a.rkt, then all folding and inlining of `c' and `f' will be disabled
in both a.rkt and b.rkt, since mutation wil be allowed on `f' and
`c'.

If you compile a.rkt normally, then setting
`compile-enforce-module-constants' for b.rkt has no effect for `c'
and `f' (i.e., they will be folded away and inlined), because `c' and
`f' in a.rkt have been compiled as constants.

If you compile a.rkt normally and set
`compile-context-preservation-enabled' to #f forb.rkt, then `f' will
not be inlined (because inlining is disabled), but `c' will still be
replaced with 10.


All that said, adding `set!'s sounds like the way to go here, because
you want the exports of the module to always act as if they are
mutable.

At Wed, 18 Jan 2012 18:21:04 -0500, Danny Yoo wrote:
  So Whalesong is actually breaking on a few of my test case examples
  because 5.2.1 does some aggressive inlining.  Specifically, it's doing
  intra-module constant optimizations.  Whalesong depends on the late
  binding of module bindings in some special places (specifically, the
  FFI), so I need a way of turning that constant inlining off.  I tried
  using (compile-enforce-module-constants #f), but that didn't seem to
  do the trick.
 
 
 Followup: ok, whew.  I can workaround it for the specific case where
 things are breaking by artificially injecting set!s in the affected
 modules.  
 (https://github.com/dyoo/whalesong/commit/6b8bcdaf767efe2294a7dd8d9a5580c5a64c20
 ff)
 
 
 I'd still love to know how to disable the intra-module constant
 inlining, that is, if there's a parameter that controls inlining
 similar to compile-context-preservation-enabled.  Sam suggested that
 whatever 'raco make --disable-inline' does might do the trick, but
 that option appears to only affect function calls inlining; what I'm
 running into is constant inlining.
 
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev

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


Re: [racket-dev] Strange error with gui and ffi

2012-01-19 Thread Tobias Hammer

Am 01/19/2012 02:02 PM, schrieb Matthew Flatt:

At Thu, 19 Jan 2012 13:30:40 +0100, Tobias Hammer wrote:

i am getting a strange error message from racket if i use racket/gui in
the main module and only racket in a required one. If i load another
shared lib in the required module i get the following output:

jpeg: unsupported library version: unknown


It does seem that loading libVLCore interferes with the use of libjpeg;
if you use `racket/gui' in guibug_req.rkt, that would avoid the
problem by initializing the libjpeg use in `racket/draw' (via
`racket/gui') before libVLCore is loaded.


Sure, that would be a possibility.



Can you say more about the platform, libVLCore's linking, and the
libjpeg that libVLCore uses?



Platform is Suse linux i386.
The jpeg lib is IJG (http://www.ijg.org) release 6b from 1998. So it's 
pretty old and may be incompatible to the current version. But i can't 
replace it because the readme says it may be modified.
The linking is this libjpeg as normal static lib (.a) and the libVLCore 
as regular shared lib that includes the static lib.



 Even if libVLCore is statically linked to a libjpeg, I think it could
 interact with dynamic loading of another libjpeg, depending on the
 platform and linking options.

I digged a bit more and found the following line the rackets libffi:
handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL);
If i interpret the manpages correct that means that all symbols from the 
lib are loaded and used to resolve references. That may be convenient 
for the libraries that the racket core uses but may lead strange 
behavior like the one i got whenever name clashes happen.


Maybe it would be a good idea to make this import all behavior optional.

Tobias




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


Re: [racket-dev] how to disable intra-module constant inlining?

2012-01-19 Thread Danny Yoo
 If you compile a.rkt normally and set
 `compile-context-preservation-enabled' to #f forb.rkt, then `f' will
 not be inlined (because inlining is disabled), but `c' will still be
 replaced with 10.


This is odd then, because I thought I had tried this yesterday and
still observed inlining.  Let me try again...

;
#lang racket/base
(require compiler/zo-parse
 compiler/decompile)

(define (test b)
  (parameterize ([current-namespace (make-base-namespace)]
 (compile-enforce-module-constants b))

(eval (compile '(module foo-1 '#%kernel
  (#%provide a)
  (define-values (a) 'hello

(define bytecode (compile '(module foo-2 '#%kernel
 (#%require 'foo-1)
 (display a)
 (newline
(define op (open-output-bytes))
(write bytecode op)
(decompile (zo-parse (open-input-bytes (get-output-bytes op))

;
 (test #t)
'(begin (module foo-2  (display 'hello) (newline)))
 (test #f)
'(begin (module foo-2  (display |_a@(quote foo-1)|) (newline)))
;


So maybe I'm hallucinating (again).  I confirm that
compile-enforce-module-constants is working here.  I'll need to look
at why it didn't appear as effective in the context of Whalesong;
perhaps I'd set up the parameterization incorrectly.


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


Re: [racket-dev] problem with require and frtime

2012-01-19 Thread Gregory Cooper
I assume it wouldn't be too difficult, and that it's worth doing even if it
doesn't solve this particular problem.  Can someone grant me commit
privileges?

On Thu, Jan 19, 2012 at 5:18 AM, Matthew Flatt mfl...@cs.utah.edu wrote:

 (Just to be clear, that wouldn't solve the problem this time. The `='
 from `scheme' and `racket' are the same, but `frtime' has its own `='.)

 At Thu, 19 Jan 2012 08:19:59 -0500, Matthias Felleisen wrote:
 
  Greg, how difficult would it be to migrate frtime to #lang racket? --
 Matthias
 
 
 
  On Jan 19, 2012, at 8:13 AM, Matthew Flatt wrote:
 
   The `frtime' language exports an `=' that isn't the same as `=' in
   `racket', so that's why the pattern doesn't match. (This seems like a
   further weakness of the `frtime' docs to specify the exports
   precisely.)
  
   You could avoid bound names like `=' as literals in the macro.
   Normally, it works best for a form-exporting macro to also export
   bindings for any literals in the form. Otherwise, this kind of
   confusion is common.
  
   Alternatively, you may want to match literals in your macro
   symbolically instead of by binding. You can't do that easily with
   `syntax-rules', but you can use `syntax-case*' and supply `(lambda (a
   b) (eq? (syntax-e a) (syntax-e b)))' as the literal-comparison
   function.
  
   If it were me and I decided to go in the direction of symbol equality,
   I'd use keywords instead --- `#:?' and `#:=' instead of `?' and `=' ---
   which makes clear that there's no question of binding.
  
  
   At Thu, 19 Jan 2012 10:46:37 +0100, Marijn wrote:
   On 18-01-12 17:47, Matthew Flatt wrote:
   At Wed, 18 Jan 2012 12:02:10 +0100, Marijn wrote:
   I would expect both forms to work. This is a reduction of a
 different
   problem possibly caused by these issues here.
  
   So I tried to cut down my program to a reasonably sized test-case
 which
   is attached to this email. model.rkt contains (what's left of) the
 model
   macro, demo1.rkt contains a small model and a (require frtime). If you
   do racket demo1.rkt then you get the following error:
  
  
   model.rkt:30:17: make-entry: bad syntax in: (make-entry (= profit
   (for/hash ((y years)) (values y (- (hash-ref income y 0) (hash-ref
   expenses y 0) (years income expenses profit))
  
   === context ===
   standard-module-name-resolver
  
  
   but if you comment the (require frtime) then the error goes away. I
 have
   other code that tests this same simple-economy model with the
   non-cutdown version of the model macro and supporting code and
   everything seems to work fine.
  
   Any idea what's going on here?
  
   Marijn
  
  
 
 --
   [text/plain demo1.rkt] [~/Desktop  open] [~/Temp  open]
  
  
 
 --
   [text/plain model.rkt] [~/Desktop  open] [~/Temp  open]
  
  
 
 --
   [application/pgp-signature signature.asc] [~/Desktop  open]
 [~/Temp 
  open]
   _
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] how to disable intra-module constant inlining?

2012-01-19 Thread Matthew Flatt
When I wrote inlining, I should have written function inlining.

The `compile-context-preservation-enabled' parameter doesn't affect
propagation of non-function constants (which I incorrectly called
folding in my previous message); it affects only function inlining.

At Thu, 19 Jan 2012 10:49:22 -0500, Danny Yoo wrote:
  If you compile a.rkt normally and set
  `compile-context-preservation-enabled' to #f forb.rkt, then `f' will
  not be inlined (because inlining is disabled), but `c' will still be
  replaced with 10.
 
 
 This is odd then, because I thought I had tried this yesterday and
 still observed inlining.  Let me try again...
 
 ;
 #lang racket/base
 (require compiler/zo-parse
  compiler/decompile)
 
 (define (test b)
   (parameterize ([current-namespace (make-base-namespace)]
  (compile-enforce-module-constants b))
 
 (eval (compile '(module foo-1 '#%kernel
   (#%provide a)
   (define-values (a) 'hello
 
 (define bytecode (compile '(module foo-2 '#%kernel
  (#%require 'foo-1)
  (display a)
  (newline
 (define op (open-output-bytes))
 (write bytecode op)
 (decompile (zo-parse (open-input-bytes (get-output-bytes op))
 
 ;
  (test #t)
 '(begin (module foo-2  (display 'hello) (newline)))
  (test #f)
 '(begin (module foo-2  (display |_a@(quote foo-1)|) (newline)))
 ;
 
 
 So maybe I'm hallucinating (again).  I confirm that
 compile-enforce-module-constants is working here.  I'll need to look
 at why it didn't appear as effective in the context of Whalesong;
 perhaps I'd set up the parameterization incorrectly.
 
 
 Thanks!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Pre-Release Checklist for v5.2.1

2012-01-19 Thread John Clements

On Jan 17, 2012, at 3:44 PM, Ryan Culpepper wrote:

 Checklist items for the v5.2.1 release
  (using the v5.2.0.900 release candidate build)
 
 Search for your name to find relevant items, reply when you finish an
 item (please indicate which item/s is/are done).  Also, if you have any
 commits that should have been picked, make sure that the changes are in.
 
 Important: new builds are created without announcement, usually whenever
 I pick a few commits.  If you need to commit changes, please make sure
 you tell me to pick it into the release branch.

I'd love to test a bundle that includes 481bc2f00fca5f10. It looks to me like 
the release candidate hasn't been rebuilt since Tuesday. I'm assuming I should 
wait for a re-build; please tell me if that's not the right course of action.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Pre-Release Checklist for v5.2.1

2012-01-19 Thread Ryan Culpepper

On 01/19/2012 10:41 AM, John Clements wrote:


On Jan 17, 2012, at 3:44 PM, Ryan Culpepper wrote:


Checklist items for the v5.2.1 release
  (using the v5.2.0.900 release candidate build)

Search for your name to find relevant items, reply when you finish an
item (please indicate which item/s is/are done).  Also, if you have any
commits that should have been picked, make sure that the changes are in.

Important: new builds are created without announcement, usually whenever
I pick a few commits.  If you need to commit changes, please make sure
you tell me to pick it into the release branch.


I'd love to test a bundle that includes 481bc2f00fca5f10. It looks to
me like the release candidate hasn't been rebuilt since Tuesday. I'm
assuming I should wait for a re-build; please tell me if that's not
the right course of action.


Yes, wait. A new release candidate should be along later today.

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