FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-07-2010, 04:31 PM
Zbigniew Komarnicki
 
Default Bug in 'for', Maxima, Debian ?

Hello,

I try to write fuction that return a list of number in range [a,b] with step
k, but first i try in command window this code:

/* This work in command window without variables */
kill(all);
m:[];
for i:0 step -3 thru 10 do (m:append(m, [i]), display(i));
display(m);

Here is OK, but this below is not OK:

/* This does NOT work in command window with variables */
kill(all);
a:0;
b:10;
k:-3;
m:[];
for i:a step k thru b do (m:append(m, [i]), display(i));
display(m);

/* here is the intresting the output */
(%i7) for i:a step k thru b do (m:append(m, [i]), display(i));
i = 0
i = - 3
i = - 6
....
and so on.


I work in Linux, Debian Lenny i386 with this version of Maxima:

Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.

(%i1) build_info();

Maxima version: 5.13.0
Maxima build date: 22:7 9/5/2008
host type: i686-pc-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7

(%o1)



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201007071831.35168.cblasius@gmail.com">http://lists.debian.org/201007071831.35168.cblasius@gmail.com
 
Old 07-07-2010, 05:46 PM
Mario Rodriguez
 
Default Bug in 'for', Maxima, Debian ?

Zbigniew Komarnicki escribió:

Hello,

I try to write fuction that return a list of number in range [a,b] with step
k, but first i try in command window this code:


/* This work in command window without variables */
kill(all);
m:[];
for i:0 step -3 thru 10 do (m:append(m, [i]), display(i));
display(m);

Here is OK


If you want to reach 10, shouldn't step be a positive number?

--
Mario


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4C34BD7E.5000006@telefonica.net">http://lists.debian.org/4C34BD7E.5000006@telefonica.net
 
Old 07-07-2010, 06:23 PM
Zbigniew Komarnicki
 
Default Bug in 'for', Maxima, Debian ?

On Wednesday 07 of July 2010 19:46:38 you wrote:
> Zbigniew Komarnicki escribió:
> > Hello,
> >
> > I try to write fuction that return a list of number in range [a,b] with
> > step k, but first i try in command window this code:
> >
> > /* This work in command window without variables */
> > kill(all);
> > m:[];
> > for i:0 step -3 thru 10 do (m:append(m, [i]), display(i));
> > display(m);
> >
> > Here is OK
>
> If you want to reach 10, shouldn't step be a positive number?

Thank you.

No, I try exactly from 0 to 10 with step -3. I know that it should be empty
list (empty matrix I got in octave, see below)

Form 0 to 10 with step 3 it work excellent - there is no problem.

(%i1) m:[]$
(%i2) for i:0 step 3 thru 10 do (m:append(m, [i]), display(i))$
i = 0
i = 3
i = 6
i = 9

(%i4) display(m)$
m = [0, 3, 6, 9]

The problem is when I go with 0 to 10 with -3 or in general when:
a < b and k is negative number.


In Octave I write something like:
From 0 to 10 with step -3 I got empty matrix in octave:

octave:1> 0:-3:10
ans = [](1x0)

I got empty matrix it is correct.

From 0 to 10 with step 3 I got as expected

octave:2> 0:3:10
ans =
0 3 6 9

I got results as expected.

The problem in Maxima is when we use variables:
a:0;
b:10;
k:-3;
m:[];
and write the code:
for i:a step k thru b do (m:append(m, [i]), display(i))$

This loop shouldn't execute, but this loop go forever (!!!) writing: i=0,
i=-3, i=-6, ..., i=infinity, but when I write this same code with numbers in
the loop, it work as expected:

m:[];
for i:0 step -3 thru 10 do (m:append(m, [i]), display(i))$
display(m)$
m = []

and the result is empty list m=[].


> --
> Mario


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201007072023.20380.cblasius@gmail.com">http://lists.debian.org/201007072023.20380.cblasius@gmail.com
 
Old 07-07-2010, 06:58 PM
Zbigniew Komarnicki
 
Default Bug in 'for', Maxima, Debian ?

On Wednesday 07 of July 2010 20:20:19 Raymond Toy wrote:

> > kill(all);
> > m:[];
> > for i:0 step -3 thru 10 do (m:append(m, [i]), display(i));
> > display(m);
>
> What were you expecting? I get m being an empty list.

Empty list is OK.

> > /* This does NOT work in command window with variables */
> > kill(all);
> > a:0;
> > b:10;
> > k:-3;
> > m:[];
> > for i:a step k thru b do (m:append(m, [i]), display(i));
> > display(m);

This code not work in Debian Lenny, because this loop shouldn't execute!
In Debian it go forever. It is a bug in a stable system and stable Maxima (I
know in Debian every thing is very old but should be stable and very well
tested).

>
> > I work in Linux, Debian Lenny i386 with this version of Maxima:
> >
> > Maxima 5.13.0 http://maxima.sourceforge.net
>
> That's pretty ancient, even by maxima standards. :-)

I know that is very old, but I try compile in Debian (Lenny) Maxima from
source, but without success. First, the GCL in Debian is not compiled with
ANSI standard, so, I download the latest GCL from
ftp://ftp.gnu.org/pub/gnu/gcl/gcl-2.6.7.tar.gz
and compiled it with ANSI (--enable-ansi), but there was some errors. So I
couldn't go.

Maybe is here somebody who will be show me and maybe others how to compile GCL
from source and then Maxima from source the latest version?
http://sourceforge.net/projects/maxima/files/Maxima-source/5.21.1-source/maxima-5.21.1.tar.gz/download

Maybe is there any how to, step by step what should be installed first and
what options should be used to compile first GCL and then Maxima especially
in Debian Lenny?

Thank you for any help.

> FWIW, I don't have this problem with your second example. I get m being
> the empty list.

Yes this is correct answer but not in Debian Lenny Maxima.

Thank you.

> Ray

Zbigniew

> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201007072058.23325.cblasius@gmail.com">http://lists.debian.org/201007072058.23325.cblasius@gmail.com
 
Old 07-08-2010, 06:56 AM
Zbigniew Komarnicki
 
Default Bug in 'for', Maxima, Debian ?

On Wednesday 07 of July 2010 22:49:38 Raymond Toy wrote:
> > Maybe is here somebody who will be show me and maybe others how to
> > compile GCL from source and then Maxima from source the latest version?
>
> I think it best to ask on the gcl mailing lists for how to compile gcl.
> I have compiled gcl and I always have problems. Perhaps there's another
> place to get a binary distribution?
>
> But unless you really need gcl, feel free to use some other lisp that
> might be available. Any of the following should work with maxima just
> fine: ccl, clisp, cmucl, ecl, sbcl.

Thank you.

I try also with sbcl on Debian and Maxima has been compiled with success, but
when I write some mathematical equations and press enter, then I got very
strange output, e.g.:

e: x^2+3*x-4;

I got:

2
x + 3 x - 4

With such output is impossible to work efficiently. It should be of course:

2
x + 3 x - 4

Is here maybe somebody who compiled any of the compiler: ccl, clisp, cmucl,
ecl, sbcl and then Maxima and it work correctly? Especially in Debian Lenny?

Thank you in advance.

> Ray

Zbigniew

> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201007080856.28313.cblasius@gmail.com">http://lists.debian.org/201007080856.28313.cblasius@gmail.com
 
Old 07-08-2010, 09:09 PM
Camm Maguire
 
Default Bug in 'for', Maxima, Debian ?

Greetings!

Zbigniew Komarnicki <cblasius@gmail.com> writes:

> On Wednesday 07 of July 2010 20:20:19 Raymond Toy wrote:
>
>> > kill(all);
>> > m:[];
>> > for i:0 step -3 thru 10 do (m:append(m, [i]), display(i));
>> > display(m);
>>
>> What were you expecting? I get m being an empty list.
>
> Empty list is OK.
>
>> > /* This does NOT work in command window with variables */
>> > kill(all);
>> > a:0;
>> > b:10;
>> > k:-3;
>> > m:[];
>> > for i:a step k thru b do (m:append(m, [i]), display(i));
>> > display(m);
>
> This code not work in Debian Lenny, because this loop shouldn't execute!
> In Debian it go forever. It is a bug in a stable system and stable Maxima (I
> know in Debian every thing is very old but should be stable and very well
> tested).
>
>>
>> > I work in Linux, Debian Lenny i386 with this version of Maxima:
>> >
>> > Maxima 5.13.0 http://maxima.sourceforge.net
>>
>> That's pretty ancient, even by maxima standards. :-)
>
> I know that is very old, but I try compile in Debian (Lenny) Maxima from
> source, but without success. First, the GCL in Debian is not compiled with
> ANSI standard, so, I download the latest GCL from
> ftp://ftp.gnu.org/pub/gnu/gcl/gcl-2.6.7.tar.gz
> and compiled it with ANSI (--enable-ansi), but there was some errors. So I
> couldn't go.
>

apt-get install gcl
GCL_ANSI=t gcl

gives ansi gcl promt, and

export GCL_ANSI=t ; cd maxima-5.13.0 ; ./configure --enable-gcl &&
make

or

apt-get -q source maxima
cd maxima-5.13.0 ; debian/rules build

Take care,


> Maybe is here somebody who will be show me and maybe others how to compile GCL
> from source and then Maxima from source the latest version?
> http://sourceforge.net/projects/maxima/files/Maxima-source/5.21.1-source/maxima-5.21.1.tar.gz/download
>
> Maybe is there any how to, step by step what should be installed first and
> what options should be used to compile first GCL and then Maxima especially
> in Debian Lenny?
>
> Thank you for any help.
>
>> FWIW, I don't have this problem with your second example. I get m being
>> the empty list.
>
> Yes this is correct answer but not in Debian Lenny Maxima.
>
> Thank you.
>
>> Ray
>
> Zbigniew
>
>> _______________________________________________
>> Maxima mailing list
>> Maxima@math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>
> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
>

--
Camm Maguire camm@maguirefamily.org
================================================== ========================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87pqyxvfx8.fsf@maguirefamily.org">http://lists.debian.org/87pqyxvfx8.fsf@maguirefamily.org
 
Old 07-09-2010, 11:11 AM
Zbigniew Komarnicki
 
Default Bug in 'for', Maxima, Debian ?

On Thursday 08 of July 2010 23:09:55 you wrote:
> Greetings!
> > I know that is very old, but I try compile in Debian (Lenny) Maxima from
> > source, but without success. First, the GCL in Debian is not compiled
> > with ANSI standard, so, I download the latest GCL from
> > ftp://ftp.gnu.org/pub/gnu/gcl/gcl-2.6.7.tar.gz
> > and compiled it with ANSI (--enable-ansi), but there was some errors. So
> > I couldn't go.
>
> apt-get install gcl
> GCL_ANSI=t gcl
>
> gives ansi gcl promt, and
>
> export GCL_ANSI=t ; cd maxima-5.13.0 ; ./configure --enable-gcl &&
> make
>
> or
>
> apt-get -q source maxima
> cd maxima-5.13.0 ; debian/rules build
>
> Take care,

Thank you very much :-)
I don't know that I can do it that in Debian. Thank you.

I yesterday download SBCL, the latest version
http://downloads.sourceforge.net/project/sbcl/sbcl/1.0.40/sbcl-1.0.40-source.tar.bz2
and compiled it successful without any problems.

Then I compile without any problems also Maxima 5.21.1 and install it in my
home folder. It works :-) One problem was that there no support for readline
in console. I found a solution on google with package 'rlwrap'
http://www.debian-administration.org/article/Providing_better_editing_support_for_sbcl_via_read line
and this site
http://weitz.de/completions.html
I do it for sbcl and maxima and now everything works excellent.

I also install libwxbase2.8-dev by aptitude and download wxMaxima
https://sourceforge.net/projects/wxmaxima/files/wxMaxima/0.8.5/wxMaxima-0.8.5.tar.gz/download
and also compile it with successful and now I can work very comfortable with
new maxima and wxmaxima.

Thank you all for help.

Zbigniew


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201007091311.23349.cblasius@gmail.com">http://lists.debian.org/201007091311.23349.cblasius@gmail.com
 
Old 07-09-2010, 01:29 PM
Ron Johnson
 
Default Bug in 'for', Maxima, Debian ?

On 07/07/2010 01:58 PM, Zbigniew Komarnicki wrote:
[snip]


This code not work in Debian Lenny, because this loop shouldn't execute!
In Debian it go forever. It is a bug in a stable system and stable Maxima (I
know in Debian every thing is very old but should be stable and very well
tested).



That's a bit of a fallacy. After Stable is released, "feature bugs"
don't get fixed, only security bugs.


If while Lenny was Testing no one ever filed a relevant RC bug
against Maxima, or the D-D didn't consider it RC and he had too much
other stuff on his plate, then the bug would not have gotten fixed.


--
Seek truth from facts.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4C37243C.6010600@cox.net">http://lists.debian.org/4C37243C.6010600@cox.net
 

Thread Tools




All times are GMT. The time now is 12:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org