Re: [racket-users] file-position in Win32 not working beyond 1 GB

2020-01-01 Thread Matthew Flatt
At Fri, 27 Dec 2019 14:01:33 +0300, Dmitry Pavlov wrote: > Because on my good ol' Windows XP machine, the Utah i386 nigtly build, while > installing successfully, resulted in a Racket executable that the system > refused to run, saying that it is not a correct executable. (The message was >

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-27 Thread Dmitry Pavlov
Matthew, Only today I managed to get back to that problem. But your effort of making a special executable for me still turned out to be relevant. Because on my good ol' Windows XP machine, the Utah i386 nigtly build, while installing successfully, resulted in a Racket executable that the system

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Matthew Flatt
At Sun, 22 Dec 2019 20:28:41 +0300, Dmitry Pavlov wrote: > > > Thanks! It really is a bug in `scheme_get_long_long_val`, where the > > extraction can read past the end of a bignum on a 32-bit platform. > > > > Repair pushed. > Great, thank you! > Given that I do not normally build Racket, should

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Dmitry Pavlov
Thanks! It really is a bug in `scheme_get_long_long_val`, where the extraction can read past the end of a bignum on a 32-bit platform. Repair pushed. Great, thank you! Given that I do not normally build Racket, should I wait for the next snapshot from UoU or Northwestern to check out the

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Matthew Flatt
At Sat, 21 Dec 2019 11:06:33 +0300, Dmitry Pavlov wrote: > The error pops out not on the first or second positioning exceeding 1 GB. In > fact, it happens on different moments in different runs. Thanks! It really is a bug in `scheme_get_long_long_val`, where the extraction can read past the end

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Matthew Flatt
At Sat, 21 Dec 2019 00:22:19 -0500, George Neuner wrote: > Is Racket really writing billions of zeroes rather than creating a > sparse file?  It seems to me that this file should only create 2 actual > data blocks, and (modulo JIT) the program should finish almost > instantly.  What am I

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-21 Thread Dmitry Pavlov
There could be something wrong with `scheme_get_long_long_val`, but it's surprising that it could go wrong in a machine-specific way. Does the error happen for you even in a very short program that tries to set the file position to 1122398240, or does it only happen in your full program? I

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread George Neuner
On 12/20/2019 6:59 PM, Matthew Flatt wrote: At Fri, 20 Dec 2019 23:39:30 +0300, Dmitry Pavlov wrote: > > The Racket-imposed limit should be 64 bits (more than enough) on all > > platforms. I can try to replicate the problem later today, but more > > information on the error message would be

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Matthew Flatt
At Fri, 20 Dec 2019 23:39:30 +0300, Dmitry Pavlov wrote: > > The Racket-imposed limit should be 64 bits (more than enough) on all > > platforms. I can try to replicate the problem later today, but more > > information on the error message would be helpful. > > I do not have access to that Windows

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread George Neuner
On 12/20/2019 2:49 PM, Dmitry Pavlov wrote: I would have understood maximum the limit of maximum signed integer 2^31 = 2 GB (and my program would be fine with 2 GB limit). meant to be "I would have understood the limit of maximum signed integer ..." The fixnum tag is just 1 bit, but you

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Dmitry Pavlov
The Racket-imposed limit should be 64 bits (more than enough) on all platforms. I can try to replicate the problem later today, but more information on the error message would be helpful. I do not have access to that Windows 7 machine until Monday. I managed to reproduce the problem, though,

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Shu-Hung You
On Fri, Dec 20, 2019 at 2:05 PM Shu-Hung You wrote: > > Could it be that the Racket layer importing rktio C code directly uses > get-ffi-obj and does not convert scheme_bignum_type to _int64? > Never mind this -- I got the FFI part wrong. > On Fri, Dec 20, 2019 at 2:01 PM Matthew Flatt wrote:

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Shu-Hung You
Could it be that the Racket layer importing rktio C code directly uses get-ffi-obj and does not convert scheme_bignum_type to _int64? @Dmitry: I guess Racket uses 1 bit for type tagging, leaving only 30+sign (or 62+sign) bits for the actual value. On Fri, Dec 20, 2019 at 2:01 PM Matthew Flatt

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Matthew Flatt
The Racket-imposed limit should be 64 bits (more than enough) on all platforms. I can try to replicate the problem later today, but more information on the error message would be helpful. At Fri, 20 Dec 2019 17:39:37 +0300, Dmitry Pavlov wrote: > Hello, > > On a fresh 32-bit Racket 7.5 install

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Dmitry Pavlov
I would have understood maximum the limit of maximum signed integer 2^31 = 2 GB (and my program would be fine with 2 GB limit). meant to be "I would have understood the limit of maximum signed integer ..." -- You received this message because you are subscribed to the Google Groups "Racket

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Dmitry Pavlov
On a fresh 32-bit Racket 7.5 install on 32-bit Windows 7, (file-position port number) does not work when number is more that 1 GB. On 32-bit machines, the largest fixnum is 2^30  which is 1GB.  I suspect that /file-position/  really wants a fixnum rather than a non-negative-integer as is

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread George Neuner
On 12/20/2019 9:39 AM, Dmitry Pavlov wrote: On a fresh 32-bit Racket 7.5 install on 32-bit Windows 7, (file-position port number) does not work when number is more that 1 GB. On 32-bit machines, the largest fixnum is 2^30  which is 1GB.  I suspect that /file-position/  really wants a