[racket-dev] Implementation question

2014-04-19 Thread nicolas carraggi
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

Re: [racket-dev] Implementation question

2014-04-19 Thread Laurent
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)

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

2014-04-19 Thread Michael Sperber
Ryan Culpepper ry...@ccs.neu.edu writes: * Mike Sperber sper...@deinprogramm.de - DMdA Tests - Stepper Tests - Signature Tests Done. -- Regards, Mike _ 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

Re: [racket-dev] Catching the undefined value

2014-04-19 Thread Gustavo Massaccesi
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

Re: [racket-dev] Catching the undefined value

2014-04-19 Thread Robby Findler
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

Re: [racket-dev] Catching the undefined value

2014-04-19 Thread Gustavo Massaccesi
(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,

Re: [racket-dev] Catching the undefined value

2014-04-19 Thread Robby Findler
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

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

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

2014-04-19 Thread Vincent St-Amour
At Sat, 19 Apr 2014 13:19:25 -0400, mfl...@racket-lang.org wrote: a01b12e Matthew Flatt mfl...@racket-lang.org 2014-04-19 10:11 : | optimizer: don't move expressions into a `with-continuation-mark` | | ... unless the optimizer can prove that the expression doesn't | inspect continuation

Re: [racket-dev] Catching the undefined value

2014-04-19 Thread Sam Tobin-Hochstadt
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

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

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

2014-04-19 Thread Neil Toronto
Are there type systems that can? It seems like you could specify this type and similar ones using regular expressions. In my research, I'll probably use regular expressions to represent sets of strings. I've been curious about how well regular-expression-like things generalize to cartesian

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

2014-04-19 Thread Sam Tobin-Hochstadt
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,

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

2014-04-19 Thread Matthew Flatt
At Sat, 19 Apr 2014 17:36:40 -0400, Vincent St-Amour wrote: At Sat, 19 Apr 2014 13:19:25 -0400, mfl...@racket-lang.org wrote: a01b12e Matthew Flatt mfl...@racket-lang.org 2014-04-19 10:11 : | optimizer: don't move expressions into a `with-continuation-mark` | | ... unless the optimizer

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

2014-04-19 Thread Gregory Cooper
* Greg Cooper g...@cs.brown.edu - FrTime Tests Done. _ Racket Developers list: http://lists.racket-lang.org/dev