Re: [racket] Losing decimal in SQL Server query result

2012-10-31 Thread Ryan Culpepper
ODBC claims to only support precisions up to 15, so maybe it's overreacting to the unsupported precision by truncating the number to an integer. Can you try casting the field to a lower-precision numeric and let me know what happens? For example, select cast(creditawarded as numeric(10,4))

Re: [racket] Mutation of structure elements

2012-10-31 Thread Jay McCarthy
My matrix package actually only provides semi-persistent (a technical term in the data structures world, I guess) matrices. A fully functional one would probably just use a double layered hasheq. Basically, you can always read any older version of the matrix, but you only modify the latest modific

Re: [racket] Mutation of structure elements

2012-10-31 Thread Danny Yoo
On Wed, Oct 31, 2012 at 5:12 PM, Gregory Woodhouse wrote: > I've been thinking about whether how to implement matrices in Racket. One > obvious option is just to use a vector Oh! That's related to something I was coding up called "multidim" to do multi-dimensional matrices. Here is the source

[racket] Mutation of structure elements

2012-10-31 Thread Gregory Woodhouse
I've been thinking about whether how to implement matrices in Racket. One obvious option is just to use a vector ;;a matrix with data stored in the vector data (struct matrix (rows cols [data #:mutable])) and then entries can be retrieved simply enough ;;return the (i, j)th element of m ;;row

Re: [racket] Object% equal? for Hash#

2012-10-31 Thread Danny Yoo
> But, now I have to had an attribute wich do not have to tested and I can't > figure the best way out. > > Would I investigate with inspector or the equal<%> interface. > Both ways, I don't know how to do this. The doc is pretty brief about that. Are you saying that there are fields in your objec

[racket] Losing decimal in SQL Server query result

2012-10-31 Thread Greg Graham
Hello everyone, I attempting to use the Racket db interface to access a Microsoft SQL Server 2005 database. The field "creditaward" is defined as numeric(19,7), and in the case of the following query, I should get a value of 1.25 rather than 1. Anyone have an idea how I get to the fractional pa

Re: [racket] call-with-limits not failing gracefully

2012-10-31 Thread J. Ian Johnson
My bad, not reading the spec carefully. Should have installed a handler for exn:fail:resource. -Ian - Original Message - From: "Matthew Flatt" To: "J. Ian Johnson" Cc: "users" Sent: Wednesday, October 31, 2012 12:42:48 PM GMT -05:00 US/Canada Eastern Subject: Re: [racket] call-with-limi

Re: [racket] call-with-limits not failing gracefully

2012-10-31 Thread Matthew Flatt
Is there a memory limit that does work? That is, does a 1GB limit work? 2GB? 500MB? At Wed, 31 Oct 2012 08:26:45 -0400 (EDT), "J. Ian Johnson" wrote: > I have a 64-bit machine and OS with 16GB RAM. I have some benchmarks that I > want to time out after an hour or die if they use 4GB memory. > >

Re: [racket] Typed Racket Predicate Generation Regression?

2012-10-31 Thread Ray Racine
Orthogonal to the type system any unsynchronized parallel read/write is unsafe. if (eq? (unbox bx) 3) (let ((b (unbox bx)) ... Here assume the type system is not subverted there is a serious lurking problem nonetheless. Actually larger, as at least if the parallel process consistently

[racket] Object% equal? for Hash#

2012-10-31 Thread Ted
Hi the list, I'm facing a new problem with Hash parsing with object% keys. So far, I used (inspect #f) to make public the fields and have the appropriate equal? response. But, now I have to had an attribute wich do not have to tested and I can't figure the best way out. Would I investigate with i

Re: [racket] call-with-limits not failing gracefully

2012-10-31 Thread J. Ian Johnson
Yes, 64-bit build. -Ian - Original Message - From: "Robby Findler" To: "J. Ian Johnson" Cc: "users" Sent: Wednesday, October 31, 2012 8:41:40 AM GMT -05:00 US/Canada Eastern Subject: Re: [racket] call-with-limits not failing gracefully Do you have a 64bit build of Racket? (There is pro

Re: [racket] call-with-limits not failing gracefully

2012-10-31 Thread Robby Findler
Do you have a 64bit build of Racket? (There is probably a better way to check, but one thing you can do is (fixnum? (expt 2 40)); #t means 64 bit build.) Robby On Wed, Oct 31, 2012 at 7:26 AM, J. Ian Johnson wrote: > I have a 64-bit machine and OS with 16GB RAM. I have some benchmarks that I >

Re: [racket] require (git ...)

2012-10-31 Thread Laurent
Cool. Don't hesitate to say it aloud when it's ready! ;) On Tue, Oct 30, 2012 at 7:56 PM, Jay McCarthy wrote: > This is very close to what is nearly done. :) > > On Tue, Oct 30, 2012 at 12:47 PM, Ray Racine wrote: > > That'd be it. FWIW, as some of sort of 'next-generation' planet-like > > faci

[racket] call-with-limits not failing gracefully

2012-10-31 Thread J. Ian Johnson
I have a 64-bit machine and OS with 16GB RAM. I have some benchmarks that I want to time out after an hour or die if they use 4GB memory. Unfortunately, the entire VM dies with OOM instead of carrying on. I'm running from the terminal. Is there some other option I need to pass to not limit the