Re: [racket-dev] check-match?

2012-11-19 Thread Shriram Krishnamurthi
We use test in PLAI, and I suggested it in that context (eg,
unification, where you don't care about the gensym'ed names of logic
variables), which is probably why it got called that.

On Mon, Nov 19, 2012 at 8:01 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 Yeah, that is very nice! (It should begin with check not test tho,
 right?)

 Robby


 On Monday, November 19, 2012, Matthias Felleisen wrote:


 That is cute. Why don't you just create a pull request and Ryan can
 integrate it into rackunit? -- Matthias





 On Nov 19, 2012, at 4:22 PM, Joe Gibbs Politz wrote:

  A small suggestion:
 
  I used roughly this macro (credit Jonah Kagan) recently to help me write
  some tests for parsing code that agnostic to which source position is
  generated in the parse:
 
  (define-syntax test/match
(syntax-rules ()
  [(test/match actual expected pred)
   (let ([actual-val actual])
 (with-check-info* (list (make-check-actual actual-val)
 (make-check-expected 'expected))
   (thunk (check-true (match actual-val
  [expected pred]
  [_ false])]
 
  [(test/match actual expected)
   (test/match actual expected true)]))
 
  Shriram remarked that he was surprised some sort of check-match wasn't
  in rackunit already.  Is it worth adding something like this?
 
  I'm doing things like:
 
  (test/match (parse 5 'foo') (s-block _ (list (s-num _ 5) (s-str _
  foo
 
  Where the structs s-block, s-num, and s-str all expect a srcloc as their
  first argument, but I don't care about it for these tests.
 
  The actual use is at:
 
 
  https://github.com/brownplt/pyret-lang/blob/master/src/tests/parse-tests.rkt#L36
 
  That file would be much, much uglier without this macro.
 
  Cheers,
  Joe P.
 
  _
   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] check-match?

2012-11-19 Thread Shriram Krishnamurthi
Predicates in general would be really awesome.  I think the testing
infrastructure for Sperber's book (DMDA) has something like this.

Making it lightweight is what matters most, whether through a new
match form or a more general predicate form.

Shriram

On Mon, Nov 19, 2012 at 8:25 PM, David Van Horn dvanh...@ccs.neu.edu wrote:
 On 11/19/12 8:20 PM, Joe Gibbs Politz wrote:

   Yeah, that is very nice! (It should begin with check not test
 tho, right?)

 Indeed; Jonah was writing w.r.t plai, which uses test.  Should use
 check- in rackunit.

 I noticed that this also violates, from the rackunit docs:

 Although checks are implemented as macros, which is necessary to grab
 source location, they are conceptually functions. This means, for
 instance, checks always evaluate their arguments.

 I suppose this should go in a separate section of additional checks or
 some such?


 Maybe the right thing to do is make it lightweight to write predicates with
 match so that you don't even need a separate testing form?

 Something like (? P) = (lambda (x) (match x [P true] [_ false]))

 David



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


Re: [racket-dev] [racket] Disable/Enable Tests

2011-11-28 Thread Shriram Krishnamurthi
 It would be a whole lot nicer to insert (disable-tests) and 
 (enable-tests) in the code, or perhaps to wrap a bunch of lines of code in 
 (with-tests-disabled ...) or (with-tests-enabled ...)

The Tracer does essentially this in reverse: by default you use the
Tracer language and nothing happens (ie, code runs and produces
answers but there's no visible tracing), but you can turn on tracing
with:

1.1 (trace-failed-checks)

Adding (trace-failed-checks) will trace only failing checks, including
failed instances of check-expect, check-within, check-error,
check-member-of, and check-range.

1.2 (trace-all)

Adding (trace-all) will trace all top level expressions and failed checks.

1.3 (trace-explicit)

Adding (trace-explicit) will trace failing checks and any expression
wrapped in (trace ...).

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


[racket-dev] shared no longer works on cons?!?

2011-10-20 Thread Shriram Krishnamurthi
According to my class notes from last year, the following examples
worked just fine in ASL:

(define web-colors
  (shared ([W (cons white G)]
   [G (cons grey W)])
W))

; Will fail with error:
; (length web-colors)

(check-expect (equal? web-colors (rest web-colors)) false)
(check-expect (equal? web-colors (rest (rest web-colors))) true)

(check-expect (first web-colors) white)
(check-expect (first (rest web-colors)) grey)
(check-expect (first (rest (rest web-colors))) white)
(check-expect (first (rest (rest (rest web-colors grey)
(check-expect (first (rest (rest (rest (rest web-colors) white)
(check-expect (first (rest (rest (rest (rest (rest web-colors)) grey)

Yet none of these work any longer:

 (first web-colors)
first: expects a non-empty list; given (shared ((-0- (cons white
(cons grey -0- -0-)
 (rest web-colors)
rest: expects a non-empty list; given (shared ((-0- (cons white
(cons grey -0- -0-)

When did this change occur?  And more importantly, what is the use of
letting cons to be written inside shared if you can't extract it?  How
else is one supposed to extract from cons if not using first/rest?

(Oddly, list-ref seems to work for extraction even though first and
rest do not.  I can anticipate numerous questions -- to which I don't
know the answer -- as to why this is the case.)

Several of my next few lectures depend on this working, so I'm a
little dismayed by this.

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


Re: [racket-dev] shared no longer works on cons?!?

2011-10-20 Thread Shriram Krishnamurthi
Since I'm anyway providing my own custom language, can I provide car
as first and cdr as rest?  Can you think of any unexpected
consequences offhand that would prevent that?

(The only one I can think of so far is that second and friends don't
work either, so I have to provide first, second, ... tenth afresh in
terms of cad*r.)

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


Re: [racket-dev] shared no longer works on cons?!?

2011-10-20 Thread Shriram Krishnamurthi
Thanks for the help with the patch.  But because I'm providing my own
language, I think there's a cleaner solution.

I anyway planned to release a new version of the course language in
the morning that turned on shared printing, so this would mesh nicely.

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


Re: [racket-dev] shared no longer works on cons?!?

2011-10-20 Thread Shriram Krishnamurthi
Yeah, I caught that in the patch, thanks.

I think it's the lesser of two evils for me right now (to export car
as first, etc), and the price here is indeed very low.  But thanks for
the reminder, so I'm alert to it.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] struct + match not interacting via a macro

2011-10-10 Thread Shriram Krishnamurthi
On Mon, Oct 10, 2011 at 8:13 AM, Jay McCarthy jay.mccar...@gmail.com wrote:
 And if it isn't clear, since it is looking at foo's static binding,
 your macro is only binding the values from define-struct, not the
 syntaxes.

Jay, can you elaborate?  What is doing the looking -- the match struct
clause?  What does it mean to look at foo's static binding?

I understand that my macro is binding only the values, not the
original syntaxes (other than foo itself, which is carried through
from the user's source).  The name struct:foo here is completely
synthetic because it's being introduced by build-struct-names.  Is
that what you're referring to?

In that case, does writing such a macro require an explicit breaking
of hygiene?

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


Re: [racket-dev] struct + match not interacting via a macro

2011-10-10 Thread Shriram Krishnamurthi
I'm afraid omit-defined-values didn't work.  I'm not entirely sure how
to carry through Jay's proposal, and I also need something that will
work inside the local context of ASL (which imposes some
restrictions).  Joe Politz suggested I just go with SET! instead --
roughly,

--
(begin
  (define-struct ...)
  (set! ...))

which can be made to work in a local context --

--
(begin
  (define-struct ...)
  (set! dummy ...))

and so on, but now local is trying to parse the define-struct, and
doesn't like #:mutable, and removing that means that the name of the
mutator appears to Racket to be unbound because of hygiene.  Let's see
what else I can do!

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


Re: [racket-dev] struct + match not interacting via a macro

2011-10-10 Thread Shriram Krishnamurthi
Wait, now I realize I misunderstood Sam's proposal.  Doesn't this just
make all structs into lists?  Like back to the bad old days of 1995?
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] struct + match not interacting via a macro

2011-10-09 Thread Shriram Krishnamurthi
What exactly does the struct form of match (in the ASL language) use
to identify the structure?  The following works fine:

(define-struct foo (a b))

(match (make-foo 1 2)
  [(struct foo (x y))
   (+ x y)])

But I have a macro over define-struct for which I get the error

  match: foo does not refer to a structure definition in: foo

(pointing at the foo in struct foo (x y)).

My macro uses build-struct-names to synthesize the names of the
constructor, selectors, etc.  It binds all these names (including the
struct:foo name); for good measure I'm also binding foo.  The
coloring in the Macro Stepper isn't instructive (to me, anyway --
there is only one step of reduction before the error).

Here is the sample output (... elides irrelevant detail):

(define-struct: foo ([a : Number$] [b : Number$]))

--

(begin
 (define-values (foo struct:foo make-foo foo? foo-a set-foo-a!
foo-b set-foo-b!)
   (let ()
 (begin
   (define-struct foo (a b) #:transparent #:mutable)
   (let ([make-foo
  (lambda (a b) ...)]
 [set-foo-a! (lambda (struct-inst new-val) ...)]
 [set-foo-b! (lambda (struct-inst new-val) ...)])
 (values foo struct:foo make-foo foo? foo-a set-foo-a!
foo-b set-foo-b!))

Any ideas?

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


Re: [racket-dev] plea for short planet syntax in student languages?

2011-10-06 Thread Shriram Krishnamurthi
What they import is orthogonal to the syntax for importing.

 How about this experiment: everyone teach in plain Racket for a while
 and see whether teaching language restrictions are really needed.

That would be a good experiment.  My own suspicion is that getting rid
of implicit begin will prove to be absolutely vital, and will cover
about 75% of all the problems.  There may be one or two more important
cases, followed by a very long tail.

But if we only think in terms of language restrictions, I don't think
we'll make much progress -- unless we're willing to also consider
(small) language changes (eg, replacing define with defvar and
deffun so we can better distinguish intent and thereby provide
better errors).

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


Re: [racket-dev] ACM publishing and ArXiv

2011-09-30 Thread Shriram Krishnamurthi
With a classification system that really hopes that the past twenty
years never happened.  Real useful.  (And I guess it's the ACM's power
to make it look like they never did!)

Shriram

On Fri, Sep 30, 2011 at 2:22 PM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 ACM conference also classify your paper so
 that people who look for related work and
 may not have quite the right keywords find
 it anyway.

 ;; ---

 Yesterday Stephen found a paper on tracing
 in a lazy language that, despite its title,
 and despite claims in the introduction,
 comes awfully close to what John published
 in essence in ESOP '01.

 But they wrote it in 98 or so.

 Why didn't we find it? The authors published
 in some obscure Australian conference.



 On Sep 30, 2011, at 2:15 PM, Jon Rafkind wrote:

 So what exactly is the benefit of publishing with ACM these days? Is it just 
 to prove that your paper was peer reviewed?

 On 09/30/2011 12:02 PM, John Clements wrote:
 On Sep 30, 2011, at 10:07 AM, John Clements wrote:


 In case you didn't catch Stephanie Weirich's post of this on 
 plus.google.com, here's some very interesting information about ArXiv and 
 ACM and where copyrights intersect.

 It may be that you can avoid much of this by only publishing draft 
 versions of your paper on ArXiv; I Am Not A Lawyer.

 Oh for heaven's sake.  Neglected to post the link.


 http://r6.ca/blog/20110930T012533Z.html


 John




 _
   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


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


Re: [racket-dev] ACM publishing and ArXiv

2011-09-30 Thread Shriram Krishnamurthi
1. We don't have such an organization.  Several companies are trying
to become this.

2. As I pointed out, ACM's classification has little to do with modern
CS.  I struggle to find useful classifiers for many of my papers.  So
it's largely useless for many things I do.  If it's value-add was
classification, the least it could do is keep that current!

If we really relied on the ACM's classifiers, we'd (as a community)
probably have done something about how outdated it is.  The fact that
we just ignore it shows how little anyone uses it.

I take considerable pride in the quality of related-work sections in
my papers.  In the process I search extensively, high and low.  I have
not found the ACM useful in that process, and it's not for lack of
trying, since anything that could make my life easier I would welcome.

So, your arguments are fine in the abstract, but I don't think they
reflect reality.

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


[racket-dev] Racket docs and data-driven design

2011-09-16 Thread Shriram Krishnamurthi
I introduced templates today.  Almost as if on cue, one student asked
whether he could use else instead of (cons?  l).  I told them I was
going to make a MORAL judgment about why it was EVIL, and spent ten
minutes talking about all that.

As class ended, one of my students came up and said,

So why doesn't the Racket language Web site agree with you?

http://docs.racket-lang.org/guide/Lists__Iteration__and_Recursion.html

(Look for [else.)

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


Re: [racket-dev] Racket docs and data-driven design

2011-09-16 Thread Shriram Krishnamurthi
In addition to what Jay said, when the datatype evolves, it's harder
for someone reading the code to tell whether the else was meant to
cover only one other case (and now there's two, and someone forgot to
update the function) or truly all the other cases.

When you have crisp predicates, I see no excuse for using else -- it's
intellectually sloppy and causes both missed early-errors (as Jay
shows) and later pain.  For really complex predicates, it makes sense:

(cond
  [(prime (foo (bar x))) ...]
  [else ...])

offers many advantages over

(cond
  [(prime (foo (bar x))) ...]
  [(not (prime (foo (bar x ...])

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


Re: [racket-dev] code coverage coloring

2011-09-14 Thread Shriram Krishnamurthi
This is for a #lang-language.

Is there a reason this can't be done programatically, like other
things in the language dialog?  I understand it may not be possible in
the current release, but if there's no reason it can't, can you add it
for future releases?  It feels like it is reasonable to consider this
a property of the language (just as how it presents value is such a
property).

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


Re: [racket-dev] code coverage coloring

2011-09-14 Thread Shriram Krishnamurthi
A different line of reasoning is this.  DrRacket gives the impression
that coverage is a property of the language selected for a buffer.
That's why if I have two tabs, one in *SL and another in #lang racket,
one has coverage and other does not, without my having to ever touch
the Details panel.  And this would presumably true when *SL is done as
a #lang instead (which I've repeatedly heard it eventually should be).

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


Re: [racket-dev] code coverage coloring

2011-09-14 Thread Shriram Krishnamurthi
Can't comment on option (b), but option (a) is what I was thinking of.

Isn't the tricky UI question already present, because a language
info can set some of the very same things in the details pane?  I
didn't see this particular option introducing a new problem that was
not already there.

One thing is it'd be nice to make these things work even in textual
mode (for shell/Emacs users) -- things like coverage coloring
presumably just get ignored in that case, as opposed to the code not
running at all because of a MrEd dependency.

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


Re: [racket-dev] code coverage coloring

2011-09-14 Thread Shriram Krishnamurthi
 Just to clarify (a) is a kind of a cheap way out:

I agree.  But (b) sounds like a lot of design and re-implementation
work; it would be unfortunate if that held up doing anything about
(a).

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


[racket-dev] code coverage coloring

2011-09-11 Thread Shriram Krishnamurthi
Is there a way for a custom language to get the coverage coloring
found in student languages?  That is, is there something like how

(run-tests) (display-results)

does the textual equivalent of the check-expect GUI?

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


[racket-dev] CPANTS

2011-09-09 Thread Shriram Krishnamurthi
Do you know about CPANTS?  I just heard about it.  The idea, as I
understand it, translated to our terms, is essentially this:

- every PLaneT package comes with a test suite
- when the package is downloaded, the test suite runs
- if the test suite fails, the user is informed right away (to perhaps
not use the package)
- either way, the outcome of the results, the DrRacket version, the
platform, etc. (presumably the same as the bug report synthesized
info) is broadcast back to CPANTS

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


[racket-dev] planet bug reporting interface

2011-09-06 Thread Shriram Krishnamurthi
[This is intentionally stream-of-consciousness...]

The planet home page doesn't say anything about how to report bugs
(the word bug really only appears in package descriptions, and
error doesn't at all).  The same is true of individual packages.  So
it's really not clear what one should do.

There is also a Top Bug Closers [Trac], which is a bit confusing
because it looks like it *might* be a mechanism for submitting bug
reports, but the Trac interface does not make this obvious.

In addition, clicking on the author's page says what tickets they have
open but not how to create a new one.

To me it's even more confusing that the package's description lists
the # of tickets but doesn't have a link to where/what.

Okay, after nearly eight minutes of searching I found that I need to
look for the New Ticket link!  It was under the fold (ie, I needed
to scroll down) in my browser.

This was all probably completely intuitive to the designer, but it
wasn't at all so to me even though, as outlined, I was trying my
darndest to find a way to report a problem, but couldn't find how.

I suggest that there are already enough words floating around (bug,
error, problem, issue) that adding one more (ticket) is
unnecessary.  I recognize that ticket is more neutral (eg, can include
a feature request), but still.

Also, I think a prominent link entitled something like Report a
problem (ideally the same text as in the Help menu -- so I guess
Submit Bug Report...)  would be good.  Of course, that then takes
you to to the open bugs portion of the package.  In the CSS styling
there, a little more space around the line with [All Tickets] [New
Ticket] would also make it easier to find the latter.

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


Re: [racket-dev] planet bug reporting interface

2011-09-06 Thread Shriram Krishnamurthi
Understood.  Hopefully the UI/UX comments in my message will help as
you're designing 2.0.

On Tue, Sep 6, 2011 at 9:25 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 FWIW, ticket is a trac term and while I agree that it would be good
 to avoid another piece of vocab, that's not something I think we'll
 change before planet 2.0.

 Robby

 On Tue, Sep 6, 2011 at 8:20 AM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 [This is intentionally stream-of-consciousness...]

 The planet home page doesn't say anything about how to report bugs
 (the word bug really only appears in package descriptions, and
 error doesn't at all).  The same is true of individual packages.  So
 it's really not clear what one should do.

 There is also a Top Bug Closers [Trac], which is a bit confusing
 because it looks like it *might* be a mechanism for submitting bug
 reports, but the Trac interface does not make this obvious.

 In addition, clicking on the author's page says what tickets they have
 open but not how to create a new one.

 To me it's even more confusing that the package's description lists
 the # of tickets but doesn't have a link to where/what.

 Okay, after nearly eight minutes of searching I found that I need to
 look for the New Ticket link!  It was under the fold (ie, I needed
 to scroll down) in my browser.

 This was all probably completely intuitive to the designer, but it
 wasn't at all so to me even though, as outlined, I was trying my
 darndest to find a way to report a problem, but couldn't find how.

 I suggest that there are already enough words floating around (bug,
 error, problem, issue) that adding one more (ticket) is
 unnecessary.  I recognize that ticket is more neutral (eg, can include
 a feature request), but still.

 Also, I think a prominent link entitled something like Report a
 problem (ideally the same text as in the Help menu -- so I guess
 Submit Bug Report...)  would be good.  Of course, that then takes
 you to to the open bugs portion of the package.  In the CSS styling
 there, a little more space around the line with [All Tickets] [New
 Ticket] would also make it easier to find the latter.

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



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


[racket-dev] planet versioning spec?

2011-09-06 Thread Shriram Krishnamurthi
In the planet documentation, I don't see a spec of the semantics of
versioning.  (If it's there, can someone please point me to it?)

My understanding is this; can someone confirm or correct it?  (The
#lang part probably isn't relevant, but since that's how I need to use
it, I'm being maximally specific.)

If I say

  #lang planet foo/bar:1:1

that presumably is an explicit reference to :1:1, no more and no
fewer.  If I just say

  #lang planet foo/bar

I mean the latest version of foo/bar that I've downloaded; don't go
checking right now for whether there's a newer version.  So if
foo/bar has moved on to :1:2, I'm still running :1:1.  But I say ONCE

  #lang planet foo/bar:1:2

that will download and install it; subsequently,

  #lang planet foo/bar

refers to :1:2.

(I *think* this is part of what the section Previous Linkage says --
http://docs.racket-lang.org/planet/search-order.html
-- but not all of this is specified.)

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


Re: [racket-dev] planet versioning spec?

2011-09-06 Thread Shriram Krishnamurthi
 Did you see section 1.4 of the planet docs?

Yes, I did.  It referred me to section 2 for the search order.  The
rest of it is about referring to explicit version numbers, whereas my
message was about what happens if you leave off version numbers.

I guess I could boil down my basic question to, When is the network
accessed? (relative to the naming of versions).

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


Re: [racket-dev] Who page

2011-09-05 Thread Shriram Krishnamurthi
Some bands make a racket.

On Mon, Sep 5, 2011 at 10:57 AM, Noel Welsh noelwe...@gmail.com wrote:
 Band sounds more rock'n'roll, which is what we're aiming for.

 Party on,
 N.

 On Mon, Sep 5, 2011 at 12:19 PM, Paulo J. Matos pa...@matos-sorge.com wrote:
 On 03/09/11 19:01, Neil Van Dyke wrote:

 Finally, Racket is supported by an band of volunteers


 Maybe initially someone wrote 'an army' and then 's/band/army' since 'band'
 sounds less threatning. :)
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


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


[racket-dev] autosave of unsaved files, docs

2011-09-03 Thread Shriram Krishnamurthi
The docs at

http://docs.racket-lang.org/drracket/drracket-files.html?q=crash#(part._drracket-autosave-files)

are all about the autosave of files that have already been associated
with disk.  What about those that haven't?  There is no reference to
the Documents/mredauto.* files, which thankfully just saved me a bunch
of time.

Incidentally, searching for crash in Help Desk offers literally
nothing.  For someone who's just suffered the trauma of a crash,
perhaps a soothing entry would help, such as a pointer to the above
docs on autosave files.  (And there may be some other aliases to
crash that are also worth indexing.)

[Fwiw, mredauto doesn't show up in Help Desk, either.]

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


Re: [racket-dev] drRacket Close/Close tab

2011-08-25 Thread Shriram Krishnamurthi
Robby, this is something I've brought up before, too.  It may be the
default on the Mac, but it's certainly strange behavior on other
platforms.  I often find DrRacket disappearing on me and wondering
why, then realizing...uh oh, close means something different.

On Thu, Aug 25, 2011 at 1:30 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 On Thu, Aug 25, 2011 at 9:12 AM, Marijn hk...@gentoo.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi Robby,

 On 08/25/11 14:13, Robby Findler wrote:
 The intention is that close means close window and the
 menukey-w shortcut moves between the close and close tab menu items
 depending on how many tabs are open.

 Are you seeing something different than that?

 On Linux, in my File menu the Ctrl-w shortcut is always listed as
 shortcut for Close, while Close Tab has no shortcut, but I see now that
 Ctrl-w's behavior is actually to close the current tab. So in this case
 my suggestion comes down to just relabelling the menu items from:

 File - Close

 to

 File - Close Window

 I'm going to follow the apple human interface guidelines on this point
 and leave things as they are:

 http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html


 and fixing the moving of the Ctrl+W keybinding in the labels.

 Another option is to change:

 File - Close (Ctrl+W)
 File - Close Tab

 to

 File - Close Window (Ctrl+Shift+W)
 File - Close Tab (Ctrl+W)

 and not move the shortcuts depending on tab plurality.

 Firefox and Midori both have Ctrl+Shift+W bound to Close Window, so
 maybe that is a good candidate for drRacket too (if a shortcut beyond
 Alt+F4 is desired for Close Window). Other programs with tabs I checked
 only have one of Close Window and Quit, in each case bound to
 Ctrl+(Shift+)Q.

 I like the idea of adding shift, but I've changed things so that
 instead of the w shortcut going away, the close menu item becomes
 menukey-shift-w (so the shifting behavior is still there and we are
 complying with the guidelines in the no-tabs case).

 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] drRacket Close/Close tab

2011-08-25 Thread Shriram Krishnamurthi
I mean that the C-w key-binding isn't always available (at least w/
Emacs bindings on, it has the Emacs interpretation).

Shriram

On Thu, Aug 25, 2011 at 9:26 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 What do you mean by you can kill the tab w/ C-w (which won't work in
 DrRacket)?

 On Thu, Aug 25, 2011 at 8:03 PM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 Yes, Robby, that would be great.   The default should be to close as
 little as possible, not as much as possible.

 On Windows 7:

 In Firefox, File | _C_ is indeed close *TAB*.

 In Chrome, there isn't even a close tab menu option.  You can Exit
 (which is pretty unambiguous) or you can kill the tab w/ C-w (which
 won't work in DrRacket) or by clicking on the (X) for the tab.

 So I expect Firefox users would be especially surprised (and
 displeased) by DrRacket's behavior.

 Shriram

 On Thu, Aug 25, 2011 at 5:12 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 For you, is this an issue with the underscores in the menu items? That is,
 if the underscore moved from close to close tab would that help you at all?

 Robby

 On Thursday, August 25, 2011, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 Robby, this is something I've brought up before, too.  It may be the
 default on the Mac, but it's certainly strange behavior on other
 platforms.  I often find DrRacket disappearing on me and wondering
 why, then realizing...uh oh, close means something different.

 On Thu, Aug 25, 2011 at 1:30 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 On Thu, Aug 25, 2011 at 9:12 AM, Marijn hk...@gentoo.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi Robby,

 On 08/25/11 14:13, Robby Findler wrote:
 The intention is that close means close window and the
 menukey-w shortcut moves between the close and close tab menu items
 depending on how many tabs are open.

 Are you seeing something different than that?

 On Linux, in my File menu the Ctrl-w shortcut is always listed as
 shortcut for Close, while Close Tab has no shortcut, but I see now that
 Ctrl-w's behavior is actually to close the current tab. So in this case
 my suggestion comes down to just relabelling the menu items from:

 File - Close

 to

 File - Close Window

 I'm going to follow the apple human interface guidelines on this point
 and leave things as they are:


 http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html


 and fixing the moving of the Ctrl+W keybinding in the labels.

 Another option is to change:

 File - Close (Ctrl+W)
 File - Close Tab

 to

 File - Close Window (Ctrl+Shift+W)
 File - Close Tab (Ctrl+W)

 and not move the shortcuts depending on tab plurality.

 Firefox and Midori both have Ctrl+Shift+W bound to Close Window, so
 maybe that is a good candidate for drRacket too (if a shortcut beyond
 Alt+F4 is desired for Close Window). Other programs with tabs I checked
 only have one of Close Window and Quit, in each case bound to
 Ctrl+(Shift+)Q.

 I like the idea of adding shift, but I've changed things so that
 instead of the w shortcut going away, the close menu item becomes
 menukey-shift-w (so the shifting behavior is still there and we are
 complying with the guidelines in the no-tabs case).

 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] syntax-property guards? (was: Re: The Stepper strikes again)

2011-08-13 Thread Shriram Krishnamurthi
Doesn't the same problem exist for other tools, such as the Tracer?
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Downloading DrRacket for Mac is hard?

2011-08-13 Thread Shriram Krishnamurthi
Thanks for this.

I really like the rounded-edge Download buttons that most software
systems now have.  It seems odd to not have one for DrRacket.  (I
brought this up some years ago when these weren't quite so prevalent;
now they're ubiquitous.)

The grey of the Platform line makes it look like it's been greyed out
-- my first mental thought was, what if I want some other platform?
That's not a good visual metaphor.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Downloading DrRacket for Mac is hard?

2011-08-13 Thread Shriram Krishnamurthi
On firefox.com I was surprised to see that what I had always assumed
was an image was actually just CSS magic.  Why not just copy it?

 What I did for that is to change the color when focus moves in.

Yes, but the grey means I'm unlikely to move my cursor over it in the
first place.  Why grey it out at all?  Just leave it un-grey so it's
clear it's something the user can select.

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


Re: [racket-dev] Downloading DrRacket for Mac is hard?

2011-08-12 Thread Shriram Krishnamurthi
 (1) My hunch is that most of our downloaders -- especially
 technically unsavy (what's the right word here?) people --
 download one and only one thing from us.

And I suspect this is precisely why FF makes Windows the default (as
Guillaume has shown us).  Everyone who's not on Windows is acutely
conscious of the fact that they are not, and knows what to do about
it.

I suspect it's a bit like how a driver of a diesel car is always aware
that they can get fuel at most stations, but they have to be careful
in choosing the right pump.  Here it's even safer, because the file
types are so different (.exe vs .zip vs ...) so the wrong platform's
file just won't work they expect and they'll notice it.

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


Re: [racket-dev] Plot testing and feedback

2011-08-12 Thread Shriram Krishnamurthi
Windows done; specs below in case someone w/ a significantly different
machine wants to try it out too:

Windows 7 Home Premium
1.2 GHz ULV Intel Core i5-430UM
4 GB DDR3 RAM
SATA hard drive (5400 RPM)

Output is here:

http://www.cs.brown.edu/~sk/tmp/neil-toronto.tgz

The package looks amazing, btw.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Plot testing and feedback

2011-08-12 Thread Shriram Krishnamurthi
 1. Racket's awesome cross-platform drawing library.

Robby, is this what you were trying to sell Danny on to support in WeScheme?

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


Re: [racket-dev] Downloading DrRacket for Mac is hard?

2011-08-11 Thread Shriram Krishnamurthi
We also have an extensive audience on the users list and in our
individual departments.  So it would be easy to circulate a draft Web
page (no fancy download or even formatting) that simply says, I'm
guessing you are using a ... -- is this correct? and get lots of
people to test (and get more details from those who say no).  We
should crowdsource this for maximum benefit.

Shriram

On Thu, Aug 11, 2011 at 2:22 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 I'd be happy to comment on drafts too, if that's useful.

 Robby

 On Thu, Aug 11, 2011 at 1:20 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:

 Guillaum, why don't you work out a concrete plan, especially the wording of 
 the messages to the downloader, and submit it to ELi for review. He will 
 implement a version of it. Thanks -- Matthias


 _
  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] Downloading DrRacket for Mac is hard?

2011-08-11 Thread Shriram Krishnamurthi
Eli has asked us to wait.  Please do so.  He will reply in more detail
when he gets to a proper computer.

On Thu, Aug 11, 2011 at 3:36 PM, Guillaume Marceau gmarc...@gmail.com wrote:


 On Thu, Aug 11, 2011 at 3:03 PM, Guillaume Marceau gmarc...@gmail.com
 wrote:
 Or we can trust that the Mozilla Foundation's user interface designers has
 already done the experiment. They have some of the best people of the
 industry working for them, including Aza Raskin, son of Jef Raskin, one of
 the original designer of the Macintosh. I see no reason to deviate from
 their design choice.
    [big:]         DrRacket
    [almost as large:]   Free Download
    [small and grey:]  5.1.2 for Windows, English (US)
    [outside of the button, small and light-grey:] All Systems  Languages
 Shriram, if you want I can email Aza and ask him what experiments they did
 to arrive at the current design.


 This particular design is getting more common around the web.

 Apple's iTune download page have a big button that reads Download Now,
 then at the bottom of the page they have two small links:

         64-bit editions of Windows Vista or Windows 7 require the iTunes
 64-bit installer
 and
         G3 Mac Users

 Google Chrome has a big button that read Download Google Chrome, right
 below they have It's free and installs in seconds
 For Windows XP, Vista, and 7, then at the bottom of the page, in small:

         Chrome for Mac or Linux · Chrome Beta

 Sourceforge have a big button Download Inkscape-0.48.1…exe, and then below
 Other Versions, Browse all files

 etc.

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


Re: [racket-dev] Roogle?

2011-08-05 Thread Shriram Krishnamurthi
Noel is absolutely right.

We live in an era where Search Just Works.  I do dozens of Google
searches on most days.  To go from there to Help Desk is an incredibly
jarring experience.  I have to load new instructions into my head:
stick to one word, stem!, etc., that I haven't had to use on
search engines since the late 1990s.

Even though I like to program on flights and trains, where Eli's
concerns apply completely, I am also fully aware that I cannot get
various services while disconnected.  What is unconscionable is that
I can't do *better* while connected to the internet.

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


Re: [racket-dev] Roogle?

2011-08-05 Thread Shriram Krishnamurthi
I suspect your related work section missed a few. (-:

On Fri, Aug 5, 2011 at 10:06 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 It was my Diplomarbeit finished in 1983, so that makes it 28 years now.



 On Aug 5, 2011, at 12:17 AM, Shriram Krishnamurthi wrote:

 This idea is proposed roughly every 2-3 years for at least 30 years.
 I am not aware of anyone having made this idea fly.

 Shriram

 On Fri, Aug 5, 2011 at 12:13 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 I too tried it (ages ago) and ended up roughly where Eli is, but I
 didn't want to judge since I wasn't actually trying to use it for
 something useful (and, as we all know, that can change how you use
 things and how well they work for you). So I wonder if anyone has a
 positive experience with this kind of searching in an in anger kind
 of setting?

 Robby

 On Thu, Aug 4, 2011 at 9:08 PM, Eli Barzilay e...@barzilay.org wrote:
 6 minutes ago, Asumu Takikawa wrote:
 A few of us in the lab today were discussing how the Haskell
 community has this nice tool called Hoogle
 (http://www.haskell.org/hoogle) that lets you search Haskell docs by
 type.

 Are there any *practical* uses for that thing?

 (Not a flame, I tried it a few times, and it looked like i might be
 useful in a language where you use point-free style to compose
 functions -- so you might know the type that you need `(a - b - c)
 - (b - c - a)' but not the `flip' name.  But such serches don't
 see, to work.  So from this shallow scan, it looks like one of these
 things that sound cool on paper, but are useless in practice.)


 Is it at all feasible to supplement Racket's doc search to display
 contracts

 That won't be hard in itself, but the real problem is huge blocks of
 text in the results which would make it much less useful.

 and/or search by contract? (or type for TR)

 That would be more difficult, since the search will need to do a lot
 more work.  I'm also guessing that given that we have much more *text*
 in contracts (as in integer and resolved-module-path?), it will
 make searching show way more false positives.

 --
          ((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

 _
  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] Roogle?

2011-08-04 Thread Shriram Krishnamurthi
This idea is proposed roughly every 2-3 years for at least 30 years.
I am not aware of anyone having made this idea fly.

Shriram

On Fri, Aug 5, 2011 at 12:13 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 I too tried it (ages ago) and ended up roughly where Eli is, but I
 didn't want to judge since I wasn't actually trying to use it for
 something useful (and, as we all know, that can change how you use
 things and how well they work for you). So I wonder if anyone has a
 positive experience with this kind of searching in an in anger kind
 of setting?

 Robby

 On Thu, Aug 4, 2011 at 9:08 PM, Eli Barzilay e...@barzilay.org wrote:
 6 minutes ago, Asumu Takikawa wrote:
 A few of us in the lab today were discussing how the Haskell
 community has this nice tool called Hoogle
 (http://www.haskell.org/hoogle) that lets you search Haskell docs by
 type.

 Are there any *practical* uses for that thing?

 (Not a flame, I tried it a few times, and it looked like i might be
 useful in a language where you use point-free style to compose
 functions -- so you might know the type that you need `(a - b - c)
 - (b - c - a)' but not the `flip' name.  But such serches don't
 see, to work.  So from this shallow scan, it looks like one of these
 things that sound cool on paper, but are useless in practice.)


 Is it at all feasible to supplement Racket's doc search to display
 contracts

 That won't be hard in itself, but the real problem is huge blocks of
 text in the results which would make it much less useful.

 and/or search by contract? (or type for TR)

 That would be more difficult, since the search will need to do a lot
 more work.  I'm also guessing that given that we have much more *text*
 in contracts (as in integer and resolved-module-path?), it will
 make searching show way more false positives.

 --
          ((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

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


Re: [racket-dev] Release Announcement for v5.1.2

2011-08-01 Thread Shriram Krishnamurthi
Correct, no colors.

On Mon, Aug 1, 2011 at 11:57 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
 On Mon, Aug 1, 2011 at 11:48 AM, Eli Barzilay e...@barzilay.org wrote:


 * Simplified error messages in student languages, and use colors to
  add visual information (see the teachpack manual for guidelines on
  writing teachpacks).  (Is this the right place?  IIRC it moved.)

 I don't believe the colors are implemented in the tree yet.

 * Sam, Vincent: TR news?  (Many new types from Eric Dobson?
  Optimizer logs?)

 Almost all core Racket data structures and operations now work with
 Typed Racket (most of this work is due to prolific contributor Eric
 Dobson).

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

 _
  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] New error messages for *SL

2011-07-12 Thread Shriram Krishnamurthi
Precisely.

On Tue, Jul 12, 2011 at 6:10 AM, Stephen Bloch sbl...@adelphi.edu wrote:

 On Jul 11, 2011, at 6:32 PM, Matthias Felleisen wrote:

 I'd much prefer eliminating such function calls.

 What harm do they do?  You can't call any library function with the wrong
 number of arguments, and you can't define a zero-argument function.  The
 only way this affects a BSL student is if the student is using a library
 that provides a zero-argument function, which it presumably does because the
 library author thinks BSL students NEED a zero-argument function.
 I wouldn't draw attention to the existence of zero-argument functions in the
 docs, but I don't see that we need to overrule the judgment of every library
 author who ever provides one.
 Stephen Bloch
 sbl...@adelphi.edu



 _
  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] New error messages for *SL

2011-07-11 Thread Shriram Krishnamurthi
Whoa, whoa there.  They're there for a reason.  I can't remember why,
but I am pretty certain I have actually used such a function.  Please
don't go around chopping and changing the language a few days before
the deadline.

On Mon, Jul 11, 2011 at 7:21 PM, Guillaume Marceau gmarc...@gmail.com wrote:
 On Mon, Jul 11, 2011 at 6:32 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 I'd much prefer eliminating such function calls.

 Do you want them out in this release?
 _
  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] RacketCon lodging

2011-06-26 Thread Shriram Krishnamurthi
Also, would any Boston people be willing to host out-of-town students?

On Sun, Jun 26, 2011 at 12:36 PM, John Clements
cleme...@brinckerhoff.org wrote:
 Are there any group-ish plans for RacketCon lodging? A campsite, say... :)

 John


 _
  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: a language example: brainfudge

2011-06-10 Thread Shriram Krishnamurthi
Danny, the real reason to not mess with the name in the github repo
name is that you WANT people who are looking for the original language
to find your version of it.

Shriram

On Fri, Jun 10, 2011 at 7:06 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 On Fri, Jun 10, 2011 at 5:52 PM, Danny Yoo d...@cs.wpi.edu wrote:
 On Fri, Jun 10, 2011 at 6:43 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Why did you sanitize the name? Is this language different than brainfuck?


 No real reason: I just didn't want to swear like a sailor.


 How about just swearing like a PL grad student?

 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] `take' argument order

2011-06-09 Thread Shriram Krishnamurthi
While having a copy of Shrunk and Whiteout thrown at us, no less.

On Thu, Jun 9, 2011 at 6:43 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 Man, I recall a slightly different sentiment when you edit papers we
 co-author. :)

 Robby

 On Wed, Jun 8, 2011 at 8:50 PM, Matthias Felleisen matth...@ccs.neu.edu 
 wrote:

 Take from the sequence of primes the first five numbers and add them up. 
 This is at most slightly mangled :-)


 On Jun 8, 2011, at 11:38 AM, Eli Barzilay wrote:

 6 minutes ago, Stephen Bloch wrote:

 On Jun 8, 2011, at 9:55 AM, Eli Barzilay wrote:

 ... the
 justification for the argument order in Haskell is not laziness but
 its implicit currying -- so of course it shouldn't be a reason to make
 lazy racket follow it.]

 Another justification for Haskell's argument order is compatibility
 with English: take 5 primes makes a lot more sense than take
 primes 5.  It could be argued that compatibility with English is
 even more important than compatibility with Clojure, or Haskell, or
 SRFI/1, or racket/typed

 That counters a lot of existing racket functions (`list-ref' vs the
 nth element of), and worse -- it contradicts some uniformity (if you
 follow English, then `for-each' should not have the same order as
 `map').

 --
          ((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


 _
  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] guidelines on error messages -- please send feedback

2011-06-03 Thread Shriram Krishnamurthi
Kathi is understating it.  There are TWO notions of variable.  In
algebra, in f(x) = x^2, x is called a variable because it varies
across invocations of f -- which is different from the CS notion of
varies within a single invocation.  So it's not even illegitimate
given the other meaning of variable.

(As you know, I make a royal fuss about this in 173.  So it took me a
while to reconcile to this change.  But I think it's absolutely
right.)

On Fri, Jun 3, 2011 at 3:52 PM, Kathi Fisler kfis...@cs.wpi.edu wrote:
 The choice of variable is motivated by students and the desire to align
 with terms they know from high school math.   The distinction between
 variable and identifier is too subtle for many students.

 Kathi

 On Fri, Jun 3, 2011 at 3:13 PM, Jay McCarthy jay.mccar...@gmail.com wrote:

 Use ‘argument’ for actual arguments and ‘variable’ for formal
 arguments and in the body of the definition.

 I prefer argument and parameter name, because until ASL, they don't
 vary. But it seems you prefer just variable, because you don't want
 two terms for the things made by 'define' and the things made by
 'lambda'? This is very bikesheddy, but I dislike your choice.

 Jay

 2011/6/3 Shriram Krishnamurthi s...@cs.brown.edu:
  Guillaume, Kathi and I have created a set of guidelines for writing
  error messages for *SL.  For consistency, these guidelines need to be
  used also by authors of libraries including Teachpacks, etc.  These
  guidelines are currently being applied to all the error messages in
  *SL in the core distribution.
 
  Please review these guidelines and let us know if anything is
  unclear.  We'd like to hear back from you within a week, by
 
  Fri, June 10
 
  We have had to compromise on the description a little to make
  everything fit into a small number of pages, which we did because we
  really do hope people will print these out and put them on the wall or
  next to their monitor to refer to while writing code.  Therefore,
  lengthy descriptions are out.
 
  In particular, rationale is also out.  If you are curious about the
  rationales for any of these things, please do ask.
 
  After this is settled next week, we will send this to users@ and also
  to edu@ to tell instructors to follow these terms.
 
  Thanks,
  Shriram
 
  _
   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] guidelines on error messages -- please send feedback

2011-06-03 Thread Shriram Krishnamurthi
Where there is subtyping, same and different are not so clear.
set-foo-bar!, foo-bar, and foo? are all different things at the
level of mutator, selector, and predicate, but they are the same
thing one level of abstraction up, where they are all functions or
operators.

So we are not advocating lying; we're simply saying don't make more
distinctions than necessary.

The problem we're seeing is that, because students don't know these
additional words, they are not getting *more* information, they are
getting *significantly less*: they're being told in the errors about
gidgets and whosies and whatchamacallits.

Shriram

On Fri, Jun 3, 2011 at 8:05 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 Guillaume's homework is that students get confused with all the names
 for the same things. IMHO, if there are different things, then they
 should have different names. The students could still confuse the
 things, and that would be bad for our classes. DrRacket calling the
 different things the same thing would, IMHO, make it easier for
 students to confuse the concepts, and that's worse.

 Jay

 2011/6/3 Matthias Felleisen matth...@ccs.neu.edu:

 HtDP uses

  (define variable expression)
  (define (function-name parameter ...) function-body)
          --- function header ---
  (lambda (parameter ...) ... variable ...)

 but it also says that globally defined variables are constants until we hit 
 ASL. Because then they aren't.

 ;; ---

 I think we should start with the reduced set of words that Guillaume et al 
 have come up with and if we notice problems we should expand the vocabulary 
 or revise it carefully. None of us has research to back up our opinions. At 
 least Guillaume et al have done some homework here. We need to acknowledge 
 this.





 On Jun 3, 2011, at 7:52 PM, Stephen Bloch wrote:


 On Jun 3, 2011, at 3:13 PM, Jay McCarthy wrote:

 Use ‘argument’ for actual arguments and ‘variable’ for formal
 arguments and in the body of the definition.

 I prefer argument and parameter name, because until ASL, they don't
 vary. But it seems you prefer just variable, because you don't want
 two terms for the things made by 'define' and the things made by
 'lambda'? This is very bikesheddy, but I dislike your choice.

 I agree with Jay here.  I explicitly address the distinction between 
 argument and parameter (i.e. formal argument) in _Picturing Programs_; 
 to me, variable (in *SL) means the identifier in (define identifier 
 expr), and its subsequent occurrences.


 Stephen Bloch
 sbl...@adelphi.edu


 _
  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

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


Re: [racket-dev] guidelines on error messages -- please send feedback

2011-06-03 Thread Shriram Krishnamurthi
 * Start the message with the name of the construct whose constraint is
   being violated, followed by a colon.

      Should give a quick example to clarify that `error' does that when
      given a symbol.   I can see people following this blindly and
      getting
         - (error 'foo foo: blah blah)
         foo: foo: blah blah

AGREED: GM, add to the todo list.  (Though the persistence of such an
error would also suggest that the message author never ran DrRacket!)

 * ... somewhat anthropomorphically ...

      See second item in the guidelines, apply reflection.

Are you referring to the concise and clear bullet?  Can you make
your point less obliquely?

 * variable - identifier

      (-0.52 because I can see it leaking out of the SLs)

Do you mean identifier - variable?

At any rate, we're pretty set on this one, perhaps more so than just
about any other edit.

 * do not write `' around keyword

      This can work only in a limited context, where you use
      colors/font/etc or you know that there is no keyword in your world
      that can be confused with text like `like'.   Perhaps it would be a
      hook to start using some unicode things?   x  «x » ?x?

Perhaps, but the ... notation is actually confusing.  We have some
evidence for this.  So, while we're open to ideas, we think the
current notation is not quite working.

Shriram

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


Re: [racket-dev] guidelines on error messages -- please send feedback

2011-06-03 Thread Shriram Krishnamurthi
 Oh, I'm all in favor of skipping identifier.   But using the word
 variable both for global variables (i.e. constants) and for
 function parameters strikes me as asking for confusion.

Okay.  We have no evidence one way or the other.  It could be
something we try to investigate.  Given our observation (for other
terms) that fine-grained distinctions actually cause more confusion
than help, I am not at all ready to buy your argument.  Moreover, I
have also come to distrust arguments from pure reason in this area.

 Is the x in f(x) indeed consistently called a variable in high
 school math classes?   Or do they also use words like parameter or
 argument?

There is no consistency across books.  We do know that many math books
and educators use variable.  In addition, we have not run into
either Bootstrap or college students who had trouble with the term
variable.  It's also a term I hear from people who studied in other
countries (so is parameter, but much less so argument).  That's
why we chose it.

Shriram

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


Re: [racket-dev] Please help me to understand the two lines.

2011-05-30 Thread Shriram Krishnamurthi
I think even one sentence in the docs about the implications of these
statements there would be a great idea.  To someone who doesn't
already know Scheme, the distinction between one value and the
alternative is entirely unclear because they don't know what
alternatives there are to one argument/value.  A sentence to this
effect would save them having to read between the lines.

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


Re: [racket-dev] type-case + typed racket yet?

2011-05-25 Thread Shriram Krishnamurthi
My understanding is that Eli has all these things for his PL course,
right?  So it's just a matter of making them more widely accessible?
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] known problem?

2011-05-17 Thread Shriram Krishnamurthi
In DrRacket 5.1 on Windows 7, hitting Alt-Space reproducibly produces
this output:

system-menu in frame%: unimplemented; args were '()

 === context ===
C:\Program Files
(x86)\Racket\5.1\collects\racket\private\more-scheme.rkt:265:2:
call-with-exception-handler
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\mrtop.rkt:179:27:
on-subwindow-char method in frame%
C:\Program Files
(x86)\Racket\5.1\collects\racket\private\more-scheme.rkt:149:2:
call-with-break-parameterization
C:\Program Files
(x86)\Racket\5.1\collects\racket\private\more-scheme.rkt:265:2:
call-with-exception-handler
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
C:\Program Files
(x86)\Racket\5.1\collects\mred\private\wx\win32\window.rkt:705:2:
call-pre-on-char method in window%
...
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] racket vs. scheme vs. clojure (as it appears to others)

2011-05-04 Thread Shriram Krishnamurthi
Justin is right other than the Java part.  Eli is right with the
amendment of -1 for the suggestion that Java has good parts worth
borrowing. (-:

On Wed, May 4, 2011 at 7:51 PM, Eli Barzilay e...@barzilay.org wrote:
 20 minutes ago, Justin Zamora wrote:
 On Sun, May 1, 2011 at 3:20 AM, D Herring dherr...@tentpost.com wrote:
  You might emphasize that Racket is a new language, borrowing the
  best parts of Scheme (and other languages?) and extending it with
  these features...

 A sentence like that would be a good replacement for the awful,
 Racket is a programming language currently on the front page of
 racket-lang.org Perhaps something like Racket is a new language
 that borrows the best parts of Scheme, Java, and other languages and
 extends them with advanced features such as contracts, types,
 user-defined languages, a complete GUI framework and other modern
 features.

 -1 for any mention of Java.

 --
          ((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] exact nonnegative integers as sequences?

2011-04-18 Thread Shriram Krishnamurthi
 Which also raises an idea: now that TR is getting going, maybe we
 should have another step on this scripts-to-programs slope that is
 _lower_ than Racket. A language where we really only have one single
 datatype and everything just works on it, hashes being the obvious
 one (altho we probably should not _call_ them hashes; we should call
 them the scracket value or something).

Guillaume's been doing all his programming lately with just such an
infrastructure, and can't sing its praises enough.  The associative
table really is a powerful abstraction for lightweight programming,
especially when combined with overloading of the form Matthew
initially suggested.

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


Re: [racket-dev] spam trac tickets

2011-03-23 Thread Shriram Krishnamurthi
Will the syntax be infix or prefix?  Will the semantics be fixednum or bignum?

On Wed, Mar 23, 2011 at 7:00 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 can you turn these captcha expressions into small arithmetic expressions
 that people know they need to compute and the spammers don't see?


 On Mar 22, 2011, at 11:28 PM, Robby Findler wrote:

 Looks like the spammers have found a way thru google's captcha thing.
 There were just three spam tickets now and two earlier today and a few
 yesterday, iirc.

 Should I worry about that?

 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


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


Re: [racket-dev] Church numerals in Scratch

2011-01-23 Thread Shriram Krishnamurthi
Make sure you include a chapter on types!

On Sun, Jan 23, 2011 at 9:10 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 Want to write it? ;)

 On Sunday, January 23, 2011, Matthias Felleisen matth...@ccs.neu.edu wrote:

 POPL 2012 will probably sport a paper on Scratch then ...

 On Jan 23, 2011, at 8:28 PM, Shriram Krishnamurthi wrote:

 http://byob.berkeley.edu/Church.pdf
 _
  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] In support of em dash

2010-12-13 Thread Shriram Krishnamurthi
See

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

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


Re: [racket-dev] spam planet bug reports

2010-12-11 Thread Shriram Krishnamurthi
Effectively impossible.  It's all in the domain.

On Sat, Dec 11, 2010 at 1:47 PM, Matthias Felleisen
matth...@ccs.neu.edu wrote:


 How difficult is it to implement one as a Planet lib that avoids tracking?



 On Dec 11, 2010, at 1:41 PM, Neil Van Dyke wrote:

 One issue to consider with Recaptcha is that it's incidentally a Web bug 
 that helps track people around the Internet.  If you don't already have Web 
 bugs in your site, by adding one you increase the cross-site tracking.

 In the case of PLaneT bug reports, the privacy and security cost of a Web 
 bug seems negligible.

 However, I think it is good to sanity-check every time you use one of these 
 effective Web bugs.  I've seen sites like anonymous discussion boards on 
 sensitive topics doing things like loading Recaptcha for not only posts 
 (goodbye, posting anonymity), but also for every message a user views 
 (hello, centralized detailed profiling).  In many cases, I believe that site 
 operators who help implement the tracking are unaware of it, although in 
 other cases they might be indifferent or believe that the tracking will be 
 used only for certain purposes they consider to be good.

 Now that I'm in my 30s, my interest in this is academic curiosity rather 
 than activist, but I'd like to have at least Racket people aware of the 
 implications when they decide to use an effective Web bug like Recaptcha.

 FWIW, recaptcha is really easy to set up. Like less than 10 minutes from
 not knowing anything about it to having a working system.

 http://www.google.com/recaptcha


 --
 http://www.neilvandyke.org/
 _
 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: Q. about Directly Reflective paper

2010-11-17 Thread Shriram Krishnamurthi
Someone should write to Danvy and ask him what the heck HE was doing
sleeping on the job.  How could a paper on a topic like this not get a
proper Schemer as a reviewer and, if so, why didn't they, uh, read the
paper?

On Wed, Nov 17, 2010 at 12:41 AM, John Clements
cleme...@brinckerhoff.org wrote:
 Well, he's generous about it; here's what he had to say.
 John

 Begin forwarded message:

 From: Aaron Stump aaron-st...@uiowa.edu
 Date: November 16, 2010 5:58:42 PM PST
 To: John Clements cleme...@brinckerhoff.org
 Subject: Re: Q. about Directly Reflective paper
 Reply-To: ast...@cs.uiowa.edu

 Hi, John.

 I think you are right about this.  Lambda abstractions evaluate to
 #procedures in Scheme R5RS, and so it is not possible to take a cdr or car
 of one of these.  I have no idea why I wrote this (four years ago -- there
 was a major lag between acceptance and publication at HOSC).  I will add a
 note to my web page about this, and possibly upload a revised version of the
 paper without this incorrect statement.
 Aaron
 On Tue, Nov 16, 2010 at 4:18 PM, John Clements cleme...@brinckerhoff.org
 wrote:

 I'm reading your paper, Directly Reflective Meta-Programming, and I got
 stuck early on a remark of yours about Scheme:

  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))


 This looks pretty goofy to me.  Do you know of R5RS implementations that
 actually allow you to peel apart a 3d value like this?  Racket (nee
 MzScheme) certainly doesn't.

 Thanks!


 John Clements




 _
  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 e...@barzilay.org 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 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
ro...@eecs.northwestern.edu wrote:
 On Tue, Nov 16, 2010 at 4:19 PM, Eli Barzilay e...@barzilay.org 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
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 sa...@ccs.neu.edu wrote:
 On Tue, Nov 16, 2010 at 5:22 PM, Shriram Krishnamurthi s...@cs.brown.edu 
 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
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


[racket-dev] shared and names

2010-10-19 Thread Shriram Krishnamurthi
Is there any way for shared to check for whether a name was originally
assigned to an LHS and, if so, to re-use it?  If I define

(define cities (shared ([PVD (make-city ... (list BOS ORD))] [BOS ...]
[ORD ...]) PVD))

and it prints as


(shared ((-0- (make-city Providence (list -3- -7-)))
 (-11- (make-city Boston (list -3- -7- -16- -31-)))
 ...

it's really pretty hard to read!  (What's worse is that changes to the
program change the assignment of -1-, -2-, etc., so even if I spent
some time memorizing that -1- is PVD, -11- is ORD, etc., after I make
a small change to my program, that memorized map is useless.)

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


Re: [racket-dev] =?

2010-10-06 Thread Shriram Krishnamurthi
It would be the same as =, ie, numeric equality.  It's not meant to be
some sort of generalized equality checker.  It's just that we teach
our students that predicates end in ?, and that's true of symbol=?,
string=?, but not =.

On Wed, Oct 6, 2010 at 2:21 PM, Everett Morse we...@unoc.net wrote:
 Would this mean equal?, eq?, =, or what?  I suppose it would make
 sense to be =? since the others have a question mark, but I'd almost
 prefer it to be equal? just to save me some typing. (In fact, maybe I'll
 bind it to that myself ...).  I imagine that this kind of confusion is, or
 is related to, the reason.

 -Everett

 On 09/06/2010 11:31 AM, Shriram Krishnamurthi wrote:

 Is there a reason =? isn't bound?  I see (in Guillaume's logs)
 students actually getting errors because they tried to use it.
 _
   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


[racket-dev] =?

2010-09-06 Thread Shriram Krishnamurthi
Is there a reason =? isn't bound?  I see (in Guillaume's logs)
students actually getting errors because they tried to use it.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] docs don't make sense

2010-09-02 Thread Shriram Krishnamurthi
http://docs.racket-lang.org/drracket/extending-drracket.html?q=teachpack#(part._teachpacks)

-
As an example, the following teachpack provides a lazy cons
implementation. To test it, be sure to save it in a file named
lazycons.ss.

...

Then, in this program:

...

the list all-nums is bound to an infinite list of ascending numbers.
-

1. It's not clear why one must be sure to save it in that particular name.

2. The above docs don't say to actually *install* the Teachpack.

Presumably #2 meant to reference lazycons.ss.  But the be sure to
is misleading (the name is meaningless).

Also, the .ss should probably be .rkt.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] relationship between define-struct and struct

2010-08-28 Thread Shriram Krishnamurthi
What is the relationship between define-struct and struct in Racket
5.0.1?  By define-struct I mean the construct provided in ASL.  In my
custom language I have

(define-struct tv (tag value))
(provide (struct-out tv))

and I get the error

struct-out: no import for structure-type identifier in: struct:tv

Is this because define-struct suppresses the struct:tv structure-type
information?  (If so, why?)  ((And if so, is there a way to make
struct-out work shy of copying the implementation of define-struct and
adding/removing the line that hides this?))

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


Re: [racket-dev] relationship between define-struct and struct

2010-08-28 Thread Shriram Krishnamurthi
On Sat, Aug 28, 2010 at 3:38 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 This works fine in #lang racket, eg:

 #lang racket
 (define-struct s (a b))
 (provide (struct-out s))

 I think that ASL's define-struct is not racket's tho, so you'd
 probably have to read the docs carefully to understand what's
 different and what it does and why it is not working properly with
 racket's struct-out.

Yes, thank you, you've just repeated my question...
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] printing images in REPL

2010-08-28 Thread Shriram Krishnamurthi
The value I was returning is whatever kind of object is returned when
you embed an image in the Definitions window.  That is, this was a
pasted, atomic image, not one created by a computation.  I guess
they're not treated the same, but I'm surprised that ASL processing
the Definitions window didn't do the right conversion...

On Thu, Aug 26, 2010 at 8:25 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 At the moment there is a barn-door sized security hole in DrRacket,
 whereby it will take any snip% instance from the user's program and
 just display it in the repl. You can exploit this for Good by making
 the current-print of your language turn some values into snips (like
 images and things). 2htdp/image already does this, so that should just
 work if you return those. Its hard to tell what value Shriram's
 program was returning tho. But if it is a bitmap% object, he just has
 to do

  (make-object image-snip% ...the-bitmap-goes-here...)

 We will close this hole at some point, when we have a reasonable way
 to allow people to add new kinds of values without the security
 breach.

 Robby

 On Thu, Aug 26, 2010 at 6:17 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 From what I can tell, it comes from ensuring that DrRacket shares the
 htdp/image (or whatever) namespace with the running program so the
 structs are the same and DrRacket's default renderer is detecting it.
 I'm not sure how to replicate it though. (I tried for a bit so I could
 make #lang frtime work.)

 Jay

 On Thu, Aug 26, 2010 at 11:55 AM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 What is the #lang magic that makes

 (get-image-from-web http://racket-lang.org/logo.png;)
 (instantiate (class ...) ...)

 show the image rather than just its constructor?

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




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

 The glory of God is Intelligence - DC 93
 _
  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] printing images in REPL

2010-08-28 Thread Shriram Krishnamurthi
... which was my original question.  But thanks.

On Sat, Aug 28, 2010 at 9:36 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 I guess you don't have the print handler set up right.

 On Sat, Aug 28, 2010 at 8:23 PM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 The value I was returning is whatever kind of object is returned when
 you embed an image in the Definitions window.  That is, this was a
 pasted, atomic image, not one created by a computation.  I guess
 they're not treated the same, but I'm surprised that ASL processing
 the Definitions window didn't do the right conversion...

 On Thu, Aug 26, 2010 at 8:25 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 At the moment there is a barn-door sized security hole in DrRacket,
 whereby it will take any snip% instance from the user's program and
 just display it in the repl. You can exploit this for Good by making
 the current-print of your language turn some values into snips (like
 images and things). 2htdp/image already does this, so that should just
 work if you return those. Its hard to tell what value Shriram's
 program was returning tho. But if it is a bitmap% object, he just has
 to do

  (make-object image-snip% ...the-bitmap-goes-here...)

 We will close this hole at some point, when we have a reasonable way
 to allow people to add new kinds of values without the security
 breach.

 Robby

 On Thu, Aug 26, 2010 at 6:17 PM, Jay McCarthy jay.mccar...@gmail.com 
 wrote:
 From what I can tell, it comes from ensuring that DrRacket shares the
 htdp/image (or whatever) namespace with the running program so the
 structs are the same and DrRacket's default renderer is detecting it.
 I'm not sure how to replicate it though. (I tried for a bit so I could
 make #lang frtime work.)

 Jay

 On Thu, Aug 26, 2010 at 11:55 AM, Shriram Krishnamurthi 
 s...@cs.brown.edu wrote:
 What is the #lang magic that makes

 (get-image-from-web http://racket-lang.org/logo.png;)
 (instantiate (class ...) ...)

 show the image rather than just its constructor?

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




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

 The glory of God is Intelligence - DC 93
 _
  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] stepper UI question

2010-08-27 Thread Shriram Krishnamurthi
 I can think of many different ways to make the stepper-definition
 correspondence manifest.   As John said, I once suggested that the code
 should be reduced in-place, in the definition window. Shriram doesn't
 like that idea (but he has never bothered to say why.)

That's right, I didn't.

Here's why.  It introduces subtle state into the editor.

If you start stepping, and then try to Save, are you saving the
stepped version or the original?

If you start stepping, forget that you are doing that, and then start
editing, what are you editing?

If you step, does it affect the unsavedness of the editor?
(Presumably not.)

If I have a textual program, and step, does it next save in graphical
format?  (I wouldn't want that.)

One way to prevent some of the more egregious problems is to make
stepping a mode.  That brings its own problems -- how do you make it
not suck, how do you focus attention on it, etc.

I think people have a clear model of what an editor is: it's like
Word, like the text box of GMail, etc.  Each one offers some
highlighting feedback and some rich-text editing -- but it's just an
editor.  It's not a place where programs run.  Putting the stepper
into the editor in a model way really messes with that.

I certainly agree with you (and have always agreed with you, for the
many years we've talked about this) that losing the correspondence to
the source program is a problem.  But I don't think putting it in the
editor is the solution.  I do find Ryan's suggestion -- to use
highlighting in the editor -- very intriguing.  We already highlight
in the editor, and it's pretty unintrusive.  In that style, it might
even be possible for a stepper window to combine highlighting with
showing *just* the current redex, and giving the user the option of
expanding the scope of attention (ie, show me more of the current
expression when I want it).

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


[racket-dev] more space in GUI?

2010-08-27 Thread Shriram Krishnamurthi
The language chooser details panel looks like the attachment.  It
looks like there are five Output Styles and Fraction Style combined,
rather than two distinct blocks of 3 and 2.  A little spacing might
make it a bit easier to read.
attachment: chooselang.png_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] stepper UI question

2010-08-26 Thread Shriram Krishnamurthi
I like this.  The Stepper becomes available as an aid to help you
answer questions about how things came to be.  It is indeed often the
case that I lose the plot when stepping forward and hence go to the
end and work backward; this could put you there right away.

Yes, left-to-right scrolling makes much more sense, especially since
screens are generally wider than taller, and have become more so in
the HD era.  Sort of like the file selector on an Apple, right?  (I
forget the name for that style of columnar presentation.)

Is this a fair, operational restatement of your cautionary note:
It will be much less complicated to add just a `how did I get here?'
button to the REPL and have the rest of the stepper reside in its own
window, than trying to embed the whole stepper in the REPL?

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


Re: [racket-dev] stepper UI question

2010-08-26 Thread Shriram Krishnamurthi
Understood, and agreed.  Thanks!

Anyone else have comments/suggestions?  I really like Robby's UI
suggestion and am treating it as the lead contender.

On Thu, Aug 26, 2010 at 10:57 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 On Thu, Aug 26, 2010 at 9:35 AM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 Is this a fair, operational restatement of your cautionary note:
 It will be much less complicated to add just a `how did I get here?'
 button to the REPL and have the rest of the stepper reside in its own
 window, than trying to embed the whole stepper in the REPL?

 Yes.

 In general, I think the right way to proceed, even if you do decide
 that you want it in the same window, is to mock it up in a different
 window and get it close to the way you want it and then try to think
 thru how to put it back into the same window.

 Robby

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


Re: [racket-dev] stepper UI question

2010-08-26 Thread Shriram Krishnamurthi
That seems like the wrong point of integration.  If I have

  (define v complex expr)

  (check-expect (g v) h)

then simply stepping into (g v) may not at all be enough.  If the
stepper forced people to rewrite their programs just for steppability,
that should be considered a bad design.

Shriram

On Thu, Aug 26, 2010 at 8:27 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 It seems to me it would be nice to contemplate a design that
 integrates test suites and the stepper (also in light of Mike's
 signatures).

 Robby

 On Thu, Aug 26, 2010 at 7:23 PM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 I know Guillaume proposed to do it in the context of the editor.  I'm
 unconvinced that that's the right way to go.  At any rate, integrating
 into an existing bit of infrastructure (def'ns or inter's) is going to
 be much more complex than an off-line prototype that people can
 critique.  So we should do that regardless.

 You and Kathy raise good and interesting points.  This tells me that
 there is not yet a good answer to *where* the stepper should run.  I
 believe this is quite separable from *how* the stepper runs, ie, how
 it displays the sequence of expressions.  Since I feel that is
 currently the biggest problem with it, it seems wise that we focus on
 the latter for now.  Once we make some real progress on that
 high-order bit, we can see what percolates up.

 Do others agree that this is the high-order bit?  If not (and perhaps
 even if so), can you articulate why?

 Shriram
 _
  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] require sub-forms

2010-08-25 Thread Shriram Krishnamurthi
Actually, I grepped through the source in the hope that that's
precisely what I would find.  It's when I didn't that I wrote the
list.

Shriram

On Wed, Aug 25, 2010 at 10:11 AM, Jay McCarthy jay.mccar...@gmail.com wrote:
 On Tue, Aug 24, 2010 at 10:18 PM, Eli Barzilay e...@barzilay.org wrote:
 On Aug 24, Jay McCarthy wrote:
 There is not now but we could make a module that only exported them
 so you could provide all-from-out it and thus centralize the list of
 subforms. That's the cleanest idea I have.

 This assumes you want only the core ones, and not things that are
 defined in other libraries (like in `racket/require').


 (You don't want to hear my really bad ideas)

 (#rx-in$ ?)


 That's not my bad idea, which might not be so bad actually. I'm
 imagine a new require/provide transformer that names sets of exports:

  in require/provide.rkt :

 (define-export-set require-sub-forms only-in except-in ...)
 (define-export-set provide-sub-forms all-defined-out all-from-out ...)
 ; These expand to static information

 (define-provide-syntax (all-from-export-set-out stx)
  ; looks at the syntax-local-value of stx and pulls out the
 identifiers from the definition above
  ; and expands to (combine-out id ...)
  ...)

 ... in sk.rkt:
 (provide
  (all-from-export-set-out require-sub-forms)
  (all-from-export-set-out provide-sub-forms))

 Jay

 --
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!




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

 The glory of God is Intelligence - DC 93

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


Re: [racket-dev] hashes in ASL

2010-08-25 Thread Shriram Krishnamurthi
Catching up ...

 What documentation are you looking at?

 http://docs.racket-lang.org/htdp-langs/advanced-prim-ops.html#(part._(lib._htdp-advanced..ss._lang)._.Hash_.Tables)

If I type hash in the Help Desk, I get

  hash  provided from racket/base, racket

but not from ASL, in contrast to, say, list, which gives

  list  provided from racket/base, racket
  list  provided from r5rs
  list  provided from rnrs/base-6
  list  provided from lang/htdp-advanced

and much more.

So that's the sense in which it (and other hash functions) are missing
from the docs.  [Were, I haven't tried your latest push.]

 As far as the immutable functions, when I sent you the list of the
 functions I intended to add, those were not on it. They were
 intentionally left out to make the addition smaller and simpler.

Yeah, but that just misses too many use cases.  Since the language is
already mutative, I see nothing gained.

Thanks for the new push.

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


[racket-dev] hashes in ASL

2010-08-21 Thread Shriram Krishnamurthi
Why does make-hash require one argument, rather than just taking zero
like make-hash in Racket does?  ASL is anyway a language with state,
so it's perfectly meaningful to create an empty hash table and update
it.  Furthermore, many algorithms begin with an empty hash table.
This argument strikes me as entirely gratuitous...but maybe there's
some bigger picture of ASL I'm missing.

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


Re: [racket-dev] RFC: Coding Guidelines

2010-08-19 Thread Shriram Krishnamurthi
Neither would the PLT Web server.  I'm pretty certain Jay's own edits
to it were not preceded by tests.

Jay's changes to the PLAI language most certainly were not, because
the current PLAI that is bundled with DrRacket is broken.

(Sorry, Jay, but it's your prose.)

Shriram

On Thu, Aug 19, 2010 at 9:50 AM, Casey Klein
clkl...@eecs.northwestern.edu wrote:
 On Thu, Aug 19, 2010 at 8:44 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu 
 wrote:
 On Tue, Aug 17, 2010 at 3:57 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 Please comment.

 I think that this:

 Your first task when changing old code is to build an adequate test
 suite to ensure you do not introduce new mistakes as you attempt to
 improve it. Thank you for improving the world for future generations!

 is too demanding.  There are enormous areas of our code that don't
 have a test suite.  How comprehensive a test suite do I need before
 changing slideshow?  Or scribble (which has a test suite for the
 syntax, but not the language)?

 Robby and Matthew, would Slideshow exist today if you'd be expected to
 build it with this process?
 _
  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] RFC: Coding Guidelines

2010-08-19 Thread Shriram Krishnamurthi
But most people wouldn't dream of touching the core Racket engine (for
much the same reason).  Are these guidelines for kernel hackers?

Shriram

On Thu, Aug 19, 2010 at 9:53 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 There's code and there's code. I don't think slideshow is at the level of 
 Racket or Typed Racket or DrRacket. If it went away, I'd have no trouble 
 changing the ten or twenty files in my world that use it. Sure, I'd lose a 
 few days but if I lost Racket, I'd lose a year and more.

 -- Matthias





 On Aug 19, 2010, at 9:50 AM, Casey Klein wrote:

 On Thu, Aug 19, 2010 at 8:44 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu 
 wrote:
 On Tue, Aug 17, 2010 at 3:57 PM, Jay McCarthy jay.mccar...@gmail.com 
 wrote:
 Please comment.

 I think that this:

 Your first task when changing old code is to build an adequate test
 suite to ensure you do not introduce new mistakes as you attempt to
 improve it. Thank you for improving the world for future generations!

 is too demanding.  There are enormous areas of our code that don't
 have a test suite.  How comprehensive a test suite do I need before
 changing slideshow?  Or scribble (which has a test suite for the
 syntax, but not the language)?

 Robby and Matthew, would Slideshow exist today if you'd be expected to
 build it with this process?
 _
  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] RFC: Coding Guidelines

2010-08-19 Thread Shriram Krishnamurthi
You put it through Spidey.  If you didn't have any code, what would
you have put through Spidey?  Nothing.

The code came first.  It had long since been deployed before you did
this.

Performance testing came when we set out to write a paper and wanted
to do measurements.  They were initially designed only to measure
performance, not to actually *stress*.  They morphed into stress tests
later.  By that time, too, the system was long since deployed.

Shriram

On Thu, Aug 19, 2010 at 9:59 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 I, with Paul's help, worked the entire Web server through MrSpidey and 
 eliminated all but those checks that Herman-Meunier later showed how to 
 eliminate with their ICFP paper. That's far more than testing in some sense 
 even if it doesn't show that it serves.

 Paul set up automatic stress tests back then already. We reported them in our 
 paper.

 I call this judgment inaccurate.





 On Aug 19, 2010, at 9:56 AM, Shriram Krishnamurthi wrote:

 Neither would the PLT Web server.   I'm pretty certain Jay's own edits
 to it were not preceded by tests.

 Jay's changes to the PLAI language most certainly were not, because
 the current PLAI that is bundled with DrRacket is broken.

 (Sorry, Jay, but it's your prose.)

 Shriram

 On Thu, Aug 19, 2010 at 9:50 AM, Casey Klein
 clkl...@eecs.northwestern.edu wrote:
 On Thu, Aug 19, 2010 at 8:44 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu 
 wrote:
 On Tue, Aug 17, 2010 at 3:57 PM, Jay McCarthy jay.mccar...@gmail.com 
 wrote:
 Please comment.

 I think that this:

 Your first task when changing old code is to build an adequate test
 suite to ensure you do not introduce new mistakes as you attempt to
 improve it. Thank you for improving the world for future generations!

 is too demanding.   There are enormous areas of our code that don't
 have a test suite.   How comprehensive a test suite do I need before
 changing slideshow?   Or scribble (which has a test suite for the
 syntax, but not the language)?

 Robby and Matthew, would Slideshow exist today if you'd be expected to
 build it with this process?
 _
   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] a small Racket success story

2010-08-18 Thread Shriram Krishnamurthi
Yes, Matthias and I discussed this in the context of Typed Racket vs
Typed JavaScript some months ago.  TJS doesn't have to worry about
this because of the single-threaded nature of the language.  It seems
to me this is a non-trivial problem for TR.

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


Re: [racket-dev] Racket stuffs

2010-08-17 Thread Shriram Krishnamurthi
I almost love the bumper sticker.  Would you consider:

- removing the http: garbage and replace it with just
www.racket-lang.org?  The ://.../ is too much visual clutter (though
thanks for putting the slash at the end -- I hate it when people drop
that).  I know without the www. will work, but it's a good visual
cue that says this is a URL -- without it it looks like random text.

- lining up things a bit more?  It looks to me like the left of the `h'
in the URL isn't actually in line with the left of the `R' in Racket.

- I also wonder if a little more space between the name and the URL
might not be a good thing.

The little peel thing is just Zazzle's presentation, right?  It's not
part of the actual sticker?

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


[racket-dev] a pretty funny home page

2010-08-14 Thread Shriram Krishnamurthi
Go to

http://sites.google.com/site/viktorwinschel/

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


Re: [racket-dev] continuation weirdness

2010-08-12 Thread Shriram Krishnamurthi
 Understood, too. So, do you want WeScheme/Racket compatibility or
 WeScheme/DrRacket compatibility?

In some sense, neither.  We'd like to understand what is actually
happening, so we can make an intelligent decision accordingly.

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


Re: [racket-dev] Typed Racket and eq?

2010-08-02 Thread Shriram Krishnamurthi
I'm not talking about behavior, I'm talking about the intended
semantics of observations in the language.

Shriram

On Mon, Aug 2, 2010 at 9:47 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
 On Mon, Aug 2, 2010 at 9:40 AM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 If I export map (w/out change to type) from typed/racket and eq? it
 against the map from racket, the two are eq?.  This feels like a
 violation of abstraction: typed map is a different thing from
 untyped map.

 TR doesn't put additional contracts on the implementation of Racket
 primitives, since they already come with error-checking.  I'm not sure
 what you would want the difference in behavior to be between the two
 versions of `map'.
 --
 sam th
 sa...@ccs.neu.edu

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


Re: [racket-dev] Typed Racket and importing polymorphic code

2010-08-02 Thread Shriram Krishnamurthi
Arjun just pointed out to me that the inability to contract base
values can lead to much harder-to-understand problems in higher-order
contexts.  (Not surprising, but I hadn't thought that that would make
it much worse.)

On Mon, Aug 2, 2010 at 11:44 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
 On Mon, Aug 2, 2010 at 11:14 AM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:

 Okay, so here's another scenario.  This time, TR will NOT just pass
 the value through, as it did map.

  a.rkt
 #lang racket

 (define foo 4)
 (provide foo)
 ;; NOTE: a has not done a good job of protecting foo,
 ;; whatever the heck that means
  b.rkt
 #lang typed/racket

 (require/typed a.rkt [foo Number])
 (provide foo)
 ;; Now I'm going to put an explicit TYPE on foo
  c.rkt
 #lang racket

 (require b.rkt)
 (string-length foo)
 --

 The error message is

  string-length: expects argument of type string; given 4

 Nothing that looks like a contract violation.

 I was willing to live with your previous explanation re. map (whether
 or not it was primitive, the idea that something just passed through).
 But the idea that the typed intermediation above seems to do nothing
 is much harder to defend on similar grounds.

 I think this (and your second example, which is the same)  presents an
 interesting issue with contracts.  It's not peculiar to types:

 #lang racket/load

 (module m racket
  (define foo 4) (provide/contract [foo number?]))
 (module n racket
  (require 'm) (string-length foo))

 Again, no contract error. Right now, this isn't treated as an abuse of
 the protected value `4', but as an abuse of `string-length'.  Whether
 primitive values should treat function calls on them as message
 sends and thus be able to respond, potentially with contract errors,
 is a really interesting question.  This relates to Cormac's ideas
 about proxies for primitive values [1].

 [1] http://wiki.ecmascript.org/doku.php?id=harmony:proxies at the
 bottom of the page
 --
 sam th
 sa...@ccs.neu.edu

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-30 Thread Shriram Krishnamurthi
 Seems to me that this point directly contradicts one of Shriram's
 design goals, namely showing that + is no more special than append or
 one of your own functions.

Precisely.  And a point that Emu makes very well in Bootstrap.

Also, when is Honu getting indentation?

It's clear that putting out examples primarily filled with arithmetic
was a bad idea, because it focuses on the syntactically least
appealing part.  Frankly, people do not have a problem when they first
see arithmetic:

3 - 3
1+2 - (+ 1 2)
5*2 + 3*4 - (+ (* 5 2) (* 3 4))

The problems always come later.

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-30 Thread Shriram Krishnamurthi
 deffun: d/dx(f) =
   defvar: delta = 0.001
   fun: (x) in
      ((f((x + delta)) - f(x)) / delta)

Just to be pedantic, I've changed the in to in:, because I want to
have a consistent rule for all key*words*.

 Which can be understood easier than the prefix version but avoids all
 the negatives of a complete infix notation.

What you're doing is essentially recapping an age-old Lisp tradition
of defining infix macros (my guess is the first one was probably
written a few weeks after s-expressions got adopted as the programming
notation).  I don't have a problem with that.  I don't want to use
in: as the name for an infix construct, but maybe just i:
(especially if people are going to use it often, keeping it short will
help).  But I also don't want to spend time on that right now because
I don't think it's where the big payoff is.

 deffun: d/dx(f) =
   defvar: delta = 0.001
   fun: (x) in
      in:(in:( f( in:(x + delta) ) - f(x)) / delta) ; not as pretty...

No, once you're in infix, you can stay there:

deffun: d/dx(f) =
  defvar: delta = 0.001
  fun: (x) in:
i:((f(x+delta) - f(x)) / delta)

As I said in another message, I think I made a mistake by using
arithmetic examples, because they represent the worst-case for this
syntax.  Real code will have much less arithmetic.

 Since your target use if for students, I could be convinced that infix
 doesn't belong.  ¡  But both students and experienced (non-LISP)
 programmers will complain about the prefix math. (And prefix comparison
 operators.)

My experience teaching Scheme beginners is that Lisp-style prefix for
arithmetic is NOT a problem; they get the hang of it quickly.  It's
when things start to nest and parens start to add on that they start
to get frustrated.  (COND is a special pet peeve.)

 BTW, any binary operation that expresses a relationship between first
 and second operands could be clarified by writing it in infix.

Except conventionally, I hear no clamor for being able to say

  (+ . map . l)

or even

  (10 . expt . 2)

The bottom line, though, is that I don't have a problem with having a
parenthesized infix term offset by a keyword.

 Also, if P4P is dependent on keywords like if: elif: etc. then macros
 are crippled unless they can also make use of key words.

I'm afraid I totally don't understand what you're saying.

 Other examples:
   filter( lst ) with:(elem) { odd?(elem) }
 --
   (filer lst #:with (lambda (elem) (odd? elem)))

filter: e with: id e w/ id bound
--
(filter e (lambda (id) e w/ id bound))

I'm failing to see what is cripping here that #:with did not carry
over into Racket.  The idea is to create a surface syntax that
entirely hides the Racket layer underneath, so who cares whether the
Racket layer uses intermediate keywords or not?

Given that I am totally, completely, utterly missing your point, I'm
sure you must have one.  Try again?

 The switch example shows one more instance where someone will want to
 define a structure that you haven't thought of.   I believe you said cond
 will just have to be a bunch of if/elif.   But someone will still want to
 implement cond.   If you can't handle creating new structures in your
 syntax then P4P will only be useful to students.

Please see the section on syntax extensions in the manifesto.  I
thought I'd already addressed this.

  It won't help pull
 parenthesis-haters into the Racket camp (unless you implement all the
 structures they could wish for in your parser, since
 non-schemers/lispers aren't used to creating new syntaxes with macros).

Naturally, P4P will have to offer a term for each of the syntactic
constructs in Racket.  Functions come for free.  So they would have
the whole language available to them.  So what's the problem?

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-30 Thread Shriram Krishnamurthi
Several things to reply to, but before I get to them, it's critical
that I fix this misconception:

  2. I doubt that we can figure out the usefulness of this new syntax
  on this mailing list.

I am not trying to.  I only posted it here because I figured having
lots of eyes look at it would likely yield some interesting feedback.
And that has indeed been the case.  I don't think a mailing list is
going to resolve this one way OR the other (so for the same reason, I
am also ignoring the dismissive tone of some of the postings here).

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-29 Thread Shriram Krishnamurthi
 That's only true if {} count as parens too.  ¡  My suggestion was that
 they ONLY count as a begin statement.

So what do I do in the case of expressions-in-function-position?
Currently that is the one source of ambiguity in the language, so it
is essential that I deal with that.  Using {...} in the function
position addresses it.  [It's fugly, but rather rarely seen in code.]

 ¡  I could live with do: {}, I
 was just trying to reduce the typing and number of keywords a bit.

Understood, and I greatly appreciate the suggestions.

 Which basically means P4P syntax is not indentation based, it just
 has an extra style checker component added into the
 parser.   (Personally I think the style checker should be part of the
 IDE, not enforced by a compiler since it has nothing to do with
 whether a program is parsable.)

I've never said it is indentation-based.  You won't find that phrase
anywhere in the document.  Indeed, the documentation repeatedly says
that indentation does not play the role people think, precisely to
ward off misunderstandings like Mike's.  Finally, the documentation
even says how and why one might turn the indentation off.

If your point is that this design conflates two things -- paren
reduction and indentation -- you're right.  But turning off the
indentation checking is trivial: make two (soon to be three, with the
next release) predicates -- or the higher-order predicate invoker --
always return true.  It would take under 10 lines to define that
language and use it instead.  So I'd rather put the effort into the
harder language.  It seems to me an interesting experiment to
understand this intermediate point in the design space, where
indentation is enforced without impacting the semantics.  As an
end-user, when I stick my students in front of such a language, I
really want both aspects.

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-29 Thread Shriram Krishnamurthi
That's why internal defvar: exists.  Most of the time, this is what I
expect people will want and use, just like local variable definitions
in other languages (except done right, w/out bizarro scope-lifting
crud).

Unusually for you, your remark seems vacuous.  (P4P, and I quote::
This is purely about syntax. The semantics of P4P is precisely that
of Racket.  Neil, and I paraphrase: P4P forces you to know about the
semantics of Racket.)  So maybe I've missed your point.

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-29 Thread Shriram Krishnamurthi
I disagree.  I think parens are synecdoche.

Shriram

On Thu, Jul 29, 2010 at 1:28 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 FWIW, I think you're probably right that parens are actually code
 for I don't want to think so hard so while an alternative syntax may
 take away one excuse, language design and libraries and good docs and
 tutorials all the other things are probably going to be required as
 well to really make the language a success.

 Robby

 On Thu, Jul 29, 2010 at 12:19 PM, Joe Marshall jmarsh...@alum.mit.edu wrote:
 On Wed, Jul 28, 2010 at 3:06 PM, Everett we...@unoc.net wrote:
 I've always thought the problem was the parens.

 I don't believe this.  If the parens were the problem, then why didn't
 M-expressions gain popularity?  Why didn't CGOL?  Why didn't Dylan?
 Why hasn't *any* alternative syntax helped? (Honu, anyone?)

 And why aren't parens a problem in C:

          if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp)
                return -EFAULT;

 or Java?

        private static void defCategory(String name,
                                        final int typeMask) {
            map.put(name, new CharPropertyFactory() {
                    CharProperty make() { return new Category(typeMask);}});
        }

 --
 ~jrm
 _
  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] P4P: A Syntax Proposal

2010-07-29 Thread Shriram Krishnamurthi
They do stand for a bigger thing, but I think they also stand for themselves.

That is, as I said earlier in this thread, issues like composition and
nesting ARE difficult and students DO have difficulty adjusting to
them.

But we should not assume that they are the ONLY problem, and that the
syntax is no problem at all.  At least, that isn't my evidence.

Shriram

PS: I've been around this discussion enough times w/ Joe that I don't
think it's fruitful.  I'm taking this as an axiom; Joe takes the
negation of this as an axiom.  So I'd like to focus on discussion of
P4P itself.  In particular, it'd be great to get some feedback from
others who try it out.

On Thu, Jul 29, 2010 at 2:12 PM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 Okay, I just looked that up and I'm still not sure what you mean. :)

 Robby

 On Thu, Jul 29, 2010 at 1:09 PM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 I disagree.  I think parens are synecdoche.

 Shriram

 On Thu, Jul 29, 2010 at 1:28 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 FWIW, I think you're probably right that parens are actually code
 for I don't want to think so hard so while an alternative syntax may
 take away one excuse, language design and libraries and good docs and
 tutorials all the other things are probably going to be required as
 well to really make the language a success.

 Robby

 On Thu, Jul 29, 2010 at 12:19 PM, Joe Marshall jmarsh...@alum.mit.edu 
 wrote:
 On Wed, Jul 28, 2010 at 3:06 PM, Everett we...@unoc.net wrote:
 I've always thought the problem was the parens.

 I don't believe this.  If the parens were the problem, then why didn't
 M-expressions gain popularity?  Why didn't CGOL?  Why didn't Dylan?
 Why hasn't *any* alternative syntax helped? (Honu, anyone?)

 And why aren't parens a problem in C:

          if (unlikely(!access_ok(VERIFY_READ, iocbpp, 
 (nr*sizeof(*iocbpp)
                return -EFAULT;

 or Java?

        private static void defCategory(String name,
                                        final int typeMask) {
            map.put(name, new CharPropertyFactory() {
                    CharProperty make() { return new Category(typeMask);}});
        }

 --
 ~jrm
 _
  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


[racket-dev] P4P: A Syntax Proposal

2010-07-28 Thread Shriram Krishnamurthi
I've been vexed for a while about parenthetical syntax: I love it,
appreciate what it offers, but also recognize that no amount of
teaching or arguing alters how people perceive it.  With the switch to
Racket, and our continuing interest in user interface issues, I
believe it is wise to consider an optional alternate syntax.

I finally had a breakthrough last weekend on how to create a syntax
that may be more palateable without losing the essence of
parenthetical syntax.  As a preview, it does incorporate indentation,
but in a good way.  You'll see.

Feedback welcome.  The most important is whether you spot any flaws
regarding predictable parsing.

Here's a *non-permanent* URL where you can learn more:

  http://www.cs.brown.edu/~sk/tmp/P4P/

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-28 Thread Shriram Krishnamurthi
That does sound like the right level, in that this isn't a new
language -- by design.

I started out by trying to create a new syntax; then I realized I
didn't need to; then that I didn't *want* to.  By then I was locked
into this file structure and didn't come up for air.  I probably
didn't peel off enough layers.

Before I can move forward, I still need to resolve the syntactic
ambiguity.  As I understand it, Racket doesn't give me enough
information to distinguish {...} from (...) from [...].  Is that right
and, if so, is there any chance that will change?  [Zodiac did that
-;.]  I don't want a solution that looks like go look in the MrEd
buffer for  I'd rather not do a reader extension for it because
the extra keystrokes will add up.

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


Re: [racket-dev] P4P: A Syntax Proposal

2010-07-28 Thread Shriram Krishnamurthi
That did the trick -- thanks!

On Wed, Jul 28, 2010 at 2:18 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 Look up the 'paren-shape stx property.

 Jay

 On Wed, Jul 28, 2010 at 12:17 PM, Shriram Krishnamurthi s...@cs.brown.edu 
 wrote:
 That does sound like the right level, in that this isn't a new
 language -- by design.

 I started out by trying to create a new syntax; then I realized I
 didn't need to; then that I didn't *want* to.  By then I was locked
 into this file structure and didn't come up for air.  I probably
 didn't peel off enough layers.

 Before I can move forward, I still need to resolve the syntactic
 ambiguity.  As I understand it, Racket doesn't give me enough
 information to distinguish {...} from (...) from [...].  Is that right
 and, if so, is there any chance that will change?  [Zodiac did that
 -;.]  I don't want a solution that looks like go look in the MrEd
 buffer for  I'd rather not do a reader extension for it because
 the extra keystrokes will add up.

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




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

 The glory of God is Intelligence - DC 93

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


  1   2   >