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  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] 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
 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] Possible promotional poster (with apologies to Matthias)

2012-02-19 Thread Shriram Krishnamurthi
I viewed it on my phone (ie, slow) on a 2G connection (ie, even slower).

I suggest trying to simulate the experience because the layers draw one by
one. About half way through, the person looks like Lothar from the Mandrake
comics.

I will not dwell on similarities to the final picture.

--
Pardon terseness and mistakes -- sent from phone.
_
  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


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] 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
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
Ryan, I noticed this seems to be a problem in full Racket as well: try

#lang racket

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

(rest web-colors)

Robby privately wrote to say it should be regarded as a bug.

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


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
On Mon, Oct 10, 2011 at 8:13 AM, Jay McCarthy  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


[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] plea for short planet syntax in student languages?

2011-10-05 Thread Shriram Krishnamurthi
In the language I use in my class, I offer

  require:
only-in except-in prefix-in rename-in combine-in planet

  provide:
all-defined-out all-from-out rename-out except-out
prefix-out struct-out combine-out protect-out

and my students use most of these.  I am not aware of a student ever
getting into real trouble because of this.

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


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


[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] 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


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
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
It would be nice if I could turn on coverage highlighting from code in
my language's run-time configuration, without the user having to
(remember to) click anything at all.  My #lang already sets things
like pconvert options (which too they could have set by clicking,
except I did it for them).  I'd like it to be able to set this, too,
from the #lang rather than requiring another plugin.

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


[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


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


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


[racket-dev] PLaneT + Chrome UI -- minor bad interaction

2011-09-05 Thread Shriram Krishnamurthi
Something in the interaction between PLaneT and Chrome is unwieldy.

PLaneT asks you to pick a username and password; odds are you don't
want to pick your email address as your username to avoid having it be
public (and because it's unwieldy).  But if you ask Chrome to remember
usernames and passwords, it assumes the SAME values for the "User
name" and "Your email address" field on

http://planet.racket-lang.org/add.ss

(If you create a new account, it remembers your email address rather
than your username, so when you return you can't log in with the
values it's stored.)

Similarly, on the servlet you get after logging in, in the "Manage
your account" section, there's a "Change your email address" section
with a field called "New address"; this too is automatically populated
with the username.

I confess I don't know the heuristics that browsers use to populate
these fields; Chrome generally does a good job on most sites, so it's
jarring to run into one where it seems so off.  But it could be it's
Chrome's or the Web's fault (everyone these days now just uses their
email address as a username).  Either way, something for Eli's (?)
copious free time

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  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  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-31 Thread Shriram Krishnamurthi
Robby, two comments on that Apple UI guideline document:

1. It makes a distinction between Close and Close All.

2. It never mentions the word "tab" (in the sense in which we're using
it).  Its unit of interaction appears to be the window, not the tab.

In that sense, it doesn't appear to offer a clear guideline on tabs,
but if one were to extrapolate that what used to be a whole window has
now become a tab, it seems acceptable for "Close" to close the current
tab.  (Whether "Close All" should refer to the current window or all
windows is then ambiguous.)

On the other hand, given that it says nothing about "tabs", I don't
think one can really to it for guidance in this situation.  (Which
means you're still free to make the behavior consistent across
platforms.)

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
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
 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  
> 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
>>  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  
>>> 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
>>>>  wrote:
>>>>> On Thu, Aug 25, 2011 at 9:12 AM, Marijn  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
>>>>>>> -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
>>>>> -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
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
 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  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
>>  wrote:
>>> On Thu, Aug 25, 2011 at 9:12 AM, Marijn  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
>>>>> -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
>>> -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] Quick poll

2011-08-25 Thread Shriram Krishnamurthi
I'm confused.  Why aren't $1, etc. also identifiers?

> (define $1 1)
> (define 50-cent (/ $1 2))
> 50-cent  ;; which, as you know, is pronounced "fiffy"
0.5

Or are you asking, "Since I'm going to steal part of the identifier
namespace anyway, would you prefer..."?  (If so I'd say just take both
and thereby make it useful to people used to either convention.)
_
  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
 wrote:
> On Thu, Aug 25, 2011 at 9:12 AM, Marijn  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
>>> -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
> -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] 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-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] 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] 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] 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] 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] 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  wrote:
>
>
> On Thu, Aug 11, 2011 at 3:03 PM, Guillaume Marceau 
> 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] 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
 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
>  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] 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
 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
>>  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  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-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-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
 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  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  wrote:
> On Mon, Aug 1, 2011 at 11:48 AM, Eli Barzilay  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  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  wrote:
> On Mon, Jul 11, 2011 at 6:32 PM, Matthias Felleisen
>  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
 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
 wrote:
> On Fri, Jun 10, 2011 at 5:52 PM, Danny Yoo  wrote:
>> On Fri, Jun 10, 2011 at 6:43 PM, Robby Findler
>>  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
 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  
> 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
> I agree that simplifying the error messages is a good idea and will be
> extremely helpful, but is there a good reason not to *teach* students
> the students much of this vocabulary?

We will also be producing some kind of cheat-sheet for both teachers
and students to refer to.

In part, simplifying the vocabulary helps keep that sheet simple and
manageable, so eyes don't glaze over when people see it.

We also noticed that "teaching" has only so much effect.  We
correlated (first-year college) student knowledge of vocabulary with
what their professors used, after a whole term/semester of class.  We
found a positive but very small correlation between usage of a term by
a professor and students' knowledge of its meaning.

In short, all your suggestions are perfectly reasonable, and they are
largely complementary to what we're suggesting.  However, they are not
entirely orthogonal: we believe simplifying the vocabulary will only
help such efforts.

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

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
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  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 :
>>
>> 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  in (define  
>>> ), and its subsequent occurrences.
>>>
>>>
>>> Stephen Bloch
>>> sbl...@adelphi.edu
>>>
>>>
>>> _
>>>  For list-related administrative tasks:
>>>  http://lists.racket-lang.org/listinfo/dev
>>
>>
>
>
>
> --
> Jay McCarthy 
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
>
> "The glory of God is Intelligence" - D&C 93
>
> _
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev

_
  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  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  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 :
>> > 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 
>> Assistant Professor / Brigham Young University
>> http://faculty.cs.byu.edu/~jay
>>
>> "The glory of God is Intelligence" - D&C 93
>>
>
>

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


Re: [racket-dev] 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] Please help me to understand the two lines.

2011-05-30 Thread Shriram Krishnamurthi
Sam, are you referring to this text?

  The any/c contract is similar to any, in that it makes no demands on
  a value. Unlike any, any/c indicates a single value, and it is
  suitable for use as an argument contract.

This would seem to suggest that any is actually more general, because
any/c seems to require a single value whereas any (by implication)
permits more or less than one.  This is compounded by the later text:

  Use any/c as a result contract when it is particularly important to
  promise a single result from a function. Use any when you want to
  promise as little as possible (and incur as little checking as
  possible) for a function's result.

which again points to a single/any-number-of value(s) distinction.

But then in his email Robby says

  As for the any/c vs any: they are two separate things. "any/c" is
  general purpose contract that allows anything. "any" is special
  syntax that is only allowed inside function contracts. You can think
  of "any" as a more restricted form of "any/c" and that's 95% of the
  story.

which I have difficulty reconciling with the docs quotes.

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


Re: [racket-dev] `letrec' and continuations

2011-05-20 Thread Shriram Krishnamurthi
> I see no reason to change `letrec'. Fixing internal definitions is the
> goal; I didn't see (until Robby's suggestion) that fixing internal
> definitions doesn't necessarily require a change to `letrec'.

This will also have the salutary effect of encouraging the use of
internal definitions, which I think is a nicer programming style
anyway!

Shriram
_
  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  wrote:
> 20 minutes ago, Justin Zamora wrote:
>> On Sun, May 1, 2011 at 3:20 AM, D Herring  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
 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
 wrote:
> Want to write it? ;)
>
> On Sunday, January 23, 2011, Matthias Felleisen  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


[racket-dev] Church numerals in Scratch

2011-01-23 Thread Shriram Krishnamurthi
http://byob.berkeley.edu/Church.pdf
_
  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=view&pr=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
 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


[racket-dev] Program by Design Web site

2010-11-25 Thread Shriram Krishnamurthi
The Program by Design Web site is now live:

http://www.programbydesign.org/

Would you please update links you have to old sites (like
www.teach-scheme.org) to point to the above URL instead?  (The old URL
will continue to work, but only for legacy links.)

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


Re: [racket-dev] Racking your brain

2010-11-23 Thread Shriram Krishnamurthi
Along the lines of useless email with silly content, I should give
props to Dave Herman, who took one look at P4P and asked why I didn't
instead call it "Bracket".
_
  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
 wrote:
> Well, he's generous about it; here's what he had to say.
> John
>
> Begin forwarded message:
>
> From: Aaron Stump 
> Date: November 16, 2010 5:58:42 PM PST
> To: John Clements 
> 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 
> 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
If you knew his background, you would not expect him to at all be a
native speaker of ().

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

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


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

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

Shriram

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


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

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

Shriram

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


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

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

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

('(lambda (x) x) 3)

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

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

Shriram

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


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

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

Shriram

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


Re: [racket-dev] land of lisp, music video/comic/book

2010-10-28 Thread Shriram Krishnamurthi
We spent 15 years trying to shake the name "Lisp", and today I feel
proud to be a Lisp programmer.

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


Re: [racket-dev] highlighting function position with an underline.

2010-10-26 Thread Shriram Krishnamurthi
> I'm in the pit of despair... er, grading first-year exams, and I'm
> looking at code that has terrible paren-placement issues.   I don't
> take points off for this on exams, but I can only imagine how long
> it takes these poor kids to get their code to run.

Don't imagine.  Record transcripts of them editing.  Make popcorn,
invite the neighbors over for the horror flick.

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


[racket-dev] macros for sub-keywords

2010-10-20 Thread Shriram Krishnamurthi
We've brought this up on this list before -- forms like provide export
their sub-keywords as macros.  I believe this is why the following
module compiles:

#lang racket
(require scribble/base)
(define (defn t) (bold t))
(provide all-defined-out)

Someone just spent 30 minutes wrestling with this.  When I finally
showed the problem, I was asked, "Wait, so why wasn't this just an
error?"

This is absurdly hard to diagnose and debug if you don't already know
quite a bit about what's going on.

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


Re: [racket-dev] typed/scheme n00b question

2010-09-05 Thread Shriram Krishnamurthi
Can you tell us (om the list) what the true type is?  I'm sure I'm not
the only one curious as to precisely what it is and how you would
write it w/ the exception.  Thanks.

Shriram

On Sun, Sep 5, 2010 at 8:57 AM, Sam Tobin-Hochstadt  wrote:
> On Sun, Sep 5, 2010 at 3:06 AM, Hari Prashanth  wrote:
>> Is this what you are looking for?
>>
>> (require/typed racket/base
>>               [file-or-directory-modify-seconds
>>                (String (Option Integer) (-> exn:fail:filesystem) -> (U 
>> Integer Void))])
>
> Hari is correct that you can use `require/typed' on `racket/base'.
> However, that type isn't quite right - it shouldn't *return*
> `exn:fail:filesystem' - that is an exception that might be raised.
>
> The true type is more complex; I'll add it to the base environment.
> --
> 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


[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


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
 wrote:
> I guess you don't have the print handler set up right.
>
> On Sat, Aug 28, 2010 at 8:23 PM, Shriram Krishnamurthi  
> 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
>>  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  
>>> 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 
>>>>  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 
>>>> Assistant Professor / Brigham Young University
>>>> http://teammccarthy.org/jay
>>>>
>>>> "The glory of God is Intelligence" - D&C 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] 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
 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  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  
>> 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 
>> Assistant Professor / Brigham Young University
>> http://teammccarthy.org/jay
>>
>> "The glory of God is Intelligence" - D&C 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] relationship between define-struct and struct

2010-08-28 Thread Shriram Krishnamurthi
On Sat, Aug 28, 2010 at 3:38 PM, Robby Findler
 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


[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


[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.
<>_
  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


Re: [racket-dev] stepper UI question

2010-08-26 Thread Shriram Krishnamurthi
Yes, sorry.  1. I was hoping there would be a quick and uniform
answer, but there's not.  2. We've spent a lot of time pondering
how's, which is why I focused on where.

Robby, point taken, though when your program doesn't work as you
expect, you're likely using the repl a lot more.  Since the stepper is
intended to help with that debugging process, non-integration with
that is also a problem.

Shriram

On Thu, Aug 26, 2010 at 8:40 PM, John Clements
 wrote:
>
> On Aug 26, 2010, at 5:23 PM, Shriram Krishnamurthi 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?
>
> I do agree.  Your original message seemed to be entirely focused on the 
> *where* question, which I think is why it's what we've all been discussing.
>
> John
>
>
_
  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 )

  (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
 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  
> 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] stepper UI question

2010-08-26 Thread Shriram Krishnamurthi
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


Re: [racket-dev] stepper UI question

2010-08-26 Thread Shriram Krishnamurthi
Got it.  Thanks for all the inputs and for the great suggestion!

Shriram

On Thu, Aug 26, 2010 at 1:56 PM, Robby Findler
 wrote:
> I can see how to do what Mattgias is suggesting at the snip level (so
> not as bad as I made out) but you won't get nested scroll bars so you
> might not like it.
>
> Robby
>
> On Thursday, August 26, 2010, Shriram Krishnamurthi  wrote:
>> Understood.  But I think this is what Robby is saying is very
>> difficult to implement correctly, and he's suggesting we put it in a
>> different window at least for now so that we don't get bogged down in
>> the details of the Interactions window.  Right, Robby?
>>
>> Shriram
>>
>> On Thu, Aug 26, 2010 at 1:21 PM, Matthias Felleisen
>>  wrote:
>>>
>>> On Aug 26, 2010, at 11:59 AM, Shriram Krishnamurthi wrote:
>>>
>>>> Anyone else have comments/suggestions?
>>>
>>> Robby's idea of allowing students to choose how a RUN actually worked 
>>> occurred to me too but I had a different behavior in mind. Instead of 
>>> opening a separate window, I'd much rather see a step-by-step evaluation in 
>>> the repl.
>>>
>>> Here is what I have in mind assuming (f x y) (sqrt (+ (sqr x) (sqr y))) is 
>>> in the Definitions area:
>>>
>>>> (f 3 4)
>>> 5   { STEP }
>>>
>>> If STEP is clicked, the following line appears:
>>> ==> (f 3 4)
>>>
>>> and the student has the option of seeing the rest of the reduction sequence:
>>> ==> (f 3 4)
>>> ==> (sqrt (+ (sqr 3) (sqr 4))
>>> ==> (sqrt (+ 9 (sqr 4))
>>> ==> (sqrt (+ 9 16))
>>> ...
>>> Each line highlights the contractum.
>>> The penultimate line highlights the redex.
>>>
>>> Each step is generated in response to a student action (return or click of 
>>> button or keyboard shortcut). Students should have actions available to 
>>> skip to the next function application, conditional, or primitive operation.
>>>
>>> ;; ---
>>>
>>> Thanks for tackling that.
>>>
>>> Do keep in mind that Stephen is working on adapting the stepper (guts) to 
>>> the Lazy language too.
>>>
>>> -- Matthias
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] printing images in REPL

2010-08-26 Thread Shriram Krishnamurthi
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


Re: [racket-dev] stepper UI question

2010-08-26 Thread Shriram Krishnamurthi
Understood.  But I think this is what Robby is saying is very
difficult to implement correctly, and he's suggesting we put it in a
different window at least for now so that we don't get bogged down in
the details of the Interactions window.  Right, Robby?

Shriram

On Thu, Aug 26, 2010 at 1:21 PM, Matthias Felleisen
 wrote:
>
> On Aug 26, 2010, at 11:59 AM, Shriram Krishnamurthi wrote:
>
>> Anyone else have comments/suggestions?
>
> Robby's idea of allowing students to choose how a RUN actually worked 
> occurred to me too but I had a different behavior in mind. Instead of opening 
> a separate window, I'd much rather see a step-by-step evaluation in the repl.
>
> Here is what I have in mind assuming (f x y) (sqrt (+ (sqr x) (sqr y))) is in 
> the Definitions area:
>
>> (f 3 4)
> 5   { STEP }
>
> If STEP is clicked, the following line appears:
> ==> (f 3 4)
>
> and the student has the option of seeing the rest of the reduction sequence:
> ==> (f 3 4)
> ==> (sqrt (+ (sqr 3) (sqr 4))
> ==> (sqrt (+ 9 (sqr 4))
> ==> (sqrt (+ 9 16))
> ...
> Each line highlights the contractum.
> The penultimate line highlights the redex.
>
> Each step is generated in response to a student action (return or click of 
> button or keyboard shortcut). Students should have actions available to skip 
> to the next function application, conditional, or primitive operation.
>
> ;; ---
>
> Thanks for tackling that.
>
> Do keep in mind that Stephen is working on adapting the stepper (guts) to the 
> Lazy language too.
>
> -- Matthias
>
>
>
>
>
>
>
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


  1   2   >