[racket-dev] FFI: pointer to an array in a C struct type

2012-12-03 Thread Neil Toronto
This error seems wrong: #lang racket (require ffi/unsafe ffi/unsafe/cvector) (define-cstruct _mpz ([alloc _int] [size _int] [limbs (_gcable _cvector)])) (define z (make-mpz 1 1 (list-cvector '(1) _long))) (mpz-limbs z) _cvector: cannot

Re: [racket-dev] FFI: pointer to an array in a C struct type

2012-12-03 Thread Tobias Hammer
On Mon, 03 Dec 2012 11:45:08 +0100, Neil Toronto neil.toro...@gmail.com wrote: This error seems wrong: #lang racket (require ffi/unsafe ffi/unsafe/cvector) (define-cstruct _mpz ([alloc _int] [size _int] [limbs (_gcable _cvector)]))

Re: [racket-dev] Testing whether a procedure gets collected

2012-12-03 Thread Robby Findler
On Sun, Dec 2, 2012 at 11:40 PM, Neil Toronto neil.toro...@gmail.com wrote: On 12/02/2012 12:10 PM, Robby Findler wrote: On Sun, Dec 2, 2012 at 11:43 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Dec 1, 2012, at 9:23 PM, Robby Findler wrote: I think the high-level answer is that

Re: [racket-dev] Testing whether a procedure gets collected

2012-12-03 Thread Sam Tobin-Hochstadt
On Mon, Dec 3, 2012 at 7:54 AM, Robby Findler ro...@eecs.northwestern.edu wrote: I agree that when something is collected is a pretty intentional property but I think it is possible to say a little bit more since there is a pretty stable core idea there (namely that if something isn't

Re: [racket-dev] Testing whether a procedure gets collected

2012-12-03 Thread Matthew Flatt
At Mon, 3 Dec 2012 08:04:15 -0500, Sam Tobin-Hochstadt wrote: On Mon, Dec 3, 2012 at 7:54 AM, Robby Findler ro...@eecs.northwestern.edu wrote: I agree that when something is collected is a pretty intentional property but I think it is possible to say a little bit more since there is a

Re: [racket-dev] FFI: pointer to an array in a C struct type

2012-12-03 Thread Matthew Flatt
At Mon, 3 Dec 2012 12:31:37 +0100, Tobias Hammer wrote: On Mon, 03 Dec 2012 11:45:08 +0100, Neil Toronto neil.toro...@gmail.com wrote: This error seems wrong: #lang racket (require ffi/unsafe ffi/unsafe/cvector) (define-cstruct _mpz ([alloc _int]

Re: [racket-dev] Testing whether a procedure gets collected

2012-12-03 Thread Robby Findler
On Mon, Dec 3, 2012 at 7:47 AM, Matthew Flatt mfl...@cs.utah.edu wrote: At Mon, 3 Dec 2012 08:04:15 -0500, Sam Tobin-Hochstadt wrote: On Mon, Dec 3, 2012 at 7:54 AM, Robby Findler ro...@eecs.northwestern.edu wrote: I agree that when something is collected is a pretty intentional property

Re: [racket-dev] Testing whether a procedure gets collected

2012-12-03 Thread Robby Findler
Let me also say that I think it is important to give advice on how to test so I think we need to say something. Robby On Mon, Dec 3, 2012 at 10:37 AM, Robby Findler ro...@eecs.northwestern.edu wrote: On Mon, Dec 3, 2012 at 7:47 AM, Matthew Flatt mfl...@cs.utah.edu wrote: At Mon, 3 Dec 2012

Re: [racket-dev] Testing whether a procedure gets collected

2012-12-03 Thread Matthew Flatt
This guide material (as opposed to language specification and guarantees) looks pretty good to me. I'll edit and add the suggestion of N allocations. At Mon, 3 Dec 2012 10:39:09 -0600, Robby Findler wrote: Let me also say that I think it is important to give advice on how to test so I think we

Re: [racket-dev] Testing whether a procedure gets collected

2012-12-03 Thread Robby Findler
Thanks. Is the N suggestion a future-proofing kind of a thing, or is there something today that could cause such a test to pass where a single one might fail? Robby On Mon, Dec 3, 2012 at 10:42 AM, Matthew Flatt mfl...@cs.utah.edu wrote: This guide material (as opposed to language specification

Re: [racket-dev] FFI: pointer to an array in a C struct type

2012-12-03 Thread Neil Toronto
On 12/03/2012 07:31 AM, Matthew Flatt wrote: At Mon, 3 Dec 2012 12:31:37 +0100, Tobias Hammer wrote: On Mon, 03 Dec 2012 11:45:08 +0100, Neil Toronto neil.toro...@gmail.com wrote: This error seems wrong: #lang racket (require ffi/unsafe ffi/unsafe/cvector) (define-cstruct _mpz

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

2012-12-03 Thread Neil Toronto
On 12/03/2012 10:42 AM, mfl...@racket-lang.org wrote: 492167c Kevin Tew t...@racket-lang.org 2012-11-29 05:27 : | read and write support for fxvectors and flvectors +10 Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] FFI: pointer to an array in a C struct type

2012-12-03 Thread Neil Toronto
On 12/03/2012 12:10 PM, Matthew Flatt wrote: At Mon, 03 Dec 2012 11:05:10 -0700, Neil Toronto wrote: On 12/03/2012 07:31 AM, Matthew Flatt wrote: Neil, can you say more about how `_mpz' instances are used with foreign functions? They represent GMP's bignums, and they're used as both input

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

2012-12-03 Thread Neil Toronto
If `build-array' gets #f, it'll raise a contract error. I could get around that by keeping another reference to the procedure that I set to #f later, but I'm going to try Matthew's suggestion first. On 12/03/2012 09:47 AM, Robby Findler wrote: In the test, if you get unlucky and there is a gc

[racket-dev] Planet 2 package names

2012-12-03 Thread Carl Eastlund
Currently (the latest nightly build), the names of Planet 2 packages are restricted to use only the characters a-z, A-Z, _, and -. The current set of Racket collections, on the other hand, uses a-z, 0-9, and -. Planet 1 also has several packages using 0-9. We need to add digits to the set of

Re: [racket-dev] Planet 2 package names

2012-12-03 Thread Jay McCarthy
That's a typo in the docs. Numbers are allowed. Jay On Mon, Dec 3, 2012 at 1:03 PM, Carl Eastlund c...@ccs.neu.edu wrote: Currently (the latest nightly build), the names of Planet 2 packages are restricted to use only the characters a-z, A-Z, _, and -. The current set of Racket collections,

Re: [racket-dev] Planet 2 package names

2012-12-03 Thread Carl Eastlund
Yay! Carl Eastlund On Mon, Dec 3, 2012 at 3:10 PM, Jay McCarthy jay.mccar...@gmail.com wrote: That's a typo in the docs. Numbers are allowed. Jay On Mon, Dec 3, 2012 at 1:03 PM, Carl Eastlund c...@ccs.neu.edu wrote: Currently (the latest nightly build), the names of Planet 2 packages

Re: [racket-dev] Planet 2 package names

2012-12-03 Thread Jay McCarthy
On the second point, I think it may be a good idea to disallow upper case. I presume that Eli and Matthew would have good recommendations about this? Jay On Mon, Dec 3, 2012 at 1:13 PM, Carl Eastlund c...@ccs.neu.edu wrote: Yay! Carl Eastlund On Mon, Dec 3, 2012 at 3:10 PM, Jay McCarthy

Re: [racket-dev] Planet 2 package names

2012-12-03 Thread Eli Barzilay
A few minutes ago, Jay McCarthy wrote: On the second point, I think it may be a good idea to disallow upper case. I presume that Eli and Matthew would have good recommendations about this? I'd defer to whatever happens with relative string paths (and I prefer seeing the explanation phrased

[racket-dev] define #lang and use in same file (+ some funny behavior)

2012-12-03 Thread Stephen Chang
When doing quick experiments, I've often wanted the ability to define a new language and then use it in the same file. I thought submodules might allow me to do this, but I've realized that I still can't. However, in trying to do so I ran into some interesting behavior: Here is a file named

Re: [racket-dev] Planet 2 package names

2012-12-03 Thread Danny Yoo
Planet 1 packages and Racket collections also don't use A-Z (with one or two exceptions on Planet). In theory, we could disallow those characters and gain compatibility with case-insensitive mediums such as the default Mac OS X filesystem. I'm not particularly attached to this second

Re: [racket-dev] define #lang and use in same file (+ some funny behavior)

2012-12-03 Thread Carl Eastlund
You can't define the reader part of a #lang in the same file and then use it, but you can definitely define the bindings, from things like #%module-begin and #%app on up, and use it in the same file. The following works fine for me: #lang racket (module greeting racket (provide

Re: [racket-dev] define #lang and use in same file (+ some funny behavior)

2012-12-03 Thread Stephen Chang
Ah, thanks! I somehow missed the existence of the submod form. On Mon, Dec 3, 2012 at 4:44 PM, Carl Eastlund c...@ccs.neu.edu wrote: You can't define the reader part of a #lang in the same file and then use it, but you can definitely define the bindings, from things like #%module-begin and

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

2012-12-03 Thread Ryan Culpepper
I updated the references in the racket git repo, and I left the unstable/lazy-require module in place with a re-export of lazy-require. I did remove a feature that didn't seem to be in use (unquote), though, so if someone is using lazy-require with unquote outside of the racket git repo, that

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

2012-12-03 Thread Sam Tobin-Hochstadt
We make no commitments about compatibility for 'unstable', so keeping the collection around shouldn't even be necessary. Sam On Dec 3, 2012 8:54 PM, Ryan Culpepper r...@cs.utah.edu wrote: I updated the references in the racket git repo, and I left the unstable/lazy-require module in place with

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

2012-12-03 Thread Robby Findler
Right, thanks. Somehow I thought it was just in a top-level collection (I didn't read carefully enough). Sorry, Robby On Mon, Dec 3, 2012 at 8:06 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: We make no commitments about compatibility for 'unstable', so keeping the collection around

[racket-dev] DrRacket automatic parentheses mode update

2012-12-03 Thread Nadeem Abdul Hamid
Some improvements to DrRacket's automatic parentheses mode are now available in the nightly build version and git repository. If you have previous tried auto-parens and abandoned it, or if you have never tried it, please do try it now! In auto-parens mode, typing a closing parenthesis will skip

Re: [racket-dev] DrRacket automatic parentheses mode update

2012-12-03 Thread Robby Findler
Thanks, Nadeem! Robby On Mon, Dec 3, 2012 at 9:30 PM, Nadeem Abdul Hamid nad...@acm.org wrote: Some improvements to DrRacket's automatic parentheses mode are now available in the nightly build version and git repository. If you have previous tried auto-parens and abandoned it, or if you have

[racket-dev] Quick feedback on first planet2 experience

2012-12-03 Thread David Van Horn
- It's not clear what the red asterisk means here: https://plt-etc.byu.edu:9004/search (Sam tells me it means recently updated.) - There's a typo (User-spcific) in the output of raco pkg show. - The details link on the package upload page is broken:

Re: [racket-dev] Quick feedback on first planet2 experience

2012-12-03 Thread Jay McCarthy
Thanks On Mon, Dec 3, 2012 at 9:39 PM, David Van Horn dvanh...@ccs.neu.edu wrote: - It's not clear what the red asterisk means here: https://plt-etc.byu.edu:9004/search (Sam tells me it means recently updated.) Yup - There's a typo (User-spcific) in the output of raco pkg show. Fixed