Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread David Herman

- "Jay McCarthy"  wrote:

> If...

Was that a McCarthy conditional?

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


Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Eli Barzilay
Three minutes ago, Robby Findler wrote:
> On Tue, Nov 16, 2010 at 4:19 PM, Eli Barzilay  wrote:
> >
> > Sounds to me like the classic problem that some "symbolic" people
> > have when they don't "get" hygiene (usually ending up in
> > `defmacro' nostalgia where "symbols are symbols", possibly
> > together with `eval' abuse).
> 
> That example in the end of the quoted region is somehow turning a
> procedure back into a datum by passing it to car/cdr. (strange!)

Yeah, that's part of why it looked even more confused than I initially
thought.  I don't remember ever seeing a real scheme where functions
were represented as lists that way.  (Not counting reflective toys, of
course.)  His lack of `caddr' also makes me think that he's not a
native speaker...


Two minutes ago, Shriram Krishnamurthi wrote:
> You know, it's not inconceivable such a thing could happen if you
> had a PURELY syntactic *interpreter*.
> 
> I remember when I got to Brown, they were using one of those weirdo
> Scheme interpreters, and had come to conclusions about the semantics
> of Scheme on the basis of its behavior.  Things like you could run
> 
> ('(lambda (x) x) 3)
> 
> and it would evaluate to 3 because of the way the interpreter was
> structured.

And an obvious question is what would

  (let ([x 1]) ('(lambda () ,x)))

evaluate to?

In any case, if you swallow that pill and take a dose of dynamic scope
too, you end up with newlisp.  (Which I think makes perfect sense in
that world.)

-- 
  ((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] OT: stump misunderstands Scheme?

2010-11-16 Thread Jay McCarthy
On Tue, Nov 16, 2010 at 3:25 PM, Sam Tobin-Hochstadt  wrote:
> On Tue, Nov 16, 2010 at 5:22 PM, Shriram Krishnamurthi  
> wrote:
>> You know, it's not inconceivable such a thing could happen if you had
>> a PURELY syntactic *interpreter*.
>>
>> I remember when I got to Brown, they were using one of those weirdo
>> Scheme interpreters, and had come to conclusions about the semantics
>> of Scheme on the basis of its behavior.  Things like you could run
>>
>> ('(lambda (x) x) 3)
>>
>> and it would evaluate to 3 because of the way the interpreter was structured.
>>
>> Now if Aaron ran one of those to test his code...
>
> I'm pretty sure that this is also how the original Lisp interpreter
> from McCarthy's paper worked.

If so, it was a bug on my part.

:P

> --
> sam th
> sa...@ccs.neu.edu
> _
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev
>



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

"The glory of God is Intelligence" - D&C 93
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Shriram Krishnamurthi
If you knew his background, you would not expect him to at all be a
native speaker of ().

(Further OT amusement: He, Stephanie, and Tim Sheard had a paper at
last week's FOSER workshop entitled "Language-Based Verification Will
Change the World".  Apparently, dependent types are both necessary and
sufficient.)

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


Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Eli Barzilay
Three minutes ago, Sam Tobin-Hochstadt wrote:
> On Tue, Nov 16, 2010 at 5:22 PM, Shriram Krishnamurthi  
> wrote:
> > ('(lambda (x) x) 3)
> >
> > and it would evaluate to 3 because of the way the interpreter was
> > structured.
> >
> > Now if Aaron ran one of those to test his code...
> 
> I'm pretty sure that this is also how the original Lisp interpreter
> from McCarthy's paper worked.

(And in elisp too, btw: (funcall '(lambda (x) x) 3).)

-- 
  ((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] OT: stump misunderstands Scheme?

2010-11-16 Thread Shriram Krishnamurthi
Good point.  I never thought of it this way, but this is another
argument in favor of dynamic scope.  [tongue in cheek]

Shriram

On Tue, Nov 16, 2010 at 5:25 PM, Sam Tobin-Hochstadt  wrote:
> On Tue, Nov 16, 2010 at 5:22 PM, Shriram Krishnamurthi  
> wrote:
>> You know, it's not inconceivable such a thing could happen if you had
>> a PURELY syntactic *interpreter*.
>>
>> I remember when I got to Brown, they were using one of those weirdo
>> Scheme interpreters, and had come to conclusions about the semantics
>> of Scheme on the basis of its behavior.  Things like you could run
>>
>> ('(lambda (x) x) 3)
>>
>> and it would evaluate to 3 because of the way the interpreter was structured.
>>
>> Now if Aaron ran one of those to test his code...
>
> I'm pretty sure that this is also how the original Lisp interpreter
> from McCarthy's paper worked.
> --
> sam th
> sa...@ccs.neu.edu
>
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Sam Tobin-Hochstadt
On Tue, Nov 16, 2010 at 5:22 PM, Shriram Krishnamurthi  
wrote:
> You know, it's not inconceivable such a thing could happen if you had
> a PURELY syntactic *interpreter*.
>
> I remember when I got to Brown, they were using one of those weirdo
> Scheme interpreters, and had come to conclusions about the semantics
> of Scheme on the basis of its behavior.  Things like you could run
>
> ('(lambda (x) x) 3)
>
> and it would evaluate to 3 because of the way the interpreter was structured.
>
> Now if Aaron ran one of those to test his code...

I'm pretty sure that this is also how the original Lisp interpreter
from McCarthy's paper worked.
-- 
sam th
sa...@ccs.neu.edu
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Shriram Krishnamurthi
Yep, that's exactly what was happening with the thing they ran at
Brown.  It was that system by that guy in Nice -- Erik Galliseo or
something like that.

Shriram

On Tue, Nov 16, 2010 at 5:21 PM, Robby Findler
 wrote:
> On Tue, Nov 16, 2010 at 4:19 PM, Eli Barzilay  wrote:
>> 5 minutes ago, John Clements wrote:
>>> I'm reading Aaron Stump's "Directly Reflective Meta-Programming,"
>>> and it appears to me that either he misunderstands Scheme, or that I
>>> misunderstand it.
>>
>> Sounds to me like the classic problem that some "symbolic" people have
>> when they don't "get" hygiene (usually ending up in `defmacro'
>> nostalgia where "symbols are symbols", possibly together with `eval'
>> abuse).
>
> That example in the end of the quoted region is somehow turning a
> procedure back into a datum by passing it to car/cdr. (strange!)
>
> Robby
> _
>  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] OT: stump misunderstands Scheme?

2010-11-16 Thread Shriram Krishnamurthi
You know, it's not inconceivable such a thing could happen if you had
a PURELY syntactic *interpreter*.

I remember when I got to Brown, they were using one of those weirdo
Scheme interpreters, and had come to conclusions about the semantics
of Scheme on the basis of its behavior.  Things like you could run

('(lambda (x) x) 3)

and it would evaluate to 3 because of the way the interpreter was structured.

Now if Aaron ran one of those to test his code...

Shriram

On Tue, Nov 16, 2010 at 5:19 PM, Eli Barzilay  wrote:
> 5 minutes ago, John Clements wrote:
>> I'm reading Aaron Stump's "Directly Reflective Meta-Programming,"
>> and it appears to me that either he misunderstands Scheme, or that I
>> misunderstand it.
>
> Sounds to me like the classic problem that some "symbolic" people have
> when they don't "get" hygiene (usually ending up in `defmacro'
> nostalgia where "symbols are symbols", possibly together with `eval'
> abuse).
>
>> Are there many Scheme dialects in which his use of quasiquote to
>> embed a 3d value would successfully pry open the syntactic term?
>
> (That lookes much more confused on a more basic level...)
>
> --
>          ((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
>
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Robby Findler
On Tue, Nov 16, 2010 at 4:19 PM, Eli Barzilay  wrote:
> 5 minutes ago, John Clements wrote:
>> I'm reading Aaron Stump's "Directly Reflective Meta-Programming,"
>> and it appears to me that either he misunderstands Scheme, or that I
>> misunderstand it.
>
> Sounds to me like the classic problem that some "symbolic" people have
> when they don't "get" hygiene (usually ending up in `defmacro'
> nostalgia where "symbols are symbols", possibly together with `eval'
> abuse).

That example in the end of the quoted region is somehow turning a
procedure back into a datum by passing it to car/cdr. (strange!)

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


Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Eli Barzilay
5 minutes ago, John Clements wrote:
> I'm reading Aaron Stump's "Directly Reflective Meta-Programming,"
> and it appears to me that either he misunderstands Scheme, or that I
> misunderstand it.

Sounds to me like the classic problem that some "symbolic" people have
when they don't "get" hygiene (usually ending up in `defmacro'
nostalgia where "symbols are symbols", possibly together with `eval'
abuse).

> Are there many Scheme dialects in which his use of quasiquote to
> embed a 3d value would successfully pry open the syntactic term?

(That lookes much more confused on a more basic level...)

-- 
  ((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] OT: stump misunderstands Scheme?

2010-11-16 Thread John Clements

On Nov 16, 2010, at 2:17 PM, Shriram Krishnamurthi wrote:

> Though also cycle back to us.  I'm curious to hear what he has to say.

Will do.

John



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

Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Shriram Krishnamurthi
Though also cycle back to us.  I'm curious to hear what he has to say.

Shriram

On Tue, Nov 16, 2010 at 5:13 PM, Robby Findler
 wrote:
> That expression at the end is somehow turning a procedure back into
> its quoted form. I have no idea if a Scheme that did that would be R5
> or not, but Racket definitely does not allow that (and neither did any
> other programming language that I've ever worked on).
>
> Overall, I'd say, you should contact Aaron directly, instead of asking here.
>
> Robby
>
> On Tue, Nov 16, 2010 at 4:07 PM, John Clements
>  wrote:
>> I'm reading Aaron Stump's "Directly Reflective Meta-Programming," and it 
>> appears to me that either he misunderstands Scheme, or that I misunderstand 
>> it. Are there many Scheme dialects in which his use of quasiquote to embed a 
>> 3d value would successfully pry open the syntactic term?
>>
>> (Excerpt below)
>>
>> Sorry for the OT post,
>>
>> John
>>
>>
>>
>> 2.1.2   Variables in Meta-Programming
>>
>> A meta-programming language is scope safe (or hygienic) iff variables may 
>> not be captured or escape their scopes during computation. Dynamic variables 
>> in Emacs LISP and Common LISP are a good example of a violation of scope 
>> safety [30, 24]. Scheme R5RS’s macro language is designed to be scope safe 
>> [21]. Other constructs in Scheme R5RS, however, enable violation of scope 
>> safety, even though the language does not have dynamic variables. For a 
>> violation of scope safety in spirit, though not technically, we have that 
>> (caddr ’(lambda (x) x)) evaluates to x. According to the R5RS language 
>> definition, ’(lambda (x) x) is a literal expression, and hence the 
>> occurrences of x in it are not variables at all, but just (unscoped) literal 
>> data. So in this example, a variable has been created (namely, the resulting 
>> unquoted x), but not by means of removing it from its scope. Using 
>> quasiquotation, however, the example may be modified to give a true 
>> violation of scope safety. The following expression extracts the variable x 
>> from its scope, by transforming the binding lambda expression into a piece 
>> of literal data, and then extracting and evaluating the quoted variable.
>>
>> ((lambda (y) (eval ‘(car (cdr (cdr ’,y) (lambda (x) x))
>> _
>>  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] OT: stump misunderstands Scheme?

2010-11-16 Thread John Clements

On Nov 16, 2010, at 2:13 PM, Robby Findler wrote:

> That expression at the end is somehow turning a procedure back into
> its quoted form. I have no idea if a Scheme that did that would be R5
> or not, but Racket definitely does not allow that (and neither did any
> other programming language that I've ever worked on).
> 
> Overall, I'd say, you should contact Aaron directly, instead of asking here.

OKTHX



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

Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread Robby Findler
That expression at the end is somehow turning a procedure back into
its quoted form. I have no idea if a Scheme that did that would be R5
or not, but Racket definitely does not allow that (and neither did any
other programming language that I've ever worked on).

Overall, I'd say, you should contact Aaron directly, instead of asking here.

Robby

On Tue, Nov 16, 2010 at 4:07 PM, John Clements
 wrote:
> I'm reading Aaron Stump's "Directly Reflective Meta-Programming," and it 
> appears to me that either he misunderstands Scheme, or that I misunderstand 
> it. Are there many Scheme dialects in which his use of quasiquote to embed a 
> 3d value would successfully pry open the syntactic term?
>
> (Excerpt below)
>
> Sorry for the OT post,
>
> John
>
>
>
> 2.1.2   Variables in Meta-Programming
>
> A meta-programming language is scope safe (or hygienic) iff variables may not 
> be captured or escape their scopes during computation. Dynamic variables in 
> Emacs LISP and Common LISP are a good example of a violation of scope safety 
> [30, 24]. Scheme R5RS’s macro language is designed to be scope safe [21]. 
> Other constructs in Scheme R5RS, however, enable violation of scope safety, 
> even though the language does not have dynamic variables. For a violation of 
> scope safety in spirit, though not technically, we have that (caddr ’(lambda 
> (x) x)) evaluates to x. According to the R5RS language definition, ’(lambda 
> (x) x) is a literal expression, and hence the occurrences of x in it are not 
> variables at all, but just (unscoped) literal data. So in this example, a 
> variable has been created (namely, the resulting unquoted x), but not by 
> means of removing it from its scope. Using quasiquotation, however, the 
> example may be modified to give a true violation of scope safety. The 
> following expression extracts the variable x from its scope, by transforming 
> the binding lambda expression into a piece of literal data, and then 
> extracting and evaluating the quoted variable.
>
> ((lambda (y) (eval ‘(car (cdr (cdr ’,y) (lambda (x) x))
> _
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev
>
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev