Re: [racket-dev] Floating-Point Compliance Testing

2013-02-07 Thread Neil Toronto
On 02/07/2013 12:09 PM, Laurent wrote: On Thu, Feb 7, 2013 at 5:50 PM, Neil Toronto mailto:neil.toro...@gmail.com>> wrote: Today is not that day, but thanks for asking about this anyway. :) On one machine with Ubuntu 12.10, I get no error, but on another machine with Ubuntu 12.04,

Re: [racket-dev] Floating-Point Compliance Testing

2013-02-07 Thread Neil Toronto
DrDr runs (test-floating-point 1000) every push, which has returned only '() for weeks. In your output, I don't see anything that would indicate a problem with Racket. We can almost certainly pin the blame on your processor or the standard libraries on your platform. Even though you got errors

Re: [racket-dev] find-secs error while building 5.3.2 (fwd)

2013-02-06 Thread Neil Toronto
ds failing to find the seconds? Robby On Wed, Feb 6, 2013 at 5:02 PM, Neil Toronto mailto:neil.toro...@gmail.com>> wrote: On 02/06/2013 02:14 PM, Jimmy Olgeni wrote: On Wed, 6 Feb 2013, Jimmy Olgeni wrote: The problem is that, due to this error,

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

2013-02-06 Thread Neil Toronto
On 02/06/2013 03:28 PM, stamo...@racket-lang.org wrote: stamourv has updated `master' from bb216d142c to 117c81e2a6. http://git.racket-lang.org/plt/bb216d142c..117c81e2a6 =[ One Commit ]= Directory summary: 100.0% collects/meta/ ~

Re: [racket-dev] find-secs error while building 5.3.2 (fwd)

2013-02-06 Thread Neil Toronto
On 02/06/2013 02:14 PM, Jimmy Olgeni wrote: On Wed, 6 Feb 2013, Jimmy Olgeni wrote: The problem is that, due to this error, "make install" does not complete and I cannot get a repeatable build for the package, but maybe I can find a way to exclude the plot docs build. Does the weird date come

Re: [racket-dev] Installing Optimization Coach broke Racket's reader

2013-01-30 Thread Neil Toronto
01/30/2013 05:12 PM, Neil Toronto wrote: Setup finished, still had the reader error. I removed Optimization Coach, cleaned, and ran setup again. My reader is still broken. "git status" shows no changes in my local repo. "raco pkg show" shows no packages. "raco link -l

Re: [racket-dev] Installing Optimization Coach broke Racket's reader

2013-01-30 Thread Neil Toronto
are these invisible craptastic things that are breaking my stuff? Neil ⊥ On 01/30/2013 04:47 PM, Neil Toronto wrote: Ran this program: #lang racket (require planet2) (install "optimization-coach") Realized setup was running on one thread, stopped program, closed DrRacket. F

[racket-dev] Installing Optimization Coach broke Racket's reader

2013-01-30 Thread Neil Toronto
Ran this program: #lang racket (require planet2) (install "optimization-coach") Realized setup was running on one thread, stopped program, closed DrRacket. Figured Optimization Coach must have been downloaded already, so I ran setup: $ ./raco setup Everything appeared to work. Started DrRac

Re: [racket-dev] long double for racket

2013-01-28 Thread Neil Toronto
That's how I avoid a lot of pain in testing `math/flonum'. First, though: Michael, really good work on this. I'm looking forward to using it! To randomly test the functions in isolation, you need: * A function that measures error in ulps (an extfl version of `flulp-error') and a way to di

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

2013-01-23 Thread Neil Toronto
On 01/23/2013 04:19 PM, sa...@racket-lang.org wrote: aac25b4 Eric Dobson 2013-01-17 23:52 : | Make AnyValues but don't actually start using it yet. : Is this like the `any' contract? Do you have something specific in mind for it? Neil ⊥ _ Racket Developers list: h

Re: [racket-dev] Performance Lab

2013-01-21 Thread Neil Toronto
On 01/21/2013 10:25 PM, Curtis Dutton wrote: I've been using racket now for about 4 years now. I use it for everything that I can and I love it. It is really an awesome system, and I just can't say "THANKS" enough to all of you for racket. That being said, I'd like to become more active with the

Re: [racket-dev] Release Announcement for v5.3.2

2013-01-18 Thread Neil Toronto
On 01/17/2013 11:57 AM, Ryan Culpepper wrote: ntoronto: - math library (f2dc2027, 0936d8c2, 3670916a) * The new `math' library provides functions and data structures for working with numbers and collections of numbers. Functions include non-elementary (such as gamma, zeta, Lambert's W)

Re: [racket-dev] Pre-Release Checklist for v5.3.2

2013-01-17 Thread Neil Toronto
On 01/17/2013 11:46 AM, Ryan Culpepper wrote: * Neil Toronto - Plot Tests - Images Tests - Inspect icons Done and pass, along with the math tests. Can you add those to my list? Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev

[racket-dev] TR: exporting a variable-arity map to untyped code (a bit urgent; release is imminent)

2013-01-14 Thread Neil Toronto
A recent change to the contract barrier has rendered one of my tricks useless. Worse, the change makes things more correct, so I can't submit a bug report. :p `math/array' exports `array-map', which has a type much like that of `map'. Also like `map', its type can't be converted to a contract.

Re: [racket-dev] drracket interactivity testing help request

2013-01-08 Thread Neil Toronto
On 01/06/2013 08:03 PM, Robby Findler wrote: As you (hopefully) noticed, I've spent a bunch of time this release cycle trying to improve drracket's interactivity and I'm at the point now where I could use a little help testing. So, if you have any time to play with the latest from git (or a night

Re: [racket-dev] Motivation for polymorphic opaque types

2013-01-07 Thread Neil Toronto
I think this "specific case" covers pretty much every abstract data type written in Typed Racket, including all those exported by PFDS and math/array. (Well, the RAList type in PFDS would have to wrap its lists of roots in a struct to get great performance in untyped Racket instead of just good

[racket-dev] Motivation for polymorphic opaque types

2013-01-05 Thread Neil Toronto
I've implemented Okasaki's purely functional, random-access lists in Typed Racket. They perform well there. I thought I'd see how they would do crossing the contract barrier, so I ported my benchmarks to Racket. Here's what I get doing `list-ref', passing each index of 1-to-10-element lists 10

Re: [racket-dev] case-> and for/sum:

2013-01-04 Thread Neil Toronto
On 01/04/2013 01:27 PM, Jens Axel Søgaard wrote: 2013/1/3 Neil Toronto : I solved it by not using `for/sum' and writing this ridiculous function for the recursive base case and the initial values in `x': (: zero-of (case-> (Real -> Real) (Number -> N

Re: [racket-dev] Inferring numeric function types from representative argument values

2013-01-04 Thread Neil Toronto
On 01/04/2013 10:38 AM, Vincent St-Amour wrote: At Thu, 03 Jan 2013 21:09:52 -0700, Neil Toronto wrote: I thought it would be helpful to find the most precise types possible for numeric functions. I wrote a program that infers them using a few thousand representative argument values, which

[racket-dev] Inferring numeric function types from representative argument values

2013-01-03 Thread Neil Toronto
I thought it would be helpful to find the most precise types possible for numeric functions. I wrote a program that infers them using a few thousand representative argument values, which have been chosen to exhibit underflow, overflow, exactness preservation (e.g. perfect squares for `sqrt' and

Re: [racket-dev] case-> and for/sum:

2013-01-03 Thread Neil Toronto
I solved it by not using `for/sum' and writing this ridiculous function for the recursive base case and the initial values in `x': (: zero-of (case-> (Real -> Real) (Number -> Number))) (define (zero-of x) 0) Fortunately, it should get inlined. I also renamed `U' to `V'

Re: [racket-dev] Five feature/limitation interactions conspire to drive mad

2013-01-02 Thread Neil Toronto
On 01/02/2013 02:51 PM, Vincent St-Amour wrote: At Wed, 02 Jan 2013 12:39:21 -0700, Neil Toronto wrote: One place this bit me pretty early was getting TR to optimize loops over indexes *without using casts or assertions*. Right, fixnum types are tricky. They don't have many closure prope

Re: [racket-dev] Five feature/limitation interactions conspire to drive mad

2013-01-02 Thread Neil Toronto
On 01/02/2013 10:09 AM, Matthias Felleisen wrote: I remain worried that R programmers will want to use math and array and matrix and friends and will experience performance problems when you have invested so much work in doing it right the first time. But we will see. They'll experience perfo

Re: [racket-dev] TR: Five feature/limitation interactions conspire to drive mad

2013-01-01 Thread Neil Toronto
On 12/31/2012 02:56 PM, Vincent St-Amour wrote: At Mon, 31 Dec 2012 13:27:50 -0700, Neil Toronto wrote: 2. Don't generalize argument types in let loops. This is a bad idea. Often, inferring the types of loops only works because of type generalization. Agreed. Since this one is o

Re: [racket-dev] Five feature/limitation interactions conspire to drive mad

2013-01-01 Thread Neil Toronto
On 01/01/2013 03:35 PM, Matthias Felleisen wrote: Neil, thanks for the user story. We should hear more of those for all kinds of corners in our world. You're welcome! Question: did you start the math library in an untyped form (and switch) or did you go with types from the get-go? It's

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

2013-01-01 Thread Neil Toronto
On 01/01/2013 04:16 PM, stamo...@racket-lang.org wrote: stamourv has updated `master' from 1f8370d2d6 to 678451f8c4. http://git.racket-lang.org/plt/1f8370d2d6..678451f8c4 =[ 2 Commits ]== Directory summary: 10.3% collects/tests/typed-

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

2013-01-01 Thread Neil Toronto
On 01/01/2013 12:36 PM, mfl...@racket-lang.org wrote: 07d5a9e Matthew Flatt 2013-01-01 12:31 : | fix `expt' on small negative number and large positive odd | | The pow() function apparently gets it wrong on some platforms. | | Closes PR 13391 Thanks, Matthew. I'm looking forward to getting bug

[racket-dev] TR: Five feature/limitation interactions conspire to drive mad

2012-12-31 Thread Neil Toronto
The subject sounds complainy, and so will the rest of this email. So I will state up front that I love Typed Racket, and I'm only frustrated because I want to love it more. Also, I apologize for the length of this email, but I have to tell a story. Otherwise, I'll get a bunch of "Why don't you

Re: [racket-dev] Contract barrier inefficiencies

2012-12-29 Thread Neil Toronto
On 12/29/2012 06:18 PM, Robby Findler wrote: On Sat, Dec 29, 2012 at 3:57 PM, Matthias Felleisen mailto:matth...@ccs.neu.edu>> wrote: I think the questions really concern the interaction between TR's generation of contracts and contracts themselves: 1. TR does not seem to exploit

Re: [racket-dev] Contract barrier inefficiencies

2012-12-28 Thread Neil Toronto
On 12/27/2012 06:21 PM, Robby Findler wrote: One other place that we realized pretty quickly where we were wrong about the boundaries and inefficiencies is struct declarations. It isn't uncommon to put contracts on structs and put them in their own module (scribble does this). Currently the contr

Re: [racket-dev] Contract barrier inefficiencies

2012-12-28 Thread Neil Toronto
On 12/28/2012 08:23 AM, Matthias Felleisen wrote: On Dec 27, 2012, at 9:22 PM, Neil Toronto wrote: Sorry it took so long to reply. I applied the patch and verified that my example runs a *lot* faster (with domain and range contracts identical, of course). Unfortunately, a similar test using

Re: [racket-dev] Contract barrier inefficiencies

2012-12-27 Thread Neil Toronto
The diff is broken because it doesn't account for blame. The test should be making sure that the two contracts blame the same things (alternatively, we could not check that and just drop the inner contract. That may be better, but not as easy to try ...) Robby On Tue, Dec 18, 2012 at 12:06 PM,

Re: [racket-dev] Expression comments

2012-12-27 Thread Neil Toronto
It would be really easy to mix the comment and code highlighting colors by averaging their RGB values pointwise. Another, easier and possibly more visually robust way to mix the colors is to set the text's alpha to 1/2 to blend it with the editor background. Neil ⊥ On 12/27/2012 03:39 PM, El

Re: [racket-dev] long double for racket

2012-12-23 Thread Neil Toronto
EEE-compliant. We'll find out. Neil ⊥ On 12/23/2012 06:17 PM, Robby Findler wrote: Could you formulate some test cases to check for this behavior? Robby On Sun, Dec 23, 2012 at 7:07 PM, Neil Toronto mailto:neil.toro...@gmail.com>> wrote: On 12/22/2012 10:24 AM, Michael Filon

Re: [racket-dev] long double for racket

2012-12-23 Thread Neil Toronto
On 12/22/2012 10:24 AM, Michael Filonenko wrote: Also, long double arithmetic requires setting "extended mode" flag on FPU, which forces the FPU to use 80-bit registers. The side effect on that flag is that the FPU gives slightly different (more accurate, but not IEEE-compliant) results for 64-bi

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

2012-12-22 Thread Neil Toronto
On 12/22/2012 05:04 PM, Matthias Felleisen wrote: On Dec 22, 2012, at 1:02 PM, Jens Axel Søgaard wrote: According to https://www.cs.drexel.edu/~wan/publications/thesis.pdf page 33 Gauss elimation turns onto a O(n^4) algorithm. (Geddes mentions the same issue in relation to Gaussian elimina

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

2012-12-22 Thread Neil Toronto
On 12/22/2012 11:02 AM, Jens Axel Søgaard wrote: 2012/12/22 : 1aebd17 Neil Toronto 2012-12-21 22:59 | * Specialized row reduction for determinants; removed option to not do | partial pivoting (it's never necessary otherwise) Partial pivoting is used to reduce round-off error. I

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

2012-12-21 Thread Neil Toronto
On 12/21/2012 09:33 PM, ro...@racket-lang.org wrote: robby has updated `master' from 7cad346cf8 to fdd9344b27. http://git.racket-lang.org/plt/7cad346cf8..fdd9344b27 =[ One Commit ]= Directory summary: 100.0% collects/realm/chapter5/ ~

Re: [racket-dev] Passing flvectors to BLAS and LAPACK

2012-12-20 Thread Neil Toronto
Put the time machine away, Matthew. You're not fooling anybody. Thanks. :D On 12/20/2012 07:33 PM, Matthew Flatt wrote: `flvector->cpointer'? At Thu, 20 Dec 2012 19:17:13 -0700, Neil Toronto wrote: How hard would it be to allow flvectors to be passed to foreign functions as do

[racket-dev] Passing flvectors to BLAS and LAPACK

2012-12-20 Thread Neil Toronto
How hard would it be to allow flvectors to be passed to foreign functions as double pointers? BLAS and LAPACK linear algebra functions primarily accept pointers to floating-point arrays in row-major order. If we could send flvectors directly (or at least pointers to their elements), we could r

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

2012-12-19 Thread Neil Toronto
On 12/19/2012 07:37 PM, mfl...@racket-lang.org wrote: aa08a68 Matthew Flatt 2012-12-19 18:30 : | add phantom byte strings | | A phantom byte string is a small object that the memory | manager treats as an arbitrary-sized object, where the | size is specified when the phantom byte string is creat

[racket-dev] Contract barrier inefficiencies

2012-12-18 Thread Neil Toronto
So there are potentially huge inefficiencies when mixing typed and untyped code, usually when functions are passed across the contract barrier. Here are a few things that I think cause them. Can the People Who Know This Stuff Really Well please comment on these issues? 1. Functions that c

Re: [racket-dev] supplying typed and untyped entry points, take 2

2012-12-17 Thread Neil Toronto
2/17/2012 06:34 PM, Matthias Felleisen wrote: Begin forwarded message: From: Matthias Felleisen Subject: Re: [racket-dev] Typed versions of untyped collections Date: December 17, 2012 6:44:19 PM EST To: Neil Toronto Cc: dev@racket-lang.org Okay. I propose we figure out how to allow people pr

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

2012-12-17 Thread Neil Toronto
On 12/17/2012 05:48 PM, Robby Findler wrote: I'm not sure about this change. If I pass in a buggy function, I'm not sure I'd want the errors to get swallowed. The errors are almost always division by zero or some similar mathematical domain error, because plotted functions get sent exact rati

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Neil Toronto
On 12/17/2012 04:32 PM, Matthias Felleisen wrote: On Dec 17, 2012, at 6:10 PM, Neil Toronto wrote: `plot' is written in untyped Racket. There's no performance problem with typed plots at all; in fact, using `plot/typed' from TR code ends up checking exactly the same contrac

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Neil Toronto
On 12/17/2012 03:55 PM, Matthias Felleisen wrote: On Dec 17, 2012, at 5:43 PM, Neil Toronto wrote: On 12/17/2012 02:44 PM, Matthias Felleisen wrote: My understanding is that -- Neil created a single file P, I believe it is typed -- he tells you to load plot/typed/ for the typed version

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Neil Toronto
On 12/17/2012 02:44 PM, Matthias Felleisen wrote: My understanding is that -- Neil created a single file P, I believe it is typed -- he tells you to load plot/typed/ for the typed version -- he tells you to load plot/ for the untyped version Somewhere in this arrangement a call in some u

Re: [racket-dev] Typed versions of untyped collections

2012-12-16 Thread Neil Toronto
Changing the subject line for wider appeal. On 12/16/2012 06:41 PM, Eli Barzilay wrote: 10 minutes ago, Neil Toronto wrote: I think I'd rather have a convention in Typed Racket that (require foo) imports `foo/typed' when it exists. +14. I think it came up in the past, but I don&

Re: [racket-dev] Fwd: [DrDr] R25903 (timeout 0) (unclean 1) (stderr 1) (changes 63)

2012-12-16 Thread Neil Toronto
On 12/16/2012 05:58 PM, Eli Barzilay wrote: 20 minutes ago, Neil Toronto wrote: I got this email from DrDr after I added `typed/plot'. The error: [] BTW, I did point out the failure when it happened... It had an "I told you so" kind of tone, so I ignored it. :p To ex

[racket-dev] Fwd: [DrDr] R25903 (timeout 0) (unclean 1) (stderr 1) (changes 63)

2012-12-16 Thread Neil Toronto
I got this email from DrDr after I added `typed/plot'. The error: dependencies: unsatisfied dependency for "dr-bin": "racket/collects/plot/common/axis-transform.rkt" (in: "racket/collects/typed/plot/common/compiled/types_rkt.dep") It looks like `typed/plot' is being distributed in circumstanc

Re: [racket-dev] bit-vectors and serialization

2012-12-16 Thread Neil Toronto
I'd call it an error if something couldn't be correctly serialized and deserialized between platforms. Neil ⊥ On 12/16/2012 05:22 PM, Robby Findler wrote: If there's no significant performance penalty, then I'd say that we should make things work between 32bit and 64bit builds. (If there is a

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

2012-12-15 Thread Neil Toronto
On 12/15/2012 10:24 PM, Eli Barzilay wrote: Two notes: 1. This looks like another case where a `plot/typed' is better than the other way. Better for users or for separating code by responsibility? At any rate, I don't care where it is as long as it's consistent with other top-level colle

Re: [racket-dev] Feature request - contract form that splits provide/contract into two parts

2012-12-14 Thread Neil Toronto
The `plot' library uses `unstable/latent-contract' to do exactly that. Example: the identity function restricted to `integer?' values: #lang racket (module internal-provider racket (require unstable/latent-contract/defthing) (provide int-id int-id:doc) ; export doc generator too (defpro

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

2012-12-11 Thread Neil Toronto
Thanks for the fix and the stress test! Also, I want to make sure I understand this: On 12/11/2012 09:32 AM, mfl...@racket-lang.org wrote: collects/math/private/bigfloat/mpfr.rkt ~~~ --- OLD/collects/math/private/bigfloat/mpfr.rkt +++ NEW/collects/math/privat

Re: [racket-dev] Contract violation from custodian shutdown

2012-12-10 Thread Neil Toronto
10/2012 08:57 AM, Matthew Flatt wrote: It's hard to say where the bug is, but there may be some problem in the implementation of custodians of `register-custodian-shutdown'. Is it repeatable? At Thu, 06 Dec 2012 16:48:37 -0700, Neil Toronto wrote: I just got this message on my console, I

Re: [racket-dev] We just had our first totally clean build in DrDr in a long time

2012-12-08 Thread Neil Toronto
Is a clean build an accident? If so, we've gone back down to 0. On 12/08/2012 01:45 PM, Jay McCarthy wrote: We should get one of those signs like in factories: X days accident free. -- Jay McCarthy mailto:j...@cs.byu.edu>> Assistant Professor / Brigham Young University http://faculty.cs.byu.edu

[racket-dev] Contract violation from custodian shutdown

2012-12-06 Thread Neil Toronto
I just got this message on my console, I think after closing a tab, which coincided with DrRacket hanging: eventspace-shutdown?: contract violation expected: eventspace? given: # context...: /home/neil/plt/collects/mred/private/wx/common/queue.rkt:201:0: shutdown-eventspace! It's o

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

2012-12-06 Thread Neil Toronto
On 12/06/2012 04:12 PM, stamo...@racket-lang.org wrote: cc8bd4f Vincent St-Amour 2012-12-06 11:59 : | Make srclocs serializable. : M collects/racket/private/serialize.rkt | 10 -- M collects/scribblings/reference/serialization.scrbl | 10 +- M collects/tests/r

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

2012-12-06 Thread Neil Toronto
a...@ccs.neu.edu>> wrote: On Thu, Dec 6, 2012 at 2:36 PM, Jay McCarthy mailto:jay.mccar...@gmail.com>> wrote: > On Thu, Dec 6, 2012 at 3:32 PM, Neil Toronto mailto:neil.toro...@gmail.com>> wrote: >> >> On 12/06/2012 02:08 PM, Sam Tobi

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

2012-12-06 Thread Neil Toronto
On 12/06/2012 02:08 PM, Sam Tobin-Hochstadt wrote: On Thu, Dec 6, 2012 at 12:44 PM, wrote: | Reimplemented really simple FFI functions (e.g. mpfr-prec, mpfr-exp) to | avoid calling overhead If you have meaningful benchmarks where this makes a difference, that may be useful to Matthew, since

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

2012-12-06 Thread Neil Toronto
On 12/06/2012 02:08 PM, Sam Tobin-Hochstadt wrote: On Thu, Dec 6, 2012 at 12:44 PM, wrote: | Reimplemented really simple FFI functions (e.g. mpfr-prec, mpfr-exp) to | avoid calling overhead If you have meaningful benchmarks where this makes a difference, that may be useful to Matthew, since

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

2012-12-03 Thread Neil Toronto
t-lang.org/plt/325600b0cf..8f17913d55 =[ One Commit ]= Directory summary: 74.0% collects/math/private/array/ 25.9% collects/math/tests/ ~~~~~~ 8f17913 Neil Toronto 2012-12-02 19:02 : | Fixed memory leak in making arrays strict: doin

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 use

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 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 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 wrote: This error seems wrong: #lang racket (require ffi/unsafe ffi/unsafe/cvector) (define-cstruct _mpz ([alloc _int

[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: canno

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

2012-12-02 Thread Neil Toronto
On 12/02/2012 12:10 PM, Robby Findler wrote: On Sun, Dec 2, 2012 at 11:43 AM, Matthias Felleisen wrote: On Dec 1, 2012, at 9:23 PM, Robby Findler wrote: I think the high-level answer is that you have to understand something about details that aren't currently specified but nevertheless are h

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

2012-12-01 Thread Neil Toronto
On 12/01/2012 07:05 PM, Neil Toronto wrote: Ah. It prints #f for me when I have debugging info turned on in DrRacket; otherwise I get #. Must be inlining keeping it around or something. The problem with either finalizers or weak boxes is that neither provides enough guarantees. Finalizers are

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

2012-12-01 Thread Neil Toronto
2 10:58 AM, Robby Findler wrote: How about using a weak box instead? Robby On Sat, Dec 1, 2012 at 11:45 AM, Neil Toronto wrote: I'm getting ready to push a change to math/array that fixes a memory leak. I've devised a test that I think will determine whether an array's proce

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

2012-12-01 Thread Neil Toronto
fine (make-box-thing v) (make-weak-box (λ (_) v))) (define bx (make-box-thing 4)) But this `bx' doesn't let go of its value, either. I can't help but think I'm missing something really stupid, though. Neil ⊥ On 12/01/2012 10:58 AM, Robby Findler wrote: How about using

[racket-dev] Testing whether a procedure gets collected

2012-12-01 Thread Neil Toronto
I'm getting ready to push a change to math/array that fixes a memory leak. I've devised a test that I think will determine whether an array's procedure gets collected after the array is made strict, but I don't know whether it works only by accident. Here it is: (define: collected? : (Boxof B

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-29 Thread Neil Toronto
I've pretty much made up my mind on this, so please don't feel like you have to take time to respond point-by-point. Unless you've seen a gaping hole in my reasoning, anyway, then by all means, have at it. On 11/26/2012 05:41 PM, Eli Barzilay wrote: Two hours ago, Neil Toro

[racket-dev] TR: Is there a type for this?

2012-11-28 Thread Neil Toronto
I'm trying to give the `flvector-map' function a sensible type. A stubbed-out attempt follows, along with an application of it that fails typechecking. #lang typed/racket (require racket/flonum) (: flvector-map (case-> ((Flonum -> Flonum) FlVector -> FlVector) ((Flonum Flonum F

Re: [racket-dev] The `var` pattern in `match`

2012-11-28 Thread Neil Toronto
On 11/28/2012 06:04 PM, David Van Horn wrote: On 11/28/12 7:53 PM, Sam Tobin-Hochstadt wrote: Currently, `match` provides a pattern named `var`, which makes `(var id)` equivalent to `id`, but without special cases for things like `_` and `...`. However, this frequently conflicts with structures

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-26 Thread Neil Toronto
On 11/24/2012 05:36 PM, Eli Barzilay wrote: I'm probably missing the problem, which wouldn't be surprising since I didn't even tried to look up the `array' documentation... Well, it didn't exist until I pushed it on Saturday night, so looking it up wouldn't have done you any good. :D But, t

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

2012-11-25 Thread Neil Toronto
On 11/25/2012 06:24 AM, mfl...@racket-lang.org wrote: 24f358a Matthew Flatt 2012-11-25 06:22 : | scribble latex: work around `\href{...#...}{...}' as a macro argument | | The `math' document build was failing because `\marginpar' does not | like `\href{...#...}{...}' as an argument. Does this

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-23 Thread Neil Toronto
00" "01" "02"]] [ρ [ρ "10" "11" "12"]] [ρ [ρ "20" "21" "22"]] [ρ [ρ "30" "31" "32"]]]) Robby On Fri, Nov 23, 2012 at 4:46 PM, Neil Toronto

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-23 Thread Neil Toronto
Neil ⊥ On 11/23/2012 03:35 PM, Robby Findler wrote: Okay, I can't resist: why not use parens? On Fri, Nov 23, 2012 at 4:31 PM, Neil Toronto wrote: On 11/23/2012 03:03 PM, Robby Findler wrote: That [implicitly quasiquoting array data] sounds crazy, man. How about #:keywords instead?

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-23 Thread Neil Toronto
On 11/23/2012 03:03 PM, Robby Findler wrote: That [implicitly quasiquoting array data] sounds crazy, man. How about #:keywords instead? Like this? (array #:keywords (list) ((list 1 2))) Deciding how to print elements would be a problem. If not, then I think you're better off just going w

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-23 Thread Neil Toronto
On 11/23/2012 01:47 PM, Neil Toronto wrote: On 11/22/2012 11:33 AM, Eli Barzilay wrote: Two days ago, Neil Toronto wrote: Anyway, it occurred to me that I need to provide a more robust way to generate code for literal arrays anyway. Keywords are more easily preserved by macros than syntax

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-23 Thread Neil Toronto
On 11/22/2012 11:33 AM, Eli Barzilay wrote: Two days ago, Neil Toronto wrote: Anyway, it occurred to me that I need to provide a more robust way to generate code for literal arrays anyway. Keywords are more easily preserved by macros than syntax properties: Why not use vector syntax

Re: [racket-dev] Survey for DrRacket users related to automatic parentheses behavior

2012-11-22 Thread Neil Toronto
On 11/22/2012 05:20 PM, Nadeem Abdul Hamid wrote: 1. Do you use the automatic parentheses feature of DrRacket? No. I've disabled it and similar features on every code editor I've used. 2a. If yes, does the proposal above resonate well with you? Answering anyway: I would be willing to try it

Re: [racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-20 Thread Neil Toronto
7;s sneaky eval:alts to display (array [0 1 2 3]) but evaluate (array (array-row 0 1 2 3)). Neil ⊥ On 11/18/2012 08:12 PM, Matthias Felleisen wrote: (Perhaps this suggests a problem with making a macro depend on the shape of parens around a sub-expression.) On Nov 18, 2012, at 10:01 PM, Neil Tor

[racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

2012-11-18 Thread Neil Toronto
I'm writing the documentation for math/array, and the examples all fail. Here's a simple one: @examples[#:eval untyped-eval (array [0 1 2 3])] The evaluator raises this error: application: not a procedure; expected a procedure that can be applied to arguments give

Re: [racket-dev] Racket installs more files on amd64 than on i386

2012-11-18 Thread Neil Toronto
It's a problem with the contract boundary. The examples work fine in Typed Racket. The problem type is this: (: flomap-transform (case-> (flomap Flomap-Transform -> flomap) (flomap Flomap-Transform Integer Integer Integer Integer -> flomap))) The contract system claims th

[racket-dev] Closing pull requests

2012-11-17 Thread Neil Toronto
How do I close pull requests made to the plt/racket repo on GitHub? Am I authorized to do that in the first place? Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev

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

2012-11-16 Thread Neil Toronto
On 11/16/2012 03:31 PM, Ryan Culpepper wrote: On 11/16/2012 04:43 PM, Neil Toronto wrote: (FWIW, you're right about libmpfr not being needed at compile time. Well, it shouldn't be. I used Eli's nifty interaction-fakery code forms in the `math/bigfloat' docs, for exa

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

2012-11-16 Thread Neil Toronto
On 11/16/2012 03:02 PM, Matthew Flatt wrote: At Fri, 16 Nov 2012 14:43:56 -0700, Neil Toronto wrote: If so, it's a little weird, because libmpfr isn't supposed to be loaded until its first export is used. The constants are all delayed (their names are bound to macros that expand

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

2012-11-16 Thread Neil Toronto
On 11/16/2012 02:10 PM, mfl...@racket-lang.org wrote: 9a48e5d Matthew Flatt 2012-11-16 14:03 : | math: avoid import at unnecessary phase | | This repair avoids using at compile time external libraries that | are needed at run time. : M collects/math/private/matrix/matrix-sequences.rkt | 4 +--

[racket-dev] Math library pushed

2012-11-16 Thread Neil Toronto
I've just made the initial commit for the math library. You will all notice the build time increase. Some will notice that "(require math)" imports a bunch of goodies that Racket didn't have before. About half is documented so far, and half has coverage in the test cases. Some things are known

Re: [racket-dev] Racket doesn't compile without cairo

2012-11-10 Thread Neil Toronto
On 11/09/2012 08:33 AM, Eli Barzilay wrote: Four hours ago, Sam Tobin-Hochstadt wrote: On Fri, Nov 9, 2012 at 4:57 AM, Marijn wrote: I've had a report that building racket without X doesn't work if cairo is not installed. Presumably in this mode it should not need cairo, right? Libraries lik

Re: [racket-dev] Planet 2 Beta Release

2012-11-08 Thread Neil Toronto
On 11/08/2012 06:16 AM, Jay McCarthy wrote: Now that the 5.3.1 release is finished, I've just pushed the beta release of Planet 2 to the Racket core. I just read the docs. This is friggin' awesome. Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev

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

2012-10-29 Thread Neil Toronto
On 10/29/2012 02:41 PM, Sam Tobin-Hochstadt wrote: This commit marks a few files that have intermittent failures as randomly failing, and possibly-more-controversially, removes the annotation from some genuinely random tests. These tests, such as the random test for places, consistently succeed.

Re: [racket-dev] Is this a type error?

2012-10-23 Thread Neil Toronto
On 10/23/2012 05:19 PM, Danny Yoo wrote: #lang typed/racket/base ;; We may have more information about the lambda's name. This will show it. (define-struct: LamPositionalName ([name : Symbol] [path : String];; the source of the name

Re: [racket-dev] Pre-Release Checklist for v5.3.1

2012-10-22 Thread Neil Toronto
On 10/15/2012 10:58 PM, Ryan Culpepper wrote: * Neil Toronto - Plot Tests - Images Tests - Inspect icons All good. Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-17 Thread Neil Toronto
On 10/01/2012 02:06 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 2:26 PM, Neil Toronto wrote: * `math/base' re-exports `racket/math', but with extra constants (like `phi.0') and functions (like `power-of-two?'). It also exports improved hyperbolic functions,

Re: [racket-dev] API naming conventions (Push #25466)

2012-10-16 Thread Neil Toronto
On 10/16/2012 05:43 PM, Robby Findler wrote: Plus, we should just have match built into all of the binding forms. +5 Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev

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

2012-10-15 Thread Neil Toronto
2c56ace Matthew Flatt 2012-10-15 05:54 : | JIT-inline structure allocation | | For simple structure types (no guards, no auto fields, no | procedure property). Inlined allocation makes structure | allocation a little faster; more significantly, it | make structure allocation future-safe. Nice!

[racket-dev] Typed units?

2012-10-08 Thread Neil Toronto
I currently have a function array-fft : (Array Complex) -> (Array Float-Complex) courtesy Robby and James. I'd also eventually like bfarray-fft : (Array Bigfloat-Complex) -> (Array Bigfloat-Complex) and others, corresponding to different kinds and precisions of numbers. It would also be n

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Neil Toronto
On 10/01/2012 06:29 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 6:49 PM, Neil Toronto wrote: #lang typed/racket (: plus (Flonum Flonum -> Flonum)) (define (plus a b) (+ a b)) (module provider racket (require (submod "..")) (provide inline-plus) (defin

<    1   2   3   4   >