Re: [racket-dev] Creating executables still broken
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/11 20:59, Matthew Flatt wrote: I think I found the problem. Can you try the latest version? Thanks Matthew, everything seems to work now. At Tue, 04 Oct 2011 09:42:53 +0200, Marijn wrote: On 10/03/11 17:07, Matthew Flatt wrote: At Mon, 03 Oct 2011 16:10:15 +0200, Marijn wrote: creating executables is still broken and seems now to cause lots of memory allocation causing my system to start thrashing... I've fixed the problem that caused `raco exe' to not terminate. Thanks, indeed the old failure mode is restored. I doubt that the older problem you've seen is fixed, since I haven't been able to replicate it. Assuming that the old problem is still there, can you tell me (perhaps again) the platform you're running on and the arguments that you supplied to `configure'? Sure, platform: x86_64-pc-linux-gnu ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --enable-gracket --enable-plot --disable-docs --enable-shared --enable-jit --enable-foreign --disable-places --disable-futures --disable-backtrace --disable-pthread --disable-perl --with-x Thanks for looking into this, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6MDdoACgkQp/VmCx0OL2x97gCfcpH1103Q/JSISsOLig0oGj4Q UEQAniRjl67hJgDKWcuiTEQ46qk6ET2A =qr4m -END PGP SIGNATURE- _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] plea for short planet syntax in student languages?
I'm using the rsound planet package in beginning student languages, and requiring them to type (require (planet main.rkt (clements rsound.plt 2 6))) at the top of every file is a bit painful. Would it be difficult to support the shorter (require (planet clements/rsound)) syntax in the student languages? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] plea for short planet syntax in student languages?
Yes, please! --- nadeem On Wed, Oct 5, 2011 at 12:20 PM, John Clements cleme...@brinckerhoff.org wrote: I'm using the rsound planet package in beginning student languages, and requiring them to type (require (planet main.rkt (clements rsound.plt 2 6))) at the top of every file is a bit painful. Would it be difficult to support the shorter (require (planet clements/rsound)) syntax in the student languages? John _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] New plot library pushed
I've just pushed the new 'plot' library. Eli and I both forgot that the new 'plot' still needs the old libfit, and removed it along with libplplot. I just added libfit back (the sources are in src/fit now instead of src/plot/fit) along with the proper configure, Makefile.in, and get-libs.rkt changes. I can verify that libfit compiles on 64-bit Ubuntu. It *should* build on Windows and Mac. :D I've taken Matthew's suggestion to make the new 'plot' as backward-compatible as possible. Plots might still break (such as the example at racket-lang.org and on the Wikipedia page). Using the 'plot/compat' module should make these work. This change replaces about 2 lines of C+support code with 7000 lines of Racket that does a lot more. Racket code for backward compatibility totals only 500 lines. The libfit library is about 500 lines of C+make code. Neil T _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] plea for short planet syntax in student languages?
On Oct 5, 2011, at 12:20 PM, John Clements wrote: I'm using the rsound planet package in beginning student languages, and requiring them to type (require (planet main.rkt (clements rsound.plt 2 6))) at the top of every file is a bit painful. Would it be difficult to support the shorter (require (planet clements/rsound)) syntax in the student languages? +1 I think I first requested this two or three years ago Stephen Bloch sbl...@adelphi.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] plea for short planet syntax in student languages?
On Oct 5, 2011, at 12:20 PM, John Clements wrote: Would it be difficult to support the shorter (require (planet clements/rsound)) syntax in the student languages? For that matter, is there any good reason to restrict the syntax of require at ALL in student languages? I mean, it's not like a student is going to accidentally stumble on (require (prefix-in foo: (only-in bar/snark boojum glerbix))) And even if they do, explaining that would be easier than explaining (require (planet main.rkt (clements rsound.plt 2 6))) . A related feature request, which I've put in at least once or twice: allow students to use require on their OWN files, perhaps by putting an implicit provide all-defined-out on any file in a student language. This is easy to motivate: I frequently give an assignment that benefits from re-using a function from a previous assignment. It seems to me quite reasonable for a student to write ; Homework 6 (require homework5.rkt) ... ; use functions defined in homework 5 Or perhaps even ; Homework 6 (require (prefix-in hw5: homework5.rkt)) ... ; use functions defined in homework 5, as prefixed Stephen Bloch sbl...@adelphi.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [plt] Push #23663: master branch updated
On 10/05/2011 01:13 PM, ntoro...@racket-lang.org wrote: ntoronto has updated `master' from e1a82481d1 to 32d789d4f8. http://git.racket-lang.org/plt/e1a82481d1..32d789d4f8 [...] ; fit-int : (number* - number) (list-of (symbol number)) (list-of (vector number [number] number number)) - fit-result (define (fit-int function guesses data) +;; Require dynamically so the rest of 'plot' still works without libfit: +(define fit-internal (dynamic-require 'plot/deprecated/fit-low-level 'fit-internal)) (let* ((independent-vars (- (procedure-arity function) (length guesses))) (f-of-x-y (cond [(= 1 independent-vars) Be careful with dynamic-require; it uses (current-namespace), which is not necessarily the same namespace that the enclosing module was loaded in. Specifically, you might get a different module registry, which can lead to multiple module instantiations, which can lead to problems with generative structs, etc. Also, with plain dynamic-require, if you build an executable (raco exe) it probably won't include the dynamically-required module. I recommend using lazy-require (from unstable/lazy-require) instead. It handles both the namespace issue and the raco exe issue automatically. Ryan _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] New plot library pushed
Does this mean it will it be in the next 'nightly' build? On Wed, Oct 5, 2011 at 10:45 AM, Neil Toronto neil.toro...@gmail.comwrote: I've just pushed the new 'plot' library. Eli and I both forgot that the new 'plot' still needs the old libfit, and removed it along with libplplot. I just added libfit back (the sources are in src/fit now instead of src/plot/fit) along with the proper configure, Makefile.in, and get-libs.rkt changes. I can verify that libfit compiles on 64-bit Ubuntu. It *should* build on Windows and Mac. :D I've taken Matthew's suggestion to make the new 'plot' as backward-compatible as possible. Plots might still break (such as the example at racket-lang.org and on the Wikipedia page). Using the 'plot/compat' module should make these work. This change replaces about 2 lines of C+support code with 7000 lines of Racket that does a lot more. Racket code for backward compatibility totals only 500 lines. The libfit library is about 500 lines of C+make code. Neil T __**___ For list-related administrative tasks: http://lists.racket-lang.org/**listinfo/devhttp://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Distributing C libraries (was: Re: New plot library pushed)
On Oct 5, 2011, at 9:45 AM, Neil Toronto wrote: I've just pushed the new 'plot' library. Eli and I both forgot that the new 'plot' still needs the old libfit, and removed it along with libplplot. I just added libfit back (the sources are in src/fit now instead of src/plot/fit) along with the proper configure, Makefile.in, and get-libs.rkt changes. Tangential question: it looks like your distribution philosophy here is to insist that users have a C compiler installed. Is this correct? So people without a compiler can't use the package? (I realize that if it's true of your package, it's almost certainly true of the earlier one, as well; I'm just curious, because my sound library has the same issue.) John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] racket/match is broken
I've tracked the problem down to reorder-columns. There are no test cases anywhere for reorder-columns and the code has no comments on its purpose, so I'm not sure how to fix it. It seems that the presence of Null and Dummy in the parse of the pattern causes the app to be lifted out, but I can't tell what to do to fix it. I've committed a patch that adds the new tests and comments out the call to reorder-columns. All existing tests continue to pass, so this should only lower performance. I'll have to punt fixing it properly to you Sam. Jay On Wed, Oct 5, 2011 at 3:13 PM, Jay McCarthy jay.mccar...@gmail.com wrote: I found an interesting error in racket/match in my 330 class this afternoon. (test-case app pattern (check = 4 (match 3 [(app add1 y) y]))) (test-case app pattern (step 1) (check = 2 (match (list 1 3) [(list 0 (app add1 y)) y] [(list 1 (app sub1 y)) y]))) (test-case app pattern (step 2aa) (check = 2 (match (cons 1 3) [(cons 0 (app error y)) y] [(cons 1 (app sub1 y)) y]))) (test-case app pattern (step 2ab) (check = 2 (match (vector 1 3) [(vector 0 (app error y)) y] [(vector 1 (app sub1 y)) y]))) (test-case app pattern (step 2) (check = 2 (match (list 1 3) [(list 0 (app error y)) y] [(list 1 (app sub1 y)) y]))) If you run these you'll see that the final one ends in an error. Basically, it calls the app function on the second element of the list even though the head of the list has failed to pattern match. This is very dangerous, in my opinion because it means code like... (match (list password target) [(list (== right-password) (app launch-the-missiles success?)) success?] [_ Sorry, no nukes for you) will destroy Canada even though it should not. Jay -- Jay McCarthy j...@cs.byu.edu Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay The glory of God is Intelligence - DC 93 -- Jay McCarthy j...@cs.byu.edu Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay The glory of God is Intelligence - DC 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [plt] Push #23663: master branch updated
On 10/05/2011 02:36 PM, Neil Toronto wrote: On 10/05/2011 01:44 PM, Ryan Culpepper wrote: On 10/05/2011 01:13 PM, ntoro...@racket-lang.org wrote: ntoronto has updated `master' from e1a82481d1 to 32d789d4f8. http://git.racket-lang.org/plt/e1a82481d1..32d789d4f8 [...] ; fit-int : (number* - number) (list-of (symbol number)) (list-of (vector number [number] number number)) - fit-result (define (fit-int function guesses data) + ;; Require dynamically so the rest of 'plot' still works without libfit: + (define fit-internal (dynamic-require 'plot/deprecated/fit-low-level 'fit-internal)) (let* ((independent-vars (- (procedure-arity function) (length guesses))) (f-of-x-y (cond [(= 1 independent-vars) Be careful with dynamic-require; it uses (current-namespace), which is not necessarily the same namespace that the enclosing module was loaded in. Specifically, you might get a different module registry, which can lead to multiple module instantiations, which can lead to problems with generative structs, etc. Also, with plain dynamic-require, if you build an executable (raco exe) it probably won't include the dynamically-required module. I recommend using lazy-require (from unstable/lazy-require) instead. It handles both the namespace issue and the raco exe issue automatically. That is teh awesomes, so I've changed it. I had a couple other uses of dynamic-require, so I changed them to top-level lazy-requires as well. Any plans to support other kinds of objects than functions? I could add support for binding a thunk on the client side that gets the value of a variable on the server side. For example: (module a racket (define x 1) (provide x)) (lazy-require ['a (get-x #:get x)]) (get-x) ; = 1 I could make it even more transparent using an identifier macro; for example, x could expand into (get-x). It would change the behavior for functions from the current force-on-apply behavior to force-on-reference. I haven't decided whether I like that, yet. I could implement both and let people vote with their keyboards :) It will not work for macros. There are both superficial and deep reasons why not, and I hope to finish writing them up soon. (Variable-like macros are okay, like struct constructors and contracted exports.) Ryan _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] racket/match is broken
On Wed, Oct 5, 2011 at 5:13 PM, Jay McCarthy jay.mccar...@gmail.com wrote: Basically, it calls the app function on the second element of the list even though the head of the list has failed to pattern match. This is not a bug. `match' makes no guarantee about the order in which it checks elements of the pattern. If it were to try to support this kind of use case, it would have to specify how many times it would call each function that might be embedded in a match, which requires a detailed semantics of backtracking in the matcher, and lock in a particular implementation. I will clarify the documentation to say that you shouldn't use functions that aren't safe to call 0, 1, or more times, in various orders, inside `match' patterns. -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] racket/match is broken
Okay. I think it is strange, but feel free to do that and revert my change. Apologies for the confusion. The use case I was actually doing was like this: [(list '+ (app parse lhs) (app parse rhs)) ...] [(list 'fun (list (? symbol? arg) ...) (app parse body)) ...] And when you gave it a '(fun () ...) it would try to parse the '() in the fun as the lhs of a + and then throw an exception and crash the whole match. Jay On Wed, Oct 5, 2011 at 7:39 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Wed, Oct 5, 2011 at 5:13 PM, Jay McCarthy jay.mccar...@gmail.com wrote: Basically, it calls the app function on the second element of the list even though the head of the list has failed to pattern match. This is not a bug. `match' makes no guarantee about the order in which it checks elements of the pattern. If it were to try to support this kind of use case, it would have to specify how many times it would call each function that might be embedded in a match, which requires a detailed semantics of backtracking in the matcher, and lock in a particular implementation. I will clarify the documentation to say that you shouldn't use functions that aren't safe to call 0, 1, or more times, in various orders, inside `match' patterns. -- sam th sa...@ccs.neu.edu -- Jay McCarthy j...@cs.byu.edu Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay The glory of God is Intelligence - DC 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] racket/match is broken
Why wouldn't you write that match like this: (match .. [`(+ ,lhs ,rhs) (make-plus (parse lhs) (parse rhs))] [`(fun (,(? symbol arg) ...) ,body) (make-fun arg (parse body))]) Robby On Wed, Oct 5, 2011 at 9:48 PM, Jay McCarthy jay.mccar...@gmail.com wrote: Okay. I think it is strange, but feel free to do that and revert my change. Apologies for the confusion. The use case I was actually doing was like this: [(list '+ (app parse lhs) (app parse rhs)) ...] [(list 'fun (list (? symbol? arg) ...) (app parse body)) ...] And when you gave it a '(fun () ...) it would try to parse the '() in the fun as the lhs of a + and then throw an exception and crash the whole match. Jay On Wed, Oct 5, 2011 at 7:39 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Wed, Oct 5, 2011 at 5:13 PM, Jay McCarthy jay.mccar...@gmail.com wrote: Basically, it calls the app function on the second element of the list even though the head of the list has failed to pattern match. This is not a bug. `match' makes no guarantee about the order in which it checks elements of the pattern. If it were to try to support this kind of use case, it would have to specify how many times it would call each function that might be embedded in a match, which requires a detailed semantics of backtracking in the matcher, and lock in a particular implementation. I will clarify the documentation to say that you shouldn't use functions that aren't safe to call 0, 1, or more times, in various orders, inside `match' patterns. -- sam th sa...@ccs.neu.edu -- Jay McCarthy j...@cs.byu.edu Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay The glory of God is Intelligence - DC 93 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev