[racket-users] Re: Is this a TR bug?

2017-02-16 Thread Sam Tobin-Hochstadt
No, this isn't a bug. The problem is the cast _from_ `Any`, which means we can't know what kind of value we have or how to protect it more than we do. This isn't introducing runtime errors into correct programs any more than this one is: #lang typed/racket (: id : (-> String String)) (define (id

[racket-users] Is this a TR bug?

2017-02-16 Thread 'John Clements' via Racket Users
Here’s a simple program that fails: #lang typed/racket (define (obscurinator [x : Any]) : Any x) (struct PrimV ([f : (Real Real -> Real)]) #:transparent) (define dangerval : PrimV (cast (obscurinator (PrimV +)) PrimV)) ((PrimV-f dangerval) 3 4) It type-checks fine, but it

Re: [racket-users] make-directory race condition fix?

2017-02-16 Thread Neil Van Dyke
Dan Liebgold wrote on 02/16/2017 02:33 PM: How can I rewrite this so that it either eats the exception or is atomic? I think the difficulty here is that you don't know for certain why a `make-directory` failed, so maybe conditionally re-raising the exception is the way: (define

Re: [racket-users] make-directory race condition fix?

2017-02-16 Thread David Storrs
On Thu, Feb 16, 2017 at 2:33 PM, Dan Liebgold wrote: > Hi - > > I have a few racket process running on Windows that need to each ensure > the same directory structure exists. I have code like this: > > (unless (directory-exists? dir) > (make-directory dir)) > >

[racket-users] make-directory race condition fix?

2017-02-16 Thread Dan Liebgold
Hi - I have a few racket process running on Windows that need to each ensure the same directory structure exists. I have code like this: (unless (directory-exists? dir) (make-directory dir)) Well, since they're running in parallel occasionally they race and try to make the directory after

Re: [racket-users] Providing a seed to random number generators (and thence to distributions)

2017-02-16 Thread Matthias Felleisen
http://docs.racket-lang.org/reference/generic-numbers.html?q=random%20see#%28def._%28%28quote._~23~25kernel%29._random-seed%29%29 > On Feb 16, 2017, at 1:25 PM, Steve Byan's Lists > wrote: > > In some tests I'm writing, it would be helpful to have the math-lib

[racket-users] Oregon PL Summer School 2017: call for participation

2017-02-16 Thread Amal Ahmed
We are pleased to announce the program for the 16th annual Oregon Programming Languages Summer School (OPLSS) to be held from June 26th to July 8th, 2017 at the University of Oregon in Eugene. The registration deadline is April 1st, 2017. Full information on registration and scholarships can

Re: [racket-users] Programming paradigms supported by Racket (according to wikipedia)

2017-02-16 Thread Matthias Felleisen
The world of text books for undergraduate PL classes changed radically in the 1980s with the introduction of Kamin’s book and Friedman & Wand’s EOPL. One of the final bricks in this wall to fence of “paradigm” teaching is SK’s PLAI. Instead of paradigms, these books emphasized the idea of

Re: [racket-users] Programming paradigms supported by Racket (according to wikipedia)

2017-02-16 Thread Luis Sanjuán
On Sunday, February 12, 2017 at 11:19:06 PM UTC+1, Matthias Felleisen wrote: > > On Feb 12, 2017, at 4:55 PM, Greg Trzeciak wrote: > > > > On Sunday, February 12, 2017 at 10:35:45 PM UTC+1, Matthias Felleisen wrote: > >> Thanks. I assume you have seen my old web page with