[racket-dev] self-documenting feature

2010-07-19 Thread Shriram Krishnamurthi
Python apparently has a feature where you essentially put the
contract/purpose in the text of a function, and when you type the
function's name, it prints out that documentation.  (It sounds like
the docstrings of Common Lisp.)

This came up on day 1, minute 15 of the TSRJ workshop.
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] self-documenting feature

2010-07-19 Thread Robby Findler
Sure, but if we have the manpower/energy for this, then it would be
nice to have, no? (We'd probably do something syntactically and not
via runtime values, but the essential idea seems like it would carry
over.)

Robby

On Mon, Jul 19, 2010 at 11:05 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 While I have always liked doc strings in Lisps -- and koodos to Python for 
 copying another feature from Lisp -- is it as critical to HtDP programming as 
 built-in check-expect with coverage? (No but I think having it would be 
 nice.) Do ask the person who asked whether Python has coverage now. -- 
 Matthias



 On Jul 19, 2010, at 10:16 AM, Shriram Krishnamurthi wrote:

 Python apparently has a feature where you essentially put the
 contract/purpose in the text of a function, and when you type the
 function's name, it prints out that documentation.  (It sounds like
 the docstrings of Common Lisp.)

 This came up on day 1, minute 15 of the TSRJ workshop.
 _
  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] srfi41 for racket

2010-07-19 Thread Jos Koot
Is it a good idea to adapt PLT-Scheme implementation of srfi41 to Racket?
In principle, this is trivial.
However, when I adapted srfi41 for PLT-Scheme, Eli Barzilay advised me not to 
double the code for promises.
I did not follow his advice.
I now intend to follow his advice.
This has consequences that at first sight may seem undesirable. For example it 
would no longer be possible to distinguish a stream from a plain promise. It is 
not possible to provide a reliable predicate for streams. This also holds for 
the standard implementation. For example:
 
#lang racket
(require srfi/41)
(define improper-stream ((stream-lambda () 1)))
(stream? improper-stream) ; - #t
(stream-null? improper-stream) ; - error
(stream-pair? improper-stream) ; - error
 
Hence the claim that a stream is either stream-null or a stream-pair is not 
fulfilled.
The document of srfi41 also claims that stream-null is unique. It is not:
 
(define another-stream-null (stream-filter number? (stream 'a 'b 's)))
(equal? stream-null another-stream-null) ;- #f, yet:
(stream-null? another-stream-null) ; - #t
 
In the docs for a new implementation I would like to make a distinction between 
abstract streams (with abstract predicates but without true (complete) 
predicates) and concrete streams. A concrete stream would be:
 
concrete-stream ::= null
concrete-stream ::= promise (any promise, and forcing may yield anything)
concrete-stream ::= pair whose cdr is a concrete stream (and the car probably, 
but not necessarily a promise)
 
When using stream functions on concrete streams that do not satisfy the 
requirements of abstract streams, errors will be reported (just like in th 
standard implementation) It is possible to make a predicate for 
concrete-streams, but it seems rather useless to me.
 
In srfi41 attempts have been made to conceal the internally defined syntax 
stream-lazy. Yet stream-lazy can easily be exposed, as in:
(define-syntax my-stream-lazy
 (syntax-rules ()
  ((_ expr) ((stream-lambda () expr)
 
While it is possible to maintain almost all provided syntaxes and procedures of 
PLT's srfi41, some changes would be noticeable:
 
1:
(stream-lambda formals definition ... body ...1)
can also be written as
(lambda formals (lazy (let () definition ... body ...)))
To me this seems an improvement.
 
2:
stream-null would just be a synonym for null. There is no reason to wrap it in 
a promise.
 
3:
A stream-pair could be a promise that yieds a pair, but it could also be a pair 
whose cdr is a promise. There is no reason to wrap a pair of promises in 
another promise.
 
Your comments/critics/advises are welcome.
Thanks, Jos
 

Hartelijke groet, 
Jos Koot 
Carrer d'Argentona 17 baixos 
ES 08302 MATARO 
España/Spanje /Spain 

+34937412360 
+34679944599 

λ(x)(((x x)x)x)x)x)x)x)) 
   (λ(x)(λ(y)(x(x y) 
  (λ(x)(cons'greeting x))) 
'()) ; That's a lot of greetings. 

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

Re: [racket-dev] self-documenting feature

2010-07-19 Thread Shriram Krishnamurthi
 Do ask the person who asked whether Python has coverage now. -- Matthias

Aspirin vs vitamins.

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


Re: [racket-dev] self-documenting feature

2010-07-19 Thread Guillaume Marceau
During
There is good support from the interviews for having dynamic
documentation in DrRacket would help quite a bit. Two out of the four
students I interview requested the feature.

Here are some relevant inteview excepts.


Student #1:

Maybe a tiny example, or something, that follows the contract and
purpose of AND, might help. Because a lot of the time when I was doing
these I found myself not remembering the contract and purpose for
little things like this, like AND. It can take in multiple things. But
the real thing I forgot is if they want things to the end.  The
problem is that they all have to be inside the parentheses.
G, you're forgetting the contract and purpose of different functions?
S, of course that happens a lot. CONS, LIST, APPEND, STRING-APPEND,
all things we use, I forget what it takes in. Sometime I think of
using SYMBOL? instead of SYMBOL=? and I have to take that extra second
just to think after I've noticed I have an error. Which one do I use,
SYMBOL?, or SYMBOL=? because they are relatively the same thing. They
both produce Boolean, but one says this equals to the other. Having at
least a little example, or the contract, or the purpose, the contract
probably would help a lot. But that would be a lot of work to, but it
would definitely help.

I remember the contracts, the documentation of the contracts, and
having to look it up. What does AND take in? Or what is APPEND. Or
what about MIN vs MAX? Which takes in which? The x/y, I forget?
overlay.



Student #2:

Random idea, but perhaps something that could be helpful... maybe
under the error if you could somehow put an example of a define struc
t... just something to show define-struct is define-struct open
parenthesis something something
G, some kind of syntax reminder
S, yeah. Because there was probably my hardest thing, trying to learn
the language? like when you add five and seven, its (+ 5 7)  not
(5+7)?  example would probably be really useful.

and later during the interview:

For example define-struct, ever since we started using it a lot, it
was just something that I knew how to use because we used it almost
everyday in class. But for something like format, or filter, I would
just touched on in one lecture, then we would have to use it in
special circumstances, an example in the error message would be
awesome. It would be a very good reminder.

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


[racket-dev] Windows test bundle 29M vs. 47M for other platforms?

2010-07-19 Thread John Clements
On this page

http://pre.racket-lang.org/release/installers/

the reported size of the Windows installer is 29M, vs. about 47 or 48 M for 
other platforms.  I see that this was true of the 5.0 release as well, so this 
is probably expected, but I'm curious: why is this? Is it just that the other 
platforms are distributed uncompressed and rely upon dynamic compression?

John



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

Re: [racket-dev] self-documenting feature

2010-07-19 Thread Matthias Felleisen

And which is which :-) 

On Jul 19, 2010, at 1:24 PM, Shriram Krishnamurthi wrote:

 Do ask the person who asked whether Python has coverage now. -- Matthias
 
 Aspirin vs vitamins.
 
 Shriram

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


Re: [racket-dev] self-documenting feature

2010-07-19 Thread Matthias Felleisen

That's totally different from what Shriram described. 


On Jul 19, 2010, at 1:53 PM, Guillaume Marceau wrote:

 During
 There is good support from the interviews for having dynamic
 documentation in DrRacket would help quite a bit. Two out of the four
 students I interview requested the feature.
 
 Here are some relevant inteview excepts.
 
 
 Student #1:
 
 Maybe a tiny example, or something, that follows the contract and
 purpose of AND, might help. Because a lot of the time when I was doing
 these I found myself not remembering the contract and purpose for
 little things like this, like AND. It can take in multiple things. But
 the real thing I forgot is if they want things to the end.  The
 problem is that they all have to be inside the parentheses.
 G, you're forgetting the contract and purpose of different functions?
 S, of course that happens a lot. CONS, LIST, APPEND, STRING-APPEND,
 all things we use, I forget what it takes in. Sometime I think of
 using SYMBOL? instead of SYMBOL=? and I have to take that extra second
 just to think after I've noticed I have an error. Which one do I use,
 SYMBOL?, or SYMBOL=? because they are relatively the same thing. They
 both produce Boolean, but one says this equals to the other. Having at
 least a little example, or the contract, or the purpose, the contract
 probably would help a lot. But that would be a lot of work to, but it
 would definitely help.
 
 I remember the contracts, the documentation of the contracts, and
 having to look it up. What does AND take in? Or what is APPEND. Or
 what about MIN vs MAX? Which takes in which? The x/y, I forget?
 overlay.
 
 
 
 Student #2:
 
 Random idea, but perhaps something that could be helpful... maybe
 under the error if you could somehow put an example of a define struc
 t... just something to show define-struct is define-struct open
 parenthesis something something
 G, some kind of syntax reminder
 S, yeah. Because there was probably my hardest thing, trying to learn
 the language? like when you add five and seven, its (+ 5 7)  not
 (5+7)?  example would probably be really useful.
 
 and later during the interview:
 
 For example define-struct, ever since we started using it a lot, it
 was just something that I knew how to use because we used it almost
 everyday in class. But for something like format, or filter, I would
 just touched on in one lecture, then we would have to use it in
 special circumstances, an example in the error message would be
 awesome. It would be a very good reminder.
 

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


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

2010-07-19 Thread Robby Findler
On Mon, Jul 19, 2010 at 9:47 AM, Ryan Culpepper ry...@ccs.neu.edu wrote:
 * Robby Findler ro...@eecs.northwestern.edu
  - DrRacket Tests

These discovered a bug. So, not yet done, I guess.

  - Framework Tests
  - Contracts Tests
  - Games Tests
  - Teachpacks Tests: image tests
  - PLaneT Tests

done

  Updates:
  - DrRacket Updates: update HISTORY
  (updates should show v5.0.1 as the most current version)

done (pushed a changed to git)

  - Ensure that previous version of DrRacket's preference files still
    starts up with new DrRacket

done.

  - Update man pages in racket/man/man1: drracket.1
  Email me to pick the changes when they're done, or tell me if there
  are no such changes.

no changes.

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

Re: [racket-dev] self-documenting feature

2010-07-19 Thread Nadeem Abdul Hamid
 Do ask the person who asked whether Python has coverage now. -- Matthias

Maybe not packaged for beginners, but it is doable...
  http://pypi.python.org/pypi/coverage/2.85 
  http://nedbatchelder.com/code/coverage/





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


Re: [racket-dev] self-documenting feature

2010-07-19 Thread Nadeem Abdul Hamid
Yes, but Racket docstrings aren't even there at all (yet :))...

On Jul 19, 2010, at 4:58 PM, Matthias Felleisen wrote:

 
 That's the question. Packaged for beginners; always there, never to ask for. 
 
 
 On Jul 19, 2010, at 4:55 PM, Nadeem Abdul Hamid wrote:
 
 Do ask the person who asked whether Python has coverage now. -- Matthias
 
 Maybe not packaged for beginners, but it is doable...
 http://pypi.python.org/pypi/coverage/2.85 
 http://nedbatchelder.com/code/coverage/
 
 
 
 
 
 

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


Re: [racket-dev] self-documenting feature

2010-07-19 Thread Shriram Krishnamurthi
This is a pointless exchange that misses the reason for its initiation.

Attendee: Here's a nice feature that I find awfully useful.  How do I
get it in DrRacket?

Us: Oh yeah?  And can your beloved language do X?

Shriram

On Mon, Jul 19, 2010 at 4:58 PM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 That's the question. Packaged for beginners; always there, never to ask for.


 On Jul 19, 2010, at 4:55 PM, Nadeem Abdul Hamid wrote:

 Do ask the person who asked whether Python has coverage now. -- Matthias

 Maybe not packaged for beginners, but it is doable...
  http://pypi.python.org/pypi/coverage/2.85
  http://nedbatchelder.com/code/coverage/







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


Re: [racket-dev] python docstrings

2010-07-19 Thread Eli Barzilay
On Jul 19, John Clements wrote:
 [...] a python-like feature [...]  I wasn't familiar with Python's
 docstrings, so I checked them out.  [...]

On Jul 19, Shriram Krishnamurthi wrote:
 Python apparently has a feature [...]

(I was actually relieved when Matthias properly tied this back to Lisp
docstrings.  The python-only posts were going towards making another
case of a schwartzian transform thing.)

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