Re: [racket-dev] What is the policy on what is included in the core libraries?

2015-02-17 Thread Matthias Felleisen

At some point TR will move on, and perhaps the time has come. 


On Feb 17, 2015, at 12:06 PM, Vincent St-Amour stamo...@ccs.neu.edu wrote:

 I don't think we should add functions to TR that are not in Racket and
 that are not clearly type-related (e.g., `cast`).
 
 I also like Jens's solution better. Education vs crutches.
 
 Vincent
 
 
 
 At Tue, 17 Feb 2015 10:39:16 -0500,
 Matthias Felleisen wrote:
 
 
 I'd add them to Typed Racket. That's what Haskellians are most likely to 
 explore and when they find them, it's a good thing (tm). -- Matthias
 
 
 
 
 On Feb 17, 2015, at 2:18 AM, Alexis King lexi.lam...@gmail.com wrote:
 
 I was just thinking today that I would, for example, find it useful to have 
 a (zip ...) function in racket/list that would be equivalent to (map list 
 ...). Users coming from a Haskell background might even find it useful to 
 have a zip-with function that is simply an alias for map. Admittedly, these 
 are rather trivial, but (especially in the first case) I think they’d still 
 be useful.
 
 I am all for avoiding feature creep and code bloat, but Racket’s “batteries 
 included” approach seems to make functions like these prime candidates for 
 libraries like racket/list. As long as they’re not in racket/base, they 
 seem fairly harmless, especially considering they would only be needed at 
 compile-time.
 
 Should I even consider adding things like this, or is the consensus that 
 the libraries are mostly sufficient as-is?
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Racket Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-dev+unsubscr...@googlegroups.com.
 To post to this group, send email to racket-...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/racket-dev/5D941DB1-8A55-4A41-98A2-A3BE1BFE6D40%40gmail.com.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Racket Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-dev+unsubscr...@googlegroups.com.
 To post to this group, send email to racket-...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/racket-dev/EAAD5B93-DB78-419B-A662-131AD1D3E303%40ccs.neu.edu.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Racket Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/63C7696A-1532-400A-825D-247BB3E31750%40ccs.neu.edu.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-dev] What is the policy on what is included in the core libraries?

2015-02-17 Thread Matthias Felleisen

I'd add them to Typed Racket. That's what Haskellians are most likely to 
explore and when they find them, it's a good thing (tm). -- Matthias




On Feb 17, 2015, at 2:18 AM, Alexis King lexi.lam...@gmail.com wrote:

 I was just thinking today that I would, for example, find it useful to have a 
 (zip ...) function in racket/list that would be equivalent to (map list ...). 
 Users coming from a Haskell background might even find it useful to have a 
 zip-with function that is simply an alias for map. Admittedly, these are 
 rather trivial, but (especially in the first case) I think they’d still be 
 useful.
 
 I am all for avoiding feature creep and code bloat, but Racket’s “batteries 
 included” approach seems to make functions like these prime candidates for 
 libraries like racket/list. As long as they’re not in racket/base, they seem 
 fairly harmless, especially considering they would only be needed at 
 compile-time.
 
 Should I even consider adding things like this, or is the consensus that the 
 libraries are mostly sufficient as-is?
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Racket Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-dev+unsubscr...@googlegroups.com.
 To post to this group, send email to racket-...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/racket-dev/5D941DB1-8A55-4A41-98A2-A3BE1BFE6D40%40gmail.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Racket Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/EAAD5B93-DB78-419B-A662-131AD1D3E303%40ccs.neu.edu.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-dev] Full transparency

2015-01-21 Thread Matthias Felleisen

Sounds like a straightforward change to the existing macros. Why don't you 
create a fork and experiment? 


On Jan 21, 2015, at 1:15 PM, Byron Davies byrondav...@starshine.us wrote:

 Or, more conservatively, every struct and object in a given package, file, or 
 set of files.
 
 On Wed, Jan 21, 2015 at 11:03 AM, Byron Davies byrondav...@starshine.us 
 wrote:
 Would it be easy to create a compiler flag that would make every struct and 
 object transparent?  This would then make it easy to create a Lisp 
 Machine-style Inspector that would be able to roam through every data 
 structure during debugging.
 
 Byron
 
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-15 Thread Matthias Felleisen


On Jan 15, 2015, at 11:13 AM, David Van Horn dvanh...@cs.umd.edu wrote:

 On 1/15/15, 11:04 AM, Matthias Felleisen wrote:
 
 Well that got me all excited. So I tried to get the sample module
 to pass the verification step -- until I realized how restricted
 the grammar is!
 
 (module f racket (provide (contract-out [f (real? . - .
 integer?)])) (define (f n) (/ 1 (- 100 n
 
 I would love to be able to use at least (and/c real? (/c 0)) for
 the domain so I can get the example done.
 
 Or am I overlooking a way to make this work here?
 
 The /c contract is there, but missing from the grammar (we'll fix that).
 
 But (/c 0) will not make this program verify.  You want this contract:
 
 ((and/c real? (lambda (x) (not (= x 100 . - . real?)
 
 Using this contract, the program verifies.


My contract is stronger than yours. So why will it not go through? 
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Racket Winter Release

2015-01-08 Thread Matthias Felleisen

Dear Racket users, 

Happy New Year. 

As you may know, we split the Git repo for the core last year. 

We have been working on re-creating the release process for this new
organization. Our plan is to
 (1) skip our normal Jan/Feb release cycle
 (2) test-run the release process during this cycle instead
 (3) resume our regular release rhythm this spring. 

Thanks for your patience. 

Matthew, Robby, Sam, Ryan, Jay, and Matthias

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


Re: [racket-dev] The repository is now split

2014-12-04 Thread Matthias Felleisen

Is this the expected behavior: 

 $ git clone git:plt plt2
 $ cd plt2/
 $ make
...
 raco setup: --- post-installing collections ---

 raco setup: --- checking package dependencies ---
 make install-common-last
 make fix-paths
 if [  !=  ]; then \
   if [  =  ]; then \
 racket/racketcgc -G /Users/matthias/plt2/build/config -u \
   ../../collects/setup/unixstyle-install.rkt \
   make-install-destdir-fix ../.. \
   /Users/matthias/plt2/racket/bin 
 /Users/matthias/plt2/racket/collects /Users/matthias/plt2/racket/doc 
 /Users/matthias/plt2/racket/lib /Users/matthias/plt2/racket/include 
 /Users/matthias/plt2/racket/lib /Users/matthias/plt2/racket/share 
 /Users/matthias/plt2/racket/etc 
 /Users/matthias/plt2/racket/share/applications 
 /Users/matthias/plt2/racket/man yes; \
   fi \
 fi
 make preserve-raco-pkg-default-scope
 :
 cp ../COPYING-libscheme.txt ../COPYING_LESSER.txt ../COPYING.txt 
 /Users/matthias/plt2/racket/share/
 if racket/bin/racket -G build/config -I racket/base -e '(case (system-type) 
 [(macosx) (exit 0)] [else (exit 1)])' ; then make native-from-git ; fi
 if [ ! -d native-pkgs/racket-win32-i386 ]; then make complain-no-submodule ; 
 fi
 : 
 : Native packages are not in the expected subdirectory. Probably,
 : you need to use 'git submodule init' and 'git submodule update' to get
 : the submodule for native packages.
 : 
 exit 1
 make[3]: *** [complain-no-submodule] Error 1
 make[2]: *** [native-from-git] Error 2
 make[1]: *** [plain-in-place] Error 2
 make: *** [in-place] Error 2
 [:~/plt2] matthias% 










On Dec 4, 2014, at 10:51 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 I've just push a change to the plt repository that removes almost all
 the packages.
 
 The split repositories are all in the `racket` organization on GitHub.
 You can see them here: https://github.com/racket/
 
 I *highly* recommend creating a new clone of the repository, and
 re-running `make`. This will install all of the packages in
 main-distribution and main-distribution-test from the package
 catalog.
 
 There are a number of problems with the current Makefile setup, which
 we're working on fixing, but which you'll need to know about for a
 little while (hopefully not more than today).
 
 * If you specify an explicit set of PKGS on the `make` command line,
 that will NOT work.
 * If you have user-installed Planet packages, there may be errors.
 
 If you encounter other errors, please let me know, either by replying
 or by finding me on IRC.
 
 If you run `make` and then you want to edit and commit to a package
 such as rackunit, run the following commands inside your git
 checkout:
 
  $ mkdir extra-pkgs
  $ cd extra-pkgs
  $ raco pkg update --clone rackunit
 
 That will create a git checkout in the extra-pkgs/rackunit directory.
 The `extra-pkgs` directory is set up to be ignored by the top-level
 git checkout, so it's a good place to put package checkouts.
 
 This will almost certainly break our continuous integration systems
 for a little while, but I'm working to get that fixed.
 
 Everyone should feel free to commit to the split repositories or to
 the main repository at this point -- we do not plan any git surgery
 that would be harmed by that.
 
 I'd especially like to thank Jay and Matthew for working hard to help
 with this, including fixing things I've broken. :)
 
 Sam
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] The repository is now split

2014-12-04 Thread Matthias Felleisen

For those of you who have my level of experience with such things, 
here is what Sam's phrase I *highly* recommend creating a new clone 
of the repository, and re-running `make`. means, for your value of 
the name 'plt2': 

$ git clone git:plt plt2
$ cd plt2/
$ git submodule init 
$ git submodule update
$ make 






 
 On Dec 4, 2014, at 10:51 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:
 
 I've just push a change to the plt repository that removes almost all
 the packages.
 
 The split repositories are all in the `racket` organization on GitHub.
 You can see them here: https://github.com/racket/
 
 I *highly* recommend creating a new clone of the repository, and
 re-running `make`. This will install all of the packages in
 main-distribution and main-distribution-test from the package
 catalog.
 
 There are a number of problems with the current Makefile setup, which
 we're working on fixing, but which you'll need to know about for a
 little while (hopefully not more than today).
 
 * If you specify an explicit set of PKGS on the `make` command line,
 that will NOT work.
 * If you have user-installed Planet packages, there may be errors.
 
 If you encounter other errors, please let me know, either by replying
 or by finding me on IRC.
 
 If you run `make` and then you want to edit and commit to a package
 such as rackunit, run the following commands inside your git
 checkout:
 
 $ mkdir extra-pkgs
 $ cd extra-pkgs
 $ raco pkg update --clone rackunit
 
 That will create a git checkout in the extra-pkgs/rackunit directory.
 The `extra-pkgs` directory is set up to be ignored by the top-level
 git checkout, so it's a good place to put package checkouts.
 
 This will almost certainly break our continuous integration systems
 for a little while, but I'm working to get that fixed.
 
 Everyone should feel free to commit to the split repositories or to
 the main repository at this point -- we do not plan any git surgery
 that would be harmed by that.
 
 I'd especially like to thank Jay and Matthew for working hard to help
 with this, including fixing things I've broken. :)
 
 Sam
 _
 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


[racket-dev] Fwd: [ACM-BULLETIN] Today's Topic: ACM Names 2014 Distinguished Members

2014-12-04 Thread Matthias Felleisen

Even the ACM considers our very own Matthew Flatt as a distinguished scientist. 
-- Matthias




Begin forwarded message:

 From: ACM Bulletin acmbulle...@acm.org
 Subject: [ACM-BULLETIN] Today's Topic: ACM Names 2014 Distinguished Members
 Date: December 4, 2014 11:04:44 AM EST
 To: acm-bulle...@listserv.acm.org
 Reply-To: acmbulle...@acm.org
 
 
 Today's Topic: ACM Names 2014 Distinguished Members
 
 Thursday, December 4, 2014
 ACM has named 49 Distinguished Members for their individual contributions and 
 their singular impacts on the vital field of computing. Their achievements 
 have had a significant influence on the social, economic and cultural areas 
 of daily lives all over the world. The 2014 Distinguished Members are from 
 universities in Austria, Germany, Switzerland, Netherlands, Sweden, Japan, 
 India, the United Kingdom and North America, and from leading international 
 corporations and research institutions.
 
 ACM President Alexander Wolf hailed these ACM members as drivers of the 
 advances and inventions that are propelling the information revolution in new 
 directions. Their creativity and commitment to their craft ensures that we 
 will benefit as a society in the digital age. He added that these innovators 
 demonstrate the advantages of ACM membership, which empowers and inspires a 
 bold vision for advancing computing and the computing community.
 
 The ACM Distinguished Member program can recognize the top 10 percent of ACM 
 worldwide membership based on professional experience as well as significant 
 achievements in the computing field.
 
 news release.
 
 
  
 Connect with us:
  

 
  
  
 To unsubscribe: Enter your email address
 
 matth...@ccs.neu.edu
 Association for Computing Machinery
 Advancing Computing as a Science  Profession
 
 © 2014 ACM, Inc.
 All rights reserved
 
 To unsubscribe from the ACM-BULLETIN list:
 
 write to: acm-bulletin-signoff-requ...@listserv.acm.org or click the 
 following link: 
 http://listserv.acm.org/SCRIPTS/WA-ACMLPX.CGI?SUBED1=ACM-BULLETINA=1 All 
 rights reserved © 2014 ACM, Inc.
 

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


Re: [racket-dev] new package system collections and conflicts

2014-12-03 Thread Matthias Felleisen

Thanks for being with with us for so long. 

I think you misunderstood the word 'charity' here and perhaps Jay could have 
used a different, a more appropriate word than 'charity', which I now realize 
can have a negative connotation. 

Otherwise, I think that the package system design is about reducing power for 
core developers so that we put ourselves into the position of contributors. Our 
hope is that this step will eventually improve the overall social/eco system 
surrounding Racket. Please stay with us, and please do give constructive 
feedback. The most constructive feedback is of the form I would like to solve 
the problem ... describe problem ... 

We have been thinking for a long, long time about breaking up the core so that 
more people can become core and we realize that this is a nontrivial step. We 
need your helps and everyone's help. 


Thanks! -- Matthias







On Dec 3, 2014, at 11:32 AM, Neil Van Dyke n...@neilvandyke.org wrote:

 I don't think I need charity.
 
 I thought the vision for the new package system had already been explained 
 adequately.  I would be very interested to learn how the model is well-suited 
 to third-party developers like me.
 
 But -- I mean this constructively -- I'd be happy if someone simply came out 
 and said this model is great for core developers, we still have to figure 
 out everyone else, and maybe the model isn't great for everyone else.  The 
 reason is that I've looked at the new package system seriously 5-6 times 
 since it was announced, and I keep being told that the model is intended for 
 non-core people like me, and that someone else knows my needs better than me. 
  Open source reuse was an especial area of interest to me, the package system 
 is very important, and I've given the benefit of the doubt 5-6 times now.  
 (This has actually stalled most of my public Racket work, one way or another, 
 for about 2 years.)
 
 I'm not harshing on Racket; just on how the new package system was sprung on 
 non-core people, and the narrative.  It doesn't look typical of Racket.  
 Racket is usually in the position that it could say we have a better idea 
 (on, e.g., module system sophistication, various syntax extension mechanisms 
 and mixed languages support, various aspects of DrRacket, the related 
 pedagogic projects, etc.), and usually that doesn't have to be said, because 
 the superiority of Racket is immediately apparent.  That's why I've been a 
 Racketeer for 13 years and counting.
 
 Neil V.
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev


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


[racket-dev] meeting notes, November 2014

2014-11-20 Thread Matthias Felleisen

Every few months, the principals of the Racket world meet for a day to discuss 
the state and near (and, occasionally, distant) future of the Racket world. We 
met this past weekend in Chicago, and here is the list of major points we 
discussed. 

1. We will split the central Racket repo so that every directory in the pkgs/ 
directory -- i.e. every major package -- will each get its own repo. [The 
*-lib, *-doc, *-test packages will be kept together.] The process will start 
with packages that no/few other packages depend on so that we can test the idea 
on an incremental basis. 

Once the repository is split, we plan to migrate the existing bug database to 
GitHub, splitting it along the same lines as the repository.

As we split the repos, we will improve the infrastructure so that not only core 
packages but all ring-0 packages are tested on drdr on a per commit basis; see 
http://drdr.racket-lang.org . Similarly, we are hoping to improve our search 
service so that searching for functionality includes all packages not just the 
ones included with a specific bundle. 

The primary intention is to put core developers and package developers on 
roughly the same footing. A secondary intention is to facilitate the creation 
of targeted download bundles, e.g., for specific sites with particular security 
needs or for books with special language and library needs. 

2. The download site will make use of this last point after the split. It will 
then offer three different kinds of packages:

-- one minimal bundle, for just Racket 
-- one graphical bundle, including the Racket IDE
-- several 'book' bundles, covering for example DeinProgram, EOPL, HtDP, PLAI, 
PP, Realm, Redex

This step simultaneously thins out our all-in-one bundle and promotes 
Racket-related works. 

3. We will improve the package site in two ways. First we will upgrade the 
cloud service and determine how much it will improve the reliability of the 
server (whose memory and cpu needs spike at certain points and thus reach the 
limits of the low level of services we rent). Second, we will collaborate with 
Tony Garnock-Jones to improve the UI experience based on the latter's 
prototype. 

4. We discussed the issue of backwards compatibility, and we will continue to 
think how to balance it with other needs of our user base. 

5. Finally, we want to explore the possibility of donating directly to the 
Racket project. Thus far, some of us have paid for PLT Design, Inc, web sites, 
and web services out of pocket. To have funds for additional services or 
upgrading the services for improved experiences, additional funding would be 
welcome. To support donors who may wish to receive a tax deduction, we need to 
investigate forwarding organizations, such as the Software Conservancy, that 
comply with the US Tax code (so-called 501 c(3) organizations).

-- Jay, Matthew, Robby, Sam, and Matthias


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


[racket-dev] parse errors in types, poly-dots cause me headaches

2014-11-18 Thread Matthias Felleisen

It's quite possible that this is Eli's bug again, but boy this causes 
headaches: 

 Type Checker: parse error in type;
  type variable must be used with ...
   variable: Y in: Y

And it points precisely to where Y is followed by ... 


#lang typed/racket 

(module+ test (require rackunit))

;; [Listof X] [X [Listof X] Y ... - Y ...] Y ... - Y ...
(: foldl* (All (X Y ...) (-* [Listof X] [-* X Y ... (Values Y ...)] Y ... 
(Values Y ...
(define (foldl* l f e1 . es)
  (define e+ (cons e1 es))
  (cond
[(empty? l) (apply values e+)]
[else (call-with-values 
   (lambda () (apply f (first l) e+))
   (lambda e*
 (unless (cons? e*) ;; should I check that (= (length e*) (length 
e+))
   (error 'fold* f produced too few values: ~e e*))
 (apply foldl* (rest l) f e*)))]))

(module+ test
  (define distances '(50 40 70 30 30))
  
  (check-equal? 
   (call-with-values 
(lambda ()
  (foldl* distances
  (lambda (fst distance distance*)
(values (+ fst distance) (cons (+ fst distance) distance*)))
  0
  '()))
(lambda (_ x)
  (reverse x)))
   '(50 90 160 190 220)))


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


Re: [racket-dev] parse errors in types, poly-dots cause me headaches

2014-11-18 Thread Matthias Felleisen

On Nov 18, 2014, at 11:34 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 On Tue, Nov 18, 2014 at 10:45 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 It's quite possible that this is Eli's bug again, but boy this causes 
 headaches:
 
 Type Checker: parse error in type;
 type variable must be used with ...
  variable: Y in: Y
 
 And it points precisely to where Y is followed by ...
 
 The problem here is that you're using -* without using the syntax of
 -*.  Fortunately, this program doesn't need -* at all.
 
 Unfortunately, I don't know how to make this function type check yet,
 but I'll keep playing with it.


Are you blaming the victim here? Please run what I send out and experience how 
the type checker barfs on you. This is a bug report. 
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] parse errors in types, poly-dots cause me headaches

2014-11-18 Thread Matthias Felleisen

Attached is the screen shot of the error report. 





On Nov 18, 2014, at 11:54 AM, Matthias Felleisen matth...@ccs.neu.edu wrote:

 
 On Nov 18, 2014, at 11:34 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
 On Tue, Nov 18, 2014 at 10:45 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 It's quite possible that this is Eli's bug again, but boy this causes 
 headaches:
 
 Type Checker: parse error in type;
 type variable must be used with ...
 variable: Y in: Y
 
 And it points precisely to where Y is followed by ...
 
 The problem here is that you're using -* without using the syntax of
 -*.  Fortunately, this program doesn't need -* at all.
 
 Unfortunately, I don't know how to make this function type check yet,
 but I'll keep playing with it.
 
 
 Are you blaming the victim here? Please run what I send out and experience 
 how the type checker barfs on you. This is a bug report. 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev

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


Re: [racket-dev] parse errors in types, poly-dots cause me headaches

2014-11-18 Thread Matthias Felleisen

What I sent is the exact program that produced the attached error in today's 
drracket [updated around 10am]. 




On Nov 18, 2014, at 11:58 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 No, I ran it, it barfed, and then I figured out what went wrong. Then
 I sent you an email with a fix. Unfortunately, that fix isn't enough
 to make the program type check. Partly, there's an internal error, but
 that's a missing case that will take work to support properly.
 
 We can do better with the error message as well, by special casing ...
 in -*, I think.
 
 I don't, however, get the unbound identifier error that is in your
 screenshot. I just got the error message from your original post. Can
 you send the exact program that produced the error in the screenshot?
 
 Sam
 
 On Tue, Nov 18, 2014 at 11:54 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 On Nov 18, 2014, at 11:34 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
 On Tue, Nov 18, 2014 at 10:45 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 It's quite possible that this is Eli's bug again, but boy this causes 
 headaches:
 
 Type Checker: parse error in type;
 type variable must be used with ...
 variable: Y in: Y
 
 And it points precisely to where Y is followed by ...
 
 The problem here is that you're using -* without using the syntax of
 -*.  Fortunately, this program doesn't need -* at all.
 
 Unfortunately, I don't know how to make this function type check yet,
 but I'll keep playing with it.
 
 
 Are you blaming the victim here? Please run what I send out and experience 
 how the type checker barfs on you. This is a bug report.


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


Re: [racket-dev] parse errors in types, poly-dots cause me headaches

2014-11-18 Thread Matthias Felleisen

I am sending you the status line from 

   DrRacket, version 6.1.1.5--2014-11-18(c4684c12/d) [3m].




On Nov 18, 2014, at 12:10 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 With that program, I get this error message:
 
unsaved editor:7:48: Type Checker: parse error in type; type
 variable must be used with ... variable: Y in: Y
 
 Which you also got. What changed it from the parse error to the
 unbound identifier error?
 
 Sam
 
 On Tue, Nov 18, 2014 at 12:05 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 What I sent is the exact program that produced the attached error in today's 
 drracket [updated around 10am].
 
 
 
 
 On Nov 18, 2014, at 11:58 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
 No, I ran it, it barfed, and then I figured out what went wrong. Then
 I sent you an email with a fix. Unfortunately, that fix isn't enough
 to make the program type check. Partly, there's an internal error, but
 that's a missing case that will take work to support properly.
 
 We can do better with the error message as well, by special casing ...
 in -*, I think.
 
 I don't, however, get the unbound identifier error that is in your
 screenshot. I just got the error message from your original post. Can
 you send the exact program that produced the error in the screenshot?
 
 Sam
 
 On Tue, Nov 18, 2014 at 11:54 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 On Nov 18, 2014, at 11:34 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
 On Tue, Nov 18, 2014 at 10:45 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 It's quite possible that this is Eli's bug again, but boy this causes 
 headaches:
 
 Type Checker: parse error in type;
 type variable must be used with ...
 variable: Y in: Y
 
 And it points precisely to where Y is followed by ...
 
 The problem here is that you're using -* without using the syntax of
 -*.  Fortunately, this program doesn't need -* at all.
 
 Unfortunately, I don't know how to make this function type check yet,
 but I'll keep playing with it.
 
 
 Are you blaming the victim here? Please run what I send out and experience 
 how the type checker barfs on you. This is a bug report.
 


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


Re: [racket-dev] using module system for alternate namespaces

2014-11-03 Thread Matthias Felleisen

On Oct 27, 2014, at 7:00 PM, Dan Liebgold wrote:

 I have a namespace behind a particular API. I'd love to hook into the module 
 system to control compilation, visibility, etc. of all the definitions and 
 references.
 
 Here's an example. 'a' is available in the top level module even though it 
 was defined by module 'm1' and not provided by any explicit mechanism. (Also, 
 order dependencies seem imminent.)

Since you didn't reply to Jay's response, let me resume the thread. You had 
written not quite this: 

 #lang racket

(module base racket
  (define my-table (make-hasheq))
  
  (define-syntax (my-define stx)
(syntax-case stx ()
  [(_ my-id expr) (identifier? #'my-id)
  #'(hash-set! my-table 'my-id expr)]))
  
  (define-syntax (my-eval stx)
(syntax-case stx ()
  [(_ my-id)
   #'(hash-ref my-table 'my-id #f)])) ;; --- my first change 
  
  (provide my-define my-eval))

(module m1 racket
  (require (submod .. base))
  (my-define a (+ 1 2)))

(require 'base 'm1)

(my-eval a) ;; --- my second change 


;; --- 

When you write 'a' is available in the top-level module, even though you didn't 
import it, I don't see it. You imported all of base into the top level and m1. 
These imports include accessors to 'my-table' and 'm1' happened to store a key 
in this table. Why should you not be able to retrieve the value of 'a'? 

-- Matthias




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


Re: [racket-dev] using module system for alternate namespaces

2014-11-03 Thread Matthias Felleisen

On Nov 3, 2014, at 10:10 PM, Dan Liebgold wrote:

 Jay's idea was to use define to create a module binding from a to a 
 generated or decorated name, provide a (or not), and put the generated name 
 in the hash table. I'm pursuing that approach currently.

Yeap, that would be the next idea (now that I figured what you meant). 




 PS: The motivation for this is to finally get our custom language DC to be 
 implemented as a proper Racket module language.  It's turning out to be a bit 
 of a nightmare since we rely so heavily on the side effects of load and we 
 have 4 different namespaces active at once.  This example is just one small 
 piece.

What this really shows is how bad the choice of load was. I would bet a beer or 
something that you'll find #lang/require and friend will eventually make your 
life easier and happier. 

-- Matthias

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


Re: [racket-dev] Release Announcement for v6.1.1, Second Draft

2014-10-30 Thread Matthias Felleisen

On Oct 30, 2014, at 3:45 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 
 How about this one? (Starting from Matthias's offering and editing the
 apology from Sam's a bit.)
 
 Typed Racket closes a safety hole in the typing for the
  exception system. The revised type system restricts raise so
  that only instances of the exn structure type and flat data
  are communicated to handlers. As a side-effect, previously
  well-typed programs may fail to typecheck.
 
 How about:
 
 Typed Racket now checks uses of the exception system more strictly,
 eliminating safety bugs. The revised type system restricts raise so
  that only instances of the exn structure type and flat data
  are communicated to handlers, and enforces that exception handlers
 deal with all possible arguments. As a side-effect, previously
  well-typed programs may fail to typecheck.


Can we please, pretty please, pretty please, pretty please drop these 
nows? 
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Release Announcement for v6.1.1, Second Draft

2014-10-29 Thread Matthias Felleisen

1. Can we please, pretty please, drop these nows from every single sentence? 

2. I think this is close to what we may wish to say. Here is a small edit: 

* Typed Racket closes a safety hole due to the types for the 
  exception system. The revised type system restricts raise so
  that only instances of the exn structure type and flat data 
  are communicated to handlers. 

3. I think it is perfectly acceptable to imply that a 
restriction of an existing type system breaks existing 
programs. If you don't, I'd say 

 Existing programs may suffer from new type errors 
 due to this restriction. 







On Oct 29, 2014, at 6:32 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 Here's another idea:
 
 * To ensure safety, Typed Racket now prohibits raising any values
 other than exns and simple flat data. Some existing programs may now
 have type errors because of this.
 
 Sam
 
 On Wed, Oct 29, 2014 at 6:12 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 The reason I don't like the second sentence you wrote is that it's
 true of every type system everywhere. And also, the more significant
 change for users will almost certainly be the first one (it's required
 changes to several packages already) -- almost no one raises anything
 that isn't an exn, and so I haven't seen any code actually affected by
 the second change.
 
 Sam
 
 On Wed, Oct 29, 2014 at 6:00 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 I prefer the second sentence I sent to either of those. Fundamentally
 I think it is reasonable for the sentence to be slightly apologetic.
 There was a problem, we fixed it, but the fix may require some pain of
 our users. There's nothing wrong with that; it's just a fact of life.
 No shame in hiding it.
 
 Robby
 
 On Wed, Oct 29, 2014 at 4:55 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 On Wed, Oct 29, 2014 at 5:47 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Yes, that's what I mean. I don't think that the sentence This may
 break existing programs that rely on unsafe behavior. is accurate.
 How about This may break existing programs. or Closing this hole
 requires us to disallow some programs that do not signal runtime
 errors. or something like that?
 
 How about This may result in type errors in existing programs that
 rely on the original behavior; specifically, programs that `raise`
 higher-order values.
 
 Sam
 
 
 Robby
 
 On Wed, Oct 29, 2014 at 4:35 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 There were two holes.
 
 1. We allowed exception handlers to assume that they received values
 of type `exn`, even when that wasn't right.
 2. We allowed typed programs to throw arbitrary values, which means
 that you could throw a typed function to an untyped handler, which
 could then misuse it.
 
 Both of these changes could lead to type errors in programs that won't
 fail at runtime, but that's true of just about everything in Typed
 Racket, so I don't really understand what you're asking. Here are
 examples of programs that will now type-error for each change.
 
 1. (with-handlers ([void exn-message]) #f)
 2. (raise (lambda ([x : Integer]) x))
 
 I think the second problem is more what you mean, in that the first
 program is wrong in some sense, even though it doesn't go wrong, but
 the second example is a perfectly fine Racket program (if perhaps poor
 style), but not one that can be allowed in the presence of untyped
 code.
 
 Does that help explain things?
 Sam
 
 On Wed, Oct 29, 2014 at 5:17 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Sam: can you elaborate on precisely what the hole was? In particular,
 if there are any safe programs that the type system now rejects, I'd
 be in favor of a slightly different wording.
 
 Robby
 
 On Wed, Oct 29, 2014 at 2:35 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 On Wed, Oct 29, 2014 at 3:30 PM, Ryan Culpepper ry...@ccs.neu.edu 
 wrote:
 
 * Exception handling changed to be safe. This may break existing
  programs that rely on unsafe behavior.
 
 * Casts and predicates are supported in typed regions.
 
 I think these two bullets (esp the first one) need to make clear that
 they're about Typed Racket.
 
 How about:
 
 * Typed Racket's rules for exception handlers are now more
 restrictive, as required for safety. This may cause type errors for
 existing programs that rely on unsafe behavior.
 * Typed Racket now supports casts and predicates in typed regions.
 
 Sam
 _
  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] Release Announcement for v6.1.1, Second Draft

2014-10-29 Thread Matthias Felleisen

properly - corresponding fashion? 

Otherwise fine


On Oct 29, 2014, at 6:54 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 On Wed, Oct 29, 2014 at 6:42 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 1. Can we please, pretty please, drop these nows from every single 
 sentence?
 
 2. I think this is close to what we may wish to say. Here is a small edit:
 
 * Typed Racket closes a safety hole due to the types for the
  exception system. The revised type system restricts raise so
  that only instances of the exn structure type and flat data
  are communicated to handlers.
 
 I like this, but we need to at least mention the other change. So how about:
 
 * Typed Racket closes two safety holes in the types for the
  exception system. The revised type system restricts raise so
  that only instances of the exn structure type and flat data
  are communicated to handlers, and checks exception handlers properly.
 
 Sam
 
 
 3. I think it is perfectly acceptable to imply that a
 restriction of an existing type system breaks existing
 programs. If you don't, I'd say
 
 Existing programs may suffer from new type errors
 due to this restriction.
 
 
 
 
 
 
 
 On Oct 29, 2014, at 6:32 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
 Here's another idea:
 
 * To ensure safety, Typed Racket now prohibits raising any values
 other than exns and simple flat data. Some existing programs may now
 have type errors because of this.
 
 Sam
 
 On Wed, Oct 29, 2014 at 6:12 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 The reason I don't like the second sentence you wrote is that it's
 true of every type system everywhere. And also, the more significant
 change for users will almost certainly be the first one (it's required
 changes to several packages already) -- almost no one raises anything
 that isn't an exn, and so I haven't seen any code actually affected by
 the second change.
 
 Sam
 
 On Wed, Oct 29, 2014 at 6:00 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 I prefer the second sentence I sent to either of those. Fundamentally
 I think it is reasonable for the sentence to be slightly apologetic.
 There was a problem, we fixed it, but the fix may require some pain of
 our users. There's nothing wrong with that; it's just a fact of life.
 No shame in hiding it.
 
 Robby
 
 On Wed, Oct 29, 2014 at 4:55 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 On Wed, Oct 29, 2014 at 5:47 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Yes, that's what I mean. I don't think that the sentence This may
 break existing programs that rely on unsafe behavior. is accurate.
 How about This may break existing programs. or Closing this hole
 requires us to disallow some programs that do not signal runtime
 errors. or something like that?
 
 How about This may result in type errors in existing programs that
 rely on the original behavior; specifically, programs that `raise`
 higher-order values.
 
 Sam
 
 
 Robby
 
 On Wed, Oct 29, 2014 at 4:35 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 There were two holes.
 
 1. We allowed exception handlers to assume that they received values
 of type `exn`, even when that wasn't right.
 2. We allowed typed programs to throw arbitrary values, which means
 that you could throw a typed function to an untyped handler, which
 could then misuse it.
 
 Both of these changes could lead to type errors in programs that won't
 fail at runtime, but that's true of just about everything in Typed
 Racket, so I don't really understand what you're asking. Here are
 examples of programs that will now type-error for each change.
 
 1. (with-handlers ([void exn-message]) #f)
 2. (raise (lambda ([x : Integer]) x))
 
 I think the second problem is more what you mean, in that the first
 program is wrong in some sense, even though it doesn't go wrong, but
 the second example is a perfectly fine Racket program (if perhaps poor
 style), but not one that can be allowed in the presence of untyped
 code.
 
 Does that help explain things?
 Sam
 
 On Wed, Oct 29, 2014 at 5:17 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Sam: can you elaborate on precisely what the hole was? In particular,
 if there are any safe programs that the type system now rejects, I'd
 be in favor of a slightly different wording.
 
 Robby
 
 On Wed, Oct 29, 2014 at 2:35 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 On Wed, Oct 29, 2014 at 3:30 PM, Ryan Culpepper ry...@ccs.neu.edu 
 wrote:
 
 * Exception handling changed to be safe. This may break existing
 programs that rely on unsafe behavior.
 
 * Casts and predicates are supported in typed regions.
 
 I think these two bullets (esp the first one) need to make clear that
 they're about Typed Racket.
 
 How about:
 
 * Typed Racket's rules for exception handlers are now more
 restrictive, as required for safety. This may cause type errors for
 existing programs that rely on unsafe behavior.
 * Typed Racket now supports casts

[racket-dev] unstable contract lib

2014-10-28 Thread Matthias Felleisen

Just re-built HEAD on my desktop and got a load of missing dependency 
declarations -- unstable-contract-lib. What happened? -- Matthias



 raco setup: --- checking package dependencies ---
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: future-visualizer-typed
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/future-visualizer-pkgs/future-visualizer-typed/future-visualizer/compiled/typed_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/compiled/flomap_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/deep-flomap-parameters_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/deep-flomap-render_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/deep-flomap-struct_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/deep-flomap_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-blur_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-composite_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-effects_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-gradient_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-pointwise_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-resize_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-stats_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: found undeclared dependency:
 raco setup:   mode: run
 raco setup:   for package: images-lib
 raco setup:   on package: unstable-contract-lib
 raco setup:   dependent source: 
 /Users/matthias/plt/pkgs/images-pkgs/images-lib/images/private/compiled/flomap-struct_rkt.zo
 raco setup:   used module: (lib unstable/contract.rkt)
 raco setup: 

Re: [racket-dev] Pre-Release Checklist for v6.1.1, Second Call

2014-10-23 Thread Matthias Felleisen

DrRacket on Mac OS X, 64-bit, Installer Package won't start on double-click. 

At the command line, I get this error message: 

[:~] matthias% /Applications/Racket/DrRacket.app/Contents/MacOS/DrRacket 
/Applications/Racket/share/pkgs/drracket/drracket/private/compiled/rectangle-intersect_rkt.zo::1:
 read (compiled): wrong version for compiled code
  compiled version: 6.0.900.900
  expected version: 6.1.0.900
  context...:
   standard-module-name-resolver
   
/Applications/Racket/share/pkgs/drracket/drracket/private/module-browser.rkt: 
[traversing imports]
   /Applications/Racket/share/pkgs/drracket/drracket/private/link.rkt: 
[traversing imports]
   /Applications/Racket/share/pkgs/drracket/drracket/tool-lib.rkt: [traversing 
imports]
   
/Applications/Racket/share/pkgs/drracket/drracket/private/drracket-normal.rkt: 
[running body]
   /Applications/Racket/share/pkgs/drracket/drracket/drracket.rkt: [running 
body]





On Oct 23, 2014, at 12:48 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:

 Checklist items for the v6.1.1 release
  (using the v6.1.0.900 release candidate build)
 
 Search for your name to find relevant items, reply when you finish an
 item (please indicate which item/s is/are done).  Also, if you have any
 commits that should have been picked, make sure that the changes are in.
 
 Important: new builds are created without announcement, usually whenever
 I pick a few commits.  If you need to commit changes, please make sure
 you tell me to pick it into the release branch.
 
 -- Release candidates are at
 --   http://pre-release.racket-lang.org
 
 Please use these installers (or source bundles) -- don't test from
 your own git clone (don't test the `master' branch by mistake!).  To
 get the tests, you can do this:
 
  cd ...racket-root...
  ./bin/raco pkg install -i main-distribution-test
 
 --
 
 * Matthias Felleisen matth...@ccs.neu.edu
  - Teachpacks Tests: check that new teachpacks are addable
  - Teachpack Docs: check teachpack docs in the bundles
  - Try teaching-languages testing framework (check-expect)
  Updates:
  - Teachpack Updates: update HISTORY
  (updates should show v6.1.1 as the most current version; email me
  to pick the changes when they're done, or tell me if there are no such
  changes.)
 
 * Eli Barzilay e...@barzilay.org
  - Swindle Tests
  - XREPL Tests
  - Verify PL language
  - Racket Tree: compare new distribution tree to previous one
  - Run the unix installer tests
  - Run zsh completions tests
(. .../racket-completion.zsh; _racket --self-test)
 
 * Stephen Bloch sbl...@adelphi.edu
  - Picturing Programs Tests
 
 * Jon Rafkind rafk...@cs.utah.edu
  Release tests for (one of the) linux releases:
  - Test that the `racket' and `racket-textual' source releases
compile fine (note that they're still called `plt' and `mz' at
this stage).
  - Test that the binary installers for both work, try each one in
both normal and unix-style installation modes. (just ubuntu)
  [Note: get the release candidates from the URL in this email. Use
   the 'static table' link to see a list of all tar files available]
 
 * David Van Horn dvanh...@ccs.neu.edu
  - EoPL Tests
 
 * Neil Toronto neil.toro...@gmail.com
  - Plot Tests
  - Images Tests
  - Inspect icons
  - Math tests


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


Re: [racket-dev] Pre-Release Checklist for v6.1.1, Second Call

2014-10-23 Thread Matthias Felleisen

Yes, I did and expected this to be the problem. Can't we add a line to the Mac 
package installer that removes left-over stuff? 

I deleted the old installation and re-installed and drracket starts up fine. 

-- Matthias





On Oct 23, 2014, at 2:26 PM, Matthew Flatt mfl...@cs.utah.edu wrote:

 Is it possible that you installed on top of an existing v6.0.900.900
 installation (for the previous release's candidate)?
 
 The file
 
  share/pkgs/drracket/drracket/private/compiled/rectangle-intersect_rkt.zo
 
 existed in v6.0.900.900, but it does not exist in v6.1.0.900, because
 the library moved to a different package, drracket-tool-lib. If you
 installed v6.1.0.900 on top of v6.0.900.900, then the file would not
 get replaced, and the module search would potentially find the old file
 instead of the replacement that is in a different location.
 
 At Thu, 23 Oct 2014 13:24:08 -0400, Matthias Felleisen wrote:
 
 DrRacket on Mac OS X, 64-bit, Installer Package won't start on double-click. 
 
 At the command line, I get this error message: 
 
 [:~] matthias% /Applications/Racket/DrRacket.app/Contents/MacOS/DrRacket 
 /Applications/Racket/share/pkgs/drracket/drracket/private/compiled/rectangle-int
 ersect_rkt.zo::1: read (compiled): wrong version for compiled code
  compiled version: 6.0.900.900
  expected version: 6.1.0.900
  context...:
   standard-module-name-resolver
 
 /Applications/Racket/share/pkgs/drracket/drracket/private/module-browser.rkt:
  
 [traversing imports]
   /Applications/Racket/share/pkgs/drracket/drracket/private/link.rkt: 
 [traversing imports]
   /Applications/Racket/share/pkgs/drracket/drracket/tool-lib.rkt: 
 [traversing 
 imports]
 
 /Applications/Racket/share/pkgs/drracket/drracket/private/drracket-normal.rkt:
  
 [running body]
   /Applications/Racket/share/pkgs/drracket/drracket/drracket.rkt: [running 
 body]
 
 
 
 
 
 On Oct 23, 2014, at 12:48 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:
 
 Checklist items for the v6.1.1 release
 (using the v6.1.0.900 release candidate build)
 
 Search for your name to find relevant items, reply when you finish an
 item (please indicate which item/s is/are done).  Also, if you have any
 commits that should have been picked, make sure that the changes are in.
 
 Important: new builds are created without announcement, usually whenever
 I pick a few commits.  If you need to commit changes, please make sure
 you tell me to pick it into the release branch.
 
 -- Release candidates are at
 --   http://pre-release.racket-lang.org
 
 Please use these installers (or source bundles) -- don't test from
 your own git clone (don't test the `master' branch by mistake!).  To
 get the tests, you can do this:
 
 cd ...racket-root...
 ./bin/raco pkg install -i main-distribution-test
 
 --
 
 * Matthias Felleisen matth...@ccs.neu.edu
 - Teachpacks Tests: check that new teachpacks are addable
 - Teachpack Docs: check teachpack docs in the bundles
 - Try teaching-languages testing framework (check-expect)
 Updates:
 - Teachpack Updates: update HISTORY
 (updates should show v6.1.1 as the most current version; email me
 to pick the changes when they're done, or tell me if there are no such
 changes.)
 
 * Eli Barzilay e...@barzilay.org
 - Swindle Tests
 - XREPL Tests
 - Verify PL language
 - Racket Tree: compare new distribution tree to previous one
 - Run the unix installer tests
 - Run zsh completions tests
   (. .../racket-completion.zsh; _racket --self-test)
 
 * Stephen Bloch sbl...@adelphi.edu
 - Picturing Programs Tests
 
 * Jon Rafkind rafk...@cs.utah.edu
 Release tests for (one of the) linux releases:
 - Test that the `racket' and `racket-textual' source releases
   compile fine (note that they're still called `plt' and `mz' at
   this stage).
 - Test that the binary installers for both work, try each one in
   both normal and unix-style installation modes. (just ubuntu)
 [Note: get the release candidates from the URL in this email. Use
  the 'static table' link to see a list of all tar files available]
 
 * David Van Horn dvanh...@ccs.neu.edu
 - EoPL Tests
 
 * Neil Toronto neil.toro...@gmail.com
 - Plot Tests
 - Images Tests
 - Inspect icons
 - Math tests
 
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] Pre-Release Checklist for v6.1.1, Second Call

2014-10-23 Thread Matthias Felleisen

(I know, and I hadn't used it in forever.)


On Oct 23, 2014, at 9:04 PM, Matthew Flatt wrote:

 Ad, I hadn't guessed that you use the Installer Package. It isn't one
 of our normal distribution mode (i.e., there's no link to it on the
 eventual download page), so far, and so I forgot about it, but it is
 certaily prominent on the pre-release page.
 
 I'm not yet sure of the right repair, but I'll work on it.
 
 At Thu, 23 Oct 2014 15:11:03 -0400, Matthias Felleisen wrote:
 
 Yes, I did and expected this to be the problem. Can't we add a line to the 
 Mac 
 package installer that removes left-over stuff? 
 
 I deleted the old installation and re-installed and drracket starts up fine. 
 
 -- Matthias
 
 
 
 
 
 On Oct 23, 2014, at 2:26 PM, Matthew Flatt mfl...@cs.utah.edu wrote:
 
 Is it possible that you installed on top of an existing v6.0.900.900
 installation (for the previous release's candidate)?
 
 The file
 
 share/pkgs/drracket/drracket/private/compiled/rectangle-intersect_rkt.zo
 
 existed in v6.0.900.900, but it does not exist in v6.1.0.900, because
 the library moved to a different package, drracket-tool-lib. If you
 installed v6.1.0.900 on top of v6.0.900.900, then the file would not
 get replaced, and the module search would potentially find the old file
 instead of the replacement that is in a different location.
 
 At Thu, 23 Oct 2014 13:24:08 -0400, Matthias Felleisen wrote:
 
 DrRacket on Mac OS X, 64-bit, Installer Package won't start on 
 double-click. 
 
 At the command line, I get this error message: 
 
 [:~] matthias% /Applications/Racket/DrRacket.app/Contents/MacOS/DrRacket 
 
 /Applications/Racket/share/pkgs/drracket/drracket/private/compiled/rectangle-int
 ersect_rkt.zo::1: read (compiled): wrong version for compiled code
 compiled version: 6.0.900.900
 expected version: 6.1.0.900
 context...:
  standard-module-name-resolver
 
 
 /Applications/Racket/share/pkgs/drracket/drracket/private/module-browser.rkt:
  
 [traversing imports]
  /Applications/Racket/share/pkgs/drracket/drracket/private/link.rkt: 
 [traversing imports]
  /Applications/Racket/share/pkgs/drracket/drracket/tool-lib.rkt: 
 [traversing 
 imports]
 
 
 /Applications/Racket/share/pkgs/drracket/drracket/private/drracket-normal.rkt:
  
 [running body]
  /Applications/Racket/share/pkgs/drracket/drracket/drracket.rkt: [running 
 body]
 
 
 
 
 
 On Oct 23, 2014, at 12:48 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:
 
 Checklist items for the v6.1.1 release
 (using the v6.1.0.900 release candidate build)
 
 Search for your name to find relevant items, reply when you finish an
 item (please indicate which item/s is/are done).  Also, if you have any
 commits that should have been picked, make sure that the changes are in.
 
 Important: new builds are created without announcement, usually whenever
 I pick a few commits.  If you need to commit changes, please make sure
 you tell me to pick it into the release branch.
 
 -- Release candidates are at
 --   http://pre-release.racket-lang.org
 
 Please use these installers (or source bundles) -- don't test from
 your own git clone (don't test the `master' branch by mistake!).  To
 get the tests, you can do this:
 
 cd ...racket-root...
 ./bin/raco pkg install -i main-distribution-test
 
 --
 
 * Matthias Felleisen matth...@ccs.neu.edu
 - Teachpacks Tests: check that new teachpacks are addable
 - Teachpack Docs: check teachpack docs in the bundles
 - Try teaching-languages testing framework (check-expect)
 Updates:
 - Teachpack Updates: update HISTORY
 (updates should show v6.1.1 as the most current version; email me
 to pick the changes when they're done, or tell me if there are no such
 changes.)
 
 * Eli Barzilay e...@barzilay.org
 - Swindle Tests
 - XREPL Tests
 - Verify PL language
 - Racket Tree: compare new distribution tree to previous one
 - Run the unix installer tests
 - Run zsh completions tests
  (. .../racket-completion.zsh; _racket --self-test)
 
 * Stephen Bloch sbl...@adelphi.edu
 - Picturing Programs Tests
 
 * Jon Rafkind rafk...@cs.utah.edu
 Release tests for (one of the) linux releases:
 - Test that the `racket' and `racket-textual' source releases
  compile fine (note that they're still called `plt' and `mz' at
  this stage).
 - Test that the binary installers for both work, try each one in
  both normal and unix-style installation modes. (just ubuntu)
 [Note: get the release candidates from the URL in this email. Use
 the 'static table' link to see a list of all tar files available]
 
 * David Van Horn dvanh...@ccs.neu.edu
 - EoPL Tests
 
 * Neil Toronto neil.toro...@gmail.com
 - Plot Tests
 - Images Tests
 - Inspect icons
 - Math tests
 
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev


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


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

2014-10-20 Thread Matthias Felleisen

DOn't we want to merge this into 6.1.1? 


On Oct 20, 2014, at 3:44 PM, stamo...@racket-lang.org wrote:

 stamourv has updated `master' from 538bb75d64 to 9030680e31.
  http://git.racket-lang.org/plt/538bb75d64..9030680e31
 
 =[ One Commit ]=
 Directory summary:
  16.9% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/
  83.0% pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/
 
 ~~
 
 9030680 Vincent St-Amour stamo...@racket-lang.org 2014-10-20 11:34
 :
 | Fix types for foldl and foldr with 3 lists.
 |
 | Thanks to Jack Firth for the report.
 :
  M .../tests/typed-racket/unit-tests/typecheck-tests.rkt| 13 +
  M .../typed-racket-lib/typed-racket/base-env/base-env.rkt  |  4 ++--
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt
 ~~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt
 @@ -657,11 +657,11 @@
  (-poly (a b c d)
 (cl- [((a b . - . b) b (-lst a)) b]
   [((a b c . - . c) c (-lst a) (-lst b)) c]
 -  [((a b c d . - . d) d (-lst a) (-lst b) (-lst d)) d]))]
 +  [((a b c d . - . d) d (-lst a) (-lst b) (-lst c)) d]))]
 [foldr  (-poly (a b c d)
(cl- [((a b . - . b) b (-lst a)) b]
  [((a b c . - . c) c (-lst a) (-lst b)) c]
 - [((a b c d . - . d) d (-lst a) (-lst b) (-lst d)) d]))]
 + [((a b c d . - . d) d (-lst a) (-lst b) (-lst c)) d]))]
 [filter (-poly (a b) (cl-*
   ((asym-pred a Univ (-FS (-filter b 0) -top))
(-lst a)
 
 pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt
 ~~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt
 @@ -1155,6 +1155,19 @@
 (-polydots (a) ((list) (a a) . -... . -Integer))]
 |#
 
 +[tc-e (foldl (lambda: ([x : Integer] [acc : String]) acc)  '(1 2 
 3))
 +  -String]
 +[tc-e (foldl (lambda: ([x : Integer] [y : Float] [acc : String]) 
 acc)  '(1 2 3) '(1.2 3.4 5.6))
 +  -String]
 +[tc-e (foldl (lambda: ([x : Integer] [y : Float] [z : Symbol ] [acc 
 : String]) acc)  '(1 2 3) '(1.2 3.4 5.6) '(a b c))
 +  -String]
 +[tc-e (foldr (lambda: ([x : Integer] [acc : String]) acc)  '(1 2 
 3))
 +  -String]
 +[tc-e (foldr (lambda: ([x : Integer] [y : Float] [acc : String]) 
 acc)  '(1 2 3) '(1.2 3.4 5.6))
 +  -String]
 +[tc-e (foldr (lambda: ([x : Integer] [y : Float] [z : Symbol ] [acc 
 : String]) acc)  '(1 2 3) '(1.2 3.4 5.6) '(a b c))
 +  -String]
 +
 ;; First is same as second, but with map explicitly instantiated.
 [tc-e/t (plambda: (a ...) [ys : (a ... a - Number) *]
 (lambda: [zs : a ... a]


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


Re: [racket-dev] #f instead of path-string? when (require cKanren)

2014-10-04 Thread Matthias Felleisen

Could you use the github issue tracker to submit this? Thanks -- Matthias

https://github.com/calvis/cKanren



On Oct 2, 2014, at 12:05 PM, A.J. Lepper wrote:

 Windows 64-bit, Racket v6.1 64-bit
 
 If I install cKanren from the package manager then (require cKanren) works 
 fine in Racket.exe from the command prompt, but produces an error in 
 DrRacket. simple-form-path receives #f instead of a path-string?, from 
 file-stamp-in-paths. Adding a [(false? (car paths)) #f] clause to the outer 
 cond stops the error, but may not be a good fix - I got a bit lost digging 
 through the stack above it and went for the easy option. I've attached the 
 backtrace.
 
 Thanks very much,
 -Angus.
 backtrace.txt_
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] How to translate DrRacket GUI to another (human) language?

2014-09-05 Thread Matthias Felleisen

A word of caution about *SL error messages. These messages are synthesized from 
fragments of sentences and then a global rewriter re-arranges them to improve 
their meaning based on work done by Guillaume Marceau, Kathi Fisler and Shriram 
(see SIGCSE 2010). The rewriter catches English phrases at the moment; you 
might be best off checking it out first. 

Sorry -- one day we'll get this aspect right -- Matthias


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


Re: [racket-dev] How to translate DrRacket GUI to another (human) language?

2014-09-05 Thread Matthias Felleisen

On Sep 5, 2014, at 11:15 AM, Antti Karttunen antti.karttu...@gmail.com wrote:

 On Fri, Sep 5, 2014 at 5:16 PM, Matthias Felleisen matth...@ccs.neu.edu 
 wrote:
 
 A word of caution about *SL error messages. These messages are synthesized 
 from fragments of sentences and then a global rewriter re-arranges them to 
 improve their meaning based on work done by Guillaume Marceau, Kathi Fisler 
 and Shriram (see SIGCSE 2010). The rewriter catches English phrases at the 
 moment; you might be best off checking it out first.
 
 Sorry -- one day we'll get this aspect right -- Matthias
 
 
 Well, thanks in any case! For the moment we decided to proceed with
 the English version.
 
 By the way, would it be a good idea to create a mailing list for
 people who use (or intend to use) DrRacket in teaching, as separate
 from an ordinary technical discussion? (I mean the main list.)


There is plt-edu, low traffic. populated by educators who teach at many levels 
but mostly high school (14-18), freshman college. You can sign up for it from 
the Racket web site. 



 Here in Finland I know at least our team of three people who have
 independently chosen (not knowing each other until quite recently)
 DrRacket for teaching programming to (almost) complete beginners (not
 CS-students), with encouraging results.


Yes, I hear this again and again. We should be proactive and support such 
larger, special-domain user bases better. 



 It would be nice to have a forum for sharing specific pedagogical tips
 when using DrRacket, with people from all over the world.


-- Matthias



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


Re: [racket-dev] Should `register-finalizer` unwrap impersonators?

2014-08-17 Thread Matthias Felleisen

Could we benefit from an abstract/opaque Finalizer type here? I know we don't 
have those yet but it may address the general problem. -- Matthias




On Aug 16, 2014, at 8:55 AM, Neil Toronto wrote:

 Short version: the contract system doesn't allow `register-finalizer` to be 
 used in Typed Racket.
 
 Long version: consider the following Typed Racket program, in which instances 
 of `os-resource-wrapper` represent an operating system resource 
 `os-resource`, which itself is just a counter. It attempts to register a 
 finalizer for allocated wrappers, which decrements the counter.
 
 
 #lang typed/racket
 
 (require/typed
 ffi/unsafe
 [register-finalizer  (All (A) (- A (- A Any) Void))])
 
 (: os-resource Integer)
 (define os-resource 0)
 
 (struct os-resource-wrapper ())
 
 (: alloc-os-resource (- os-resource-wrapper))
 (define (alloc-os-resource)
  (set! os-resource (add1 os-resource))
  (define w (os-resource-wrapper))
  (register-finalizer w (λ (w) (set! os-resource (sub1 os-resource
  w)
 
 (define w (alloc-os-resource))
 (printf os-resource = ~v~n os-resource)
 (collect-garbage)
 (sleep 1)  ; give finalizers a chance to run
 (printf os-resource = ~v~n os-resource)
 
 
 I get this output:
 
  os-resource = 1
  os-resource = 0
 
 The finalizer is being run while the program still has a pointer to the 
 wrapper object. I think it's because the wrapper object is being impersonated 
 when it's sent across the contract barrier, and the *impersonator* is getting 
 the finalizer. (Or it's a chaperone, or an impostor, or a charlatan, or 
 whatever. Let's go with impersonator.)
 
 In my specific case, the OS resources are OpenGL objects; e.g. vertex object 
 arrays. The call to `register-finalizer` *must* be in Typed Racket code 
 because the wrapper contains an (Instance GL-Context%), which can't have a 
 contract put on it, so it can't pass from untyped to typed code.
 
 Is there any reason for `register-finalizer` to behave this way? Does it ever 
 make sense to register a finalizer on an impersonator?
 
 Neil ⊥
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev


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


Re: [racket-dev] Should `register-finalizer` unwrap impersonators?

2014-08-17 Thread Matthias Felleisen

I imagine a type-definition construct that allows programmers to specify how 
the type is translated into a contract. Think (define-trusted-type Finalizer C) 
and then the C specifies how little and how much of the type you wish to check. 

And yes, this is potentially a soundness hole but I am thinking that the 
primary uses could be connected to things in the core or the FFI. And 
programmers who wish to reduce the soundness of TR could use it to speed up 
boundary crossings at the cost of getting things wrong. In a sense, it's an FFI 
for types. 

-- Matthias







On Aug 17, 2014, at 3:47 PM, Sam Tobin-Hochstadt wrote:

 Can you say more about what the API for what you're imagining is?
 
 Sam
 
 On Sun, Aug 17, 2014 at 3:41 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 I am imagining that the type compilation of type Finalizer and such things 
 would be parameterized over programmer code which would yield a 'trusted' 
 'thing' in this case except that this would open the door for other such 
 things.
 
 
 
 
 On Aug 17, 2014, at 3:39 PM, Sam Tobin-Hochstadt wrote:
 
 How would that change things here? The issue is about
 finalizer-for-what, and that chaperones/impersonators affect object
 identity.
 
 Sam
 
 On Sun, Aug 17, 2014 at 3:37 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 Could we benefit from an abstract/opaque Finalizer type here? I know we 
 don't have those yet but it may address the general problem. -- Matthias
 
 
 
 
 On Aug 16, 2014, at 8:55 AM, Neil Toronto wrote:
 
 Short version: the contract system doesn't allow `register-finalizer` to 
 be used in Typed Racket.
 
 Long version: consider the following Typed Racket program, in which 
 instances of `os-resource-wrapper` represent an operating system resource 
 `os-resource`, which itself is just a counter. It attempts to register a 
 finalizer for allocated wrappers, which decrements the counter.
 
 
 #lang typed/racket
 
 (require/typed
 ffi/unsafe
 [register-finalizer  (All (A) (- A (- A Any) Void))])
 
 (: os-resource Integer)
 (define os-resource 0)
 
 (struct os-resource-wrapper ())
 
 (: alloc-os-resource (- os-resource-wrapper))
 (define (alloc-os-resource)
 (set! os-resource (add1 os-resource))
 (define w (os-resource-wrapper))
 (register-finalizer w (λ (w) (set! os-resource (sub1 os-resource
 w)
 
 (define w (alloc-os-resource))
 (printf os-resource = ~v~n os-resource)
 (collect-garbage)
 (sleep 1)  ; give finalizers a chance to run
 (printf os-resource = ~v~n os-resource)
 
 
 I get this output:
 
 os-resource = 1
 os-resource = 0
 
 The finalizer is being run while the program still has a pointer to the 
 wrapper object. I think it's because the wrapper object is being 
 impersonated when it's sent across the contract barrier, and the 
 *impersonator* is getting the finalizer. (Or it's a chaperone, or an 
 impostor, or a charlatan, or whatever. Let's go with impersonator.)
 
 In my specific case, the OS resources are OpenGL objects; e.g. vertex 
 object arrays. The call to `register-finalizer` *must* be in Typed Racket 
 code because the wrapper contains an (Instance GL-Context%), which 
 can't have a contract put on it, so it can't pass from untyped to typed 
 code.
 
 Is there any reason for `register-finalizer` to behave this way? Does it 
 ever make sense to register a finalizer on an impersonator?
 
 Neil ⊥
 _
 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] [racket] Performance. Higher-order function

2014-08-10 Thread Matthias Felleisen

[[ Switched mailing list ]] 

Being in the main repo is different from being in the distribution (and thus 
automatically installed). I think that OC should be there when you download the 
full bundle. 

-- Matthias



On Aug 9, 2014, at 3:36 PM, Vincent St-Amour wrote:

 It used to be.
 
 When we introduced the package system, it sounded like we were going to
 split the distribution into multiple repositories (and have the main
 distribution pulled from those multiple repositories). Optimization
 Coach is one of the few packages that did the switch. The rest never
 followed.
 
 It doesn't make sense to merge OC back to the main repo, assuming we
 still plan to split it up.
 
 In the meantime, that does mean that installing the coach has an
 additional barrier to entry, which is unfortunate.
 
 Vincent
 
 
 
 At Sat, 9 Aug 2014 12:50:46 -0400,
 Greg Hendershott wrote:
 
 Why isn't Optimization Coach one of the automatically-installed packages?
 
  Racket Users list:
  http://lists.racket-lang.org/users
 
  Racket Users list:
  http://lists.racket-lang.org/users


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


Re: [racket-dev] Release Announcement for v6.1

2014-07-29 Thread Matthias Felleisen

On Jul 28, 2014, at 2:33 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:

 matthias:
 - add check-random (aec84f4a)


check-random is an addition to the preferred unit testing framework in 
the teaching languages. It enables the testing of students' functions 
that use random-number generation. (Thanks to David Van Horn (UMaryland)
for proposing this idea.) 

;;; --- 

Some grammatical suggestions the UNDEFINED issue: 


 Racket now raises ...

Instead of the ubiquitous 'now' I'd prefer 'Racket v6.1 raises ...'

;;; --- 

.. in Robby's section: 


 - contracts: improved random generation for contracts; the contract
 system can now easily find simple mistakes in data-structure
 implementations (eg accidentally reversing a conditional in a heap
 invariant check), given strong enough contracts

- contracts: the contract system's random testing facility has been
strengthened so that it can easily find mistakes in contracted data 
structure implementations (e.g. an accidental reverse of a conditional 
in a heap invariant check)


 - redex: the semantics of mis-match patterns (variables followed by
 _!_) inside ellipses has changed in a backwards incompatible way; they
 semantics is now much clearer and now potentially even useful


 this change simplifies the patterns' semantics and increases 
the usefulness of these patterns 


;;;  

+1 on plumbers, if only for the word :-) 





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


Re: [racket-dev] Surprising behavior of for/fold. Bug?

2014-07-29 Thread Matthias Felleisen

This is syntactically brittle design. Argh. 




On Jul 29, 2014, at 4:50 PM, J. Ian Johnson i...@ccs.neu.edu wrote:

 I forgot that aspect of #:when and #:unless. Sorry for the noise.
 -Ian
 - Original Message -
 From: Sam Tobin-Hochstadt sa...@cs.indiana.edu
 To: J. Ian Johnson i...@ccs.neu.edu
 Cc: dev dev@racket-lang.org
 Sent: Tuesday, July 29, 2014 4:46:49 PM GMT -05:00 US/Canada Eastern
 Subject: Re: [racket-dev] Surprising behavior of for/fold. Bug?
 
 `#:when` and `#:unless` introduce nesting, a la `for/fold*`. So yes,
 you should expect this.
 
 Sam
 
 On Tue, Jul 29, 2014 at 1:23 PM, J. Ian Johnson i...@ccs.neu.edu wrote:
 This will eat all your memory,
 
 (for/list ([x '(0 1 2 3 4 5 6)]
   #:unless (= x 4)
   [i (in-naturals)])
  x)
 
 and this won't.
 
 (for/list ([x '(0 1 2 3 4 5 6)]
   [i (in-naturals)]
   #:unless (= x 4))
  x)
 
 Should we expect this behavior? I was really surprised by this.
 -Ian
 _
  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] [plt] Push #29061: master branch updated

2014-07-19 Thread Matthias Felleisen

Ouch, This is precisely the kind of (imperative) change I didn't hope to see. I 
will look at the file in a moment but I'd hope you can do this with a lambda 
wrapper instead of a set!. -- Matthias



On Jul 19, 2014, at 1:27 AM, gcoo...@racket-lang.org wrote:

 pkgs/frtime/lang-ext.rkt
 
 --- OLD/pkgs/frtime/lang-ext.rkt
 +++ NEW/pkgs/frtime/lang-ext.rkt
 @@ -412,17 +412,7 @@
   (current-inexact-milliseconds))
 empty)]
[head last]  
 -   [consumer (proc-signal
 -  (lambda ()
 -(let* ([now (current-inexact-milliseconds)]
 -   [new (deep-value-now beh empty)]
 -   [ms (value-now ms-b)])
 -  (when (not (equal? new (car (mcar last
 -(set-mcdr! last (mcons (cons new now)
 -   empty))
 -(set! last (mcdr last))
 -(schedule-alarm (+ now ms) producer
 -  beh ms-b)]
 +   [consumer #f]
[producer (proc-signal
   (lambda ()
 (let* ([now (and (signal? consumer) 
 (current-inexact-milliseconds))]
 @@ -437,7 +427,19 @@
   (begin
 (set! head (mcdr head))
 (loop)))])
 -producer))
 +(begin
 +  (set! consumer (proc-signal
 +  (lambda ()
 +(let* ([now (current-inexact-milliseconds)]
 +   [new (deep-value-now beh empty)]
 +   [ms (value-now ms-b)])
 +  (when (not (equal? new (car (mcar last
 +(set-mcdr! last (mcons (cons new now)
 +   empty))
 +(set! last (mcdr last))
 +(schedule-alarm (+ now ms) producer
 +  beh ms-b))
 +  producer)))
 
 (define (inf-delay beh)
   (delay-by beh 0))
 @@ -451,8 +453,8 @@
  [last-time (current-inexact-milliseconds)]
  [last-val (value-now b)]
  [last-alarm 0]
 - [producer (proc-signal (lambda () (and (signal? consumer) 
 accum)))]
 - [consumer (proc-signal void b ms-b)])
 + [consumer (proc-signal void b ms-b)]
 + [producer (proc-signal (lambda () (and (signal? consumer) 
 accum)))])
   (set-signal-thunk!
consumer
(lambda ()


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


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

2014-07-19 Thread Matthias Felleisen

Thanks for the extensive internal documentation. -- Matthias



On Jul 19, 2014, at 7:07 PM, gcoo...@racket-lang.org wrote:

 gcooper has updated `master' from 45306397cc to 2881b60536.
  http://git.racket-lang.org/plt/45306397cc..2881b60536
 
 =[ One Commit ]=
 Directory summary:
 100.0% pkgs/frtime/
 
 ~~
 
 2881b60 Gregory Cooper ghcoo...@gmail.com 2014-07-19 16:06
 :
 | Rewrite the delay-by primitive so it's easier to understand.
 |
 | Also, add comments that attempt to explain how it's intended to work.
 :
  M pkgs/frtime/lang-ext.rkt | 139 
 
 =[ Overall Diff ]===
 
 pkgs/frtime/lang-ext.rkt
 
 --- OLD/pkgs/frtime/lang-ext.rkt
 +++ NEW/pkgs/frtime/lang-ext.rkt
 @@ -3,6 +3,7 @@
  (only-in racket/list first second last-pair empty 
 empty?))
  (only-in racket/list first second cons? empty empty? rest last-pair)
  (only-in racket/function identity)
 + data/queue
  (only-in frtime/core/frp super-lift undefined undefined? behavior? 
 do-in-manager-after do-in-manager proc-signal set-signal-thunk! register 
 unregister 
   signal? signal-depth signal:switching? signal-value 
 value-now signal:compound? signal:compound-content signal:switching-current 
 signal:switching-trigger 
   set-cell! snap? iq-enqueue value-now/no-copy event-receiver 
 event-set? proc-signal:switching set-signal-producers! set-signal-depth! 
 safe-signal-depth 
 @@ -403,46 +404,110 @@
 (set-signal-value! ret ((signal-thunk ret)))
 ret))
 
 -; XXX general efficiency fix for delay
 -; signal[a] signal[num] - signal[a]
 -(define (delay-by beh ms-b)
 -  (letrec ([last (mcons (cons (if (zero? (value-now ms-b))
 -  (value-now/no-copy beh)
 -  undefined)
 -  (current-inexact-milliseconds))
 -empty)]
 -   [head last]  
 -   [consumer #f]
 -   [producer (proc-signal
 -  (lambda ()
 -(let* ([now (and (signal? consumer) 
 (current-inexact-milliseconds))]
 -   [ms (value-now ms-b)])
 -  (let loop ()
 -(if (or (empty? (mcdr head))
 -( now (+ ms (cdr (mcar (mcdr head))
 -  (let ([val (car (mcar head))])
 -(if (event-set? val)
 -  (make-events-now (event-set-events val))
 -  val))
 -  (begin
 -(set! head (mcdr head))
 -(loop)))])
 +;; signal[a] num - signal[a]
 +;;
 +;; Returns a signal whose value at (approximately) time (+ t |delay-millis|) 
 is a (deep) snapshot
 +;; of the value of |sig| at time t, for all times t from now on. For earlier 
 times, the value of the
 +;; returned signal is undefined.
 +;;
 +;; Assumptions: (current-inexact-milliseconds) is monotonically 
 non-decreasing; |delay-millis| is
 +;; positive and finite.
 +(define (delay-by sig delay-millis)
 +  ;; Implementation strategy:
 +  ;;
 +  ;; Maintain a queue of pairs (snapshot . timestamp) of the observed signal 
 going back in
 +  ;; time for at least |delay-millis|. Start with (undefined . -inf.0) and 
 (current-value . now), so
 +  ;; there should always be at least one item (value . timestamp) in the 
 queue such that
 +  ;; (= now (+ timestamp delay-millis)).
 +  ;;
 +  ;; |consumer| runs whenever |sig| changes and adds an item with the 
 observed value and current
 +  ;; time to the queue; schedules |producer| to run at |delay-millis| in 
 the future, by which
 +  ;; time it should be ready to take on that observed value.
 +  ;;
 +  ;; |producer| has no dependencies recorded in the dataflow graph and only 
 runs when scheduled
 +  ;; by the consumer. (This is what allows delay-by to break cycles.) It 
 traverses the queue
 +  ;; looking for the latest observation (value . timestamp) such that
 +  ;; (= now (+ timestamp delay-millis)), and takes on the observed 
 value. |producer| is the
 +  ;; value returned by this procedure, so it stays alive as long as 
 anything cares about its
 +  ;; value.
 +  (let* ([queue (make-queue)]
 + 
 + ;; finish : (a . num) a - a
 + ;; Puts |queue-item| back on the front of the queue and returns 
 |val|, updating the
 + ;; occurrence timestamp if |val| represents an event set.
 + ;; TODO(gcooper): We could avoid this if data/queue supported a 
 peek operation.
 + [finish! (lambda (queue-item val)
 +(enqueue-front! queue queue-item)
 + 

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

2014-07-14 Thread Matthias Felleisen

Unfortunately, it is impossible to distinguish the two kinds of 
contracts. Even if we introduced two different linguistic mechanisms, 
we would simply confuse programmers more. 

Let's try this experiment for a while and see what happens. 




On Jul 14, 2014, at 9:46 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 I think the vast majority of contract errors that Racket programmers
 see will be from contracts that the particular programmer didn't
 write. For example: standard library contracts, or contracts from
 packages they install, or contracts generated by Typed Racket, or
 other such.
 
 For example, here's a simple contract error:
 
 - (require scribble/core)
 - (part-parts 7)
 ; part-parts: contract violation
 ;   expected: part?
 ;   given: 7
 ;   in: the 1st argument of
 ;   (- part? (listof part?))
 ;   contract from:
 ;   pkgs/scribble-lib/scribble/core.rkt
 ;   blaming: top-level
 ;(assuming the contract is correct)
 ;   at: pkgs/scribble-lib/scribble/core.rkt:164.2
 
 What does the assuming the contract is correct mean to the
 programmer here? They can't change the contract, and it's not obvious
 in what sense the contract being incorrect would change anything.
 
 In general, I think that your new message makes a lot of sense if
 programmers mostly experience contracts as strong invariants
 protecting complex components specified publicly -- the sort of thing
 you've talked about as a marketplace of components. But I don't
 think that's how Racket programmers typically experience contracts --
 instead, they're more like the example above: simple specifications
 protecting small functions implemented privately and used as
 error-checking.
 
 Sam
 
 On Mon, Jul 14, 2014 at 9:30 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 I do not buy this argument: the user didn't write the compiler but they
 wrote the contract.
 
 Robby
 
 
 On Monday, July 14, 2014, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:
 
 This seems like a situation where the new error message is potentially
 more confusing, even though it's technically more correct. There are
 lots of other caveats we could add (assuming there isn't a compiler
 bug, etc) but I think adding them would make Racket harder to use.
 
 Sam
 
 On Mon, Jul 14, 2014 at 9:11 AM,  ro...@racket-lang.org wrote:
 robby has updated `master' from 737330deb6 to 1dda800ca2.
  http://git.racket-lang.org/plt/737330deb6..1dda800ca2
 
 =[ One Commit ]=
 Directory summary:
 100.0% racket/collects/racket/contract/private/
 
 ~~
 
 1dda800 Robby Findler ro...@racket-lang.org 2014-07-14 08:09
 :
 | add contract-correct caveat to contract violation error messages
 :
  M racket/collects/racket/contract/private/blame.rkt | 1 +
 
 =[ Overall Diff ]===
 
 racket/collects/racket/contract/private/blame.rkt
 ~
 --- OLD/racket/collects/racket/contract/private/blame.rkt
 +++ NEW/racket/collects/racket/contract/private/blame.rkt
 @@ -320,6 +320,7 @@
from-line
on-line
blaming-line
 +  (assuming the contract is correct)
at-line))
 
 ;; combine-lines : (-* #:rest (listof (or/c string? #f))) string?)
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] for loops with interleaved escape continuations

2014-07-02 Thread Matthias Felleisen

Interestingly enough, I tried to explain this idea to the Imperative Advanced 
Placement crowd in the 1990s. With functional programming -- control from 
tail-recursive functions -- is more expressive than programming with limited 
loops because you can (1) break/resume/continue/foobar your 'loops' more easily 
(including loops that communicate actual values instead of void) and (2) you 
can write abstractions over these things once you have good use cases. 

Now we're in a position to do so and what John  Sam sketch out is finally a 
realization of this idea. 

-- Matthias


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


Re: [racket-dev] for loops with interleaved escape continuations

2014-07-02 Thread Matthias Felleisen

On Jul 2, 2014, at 2:26 PM, Neil Van Dyke wrote:

 Loop syntax and sugar is fine.  And having #:continue and #:break 
 keywords at the top of the form is sufficient warning of surprises ahead, 
 IMHO.
 
 I do have a minor ongoing concern that people coming from other languages 
 lately latch onto the for family of forms from the start, don't get enough 
 exposure to named-let, and/or mutually/self-recursive procedures, and then 
 end up shoehorning problems into the for forms (with flag variables and 
 redundant checks and such).  break and continue can be good shoehorns.
 
 I still half-seriously like the idea of having unlockable language feature 
 achievements, like unlockable equipment in video games.  I might play with 
 that idea soon.

Cute idea. It generalizes the teaching languages, which at some point we wanted 
to explore, too. We dubbed this HLI as in Human-Language Interface. -- Matthias


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


Re: [racket-dev] for loops with interleaved escape continuations

2014-07-01 Thread Matthias Felleisen

In principle I like this #:ec idea, but I would feel more comfortable if you 
explored the whole range of for loops and their interactions with this new 
feature. -- Matthias







On Jun 28, 2014, at 6:54 AM, Jay Kominek wrote:

 On Fri, Jun 27, 2014 at 8:40 PM, J. Ian Johnson i...@ccs.neu.edu wrote:
 One is that #:when in for-clauses allows you to skip iterations, but you 
 want it in the body. This is a cosmetic difference that you can get around 
 by doing #:when (begin imperative-stuff-before-guard guard). If you want ecs 
 to escape an entire for loop, that's what #:break is for. If you want ecs to 
 escape even more for loops, well, that is an unplanned but a possibly useful 
 feature for nested for loops.
 
 Yes, #:when gets frustratingly close, but if
 imperative-stuff-before-guard does something expensive (fetches the
 ith web page, or what have you), I've got to repeat it in the body if
 I actually want to use the value. Same issue with #:break and all the
 other guards.
 
 If I end up wanting #:when, #:break, and the body of the expression to
 all make use of some expensive value, I'm stuck reproducing it. (Or
 setting up some previous loop to make a bunch of promises that I can
 force... bleh.)
 
 Would I have more luck selling folks on some sort of #:let [id
 val-expr] construct that could mix in with the sequences? That'd get
 me most of what I was going for, and it is probably(?) a lot more
 obvious how it should behave.
 
 The other is that this is not Rackety and thus not natively supported for 
 the same reason there are no return statements. The for macros are so much 
 more than Python's for - they can produce values. Don't throw everything 
 into the void :)
 
 Sorry, I should've put more than a moment's effort into my example. I
 specifically tried to ensure that this can do more than Python's break
  continue! In fact, this allows poor boring for who normally
 produces nothing but void to produce a useful value. Here are some
 more examples, again contrived because I'm trying to keep them short,
 but hopefully making more apparent the advantage over simple break 
 continue:
 
 (for (#:ec break
  [x (in-range 0 10)])
  (when(= x 2)
(break found it!))
  (printf ~a~n x))
 
 0
 1
 found it!
 
 
 (for/fold ([x 0] [y 0])
  (#:ec break
   [i (in-range0 10)]
   #:eccontinue)
  (when (= i 3)
(continue (+ x 1000) (+ y 1000)))
  (when(= i 7)
(break (exact-inexact x) y))
  (values (add1 x) (add1 y)))
 
 1006.0
 1006
 
 The inner escape continuation passes its values along to the next
 iteration, while the outer one can return values for the entire
 expression. And of course, it can be interleaved between sequences,
 just like #:when and friends.
 
 I was allowing the use of the continuations without arguments so that
 there'd be a more obvious translation from languages with wimpy
 control statements, but they raise the issue of what values should be
 used by default.
 
 (And to reiterate the current inadequacies, it doesn't behave at all
 properly with for/list, for/vector or for/set.)
 
 Thanks for looking.
 
 -- 
 Jay Kominek
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


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

2014-07-01 Thread Matthias Felleisen

On Jun 27, 2014, at 4:47 PM, Robby Findler wrote:

 This effect is, I believe, one of the
 main things people mean when they say that Redex's typesetting is ugly
 (and it is indeed ugly in larger quantities).


[[ Just now catching up ]]

This is off topic in a sense but right on topic wrt the above quote. 
When people dislike Redex in scribble or latex document, they are 
saying that they chose some fonts (perhaps defaults) and that Redex
fragments look different than their context because Redex chose a 
different font. Most latex users don't know much about fonts and
certainly don't know how to adjust Redex so it uses their latex 
fonts. 

[[ I did some font loading and messing around in my TeX days and
young LaTeX days and I am honestly glad I forgot those details. I 
am not looking forward to creating the .tex styles for 2e. ]]
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] style was Re: 2htdp/image Feature Suggestion

2014-06-30 Thread Matthias Felleisen

Good choice :-) 

;; --- 

I think Robby translated the recommendations of the style guide just right. 
BTW, I didn't think it mentions named let only let. Indeed, I can't find a 
recommendation of preferring defined over named let. 

;; --- 

A comment on your commenting style. I tried to read your code and Robby's 
version of it, and I found that the large number of comments distracted me and 
weren't helpful at all. I'd recommend using variable and function names instead 
that convey the same idea as the comments. Try it out. 

-- Matthias








On Jun 29, 2014, at 9:09 AM, Jos Koot wrote:

 Thanks.
 I always use DrRacket for editing racket code.
 Jos.
 
 -Original Message-
 From: Greg Hendershott [mailto:greghendersh...@gmail.com] 
 Sent: domingo, 29 de junio de 2014 5:55
 To: Jos Koot
 Cc: dev; jja.k...@gmail.com
 Subject: Re: [racket-dev] 2htdp/image Feature Suggestion
 
 On Mon, Jun 23, 2014 at 9:44 PM, Jos Koot jos.k...@gmail.com wrote:
 style. Writing this, the idea comes up in my mind that it 
 should be possible
 to do some transformations to the recommended style by 
 means of redex. Or
 may be by means of syntax-case while limiting the 
 transformers to the
 desired level of expansion. Both instuments are interesting 
 enough for me to
 give it a try. If I am able to do something usefull in this 
 sense, you'll
 hear of me, but give me some time, please.
 
 If you use Emacs, check out Ryan's sexp-rewrite mode. IIUC he's
 implemented `syntax-parse`-like functionality in Elisp:
 
  https://github.com/rmculpepper/sexp-rewrite
 
 
 p.s. In a similar spirit, but for Clojure, and IIUC implemented
 leveraging paredit:
 
  https://github.com/clojure-emacs/clj-refactor.el
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-21 Thread Matthias Felleisen

Thanks. We will need to figure out how to accommodate keywords in a teachpack. 

In the meantime, write frame like this: 

(define (frame-2 img 
 #:frame-color (frame-color 'black)
 #:background-color (background-color 'transparent)
 #:frame-offset (frame-offset 0)
 #:frame-x-offset (frame-x-offset frame-offset)
 #:frame-y-offset (frame-y-offset frame-offset))
  (define width (+ (image-width img) frame-x-offset))
  (define height (+ (image-height img) frame-y-offset))
  (overlay (rectangle width height 'outline frame-color)
   (center-crop width height img)
   (rectangle width height 'solid background-color)))

Prefer define over let. -- Matthias



On Jun 21, 2014, at 2:42 PM, Kevin Forchione wrote:

 Hi guys,
 I’ve been working with 2htdp/image and been struck by its monitor-oriented 
 coordinate system and its image-centric perspective, both of which have 
 proven a rich bed for new tools. I’ve found these two functions have been 
 useful to me and might be useful for others. I’ve particularly found them 
 useful as my racket sessions use the “white on black” color schemes, and with 
 my eyesight a pixel’s contrast makes a difference. 
 
 The center-crop function facilitates the image-cntric perspective of the 
 library by centering the cropping rectangle on the image center. The frame 
 function replaces the library’s existing function with one that does the same 
 thing, but also provides parameters for setting the pixel frame coloring, 
 background coloring within the frame, and x/y offsets that work with 
 center-crop to expand or shrink the framing of the image. 
 
 ;; center-crop: width height image - image?
 ;; crops image in a rectangle of width x height whose center is image center.
 (define (center-crop width height img)
  (crop (- (quotient (image-width img) 2) (quotient width 2))
(- (quotient (image-height img) 2) (quotient height 2))
width
height
img))
 
 ;; frame: image frame-option ... - image?
 ;; Returns an image just like image, except with a frame-color'd, single 
 pixel frame
 ;; around the bounding box of the image. The background-color indicates the 
 color
 ;; inside the frame over which the image is laid. If an offset is provided it 
 ;; indicates a center-crop in that dimension. A positive value extends the 
 crop
 ;; beyond the image bounding box, a negative value center-crops the image 
 within
 ;; the bounding box.
 (define (frame img 
   #:frame-color (frame-color 'black)
   #:background-color (background-color 'transparent)
   #:frame-offset (frame-offset 0)
   #:frame-x-offset (frame-x-offset frame-offset)
   #:frame-y-offset (frame-y-offset frame-offset))
  (let ([width (+ (image-width img) frame-x-offset)]
[height (+ (image-height img) frame-y-offset)])
(overlay (rectangle width height 'outline frame-color)
 (center-crop width height img)
 (rectangle width height 'solid background-color
 
 -Kevin
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


[racket-dev] outage

2014-06-16 Thread Matthias Felleisen


NEU CCIS suffered from a major power outage for all day yesterday (until early 
this morning). Our systems stuff described it with the UPS that feeds the room 
had failed, could not be restarted, and could not be bypassed. Sorry for any 
inconveniences -- Matthias


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


Re: [racket-dev] Machinery for eliding contracts

2014-06-10 Thread Matthias Felleisen

On Jun 9, 2014, at 6:02 PM, Eric Dobson eric.n.dob...@gmail.com wrote:

 
 Eric, are you talking about changing the proxy values that wrap HO/mutable
 contracted values?
 Yes. I want the proxy values to include information about who agreed
 to the contract in addition to the contract agreed to.
 
 I actually realize that I might need more than just the contract
 agreed to because of how TR changes the generated contract to remove
 checks for what it guarantees, so that info is not in the contract.
 But I believe that can be added back as a structure property on the
 contract.


Would some form of hash-consing contracts work here? -- Matthias



smime.p7s
Description: S/MIME cryptographic signature
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Machinery for eliding contracts

2014-06-10 Thread Matthias Felleisen

I was thinking of associating the contract with the type from which it comes 
and no that's not hash-consing. And if it's slower, too bad. -- Matthias





On Jun 10, 2014, at 12:47 PM, Eric Dobson eric.n.dob...@gmail.com wrote:

 On Tue, Jun 10, 2014 at 6:15 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 On Jun 9, 2014, at 6:02 PM, Eric Dobson eric.n.dob...@gmail.com wrote:
 
 
 Eric, are you talking about changing the proxy values that wrap HO/mutable
 contracted values?
 Yes. I want the proxy values to include information about who agreed
 to the contract in addition to the contract agreed to.
 
 I actually realize that I might need more than just the contract
 agreed to because of how TR changes the generated contract to remove
 checks for what it guarantees, so that info is not in the contract.
 But I believe that can be added back as a structure property on the
 contract.
 
 
 Would some form of hash-consing contracts work here? -- Matthias
 
 
 I don't think so. But not sure exactly what you are proposing.
 
 The issue is that there are 4 contracts here and 2 of them currently
 do not exist at runtime. The 4 are TRs checks/promises on an
 export/import. (Using import for a value flowing into an exported
 function). The promise contracts do not currently exist as removing
 them was my previous optimization (They never fail). What I want to do
 is change the check on import from (array/c symbol?) to (if/c
 (protected? (array/c symbol?)) any/c (array/c symbol?)). Where
 (protected? x/c) checks if TR already promised something stronger
 than x/c.
 
 I believe that you are proposing that we can use the identity of the
 contract returned by value-contract to determine what the promised
 contract would have been. This does not work as (Array Symbol) and
 (Array Float) both get translated to (array/c any/c) for export, and
 we would want to lookup different promised contracts for them. We
 could use weak hash map as an extra field but that seems like it would
 be slow.


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


[racket-dev] fresh install ends in

2014-06-10 Thread Matthias Felleisen

 raco setup: package declares no dependencies: txexpr
 raco setup: package declares no dependencies: sugar
 hash-ref: no value found for key
   key: racket
   context...:
/Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:227:8: 
 for-loop
/Users/matthias/plt/racket/collects/racket/private/map.rkt:21:13: map
/Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:415:2: 
 for-loop
/Users/matthias/plt/racket/collects/setup/private/pkg-deps.rkt:24:0: 
 check-package-dependencies
/Users/matthias/plt/racket/collects/setup/setup-core.rkt:61:0: setup-core
/Users/matthias/plt/racket/collects/setup/setup-go.rkt: [running body]
/Users/matthias/plt/racket/collects/setup/main.rkt: [running body]
/Users/matthias/plt/racket/collects/raco/main.rkt: [running body]
 make[1]: *** [plain-in-place] Error 1
 make: *** [in-place] Error 2

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


Re: [racket-dev] Machinery for eliding contracts

2014-06-09 Thread Matthias Felleisen

On Jun 9, 2014, at 9:38 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 On Mon, Jun 9, 2014 at 3:19 AM, Eric Dobson eric.n.dob...@gmail.com wrote:
 
 It would be nice if the contract on the input to g could be elided. It
 seems like this could be done by using something like prop:contracted
 but that allowed accessing the parties that agreed to the contract.
 
 I'm imagining something like
 (lambda (v) (and (has-contract? v) (contracted-value-providing-side=?
 v 'the-typed-world) (contract-stronger? (value-contract v)
 new-contract)))
 
 One issue I see is that we need an unforgeable property that the value
 actually came from the typed world so we know that eliding the new
 contract is safe.
 
 Does this seem like a reasonable thing to support/do people see issues with 
 it?
 
 It seems like this could be simplified a little just by allowing
 contract parties to be compared.  IOW, at the point where you're
 writing that function, we have two contracts, and we need to know if
 the negative party of one is the positive party of the other.  Then
 you don't need to worry about unforgeability, I think.


Well some code could swap identities on such things. Not accidentally. 
Plus I think this would eliminate the anticipated benefits if there
are chains of TR modules involved. I think Eric just needs to know 
whether something came out of the TR world and flows back w/o being 
touched. 

;; --- 

Eric, are you talking about changing the proxy values that wrap HO/mutable 
contracted values? 

-- Matthias





smime.p7s
Description: S/MIME cryptographic signature
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


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

2014-05-29 Thread Matthias Felleisen
 because it requires inlining. And the
 current version of racket cannot optimize this either because it
 becomes
 
 (let ((s (vector 1 2 3)))
  (if (vector? s)
  (vector-map add1 s)
  (map add1 s)))
 
 Which isn't optimized because when we see (vector? s) we don't know
 that s is a vector as Mathew's change only works if the constructor is
 inline (i.e. of the form (vector? (vector 1 2 3))). Cases like this
 make me think that we need something stronger than context free
 rewrite rules over the ast/bytecode.
 
 
 On Wed, May 28, 2014 at 6:36 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 Perhaps the right answer is to organize the optimizer
 as a rewriting engine to which other devs can add rules
 as they discover them (and their absence in the existing
 rule set). -- Indeed, one could then even have programmers
 extend the rule set for a specific program (though then
 we have to worry about soundness). With syntax-* we should
 have no problem formulating the mostly context-free rules
 and we could figure out in addition how to keep track of
 contexts. (This is the other half of what we used to call
 the 'open compiler' idea at Rice.)
 
 -- Matthias
 
 
 
 
 On May 28, 2014, at 9:25 PM, Sam Tobin-Hochstadt wrote:
 
 On Thu, May 29, 2014 at 4:26 AM,  mfl...@racket-lang.org wrote:
 
 | optimizer: ad hoc optimization of predicates applied to constructions
 |
 | This is probably more of a job for Typed Racket, but maybe it's
 | useful to detect some obviously unnecessary allocations of lists, etc.
 
 I think this is a useful discussion to have. I think there are two
 questions to answer:
 
 1. Do we want people to need to use a particular language for greater
 optimization, whether that's Typed Racket or some other optimizer?
 
 2. How should we optimize the code that Typed Racket depends on?
 Since this is a finite amount, we could manually do this, but we might
 not want to.
 
 Of course, in the absence of other constraints, it would be great to
 have infinite optimizations at every level. But in our actual setting,
 I don't know what I think the answer to either of these questions is.
 
 Sam
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev
 


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


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

2014-05-28 Thread Matthias Felleisen

Perhaps the right answer is to organize the optimizer
as a rewriting engine to which other devs can add rules
as they discover them (and their absence in the existing 
rule set). -- Indeed, one could then even have programmers
extend the rule set for a specific program (though then 
we have to worry about soundness). With syntax-* we should
have no problem formulating the mostly context-free rules 
and we could figure out in addition how to keep track of
contexts. (This is the other half of what we used to call
the 'open compiler' idea at Rice.) 

-- Matthias




On May 28, 2014, at 9:25 PM, Sam Tobin-Hochstadt wrote:

 On Thu, May 29, 2014 at 4:26 AM,  mfl...@racket-lang.org wrote:
 
 | optimizer: ad hoc optimization of predicates applied to constructions
 |
 | This is probably more of a job for Typed Racket, but maybe it's
 | useful to detect some obviously unnecessary allocations of lists, etc.
 
 I think this is a useful discussion to have. I think there are two
 questions to answer:
 
 1. Do we want people to need to use a particular language for greater
 optimization, whether that's Typed Racket or some other optimizer?
 
 2. How should we optimize the code that Typed Racket depends on?
 Since this is a finite amount, we could manually do this, but we might
 not want to.
 
 Of course, in the absence of other constraints, it would be great to
 have infinite optimizations at every level. But in our actual setting,
 I don't know what I think the answer to either of these questions is.
 
 Sam
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev

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


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

2014-05-08 Thread Matthias Felleisen

(We have maybe/c somewhere, and I think we should use it.) 


On May 8, 2014, at 4:19 PM, sa...@racket-lang.org wrote:

 samth has updated `master' from 98ae3d8b2d to e1ab2ffcf4.
  http://git.racket-lang.org/plt/98ae3d8b2d..e1ab2ffcf4
 
 =[ One Commit ]=
 Directory summary:
 100.0% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/
 
 ~~
 
 e1ab2ff Sam Tobin-Hochstadt sa...@cs.indiana.edu 2014-05-08 16:18
 :
 | Fix contract.
 |
 | First bug caught with new test.  Thanks Robby!
 :
  M .../typed-racket-lib/typed-racket/infer/infer-unit.rkt   | 2 +-
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 ~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 @@ -360,7 +360,7 @@
(Type/c Type/c . - . (or/c #f cset?))
(cgen V X Y S T))
   (define/cond-contract (cg/inv S T)
 -   (Type/c Type/c . - . cset?)
 +   (Type/c Type/c . - . (or/c #f cset?))
(cgen/inv V X Y S T))
   ;; this places no constraints on any variables in X
   (define empty (empty-cset X Y))


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


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

2014-05-08 Thread Matthias Felleisen

I think maybe signals a well-known functional idea. 


On May 8, 2014, at 8:03 PM, Robby Findler wrote:

 (or/c #f x)
 
 seems better than maybe/c because it is nearly the same length and it
 is one less thing to memorize (and it's not like single-point of
 control applies here because this can never change).
 
 Robby
 
 On Thu, May 8, 2014 at 6:17 PM, Matthias Felleisen matth...@ccs.neu.edu 
 wrote:
 
 (We have maybe/c somewhere, and I think we should use it.)
 
 
 On May 8, 2014, at 4:19 PM, sa...@racket-lang.org wrote:
 
 samth has updated `master' from 98ae3d8b2d to e1ab2ffcf4.
 http://git.racket-lang.org/plt/98ae3d8b2d..e1ab2ffcf4
 
 =[ One Commit ]=
 Directory summary:
 100.0% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/
 
 ~~
 
 e1ab2ff Sam Tobin-Hochstadt sa...@cs.indiana.edu 2014-05-08 16:18
 :
 | Fix contract.
 |
 | First bug caught with new test.  Thanks Robby!
 :
 M .../typed-racket-lib/typed-racket/infer/infer-unit.rkt   | 2 +-
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 ~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 @@ -360,7 +360,7 @@
   (Type/c Type/c . - . (or/c #f cset?))
   (cgen V X Y S T))
  (define/cond-contract (cg/inv S T)
 -   (Type/c Type/c . - . cset?)
 +   (Type/c Type/c . - . (or/c #f cset?))
   (cgen/inv V X Y S T))
  ;; this places no constraints on any variables in X
  (define empty (empty-cset X Y))
 
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


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

2014-05-08 Thread Matthias Felleisen

It was called option/c until we did option contracts. 

(All of this just shows that contracts are not written in 
the programming language proper, contrary to our propaganda.) 





On May 8, 2014, at 10:29 PM, Robby Findler wrote:

 add1 is fine compared to (+ ... 1), imo, because the name tells you
 what it is doing, but maybe/c doesn't. It just sends the signal you
 aren't in the club if you don't know what 'maybe' is. Maybe if there
 was another name that made that meaning clear I would also be in
 favor.
 
 Robby
 
 On Thu, May 8, 2014 at 7:34 PM, Matthias Felleisen matth...@ccs.neu.edu 
 wrote:
 
 I think maybe signals a well-known functional idea.
 
 
 On May 8, 2014, at 8:03 PM, Robby Findler wrote:
 
 (or/c #f x)
 
 seems better than maybe/c because it is nearly the same length and it
 is one less thing to memorize (and it's not like single-point of
 control applies here because this can never change).
 
 Robby
 
 On Thu, May 8, 2014 at 6:17 PM, Matthias Felleisen matth...@ccs.neu.edu 
 wrote:
 
 (We have maybe/c somewhere, and I think we should use it.)
 
 
 On May 8, 2014, at 4:19 PM, sa...@racket-lang.org wrote:
 
 samth has updated `master' from 98ae3d8b2d to e1ab2ffcf4.
 http://git.racket-lang.org/plt/98ae3d8b2d..e1ab2ffcf4
 
 =[ One Commit ]=
 Directory summary:
 100.0% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/
 
 ~~
 
 e1ab2ff Sam Tobin-Hochstadt sa...@cs.indiana.edu 2014-05-08 16:18
 :
 | Fix contract.
 |
 | First bug caught with new test.  Thanks Robby!
 :
 M .../typed-racket-lib/typed-racket/infer/infer-unit.rkt   | 2 +-
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 ~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/infer-unit.rkt
 @@ -360,7 +360,7 @@
  (Type/c Type/c . - . (or/c #f cset?))
  (cgen V X Y S T))
 (define/cond-contract (cg/inv S T)
 -   (Type/c Type/c . - . cset?)
 +   (Type/c Type/c . - . (or/c #f cset?))
  (cgen/inv V X Y S T))
 ;; this places no constraints on any variables in X
 (define empty (empty-cset X Y))
 
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev
 


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


Re: [racket-dev] [racket] lab notebook on learning process (was: Re: Macros baffle me)

2014-05-06 Thread Matthias Felleisen

On May 6, 2014, at 2:02 PM, Jens Axel Søgaard jensa...@soegaard.net wrote:

 How about an extra button, a  Run Benchmark button?

+ω


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


Re: [racket-dev] make-empty-namespace vs make-base-empty-namespace; ie attaching racket/base does other stuff

2014-04-29 Thread Matthias Felleisen

I think improvements would be welcome. Start with a redex model. 



On Apr 29, 2014, at 3:15 PM, Stephen Chang stch...@ccs.neu.edu wrote:

 Thanks for the explanation. It all does make sense.
 
 I guess I'm still unsatisfied because it still feels like there's a
 gap between the namespace model as presented by the docs and what
 actually happens. For example, the docs give me the impression that
 you can't require a module unless it's already declared [1].
 
 In general, I feel that certain terms, eg, namespace, attach, declare,
 instantiate, should have precise technical meanings but are used
 imprecisely in the docs so that I can't form a proper mental model.
 For example, is possible to say makes it possible to load m.rkt
 using the terminology of the docs? Is there ever a state where m.rkt
 is declared but not instantiated?
 
 I'm willing to work to improve these parts of the docs to make things
 more consistent (if others agree that improvements are needed).
 
 [1]: 
 http://docs.racket-lang.org/reference/eval-model.html#%28part._module-eval-model%29
 
 On Mon, Apr 28, 2014 at 8:06 PM, Matthew Flatt mfl...@cs.utah.edu wrote:
 If you start with an empty namespace, then the handful of primitive
 modules needed to bootstrap `racket/base` are not there. Attaching
 `racket/base` doesn't make m.rkt available, but it makes it possible
 to load m.rkt, after which m.rkt will be declared in the namespace.
 
 It's not a matter of initializing the module name resolver, which is
 not attached to a namespace. It's just a question of having the
 necessary primitive modules declared in a namespace.
 
 The `'#%builtin` module imports all the primitive modules needed to
 bootstrap `racket/base` --- that's its job --- while neither
 `'#%kernel` nor `'#%boot` reach all of the needed primitive modules.
 
 Ideally, you wouldn't be able to access any of those modules whose
 names start '#%, because you shouldn't use them. I don't know how to
 hide the modules from you without also hiding them from `racket/base`.
 
 
 When I try
 
 (parameterize ([current-namespace (make-base-empty-namespace)])
   (namespace-require m.rkt)
   (module-declared? m.rkt))
 
 then I get #t back, so I'm not sure why you were getting #f... unless
 you tried
 
 (parameterize ([current-namespace (make-base-empty-namespace)])
   (namespace-require m.rkt))
 (module-declared? m.rkt)
 
 which would produce #f, because `module-declared?` consults the current
 namespace.
 
 At Mon, 28 Apr 2014 16:48:04 -0400, Vincent St-Amour wrote:
 Extra bit of information, this works too:
 
#lang racket
(define ns (make-empty-namespace))
(namespace-attach-module (current-namespace) ''#%builtin ns)
(parameterize ([current-namespace ns])
  (namespace-require m.rkt))
 
 But replacing ''#%builtin with ''#%kernel or ''#%boot doesn't. Replacing
 it with 'racket/base (to end up with the equivalent of
 `make-base-empty-namespace') does work.
 
 Vincent
 
 
 
 At Mon, 28 Apr 2014 16:38:24 -0400,
 Stephen Chang wrote:
 
 Motivated by some recent email threads, I decided to better understand
 how Racket namespaces work by re-reading some docs but I got confused.
 
 Paraphrasing the examples from this part of the guide:
 http://docs.racket-lang.org/guide/mk-namespace.html
 
 the following example fails because the module registry in the
 namespace is empty:
 
 (parameterize ([current-namespace (make-empty-namespace)])
  (namespace-require m.rkt)) ; error
 
 But the example works if make-base-empty-namespace is used instead:
 
 (parameterize ([current-namespace (make-base-empty-namespace)])
  (namespace-require m.rkt)) ; works
 
 (Assume the contents of m.rkt is #lang racket/base with nothing else.)
 
 According to the docs, make-base-empty-namespace attaches
 racket/base but why does this make m.rkt suddenly available? There
 seems to be an unexplained gap between to the two examples. (Adding to
 my confusion is that (module-declared? m.rkt) evaluates to false,
 even in the 2nd case.)
 
 With help from Vincent, we investigated and speculate that perhaps
 attaching racket/base also runs boot from '#%boot, which populates
 current-module-name-resolver, but could not conclude anything
 definitively. Can someone explain what's happening?
 _
  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


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


[racket-dev] actionable items, was: comments on comments on learning Racket

2014-04-28 Thread Matthias Felleisen

So far we have had two threads of reactions to my 'comments on 
comments.' They have produced requests that I consider actionable
items though I have counter-proposal to some of them. The list 
below does not include other actionable items I had on my list 
that did not get comments. 



With credit: 

* SAM suggests to always start in #lang racket. Tell students to
switch to #lang htdp/bsl or use Choose Language. I think this is
plain unfriendly to our largest audience. Here is my
counter-proposal:  

 when drracket starts w/o a preference file, we pop up a radio menu: 
 
 o Are you a student learning to program? 
 o Are you an experienced programmer learning to use Racket?
 
 Depending on which bullet the person checks, drracket starts in 
 BSL [#lang htdp/bsl, one day soon] or #lang racket.

* LAURENT asks for:

~~ faster re-indentation of last files. Will pre-computations 
   help or is the display on the screen the bottleneck? 

~~ the language selection menu should also be available from
   the general preference dialog 

~~ the following MV functions: 

   ~~ what names should they receive? 
   ~~ where should they and their tests go? 

;; (X ... - Y ...) X *- [List-of Y]
;; gather the return MVs from (apply f s) in a list

(module+ test
  (check-equal? 
   (gather-return-values (lambda () (values 1 2))) 
   (list 1 2))

  (check-equal? 
   (gather-return-values (lambda (x) (values 1 x)) 2)
   (list 1 2))

  (check-equal? 
   (gather-return-values (lambda (x y) (values y x)) 2 1)
   (list 1 2)))

(define (gather-return-values f . s)
  (call-with-values (lambda () (apply f s)) list))

;; Nat (X ... - Y ...) X *- Y
;; pick the i-th return value from a bunch of MVs 

(module+ test
  (check-equal? 
   (nth-return-value 0 (lambda () (values 1 2))) 
   1)

  (check-equal? 
   (nth-return-value 0 (lambda (x) (values 1 x)) 2)
   1)

  (check-equal? 
   (nth-return-value 0 (lambda (x y) (values y x)) 2 1)
   1))

(define (nth-return-value i f . s)
  (call-with-values 
   (lambda () (apply f s)) 
   (lambda l (list-ref l i

~~ macros should come with 'meta information' such as
   indentation; sub-modules may enable this; probably a 
   research topic (well, I no longer have a macrologist 
   in the group) 

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


Re: [racket-dev] actionable items, was: comments on comments on learning Racket

2014-04-28 Thread Matthias Felleisen

On Apr 28, 2014, at 9:51 AM, Robby Findler ro...@eecs.northwestern.edu wrote:

 So you are asking to go back to the way it was before we added the not a 
 language language?


I don't think we asked simple questions like that. We popped up the dialogue 
itself, no? 
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] actionable items, was: comments on comments on learning Racket

2014-04-28 Thread Matthias Felleisen

I withdraw my support for this item. 

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


Re: [racket-dev] Refactoring Idea

2014-04-28 Thread Matthias Felleisen

This is one of those places where our desire to not include
extra-linguistic mechanisms conflicts with our desire to 
support our programmers. I have had this idea many times, 
as I am sure have many others and Jens probably had it tons
of times over the years. 

Even a package isn't enough because one might have client 
modules somewhere else. 





On Apr 28, 2014, at 11:03 AM, Robby Findler ro...@eecs.northwestern.edu wrote:

 I guess this would work best if DrRacket were given a package (and it
 could infer the current package from the location of the file being
 edited).
 
 So if someone wants to implement a function that, given a package spec
 and a renaming and then does the work, I'd be happy to try to
 integrate it into DrRacket proper. Also: does the renaming should
 mean rewrite the files on the disk and rewrite the files that are open
 in DrRacket and there is some interesting questions when the file is
 open and the save file isn't up to date. DrRacket can easily supply a
 list of text% objects that correspond to open files, however (and they
 can be queried to find out if they are saved or what their content is,
 etc).
 
 Robby
 
 On Mon, Apr 28, 2014 at 9:40 AM, Jens Axel Søgaard
 jensa...@soegaard.net wrote:
 From time to time the topic of refactoring pop up on the mailing list.
 
 Here is one feature I'd like:
After renaming an exported identifier in a module foo,
any references to the identifier in external modules need
to be renamed too. DrRacket could after renaming in foo is done,
 ask for a folder in which to search for module that require foo and
 rename the identifier in those modules.
 
 
 --
 Jens Axel Søgaard
 
 _
  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] actionable items, was: comments on comments on learning Racket

2014-04-28 Thread Matthias Felleisen

Time to move it to a place easy to find? But why a macro? 


On Apr 28, 2014, at 1:10 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:

 On 04/28/2014 10:08 AM, Laurent wrote:
 On Mon, Apr 28, 2014 at 3:47 PM, Matthias Felleisen
 matth...@ccs.neu.edu mailto:matth...@ccs.neu.edu wrote:
 [...]
 
 Why not something like `apply-list` or `apply/list`?
 (personally I usually call it `cvl` for call/values-list, but that's
 because I often use it on the command line, which makes going from `(foo
 'a 'b 'c)` to `(cvl foo 'a 'b 'c)` effortless)
 
 (define (nth-return-value i f . s)
   (call-with-values
(lambda () (apply f s))
(lambda l (list-ref l i
 
 unstable/list has an unexported 'values-list' macro that takes an expression 
 and returns the list of values it produces.
 
 Ryan
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev


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


[racket-dev] comments on comments on learning Racket

2014-04-26 Thread Matthias Felleisen

I have been re-reading the notes on Artyom.me's site, taking notes. Few 
question his comments, some suggest reactions that should come from us, others 
are personal musings. 

I know this is a bit of a brain dump but I find this person's thoughts 
worthwhile for us (devs). 


Notes on Learning Racket by Artyom 
How to get a Haskellian like Artyom to fall in love with Racket at first sight.

;; -
** What does it mean to say , or get guidance? 

Where should people get guidance? What about? 
Avoid useless words. 

** The REPL section in the Guide must open with (+ 1 1) 

** tab completion must be faster 

** can we force the help corner[1] to show up for beginners? 
   (the first five hours of using a raw DrRacket or you pay us 50 bucks.) 

   The WOW #2 should come right away. 
   
** can we get the help corner to show up for things at the DrRacket repl? 

** How can we get the help corner show anything about module-locally defined
   identifiers (defined in this module would be a good start) or imported
   identifiers (imported from module X) and if it goes thru a contract-out,
   the help corner may even say something (with contract (- integer? 
integer?))
 
?? I don't get the Uniform syntax is harder to read comment. More
   highlighting, hmph? 

** do we need to get across racket/base more quickly?
   (so that a hello world program executable looks smaller.)

[:~/Tmp] matthias% du helloworld
1664helloworld

** This chapter [1 of Guide] was small and boring. Next, please!
   We need to spice up the first chapter of 

!! HAH! The Undefined value shows up in his blog, not even half way down. 

** Should we provide a 'where' form? 

** He wants an Arc-style lambda function. Hmph. 

?? How did the kid get (apply and ...) to work? Was I asleep? 

(( He doesn't know what type safety is. I understand that C++ers don't get
   it. Why do Haskellians don't get it? ))

** People want overloading. ( hello hello world) should work. Hmph. 

** When we introduce for/list we should explain it directly, in words. 

** I do get jealous when I see 

 [(i, j, k) | i - [1..10], j - [i..10], k - [j..10], i^2 + j^2 == k^2]

vs

(for*/list ([i (range 1 20)] [j (range i 20)] [k (range j 20)] #:when (= (+ 
(sqr i) (sqr j)) (sqr k)))
(list i j k))

(using full width according to Racket style)

** The time-is-not-a-procedure thing is two misunderstandings in one: 
   -- we are in a by-value world 
   -- by the time were to reach the calls to factorial, it's evaluated
   Show 

   (for ((f (list f1 f2 f3 f4)))
(time (f 1))) 

  early? 

** Do we need to add these to our library? 

;; (X ... - Y ...) X *- [List-of Y]
(define (gather-return-values f . s)
  (call-with-values (lambda () (apply f s)) list))

;; Nat (X ... - Y ...) X *- Y
(define (nth-return-value i f . s)
  (call-with-values (lambda () (apply f s)) (lambda l (list-ref l i

** Printing is brutally expensive in DrRacket. Is there a way to make it
   cheaper? 

** Why does he think Performance sucks? 

** What is this about: 

   Support for functional paradigm is somewhere in the middle. Everything
   needed is there, but it's not very convenient to use. (I expect to stumble
   upon goodies/fp or haskell-racket module one day, but for now I won't be
   looking for it – I need to understand Racket's main paradigm before
   allowing myself to consciously deviate from it.)
   
   I am thinking of Racket as FP. 

** This 

   Given that reading every chapter of TRG raises lots of questions and
   provokes endless tinkering with not-quite-related concepts, I'll be
   happy if I manage to read as much as chapter 2.4. 

   means the Guide is the wrong kind of introduction for a functional
   Haskellian. 

** quote and friends should not show up in whatever replaces Guide for
   Functionalists 
   
;; -

[1] What do we call the thing that shows up at the top right? 


;; =
PART II 

** I see. 

   Some of our error messages are, well, real-world error messages. Like all
   compilers, they assume complete knowledge of the languages so when a novice
   makes a mistake, he gets, well, nothing out of it.

   Should we try our hands on a staged approach to learning the API for our
   world of syntax and compilation? (Old people would use the word 'macro'
   here.) 

** Why, why must everything be Inferior By Default?

   We obviously need a 'syntax story' that takes readers directly from
   define-syntax-rule to syntax-parse, bringing in hygiene only late, when it
   truly matters to raise expressiveness 

   Further down he writes But, but... It's wrong to spend a day hopping around
   only to write this. It's unsatisfactory. Things like this turn people into
   Hulks, y'know. Boy is he correct. 

   We need stories. 

** There's 

[racket-dev] pi, was: Re: [plt] Push #28592: master branch updated

2014-04-22 Thread Matthias Felleisen

On Apr 22, 2014, at 12:48 PM, ntoro...@racket-lang.org wrote:

 racket/collects/racket/extflonum.rkt
 
 --- OLD/racket/collects/racket/extflonum.rkt
 +++ NEW/racket/collects/racket/extflonum.rkt
 @@ -6,10 +6,12 @@
  (for-syntax racket/base))
 
 (provide (all-from-out '#%extfl)
 -
 + pi.t
  in-extflvector for/extflvector for*/extflvector
  extflvector-copy)
 
 +(define pi.t 3.1415926535897932385t0)
 +


I think we should dedicate this commit to Kate Bush's PI song (or vice versa?):

  https://www.youtube.com/watch?v=kZSHr5E7fZY



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


Re: [racket-dev] pi, was: Re: [plt] Push #28592: master branch updated

2014-04-22 Thread Matthias Felleisen

Kate Bush's song contains more digits of PI than your commit. What does Bagger 
288 do for Racket commits? :-) 


On Apr 22, 2014, at 1:55 PM, Neil Van Dyke n...@neilvandyke.org wrote:

 Matthias Felleisen wrote at 04/22/2014 01:37 PM:
 I think we should dedicate this commit to Kate Bush's PI song (or vice 
 versa?):
 
   https://www.youtube.com/watch?v=kZSHr5E7fZY
 
 Are Kate Bush dedications a slippery slope?  Software developers will tend to 
 work towards the metrics.  Soon the canonical Kate Bush catalog gets 
 exhausted, and some desperate programmer winds up coding Bagger 288.  
 http://www.youtube.com/watch?v=azEvfD4C6ow
 
 Neil V.
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev


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


Re: [racket-dev] Implementation question

2014-04-20 Thread Matthias Felleisen

Here is a more Racket-y version of this: 

#lang racket

(define (ping hostname port-no personalip)
  (define c (make-custodian))
  (define t
(parameterize ((current-custodian c))
  (thread
   (lambda ()
 (with-handlers ((exn:fail:network? 
  (lambda (x)
(printf ~a:~a ~a\n hostname port-no  NO
   (define-values (in out) (tcp-connect hostname port-no))
   (write 'ping out)
   (write personalip out)
   (flush-output out)
   (printf ~a:~a ~a\n hostname port-no (read in)))
  (sync/timeout 0.01 t)
  (custodian-shutdown-all c))




On Apr 20, 2014, at 10:41 AM, nicolas carraggi wrote:

 Hey guys,
 
 Thanks a lot for your quick answers!
 
 My ping method now:
 
 (define (ping hostname port-no personalip)
   (define t (thread
  (lambda ()
(with-handlers ((exn:fail:network? (lambda (x) (begin 
 (displayln (string-append hostname : (number-string port-no)  
 NOO)) #f;(displayln (exn-message x)
  (define-values (in out) (tcp-connect hostname port-no))
  (write 'ping out)
  (write personalip out)
  (flush-output out)
  (display (string-append hostname : (number-string 
 port-no)  ))
  (displayln (read in))
  (close-input-port in)
  (close-output-port out)
  #t
   (sync/timeout 0.01 t)
   (kill-thread t))
 
 +
 
 This is the result when I do a multicast from 192.168.1.0 to 192.168.1.200. ( 
 a lot of these don't exist and that's why tcp-connect was taking ages to 
 throw an error.) Those returning a NO are existing network nodes where no 
 server is running. Pong is the answer from the server running on my laptop.
 
  (multicast-ping 192.168.1.100 8080 0 200)
 192.168.1.0:8080 NOO
 192.168.1.105:8080 NOO
 192.168.1.108:8080 pong
 ---
 Multicast finished!
 
 +
 
 
 It's still test-code but it's working fine now, maybe the timout time is too 
 small but now it works well!
 
 Greetings,
 Nicolas
 
 Subject: Re: [racket-dev] Implementation question
 From: matth...@ccs.neu.edu
 Date: Sat, 19 Apr 2014 09:25:27 -0400
 CC: nicocarra...@hotmail.com; dev@racket-lang.org
 To: laurent.ors...@gmail.com
 
 
 Let me recommend events instead: 
 
 #lang racket
 
 ;; Nat - Void 
 ;; wait for t seconds before connecting to google.com, then stop
 (define (do-work t)
   (thread
(lambda ()
  (with-handlers ((exn:fail:network? (lambda (x) (displayln (exn-message 
 x)
(sleep t)
(define-values (in out) (tcp-connect google.com 80)) 
'done
 
 ;; returns #f if 3 seconds pass w/o the thread shutting down 
 (sync/timeout 3 (do-work (random 6)))
 
 
 
 On Apr 19, 2014, at 8:34 AM, Laurent wrote:
 
 One simpler possibility is to use `tcp-connect/enable-break` and run a timer 
 in parallel to break it after a shorter delay.
 For example:
 
 (define-values (in out) (values #f #f))
 
 (define connect-thread
   (thread
(λ()(set!-values (in out) 
 (tcp-connect www.google.com 80)
 
 (sleep 3)
 (unless in
   (displayln Connection not established. Breaking thread.)
   (break-thread connect-thread))
 
 The timer can also be place into its own thread if you need to set up several 
 connections in parallel.
 
 Hope this helps,
 Laurent
 
 
 On Thu, Apr 17, 2014 at 6:48 PM, nicolas carraggi nicocarra...@hotmail.com 
 wrote:
 Hello,
 
 I am actually using Racket/tcp for a project in Racket.
 I'm creating a peer-to-peer network but now I encountered a small problem.
 For a multicast I want to connect with each server on the same network. 
 For this I use tcp-connect, but when i try to connect to an ip address 
 which is not hosting a server, throwing the error only happens after more 
 than 1 minute. So I would like to use a modified tcp-connect with a smaller 
 time-out.
 
 Where can I find the implementation of tcp-connect?
 
 I already found tcp.rkt but there it gets the tcp-connect method from 
 '#%network but I can't find this one...
 
 Greetings!
 Nicolas
 
 _
   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] Regular expression types [was Re: [racket-bug] all/14455: wrong type for hash]

2014-04-20 Thread Matthias Felleisen

This might be one of those areas where we could 'generalize' gradual typing. 


On Apr 19, 2014, at 7:37 PM, Sam Tobin-Hochstadt wrote:

 On Sat, Apr 19, 2014 at 7:24 PM, Neil Toronto neil.toro...@gmail.com wrote:
 Are there type systems that can? It seems like you could specify this type
 and similar ones using regular expressions.
 
 There is lots of work on types for XML specification that can handle
 this sort of thing, I believe, but not specifically in the context of
 function arguments.
 
 Note that TR can handle alternating types just fine in lists, for
 example -- it's just that the function argument sequence is different.
 
 Sam
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] Regular expression types [was Re: [racket-bug] all/14455: wrong type for hash]

2014-04-20 Thread Matthias Felleisen

Sorry guys, I had something different in mind. 


When I ask people to port my typical 'Hell' code, I tend to 
suggest that all XML-related code should stay in Untyped. In 
most cases this kind of S-expression manipulation is hairy
from an ordinary TR pov but has a simple interface to the 
Typed world. It really is a case where typed-untyped cooperation
shines. 

But eventually such pieces of code should/could be typed too. 
For those cases, the XML type systems that Sam mentioned are
ideal and one day we may wish to develop a TR+XML (Xduce?) 
combination. 







On Apr 20, 2014, at 3:06 PM, Eric Dobson wrote:

 Asumu has a rough draft of a commit that would allow this to work, I
 don't know the current status though.
 
 https://github.com/plt/racket/pull/564
 
 I was thinking about the problem and I think our current union types
 and recursive types covers a lot of ground.
 
 For example as one user wanted to do, exactly one vector and bunch of
 numbers: (Rec T (U (Cons (Vectorof Real) (Listof Real)) (Cons Real
 T))).
 
 
 On Sun, Apr 20, 2014 at 11:38 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 This might be one of those areas where we could 'generalize' gradual typing.
 
 
 On Apr 19, 2014, at 7:37 PM, Sam Tobin-Hochstadt wrote:
 
 On Sat, Apr 19, 2014 at 7:24 PM, Neil Toronto neil.toro...@gmail.com 
 wrote:
 Are there type systems that can? It seems like you could specify this type
 and similar ones using regular expressions.
 
 There is lots of work on types for XML specification that can handle
 this sort of thing, I believe, but not specifically in the context of
 function arguments.
 
 Note that TR can handle alternating types just fine in lists, for
 example -- it's just that the function argument sequence is different.
 
 Sam
 _
 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] Implementation question

2014-04-19 Thread Matthias Felleisen

Let me recommend events instead: 

#lang racket

;; Nat - Void 
;; wait for t seconds before connecting to google.com, then stop
(define (do-work t)
  (thread
   (lambda ()
 (with-handlers ((exn:fail:network? (lambda (x) (displayln (exn-message 
x)
   (sleep t)
   (define-values (in out) (tcp-connect google.com 80)) 
   'done

;; returns #f if 3 seconds pass w/o the thread shutting down 
(sync/timeout 3 (do-work (random 6)))



On Apr 19, 2014, at 8:34 AM, Laurent wrote:

 One simpler possibility is to use `tcp-connect/enable-break` and run a timer 
 in parallel to break it after a shorter delay.
 For example:
 
 (define-values (in out) (values #f #f))
 
 (define connect-thread
   (thread
(λ()(set!-values (in out) 
 (tcp-connect www.google.com 80)
 
 (sleep 3)
 (unless in
   (displayln Connection not established. Breaking thread.)
   (break-thread connect-thread))
 
 The timer can also be place into its own thread if you need to set up several 
 connections in parallel.
 
 Hope this helps,
 Laurent
 
 
 On Thu, Apr 17, 2014 at 6:48 PM, nicolas carraggi nicocarra...@hotmail.com 
 wrote:
 Hello,
 
 I am actually using Racket/tcp for a project in Racket.
 I'm creating a peer-to-peer network but now I encountered a small problem.
 For a multicast I want to connect with each server on the same network. 
 For this I use tcp-connect, but when i try to connect to an ip address 
 which is not hosting a server, throwing the error only happens after more 
 than 1 minute. So I would like to use a modified tcp-connect with a smaller 
 time-out.
 
 Where can I find the implementation of tcp-connect?
 
 I already found tcp.rkt but there it gets the tcp-connect method from 
 '#%network but I can't find this one...
 
 Greetings!
 Nicolas
 
 _
   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] Catching the undefined value

2014-04-19 Thread Matthias Felleisen

Morally TR ought to report the type of this x as empty set, 
which would inform you that the else branch is unreachable: 

  (letrec ([x : Integer (if #t 0 x)]) x)

One day we may wish to augment syntax check in TR so that 
programmers can read of the reconstructed types for interior 
expressions. 

-- Matthias







On Apr 19, 2014, at 3:26 PM, Robby Findler wrote:

 Ah. There are other approaches to this problem that result in
 compile-time errors for such programs. Maybe the TR guys will adopt
 one or figure out a better one! But for regular ole Racket, we're
 stuck with a runtime error, I'm afraid.
 
 Robby
 
 On Sat, Apr 19, 2014 at 2:04 PM, Gustavo Massaccesi gust...@oma.org.ar 
 wrote:
 (letrec ([x (if #t 8 x)]) x) ;==8
 
 It was a mistake. I thought that the “x: undefined; ...” error was an
 expansion-time error, not a run-time error.
 
 (I expected an error, because the x in the else part is “undefined”,
 even if it’s never accessed.)
 
 Gustavo
 
 
 On Sat, Apr 19, 2014 at 1:02 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 These seem correct to me. What were you expecting (and why?).
 
 Robby
 
 
 On Saturday, April 19, 2014, Gustavo Massaccesi gust...@oma.org.ar wrote:
 
 I found another problem with the optimizer and the new undefined behavior.
 
 (letrec ([x (if #t 8 x)]) x) ;==8
 
 I also consider this correct in a strange sense :).
 
 Gustavo
 
 
 Welcome to Racket v6.0.1.4.
 (letrec ([x x]) x)
 x: undefined;
 cannot use before initialization
  context...:
   C:\Program Files\Racket-6.0.1.4\collects\racket\private\misc.rkt:87:7
 (letrec ([x 5]) x)
 5
 (letrec ([x (if #t 8 x)]) x)
 8
 (letrec ([x (if #f 8 x)]) x)
 x: undefined;
 cannot use before initialization
  context...:
   C:\Program Files\Racket-6.0.1.4\collects\racket\private\misc.rkt:87:7
 
 
 
 On Wed, Apr 16, 2014 at 10:09 AM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 Ah, too bad:
 
 pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl
 ~~~
 --- OLD/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl
 +++ NEW/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl
 @@ -3416,5 +3416,16 @@
  (read (open-input-bytes (get-output-bytes o))
 
 ;; 
 +;; Check that an unsufe opertion's argument is
 +;; not optimized away if it's a use of
 +;; a variable before definition:
 +
 +(err/rt-test (let ()
 +   (unsafe-fx+ x 1)
 +   (define x 3)
 +   x)
 + exn:fail:contract:variable?)
 +
 +;; 
 
 
 :-)
 
 On Apr 16, 2014, at 9:02 AM, Matthias Felleisen matth...@ccs.neu.edu
 wrote:
 
 
 On Apr 15, 2014, at 9:29 PM, Asumu Takikawa as...@ccs.neu.edu wrote:
 
 On 2014-04-15 18:13:31 -0400, claire alvis wrote:
 The push below includes changes to letrec expressions, internal
 definitions, units, classes, and certain ill-formed shared
 expressions so
 that they no longer leak the `undefined' value.
 
 This is great! (especially happy that TR, even with classes, doesn't
 have to worry about #undefined anymore)
 
 BTW, I found this weird behavior:
 
 Welcome to Racket v6.0.1.3.
 - (require racket/unsafe/ops)
 - (let () (+ x 3) (define x 3) 5)
 ; x: variable used before its definition [,bt for context]
 - (let () (unsafe-fx+ x 3) (define x 3) 5)
 5
 
 
 I consider this correct in a strange sense.
 
 Interestingly enough,
 
 (let () (displayln  (unsafe-fx+ x 3)) (define x 3) 5)
 x: variable used before its definition
 context...:
  /Users/matthias/plt/racket/collects/racket/private/misc.rkt:87:7
 
 which is good too. I don't know how Claire and Matthew did this,
 but it's good :-)
 _
 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


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


Re: [racket-dev] Catching the undefined value

2014-04-19 Thread Matthias Felleisen

On Apr 19, 2014, at 5:57 PM, Sam Tobin-Hochstadt wrote:

 On Sat, Apr 19, 2014 at 4:45 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 Morally TR ought to report the type of this x as empty set,
 which would inform you that the else branch is unreachable:
 
  (letrec ([x : Integer (if #t 0 x)]) x)
 
 I don't think that's right -- the else branch is unreachable, but
 that's not a fact about the type of `x` in particular, any more than
 it's a fact about the type of `+` if it was used in the else branch.


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


Re: [racket-dev] class implementation and make-primitive-class

2014-04-18 Thread Matthias Felleisen

If a function takes 28 arguments, you probably overlooked a dozen or so. -- 
freely paraphrasing Perlis 

And you just made the best case for Typed Racket and the documentation argument 
:-) -- freely paraphrasing my own TR talk 


On Apr 17, 2014, at 2:49 PM, dfel...@ccs.neu.edu wrote:

 For a course project I've been working on adding generators to contracts for 
 use with contract-random-generate, and I've been trying to construct classes 
 and objects from simple object/c contracts. When trying to find a way to 
 functionally create a class at runtime, I came across the 
 `make-primitive-class` function in class-internal.rkt. 
 
 This function is exported, and available at a plain racket repl, but has no 
 documentation that I have been able to find and the comments about it in 
 class-internal.rkt seem to be incorrect. 
 
 Trying to call it from the repl has problems also, for example (ignoring for 
 a moment that the arguments aren't of the expected types)
 
 - (make-primitive-class #f #f 'foo object% null #f null null null null)
 ; compose-class: arity mismatch;
 ;  the expected number of arguments does not match the given number
 ;   expected: 28
 ;   given: 27
 
 The definition is in terms of compose-class and is just missing a `null` 
 argument for the abstract-names, but even after fixing that in my local 
 branch there is a discrepancy with the comments regarding it's first argument 
 `make-struct:prim`. 
 
 ; The `make-struct:prim' function takes prop:object, a class,
  ;  a preparer, a dispatcher function, an unwrap property,
  ;  an unwrapper, and a property assoc list, and produces:
  ;* a struct constructor (must have prop:object)
  ;* a struct predicate
  ;* a struct type for derived classes (mustn't have prop:object)
  ;
  ; The supplied preparer takes a symbol and returns a num.
  ; 
  ; The supplied dispatcher takes an object and a num and returns a method.
  ;
  ; The supplied unwrap property is used for adding the unwrapper
  ;  as a property value on new objects.
  ;
  ; The supplied unwrapper takes an object and returns the unwrapped
  ;  version (or the original object).
  ;
  ; When a primitive class has a superclass, the struct:prim maker
  ;  is responsible for ensuring that the returned struct items match
  ;  the supertype predicate.
 
 This suggests that make-struct:prim should take 7 arguments, but passing a 
 function of 7 arguments to it from the repl produces:
 
 - (make-primitive-class (lambda (a b c d e f g) (values #f #f #f)) #f 'foo 
 object% null #f null null null null)
 ; #procedure: arity mismatch;
 ;  the expected number of arguments does not match the given number
 ;   expected: 7
 ;   given: 5
 
 Also as far as I can tell `make-primitive-class` is never used in the code 
 base, it is defined in class-internal.rkt, but can be commented out without 
 seeming to break anything else. Does anyone know if there is a purpose for 
 this function, or if there is documentation somewhere on the functions I need 
 to pass it in order to construct a class. I think I'm starting to get a 
 better idea of how it might work from reading more of class-internal.rkt and 
 how the class* macro expands, but any guidance would be appreciated.
 
 Thanks
 Dan
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


[racket-dev] Fwd: [racket] canonical index of Racket courses? [was: Summer programs learning Racket for a student]

2014-04-17 Thread Matthias Felleisen

Would someone volunteer please to create and maintain such a page for Racket? 
Thanks -- Matthias




Begin forwarded message:

 From: j...@math.brown.edu
 Subject: [racket] canonical index of Racket courses? [was: Summer programs 
 learning Racket for a student]
 Date: April 16, 2014 4:45:30 PM EDT
 To: Racket Users us...@racket-lang.org
 
 I recently asked here about in-person Racket courses available this summer 
 which I could recommend to a student I've been tutoring. (Thanks again to 
 everyone who let me know about their courses so far.)
 
 To make this info easier to find, I'm wondering if the racket-lang.org 
 maintainers would be interested in publishing a canonical index of Racket 
 courses (both online and in-person) linked off the Community or Learning 
 sections on the homepage, and inviting the community to add to it.
 
 (Similarly, linking to a canonical index of Racket meetup groups (à la 
 http://clojure.meetup.com/ and https://wiki.python.org/moin/LocalUserGroups)  
 would be great too. Google turned up http://racket.meetup.com/ but 2 of the 3 
 results there are for racket sports.)
 
 Thanks, and looking forward to knowing how to become better plugged into the 
 Racket community!
 
  Racket Users list:
  http://lists.racket-lang.org/users

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


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

2014-04-16 Thread Matthias Felleisen

Yuck. 

On Apr 15, 2014, at 9:20 PM, as...@racket-lang.org wrote:

 asumu has updated `master' from aa43797b63 to 9aaaf98b32.
  http://git.racket-lang.org/plt/aa43797b63..9aaaf98b32
 
 =[ One Commit ]=
 Directory summary:
  97.6% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/
 
 ~~
 
 9aaaf98 Asumu Takikawa as...@racket-lang.org 2014-04-15 21:15
 :
 | Fix TR class support for new class expansion
 |
 | Also add a type for `check-not-unsafe-undefined` which shows
 | up in the expanded code now.
 :
  M .../typed-racket/base-env/base-env.rkt|   4 +
  M .../typed-racket/typecheck/check-class-unit.rkt   | 100 ---
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt
 ~~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-env.rkt
 @@ -6,6 +6,7 @@
  (for-template
   (except-in racket - -* one-of/c class)
   racket/unsafe/ops
 +  racket/unsafe/undefined
   ;(only-in rnrs/lists-6 fold-left)
   '#%paramz
   extra-procs.rkt
 @@ -2716,6 +2717,9 @@
 [unsafe-struct-set! top-func]
 [unsafe-struct*-set! top-func]
 
 +;; Section 17.4 (Unsafe Undefined)
 +[check-not-unsafe-undefined (-poly (a) (- a -Symbol a))]
 +
 ;; Section 18.2 (Libraries and Collections)
 [find-library-collection-paths (-opt [(-lst -Pathlike) (-lst -Pathlike)] 
 (-lst -Path))]
 [collection-file-path (-* (list -Pathlike) -Pathlike -Path)]
 
 pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt
 ~~~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt
 @@ -151,7 +151,7 @@
   :make-methods-body
 
 (define-syntax-class class-expansion
 -  #:literals (let-values letrec-syntaxes+values #%plain-app)
 +  #:literals (let-values letrec-syntaxes+values #%plain-app quote)
   #:attributes (superclass-expr
 type-parameters
 all-init-internals
 @@ -176,13 +176,15 @@
   ()
   ((() ;; residual class: data
:internal-class-data))
 -  (let-values (((superclass:id) superclass-expr)
 -   ((interfaces:id) interface-expr))
 -(#%plain-app
 - compose-class:id
 - internal:expr ...
 - (~and make-methods :make-methods-class)
 - (quote #f)))
 +  (#%plain-app
 +   compose-class:id
 +   name:expr
 +   superclass-expr:expr
 +   interface-expr:expr
 +   internal:expr ...
 +   (~and make-methods :make-methods-class)
 +   (quote :boolean)
 +   (quote #f))
 
 ;; This is similar to `type-declaration` from internal-forms.rkt, but
 ;; the expansion is slightly different in a class so we use this instead.
 @@ -517,15 +519,20 @@
 #:literals (:-augment)
 ;; FIXME: this case seems too loose, many things can match this syntax
 ;;we likely need to set a property or match against another 
 name
 -[(let-values ([(obj:id) self])
 -   (let-values ([(field:id) initial-value])
 - (#%plain-app setter:id _ _)))
 +[(begin
 +   (quote ((~datum declare-field-assignment) _))
 +   (let-values ([(obj:id) self])
 +(let-values ([(field:id) initial-value])
 +  (#%plain-app setter:id _ _
  ;; only record the first one, which is the one that initializes
  ;; the field or private field
  (unless (dict-has-key? initializers #'setter)
(free-id-table-set! initializers #'setter #'initial-value))
  other-exprs]
 -[:tr:class:super-new^
 +;; The second part of this pattern ensures that we find the actual
 +;; initialization call, rather than the '(declare-super-new) in
 +;; the expansion.
 +[(~and :tr:class:super-new^ (#%plain-app . rst))
  (when super-new
(tc-error/delayed typed classes must only call super-new a single 
 time))
  (set! super-new (find-provided-inits expr))
 @@ -830,8 +837,6 @@
 super-call-types
 pubment-types augment-types inner-types))
   (values all-names all-types
 -  ;; FIXME: consider removing method names and types
 -  ;;from top-level environment to avoid undefined
   (append all-names
   localized-init-names
   

Re: [racket-dev] Catching the undefined value

2014-04-16 Thread Matthias Felleisen

On Apr 15, 2014, at 9:29 PM, Asumu Takikawa as...@ccs.neu.edu wrote:

 On 2014-04-15 18:13:31 -0400, claire alvis wrote:
 The push below includes changes to letrec expressions, internal
 definitions, units, classes, and certain ill-formed shared expressions so
 that they no longer leak the `undefined' value.
 
 This is great! (especially happy that TR, even with classes, doesn't
 have to worry about #undefined anymore)
 
 BTW, I found this weird behavior:
 
  Welcome to Racket v6.0.1.3.
  - (require racket/unsafe/ops)
  - (let () (+ x 3) (define x 3) 5)
  ; x: variable used before its definition [,bt for context]
  - (let () (unsafe-fx+ x 3) (define x 3) 5)
  5


I consider this correct in a strange sense. 

Interestingly enough, 

 (let () (displayln  (unsafe-fx+ x 3)) (define x 3) 5)
x: variable used before its definition
  context...:
   /Users/matthias/plt/racket/collects/racket/private/misc.rkt:87:7

which is good too. I don't know how Claire and Matthew did this, 
but it's good :-) 
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Catching the undefined value

2014-04-16 Thread Matthias Felleisen

Ah, too bad: 

 pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl
 ~~~
 --- OLD/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl
 +++ NEW/pkgs/racket-pkgs/racket-test/tests/racket/optimize.rktl
 @@ -3416,5 +3416,16 @@
   (read (open-input-bytes (get-output-bytes o))
 
 ;; 
 +;; Check that an unsufe opertion's argument is
 +;; not optimized away if it's a use of
 +;; a variable before definition:
 +
 +(err/rt-test (let ()
 +   (unsafe-fx+ x 1)
 +   (define x 3)
 +   x)
 + exn:fail:contract:variable?)
 +
 +;; 


:-) 

On Apr 16, 2014, at 9:02 AM, Matthias Felleisen matth...@ccs.neu.edu wrote:

 
 On Apr 15, 2014, at 9:29 PM, Asumu Takikawa as...@ccs.neu.edu wrote:
 
 On 2014-04-15 18:13:31 -0400, claire alvis wrote:
 The push below includes changes to letrec expressions, internal
 definitions, units, classes, and certain ill-formed shared expressions so
 that they no longer leak the `undefined' value.
 
 This is great! (especially happy that TR, even with classes, doesn't
 have to worry about #undefined anymore)
 
 BTW, I found this weird behavior:
 
 Welcome to Racket v6.0.1.3.
 - (require racket/unsafe/ops)
 - (let () (+ x 3) (define x 3) 5)
 ; x: variable used before its definition [,bt for context]
 - (let () (unsafe-fx+ x 3) (define x 3) 5)
 5
 
 
 I consider this correct in a strange sense. 
 
 Interestingly enough, 
 
 (let () (displayln  (unsafe-fx+ x 3)) (define x 3) 5)
 x: variable used before its definition
  context...:
   /Users/matthias/plt/racket/collects/racket/private/misc.rkt:87:7
 
 which is good too. I don't know how Claire and Matthew did this, 
 but it's good :-) 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev

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


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

2014-04-16 Thread Matthias Felleisen

Can we make sure that some warning appears on the entire page so that nobody 
loses track of this? A linked margin note every 10 lines would be fine. 


On Apr 16, 2014, at 2:59 PM, as...@racket-lang.org wrote:

 asumu has updated `master' from d212fc7eba to d6a3d27e54.
  http://git.racket-lang.org/plt/d212fc7eba..d6a3d27e54
 
 =[ One Commit ]=
 Directory summary:
 100.0% 
 pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/
 
 ~~
 
 d6a3d27 Asumu Takikawa as...@racket-lang.org 2014-04-15 18:09
 :
 | Mark class support as experimental in the TR docs
 |
 | Please merge to v6.0.1
 :
  M .../typed-racket/scribblings/reference/typed-classes.scrbl   | 5 +
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 ~~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 @@ -13,6 +13,11 @@
 
 @title{Typed Classes}
 
 +@bold{Warning}: the features described in this section are experimental
 +and may not work correctly. Some of the features will change by
 +the next release. In particular, typed-untyped interaction for classes
 +will not be backwards compatible so do not rely on the current semantics.
 +
 Typed Racket provides support for object-oriented programming with
 the classes and objects provided by the @racketmodname[racket/class]
 library.


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


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

2014-04-16 Thread Matthias Felleisen

This one's different, given our discussion while you were flying home. 


On Apr 16, 2014, at 6:07 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 That seems quite drastic.  For the `unstable` collection, it's worked
 fine just having the warning at the top of each page.
 
 Sam
 
 On Wed, Apr 16, 2014 at 6:07 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 Can we make sure that some warning appears on the entire page so that nobody 
 loses track of this? A linked margin note every 10 lines would be fine.
 
 
 On Apr 16, 2014, at 2:59 PM, as...@racket-lang.org wrote:
 
 asumu has updated `master' from d212fc7eba to d6a3d27e54.
 http://git.racket-lang.org/plt/d212fc7eba..d6a3d27e54
 
 =[ One Commit ]=
 Directory summary:
 100.0% 
 pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/
 
 ~~
 
 d6a3d27 Asumu Takikawa as...@racket-lang.org 2014-04-15 18:09
 :
 | Mark class support as experimental in the TR docs
 |
 | Please merge to v6.0.1
 :
 M .../typed-racket/scribblings/reference/typed-classes.scrbl   | 5 +
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 ~~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 @@ -13,6 +13,11 @@
 
 @title{Typed Classes}
 
 +@bold{Warning}: the features described in this section are experimental
 +and may not work correctly. Some of the features will change by
 +the next release. In particular, typed-untyped interaction for classes
 +will not be backwards compatible so do not rely on the current semantics.
 +
 Typed Racket provides support for object-oriented programming with
 the classes and objects provided by the @racketmodname[racket/class]
 library.
 
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


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

2014-04-16 Thread Matthias Felleisen

TOOR is not in /unstable/. I am with Robby here. Make sure people know. 


On Apr 16, 2014, at 6:15 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 No, I think it's very much the same -- like unstable, changes to the
 type system for classes may cause programs that worked (accidentally)
 in 6.0.1 to stop working later.  The situtation with `unstable` is in
 fact more unstable, since the interface may change or disappear
 entirely.
 
 Sam
 
 On Wed, Apr 16, 2014 at 6:12 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 This one's different, given our discussion while you were flying home.
 
 
 On Apr 16, 2014, at 6:07 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
 That seems quite drastic.  For the `unstable` collection, it's worked
 fine just having the warning at the top of each page.
 
 Sam
 
 On Wed, Apr 16, 2014 at 6:07 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 Can we make sure that some warning appears on the entire page so that 
 nobody loses track of this? A linked margin note every 10 lines would be 
 fine.
 
 
 On Apr 16, 2014, at 2:59 PM, as...@racket-lang.org wrote:
 
 asumu has updated `master' from d212fc7eba to d6a3d27e54.
 http://git.racket-lang.org/plt/d212fc7eba..d6a3d27e54
 
 =[ One Commit ]=
 Directory summary:
 100.0% 
 pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/
 
 ~~
 
 d6a3d27 Asumu Takikawa as...@racket-lang.org 2014-04-15 18:09
 :
 | Mark class support as experimental in the TR docs
 |
 | Please merge to v6.0.1
 :
 M .../typed-racket/scribblings/reference/typed-classes.scrbl   | 5 +
 
 =[ Overall Diff ]===
 
 pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 ~~
 --- 
 OLD/pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 +++ 
 NEW/pkgs/typed-racket-pkgs/typed-racket-doc/typed-racket/scribblings/reference/typed-classes.scrbl
 @@ -13,6 +13,11 @@
 
 @title{Typed Classes}
 
 +@bold{Warning}: the features described in this section are experimental
 +and may not work correctly. Some of the features will change by
 +the next release. In particular, typed-untyped interaction for classes
 +will not be backwards compatible so do not rely on the current semantics.
 +
 Typed Racket provides support for object-oriented programming with
 the classes and objects provided by the @racketmodname[racket/class]
 library.
 
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev
 


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


Re: [racket-dev] Thank you DrDr, thank you!

2014-04-15 Thread Matthias Felleisen

+1


On Apr 15, 2014, at 4:32 PM, John Clements cleme...@brinckerhoff.org wrote:

 This is a short thank-you note; thanks to DrDr, I caught a bug in the 
 interaction of the test-engine and the stepper two weeks ago, rather than at 
 release time. Thanks! CI is awesome.
 
 John
 
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] Changing the default error display handler to use

2014-03-14 Thread Matthias Felleisen

I wonder whether we could collect the information on these
parameters and nail down their interaction constraints somehow.
(This could be a research project.) 




On Mar 13, 2014, at 9:34 PM, Matthew Flatt wrote:

 At Wed, 12 Mar 2014 18:05:03 -0700, Eric Dobson wrote:
 A common issue I have is that the default error handler does not
 display error message's exn:srcloc if it has it [...]
 
 Is this reasonable to add to the default error handler, and if so do
 people have suggestions on the format?
 
 You mean the default error display handler, right?
 
 I think this change may be worth a try, but there are many
 exception-generating, exception-handling, and exception-printing
 parameters to worry about, both in their interactions and how they're
 currently used.
 
 For example, does DrRacket use the default error display handler? If
 so, it will start printing source locations that it's already showing a
 different way, and I think that's not what you intend. Or some other
 program harness might be worse off if the default display error handler
 starts showing source locations. Then again, the whole point is that
 you want to change the display of errors. Trying to change some things
 and not changes others --- and having enough extension points to
 accommodate certain combinations of changes and non-changes --- is why
 the existing set of parameters and handlers is complex. I will not be
 surprised if we end up with yet another parameter here.
 
 If the change makes sense, probably the handler should not print the
 first returned source location for `exn:fail:read`, `exn:fail:syntax`,
 and `exn:fail:contract:variable` exceptions --- because that location
 is supposed to be built into the error-message text, unless the
 `error-print-source-location` parameter has a false value. Awkward, I
 know; see the previous paragraph.
 
 The right format is likely to print an extra field: detail,
 similar to the way that the default error display handler prints
 context lines (if the `error-context-display-depth` parameter is not
 0). I imagine that the source-location lines should precede the context
 lines, but follow the exception's error message.
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev

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


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

2014-02-21 Thread Matthias Felleisen

On Feb 21, 2014, at 7:42 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 Since Asumu didn't mention it, the first paper about this is here: 
 http://www.ccs.neu.edu/racket/pubs/oopsla12-tsdthf.pdf


Yeah, but don't read this. We will share a draft paper that looks more 
practical if you want to try it out. 
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] xlsx file parser

2014-01-31 Thread Matthias Felleisen

Place it on 

 http://pkgs.racket-lang.org/#(!main-distribution)(!main-tests)

which is the new package server. It's particularly easy if you developed on 
Github. 


On Jan 30, 2014, at 10:38 PM, Chen Xiao wrote:

 Hi, guys:
 
 I wrote a office xlsx file parser. I wonder where place it? Can I commit 
 it to racket core source? Or place it on planet?
 
 Chen Xiao
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] release notes draft

2014-01-13 Thread Matthias Felleisen

I would omit 'now' (that's the whole point of a release announcement) and I'd 
avoid the dangling comparison with 

 the Typed Racket compilation improved by 50% on some typed programs; 
 see http:// ... 






On Jan 13, 2014, at 11:43 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 Looks good.
 
 On Mon, Jan 13, 2014 at 11:40 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 How about this bullet:
 
 * Typed Racket is now 50% faster when type checking some programs.
   For example: http://bit.ly/1d0Ye4z
 
 
 
 On Mon, Jan 13, 2014 at 9:56 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu
 wrote:
 
 The graph is at:
 
 http://drdr.racket-lang.org/28051/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/new-metrics.rkt
 
 Sam
 
 On Mon, Jan 13, 2014 at 10:39 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Okay, new version below. Thanks!
 
 If there is a drdr graph that shows the 50% jump, I'd like to add that
 pointer into the notes in the bullet you added, eg:
 
 * Typed Racket is now 50% faster when type checking some large
   programs. See, for example:
 http://drdr.racket-lang.org/./bigfile.rkt
 
 Robby
 
 
 Racket 5.92 has a new package system, including a catalog of
 hundreds of already-available packages. Please visit
 
 http://pkgs.racket-lang.org/
 
 for an overview of the packages.
 
 Recent releases included the beta versions of the package system.
 Racket version 6.0 incorporates many improvements suggested by these
 preliminary experiences:
 
 * A package is treated as a single collection by default, so it is even
   easier to use a Github repository as a package. Get started quickly:
 http://docs.racket-lang.org/pkg/getting-started.html
 
 * DrRacket includes a new package manager GUI, available via the
   File|Package Manager ... menu item. The GUI is also available
   as a stand-alone program via the gui-pkg-manager package.
 
 * The main Racket distribution has been separated into about 200
   packages. The Racket installer combines the core system with
   bundled versions of these packages.
 
   Alternatively, you may now install a Minimal Racket distribution ---
   which is about 1/10 the size of the main distribution --- and add
 only
   those packages that you need.
 
 * Package installation supports pre-built packages that include
   compiled byte code and rendered documentation, meaning packages can
 be
   installed quickly when built versions are a available. All packages
 in
   the main distribution are available in pre-built form.
 
 Further improvements are in the works, including package documentation
 on
 the package-catalog web site.
 
 COMPATIBILITY NOTE: PLaneT, the previous Racket package system,
 will remain in place for the foreseeable future, but we expect
 all package work to shift to the new system.
 
 Beyond the package system, this release brings a number of other
 changes:
 
 * Racket's HTML documentation has a new and improved look, thanks to
   Matthew Butterick.
 
 * Racket's JIT compiler supports the ARM architecture.
 
 * Racket supports the Mac's Retina display mode.
 
 * Typed Racket is now 50% faster when type checking some large
   programs.
 
 * The profiler provides a new mode that uses the errortrace library to
   produce fine-grained profiles.
 
 * A new contract profiler reports how much time programs spend checking
   contracts, and which contracts are most expensive.
 
 * The math/flonum library exports fast 105-bit precision operations.
 
 * Check Syntax handles generated identifiers, especially those
   introduced by struct (e.g. field selectors) and Redex (e.g., e_1,
 e_2)
 
 * 2htdp/batch-io includes functions for dealing with html/xml in files
 and
   web sites as X-expressions plus conveniences for web-based graph
 traversals.
 
 
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] release notes draft

2014-01-13 Thread Matthias Felleisen

Use 'compiler performance' 

Avoid 'faster' without 'than' 



On Jan 13, 2014, at 12:05 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 I don't like the use of compilation here, but I'm happy to drop now.
 
 Sam
 
 On Mon, Jan 13, 2014 at 12:02 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 I would omit 'now' (that's the whole point of a release announcement) and 
 I'd avoid the dangling comparison with
 
 the Typed Racket compilation improved by 50% on some typed programs;
 see http:// ...
 
 
 
 
 
 
 On Jan 13, 2014, at 11:43 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
 Looks good.
 
 On Mon, Jan 13, 2014 at 11:40 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 How about this bullet:
 
 * Typed Racket is now 50% faster when type checking some programs.
  For example: http://bit.ly/1d0Ye4z
 
 
 
 On Mon, Jan 13, 2014 at 9:56 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu
 wrote:
 
 The graph is at:
 
 http://drdr.racket-lang.org/28051/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/new-metrics.rkt
 
 Sam
 
 On Mon, Jan 13, 2014 at 10:39 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Okay, new version below. Thanks!
 
 If there is a drdr graph that shows the 50% jump, I'd like to add that
 pointer into the notes in the bullet you added, eg:
 
 * Typed Racket is now 50% faster when type checking some large
  programs. See, for example:
 http://drdr.racket-lang.org/./bigfile.rkt
 
 Robby
 
 
 Racket 5.92 has a new package system, including a catalog of
 hundreds of already-available packages. Please visit
 
 http://pkgs.racket-lang.org/
 
 for an overview of the packages.
 
 Recent releases included the beta versions of the package system.
 Racket version 6.0 incorporates many improvements suggested by these
 preliminary experiences:
 
 * A package is treated as a single collection by default, so it is even
  easier to use a Github repository as a package. Get started quickly:
http://docs.racket-lang.org/pkg/getting-started.html
 
 * DrRacket includes a new package manager GUI, available via the
  File|Package Manager ... menu item. The GUI is also available
  as a stand-alone program via the gui-pkg-manager package.
 
 * The main Racket distribution has been separated into about 200
  packages. The Racket installer combines the core system with
  bundled versions of these packages.
 
  Alternatively, you may now install a Minimal Racket distribution ---
  which is about 1/10 the size of the main distribution --- and add
 only
  those packages that you need.
 
 * Package installation supports pre-built packages that include
  compiled byte code and rendered documentation, meaning packages can
 be
  installed quickly when built versions are a available. All packages
 in
  the main distribution are available in pre-built form.
 
 Further improvements are in the works, including package documentation
 on
 the package-catalog web site.
 
 COMPATIBILITY NOTE: PLaneT, the previous Racket package system,
 will remain in place for the foreseeable future, but we expect
 all package work to shift to the new system.
 
 Beyond the package system, this release brings a number of other
 changes:
 
 * Racket's HTML documentation has a new and improved look, thanks to
  Matthew Butterick.
 
 * Racket's JIT compiler supports the ARM architecture.
 
 * Racket supports the Mac's Retina display mode.
 
 * Typed Racket is now 50% faster when type checking some large
  programs.
 
 * The profiler provides a new mode that uses the errortrace library to
  produce fine-grained profiles.
 
 * A new contract profiler reports how much time programs spend checking
  contracts, and which contracts are most expensive.
 
 * The math/flonum library exports fast 105-bit precision operations.
 
 * Check Syntax handles generated identifiers, especially those
  introduced by struct (e.g. field selectors) and Redex (e.g., e_1,
 e_2)
 
 * 2htdp/batch-io includes functions for dealing with html/xml in files
 and
  web sites as X-expressions plus conveniences for web-based graph
 traversals.
 
 
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev
 


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


Re: [racket-dev] release notes draft

2014-01-13 Thread Matthias Felleisen

-- the performance of the Typed Racket compiler improved by 50% on some typed 
programs; see http://bit.ly/1d0Ye4z



 
  see http:// ...

On Jan 13, 2014, at 1:25 PM, Robby Findler ro...@eecs.northwestern.edu wrote:

 I'll wait for an actual new bullet here, if one of Sam/Matthias doesn't mind 
 writing it?
 
 Robby
 
 
 On Mon, Jan 13, 2014 at 11:06 AM, Matthias Felleisen matth...@ccs.neu.edu 
 wrote:
 
 Use 'compiler performance'
 
 Avoid 'faster' without 'than'
 
 
 
 On Jan 13, 2014, at 12:05 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
 wrote:
 
  I don't like the use of compilation here, but I'm happy to drop now.
 
  Sam
 
  On Mon, Jan 13, 2014 at 12:02 PM, Matthias Felleisen
  matth...@ccs.neu.edu wrote:
 
  I would omit 'now' (that's the whole point of a release announcement) and 
  I'd avoid the dangling comparison with
 
  the Typed Racket compilation improved by 50% on some typed programs;
  see http:// ...
 
 
 
 
 
 
  On Jan 13, 2014, at 11:43 AM, Sam Tobin-Hochstadt sa...@cs.indiana.edu 
  wrote:
 
  Looks good.
 
  On Mon, Jan 13, 2014 at 11:40 AM, Robby Findler
  ro...@eecs.northwestern.edu wrote:
  How about this bullet:
 
  * Typed Racket is now 50% faster when type checking some programs.
   For example: http://bit.ly/1d0Ye4z
 
 
 
  On Mon, Jan 13, 2014 at 9:56 AM, Sam Tobin-Hochstadt 
  sa...@cs.indiana.edu
  wrote:
 
  The graph is at:
 
  http://drdr.racket-lang.org/28051/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/new-metrics.rkt
 
  Sam
 
  On Mon, Jan 13, 2014 at 10:39 AM, Robby Findler
  ro...@eecs.northwestern.edu wrote:
  Okay, new version below. Thanks!
 
  If there is a drdr graph that shows the 50% jump, I'd like to add that
  pointer into the notes in the bullet you added, eg:
 
  * Typed Racket is now 50% faster when type checking some large
   programs. See, for example:
  http://drdr.racket-lang.org/./bigfile.rkt
 
  Robby
 
 
  Racket 5.92 has a new package system, including a catalog of
  hundreds of already-available packages. Please visit
 
  http://pkgs.racket-lang.org/
 
  for an overview of the packages.
 
  Recent releases included the beta versions of the package system.
  Racket version 6.0 incorporates many improvements suggested by these
  preliminary experiences:
 
  * A package is treated as a single collection by default, so it is even
   easier to use a Github repository as a package. Get started quickly:
 http://docs.racket-lang.org/pkg/getting-started.html
 
  * DrRacket includes a new package manager GUI, available via the
   File|Package Manager ... menu item. The GUI is also available
   as a stand-alone program via the gui-pkg-manager package.
 
  * The main Racket distribution has been separated into about 200
   packages. The Racket installer combines the core system with
   bundled versions of these packages.
 
   Alternatively, you may now install a Minimal Racket distribution ---
   which is about 1/10 the size of the main distribution --- and add
  only
   those packages that you need.
 
  * Package installation supports pre-built packages that include
   compiled byte code and rendered documentation, meaning packages can
  be
   installed quickly when built versions are a available. All packages
  in
   the main distribution are available in pre-built form.
 
  Further improvements are in the works, including package documentation
  on
  the package-catalog web site.
 
  COMPATIBILITY NOTE: PLaneT, the previous Racket package system,
  will remain in place for the foreseeable future, but we expect
  all package work to shift to the new system.
 
  Beyond the package system, this release brings a number of other
  changes:
 
  * Racket's HTML documentation has a new and improved look, thanks to
   Matthew Butterick.
 
  * Racket's JIT compiler supports the ARM architecture.
 
  * Racket supports the Mac's Retina display mode.
 
  * Typed Racket is now 50% faster when type checking some large
   programs.
 
  * The profiler provides a new mode that uses the errortrace library to
   produce fine-grained profiles.
 
  * A new contract profiler reports how much time programs spend checking
   contracts, and which contracts are most expensive.
 
  * The math/flonum library exports fast 105-bit precision operations.
 
  * Check Syntax handles generated identifiers, especially those
   introduced by struct (e.g. field selectors) and Redex (e.g., e_1,
  e_2)
 
  * 2htdp/batch-io includes functions for dealing with html/xml in files
  and
   web sites as X-expressions plus conveniences for web-based graph
  traversals.
 
 
 
  _
  Racket Developers list:
  http://lists.racket-lang.org/dev
 
 
 


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


Re: [racket-dev] release notes draft

2014-01-13 Thread Matthias Felleisen

faster than what? 


On Jan 13, 2014, at 1:32 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote:

 * Typed Racket is 50% faster when type checking some programs.
   For example: http://bit.ly/1d0Ye4z
 
 Sam
 
 On Mon, Jan 13, 2014 at 1:25 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 I'll wait for an actual new bullet here, if one of Sam/Matthias doesn't mind
 writing it?
 
 Robby
 
 
 On Mon, Jan 13, 2014 at 11:06 AM, Matthias Felleisen matth...@ccs.neu.edu
 wrote:
 
 
 Use 'compiler performance'
 
 Avoid 'faster' without 'than'
 
 
 
 On Jan 13, 2014, at 12:05 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu
 wrote:
 
 I don't like the use of compilation here, but I'm happy to drop now.
 
 Sam
 
 On Mon, Jan 13, 2014 at 12:02 PM, Matthias Felleisen
 matth...@ccs.neu.edu wrote:
 
 I would omit 'now' (that's the whole point of a release announcement)
 and I'd avoid the dangling comparison with
 
 the Typed Racket compilation improved by 50% on some typed programs;
 see http:// ...
 
 
 
 
 
 
 On Jan 13, 2014, at 11:43 AM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 
 Looks good.
 
 On Mon, Jan 13, 2014 at 11:40 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 How about this bullet:
 
 * Typed Racket is now 50% faster when type checking some programs.
 For example: http://bit.ly/1d0Ye4z
 
 
 
 On Mon, Jan 13, 2014 at 9:56 AM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu
 wrote:
 
 The graph is at:
 
 
 http://drdr.racket-lang.org/28051/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/new-metrics.rkt
 
 Sam
 
 On Mon, Jan 13, 2014 at 10:39 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 Okay, new version below. Thanks!
 
 If there is a drdr graph that shows the 50% jump, I'd like to add
 that
 pointer into the notes in the bullet you added, eg:
 
 * Typed Racket is now 50% faster when type checking some large
 programs. See, for example:
 http://drdr.racket-lang.org/./bigfile.rkt
 
 Robby
 
 
 Racket 5.92 has a new package system, including a catalog of
 hundreds of already-available packages. Please visit
 
 http://pkgs.racket-lang.org/
 
 for an overview of the packages.
 
 Recent releases included the beta versions of the package system.
 Racket version 6.0 incorporates many improvements suggested by
 these
 preliminary experiences:
 
 * A package is treated as a single collection by default, so it is
 even
 easier to use a Github repository as a package. Get started
 quickly:
   http://docs.racket-lang.org/pkg/getting-started.html
 
 * DrRacket includes a new package manager GUI, available via the
 File|Package Manager ... menu item. The GUI is also available
 as a stand-alone program via the gui-pkg-manager package.
 
 * The main Racket distribution has been separated into about 200
 packages. The Racket installer combines the core system with
 bundled versions of these packages.
 
 Alternatively, you may now install a Minimal Racket distribution
 ---
 which is about 1/10 the size of the main distribution --- and add
 only
 those packages that you need.
 
 * Package installation supports pre-built packages that include
 compiled byte code and rendered documentation, meaning packages
 can
 be
 installed quickly when built versions are a available. All
 packages
 in
 the main distribution are available in pre-built form.
 
 Further improvements are in the works, including package
 documentation
 on
 the package-catalog web site.
 
 COMPATIBILITY NOTE: PLaneT, the previous Racket package system,
 will remain in place for the foreseeable future, but we expect
 all package work to shift to the new system.
 
 Beyond the package system, this release brings a number of other
 changes:
 
 * Racket's HTML documentation has a new and improved look, thanks
 to
 Matthew Butterick.
 
 * Racket's JIT compiler supports the ARM architecture.
 
 * Racket supports the Mac's Retina display mode.
 
 * Typed Racket is now 50% faster when type checking some large
 programs.
 
 * The profiler provides a new mode that uses the errortrace library
 to
 produce fine-grained profiles.
 
 * A new contract profiler reports how much time programs spend
 checking
 contracts, and which contracts are most expensive.
 
 * The math/flonum library exports fast 105-bit precision
 operations.
 
 * Check Syntax handles generated identifiers, especially those
 introduced by struct (e.g. field selectors) and Redex (e.g., e_1,
 e_2)
 
 * 2htdp/batch-io includes functions for dealing with html/xml in
 files
 and
 web sites as X-expressions plus conveniences for web-based graph
 traversals.
 
 
 
 _
 Racket Developers list:
 http://lists.racket-lang.org/dev
 
 
 


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


Re: [racket-dev] release notes draft

2014-01-13 Thread Matthias Felleisen

-- please no 'now's (every bullet in Vincent's wording includes it) 
-- didn't we say at some point we want to keep things short and point to longer 
on-line announcements? 




On Jan 13, 2014, at 5:04 PM, Robby Findler ro...@eecs.northwestern.edu wrote:

 Thanks!
 
 I didn't include the DrRacket one, since I have more plans for that and would 
 like to hold off announcing it until I get those things done (notably better 
 some color-blindness color schemes, but also other tweaks to make color 
 schemes just work better in general).
 
 Robby
 
 
 On Mon, Jan 13, 2014 at 2:44 PM, Vincent St-Amour stamo...@ccs.neu.edu 
 wrote:
 At Mon, 13 Jan 2014 12:25:06 -0600,
 Robby Findler wrote:
 
  [1  text/plain; UTF-8 (7bit)]
  On Mon, Jan 13, 2014 at 11:05 AM, Vincent St-Amour 
  stamo...@ccs.neu.eduwrote:
 
   These release notes look good to me, but maybe a bit short.
  
   Since this is our first release with new features since 5.3.4 last May,
   I would have expected a longer list. For example, during the previous
   release notes discussion, Jay and Neil had some bullets that I don't see
   on this list. There also were a lot more things in Robby's original
   email.
  
  
  I spoke with Neil privately about the changes and got some agreement and my
  list was not intended as a list of things that were all to be included.
 
  I probably just made a mistake: would you mind helping me fix it? A
  candidate bullet would be great!
 
 A few from your original list, in no particular order:
 
 * The `gen:set' generic interface extends set operations to work on
   user-defined types that implement set methods, as well as on other
   set-like built-in types, such as lists.
 
 * Picts can now be converted to the svg format.
 
 * Racket now provides desktop entries (.desktop files) for its graphical
   executables.
 
 * The documentation now includes a style guide: How to Program Racket.
 
 * DrRacket now provides support for color schemes.
 
   If we want to keep the announcement itself short, should we point to the
   various HISTORY.txt files where users can get more details?
  
  
  I'm happy to do this too, but less excited about it, especially since we've
  now got a much better mechanism that we can use in the next release and
  we've not done this past releases.
 
 No problem. With the bullets above, I think we have enough.
 
 Vincent
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] release notes draft

2014-01-12 Thread Matthias Felleisen

It would be nice if the docs url were functional. -- Matthias



On Jan 11, 2014, at 9:27 PM, Robby Findler wrote:

 Below is the latest release notes draft. Comments?
 
 Robby
 
 
 
 Racket has a new package system, including a catalog of already available
 packages. Please visit
 
  http://pkgs.racket-lang.org/
 
 for an overview.
 
 Recent releases included the beta versions of the package system.
 Racket version 6.0 incorporates many improvements suggested by these
 preliminary experiences:
 
  * A package is treated as a single collection by default, so it is even
easier to use a Github repository as a package. Get started quickly:
  http://docs.racket-lang.org/pkg/getting-started.html
 
  * DrRacket includes a new package manager GUI, which is also available
as a stand-alone program via the gui-pkg-manager package.
 
  * The main Racket distribution has been broken into about 200 packages. An
installation starts with Minimal Racket and then adds these bundled 
 packages.
 
Alternatively, you may now install a Minimal Racket distribution ---
which is about 1/10 the size of the main distribution --- and add only
those packages that you need.
 
  * Package installation supports pre-built packages that include
compiled byte code and rendered documentation, meaning packages can be
installed quickly when built versions are a available. All packages in
the main distribution are available in pre-built form.
 
 Further improvements are in the works, including package documentation on
 the package-catalog web site.
 
 COMPATIBILITY NOTE: PLaneT will remain in place for the foreseeable future,
 but we expect all package work to shift to the new system.
 
 Beyond the package system, this release brings a number of other changes:
 
  * Racket's HTML documentation has a new and improved look, thanks to
Matthew Butterick.
 
  * Racket's JIT compiler supports the ARM architecture.
 
  * Racket supports the Mac's Retina display mode.
 
  * The profiler provides a new mode that uses the errortrace library to
produce fine-grained profiles.
 
  * A new contract profiler reports how much time programs spend checking
contracts, and which contracts are most expensive.
 
  * The math/flonum library exports fast 105-bit precision operations.
 
  * Check Syntax handles generated identifiers, especially those
introduced by struct (e.g. field selectors) and Redex (e.g., e_1, e_2)
 
  * 2htdp/batch-io includes functions for dealing with html/xml in files and
web sites as X-expressions plus conveniences for web-based graph 
 traversals.
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev

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


[racket-dev] downtime

2013-12-28 Thread Matthias Felleisen

As some of you may have noticed, we experienced a day of downtime this week. 
It was due to a brief power outage and a slight misconfiguration of the server. 

Eli will filter the mail queues so that messages about the outage are kept to 
a minimum. 

-- Matthias


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


Re: [racket-dev] release notes

2013-12-20 Thread Matthias Felleisen

* 2htdp/batch-io includes functions for reading html/xml 
  from files and URLs as X-expressions plus some conveniences 
  for designing web-oriented graph traversals. 



On Dec 20, 2013, at 8:26 AM, Matthew Flatt mfl...@cs.utah.edu wrote:

 I've pushed some HISTORY.txt and documentation updates.
 
 Here are some draft blurbs for the release announcement:
 
 At Thu, 19 Dec 2013 20:41:25 -0600, Robby Findler wrote:
 Jay, Matthew: pkg improvements
 [...]
 Matthew, Robby: gui package manager
 
 Racket has a new package system and a catalog of packages at
 
 http://pkgs.racket-lang.org/
 
 The package system was included as beta in recent releases, but
 version 6.0 brings many improvements:
 
 * A package is treated by default as a single collection, so it's even
   easier to use a Github repository as a package.
 
 * DrRacket includes a new package manager GUI (which is also available
   as a stand-alone program via the gui-pkg-manager package).
 
 * The main Racket distribution has been broken into about 200
   packages. When you install the main Racket distribution, you're
   installing Minimal Racket plus those bundled packages.
 
   Alternatively, you can install a Minimal Racket distribution ---
   which is about 1/10 the size of the main distribution --- and then
   install just the packages that you want.
 
 * Package installation now supports pre-built packages that include
   compiled bytecode and rendered documentation, so that packages can
   be installed quickly when built versions are a available. All
   packages in the main distribution are available in pre-built form.
 
 * Many improvements and bug fixes in the package system make package
   management smoother, faster, and more reliable than ever.
 
 Further improvements are in the works, including the addition of
 package documentation for browsing on the package-catalog web site.
 
 The old PLaneT package system will remain in place for the foreseeable
 future, but we expect all package development and maintenance to shift
 to the new system.
 
 
 Matthew Butterick: New docs formatting
 
 * The Racket documentation in HTML form has a new and improved look,
   thanks to Matthew Butterick.
 
 
 Matthew: ARM JIT
 
 * Racket's JIT compiler now supports ARM.
 
 
 Matthew: Retina display support
 
 * Retina display mode is now supported for Macs.
 
 
 Ryan, Matthew: new .dlls included on Windows (is this visible to users? dll
 hell anyone?)
 
 Racket's DLLs are in a Racket-specific and installation-specific
 directory, so adding or changing DLLs is unlikely to affect other
 programs or installations.
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


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

2013-12-11 Thread Matthias Felleisen

On Dec 11, 2013, at 2:36 PM, Neil Toronto wrote:

 numeric primitives implemented in Typed Racket are faster than the same 
 primitives implemented in C.


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


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

2013-11-28 Thread Matthias Felleisen

Am I naive or isn't any download of any package opening the door to such 
tricks? 


On Nov 27, 2013, at 8:46 PM, Jay McCarthy wrote:

 On Wed, Nov 27, 2013 at 6:27 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 
 
 
 On Wed, Nov 27, 2013 at 7:21 PM, Jay McCarthy j...@racket-lang.org wrote:
 
 If I have background expansion on, then when I open that file it
 installs the package.
 
 
 As I wrote in my previous message, it doesn't do that for me. And I don't
 see how it could do that, actually. Are you saying that you tried this?
 
 Yes. I put that in a file and opened it up with DrRacket then got the
 Can't download a Planet package error message as-if the install were
 stopped.
 
 Can you explain how you have configured DrRacket to disable the security
 guard that is installed by the background expansion process, please?
 
 Perhaps my trial was bad because the security guard would have stopped
 the network access but my error stopped the library from attempting
 the network access?
 
 Regardless, Check Syntax (I think?) or compilation in Racket would
 have installed it. [Now, obviously the same macro tricks could
 explicitly call download/install-pkg... but I think it is a bit feeble
 to say Check Syntax should make no attempt to prevent package
 installation.]
 
 Meanwhile, I would like to point out that your commit has completely
 disabled planet. No packages can be installed. Did you run any test suites
 after making this change?
 
 I tried to install and fetch some packages. I see now that I committed
 in the racket/collects directory but the changes to make that work
 were in the pkgs/planet-pkgs directory so I stupidly missed them.
 
 Jay
 
 Robby
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


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

2013-11-26 Thread Matthias Felleisen

+1 for Robby. 


On Nov 26, 2013, at 12:05 PM, Robby Findler ro...@eecs.northwestern.edu wrote:

 This isn't the semantics of the limits. It is about the way that calling the 
 evaluator interacts with threads. Changing this program (from Eli's email)
 
 - ,r racket/sandbox
 - (define e (make-evaluator 'racket))
 - (e '(define foo 1))
 - (e '(thread (lambda () (sleep 5) (set! foo 2
 
 so that that final call doesn't return until the thread terminates is a huge 
 change of the semantics and not at all what a reasonable reading of the docs 
 would suggest. The docs for make-evaluator don't specifically mention 
 'thread' but it seems pretty clear to me that when you pass a program that 
 creates a thread to an evaluator, the call returns without waiting for the 
 thread to terminate.
 
 I also agree with Eli that this would break essentially all uses of threads 
 in sandboxes.
 
 Robby
 
 
 
 
 On Tue, Nov 26, 2013 at 10:57 AM, Jay McCarthy j...@racket-lang.org wrote:
 How can you change the documentation to say anything other than
 Wherever you see an thunk having a time restriction, don't think that
 that means the thunk is restricted to using only a certain amount of
 time? We'd have to say something like Time in this content is a
 -first-order- notion of time, despite being in Racket where we
 generally try to go out of our way to make sure everything works in
 every higher order context. My position is that racket/sandbox has
 always been broken and that any reasonable reader of the documentation
 would have expected this behavior all along. (In fact, both Matthew
 and I did think it did this and were surprised that it didn't.)
 
 On Tue, Nov 26, 2013 at 9:54 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
  I think that, in this case, changing the documentation and adding the
  functionality with a different name is the way to go.
 
  Robby
 
 
 
  On Tue, Nov 26, 2013 at 10:49 AM, Jay McCarthy j...@racket-lang.org wrote:
 
  I agree that it is different.
 
  I disagree that this is a problem.
 
  The documentation says that is executes the code with a time
  restriction. This implies to me that (call-with-limits X #f t) should
  not use more than X secs of resources, but it is trivial to produce
  counter-examples. Without this change, call-with-limits is totally
  useless for limiting the time taken by untrustworthy code.
 
  The fact that there was no test case that failed with my change tells
  me that the code was not written to make one decision or another. I
  charitably assume that this was because the good (current) behavior is
  what was wanted but the variety of attacks on it were not thought of.
 
  Nevertheless, if you and Matthew think this is a bad change, we should
  change everywhere in racket/sandbox that mentions time restrictions to
  clarify that they don't actually restrict time of the code.
 
  Jay
 
 
 
  On Mon, Nov 25, 2013 at 3:02 AM, Eli Barzilay e...@barzilay.org wrote:
   IIUC, this makes the limit thing -- and therefore sandboxes -- behave
   *very* differently.  The original intention was that the time limit is
   on something similar to what you get with `time'.
  
   A very visible way to see the effect of this change:
  
   - ,r racket/sandbox
   - (define e (make-evaluator 'racket))
   - (e '(define foo 1))
   - (e '(thread (lambda () (sleep 5) (set! foo 2
   #thread
  
   This used to happen immediately, with the thread continuing to run
   inside the sandbox.  After your change, the last line hangs until the
   thread is done.  Using a bigger sleeping time will make it throw an
   error when it previously didn't.  Similarly,
  
   (make-module-evaluator #lang racket (thread (λ() (sleep 99
  
   used to work and will throw an error now, and of course, any code that
   runs some kind of sandboxed server will probably break now.
  
   I think that instead of this, it'd be better to write a helper that
   runs a thunk and waits for it and for any generated threads to end,
   and suggest using this helper when you want to wait for all threads in
   a `with-limits'.  (It might also be useful in the profiler, where a
   similar kind of wait-for-all is done.)
  
  
   On Friday, j...@racket-lang.org wrote:
   jay has updated `master' from e0026f5de4 to 79f8636e1e.
 http://git.racket-lang.org/plt/e0026f5de4..79f8636e1e
  
   =[ One Commit
   ]=
   Directory summary:
 52.6% pkgs/racket-pkgs/racket-test/tests/racket/
 45.6% pkgs/sandbox-lib/racket/
  
   ~~
  
   79f8636 Jay McCarthy j...@racket-lang.org 2013-11-22 14:25
   :
   | Ensure that threads created within call-with-limits are accounted
   | during the time/space limits
   :
 A pkgs/racket-pkgs/racket-test/tests/racket/sandbox.rkt
 M pkgs/sandbox-lib/racket/sandbox.rkt   | 81
   ++--
 M .../racket-test/tests/racket/sandbox.rktl | 48 

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

2013-10-16 Thread Matthias Felleisen

+1 

Cabals not withstanding. 


On Oct 16, 2013, at 1:40 AM, Stephen Chang stch...@ccs.neu.edu wrote:

 I just discovered this behavior accidentally.
 
 It caught me off guard and feels unintuitive. And the negative of 
 accidentally running it doesnt seem to outweigh having to type an extra 
 --link dirname (especially after cloning, when you are not in the 
 directory you just created anyways).
 
 I doubt I'm going to change any minds though so at the very least this 
 behavior should be mentioned in raco pkg install --help.
 
 
 On Mon, Oct 14, 2013 at 2:08 PM, sa...@racket-lang.org wrote:
 samth has updated `master' from eca9e16b96 to 4a542969c7.
   http://git.racket-lang.org/plt/eca9e16b96..4a542969c7
 
 =[ One Commit ]=
 Directory summary:
   27.7% pkgs/racket-pkgs/racket-doc/pkg/scribblings/
   54.1% racket/collects/pkg/
   10.4% racket/collects/racket/
 
 ~~
 
 4a54296 Sam Tobin-Hochstadt sa...@racket-lang.org 2013-09-26 17:37
 :
 | Make 'raco pkg install' with no arguments install the current directory.
 |
 | This is useful for telling people how to install a new pkg, from
 | GitHub or elsewhere: just get the files, and then do
 | `raco pkg install` in the relevant directory.
 |
 | Also, both cabal (the Haskell package manager) and npm (the node.js
 | package manager) behave this way.
 |
 | To explicitly get the old behavior, specify the sources as
 | `--pkgs pkg-srcs ...`.  This is useful in scripts, when `pkg-srcs`
 | might be empty.
 :
   M Makefile   |  2 +-
   M pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl  |  6 ++
   M racket/collects/pkg/main.rkt   | 15 
 +--
   M racket/collects/racket/HISTORY.txt |  3 ++-
   M .../racket-doc/pkg/scribblings/getting-started.scrbl   |  5 ++---
 
 =[ Overall Diff ]===
 
 Makefile
 
 --- OLD/Makefile
 +++ NEW/Makefile
 @@ -199,7 +199,7 @@ RACKET = racket/bin/racket $(USER_CONFIG)
  RACO = racket/bin/racket $(USER_CONFIG) -N raco -l- raco
  WIN32_RACKET = racket\racket $(USER_CONFIG)
  WIN32_RACO = racket\racket $(USER_CONFIG) -N raco -l- raco
 -X_AUTO_OPTIONS = --skip-installed --deps search-auto $(JOB_OPTIONS)
 +X_AUTO_OPTIONS = --skip-installed --deps search-auto --pkgs $(JOB_OPTIONS)
  USER_AUTO_OPTIONS = --scope user $(X_AUTO_OPTIONS)
  LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS)
  SOURCE_USER_AUTO_q = --catalog $(SRC_CATALOG) $(USER_AUTO_OPTIONS)
 
 pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
 ~
 --- OLD/pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
 +++ NEW/pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
 @@ -300,10 +300,9 @@ get started.
  Whether creating a @tech{single-collection package} or a
  @tech{multi-collection package}, the next step is to link your
  development directory as a locally installed package. Use
 -@command-ref{install} in the directory where you created the
 -@nonterm{pkg-name} directory:
 +@command-ref{install} in the @nonterm{pkg-name} directory:
 
 -@commandline{raco pkg install --link @nonterm{pkg-name}}
 +@commandline{raco pkg install}
 
  If you use @command-ref{show} at this point, you'll see a line for
  @nonterm{pkg-name}. The ``Source'' column will show that it's a
 
 pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
 ~
 --- OLD/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
 +++ NEW/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
 @@ -322,6 +322,9 @@ sub-commands.
   If a given @nonterm{pkg-source} is ``auto-installed'' (to satisfy some 
 other package's
   dependency), then it is promoted to explicitly installed.
 
 + If no @nonterm{pkg-source}s are supplied, the current directory is
 + installed as a link. See the @DFlag{link} flag below for more details.
 +
   The @exec{install} sub-command accepts
   the following @nonterm{option}s:
 
 @@ -377,6 +380,9 @@ sub-commands.
  of the given directory will not change for each given directory that 
 implements a
  @tech{multi-collection package}.}
 
 +  @item{@DFlag{pkgs} --- Disables default installation of the current 
 directory when no @nonterm{pkg-source}s
 +are supplied.}
 +
@item{@DFlag{copy} --- Disables default handling of directory 
 @tech{package sources} as links,
  and instead treats them like other sources: package content is 
 copied to install.}
 
 
 racket/collects/pkg/main.rkt
 
 --- OLD/racket/collects/pkg/main.rkt
 +++ NEW/racket/collects/pkg/main.rkt
 @@ -151,6 +151,7 @@
   #:once-each
   catalog-flags ...
   [#:bool skip-installed () (Skip a pkg-source if already 
 installed)]
 +   

Re: [racket-dev] get-x method on key event always returns zero?

2013-10-09 Thread Matthias Felleisen


world uses get-x like this: 

  (define/public (deal-with-mouse %)
(if (not on-mouse) 
;; No mouse handler = discard mouse events (so snip are not 
selected
;;  in the pasteboard, for example
(class %
  (super-new)
  (define/override (on-event e)
(void)))
;; Mouse handler = handle mouse events
(class %
  (super-new)
  (define/override (on-event e)
(define-values (x y me) (mouse-event-parts e))
(when live
  (cond
[(and (= 0 x width) (= 0 y height)) (pmouse x y me)]
[(member me '(leave enter)) (pmouse x y me)]
[else (void)]))

[[ Yes, this is a method-based mixin ]]

but note that I override on-event not on-key. The mouse-event-parts method 
uses get-x on e. -- Matthias



On Oct 9, 2013, at 5:17 PM, John Clements wrote:

 It appears to me that the 'get-x' method on a key event always returns zero, 
 counter to what the docs say. Is this a doc bug, a software bug, or just me 
 being dumb?
 
 FWIW, here's a simple program that illustrates this; press a key while the 
 window has focus, and you will always see 0 in the x value field:
 
 #lang racket/base
 
 
 (require racket/gui
 racket/class)
 
 
 (define sound-canvas%
  (class canvas%
(init-field frame-num-text)
(init-field y-value-text)
 
(define/override (on-char evt)
  (send y-value-text begin-edit-sequence #f)
  (send y-value-text erase)
  (send y-value-text insert 
(format x value: ~v
(send evt get-x)))
  (send y-value-text end-edit-sequence)
  (send frame-num-text begin-edit-sequence #f)
  (send frame-num-text erase)
  (send frame-num-text insert (format key : ~a (send evt get-key-code)))
  (send frame-num-text end-edit-sequence))
 
(super-new)))
 
 
 (let* ([f (new frame% [label abc] [width 400] [height 100])]
   [tx (new text%)]
   [ty (new text%)]
   [c (new sound-canvas%
   [parent f]
   #;[paint-callback 
  (make-sound-drawing-callback left-getter right-getter
   len data-left data-right)]
   [frame-num-text tx]
   [y-value-text   ty])]
   [ecx (new editor-canvas%
 [parent f]
 [editor tx]
 [style '(no-border no-hscroll no-vscroll)]
 [stretchable-width #t]
 [stretchable-height #f]
 [horizontal-inset 1]
 [vertical-inset 1]
 [min-width 50]
 [min-height 20])]
   [ecy (new editor-canvas%
 [parent f]
 [editor ty]
 [style '(no-border no-hscroll no-vscroll)]
 [stretchable-width #t]
 [stretchable-height #f]
 [horizontal-inset 1]
 [vertical-inset 1]
 [min-width 50]
 [min-height 20])])
  (send f show #t))
 
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] Generics updates

2013-10-04 Thread Matthias Felleisen

On Oct 2, 2013, at 4:41 PM, Sam Tobin-Hochstadt wrote:

 I think I prefer separate unrelated data structures,


+1 


We need to look at other languages and what devs 
say about intermingling and/or separating applicative
and stateful data types. Java and Scala seem to provide
particularly bad examples, so perhaps we should not follow
what they do :-) 

-- Matthias

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


[racket-dev] release

2013-10-03 Thread Matthias Felleisen


Tuesday was the beginning of the next release cycle. As you noticed,
we did not send out a start-of-release message. Instead we have decided
to postpone the beginning of the release cycle until approximately 10/24
so that we can get ready for the 6.0 release based on packages. Depending
on our experiences with the package server, we may also stretch out some
of the phases of the next release.

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


Re: [racket-dev] Pinging BYU people!! (was: DOS attack on planet?)

2013-09-22 Thread Matthias Felleisen

Eli: 

Apologies for this exchange. Someone who volunteers his time to monitor our 
machines and fix them up doesn't deserve any kind of yelling and other crap 
that showed up in this thread. Your help is very much appreciated not to speak 
of the tons of work from the past. 

Again, apologies from top-flight management 

-- Matthias





On Sep 22, 2013, at 7:31 PM, Eli Barzilay wrote:

 50 minutes ago, Jay McCarthy wrote:
 Next time, feel free to follow the directions on
 internal.racket-lang.org.
 
 I have no practical way to know whether it's actually one of your
 machines.  (I did check that it's not an IP that is in our DNS.)
 
 
 Now that you've turn off its access, rather than just logging in and
 killing it,
 
 Nor do I know what it is that should be killed.  (And I will
 certainly not going to ssh into your account and sniff around.)
 
 
 I can't test and see what the underlying problem was. Let me know
 when you have turn traffic back on.
 
 It's back on now.
 
 -- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


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

2013-09-11 Thread Matthias Felleisen

We discussed this idea early on -- based on work by Casey and Robby and our own 
reasoning -- and I am pretty sure it was on your list. If it is not there, we 
should bring it in quickly. This should improve performance quite a bit. -- 
Matthias



On Sep 10, 2013, at 4:59 AM, Sam Tobin-Hochstadt wrote:

 I implemented what I thought would do this a long time ago, so if it isn't 
 there then I must be misremembering or things have changed in the code to 
 make it not happen.
 
 Sam
 
 On Sep 9, 2013 9:13 PM, Eric Dobson eric.n.dob...@gmail.com wrote:
 When did you add this? Last time I checked (June-ish) this was not
 added. Can you point to the code that does it?
 
 On Mon, Sep 9, 2013 at 5:55 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
  Not only did our own Sam write about this, but he thought that he changed
  Typed Racket to do this. Am I missing something here, or are you describing
  more optimization than we do already or ...?
 
  Sam
 
  On Sep 9, 2013 8:33 PM, Robby Findler ro...@eecs.northwestern.edu wrote:
 
  FWIW, this is something that's been studied in small calculi in the
  literature. Nothing that will have to get thru all of the little details
  that you have to get right to make it work in a real language design like
  TR, but maybe you'll find some useful ways to look at the problem. (Mostly
  the papers I'm thinking of have Jeremy Siek as a co-author but there are
  others, including our own Sam.)
 
  Robby
 
 
  On Mon, Sep 9, 2013 at 7:14 PM, Eric Dobson eric.n.dob...@gmail.com
  wrote:
 
  I have ideas to remove about the contracts from TR code, but currently
  that is only prototyped.
 
  Example:
 
  #lang typed/racket
  (provide f)
  (: f (Number - Number))
  (define (f x) x)
 
  Currently f is exported with the contract (number? . - . number?),
  but this can be safely reduced to (number . - . any). This is because
  the return value contract is checking things we have already ensured
  statically. IIRC checking return values of functions is much more
  expensive than just arguments, so this should reduce the cost of TR
  boundary cost, but I don't have any numbers.
 
  On Mon, Sep 9, 2013 at 10:57 AM, Sam Tobin-Hochstadt
  sa...@cs.indiana.edu wrote:
   On Mon, Sep 9, 2013 at 11:35 AM, Neil Toronto neil.toro...@gmail.com
   wrote:
   Nice, and thanks for the explanation. Just to make sure I get it: does
   this
   mean fully expanded TR modules are smaller?
  
   Yes.
  
   Does it reduce the number of generated contracts?
  
   No.
  
  
  
   On 09/08/2013 12:24 PM, Sam Tobin-Hochstadt wrote:
  
   Typed Racket has to expand into code that registers the type of each
   module-top-level identifier in the global environment so that other
   modules can find the types to typecheck with.  For example, this
   program:
  
   #lang typed/racket
   (provide x)
   (define: x : Integer 1)
  
   expands into (greatly simplified):
  
   #lang ...
   (#%provide x)
   (begin-for-syntax
  (declare #'x Integer-rep))
   (define-values (x) 1)
  
   but what is `Integer-rep`?  It needs to be an expression that
   _constructs_ the internal Typed Racket representation of the
   `Integer`
   type. Previously, that looked something like this:
  
(make-Union (sort (list Negative-Fixnum-rep Positive-Fixnum-rep
   ...)))
  
   and so on and so forth for the components, all the way down to base
   types.  You can imagine how this gets quite large, especially for
   large types.
  
   However, this is wasteful, because every Typed Racket program, at
   type
   checking time, defines a constant that's the representation of the
   `Integer` type, right here [1]. So instead of serializing an
   expression that constructs the same thing as `-Int`, we can just
   *reference* `-Int` in the expanded code.  To make that possible,
   Typed
   Racket now builds a hash table [2] mapping types (really, their
   representations) to identifiers that denote those types. Then the
   serializer just consults this table [3].
  
   It turns out that base types (but no others) already used basically
   this mechanism, by storing the identifier *in* the type
   representation.  But that's now obsolete, and thus was removed in my
   subsequent commit.
  
   As a result, the type serialization is much smaller.
  
   [1]
  
   https://github.com/plt/racket/blob/master/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/numeric-tower.rkt#L107
   [2]
  
   https://github.com/plt/racket/blob/master/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/base-abbrev.rkt#L23
   [3]
  
   https://github.com/plt/racket/blob/master/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/env/init-envs.rkt#L51
  
   On Sat, Sep 7, 2013 at 3:20 PM, Neil Toronto neil.toro...@gmail.com
   wrote:
  
   On 09/06/2013 04:14 PM, sa...@racket-lang.org wrote:
  
  
   56b372c Sam Tobin-Hochstadt sa...@racket-lang.org 2013-09-06
   14:22
   :
   | Remember types that are defined, and use them in serialization.
   |

Re: [racket-dev] generic binding forms

2013-08-26 Thread Matthias Felleisen

What are the performance implications of this design? Specifically how do 
overlapping uses fare in the two systems? Microbenchmarks okay for now. -- 
Matthias



On Aug 26, 2013, at 12:54 AM, Stephen Chang wrote:

 Hi dev,
 
 I've noticed that Racket has a lot of convenient binding forms but
 they don't fit together unless someone does it manually (for example
 there's match-let and match-let-values, but no match-for).
 
 As an educational side project, I've been toying around with a
 different way of organizing all the binding forms. What I wanted to do
 is remove the need to manually combine current (and future) binding
 forms by moving the binding logic to the binding site itself.
 
 Inspired by the in-vogue generics movement in the Racket world, I've
 hacked together a sort of generic interface for bindings (in
 reality, it's just a bunch of syntax properties right now), and
 implemented alternate versions of some of the main binding forms that
 support instances of these generic bindings.
 
 To illustrate, here are some test cases for a generic define I
 implemented (~define). I also implemented binding instances for
 match and values (which I arbitrarily named $ and ~v below) and I can
 use these forms in (mostly) any binding position that supports generic
 bindings.
 
 ;; functions
 (~define (f1 x y) (+ x y))
 (f1 10 20)
 30
 (~define (f2 ($ (list x y))) (+ x y))
 (f2 (list 10 20))
 30
 
 ;; non-functions
 (~define a1 100)
 a1
 100
 (~define (~v a2 a3) (values 134 456))
 a2
 134
 a3
 456
 
 You can nest bind instances too:
 
 (~define (~v ($ (list b1 b2)) b3) (values (list 22 33) 44))
 b1
 22
 b2
 33
 b3
 44
 
 Does anyone think this is useful? Or is it just a lot of work to save
 a little bit of typing? Has anyone tried something like this before?
 
 It's still very much a work in progress but I figure I would ask for
 some feedback earlier rather than too later, in case there is
 something that makes this infeasible.
 
 Brave souls can look at the hackery here:
 https://github.com/stchang/generic-bind/blob/master/generic-bind.rkt
 (Warning: I'm still trying to figure out all the toys in the Racket
 macro toolbox. For the most part, everything still looks like a
 syntax-rule/case/parse/-datum nail to my hammer.)
 
 Technical question: I couldn't figure out a nice way to implement
 ~let. Essentially, I want a let form where some clauses are let-values
 and some are match-let, but I need to bind them all at the same time,
 like let. I can't define a ~lambda that works with values because
 functions in racket can't receive values. Anyone have any ideas?
 
 Side observation: Trying to get things to work with multiple return
 values was a pain because they don't compose (as in, functions can
 produce them but can't receive them). Not sure if anything can be done
 about this though.
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] Lists aren't sets, but have set-like operations

2013-08-22 Thread Matthias Felleisen

I can see why an eq-set and an eqv-set can't be union-ed without additional 
information about the desired result type. 

But if we had two different implementation of the eq-set API we could easily 
define unions as derived code; that's the point of OO. 






On Aug 22, 2013, at 12:14 PM, Carl Eastlund wrote:

 Set-union never worked for even different hash set representations.  Even 
 before I touched the code, the union of an eq set and an eqv set, for 
 instance, caused a runtime error.
 
 Generics do not have multiple dispatch.  That's not a mechanism we have right 
 now.  And fallbacks are for when there's no method implemented for a given 
 receiver value, they're not particularly related to a question of are these 
 things the same type.
 
 I chose to keep the semantics that union and operations like it only work 
 with the same representation.  Partly because that's how things already were, 
 and partly to set the precedent that generics authors don't have to write two 
 versions of every method.  Perhaps this wasn't the best idiom, but it's what 
 I wrote.  Perhaps there's a better idiom for fallbacks that makes this work 
 more cleanly.  Anyway, right now, generic sets are designed so you can use 
 any one representation, but they don't combine representations.
 
 Carl Eastlund
 
 
 On Thu, Aug 22, 2013 at 9:03 AM, J. Ian Johnson i...@ccs.neu.edu wrote:
 No, it doesn't seem to be using the fallback in this case.
 
 ianj@sampson:~/racket/racket/bin$ ./racket -il xrepl
 Welcome to Racket v5.90.0.8.
 - (set-union '() (set))
 ; in-list: contract violation
 ;   expected: list?
 ;   given: (set)
 ; [,bt for context]
 -
 
 -Ian
 - Original Message -
 From: Sam Tobin-Hochstadt sa...@cs.indiana.edu
 To: J. Ian Johnson i...@ccs.neu.edu, Carl Eastlund c...@ccs.neu.edu
 Cc: dev@racket-lang.org, Matthew Flatt mfl...@cs.utah.edu
 Sent: Thursday, August 22, 2013 8:51:30 AM GMT -05:00 US/Canada Eastern
 Subject: Re: [racket-dev] Lists aren't sets, but have set-like operations
 
 Wait, `set-union` of two different set representations doesn't work?
 
 Sam
 
 On Thu, Aug 22, 2013 at 8:07 AM, J. Ian Johnson i...@ccs.neu.edu wrote:
  You misunderstand. I used set-union, but single dispatch saw '() and used 
  list-union for the '() (set) combination.
  -Ian
  - Original Message -
  From: Sam Tobin-Hochstadt sa...@cs.indiana.edu
  To: J. Ian Johnson i...@ccs.neu.edu
  Cc: dev@racket-lang.org, Matthew Flatt mfl...@cs.utah.edu
  Sent: Thursday, August 22, 2013 8:02:50 AM GMT -05:00 US/Canada Eastern
  Subject: Re: [racket-dev] Lists aren't sets, but have set-like operations
 
 
 
  But 'list-union' is not a generic operation so it isn't surprising that 
  this didn't work. To do this generically, you'd need to use 'set-union'.
 
  Sam
  On Aug 22, 2013 7:59 AM, J. Ian Johnson  i...@ccs.neu.edu  wrote:
 
 
  The problem manifested itself when I got an exception that in-list can't be 
  called on (set), which really confused me. (set? '()) answered true, so it 
  tried to do (list-union '() (set)), which failed.
  Generic sets as they are don't work generically. Some action should be 
  taken. Either set? means what it once did, or we do some awfully slow 
  multiple dispatch for set operations. My bias shows.
  -Ian
  - Original Message -
  From: Matthew Flatt  mfl...@cs.utah.edu 
  To: Carl Eastlund  c...@ccs.neu.edu 
  Cc: J. Ian Johnson  i...@ccs.neu.edu , dev  dev@racket-lang.org 
  Sent: Thursday, August 22, 2013 7:22:25 AM GMT -05:00 US/Canada Eastern
  Subject: Re: [racket-dev] Lists aren't sets, but have set-like operations
 
  How much should we prioritize backward compatibility in this case?
 
  One possibility is to make `set?' mean `hash-set?', and add
  `generic-set?' in place of the current `set?'. That's uglier,
  obviously, but it would be better if we want to prioritize backward
  compatibility.
 
  At Wed, 21 Aug 2013 19:14:06 -0400, Carl Eastlund wrote:
  Ah, yes. The set? predicate no longer distinguishes a representation.
  There are several predicates for the original set type, now called hash
  sets: set-eq?, set-eqv?, set-equal?, set-mutable?, set-immtuable?, and
  set-weak?. I didn't add the basic hash-set?, but perhaps I should. It's
  a weird name, since hash-set and hash-set! are already existing,
  unrelated functions.
 
  Carl Eastlund
 
 
  On Wed, Aug 21, 2013 at 7:08 PM, J. Ian Johnson  i...@ccs.neu.edu  wrote:
 
   Okay, I can abide. However, that doesn't really get at my frustration. 
   I'm
   using the set constructor, that appears to now be an immutable-custom-set
   with make-immutable-hash as its make-table. So what I'm looking for is 
   not
   set?, but set-immutable?, as it's a distinct (family of) struct types 
   that
   won't clash with the primitive data that I'm otherwise using.
   -Ian
   - Original Message -
   From: Carl Eastlund  c...@ccs.neu.edu 
   To: J. Ian Johnson  i...@ccs.neu.edu 
   Cc: dev  dev@racket-lang.org 
   Sent: 

Re: [racket-dev] Lists aren't sets, but have set-like operations

2013-08-22 Thread Matthias Felleisen

On Aug 22, 2013, at 2:31 PM, Carl Eastlund wrote:

 
 Here's what I propose to do now:
 
 - rename set? to generic-set?; this predicate recognizes the new 
 all-inclusive generic set type
 - rename set-immutable? to set?; this predicate recognizes the pre-existing 
 immutable hash set type
 - leave set-mutable? and set-weak? alone; they recognize the other two hash 
 set types (on the mutability axis)
 - allow multiple-set operations to combine equal-based hash sets and lists, 
 since both use equal? for equality


Sounds like the right direction to me. -- Matthias

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


  1   2   3   4   5   6   7   >