From: Kaz Kylheku on
On 2009-12-05, Spiros Bousbouras <spibou(a)gmail.com> wrote:
> On Sat, 5 Dec 2009 05:42:42 +0000 (UTC)
> Kaz Kylheku <kkylheku(a)gmail.com> wrote:
>> On 2009-12-05, Spiros Bousbouras <spibou(a)gmail.com> wrote:
>> > On 04 Dec 2009 10:01:06 -0800
>> > tar(a)sevak.isi.edu (Thomas A. Russ) wrote:
>> >> Spiros Bousbouras <spibou(a)gmail.com> writes:
>> >>
>> >> > > > 2. Why the requirement that the dimensions of an array are fixnums ?
>> >> > >
>> >> > > Why not? This is not a big restriction, if an implementation wants
>> >> > > bigger arrays, it only has to provide bigger fixnums.
>> >> >
>> >> > fixnums are supposed to be efficient , that's the criterion for
>> >> > choosing the size of fixnums not the maximum size of arrays.
>> >>
>> >> Yes. And you want to make sure array access is efficient. Thus the
>> >> limitation on only allowing fixnums as indicies
>> >
>> > No , you want to make sure that the programmer has the freedom to
>> > choose the trade-off which is most appropriate for his application. If
>> > he is willing to sacrifice some speed in order to gain larger arrays he
>> > should have that choice.
>>
>> The trade off is there. You are perfectly free to ask your Lisp for
>> an array biger than array-dimension-limit,
>
> And I would almost certainly get "no" for an answer :-D
>
>> and your implementation
>> is free to provide it to you.
>
> Not if it wants to conform to the standard.

So you propose that if a program asks for an oversized array, bigger
than array-dimension-limit, and the implementation gives it to the program,
the implementation is not conforming to the standard?

I am not able to find a citation which would support this belief.

It looks like the behavior of requesting a too-large array is simply
not defined.

There is no requirement for this situation to be detected and signaled
with an error condition.

Any response whatsoever, to undefined behavior, is conforming.
From: Tamas K Papp on
On Sat, 05 Dec 2009 21:34:52 +0000, Spiros Bousbouras wrote:

> On Sat, 5 Dec 2009 05:42:42 +0000 (UTC) Kaz Kylheku <kkylheku(a)gmail.com>
> wrote:
>> On 2009-12-05, Spiros Bousbouras <spibou(a)gmail.com> wrote:
>> > On 04 Dec 2009 10:01:06 -0800
>> > tar(a)sevak.isi.edu (Thomas A. Russ) wrote:
>> >> Spiros Bousbouras <spibou(a)gmail.com> writes:
>> >>
>> >> > > > 2. Why the requirement that the dimensions of an array are
>> >> > > > fixnums ?
>> >> > >
>> >> > > Why not? This is not a big restriction, if an implementation
>> >> > > wants bigger arrays, it only has to provide bigger fixnums.
>> >> >
>> >> > fixnums are supposed to be efficient , that's the criterion for
>> >> > choosing the size of fixnums not the maximum size of arrays.
>> >>
>> >> Yes. And you want to make sure array access is efficient. Thus the
>> >> limitation on only allowing fixnums as indicies
>> >
>> > No , you want to make sure that the programmer has the freedom to
>> > choose the trade-off which is most appropriate for his application.
>> > If he is willing to sacrifice some speed in order to gain larger
>> > arrays he should have that choice.
>>
>> The trade off is there. You are perfectly free to ask your Lisp for an
>> array biger than array-dimension-limit,
>
> And I would almost certainly get "no" for an answer :-D

With the open source Lisps, you can define your own answer.

> And that's the problem. I'm asking for fast fixnums plus arrays as large
> as the system can support plus standard conformance. I don't think
> that's a lot to ask for but I can't get it.

You mean you don't have internet access to download 64 bit SBCL?

Tamas
From: Tamas K Papp on
On Sat, 05 Dec 2009 03:08:17 -0800, vippstar wrote:

> On Dec 4, 1:29 am, Spiros Bousbouras <spi...(a)gmail.com> wrote:
>> Why the requirement that the dimensions of an array are fixnums ?
>
> If you want to allocate a bignum array, why don't you roll your own
> implementation of bignum-sized arrays that make use of fixnum-sized
> arrays? Then you'll be able to use all the memory your implementation
> provides portably.

This is a good question. If the OP invested the same amount of time
to programming instead of whining about a non-issue, he would have
solved the problem already.

Tamas
From: Pascal J. Bourguignon on
Kaz Kylheku <kkylheku(a)gmail.com> writes:

> On 2009-12-05, Spiros Bousbouras <spibou(a)gmail.com> wrote:
>> On Sat, 5 Dec 2009 05:42:42 +0000 (UTC)
>> Kaz Kylheku <kkylheku(a)gmail.com> wrote:
>>> On 2009-12-05, Spiros Bousbouras <spibou(a)gmail.com> wrote:
>>> > On 04 Dec 2009 10:01:06 -0800
>>> > tar(a)sevak.isi.edu (Thomas A. Russ) wrote:
>>> >> Spiros Bousbouras <spibou(a)gmail.com> writes:
>>> >>
>>> >> > > > 2. Why the requirement that the dimensions of an array are fixnums ?
>>> >> > >
>>> >> > > Why not? This is not a big restriction, if an implementation wants
>>> >> > > bigger arrays, it only has to provide bigger fixnums.
>>> >> >
>>> >> > fixnums are supposed to be efficient , that's the criterion for
>>> >> > choosing the size of fixnums not the maximum size of arrays.
>>> >>
>>> >> Yes. And you want to make sure array access is efficient. Thus the
>>> >> limitation on only allowing fixnums as indicies
>>> >
>>> > No , you want to make sure that the programmer has the freedom to
>>> > choose the trade-off which is most appropriate for his application. If
>>> > he is willing to sacrifice some speed in order to gain larger arrays he
>>> > should have that choice.
>>>
>>> The trade off is there. You are perfectly free to ask your Lisp for
>>> an array biger than array-dimension-limit,
>>
>> And I would almost certainly get "no" for an answer :-D
>>
>>> and your implementation
>>> is free to provide it to you.
>>
>> Not if it wants to conform to the standard.
>
> So you propose that if a program asks for an oversized array, bigger
> than array-dimension-limit, and the implementation gives it to the program,
> the implementation is not conforming to the standard?

No, it would be non conforming on the part of the program.
Check Section "1.5 Conformance", there are two classes of conformances.

To make the program conformant, it would have to test against
ARRAY-DIMENSION-LIMIT (and ARRAY-TOTAL-SIZE-LIMIT in the case of
multi-dimensional arrays).


;; non-conformant program:
(make-array size)

;; conformant program:
(if (< size array-dimension-limit)
(make-array size :initial-element 0)
#+implementation-with-bigger-arrays (make-array size :initial-element 0)
#-implementation-with-bigger-arrays (error "Cannot make an array big enough))


--
__Pascal Bourguignon__
From: Barry Margolin on
In article <qWzSm.40801$ic1.37168(a)newsfe16.ams2>,
Spiros Bousbouras <spibou(a)gmail.com> wrote:

> On Sat, 05 Dec 2009 05:54:30 -0500
> Barry Margolin <barmar(a)alum.mit.edu> wrote:
> > In article <OylSm.7781$6p6.1940(a)newsfe05.ams2>,
> > Spiros Bousbouras <spibou(a)gmail.com> wrote:
> >
> > > The problem here is that the standard does not allow a Lisp
> > > implementation to do this on the computer I'm using.
> >
> > The standard doesn't prevent Lisp implementations from allowing bignum
> > array indices. It just doesn't require it, so portable applications
> > can't depend on it.
>
> Each array dimension has to be smaller than ARRAY-DIMENSION-LIMIT and
> ARRAY-DIMENSION-LIMIT has to be a fixnum therefore array dimensions
> have to be fixnums. Each array index has to be smaller than the
> corresponding dimension therefore each array index also has to be a
> fixnum. (I'm assuming that if a,b are integers and 0 <= a <= b and b is
> a fixnum then a also has to be a fixnum.)

All those limits only apply to portable applications. They don't
restrict implementations from allowing larger arrays as extensions, and
non-portable applications can use these larger indices.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***