Re: [racket-dev] strange/wrong placement and sizing in racket/gui

2011-08-16 Thread Marijn
 I noticed that text-fields are now missing their right border. Might be
 related to your fix.
 
 Marijn

There seems to be some positioning error, as text-fields are now
displayed on top of their labels. Sample program:


#lang racket/gui

(define root (new frame% (label Test)))

(new text-field% (parent root) (label Label) (init-value value))

(send root show #t)


Output attached.

Marijn
attachment: bug-in-text-field-display.png

signature.asc
Description: OpenPGP digital signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Fwd: ace?

2011-08-16 Thread Matthias Felleisen

Here is a site that comes with demos/shots that are simple and yet interactive 
and thus impressive. I am wondering whether we could turn our little code 
snippets into stuff that people can run and possibly even modify and run. We 
may have to 'cheat' and use WhaleSong in the background to power some of our 
graphical animated stuff but hey WhaleSong is close enough to our world. 


Begin forwarded message:

 From: Shriram Krishnamurthi s...@cs.brown.edu
 Date: August 15, 2011 11:09:40 PM EDT
 To: Matthias Felleisen matth...@ccs.neu.edu
 Subject: Re: ace?
 
 Nope, CodeMirror:
 
 http://codemirror.net/
 
 The creator is a pretty amazing hacker.  (And his background is in CL
 and Scheme.)


_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] strange/wrong placement and sizing in racket/gui

2011-08-16 Thread Matthew Flatt
At Tue, 16 Aug 2011 12:25:10 +0200, Marijn wrote:
  I noticed that text-fields are now missing their right border. Might be
  related to your fix.
  
  Marijn
 
 There seems to be some positioning error, as text-fields are now
 displayed on top of their labels.

Thanks for the report! I've pushed a repair.

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23267: master branch updated

2011-08-16 Thread Jon Rafkind
What was the bug? :)

On 08/16/2011 10:43 AM, mfl...@racket-lang.org wrote:
 mflatt has updated `master' from d05f138ed2 to 311d55b5cf.
   http://git.racket-lang.org/plt/d05f138ed2..311d55b5cf

 =[ 1 Commits ]==

 Directory summary:
  100.0% src/racket/src/

 ~~

 311d55b Matthew Flatt mfl...@racket-lang.org 2011-08-16 10:27
 :
 | fix bug that affects `free-identifier=?'
 |
 | This bug is in the amazing that it lurked for years category,
 | as well as the stupid use of C preprocessor category.
 :
   M src/racket/src/syntax.c |5 +++--

 =[ Overall Diff ]===

 src/racket/src/syntax.c
 ~~~
 --- OLD/src/racket/src/syntax.c
 +++ NEW/src/racket/src/syntax.c
 @@ -365,7 +365,7 @@ XFORM_NONGCING static MZ_INLINE void 
 DO_WRAP_POS_INC(Wrap_Pos *w)
  #define WRAP_POS_INIT_END(w) (w.l = scheme_null, w.a = NULL, w.is_limb = 0, 
 w.pos = 0)
  #define WRAP_POS_END_P(w) SCHEME_NULLP(w.l)
  #define WRAP_POS_FIRST(w) w.a
 -#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb= 
 (w2).is_limb; w.pos = (w2).pos
 +#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb = 
 (w2).is_limb; w.pos = (w2).pos
  
  /* Walking backwards through one chunk: */
  
 @@ -3618,8 +3618,9 @@ static Scheme_Object *resolve_env(WRAP_POS *_wraps,
if (_wraps) {
  WRAP_POS_COPY(wraps, *_wraps);
  WRAP_POS_INC(wraps);
 -  } else
 +  } else {
  WRAP_POS_INIT(wraps, ((Scheme_Stx *)a)-wraps);
 +  }
  
while (1) {
  if (WRAP_POS_END_P(wraps)) {

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23267: master branch updated

2011-08-16 Thread Jay McCarthy
The C macro expanded into more than a single expression, but there was
no {} after the else, so the latter expressions always ran.

This is a great example :)

Jay

On Tue, Aug 16, 2011 at 11:00 AM, Jon Rafkind rafk...@cs.utah.edu wrote:
 What was the bug? :)

 On 08/16/2011 10:43 AM, mfl...@racket-lang.org wrote:
 mflatt has updated `master' from d05f138ed2 to 311d55b5cf.
   http://git.racket-lang.org/plt/d05f138ed2..311d55b5cf

 =[ 1 Commits ]==

 Directory summary:
  100.0% src/racket/src/

 ~~

 311d55b Matthew Flatt mfl...@racket-lang.org 2011-08-16 10:27
 :
 | fix bug that affects `free-identifier=?'
 |
 | This bug is in the amazing that it lurked for years category,
 | as well as the stupid use of C preprocessor category.
 :
   M src/racket/src/syntax.c |    5 +++--

 =[ Overall Diff ]===

 src/racket/src/syntax.c
 ~~~
 --- OLD/src/racket/src/syntax.c
 +++ NEW/src/racket/src/syntax.c
 @@ -365,7 +365,7 @@ XFORM_NONGCING static MZ_INLINE void 
 DO_WRAP_POS_INC(Wrap_Pos *w)
  #define WRAP_POS_INIT_END(w) (w.l = scheme_null, w.a = NULL, w.is_limb = 0, 
 w.pos = 0)
  #define WRAP_POS_END_P(w) SCHEME_NULLP(w.l)
  #define WRAP_POS_FIRST(w) w.a
 -#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb= 
 (w2).is_limb; w.pos = (w2).pos
 +#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb = 
 (w2).is_limb; w.pos = (w2).pos

  /* Walking backwards through one chunk: */

 @@ -3618,8 +3618,9 @@ static Scheme_Object *resolve_env(WRAP_POS *_wraps,
    if (_wraps) {
      WRAP_POS_COPY(wraps, *_wraps);
      WRAP_POS_INC(wraps);
 -  } else
 +  } else {
      WRAP_POS_INIT(wraps, ((Scheme_Stx *)a)-wraps);
 +  }

    while (1) {
      if (WRAP_POS_END_P(wraps)) {

 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev




-- 
Jay McCarthy j...@cs.byu.edu
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

The glory of God is Intelligence - DC 93

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [plt] Push #23267: master branch updated

2011-08-16 Thread Jon Rafkind
Oh sorry, I meant how did the bug manifest itself in racket programs.

On 08/16/2011 11:02 AM, Jay McCarthy wrote:
 The C macro expanded into more than a single expression, but there was
 no {} after the else, so the latter expressions always ran.

 This is a great example :)

 Jay

 On Tue, Aug 16, 2011 at 11:00 AM, Jon Rafkind rafk...@cs.utah.edu wrote:
 What was the bug? :)

 On 08/16/2011 10:43 AM, mfl...@racket-lang.org wrote:
 mflatt has updated `master' from d05f138ed2 to 311d55b5cf.
   http://git.racket-lang.org/plt/d05f138ed2..311d55b5cf

 =[ 1 Commits ]==

 Directory summary:
  100.0% src/racket/src/

 ~~

 311d55b Matthew Flatt mfl...@racket-lang.org 2011-08-16 10:27
 :
 | fix bug that affects `free-identifier=?'
 |
 | This bug is in the amazing that it lurked for years category,
 | as well as the stupid use of C preprocessor category.
 :
   M src/racket/src/syntax.c |5 +++--

 =[ Overall Diff ]===

 src/racket/src/syntax.c
 ~~~
 --- OLD/src/racket/src/syntax.c
 +++ NEW/src/racket/src/syntax.c
 @@ -365,7 +365,7 @@ XFORM_NONGCING static MZ_INLINE void 
 DO_WRAP_POS_INC(Wrap_Pos *w)
  #define WRAP_POS_INIT_END(w) (w.l = scheme_null, w.a = NULL, w.is_limb = 
 0, w.pos = 0)
  #define WRAP_POS_END_P(w) SCHEME_NULLP(w.l)
  #define WRAP_POS_FIRST(w) w.a
 -#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb= 
 (w2).is_limb; w.pos = (w2).pos
 +#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb = 
 (w2).is_limb; w.pos = (w2).pos

  /* Walking backwards through one chunk: */

 @@ -3618,8 +3618,9 @@ static Scheme_Object *resolve_env(WRAP_POS *_wraps,
if (_wraps) {
  WRAP_POS_COPY(wraps, *_wraps);
  WRAP_POS_INC(wraps);
 -  } else
 +  } else {
  WRAP_POS_INIT(wraps, ((Scheme_Stx *)a)-wraps);
 +  }

while (1) {
  if (WRAP_POS_END_P(wraps)) {
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev




_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Fwd: ace?

2011-08-16 Thread Eli Barzilay
6 hours ago, Matthias Felleisen wrote:
 
 Here is a site that comes with demos/shots that are simple and yet
 interactive and thus impressive. I am wondering whether we could
 turn our little code snippets into stuff that people can run and
 possibly even modify and run. We may have to 'cheat' and use
 WhaleSong in the background to power some of our graphical animated
 stuff but hey WhaleSong is close enough to our world.

Isn't this just a JS-based editor?

As for interactive examples, that would be easy with a sandbox.  The
usual caveats are that it won't be able to show off functionality
related to FS operations, FFI, GUI, and probably a few more.

(And BTW, the wiki will have such sandboxed evaluation -- my design is
that every wiki page is actually a module that gets evaluated to
produce the rendered text.)

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23267: master branch updated

2011-08-16 Thread Vincent St-Amour
Here's the simplest example I could come up with:

In `dummy.rkt':

#lang s-exp dummy-lang.rkt

In `dummy-lang.rkt':

#lang racket/base
(provide (rename-out (module-begin #%module-begin)))
(require (for-syntax racket/base))

(define-syntax (module-begin stx)
  #'(#%module-begin
 (define x 3)
 (define (f x) x x)))


Looking at the fully expanded version of `dummy.rkt' in the macro
stepper, we can see that all 3 `x's in the definition of `f' are
`bound-identifier=?', but only the first 2 (the parameter and the
first reference) are `free-identifier=?'.

Vincent


At Tue, 16 Aug 2011 11:04:13 -0600,
Jon Rafkind wrote:
 
 Oh sorry, I meant how did the bug manifest itself in racket programs.
 
 On 08/16/2011 11:02 AM, Jay McCarthy wrote:
  The C macro expanded into more than a single expression, but there was
  no {} after the else, so the latter expressions always ran.
 
  This is a great example :)
 
  Jay
 
  On Tue, Aug 16, 2011 at 11:00 AM, Jon Rafkind rafk...@cs.utah.edu wrote:
  What was the bug? :)
 
  On 08/16/2011 10:43 AM, mfl...@racket-lang.org wrote:
  mflatt has updated `master' from d05f138ed2 to 311d55b5cf.
http://git.racket-lang.org/plt/d05f138ed2..311d55b5cf
 
  =[ 1 Commits ]==
 
  Directory summary:
   100.0% src/racket/src/
 
  ~~
 
  311d55b Matthew Flatt mfl...@racket-lang.org 2011-08-16 10:27
  :
  | fix bug that affects `free-identifier=?'
  |
  | This bug is in the amazing that it lurked for years category,
  | as well as the stupid use of C preprocessor category.
  :
M src/racket/src/syntax.c |5 +++--
 
  =[ Overall Diff ]===
 
  src/racket/src/syntax.c
  ~~~
  --- OLD/src/racket/src/syntax.c
  +++ NEW/src/racket/src/syntax.c
  @@ -365,7 +365,7 @@ XFORM_NONGCING static MZ_INLINE void 
  DO_WRAP_POS_INC(Wrap_Pos *w)
   #define WRAP_POS_INIT_END(w) (w.l = scheme_null, w.a = NULL, w.is_limb = 
  0, w.pos = 0)
   #define WRAP_POS_END_P(w) SCHEME_NULLP(w.l)
   #define WRAP_POS_FIRST(w) w.a
  -#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb= 
  (w2).is_limb; w.pos = (w2).pos
  +#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb = 
  (w2).is_limb; w.pos = (w2).pos
 
   /* Walking backwards through one chunk: */
 
  @@ -3618,8 +3618,9 @@ static Scheme_Object *resolve_env(WRAP_POS *_wraps,
 if (_wraps) {
   WRAP_POS_COPY(wraps, *_wraps);
   WRAP_POS_INC(wraps);
  -  } else
  +  } else {
   WRAP_POS_INIT(wraps, ((Scheme_Stx *)a)-wraps);
  +  }
 
 while (1) {
   if (WRAP_POS_END_P(wraps)) {
  _
   For list-related administrative tasks:
   http://lists.racket-lang.org/listinfo/dev
 
 
 
 
 _
   For list-related administrative tasks:
   http://lists.racket-lang.org/listinfo/dev
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Fwd: ace?

2011-08-16 Thread Neil Van Dyke

Eli Barzilay wrote at 08/16/2011 02:20 PM:

Isn't this just a JS-based editor?
  


CodeMirror a rather nice JS-based text editor for programming languages, 
as JS-based text editors for programming languages go, and includes a 
Scheme language mode.


Danny Yoo has used CodeMirror in the implementation of WeScheme.


As for interactive examples, that would be easy with a sandbox.  The
usual caveats are that it won't be able to show off functionality
related to FS operations, FFI, GUI, and probably a few more.
  


Well, if you wanted to support FS operations and FFI, and you have a 
spare server with the virtualization helper CPU instructions, setting up 
a KVM VM per session is doable for moderate traffic.  (New Linux VM per 
user session; COW disks; pipe each session to a Racket process in the 
respective VM; have a fresh VM loaded in the chamber for the next new 
session)  I'd be willing to bang out a couple Racket libraries to 
control the virtualization, if someone really wanted this.


--
http://www.neilvandyke.org/
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23267: master branch updated

2011-08-16 Thread Stephen Bloch
Wouldn't it be even better to put curly-braces around the body of the C macro, 
so people using it don't have to know that it expands into multiple statements?

Stephen Bloch
sbl...@adelphi.edu
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Fwd: ace?

2011-08-16 Thread Neil Van Dyke

Eli Barzilay wrote at 08/16/2011 02:52 PM:

7 minutes ago, Neil Van Dyke wrote:
  



Well, if you wanted to support FS operations and FFI, and you have a
spare server with the virtualization helper CPU instructions,




This sounds way too expensive for something public.
  


If you wanted to do it, I think it's doable.  It won't hold up to a 
Reddit main page, or anything close to that, but it's going to be idle 
almost all the time, and it might well handle a mention on LtU.  I bet 
your biggest worry is putting the URL on a slide at a conference, and a 
couple of the people who load it up while you're trying to talk decide 
to try to stress-test your server for you, but that's probably 
manageable, too.  I think the questions are whether you want to do it 
and you have a server to dedicate to it.  Just mentioning that it's doable.


--
http://www.neilvandyke.org/
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread Eli Barzilay
Earlier today, Stephen Chang wrote:
 
 It seems like most people agree that it's ok to add stepper syntax
 properties to lazy racket.

I agree with that in general while development is ongoing, but
eventually it should be disconnected too.


 The problem is that the lazy language is split between two files:
 lazy/lazy.rkt and racket/private/promise.rkt, with promise.rkt also
 trying to be a generic library at the same time.

That, I *strongly* object to!  The promise implementation is just
that.  It is *not* a part of the lazy language implementation in a
similar way that `car' is not a part of the implementation of
languages that happen to use it.


 That was fine when a third party didnt need to communicate something
 to both files at once but now the stepper does.
 
 The duplicated function, stepper-syntax-property, is just
 syntax-property with a 'stepper key. If I do what Eli says and only
 use generic documented functions in promise.rkt, I can use
 syntax-property, but I still need to somehow communicate the 'stepper
 key to both lazy.rkt and promise.rkt.

What I object to is the property name, and more importantly, writing
code that is aware that there is a bag of stepper properties.  We
can deal with plain properties just fine, and if a property is generic
enough it should be describable independently.  (And if there's no
easy way to describe it independently, then most likely it should go
away from the general API.)


 Other languages wont have this problem because the implementation is
 likely all in one place. Other tools for lazy racket may have this
 problem if they need to communicate something to both lazy.rkt and
 promise.rkt, but could possibly get away with it if everything can be
 done in the lazy.rkt section of the language.

Lazy is indeed a major client for (composable) promises, but it's not
the only one.  This fact makes it unsurprising that things that the
lazy implementation needs tend to motivate designing and extending the
promise API, but that API is still independent.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Fwd: ace?

2011-08-16 Thread Matthias Felleisen

On Aug 16, 2011, at 2:52 PM, Eli Barzilay wrote:

 7 minutes ago, Neil Van Dyke wrote:
 Eli Barzilay wrote at 08/16/2011 02:20 PM:
 Isn't this just a JS-based editor?
 
 CodeMirror a rather nice JS-based text editor for programming
 languages, as JS-based text editors for programming languages go,
 and includes a Scheme language mode.
 
 I didn't mean to dismiss it as a product (and Danny did tell me about
 it when I said that I'll look for an editor for the wiki but defaulted
 on a plain textarea for now).  Just didn't see any interactive
 examples there.

Go look at all the examples at the CodeMirror site. 
All allow you to edit. Some evaluate. 
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Fwd: ace?

2011-08-16 Thread Eli Barzilay
15 minutes ago, Matthias Felleisen wrote:
 
 Go look at all the examples at the CodeMirror site. 
 All allow you to edit. Some evaluate. 

Which ones?

(The only thing I see is the HTML editor, but that evaluation is done
locally by your browser, so that evaluation is basically just
injecting text into the page and leaving your browser to deal with
it.)

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread Eli Barzilay
Three minutes ago, John Clements wrote:
 
 On Aug 16, 2011, at 4:41 PM, Eli Barzilay wrote:
 
  Earlier today, Stephen Chang wrote:
  
  It seems like most people agree that it's ok to add stepper syntax
  properties to lazy racket.
  
  I agree with that in general while development is ongoing, but
  eventually it should be disconnected too.
 
 I don't see how to do this. To make sure we're on the same page, I'm
 suggesting that it's very difficult to make statements about places
 in the expanded code without adding annotations to the text of the
 expansions themselves.

A possible conclusion would be that it's useful to know these kind of
things about an expanded piece of syntax, and therefore more macros
should do that -- but that's unrelated from the stepper, which is
merely the motivation for requiring such functionality.  Just like
continuation marks being useful for the stepper, becoming part of the
core language, and then getting used for much more.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread John Clements

On Aug 16, 2011, at 5:10 PM, Eli Barzilay wrote:

 Three minutes ago, John Clements wrote:
 
 On Aug 16, 2011, at 4:41 PM, Eli Barzilay wrote:
 
 Earlier today, Stephen Chang wrote:
 
 It seems like most people agree that it's ok to add stepper syntax
 properties to lazy racket.
 
 I agree with that in general while development is ongoing, but
 eventually it should be disconnected too.
 
 I don't see how to do this. To make sure we're on the same page, I'm
 suggesting that it's very difficult to make statements about places
 in the expanded code without adding annotations to the text of the
 expansions themselves.
 
 A possible conclusion would be that it's useful to know these kind of
 things about an expanded piece of syntax, and therefore more macros
 should do that -- but that's unrelated from the stepper, which is
 merely the motivation for requiring such functionality.  Just like
 continuation marks being useful for the stepper, becoming part of the
 core language, and then getting used for much more.

I believe I disagree, but we're still being way too vague.

For instance, consider the stepper-skipto annotations, that specify where in 
an expanded expression the user's original code wound up.  On the one hand, you 
could argue that finding the original expression is a general concept, and 
could be useful independent of the stepper, but in the absence of other tools 
that need to know this, the extra work of developing and documenting this 
general mechanism would seem to constitute a dramatic example of premature 
abstraction.


John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread Eli Barzilay
Four minutes ago, John Clements wrote:
 
 On Aug 16, 2011, at 5:10 PM, Eli Barzilay wrote:
 
  A possible conclusion would be that it's useful to know these kind
  of things about an expanded piece of syntax, and therefore more
  macros should do that -- but that's unrelated from the stepper,
  which is merely the motivation for requiring such functionality.
  Just like continuation marks being useful for the stepper,
  becoming part of the core language, and then getting used for much
  more.
 
 I believe I disagree, but we're still being way too vague.
 
 For instance, consider the stepper-skipto annotations, that
 specify where in an expanded expression the user's original code
 wound up.  On the one hand, you could argue that finding the
 original expression is a general concept, and could be useful
 independent of the stepper, but in the absence of other tools that
 need to know this, the extra work of developing and documenting this
 general mechanism would seem to constitute a dramatic example of
 premature abstraction.

What I'd argue is:

1. There might be a way to get the same without those annotations.
   There's the `syntax-original?' thing, source locations etc.
   Perhaps it is not possible only because some of these need to
   change in minor ways.

2. I'm not sure about the exact details, but there are other uses for
   such functionality (or at least something very similar to it).  For
   example, there's code that I wrote a while ago to find parts of an
   expression that come from the original code for making TR errors
   readable.  (Something that I completely forgot that I did, until we
   talked about it in rcon.)

3. Combining #2 with the fact that the stepper has been around for
   ever (racketly speaking), I don't think that it's premature to talk
   about a general abstaction.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread Matthias Felleisen

Eli is right in principle. I sense that we are facing the same kind of problems 
we faced when we created mixins and then again when we created continuation 
marks.  We need annotations time and again and they couple parts of our system 
more closely than necessary. Problem is, we don't seem to see or have an 
abstraction that eliminates this coupling. 
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread Eli Barzilay
6 minutes ago, Matthias Felleisen wrote:
 
 Eli is right in principle. I sense that we are facing the same kind
 of problems we faced when we created mixins and then again when we
 created continuation marks.  We need annotations time and again and
 they couple parts of our system more closely than necessary. Problem
 is, we don't seem to see or have an abstraction that eliminates this
 coupling.

Maybe a good (re-)start would be to specify the required functionality
more precisely?  Maybe follow the recipe and start with short examples
of what's needed?

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread Sam Tobin-Hochstadt
On Tue, Aug 16, 2011 at 5:31 PM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 Eli is right in principle. I sense that we are facing the same kind of 
 problems we faced when we created mixins and then again when we created 
 continuation marks.  We need annotations time and again and they couple parts 
 of our system more closely than necessary. Problem is, we don't seem to see 
 or have an abstraction that eliminates this coupling.

Aren't syntax properties precisely this abstraction?

-- 
sam th
sa...@ccs.neu.edu

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-16 Thread Matthias Felleisen

On Aug 16, 2011, at 5:42 PM, Sam Tobin-Hochstadt wrote:

 On Tue, Aug 16, 2011 at 5:31 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 Eli is right in principle. I sense that we are facing the same kind of 
 problems we faced when we created mixins and then again when we created 
 continuation marks.  We need annotations time and again and they couple 
 parts of our system more closely than necessary. Problem is, we don't seem 
 to see or have an abstraction that eliminates this coupling.
 
 Aren't syntax properties precisely this abstraction?


It is a mechanism and as such it is an abstraction. But is it the best possible 
abstraction? 

The use of symbols means the use of a protocol: when I see 'x, I will perform 
action A.  So the identity of the symbol is critical. And that means we're 
tying together the two (+) components that are subject to the protocol. If the 
symbol changes in one of them, the other one breaks (the type checker, the 
stepper). 

That's Dan's rule: don't use symbols to impose protocols. (Today's add1 day for 
Dan.) 

What you really want is a name (variable). So at a minimum, two components 
should rely on a shared module that exports a variable to be used instead of a 
symbol. Then you could use (gensym) and nobody could mess with the symbol. 
Identity would be enforced afresh every time you start the system. 

But once you introduce a random name, you see that you want some other 
mechanism that 'mixes' into the compilation process as needed. 

-- Matthias



_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23273: master branch updated

2011-08-16 Thread Stephen Chang
I'm getting some compile errors. Is it due to this checkin?

raco setup: post-installing: mzcom
raco setup: post-installing: mzscheme
raco setup: post-installing: racket/gui
raco setup:
raco setup: error: during making for redex/tests/compiler
raco setup:   compile: identifier used out of context in: compile





On Tue, Aug 16, 2011 at 8:18 PM,  clkl...@racket-lang.org wrote:
 clklein has updated `master' from 52fb1e3460 to cee4566ed4.
  http://git.racket-lang.org/plt/52fb1e3460..cee4566ed4

 =[ 1 Commits ]==

 Directory summary:
  100.0% collects/redex/tests/

 ~~

 cee4566 Casey Klein clkl...@racket-lang.org 2011-08-16 19:17
 :
 | Makes test work when compilation strips source locations
 :
  M collects/redex/tests/check-syntax-test.rkt |   43 -

 =[ Overall Diff ]===

 collects/redex/tests/check-syntax-test.rkt
 ~~
 --- OLD/collects/redex/tests/check-syntax-test.rkt
 +++ NEW/collects/redex/tests/check-syntax-test.rkt
 @@ -7,6 +7,19 @@

  (reset-count)

 +(define-syntax (identifier stx)
 +  (syntax-case stx ()
 +    [(_ x)
 +     (identifier? #'x)
 +     #`(let ([p (open-input-string (format ~s 'x))])
 +         (port-count-lines! p)
 +         (set-port-next-location!
 +          p
 +          #,(syntax-line #'x)
 +          #,(syntax-column #'x)
 +          #,(syntax-position #'x))
 +         (read-syntax '#,(syntax-source #'x) p))]))
 +
  (define (source stx)
   (list (syntax-source stx)
         (syntax-line stx)
 @@ -64,15 +77,15 @@
   (define-values (add-syntax done)
     (make-traversal module-namespace #f))

 -  (define language-def-name #'L)
 -  (define language-use-name #'L)
 +  (define language-def-name (identifier L))
 +  (define language-use-name (identifier L))

 -  (define mode-name #'J)
 -  (define contract-name #'J)
 -  (define conclusion-name #'J)
 -  (define premise-name #'J)
 -  (define render-name #'J)
 -  (define holds-name #'J)
 +  (define mode-name (identifier J))
 +  (define contract-name (identifier J))
 +  (define conclusion-name (identifier J))
 +  (define premise-name (identifier J))
 +  (define render-name (identifier J))
 +  (define holds-name (identifier J))

   (define language-binding
     (list language-def-name language-use-name))
 @@ -106,14 +119,14 @@
   (define-values (add-syntax done)
     (make-traversal module-namespace #f))

 -  (define language-def-name #'L)
 -  (define language-use-name #'L)
 +  (define language-def-name (identifier L))
 +  (define language-use-name (identifier L))

 -  (define contract-name #'f)
 -  (define lhs-name #'f)
 -  (define rhs-name #'f)
 -  (define render-name #'f)
 -  (define term-name #'f)
 +  (define contract-name (identifier f))
 +  (define lhs-name (identifier f))
 +  (define rhs-name (identifier f))
 +  (define render-name (identifier f))
 +  (define term-name (identifier f))

   (define language-binding
     (list language-def-name language-use-name))


_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23273: master branch updated

2011-08-16 Thread Casey Klein
No, the build failure is due to this bug:

http://bugs.racket-lang.org/query/?cmd=viewpr=12116

I'd be happy to avoid building redex/tests/compiler temporarily, but I
don't know how to do that, short of removing it from the repository
entirely.

On Tue, Aug 16, 2011 at 7:39 PM, Stephen Chang stch...@ccs.neu.edu wrote:
 I'm getting some compile errors. Is it due to this checkin?

 raco setup: post-installing: mzcom
 raco setup: post-installing: mzscheme
 raco setup: post-installing: racket/gui
 raco setup:
 raco setup: error: during making for redex/tests/compiler
 raco setup:   compile: identifier used out of context in: compile





 On Tue, Aug 16, 2011 at 8:18 PM,  clkl...@racket-lang.org wrote:
 clklein has updated `master' from 52fb1e3460 to cee4566ed4.
  http://git.racket-lang.org/plt/52fb1e3460..cee4566ed4

 =[ 1 Commits ]==

 Directory summary:
  100.0% collects/redex/tests/

 ~~

 cee4566 Casey Klein clkl...@racket-lang.org 2011-08-16 19:17
 :
 | Makes test work when compilation strips source locations
 :
  M collects/redex/tests/check-syntax-test.rkt |   43 
 -

 =[ Overall Diff ]===

 collects/redex/tests/check-syntax-test.rkt
 ~~
 --- OLD/collects/redex/tests/check-syntax-test.rkt
 +++ NEW/collects/redex/tests/check-syntax-test.rkt
 @@ -7,6 +7,19 @@

  (reset-count)

 +(define-syntax (identifier stx)
 +  (syntax-case stx ()
 +    [(_ x)
 +     (identifier? #'x)
 +     #`(let ([p (open-input-string (format ~s 'x))])
 +         (port-count-lines! p)
 +         (set-port-next-location!
 +          p
 +          #,(syntax-line #'x)
 +          #,(syntax-column #'x)
 +          #,(syntax-position #'x))
 +         (read-syntax '#,(syntax-source #'x) p))]))
 +
  (define (source stx)
   (list (syntax-source stx)
         (syntax-line stx)
 @@ -64,15 +77,15 @@
   (define-values (add-syntax done)
     (make-traversal module-namespace #f))

 -  (define language-def-name #'L)
 -  (define language-use-name #'L)
 +  (define language-def-name (identifier L))
 +  (define language-use-name (identifier L))

 -  (define mode-name #'J)
 -  (define contract-name #'J)
 -  (define conclusion-name #'J)
 -  (define premise-name #'J)
 -  (define render-name #'J)
 -  (define holds-name #'J)
 +  (define mode-name (identifier J))
 +  (define contract-name (identifier J))
 +  (define conclusion-name (identifier J))
 +  (define premise-name (identifier J))
 +  (define render-name (identifier J))
 +  (define holds-name (identifier J))

   (define language-binding
     (list language-def-name language-use-name))
 @@ -106,14 +119,14 @@
   (define-values (add-syntax done)
     (make-traversal module-namespace #f))

 -  (define language-def-name #'L)
 -  (define language-use-name #'L)
 +  (define language-def-name (identifier L))
 +  (define language-use-name (identifier L))

 -  (define contract-name #'f)
 -  (define lhs-name #'f)
 -  (define rhs-name #'f)
 -  (define render-name #'f)
 -  (define term-name #'f)
 +  (define contract-name (identifier f))
 +  (define lhs-name (identifier f))
 +  (define rhs-name (identifier f))
 +  (define render-name (identifier f))
 +  (define term-name (identifier f))

   (define language-binding
     (list language-def-name language-use-name))



_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23273: master branch updated

2011-08-16 Thread Casey Klein
On Tue, Aug 16, 2011 at 7:48 PM, Casey Klein
clkl...@eecs.northwestern.edu wrote:
 No, the build failure is due to this bug:

 http://bugs.racket-lang.org/query/?cmd=viewpr=12116

 I'd be happy to avoid building redex/tests/compiler temporarily, but I
 don't know how to do that, short of removing it from the repository
 entirely.


(That code isn't actually used anywhere.)
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23273: master branch updated

2011-08-16 Thread Eli Barzilay
30 minutes ago, Casey Klein wrote:
 No, the build failure is due to this bug:
 
 http://bugs.racket-lang.org/query/?cmd=viewpr=12116
 
 I'd be happy to avoid building redex/tests/compiler temporarily, but
 I don't know how to do that, short of removing it from the
 repository entirely.

You can add it to the omit list at collects/tests/info.rkt.  Most
tests are omitted, partly because many relied on planet packages,
which makes it a bad idea to compile them (since running setup should
usually not rely on user-specific stuff).

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] [plt] Push #23273: master branch updated

2011-08-16 Thread Matthew Flatt
I think I have a repair for the bug, but I'm still checking.

At Tue, 16 Aug 2011 21:17:39 -0400, Eli Barzilay wrote:
 30 minutes ago, Casey Klein wrote:
  No, the build failure is due to this bug:
  
  http://bugs.racket-lang.org/query/?cmd=viewpr=12116
  
  I'd be happy to avoid building redex/tests/compiler temporarily, but
  I don't know how to do that, short of removing it from the
  repository entirely.
 
 You can add it to the omit list at collects/tests/info.rkt.  Most
 tests are omitted, partly because many relied on planet packages,
 which makes it a bad idea to compile them (since running setup should
 usually not rely on user-specific stuff).

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev