Re: [fricas-devel] Mathics

2021-11-09 Thread Alasdair McAndrew
As far as I can tell, Mathics uses Mathematica syntax with an engine that 
runs Python SymPy.  It's nice looking, but I don't think (comparing Sympy 
and FriCAS) that FriCAS has anything to worry about.   However, a nice 
interface goes a long way to winning people, and the best system in the 
world will always remain a hobby of a very few unless it lifts its external 
game. 


On Friday 10 September 2021 21:36:15 (+10:00), Ralf Hemmecke wrote:

> Not that I ever used Mathics, but I find the way they present themselves
> impressive.
>
> https://mathics.org/
>
> Obviously, the poster of this message
> https://groups.google.com/g/sage-devel/c/XJUnM4HEUG4/m/LXUU2iLdAAAJ
> found another project to invest his time and efforts.
>
> Ralf
>
--
0432 854 858
https://numbersandshapes.net

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/1636449128046.347575903.3257776802%40gmail.com.


[fricas-devel] Drawing two plots together in jupyter/fricas?

2016-06-18 Thread Alasdair McAndrew
So, I've got FriCAS running in jupyter (thanks Kurt - superb work!), and
I've compiled jupyter.spad to have the draw functions available.
Incidentally, why does this need to be done?  Can we have jDraw etc
automatically available when a FriCAS session is started in jupyter?  But
anyway, I wanted to plot two graphs on the same set of axes.  Ordinarily,
this could be done, for example, as

plot([x^2-2,x^3-x],-1..2)

but a list of functions is not a legitimate input to jDraw.  So how can I
plot two functions together?

Thanks,
Alasdair

-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Running fricas in jupyter: many errors

2016-06-18 Thread Alasdair McAndrew
... it works with the new updated git repository!  Many thanks.

-Alasdair

On Sat, Jun 18, 2016 at 5:21 PM, Alasdair McAndrew  wrote:

> Dear Kurt,
>
> Many thanks for your detailed reply.  I tried that, and I'm getting the
> same errors.  I have compiled FriCAS with SBCL 1.3.6, and so I'm using the
> same version for trying to compile fricas_jupyter.  The compilation (once
> SBCL_HOME is set) proceeds without errors, but it still won't run.  Maybe I
> should try the new source code at https://github.com/nilqed/fricas_jupyter
> ?
>
> Thanks again,
> Alasdair
>
> On Sat, Jun 18, 2016 at 1:51 AM, Kurt Pagani  wrote:
>
>> Hi Alasdair
>>
>> See:
>> https://groups.google.com/forum/#!topic/fricas-devel/ltrhAkzrIYs
>>
>> There was a design change in 0MQ, i.e jupy versions > 4.0 won't work
>> without a new pzmq. The steps below provide a temporary fix.
>>
>> Kurt
>>
>> ==
>>
>> ...
>> Therefore, if you want to fix it yourself, the following steps were
>> necessary:
>>
>> 1. pip install -U jupyter-client  (undoing the downgrade)
>> 2. clear the sbcl cache for "pzmq": =to complete
>>
>> rm -r
>>
>> ~/.cache/common-lisp/sbcl-1.3.0-linux-x64/???/fricas_jupyter/quicklisp/dists/quicklisp/software/pzmq-20150608-git/
>>
>> 3. cd /fricas_jupyter/quicklisp/dists/quicklisp/software
>> 4. rm -r pzmq-20150608-git
>> 5. git clone https://github.com/orivej/pzmq.git
>> 6. mv pzmq pzmq-20150608-git  #cheating ;)
>> 7. cd /fricas_jupyter
>> 8. ./install.sh  #recompile kernel
>>
>> I'll update the git repo as soon as the new version of "pzmq"
>> is released on QL, then you could pull the changes via git.
>> Kurt
>>
>> >>>
>> from
>>
>> http://stackoverflow.com/questions/34093656/jupyter-and-common-lisp/37107166#37107166
>>
>> This issue is caused by a change in the size of the message structure,
>> zmq_msg_t, in 0MQ version 4.1.x to 64 bytes from a size of 32 bytes in
>> version 4.0.x.
>>
>> ==
>>
>>
>> Am 17.06.2016 um 16:18 schrieb Alasdair McAndrew:
>> > I have installed fricas (compiling from source) and also jupyter, then I
>> > installed  fricas_jupyter following the instructions at
>> > https://github.com/nilqed/fricas_jupyter
>> >
>> > But I can't get it all to work.  I can open up a jupyter notebook, then
>> > choose a new fricas session, but when I attempt to execute a command,
>> the
>> > terminal in which I entered "jupyter notebook" fills up with an unending
>> > repetition of this error:
>> >
>> > debugger invoked on a TYPE-ERROR in thread
>> > #:
>> >   The value
>> > NIL
>> >   is not of type
>> > (OR (AND SYMBOL (NOT NULL)) RESTART)
>> >
>> > Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
>> >
>> > restarts (invokable by number or by possibly-abbreviated name):
>> >   0: [ABORT] Reduce debugger level (to debug level 1).
>> >
>> > (INVOKE-RESTART NIL) [more,optional]
>> > 0[2]
>> > 0]
>> >
>> > Can anybody advise me what's going on here, and how I can get it all
>> > working?
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "FriCAS - computer algebra system" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to fricas-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to fricas-devel@googlegroups.com.
>> Visit this group at https://groups.google.com/group/fricas-devel.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> [image: http://www.facebook.com/alasdairmcandrew] [image:
> https://twitter.com/amca01] <https://twitter.com/amca01>
> <https://www.linkedin.com/in/alasdair-mcandrew-108178a>
> <https://plus.google.com/+AlasdairMcAndrew/posts>
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Running fricas in jupyter: many errors

2016-06-18 Thread Alasdair McAndrew
Dear Kurt,

Many thanks for your detailed reply.  I tried that, and I'm getting the
same errors.  I have compiled FriCAS with SBCL 1.3.6, and so I'm using the
same version for trying to compile fricas_jupyter.  The compilation (once
SBCL_HOME is set) proceeds without errors, but it still won't run.  Maybe I
should try the new source code at https://github.com/nilqed/fricas_jupyter ?

Thanks again,
Alasdair

On Sat, Jun 18, 2016 at 1:51 AM, Kurt Pagani  wrote:

> Hi Alasdair
>
> See:
> https://groups.google.com/forum/#!topic/fricas-devel/ltrhAkzrIYs
>
> There was a design change in 0MQ, i.e jupy versions > 4.0 won't work
> without a new pzmq. The steps below provide a temporary fix.
>
> Kurt
>
> ==
>
> ...
> Therefore, if you want to fix it yourself, the following steps were
> necessary:
>
> 1. pip install -U jupyter-client  (undoing the downgrade)
> 2. clear the sbcl cache for "pzmq": =to complete
>
> rm -r
>
> ~/.cache/common-lisp/sbcl-1.3.0-linux-x64/???/fricas_jupyter/quicklisp/dists/quicklisp/software/pzmq-20150608-git/
>
> 3. cd /fricas_jupyter/quicklisp/dists/quicklisp/software
> 4. rm -r pzmq-20150608-git
> 5. git clone https://github.com/orivej/pzmq.git
> 6. mv pzmq pzmq-20150608-git  #cheating ;)
> 7. cd /fricas_jupyter
> 8. ./install.sh  #recompile kernel
>
> I'll update the git repo as soon as the new version of "pzmq"
> is released on QL, then you could pull the changes via git.
> Kurt
>
> >>>
> from
>
> http://stackoverflow.com/questions/34093656/jupyter-and-common-lisp/37107166#37107166
>
> This issue is caused by a change in the size of the message structure,
> zmq_msg_t, in 0MQ version 4.1.x to 64 bytes from a size of 32 bytes in
> version 4.0.x.
>
> ==
>
>
> Am 17.06.2016 um 16:18 schrieb Alasdair McAndrew:
> > I have installed fricas (compiling from source) and also jupyter, then I
> > installed  fricas_jupyter following the instructions at
> > https://github.com/nilqed/fricas_jupyter
> >
> > But I can't get it all to work.  I can open up a jupyter notebook, then
> > choose a new fricas session, but when I attempt to execute a command, the
> > terminal in which I entered "jupyter notebook" fills up with an unending
> > repetition of this error:
> >
> > debugger invoked on a TYPE-ERROR in thread
> > #:
> >   The value
> > NIL
> >   is not of type
> > (OR (AND SYMBOL (NOT NULL)) RESTART)
> >
> > Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
> >
> > restarts (invokable by number or by possibly-abbreviated name):
> >   0: [ABORT] Reduce debugger level (to debug level 1).
> >
> > (INVOKE-RESTART NIL) [more,optional]
> > 0[2]
> > 0]
> >
> > Can anybody advise me what's going on here, and how I can get it all
> > working?
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Running fricas in jupyter: many errors

2016-06-17 Thread Alasdair McAndrew
I have installed fricas (compiling from source) and also jupyter, then I
installed  fricas_jupyter following the instructions at
https://github.com/nilqed/fricas_jupyter

But I can't get it all to work.  I can open up a jupyter notebook, then
choose a new fricas session, but when I attempt to execute a command, the
terminal in which I entered "jupyter notebook" fills up with an unending
repetition of this error:

debugger invoked on a TYPE-ERROR in thread
#:
  The value
NIL
  is not of type
(OR (AND SYMBOL (NOT NULL)) RESTART)

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Reduce debugger level (to debug level 1).

(INVOKE-RESTART NIL) [more,optional]
0[2]
0]

Can anybody advise me what's going on here, and how I can get it all
working?

-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: Compiling from source with sbcl 1.3.6 - heap exhausted

2016-06-13 Thread Alasdair McAndrew
Thank you! - in the end I used 8000 and it worked fine.  'Tis always the
way: post a question, and then minutes later find the solution myself.

-Alasdair

On Mon, Jun 13, 2016 at 10:07 PM, oldk1331  wrote:

> From last discussion, I think you should use at least 3GB heap,
> try "--dynamic-space-size 3000" or more.
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Compiling from source with sbcl 1.3.6 - heap exhausted

2016-06-13 Thread Alasdair McAndrew
I'm pretty sure I had this problem before, but I can't remember how I
solved it.  I'm using Arch Linux, and sbcl v. 1.3.6.  I've tried to start
my compile with

configure --with-lisp='/usr/bin/sbcl --dynamic-space-size 2048'

However, this doesn't work.  After a while, the compile stops with:

; caught STYLE-WARNING:
;   The variable |prec| is defined but never used.
Heap exhausted during garbage collection: 0 bytes available, 65552
requested.



   Total bytes allocated= 786596096
   Dynamic-space-size bytes = 1073741824



fatal error encountered in SBCL pid 14964(tid 140737353840384):
Heap exhausted, game over.

As you see, my attempt to change the dynamic-space-size seems to have had
no effect.  What's going on here, and how can I get round it?

Thanks,
Alasdair

-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: TeX output in efricas?

2016-05-30 Thread Alasdair McAndrew
For what it's worth, the function "imaxima-latex" produces a LaTeX-typeset
output (using breqn) of a Maxima command .  As my knowledge of lisp and
elisp is minimal, I don't know if this could be re-jigged to work for
efricas.

To see the function, you can go to

https://sourceforge.net/p/maxima/code/ci/branch-5_32/tree/interfaces/emacs/imaxima/imaxima.el

and look at the function which is on lines 594 - 667.

- Alasdair


On Mon, May 30, 2016 at 6:37 PM, Ralf Hemmecke  wrote:

> On 05/30/2016 10:18 AM, oldk1331 wrote:
> > Fricas doesn't need to compute the width of boxes as exactly as tex,
> > just enough to know where to break an expression.
> > Let a program (I'm talking about you, TeX) that knows nothing about
> > math but only deals with strings to determine where to break a math
> > expression, that is not the right thing.
>
> Yes, you are right. But I am relatively happy with what my tex.spad or
> mathjax.spad + jupyter gives me, so I have no "itch" at the moment. If I
> need some tex output for a paper, that is enough. For everyday working,
> I find my 1d output much more useful since I can cut&paste the output or
> (especially) parts of it back into fricas.
>
> If we had a better 2d cut&paste mechanism, I would probably change my
> opinion.
>
> Ralf
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: TeX output in efricas?

2016-05-29 Thread Alasdair McAndrew
The point about having LaTeX output is that you should be able to break up
long lines using the breqn.sty package.  This is what imaxima (maxima
running in Emacs) does, and it works pretty well.  For example, the command

expand((x+y+z)^10)

which is the same in FriCAS and in Maxima, is broken up neatly in imaxima
to fit the Emacs window.  But in efricas it is one very long (and on my
system with an unreadably small font) line.

(Actually, the command is not quite the same in both packages; I use
"expand((x+y+z)^10)::DMP([x,y,z],FRAC INT)" in FriCAS to get the output I
want.)

On Sun, May 29, 2016 at 2:49 PM, oldk1331  wrote:

> - > Long lines aren't broken.
> -
> - FriCAS don't have support for automatically breaking long equations, and
> - I doubt other CASs can.  That means, if a result looks messy in
> terminal,
> - it will be messy in other output backends.
> -
> - For this particular integration, complexIntegration gives a cleaner
> result:
> -
> - (1) -> complexIntegrate(sqrt(x^2+1)/(x^4+1), x)
>
>(1)
>   ┌──┐  ┌──┐  ┌──┐
>   │ ┌───┐   │ ┌───┐   │ 2  ┌───┐ 2
>- \│\│- 1  - 1 log(2\│\│- 1  - 1  - 2x\│x  + 1  - 2\│- 1  + 2x )
>  +
>   ┌┐ ┌──┐ ┌┐
>   │   ┌───┐  │ 2  │   ┌───┐  ┌───┐
> 2
>- \│- \│- 1  - 1 log(- 2x\│x  + 1  + 2\│- \│- 1  - 1  + 2\│- 1  +
> 2x )
>  +
> ┌┐ ┌──┐ ┌┐
> │   ┌───┐  │ 2  │   ┌───┐  ┌───┐ 2
>\│- \│- 1  - 1 log(- 2x\│x  + 1  - 2\│- \│- 1  - 1  + 2\│- 1  + 2x )
>  +
> ┌──┐┌──┐  ┌──┐
> │ ┌───┐ │ ┌───┐   │ 2  ┌───┐ 2
>\│\│- 1  - 1 log(- 2\│\│- 1  - 1  - 2x\│x  + 1  - 2\│- 1  + 2x )
>   /
>  4
> -
> - which is similar to mma's output:
> -   3/23/2
>(1 - I)x   (1 + I)x
> ArcTan[]   ArcTan[]
>  2  2
>Sqrt[2] Sqrt[1 + x ]   Sqrt[2] Sqrt[1 + x ]
>  + 
>Sqrt[2 - 2 I]  Sqrt[2 + 2 I]
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] TeX output in efricas?

2016-05-27 Thread Alasdair McAndrew
I like running FriCAS within Emacs, using fricas.el.  However, on my screen
(which is an HiDPI retina screen), there are two issues:

   1. The output is too tiny to read
   2. Long lines aren't broken.

The breqn.sty package could be used to automatically break long lines, but
I don't know how to include it so that it works.

As an example, try

integrate(sqrt(x^2+1)/(x^4+1), x)

The output is a very long expression, which in my efricas is simply
unreadable, both in size, and in typesetting.

Thanks,

Alasdair

-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: Compilation fails with sbcl 1.3.1 on Arch Linux

2016-05-24 Thread Alasdair McAndrew
OK - silly question perhaps, but how do I increase the dynamic-space-size
for sbcl  in the compile procedure?  There's not an option in "./configure"
, unless I can add it as an option to" --with-lisp", as in

./configure --with-lisp="sbcl --dynamic-space-size 8192"

for example.  But maybe there's a better way?  Thanks!

On Mon, May 23, 2016 at 10:36 PM, oldk1331  wrote:

> > How large dynamic space did you use?
>
> Mine default is 1GB.  I tested by
> `sbcl --dynamic-space-size  --load primitives.lisp --eval
> '(compile-file "TMFORM.lsp")'`,
> and found out that 3GB is enough.  This is still a minor bug of SBCL, I
> think.
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: Compilation fails with sbcl 1.3.1 on Arch Linux

2016-05-23 Thread Alasdair McAndrew
It worked after I did a "make clean" first to clear out the original
makefiles, and then a new configure, make, make install.  Thanks everyone!

On Mon, May 23, 2016 at 6:27 PM, Alasdair McAndrew  wrote:

> I didn't uninstall sbcl-1.3.1, but I did indeed check that sbcl-1.3.5 was
> the "preferred" version, so to speak: "sbcl --version" returns 1.3.5.
>
>
>
> On Mon, May 23, 2016 at 4:41 PM, oldk1331  wrote:
>
>> > Addendum: updated sbcl to 1.3.5 (downloaded from sbcl site), ran
>> configure
>> > again, checked patches above, and still the same error.
>>
>> Did you uninstall sbcl-1.3.1?  Maybe it's a PATH issue, what does
>> "sbcl --version" return?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "FriCAS - computer algebra system" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to fricas-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to fricas-devel@googlegroups.com.
>> Visit this group at https://groups.google.com/group/fricas-devel.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> [image: http://www.facebook.com/alasdairmcandrew] [image:
> https://twitter.com/amca01] <https://twitter.com/amca01>
> <https://www.linkedin.com/in/alasdair-mcandrew-108178a>
> <https://plus.google.com/+AlasdairMcAndrew/posts>
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: Compilation fails with sbcl 1.3.1 on Arch Linux

2016-05-23 Thread Alasdair McAndrew
I didn't uninstall sbcl-1.3.1, but I did indeed check that sbcl-1.3.5 was
the "preferred" version, so to speak: "sbcl --version" returns 1.3.5.



On Mon, May 23, 2016 at 4:41 PM, oldk1331  wrote:

> > Addendum: updated sbcl to 1.3.5 (downloaded from sbcl site), ran
> configure
> > again, checked patches above, and still the same error.
>
> Did you uninstall sbcl-1.3.1?  Maybe it's a PATH issue, what does
> "sbcl --version" return?
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdairmcandrew] [image:
https://twitter.com/amca01] <https://twitter.com/amca01>
<https://www.linkedin.com/in/alasdair-mcandrew-108178a>
<https://plus.google.com/+AlasdairMcAndrew/posts>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: Introduction to FriCAS/Axiom

2016-01-11 Thread Alasdair McAndrew
With due respect to the professor, who is no doubt a far finer scholar than
me, the statement: "numerical methods are enough, nobody cares about
symbolic results" is plain wrong.  Certainly from an applied point of view,
numerical methods are the more important.  But symbolic algebra and
calculus, and understanding them, are of great importance in extending our
knowledge of both fields.  And I think it behoves all mathematicians, no
matter their fields, to be open-minded about other areas.

On Mon, Jan 11, 2016 at 10:04 PM, Prof. Dr. Johannes Grabmeier privat <
johan...@grabmeier.net> wrote:

> To prove the importance of symbolic computations, certainly, symbolic
> integration is a bad, if not the worst example -- as for all practical
> problems numerical method will do as your professor claims.
>
> But the beauty of symbolic methods certainly can be demonstrated by the
> Risch algorithm.
>
> To my opinion: one should not play off one against the other aspect! So
> for a computer algebra system like FriCAS the completion of symbolic
> integration is a valid target, perhaps right now there are still more
> important target as improvement of usability for unexperienced users.
>
>
>
> Am 11.01.16 um 10:23 schrieb oldk1331:
>
> Thanks for your informative replies, Waldek Hebisch.
> I have a question related about Risch algorithm and its
> implementation in FriCAS.
>
> I asked my math professor about Risch algorithm before,
> he never heard of it and he seemed to not care about it,
> because "numerical methods are enough, nobody cares
> about symbolic results".  I want to know your perspective
> of the future of Risch algorithm and its implementation in
> FriCAS.
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> Mit freundlichen Grüßen
>
> Johannes Grabmeier
>
> Prof. Dr. Johannes Grabmeier
> Köckstraße 1, D-94469 Deggendorf
> Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
> Tel. +49-(0)-991-3615-141 (d),  Fax: +49-(0)-3224-192688
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Running on a server?

2015-11-25 Thread Alasdair McAndrew
You are quite right - I had assumed that SMC was just a newer version of
the old sagenb notebook interface, which I've been using for years.  So
I'll check out FriCAS and see how I get on.

Thanks,
Alasdair

On Wed, Nov 25, 2015 at 11:53 AM, Bill Page 
wrote:

> Alasdair,
>
> From your comment about Sage it seems that you may have the mistaken idea
> that SMC has something directly to do with Sage. In fact Sage is only one
> of a fairly large number of open source computer algebra and computational
> mathematics packages made available. Running FriCAS under Jupyter  on SMC
> does not involve any part of  Sage.
>
> I think SMC is an excellent way of using FriCAS online and for
> collaborating with others. I hope to interst more people in using FriCAS on
> SMC.
>
> Bill.
>
> On 2015-11-24 6:35 PM, "Alasdair McAndrew"  wrote:
> >
> > Many thanks - I guess in my position, as I already run Linux natively,
> would be something like number 3.  I know I can run FriCAS inside Sage, but
> it would be good, don't you think, to be able to run FriCAS on its own
> without all of Sage?
> >
> > cheers,
> > Alasdair
> >
> > On Wed, Nov 25, 2015 at 6:23 AM, Kurt Pagani  wrote:
> >>
> >>
> >> Hi Alasdair,
> >>
> >> at the moment there are four possibilities to run fricas w/jupyter :
> >>
> >> 1. Docker: https://hub.docker.com/r/nilqed/ispad/
> >> secure version, but quite old (2 month)
> >>
> >> 2. Docker: https://hub.docker.com/r/nilqed/fricas_jupyter/
> >> no ssl, but current version (automated build)
> >>
> >> 3. https://github.com/nilqed/fricas_jupyter
> >> normal installation, use: jupyter notebook --ip=* (or better client ip)
> >> on server
> >>
> >> 4. https://github.com/nilqed/fricas_smc
> >> installation on SMC,
> >>
> >> I'm still  hoping to complete the kernel this year (v 1.0) ;)
> >> Afterwards it might be worthwile to create a docker multi-user server.
> >>
> >> Best
> >> Kurt
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Running on a server?

2015-11-24 Thread Alasdair McAndrew
That's OK, I have no fear about compiling source code: I remember wrestling
with makefiles and xmkmf in the days before GNU configure...

Thanks again,
Alasdair

On Wed, Nov 25, 2015 at 10:45 AM, Kurt Pagani  wrote:

>
>
> Am 25.11.2015 um 00:35 schrieb Alasdair McAndrew:
> > Many thanks - I guess in my position, as I already run Linux natively,
> > would be something like number 3.  I know I can run FriCAS inside Sage,
> but
> > it would be good, don't you think, to be able to run FriCAS on its own
> > without all of Sage?
>
> By all means. But note that in 1,2 and 4 FriCAS is included in the
> distribution while in (3) you have to compile it by yourself. The SMC
> Fricas is not used and it is rather outdated anyway.
>
> BTW the version of SBCL used to build the ispad core (in 3) must match
> that of AxiomSYS (i.e. don't use a binary version of FriCAS ;)
>
> Good luck
> Kurt
>
>
>
>
> >
> > cheers,
> > Alasdair
> >
> > On Wed, Nov 25, 2015 at 6:23 AM, Kurt Pagani  wrote:
> >
> >>
> >> Hi Alasdair,
> >>
> >> at the moment there are four possibilities to run fricas w/jupyter :
> >>
> >> 1. Docker: https://hub.docker.com/r/nilqed/ispad/
> >> secure version, but quite old (2 month)
> >>
> >> 2. Docker: https://hub.docker.com/r/nilqed/fricas_jupyter/
> >> no ssl, but current version (automated build)
> >>
> >> 3. https://github.com/nilqed/fricas_jupyter
> >> normal installation, use: jupyter notebook --ip=* (or better client ip)
> >> on server
> >>
> >> 4. https://github.com/nilqed/fricas_smc
> >> installation on SMC,
> >>
> >> I'm still  hoping to complete the kernel this year (v 1.0) ;)
> >> Afterwards it might be worthwile to create a docker multi-user server.
> >>
> >> Best
> >> Kurt
> >>
> >>
> >> p.s.
> >> Here's a recent SMC sample: http://kfp.bitbucket.org/tmp/test.html  and
> >> GLE graphics: http://kfp.bitbucket.org/tmp/GLE.html
> >>
> >>
> >>
> >>
> >> Am 24.11.2015 um 06:11 schrieb Alasdair McAndrew:
> >>> Now that FriCAS can run in a Jupyter environment, thanks to Kurt
> Pagani's
> >>> clever programming with ispad - would it be possible to run FriCAS
> from a
> >>> server?
> >>>
> >>> I'm curious: I run a VPS with Ubuntu server 14.04, and it would be a
> >> lovely
> >>> thing to be able to access FriCAS remotely through a browser with
> ispad.
> >>>
> >>> I know I can always log in to the server with ssh and play with FriCAS
> >> in a
> >>> console, but it would be nice to be able to access FriCAS through a
> >> browser
> >>> (or alternatively, through emacs with ifricas).  I appreciate that is
> >> might
> >>> be a problem serving up HyperDoc, but as a starting place a remote
> FriCAS
> >>> would be a nice thing.
> >>>
> >>> Thanks,
> >>> Alasdair
> >>>
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "FriCAS - computer algebra system" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to fricas-devel+unsubscr...@googlegroups.com.
> >> To post to this group, send email to fricas-devel@googlegroups.com.
> >> Visit this group at http://groups.google.com/group/fricas-devel.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Running on a server?

2015-11-24 Thread Alasdair McAndrew
Many thanks - I guess in my position, as I already run Linux natively,
would be something like number 3.  I know I can run FriCAS inside Sage, but
it would be good, don't you think, to be able to run FriCAS on its own
without all of Sage?

cheers,
Alasdair

On Wed, Nov 25, 2015 at 6:23 AM, Kurt Pagani  wrote:

>
> Hi Alasdair,
>
> at the moment there are four possibilities to run fricas w/jupyter :
>
> 1. Docker: https://hub.docker.com/r/nilqed/ispad/
> secure version, but quite old (2 month)
>
> 2. Docker: https://hub.docker.com/r/nilqed/fricas_jupyter/
> no ssl, but current version (automated build)
>
> 3. https://github.com/nilqed/fricas_jupyter
> normal installation, use: jupyter notebook --ip=* (or better client ip)
> on server
>
> 4. https://github.com/nilqed/fricas_smc
> installation on SMC,
>
> I'm still  hoping to complete the kernel this year (v 1.0) ;)
> Afterwards it might be worthwile to create a docker multi-user server.
>
> Best
> Kurt
>
>
> p.s.
> Here's a recent SMC sample: http://kfp.bitbucket.org/tmp/test.html  and
> GLE graphics: http://kfp.bitbucket.org/tmp/GLE.html
>
>
>
>
> Am 24.11.2015 um 06:11 schrieb Alasdair McAndrew:
> > Now that FriCAS can run in a Jupyter environment, thanks to Kurt Pagani's
> > clever programming with ispad - would it be possible to run FriCAS from a
> > server?
> >
> > I'm curious: I run a VPS with Ubuntu server 14.04, and it would be a
> lovely
> > thing to be able to access FriCAS remotely through a browser with ispad.
> >
> > I know I can always log in to the server with ssh and play with FriCAS
> in a
> > console, but it would be nice to be able to access FriCAS through a
> browser
> > (or alternatively, through emacs with ifricas).  I appreciate that is
> might
> > be a problem serving up HyperDoc, but as a starting place a remote FriCAS
> > would be a nice thing.
> >
> > Thanks,
> > Alasdair
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Running on a server?

2015-11-23 Thread Alasdair McAndrew
Now that FriCAS can run in a Jupyter environment, thanks to Kurt Pagani's
clever programming with ispad - would it be possible to run FriCAS from a
server?

I'm curious: I run a VPS with Ubuntu server 14.04, and it would be a lovely
thing to be able to access FriCAS remotely through a browser with ispad.

I know I can always log in to the server with ssh and play with FriCAS in a
console, but it would be nice to be able to access FriCAS through a browser
(or alternatively, through emacs with ifricas).  I appreciate that is might
be a problem serving up HyperDoc, but as a starting place a remote FriCAS
would be a nice thing.

Thanks,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Coercible to OutputForm

2015-11-22 Thread Alasdair McAndrew
Ahh, well I just did it in a *.input file, using the interactive language
rather than SPAD.  Maybe you need to give the output type of myFn, as in

myFn(inp:Boolean):Boolean==
  outputList(["abc",1])@Void
  inp

But I really don't know, as whenever I try and write in SPAD I always get
errors.  So I'm just guessing here.

On Sun, Nov 22, 2015 at 8:35 PM, Martin Baker  wrote:

> On 22/11/15 07:45, Alasdair McAndrew wrote:
>
>> Try
>>
>> outputList(["abc",1])@Void
>>
>> At least, that seemed to work for me.
>>
>> -Alasdair
>>
>
> Hi Alasdair,
>
> Its still not working for me, in 'OutErr1', listed below, I am getting the
> following compile error:
>
>>> Apparent user error:
>NoValueMode
> is an unknown mode
>
> in 'OutErr2' and 'OutErr3' below I am getting:
>
>>> Apparent user error:
>Cannot coerce abc
>   of mode abc
>   to mode (Any)
>
> but whatever I do I can't get it to compile (am I doing something silly?).
> I am using FriCAS 1.2.7 x86_64 binary.
>
> Martin
>
> --
> )abbrev domain OERR1 OutErr1
> OutErr1() : Exports == Impl where
>  Exports ==> with
>   myFn : (Boolean) -> Boolean
>  Impl ==> add
>   Rep := Boolean
>   myFn(inp:Boolean)==
> outputList(["abc",1])@Void
> inp
>
> )abbrev domain OERR2 OutErr2
> OutErr2() : Exports == Impl where
>  Exports ==> with
>   myFn : (Boolean) -> Boolean
>  Impl ==> add
>   Rep := Boolean
>   myFn(inp:Boolean)==
> outputList(["abc",1])$OutputPackage
> inp
>
> )abbrev domain OERR3 OutErr3
> OutErr3() : Exports == Impl where
>  Exports ==> with
>   myFn : (Boolean) -> Boolean
>  Impl ==> add
>   Rep := Boolean
>   myFn(inp:Boolean)==
> outputList(["abc",1])$OutputPackage@Void
> inp
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Coercible to OutputForm

2015-11-21 Thread Alasdair McAndrew
Try

outputList(["abc",1])@Void

At least, that seemed to work for me.

-Alasdair

On Fri, Nov 20, 2015 at 5:54 AM, Martin Baker  wrote:

> I have a problem with 'outputList'. It works fine in the interpreter:
>
> (1) -> outputList(["abc",1])
>abc1
>
> Type: Void
>
> but in the compiler I get:
>
>>> Apparent user error:
>Cannot coerce abc
>   of mode abc
>   to mode (Union (: boundTerm (Record (: varBound
> (NonNegativeInteger (: freeTerm UT) (: compoundTerm (Record (: c1 $) (:
> c2 $))) (: lambdaTerm (Record (: c3 $) (: nm UT
>
>
> So I changed:
> outputList(["abc",1])
> to:
> outputList(["abc",1])$OutputPackage
> and then I got:
>
>>> Apparent user error:
>Cannot coerce abc
>   of mode abc
>   to mode (Any)
>
> Do you know why it does not work in the compiler?
>
>
> Martin
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Using a polynomial inside a function

2015-11-16 Thread Alasdair McAndrew
Here's a minimum (non)-working example: I have a function which returns a
polynomial:

mult(xs)==
  return(reduce(*,[x-z for z in xs]))

and I have another function which needs such a polynomial:

intm(xs,a,b)==
  g:=(x:Float):Float+->mult(xs)
  return(numeric(integrate(g(x),x=a..b)))

which doesn't work.  I've tried replacing the second line with

  function(mult(xs),g,x)

which works on the command line, but not in a function.  Any ideas as to
how I can get over this hump?

ever confused,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Drawing two curves simultaneously, two different colours?

2015-11-16 Thread Alasdair McAndrew
Dammit - why do I always overlook the obvious?  Yep, there it is, large as
life and twice as natural, in Jenks and Sutor.

The colors turn out to be defined in $FRICAS/src/graph/include/colors.h -
well, these are the hues, which can then be changed by the factors 0 - 4
being dark to light, with "bright" and "pastel" having the same value of
3.  (I don't know whether this is deliberate or not.  Seems strange to
me.)  This is a non-standard way of defining colors: standard models
include RGB and HSV, the latter being Hue (generally given as a floating
point value between 0 and 1), Saturation, the amount by which the hue has
been diluted with white, and Value, its brightness.  Then there are all the
colors defined in rgb.txt on your unix/Linux system (in /etc/X11/rgb.txt
for example) which gives a list of 753 named colors.  Most modern color
implementations, such as the xcolor.sty package of LaTeX, provide multiple
ways of defining and using colors.  If you want to see how HSV and RGB are
related check out https://en.wikipedia.org/wiki/HSL_and_HSV , or even
better http://www.poynton.com/PDFs/coloureq.pdf for color space
conversions.  (I used to teach this stuff... seems a long time ago now.)

Now to see if colors can be passed as with functions to Bill's nice little
"draws" program.

On Mon, Nov 16, 2015 at 8:12 PM, Ralf Hemmecke  wrote:

> On 11/16/2015 09:46 AM, Alasdair McAndrew wrote:
> > When I last asked (about seven years ago!) how to draw two curves (in 2D)
> > on the one set of axes, Bill Page immediately and obligingly provided me
> > with a little gem of a function that you can see at
> >
> > https://lists.gnu.org/archive/html/axiom-mail/2008-05/msg00038.html
> >
> > Now I know that it's supposedly possible to colour one's curves: such
> > documentation as I've been able to dig up makes reference to the
> > "spadcolors palette": there's even a domain PAL (Palette), but I can't
> find
> > how to actually specify a colour; whether RGB (and in which case as a
> list
> > of three integers each between 0 and 255, or hexadecimal, or by name, or
> > some other method).
> >
>
> Search for "palette" in http://fricas.github.io/book.pdf
>
> I found one on page 234.
>
> And you have
>
> http://fricas.github.io/api/Palette
> http://fricas.github.io/api/Color
>
> As you see here
>
>
> https://github.com/hemmecke/fricas/blob/master-hemmecke/src/algebra//color.spad#L45
>
> and
>
>
> https://github.com/hemmecke/fricas/blob/master-hemmecke/src/algebra//color.spad#L77
>
> the colors are internally stored as hue + weight. But don't ask me what
> the RGB relation to the hue is. Looking into header.h seems to indicate
> that there is a list of 27 predefined colors in FriCAS. More I cannot
> say at the moment.
>
> Ralf
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Drawing two curves simultaneously, two different colours?

2015-11-16 Thread Alasdair McAndrew
When I last asked (about seven years ago!) how to draw two curves (in 2D)
on the one set of axes, Bill Page immediately and obligingly provided me
with a little gem of a function that you can see at

https://lists.gnu.org/archive/html/axiom-mail/2008-05/msg00038.html

Now I know that it's supposedly possible to colour one's curves: such
documentation as I've been able to dig up makes reference to the
"spadcolors palette": there's even a domain PAL (Palette), but I can't find
how to actually specify a colour; whether RGB (and in which case as a list
of three integers each between 0 and 255, or hexadecimal, or by name, or
some other method).

Or can this whole business now be done neatly with gnuDraw?  I note that
gnuDraw, while no doubt excellent, has no examples in its documentation, so
I've no idea how to actually use it.

Note: I've checked out color.spad, palette.spad, and view2D.spad, but
without a couple of examples I'm somewhat at sea.

cheers,
Alasdair


-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] High-precision quadrature

2015-11-15 Thread Alasdair McAndrew
Y'all may be interested in two recent blog posts of mine:

http://numbersandshapes.net/?p=28776
http://numbersandshapes.net/?p=44203

which discuss tanh-sinh quadrature, and show how it can be implemented in
PanAxiom.

If you think it worthwhile I could rewrite this in SPAD.

cheers,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Problem with displayed digits

2015-11-15 Thread Alasdair McAndrew
Well in fact not long after my laptop ran out of batteries and just turned
itself off - so I'll never know the root cause.  It was a curious thing
though.

On Sun, Nov 15, 2015 at 11:10 PM, Grégory Vanuxem 
wrote:

> Hello,
>
> From memory, if it does not deserve me, I'm at home, it's a pity this
> function does not return the preceded argument.
>
> --
> G. Vanuxem
> Le 14 nov. 2015 15:56, "Ralf Hemmecke"  a écrit :
>
>> > outputFixed()
>> >
>> > has no effect - no matter what I do, my displayed floating point output
>> is
>> > stuck at 2 decimal places.
>>
>> Can you demonstrate that with some list of commands that demonstrate the
>> problem? You might even want to use a "SandboxFoo" wikipage on the
>> axiom-wiki, i.e. create the page
>>
>> http://axiom-wiki.newsynthesis.org/SandBoxFloatOutput
>>
>> and put thes commands there.
>>
>> Ralf
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "FriCAS - computer algebra system" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to fricas-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to fricas-devel@googlegroups.com.
>> Visit this group at http://groups.google.com/group/fricas-devel.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Problem with displayed digits

2015-11-14 Thread Alasdair McAndrew
I have a curious problem: a while ago I entered

outputFixed(2)

so as just to get a brief idea of the size of things, without cluttering up
the screen with digits.  But now I want to get full display back.  However:

outputFixed(20)

or even

outputFixed()

has no effect - no matter what I do, my displayed floating point output is
stuck at 2 decimal places.  I know I could quit and start again, but is
there some way of (a) finding out what setting is causing this behaviour,
and (b) stopping it?

Ever confused,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Function inside a function?

2015-11-11 Thread Alasdair McAndrew
I have been experimenting with writing a few little programs to perform
numerical integration, in which I have been running into difficulties.  I
can do all the operations I need from the command line, but I run into
problems when I try to bundle those commands into a program.

As a simple example, suppose I wanted a program to implement the two-point
Gaussian rule, which approximates the integral of f(x) between -1 and 1 by
f(-1/sqrt(3))+f(1/sqrt(3)).

On an interval other than [-1,1], we need a scaling transformation.  So I
might have a file called "gauss2.input" which contains one function:

gauss2(f,a,b)==
  xs:LIST Float := [-1/sqrt(3),1/sqrt(3)]
  g := (x:Float):Float +-> f((b-a)/2*x+(b+a)/2)
  int2 := (b-a)/2*(g(xs.1) + g(xs.2))
  return(int2)

However, the system clams up on the use of the scaling function g(x), and
this gives no results.

I have two questions here: first, how do I get round this?  and second, if
I'm writing programs, should I be writing them in Aldor (that's the
language of ".input" files, isn't it?), or SPAD?

For that matter, how do all the languages Aldor, SPAD, Lisp, Boot link up -
which is used for which purpose, and why?

Thanks,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] A blog post...

2015-11-08 Thread Alasdair McAndrew
Y'all might be interested in a new blog post of mine which uses PanAxiom
for the computations.  (Just doing my tiny bit to get the system "out
there".)

It's at
http://numbersandshapes.net/2015/11/stieltjes-polynomials-and-integration/

-Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Formal polynomials?

2015-11-06 Thread Alasdair McAndrew

A quickie: is there any way of defining a formal polynomial with unknown
coefficients, such as:

a_0+a_1*x+a_2*x^2+a_3*x^3 ?

I want to calculate the values of the coefficients by a system of linear
equations based on integrations whose integrands include that polynomial.

For small polynomials I can write

p:=a+b*x+c*x^2+d*x^3

but this gets clumsy for higher powers.

I can enter, for example

A:=[a[n] for n in 0..10]

for a list of symbols, but neither of

sum(a[i]*x^i, i=0..10)

or

sum(A.i*x^(i-1),i=1..11)

work, nor do they work when "sum" is replaced with "summation".


--

[https://ci6.googleusercontent.com/proxy/2sF0a1ZoLMOPckOBVppCZ4OFi06ffJNGtQadXIhbQiE95NE6m4gM53kVdCiQnVJYlRw380RlZ0tK7XHk4CmM2qy3nTM_ptogovPuXhk2=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/facebook.png] 
[http://www.facebook.com/alasdair.mcandrew][https://ci4.googleusercontent.com/proxy/egLBn4P9MCM5JXRJFUg5fGnVRlWCGBo6zl_hik07VL66K0muLhfGiUf2i_7iymWxqLVLANxJraL5xfbJOTx8akBt9TmFlAIJcVuyk6fs2a9ASV26=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/f-gplus_256-48.png] 
[https://plus.google.com/+AlasdairMcAndrew/posts][https://ci3.googleusercontent.com/proxy/-agz0u1Ac2-yf996SqPviIMbF5L-qAheB2hrZu975cEQB4YOZRFxRLuXLXmoQYBGNsMppMznpOXtgH2hmVu428QgisuXNCqKPzRQf1ZJ=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/linkedin.png] 
[https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108][https://ci5.googleusercontent.com/proxy/V-iov0_6bPsm3W5m1rgoRpRS5HaoNkB_5EbwhbqM_SqKHZOJsrTxalR6JGpq4SaT0gndZYFa2JH92qAJUGe2YVF05zindKPUWLep5js=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/twitter.png] 
[https://twitter.com/amca01][https://ci6.googleusercontent.com/proxy/AMQYVjh54hMGPrzE9x9QAB8CTaI4oJKwlOSjuRnDGBKXOtbQJ9c9nVqOdcEd9fLnc1vtced39dXoWEEJHoJ0SUb2eH6a6wZdyjPMJQY3vw=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/wordpress.png] 
[http://numbersandshapes.net]


--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] New blog post about (Pan)Axiom

2015-11-04 Thread Alasdair McAndrew
Ya'll might be interested in a new blog post "Re-discovering Axiom":

http://numbersandshapes.net/2015/11/re-discovering-axiom/

cheers,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-11-03 Thread Alasdair McAndrew
A few thoughts:

   1. How do we allow for optional parameters (epsabs, epsrel, limit etc)?
   The approach taken by  GSLL, and therefore by me in my version of gsl.spad
   was to overload the integration function, and to give values for the extra
   parameters when they weren't given by the user.  This all had to be done in
   order: epsabs, epsrel, limit.  This means that you can't set the limit
   without setting epsabs and epsrel first.  Is there a "named" way of
   entering optional parameters in spad:
   integrationQng(x+->sin(x^2),0.0,%pi/2,'limit=2000) say?  This means that
   the user can set any optional parameters, in any order.
   2. Improper integrals: GSLL has three separate functions: qagi
   (integrating from -inf to +inf), qagiu (integrating from a to inf, a being
   finite), and qagil (integrating from -inf to b).  For each function it
   makes a substitution so that the integral is defined between 0 and 1 - you
   can see the substitutions in the gsl source file integration/qags.c. Thus
   the GSLL tests for qagi, qagiu, and qagil independently.  The approach
   taken in Maxima is to have just one function, which they call quad_qagi,
   which can be used for any integral involving infinity, and which makes the
   appropriate substitution depending on which of the limits is finite.
   3. Names of functions: gslIntegrationQng, integrationQng, quadQng...?
   (I like the last because it's short!)
   4. Other GSL/GSLL functions... I suppose some numerical linear algebra
   (including eigensystems) would be nice, random number generation, and
   numerical ODE solving - GSL supports a host of different methods, mainly
   embedded Runge-Kutta methods of different orders. I think that FFTs and
   other transforms (wavelets) are better suited for purely numerical
   software, like GNU Octave.  Also, the GSL implementation of FFT is not the
   most optimized: if we wanted one we should go for FFTW ("Fastest Fourier
   Transform in the West").

Oooh look - it's time to have a cup of tea!

-Alasdair

On Tue, Nov 3, 2015 at 5:34 PM, Ralf Hemmecke  wrote:

> On 11/03/2015 12:51 AM, Alasdair McAndrew wrote:
> > By the way, where is "per" defined?
>
> >> (defun gslintegrationqng (per f a b)
> >>   (apply (|mkLispFunction3| per) (multiple-value-list
> >> (gsl:integration-qng (|mkLispFunction1| f) a b
> >> ...
> >>
> >> -- gsl.spad
> >> ...
> >> integrationQng: (DF -> DF,DF,DF) -> Record(result:DF, abserr:DF,
> >> neval:Integer)
> >>   ++ \spad{\integrationQng}  applies the Gauss-Kronrod 10-point,
> >>   ++ 21-point, 43-point and 87-point integration rules in succession
> >> ...
> >> integrationQng(f,a,b) == GSLINTEGRATIONQNG(
> >>   -- convert returned values to Spad representation
> >>   (v1:DF,v2:DF,v3:Integer):Record(result:DF, abserr:DF,
> >> neval:Integer)+->[v1,v2,v3],
> >>   f,a,b)$Lisp
>
> As far as I can see, the definition of integrationQng calls
> GSLINTEGRATIONQNG with 4 parameters. The first parameter is the per,
> i.e. the (anonymous) function:
>
>   (v1:DF,v2:DF,v3:Integer): Record(result:DF, abserr:DF,neval:Integer) _
>   +->  [v1,v2,v3]
>
> Ralf
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-11-02 Thread Alasdair McAndrew
Yep:

integrationQagp(x+->x^3*log(abs((x^2-1)*(x^2-2))),[0.0,1.0,sqrt(2.0),3.0])

returns the answer

[result= 52.74074838347258,abserr= 1.3130161420349395e-6]
Type: Record(result: DoubleFloat,abserr:
DoubleFloat)

which is correct.  Note that the absolute error is set in GSLL to be
1.0e-5, which is quite large (but on the other hand almost always ensures
convergence), so unless you allow the user to enter an error value, the
result will only be accurate to that value.

-Alasdair

On Tue, Nov 3, 2015 at 12:43 PM, Bill Page 
wrote:

> On 2 November 2015 at 18:51, Alasdair McAndrew  wrote:
> >
> > Very nice!  I have been trying to extend your (Bill's) original programs
> (with
> > "pretend Integer") but these seem much nicer -
>
> Although there is no explicit use of 'pretend' there is still some
> implicit "pretending" going on behind the scenes.  The main point
> however is to try to do most of the work in Spad without pretend so
> that things are as type-safe and representation independent as
> possible.
>
> > although I don't fully understand how they work (nothing like starting
> from
> > the bottom, is there?).
>
> I very much appreciate every time you ask a question...
>
> > You can also implement qagp - which requires a user-given list of
> > singularities - with something like:
> >
> > (defun gslintegration gagp (per f a b S)
> > (let* A (grid:make-foreign-array 'double-float :dimensions (length S)
> :initial-contents S))
> > (apply (|mkLispFunction2| per)
> > (multiple-value-list (gsl:integration-qagp (|mkLispFunction1| f) a b
> A
> >
>
> Please is the slightly revised code for integrationQagp at
> https://github.com/billpage/gsla
>
> > I haven't tested this yet, but I've tested its components.  You can also
> include optional
> > parameters (abserr, relerr etc).
>
> Can I leave that for you to do based on the example that I sent in
> another email? :)
>
> > By the way, where is "per" defined?
> >
>
> The function that is passed to the parameter 'per' is defined in the Spad
> code.
>
> Cheers,
> Bill Page.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-11-02 Thread Alasdair McAndrew
as-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: Documentation in spad files

2015-11-02 Thread Alasdair McAndrew
Many thanks - I did in fact have a look through those pages.  But they seem
more geared to producing stand-alone hypertex files.  What I was hoping to
find was how to format text on lines starting with ++ in a spad file.

Thanks again,
Alasdair

On Mon, Nov 2, 2015 at 10:21 PM, Themos  wrote:

> Hello Alasdair,
>
> to get rid of command windows generated by HyperDoc clicks, try ")close".
> You can see the system commands help if you follow "Settings" from HyperDoc
> top-level and then "Commands".
>
> Themos Tsikas
>
> On Sunday, 1 November 2015 00:04:19 UTC, Alasdair wrote:
>
>> I have belatedly discovered that HyperDoc picks up the documentation from
>> compiled user-created spad files.  That is very very nice.
>>
>> Where can I find some information on formatting docstrings?  I'm also
>> finding that HyperDoc sometimes produces odd results: not entering a
>> \newline, or introducing strange characters.
>>
>> One more HyperDoc question: how can I get rid of those inferior FriCAS
>> windows which occasionally appear to run commands in?  If I kill such a
>> window, then on my system. both HyperDoc and FriCAS crash.
>>
>> Thanks,
>> Alasdair
>>
>> --
>> [image: http://www.facebook.com/alasdair.mcandrew]
>> <http://www.facebook.com/alasdair.mcandrew> [image:
>> https://plus.google.com/+AlasdairMcAndrew/posts]
>> <https://plus.google.com/+AlasdairMcAndrew/posts> [image:
>> https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
>> <https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
>> https://twitter.com/amca01] <https://twitter.com/amca01> [image:
>> http://numbersandshapes.net] <http://numbersandshapes.net>
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/iWEN3BoUOg8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Documentation in spad files

2015-10-31 Thread Alasdair McAndrew
I have belatedly discovered that HyperDoc picks up the documentation from
compiled user-created spad files.  That is very very nice.

Where can I find some information on formatting docstrings?  I'm also
finding that HyperDoc sometimes produces odd results: not entering a
\newline, or introducing strange characters.

One more HyperDoc question: how can I get rid of those inferior FriCAS
windows which occasionally appear to run commands in?  If I kill such a
window, then on my system. both HyperDoc and FriCAS crash.

Thanks,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: FriCAS in a console

2015-10-31 Thread Alasdair McAndrew
I don't think it should be too much of an imposition to require
documentation to be written in HyperTeX - if you're a modern mathematician,
you should know TeX very well anyway.  What would be nice is some way of
pulling the ++ docstrings out of spad files and into the console.

And including usage examples.  For instance the docstrings for numquad.spad
are very good: see the lovely new web page at
http://fricas.github.io/api/NumericalQuadrature.html, but what is lacking
are examples.  (And a discussion of the differences of relative and
absolute errors!)

-Alasdair

On Sun, Nov 1, 2015 at 4:14 AM, Ralf Hemmecke  wrote:

> > So I don't have an answer...but it would be nice to have at least a
> unified
> > documentation system to which anybody could easily contribute.
>
> First of all, the ++ docstrings are already there. But unfortunately
> although they go into hyperdoc and into http://fricas.github.io/api as
> you said, that's not enough. When I am searching how to solve a problem,
> I might find a function, but in FriCAS it's always difficult to build
> the respective domains first in order to apply that function, so I fully
> agree that there must be more example pages demonstrating how FriCAS
> functionality is used.
>
> In fact, that is what I intend to do with http://fricas.github.io .
> Well, all the data there already lives in a private git repository, but
> it's not my intention to keep it private. I just find the repo is not
> yet ready for the public, because it basically only works for me to
> generate this webpage. But yes, soon, I'll put this repo onto github and
> will accept pull requests. I'm very much interested in improving the
> documentation, because I think that is one way to avoid that people
> start with FriCAS and then put it aside, because there is no easy help
> available. Let's face it: not every user is brave enough to send his
> problems to the mailing list.
>
> Ralf
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/qC9mzkTf3NY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-31 Thread Alasdair McAndrew
Oops - yes you are quite right!  The function integration-qag only returns
two values, not three.

Thanks very much!

-Alasdair

On Sat, Oct 31, 2015 at 3:58 PM, Waldek Hebisch 
wrote:

> Alasdair McAndrew wrote:
> >
> > I am enlarging Kurt and Bill's gsl.* function to include the gsl/gsll
> > function integration-qag.  This can be invoked, for example as
> >
> > )lisp (gsll:integration-qag (lambda (x) (exp (- (* x x 0.0 1.0
> :gauss21)
> >
> > where the final :gauss21 is one of a number of parameters which define
> the
> > integration rule to be used.
> >
> > In my gsl.lisp file I have
> >
> > (defvar intrules (list ':gauss15 ':gauss21 ':gauss31 ':gauss41 ':gauss51
> > ':gauss61))
> >
> > (defun integration-qag-list (f a b n)
> >   (multiple-value-list (integration-qag f a b (eval (nth n intrules)
> >
> > and in my corresponding gsl.spad:
> >
> > gslIntegrationQag(f,a,b,n) ==
> >   r:List DF:=INTEGRATION_-QAG_-LIST(mkLispFunction1(f@
> > (DF->DF))$Lisp,a,b,n)$Lisp
> >   [r(1),r(2),r(3) pretend Integer]
> >
> > This all compiles OK.  But in FriCAS:
> >
> > (1) -> gslIntegrationQag(x+->exp(-x^2),0.0,1.0,2)
> >
> >>> Error detected within library code:
> >index out of range
> >
> > so clearly I've not set something up correctly - I suspect it's my
> > cack-handed defvar list of parameters and my use of (nth n intrules).
> But
> > I don't know why this isn't working, and what I should be doing instead.
>
> Note that number 2 corresponds to :GAUSS31:
>
> )lisp (defvar intrules (list ':gauss15 ':gauss21 ':gauss31 ':gauss41
> ':ga)lisp (defvar intrules (list ':gauss15 ':gauss21 ':gauss31 ':gauss41
> ':gauss51 ':gauss61))
>
> Value = INTRULES
> (1) -> )lisp (nth 2 intrules)
>
> Value = :GAUSS31
>
> AFAICS 'eval' in 'integration-qag-list' is not needed.  But I do
> not think this is reason for error.  I would rather supect that
> 'integration-qag' returns less values than you expect.  Anyway
> in such situation I would do
>
> )set break break
>
> run the offending command
>
> and then at Lisp debugger prompt (to avoid potentially too large
> debugging printouts):
>
> (setf sb-ext:*debug-print-variable-alist*
>  '((*print-array* . nil) (*print-length* . 10)))
>
> Next:
>
> backtrace
>
> shows active calls and (if available) their arguments
>
>
> --
>   Waldek Hebisch
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: FriCAS in a console

2015-10-30 Thread Alasdair McAndrew
I agree that lack of manpower will always mean that there are more things
in anybody's wishlist than there are people to actually do them.  And I
think most people would rather extend FriCAS's functionality than do the
nuts-and-bolts job of documentation.  If I am successful in extending Kurt
and Bill's gsl.spad/lisp to cover all the functionality of QUADPACK, I'd
certainly be happy to whip up some documentation.  But as you say - how
should it be written? and where would it go? and how would the new user
find out about it?

In GNU Octave, for example:

Octave:1> lookfor quad
dblquad Numerically evaluate the double integral of F.
quadgk  Numerically evaluate the integral of F from A to B
using adaptive Gauss-Konrod quadrature.
quadl   Numerically evaluate the integral of F from A to B
using an  adaptive Lobatto rule.
quadv   Numerically evaluate the integral of F from A to B
using an  adaptive Simpson's rule.
triplequad  .
qp  A_LB, A_IN, A_UB)  Solve the quadratic program
quad_optionsQuery or set options for the function 'quad'.
quadNumerically evaluate the integral of F from A to B
using Fortran  routines from QUADPACK.
quadcc  Numerically evaluate the integral of F from A to B
using the  doubly-adaptive Clenshaw-Curtis quadrature described by P.
quadgk  Numerically evaluate the integral of F from A to B
using adaptive Gauss-Konrod quadrature.

Octave:2> help quadgk

And then you have a copious page about the function, its parameters, its
output, and how it works.  The documentation is actually part of the
function file: there is a file quadgk.m which describes and implements the
function, and includes documentation (which is extracted by "help") as well
as comments, and examples.  This makes writing new functions easier in the
sense that you know where everything is meant to be.  There is also a page
on the Octave web site about how to get involved.

In Maxima, much the same thing works from the console:

(%1) ?? quad

 0: Functions and Variables for QUADPACK
 1: Introduction to QUADPACK
 2: quadrilateral  (Functions and Variables for draw)
 3: quad_control  (Functions and Variables for QUADPACK)
 4: quad_qag  (Functions and Variables for QUADPACK)
 5: quad_qag <1>  (Functions and Variables for QUADPACK)
 6: quad_qagi  (Functions and Variables for QUADPACK)
 7: quad_qagi <1>  (Functions and Variables for QUADPACK)
 8: quad_qagp  (Functions and Variables for QUADPACK)
 9: quad_qagp <1>  (Functions and Variables for QUADPACK)
 10: quad_qags  (Functions and Variables for QUADPACK)
 11: quad_qags <1>  (Functions and Variables for QUADPACK)
 12: quad_qawc  (Functions and Variables for QUADPACK)
 13: quad_qawc <1>  (Functions and Variables for QUADPACK)
 14: quad_qawf  (Functions and Variables for QUADPACK)
 15: quad_qawf <1>  (Functions and Variables for QUADPACK)
 16: quad_qawo  (Functions and Variables for QUADPACK)
 17: quad_qawo <1>  (Functions and Variables for QUADPACK)
 18: quad_qaws  (Functions and Variables for QUADPACK)
 19: quad_qaws <1>  (Functions and Variables for QUADPACK)
Enter space-separated numbers, `all' or `none':

If you then enter, say 5 at the prompt, you get another page with plenty of
information.  There is also a very nice web interface (as there is for
Octave).

The point is that these make it very easy for the beginner to start using
the system: there's lots of help, easily available, in different and usable
forms.  I would say that the documentation of Axiom/FriCAS is the most
off-putting aspect for the new user.  In fact the best documentation is
probably the Jenks-Sutor book, which even in its Hyperdoc form goes back to
1992.

This is always likely to be a problem since there simply aren't enough
people working on the project, and I don't think for anyone of them is
documentation the number one priority.

So I don't have an answer...but it would be nice to have at least a unified
documentation system to which anybody could easily contribute.

-Alasdair


On Sat, Oct 31, 2015 at 9:07 AM, Ralf Hemmecke  wrote:

> On 10/30/2015 09:19 PM, Alasdair McAndrew wrote:
> > ... - scattered and often not helpful enough.
>
> Yes, you've put the finger into the wound. Unfortunately, this is a very
> weak point of FriCAS. But healing it will cost a lot of time and effort.
> I currently work with Kurt on making the Jupyter notebook more stable.
> After that I intend to publish some notebooks that cover what you ask
> for, i.e. covering a topic with examples and explanations. I hope that
> will crow then and others will also contribute.
>
> > For example, I was trying to find out yesterday how to solve a
> > second order linear IVP.  I can set up the ODE, but I don't know how to
> > giv

Re: [fricas-devel] Re: FriCAS in a console

2015-10-30 Thread Alasdair McAndrew
 ?=? : (%,%) -> Boolean
>  ?^? : (%,PositiveInteger) -> %coerce : % -> OutputForm
>  hash : % -> SingleInteger latex : % -> String
>  ?~=? : (%,%) -> Boolean
>  hashUpdate! : (HashState,%) -> HashState
>
> If you want to learn about an operation, then
>
> (10) -> )display operation char
>
> There are 2 exposed functions called char :
>[1] String -> Character from Character
>[2] Integer -> Character from Character
>
> This text based help system is not perfect, and I would even say not
> really actively maintained, but it's still there and usable.
>
> Hope that helps.
> Ralf
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/qC9mzkTf3NY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-30 Thread Alasdair McAndrew
II am hoping for advice from folk higher up the food chain than me; I have
an error message which is not helpful enough.

I am enlarging Kurt and Bill's gsl.* function to include the gsl/gsll
function integration-qag.  This can be invoked, for example as

)lisp (gsll:integration-qag (lambda (x) (exp (- (* x x 0.0 1.0 :gauss21)

where the final :gauss21 is one of a number of parameters which define the
integration rule to be used.

In my gsl.lisp file I have

(defvar intrules (list ':gauss15 ':gauss21 ':gauss31 ':gauss41 ':gauss51
':gauss61))

(defun integration-qag-list (f a b n)
  (multiple-value-list (integration-qag f a b (eval (nth n intrules)

and in my corresponding gsl.spad:

gslIntegrationQag(f,a,b,n) ==
  r:List DF:=INTEGRATION_-QAG_-LIST(mkLispFunction1(f@
(DF->DF))$Lisp,a,b,n)$Lisp
  [r(1),r(2),r(3) pretend Integer]

This all compiles OK.  But in FriCAS:

(1) -> gslIntegrationQag(x+->exp(-x^2),0.0,1.0,2)

   >> Error detected within library code:
   index out of range

so clearly I've not set something up correctly - I suspect it's my
cack-handed defvar list of parameters and my use of (nth n intrules).  But
I don't know why this isn't working, and what I should be doing instead.

Sigh.  Maybe I need to drink more tea.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-29 Thread Alasdair McAndrew
Good to see you know your Vulgate.  I like a little historical literacy in
a news group.

On Fri, Oct 30, 2015 at 2:56 PM, Kurt Pagani  wrote:

>
> LOL, Alisdair was right: cui honorem, honorem
> My humble contribution is common lore ... the back-breaking work lies
> before you :)
>
>
>
> Am 30.10.2015 um 02:02 schrieb Bill Page:
> > On 29 October 2015 at 18:56, Alasdair McAndrew  wrote:
> >>
> >> A quick note: gsl.lisp and gsl.spad were originally written by Bill Page
> >> and made available on his site.  So the fact that they work is entirely
> due
> >> to him.  I have attempted to make some changes, but rather like
> barnacles
> >> on a ship's hull they don't do much except make the code more confusing.
> >> So you should refer to "Bill's gsl.spad" if it works, and "Alasdair's
> gsl.spad"
> >> if it doesn't!
> >>
> >
> > I always liked the sound of the git "blame" command ... :)  In fact as
> > I tried to say clearly much earlier in this thread, the original
> > versions of 'gsl.lisp' and 'gsl.spad' were written by Kurt.  Alasdair
> > and I are just making more or less successful changes to Kurt's
> > original model code.
> >
> > Bill.
> >
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-29 Thread Alasdair McAndrew
Actually I don't know that gsll does fully solve the type problem. Gsll
calls an FFI "groveller" method which does what it says: it "grovels" about
and matches up types.  So in a sense FFI does a great deal of the hard work
and gsll is mainly a front end (although from my poking about the gsll
directories it does do a lot of setting things up).

On Fri, Oct 30, 2015 at 1:28 PM, Waldek Hebisch 
wrote:

> Bill Page wrote:
> >
> > On 29 October 2015 at 21:31, Alasdair McAndrew  wrote:
> > >
> > > On a side issue, I note that gsll works by providing a wrapper for gsl
> using
> > > the Foreign Function Interface (which is why we need the ffi
> libraries).
> > > This means that the SPAD function in gsl.spad calls a lisp function in
> > > gsl.lisp which calls the gsll function gsll:integration-qng which in
> turns
> > > calls the gsl function defined in
> /usr/local/src/gsl-1.16/integration/qag.c
> >
> > I see nothing wrong with this strategy since just calling C from Lisp
> > is the hardest part.  GSLL solves many (but not all) of the problems
> > with type conversions.
>
> Not exactly.  There are types in C and they map reasonably to
> Spad types.  Lisp encourages things which are awkward in
> Spad.  In both cases one needs to declare types at Spad
> level and some cases needs wrappers.  One needs to ensure
> that libraries can be found, which for Lisp means that
> we need to find bot Lisp library and C library.
> --
>   Waldek Hebisch
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-29 Thread Alasdair McAndrew
Yes, in fact the chain of programming goes Kurt, Bill, me.

On a side issue, I note that gsll works by providing a wrapper for gsl
using the Foreign Function Interface (which is why we need the ffi
libraries).  This means that the SPAD function in gsl.spad calls a lisp
function in gsl.lisp which calls the gsll function gsll:integration-qng
which in turns calls the gsl function defined in
/usr/local/src/gsl-1.16/integration/qag.c What this means is that if we
wanted we could eliminate gsll completely and just use FFI to access gsl
directly.  (Of course I don't know how to do this!)  But that's modern
computing for you - there are chains of libraries and programs all
depending on each other in different ways

Time for lunch.

On Fri, Oct 30, 2015 at 12:02 PM, Bill Page 
wrote:

> On 29 October 2015 at 18:56, Alasdair McAndrew  wrote:
> >
> > A quick note: gsl.lisp and gsl.spad were originally written by Bill Page
> > and made available on his site.  So the fact that they work is entirely
> due
> > to him.  I have attempted to make some changes, but rather like barnacles
> > on a ship's hull they don't do much except make the code more confusing.
> > So you should refer to "Bill's gsl.spad" if it works, and "Alasdair's
> gsl.spad"
> > if it doesn't!
> >
>
> I always liked the sound of the git "blame" command ... :)  In fact as
> I tried to say clearly much earlier in this thread, the original
> versions of 'gsl.lisp' and 'gsl.spad' were written by Kurt.  Alasdair
> and I are just making more or less successful changes to Kurt's
> original model code.
>
> Bill.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-29 Thread Alasdair McAndrew
A quick note: gsl.lisp and gsl.spad were originally written by Bill Page
and made available on his site.  So the fact that they work is entirely due
to him.  I have attempted to make some changes, but rather like barnacles
on a ship's hull they don't do much except make the code more confusing.
So you should refer to "Bill's gsl.spad" if it works, and "Alasdair's
gsl.spad" if it doesn't!

On Thu, Oct 29, 2015 at 8:17 PM, Ralf Hemmecke  wrote:

> >> U==>Union(DoubleFloat, Integer)
>
> > (9) -> PRETTYPRINT(2::U)$Lisp
> > (0 . 2.0)
> >
> >(9)  ()
> > Type:
> SExpression
> When I look at this
>
> (1) -> DF==>DoubleFloat;Z==>Integer
> (2) -> R==>Record(result:DF, abserr:DF, neval:Integer)
> (6) -> r: R := [2.0, 3.0, 17]
>
>(6)  [result= 2.0,abserr= 3.0,neval= 17]
>Type: Record(result: DoubleFloat,abserr: DoubleFloat,neval: Integer)
> (7) -> PRETTYPRINT(r)$Lisp
> #(2.0 3.0 17)
>
> it looks as if a record is internally stored as a lisp vector, no?
>
> Concerning (from Alasdair's gsl.lisp)
>
> ; Return multiple values as a list
> (defun integration-qng-list (f a b epsabs epsrel)
>   (multiple-value-list (integration-qng f a b epsabs epsrel)))
>
> Maybe it would be easiest for Alasdair to turn the lisp value (that is
> returned from the GSL function integration-png) into such an array.
> I.e. instead of multiple-value-list he should call a function to produce
> the array/record. (Sorry, no idea what that function is.)
>
> In the .spad file instead of
>
>   r:List
> DF:=INTEGRATION_-QNG_-LIST(mkLispFunction1(f@
> (DF->DF))$Lisp,a,b,epsabs,epsrel)$Lisp
>   [r(1),r(2),r(3) pretend Integer]
>
> there would then simply by
>
>   R ==> Record(result:DF, abserr:DF, neval:Integer)
>   r: R :=
> NTEGRATION_-QNG_-LIST(mkLispFunction1(f@
> (DF->DF))$Lisp,a,b,epsabs,epsrel)$Lisp
>
> Ralf
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-28 Thread Alasdair McAndrew
Not easy is it?  We want a return value (of a function defined in a spad
file) to consist of two DoubleFloat values and an integer.  As you know,
Bill Page had to use a list of DoubleFloats one of whose values was of type
"pretend Integer", which is a kludge - although it works.  We are told that
spad doesn't support records - but is there some natural way of returning
values of two different types?

On Thu, Oct 29, 2015 at 1:58 PM, Waldek Hebisch 
wrote:

> Alasdair McAndrew wrote:
> >
> > I tried to define
> >
> > U==>Union(DoubleFloat, Integer)
> >
> > and then have the return list r to be of type U:
> >
> > r:List U:=...
> >
> > Then I thought r could happily include both DF's and integers.  But it
> > doesn't work in the way I hoped it would.  Drat.
>
> Well, at low level elements of Union consist of tag and value.
> Tag if a small integer identifying which variant is at force.
> More precisely, Spad union is interpreted as Lisp pair,
> consisting of tag and value:
>
> (9) -> PRETTYPRINT(2::U)$Lisp
> (0 . 2.0)
>
>(9)  ()
> Type:
> SExpression
>
> The dot above indicates that this is not a list but
> a general pair (pairs in lists have rest of list as second
> element).  For some reason interpreter decided to treat 2
> as a double, so we got first variant (with tag 0).
>
> Having list of such pairs is quite different than list
> which mixes integers and doubles:
>
> (10) -> PRETTYPRINT([2::U])$Lisp
> ((0 . 2.0))
>
>(10)  ()
> Type:
> SExpression
> (11) -> PRETTYPRINT([2])$Lisp
> (2)
>
>(11)  ()
> Type:
> SExpression
> (12) -> PRETTYPRINT([2::DoubleFloat])$Lisp
> (2.0)
>
>(12)  ()
> Type:
> SExpression
>
> --
>   Waldek Hebisch
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-28 Thread Alasdair McAndrew
I tried to define

U==>Union(DoubleFloat, Integer)

and then have the return list r to be of type U:

r:List U:=...

Then I thought r could happily include both DF's and integers.  But it
doesn't work in the way I hoped it would.  Drat.

On Wed, Oct 28, 2015 at 1:11 PM, Bill Page 
wrote:

> On 27 October 2015 at 21:34, Waldek Hebisch 
> wrote:
> >
> > Expanding on Bill's answer: this code is an abuse (wrong).  The
> > core thing is that FriCAS list are homogeneous: all elements have
> > the same type.  In Lisp lists are allowed to have elements of
> > different Lisp types.  The integration routine returns two
> > machine float and one machine integer.  On Lisp side Bill packs
> > this into a list.  But on Spad side this List in an illegal
> > object, so Bill lies and tells Spad compiler that the list
> > contains DoubleFloat-s.  Then he has to use 'pretend' to
> > tell Spad compiler that the third element is in fact an
> > integer.  Currently this works, but will break down if
> > Spad compiler becomes only slightly smarter: claiming that
> > something is both DoubleFloat and Integer is a contradiction
> > and may lead to wrong code or compile time error.
> >
>
> Yes, guilty. :) But this was only the first solution I could think of
> and so far this is just proof-of-concept code.  There are other ways
> in Lisp of dealing with functions that return multiple values but this
> is only possible in FriCAS at a higher level, e.g. by use of Record.
> Perhaps there is some easy way of using routines already available in
> BOOT to construct a Record value directly?  It would take me some time
> to find it. Do you know Waldek?  Or can you suggest a different
> possible permanent solution?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Re: FriCAS in a console

2015-10-28 Thread Alasdair McAndrew
It seems to do command completion anyway, of at least some commands.  But
I'll add that command.list to rfricas and see what happens.

The attached file works for me... you may have to change the first few
lines according to your own installation.  I just copied them from my
"fricas" executable file which sets all the environment variables and
directories.

On Wed, Oct 28, 2015 at 8:49 PM, oldk1331  wrote:

>
>
> On Wednesday, October 28, 2015 at 11:16:10 AM UTC+8, Alasdair wrote:
>>
>> Better FriCAS in a console:
>>
>> (1) Download and install rlwrap
>> (2) put the attached file somewhere in your path and make it executable
>> (this is a copy of the "rmaxima" command with very slight changes)
>> (3) run "rfricas" instead of "fricas"
>>
>> If we had a file containing a list of all FriCAS commands then we could
>> use rlwrap to do command completion, too.
>>
>
> There is
> ${INSTALL_PREFIX}/lib/fricas/target/x86_64-unknown-linux/lib/command.list .
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/qC9mzkTf3NY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


rfricas
Description: Binary data


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-27 Thread Alasdair McAndrew
Does SPAD support optional arguments to functions?  The default absolute
error (as defined in gsll: calculus/numerical-integration.lisp) is only
1.0d-5.  We might wish to decrease this error.  In which case the
definition of gslIntegrationQng in gsl.spad needs to include some optional
arguments which can then be passed to the function in gsl.lisp.

On Wed, Oct 28, 2015 at 1:11 PM, Bill Page 
wrote:

> On 27 October 2015 at 21:34, Waldek Hebisch 
> wrote:
> >
> > Expanding on Bill's answer: this code is an abuse (wrong).  The
> > core thing is that FriCAS list are homogeneous: all elements have
> > the same type.  In Lisp lists are allowed to have elements of
> > different Lisp types.  The integration routine returns two
> > machine float and one machine integer.  On Lisp side Bill packs
> > this into a list.  But on Spad side this List in an illegal
> > object, so Bill lies and tells Spad compiler that the list
> > contains DoubleFloat-s.  Then he has to use 'pretend' to
> > tell Spad compiler that the third element is in fact an
> > integer.  Currently this works, but will break down if
> > Spad compiler becomes only slightly smarter: claiming that
> > something is both DoubleFloat and Integer is a contradiction
> > and may lead to wrong code or compile time error.
> >
>
> Yes, guilty. :) But this was only the first solution I could think of
> and so far this is just proof-of-concept code.  There are other ways
> in Lisp of dealing with functions that return multiple values but this
> is only possible in FriCAS at a higher level, e.g. by use of Record.
> Perhaps there is some easy way of using routines already available in
> BOOT to construct a Record value directly?  It would take me some time
> to find it. Do you know Waldek?  Or can you suggest a different
> possible permanent solution?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] FriCAS in a console

2015-10-27 Thread Alasdair McAndrew
Better FriCAS in a console:

(1) Download and install rlwrap
(2) put the attached file somewhere in your path and make it executable
(this is a copy of the "rmaxima" command with very slight changes)
(3) run "rfricas" instead of "fricas"

If we had a file containing a list of all FriCAS commands then we could use
rlwrap to do command completion, too.

Note that rlwrap keeps histories between sessions, so if you quit FriCAS,
or if your machine suddenly shuts down, you can fire up again and keep on
from where you left off.

-Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


rfricas
Description: Binary data


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-27 Thread Alasdair McAndrew
A quickie: ")read /home/amca/quicklisp/setup.lisp" works in FriCAS, but not
in efricas.  Why not?  Also, the history mechanism in FriCAS in a console
seems a bit odd: sometimes (well, often), a previous command, obtained
using the arrow keys, will have extra characters, or chanrecters missing
(I'm using Konsole: the KDE console, with my term=xterm.)

On Wed, Oct 28, 2015 at 10:55 AM, Alasdair McAndrew 
wrote:

> Orright... two questions about
> https://github.com/billpage/gsla/blob/master/gsl.spad, and in particular
> the final three lines:
>
> gslIntegrationQng(f,a,b) ==
> r:List DF:=INTEGRATION_-QNG_-LIST(mkLispFunction1(f@
> (DF->DF))$Lisp,a,b)$Lisp
> [r(1),r(2),r(3) pretend Integer]
>
> First the use of "pretend".  As I understand it, "pretend" is a sort of
> syntactic fudge factor to allow Axiom to compile code in which the types
> may not be precisely fixed, or in which there may be a type mismatch.   But
> why is it needed particularly here - in the definition of
> gslIntegrationQng?   Surely an object is either an integer or it isn't, I
> would have thought, and we can define the final value "neval" to be an
> integer.
>
> Second, the underscores in "INTEGRATION_-QNG_-LIST".  Are these just to
> escape the hyphens, lest SPAD confuse them with minus signs? After all, the
> relevant function is defined in gsl.lisp as
>
> defun integration-qng-list (f a b)
> (multiple-value-list (integration-qng f a b)))
>
> which incidentally would appear to indicate that one of the languages here
> is case-insensitive.  Or is there another reason?
>
> With regard to plain text format, I fully agree, and I'll do that if
> people want.  On the other hand, it's nice to have some way of
> distinguishing code samples from text - the use of markdown is good for
> this, but I don't know if google groups supports it.  (Well, it sort of
> does, but through a browser extension called "Markdown Here" which also
> supports LaTeX.)
>
> I do find the mixture of SPAD and Lisp with their individual conventions
> and behaviours very confusing.
>
> I tells ya, there's nuthin' like Axiom for makin' a
> bloke feel stupid!
>
> -Alasdair
>
>
>
> On Wed, Oct 28, 2015 at 12:54 AM, Bill Page 
> wrote:
>
>> Alasdair,
>>
>> There is stuff to read such as Ralf suggests but in my opinion just
>> hitting your head against something relevant hard enough for long
>> enough is much more effective :)  Kurt's example code is short enough
>> not to cause much harm, so why not start just by asking one to two
>> questions rather than making a list?  As I am sure you tell your
>> students, the first step is not letting it make you feel intimidated.
>> Just ask.
>>
>> Concerning my question about naming conventions: My preference is to
>> avoid all redundant prefixes so Maxima isn't such a great model. I am
>> not sure I understand the intention of your examples
>>
>> >> v := quad(x+->exp(-x^2),0,1,1.0e-10)
>> >> qag(v)
>>
>> but yes, that is more or less what I would like.  The term "domain" in
>> Axiom has a particular meaning: a data/mathematical type or class.
>> For the purposes of extending Axiom to include more operations on
>> existing domains, e.g. DoubleFloat, a "package" is more appropriate.
>> Because GSL is a rather large library, it might be appropriate to
>> define more than one package but right now we have only one named
>> 'gsl'.
>>
>> Actually, using a package/domain name like 'gsl' consisting of all
>> lower case letters is contrary to the general conventions in the
>> Axiom/FriCAS library. Unlike variable and functions names, these names
>> are supposed to start with a capital letter.  Each package/domain also
>> has a short (< 6 characters) abbreviation, by convention written in
>> all upper case.  So we should probably at least change the package
>> name from 'gsl' to 'Gsl'.  In keeping with what I said above, maybe we
>> would want package names such as 'GSLintegrate' etc.
>>
>> As you see in examples, in many contexts we can avoid explicitly using
>> the package/domain name since it is automatically deduced by the
>> interpreter.
>>
>> Concerning your suggested packages: Note that there is already
>> extensive support in Axiom/FriCAS for Groebner basis compuations.  Did
>> you have something specific in mind?  BLAS and LAPACK might be
>> interesting.  As I understand it there are already interfaces to these
>> packages in GSL.
>>

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-27 Thread Alasdair McAndrew
Orright... two questions about
https://github.com/billpage/gsla/blob/master/gsl.spad, and in particular
the final three lines:

gslIntegrationQng(f,a,b) ==
r:List DF:=INTEGRATION_-QNG_-LIST(mkLispFunction1(f@(DF->DF))$Lisp,a,b)$Lisp
[r(1),r(2),r(3) pretend Integer]

First the use of "pretend".  As I understand it, "pretend" is a sort of
syntactic fudge factor to allow Axiom to compile code in which the types
may not be precisely fixed, or in which there may be a type mismatch.   But
why is it needed particularly here - in the definition of
gslIntegrationQng?   Surely an object is either an integer or it isn't, I
would have thought, and we can define the final value "neval" to be an
integer.

Second, the underscores in "INTEGRATION_-QNG_-LIST".  Are these just to
escape the hyphens, lest SPAD confuse them with minus signs? After all, the
relevant function is defined in gsl.lisp as

defun integration-qng-list (f a b)
(multiple-value-list (integration-qng f a b)))

which incidentally would appear to indicate that one of the languages here
is case-insensitive.  Or is there another reason?

With regard to plain text format, I fully agree, and I'll do that if people
want.  On the other hand, it's nice to have some way of distinguishing code
samples from text - the use of markdown is good for this, but I don't know
if google groups supports it.  (Well, it sort of does, but through a
browser extension called "Markdown Here" which also supports LaTeX.)

I do find the mixture of SPAD and Lisp with their individual conventions
and behaviours very confusing.

I tells ya, there's nuthin' like Axiom for makin' a
bloke feel stupid!

-Alasdair



On Wed, Oct 28, 2015 at 12:54 AM, Bill Page 
wrote:

> Alasdair,
>
> There is stuff to read such as Ralf suggests but in my opinion just
> hitting your head against something relevant hard enough for long
> enough is much more effective :)  Kurt's example code is short enough
> not to cause much harm, so why not start just by asking one to two
> questions rather than making a list?  As I am sure you tell your
> students, the first step is not letting it make you feel intimidated.
> Just ask.
>
> Concerning my question about naming conventions: My preference is to
> avoid all redundant prefixes so Maxima isn't such a great model. I am
> not sure I understand the intention of your examples
>
> >> v := quad(x+->exp(-x^2),0,1,1.0e-10)
> >> qag(v)
>
> but yes, that is more or less what I would like.  The term "domain" in
> Axiom has a particular meaning: a data/mathematical type or class.
> For the purposes of extending Axiom to include more operations on
> existing domains, e.g. DoubleFloat, a "package" is more appropriate.
> Because GSL is a rather large library, it might be appropriate to
> define more than one package but right now we have only one named
> 'gsl'.
>
> Actually, using a package/domain name like 'gsl' consisting of all
> lower case letters is contrary to the general conventions in the
> Axiom/FriCAS library. Unlike variable and functions names, these names
> are supposed to start with a capital letter.  Each package/domain also
> has a short (< 6 characters) abbreviation, by convention written in
> all upper case.  So we should probably at least change the package
> name from 'gsl' to 'Gsl'.  In keeping with what I said above, maybe we
> would want package names such as 'GSLintegrate' etc.
>
> As you see in examples, in many contexts we can avoid explicitly using
> the package/domain name since it is automatically deduced by the
> interpreter.
>
> Concerning your suggested packages: Note that there is already
> extensive support in Axiom/FriCAS for Groebner basis compuations.  Did
> you have something specific in mind?  BLAS and LAPACK might be
> interesting.  As I understand it there are already interfaces to these
> packages in GSL.
>
> One thing I tried last night (unsuccessfully) was to call
> 'lu-decomposition' the GSLL equivalent of 'gsl_linalg_LU_decomp'.  I
> have a problem converting the matrix passed by FriCAS to the required
> matrix format. This is the kind of thing we need to resolve for using
> more general routines.
>
> BTW, There is or once was a policy promoting the use of plain text
> email format on mailing lists. I notice yours arrive with a more
> modern look. There might be some people around who prefer the older
> format.
>
> Bill.
>
>
>
> On 27 October 2015 at 08:25, Alasdair McAndrew  wrote:
> >
> > Sorry to be an idiot - but where's a good place to go to learn about
> spad/boot/lisp
> > insofar as they relate to PanAxiom development?

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-27 Thread Alasdair McAndrew
Sorry to be an idiot - but where's a good place to go to learn about
spad/boot/lisp insofar as they relate to PanAxiom development?  I've been
looking over Kurt's gsl.lisp and gsl.spad and there are quite a few things
which confuse me.  I won't list them, as it would be a depressingly long
list for two very short files...

On Tue, Oct 27, 2015 at 2:20 PM, Alasdair McAndrew  wrote:

> We can just go the Maxima approach, and write quadQag, quadQng etc (Maxima
> has quad_qag, quad_qng) - this retains the naming convention from
> QUADPACK.   Or we could have a domain QUAD which included operations qag,
> qng etc... like this:
>
> v := quad(x+->exp(-x^2),0,1,1.0e-10)
> qag(v)
>
> As to other quicklisp libraries, BLAS, LAPACK? What about CL-BUCHBERGER -
> a common lisp implementation of Buchberger's algorithm for Groebner base
> computation?  The place to search is quickdocs.org.
>
> Note that QUADPACK is far from being the last word of numeric quadrature
> routines: I have been experimenting with the integral of sin(1/x) between
> x=0 and x=1, and pretty much every routine quits in disgust with an error.
> That's why I would also like to implement a scheme for tanh-sinh
> integration.
>
>
>
> On Tue, Oct 27, 2015 at 1:37 PM, Bill Page 
> wrote:
>
>> Here is a little design issue concerning names.
>>
>> Right now we have the example of 'gslIntegrationQng' and I have
>> started to fill in some miscellaneous functions such as
>>
>> gslLookup: String -> Symbol
>>   ++ \spad{\gslLookup} finds GSLL function by GSL name and
>>   ++ displays some documentation.
>> gslIsNaN?: DF -> Boolean
>>   ++ \spad{\gslIsNaN?} returns true if x is not-a-number.
>> gslIsInf: DF -> SingleInteger
>>   ++ \spad{\gslIsInf} returns +1 if x is positive infinity,
>>   ++ -1 if x is negative infinity and 0 otherwise. On
>>   ++ some platforms 1 is returned for negative infinity.
>> gslFinite?: DF -> Boolean
>>   ++ \spad{\gslFinite?} returns true if x is a real number,
>>   ++ and false if it is infinite or not-a-number.
>> gslFcmp: (DF,DF,DF) -> SingleInteger
>>   ++ \spad{\gslFcmp} determines whether x and y are approximately
>>   ++ equal to a relative accuracy epsilon.
>> gslIntegrationQng :  (DF -> DF,DF,DF) -> Record(result:DF,
>> abserr:DF, neval:Integer)
>>   ++ \spad{\gslIntegrationQng}  applies the Gauss-Kronrod 10-point,
>>   ++ 21-point, 43-point and 87-point integration rules in succession
>>
>> but before going further it occurs to me to wonder if we really should
>> continue to use the prefix 'gsl' in all these function names?  In
>> Axiom/FriCAS it is common to overload names and rely on package names
>> and types for disambiguation.  It seems unnecessarily redundant to
>> write:
>>
>> gslIntegrationQng$gsl
>>
>> Also, the names that appear at the GSLL (lisp) level omit the gsl
>> prefix for a similar reason - Common Lisp packaging.
>>
>> So I propose that we drop the 'gsl' part of the name and lowercase the
>> first letter, as is the Axiom custom.
>>
>> lookup: String -> Symbol
>>   ++ \spad{\lookup} finds GSLL function by GSL name and
>>   ++ displays some documentation.
>> isNaN?: DF -> Boolean
>>   ++ \spad{\isNaN?} returns true if x is not-a-number.
>> isInf: DF -> SingleInteger
>>   ++ \spad{\isInf} returns +1 if x is positive infinity,
>>   ++ -1 if x is negative infinity and 0 otherwise. On
>>   ++ some platforms 1 is returned for negative infinity.
>> finite?: DF -> Boolean
>>   ++ \spad{\finite?} returns true if x is a real number,
>>   ++ and false if it is infinite or not-a-number.
>> fcmp: (DF,DF,DF) -> SingleInteger
>>   ++ \spad{\fcmp} determines whether x and y are approximately
>>   ++ equal to a relative accuracy epsilon.
>> integrationQng :  (DF -> DF,DF,DF) -> Record(result:DF, abserr:DF,
>> neval:Integer)
>>   ++ \spad{\integrationQng}  applies the Gauss-Kronrod 10-point,
>>   ++ 21-point, 43-point and 87-point integration rules in succession
>>
>> What do you think?
>>
>> On 26 October 2015 at 20:44, Alasdair McAndrew  wrote:
>> >
>> > Now that Karl has provided a fantastic working template for an
>> integration
>> > routine from QUADPACK/GSL/GSLL it should be possible to extend those
>> > files to incorporate some of the other routines.   For the next few
>> days I'll

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-26 Thread Alasdair McAndrew
We can just go the Maxima approach, and write quadQag, quadQng etc (Maxima
has quad_qag, quad_qng) - this retains the naming convention from
QUADPACK.   Or we could have a domain QUAD which included operations qag,
qng etc... like this:

v := quad(x+->exp(-x^2),0,1,1.0e-10)
qag(v)

As to other quicklisp libraries, BLAS, LAPACK? What about CL-BUCHBERGER - a
common lisp implementation of Buchberger's algorithm for Groebner base
computation?  The place to search is quickdocs.org.

Note that QUADPACK is far from being the last word of numeric quadrature
routines: I have been experimenting with the integral of sin(1/x) between
x=0 and x=1, and pretty much every routine quits in disgust with an error.
That's why I would also like to implement a scheme for tanh-sinh
integration.



On Tue, Oct 27, 2015 at 1:37 PM, Bill Page 
wrote:

> Here is a little design issue concerning names.
>
> Right now we have the example of 'gslIntegrationQng' and I have
> started to fill in some miscellaneous functions such as
>
> gslLookup: String -> Symbol
>   ++ \spad{\gslLookup} finds GSLL function by GSL name and
>   ++ displays some documentation.
> gslIsNaN?: DF -> Boolean
>   ++ \spad{\gslIsNaN?} returns true if x is not-a-number.
> gslIsInf: DF -> SingleInteger
>   ++ \spad{\gslIsInf} returns +1 if x is positive infinity,
>   ++ -1 if x is negative infinity and 0 otherwise. On
>   ++ some platforms 1 is returned for negative infinity.
> gslFinite?: DF -> Boolean
>   ++ \spad{\gslFinite?} returns true if x is a real number,
>   ++ and false if it is infinite or not-a-number.
> gslFcmp: (DF,DF,DF) -> SingleInteger
>   ++ \spad{\gslFcmp} determines whether x and y are approximately
>   ++ equal to a relative accuracy epsilon.
> gslIntegrationQng :  (DF -> DF,DF,DF) -> Record(result:DF,
> abserr:DF, neval:Integer)
>   ++ \spad{\gslIntegrationQng}  applies the Gauss-Kronrod 10-point,
>   ++ 21-point, 43-point and 87-point integration rules in succession
>
> but before going further it occurs to me to wonder if we really should
> continue to use the prefix 'gsl' in all these function names?  In
> Axiom/FriCAS it is common to overload names and rely on package names
> and types for disambiguation.  It seems unnecessarily redundant to
> write:
>
> gslIntegrationQng$gsl
>
> Also, the names that appear at the GSLL (lisp) level omit the gsl
> prefix for a similar reason - Common Lisp packaging.
>
> So I propose that we drop the 'gsl' part of the name and lowercase the
> first letter, as is the Axiom custom.
>
> lookup: String -> Symbol
>   ++ \spad{\lookup} finds GSLL function by GSL name and
>   ++ displays some documentation.
> isNaN?: DF -> Boolean
>   ++ \spad{\isNaN?} returns true if x is not-a-number.
> isInf: DF -> SingleInteger
>   ++ \spad{\isInf} returns +1 if x is positive infinity,
>   ++ -1 if x is negative infinity and 0 otherwise. On
>   ++ some platforms 1 is returned for negative infinity.
> finite?: DF -> Boolean
>   ++ \spad{\finite?} returns true if x is a real number,
>   ++ and false if it is infinite or not-a-number.
> fcmp: (DF,DF,DF) -> SingleInteger
>   ++ \spad{\fcmp} determines whether x and y are approximately
>   ++ equal to a relative accuracy epsilon.
> integrationQng :  (DF -> DF,DF,DF) -> Record(result:DF, abserr:DF,
> neval:Integer)
>   ++ \spad{\integrationQng}  applies the Gauss-Kronrod 10-point,
>   ++ 21-point, 43-point and 87-point integration rules in succession
>
> What do you think?
>
> On 26 October 2015 at 20:44, Alasdair McAndrew  wrote:
> >
> > Now that Karl has provided a fantastic working template for an
> integration
> > routine from QUADPACK/GSL/GSLL it should be possible to extend those
> > files to incorporate some of the other routines.   For the next few days
> I'll
> > not have much time, but I'll aim to fiddle later in the week.  And I
> might
> > even learn a little Lisp in the process!
> >
>
> My plan is to chip away at adding new routines as time permits.  If
> there is something in particular you would like to tackle, just let me
> know.
>
> Besides GSL are there some other libraries that might be interesting
> and amenable to the QuickLisp approach?
>
> >
> >>
> >> Am 26.10.2015 um 17:34 schrieb Bill Page:
> >> > I just dropped this "proof-of-concept" level code into a repository
> at:
> >> >
> >> >   https://github.com/billpage/gsla
> >> >
> >> > Title: GNU Scientific Library for Axiom

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-26 Thread Alasdair McAndrew
Now that Karl has provided a fantastic working template for an integration
routine from QUADPACK/GSL/GSLL it should be possible to extend those files
to incorporate some of the other routines.   For the next few days I'll not
have much time, but I'll aim to fiddle later in the week.  And I might even
learn a little Lisp in the process!

On Tue, Oct 27, 2015 at 6:32 AM, Kurt Pagani  wrote:

>
> That's very "ok" :)
> Unfortunately I have little time to contribute to this topic, but you
> know much more about these things anyway. I also had a glance over the
> FFI of OpenAxiom which Alfredo Portes posted recently here. Looks quite
> interesting but here too, I have to avoid frittering ;)
>
> I'll keep an eye on the repo :)
>
> Many thanks
> Kurt
>
>
>
>
> Am 26.10.2015 um 17:34 schrieb Bill Page:
> > I just dropped this "proof-of-concept" level code into a repository at:
> >
> >   https://github.com/billpage/gsla
> >
> > Title: GNU Scientific Library for Axiom (and FriCAS and OpenAxiom)
> >
> > I hope there are no objections or let me know.
> >
> > Please check it out and test it. Feel free to fork it, make changes, etc.
> >
> > For now I have included Kurt, Alasdair and myself as "authors" though
> > really so far only Kurt has written any significant code.
> >
> > OK?
> >
> > Bill.
> >
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-25 Thread Alasdair McAndrew
egrationQng;M3Df;1|
> > ; (GSLL:INTEGRATION-QNG (BOOT::|mkLispFunction1| BOOT::|f|)
> > BOOT::|a|
> > ;   BOOT::|b|)))
> > ;
> > ; caught STYLE-WARNING:
> > ;   The variable $ is defined but never used.
> > ;
> > ; compilation unit finished
> > ;   caught 1 STYLE-WARNING condition
> >
> > ; /home/kfp/Development/GSL/GSL.NRLIB/GSL.fasl written
> > ; compilation finished in 0:00:00.054
> > 
> >gsl is now explicitly exposed in frame frame1
> >gsl will be automatically loaded when needed from
> >   /home/kfp/Development/GSL/GSL.NRLIB/GSL
> >
> > (1) -> DF ==> DoubleFloat
> > f:=(x:DF):DF+->exp(-x^2)
> > g(x:DF):DF == exp(-x^2)
> > gslIntegrationQng(f,0.0::DF,1.0::DF)
> >Type:
> > Void
> > (2) ->
> >(2)  theMap(*1;anonymousFunction;0;frame1;internal)
> >Type: (DoubleFloat ->
> > DoubleFloat)
> > (3) ->Function declaration g : DoubleFloat -> DoubleFloat has been
> added
> >   to workspace.
> >Type:
> > Void
> > (4) ->
> >(4)  0.7468241328124271
> > Type:
> > DoubleFloat
> > (5) -> gslIntegrationQng(g,0.0::DF,1.0::DF)
> >Compiling function g with type DoubleFloat -> DoubleFloat
> >
> >(5)  0.7468241328124271
> >     Type:
> > DoubleFloat
> > (6) ->
> >
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] Characteristic equation of floating point matrices?

2015-10-25 Thread Alasdair McAndrew
Here's a little problem, related to finding eigenvalues:

A:Matrix Float:=matrix [[randnum()/size() for i in 1..4] for j in 1..4]
ax:=A-1.0*x
determinant(ax)

>> Error detected within library code:
   "failed" of mode Union(UnivariatePolynomial(x,Float),"failed")
cannot be coerced to mode UnivariatePolynomial(x,Float)

(I can't use charpol as it's not defined for floating point matrices.)

Anybody know what's going on here and how to get round this?



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] Gaussian quadrature

2015-10-25 Thread Alasdair McAndrew
I have no particular attachment to Gauss-Kronrod integration - indeed
Clenshaw-Curtis integration may well be easier to implement.  My interest
(as well as having a robust numeric integration routine in FriCAS) is
seeing if an external numeric library can be used through FriCAS.  And
there are lots of these: QUADPACK, FFTW, ODE, ODEPACK to name but four
Netlib ones.  I don't see why any of us should have to reinvent the wheel
when there are perfectly good open-source numeric routines already
available.  All I want is a FriCAS front end to them - and with arbitrary
precision.

For example, the nodes and weights above could be obtained with:

digits(40)
outputGeneral(40)
x1 := solve(legendreP(9,x),1.0e-40)
xs := [rhs(s) for s in x1]
ws := [2/(1-s^2)/subst(D(legendreP(9,x),x),x=s)^2 for s in xs]

And then you have to compute the Kronrod nodes, which interpolate between
the Gaussian nodes...

On Sun, Oct 25, 2015 at 2:00 PM, Waldek Hebisch 
wrote:

> Alasdair McAndrew wrote:
> >
> > The more I read about Lisp the more difficult it seems.  It would
> probably
> > be just as easy for me to write a integrate.input file from scratch
> > containing the Gauss-Kronrod code,
>
> Any reason for specifically wanting Gauss-Kronrod code?  On
> my todo list was writing adaptive Gauss routine.  So I did
> one using 9 point rule.  Hopefuly it should be good enough
> to get 14 digit accuracy with reasonable number of evaluation
> points for large class of functions.  This is preliminary
> version, improvements welcome.
>
> BTW: I believe that adaptive quadratures, recursing on
> subintervals are much better than nonadaptive.  This one
> is quite simplistic, in particular it can handle singularity
> in sqrt, but fails on 1/sqrt.
>
> --
>
> )abbrev package GAUSSI GaussianQuadrature
> GaussianQuadrature : Exports == Implementation where
>   FT ==> DoubleFloat
>   Exports ==> with
> adaptive : (FT -> FT, FT, FT, FT,
>  Integer, (FT -> FT, FT, FT) -> FT) -> FT
>   ++ adaptive(f, a, b, eps, n, g) is general adaptive
>   ++ quadrature on interval (a, b) using g as base
>   ++ (nonadaptive) rule and stopping when error is less than
>   ++ eps.  adaptive signals error when number of recursion
>   ++ levels exceeds n.
>   ++ Note: agruments to g are f, midpoint of interval and
>   ++ half of length
> gauss9 : (FT -> FT, FT, FT) -> FT
>   ++ gauss9(f, mid, h) computes 0 point Gaussian quadrature
>   ++ of f on the interval with midpoint mid and lenght 2*h
>   Implementation ==> add
>
> x1 := 0.3242534234_0380892904::DoubleFloat
> x2 := 0.6133714327_0059039731::DoubleFloat
> x3 := 0.8360311073_266357943::DoubleFloat
> x4 := 0.9681602395_0762608983::DoubleFloat
> w0 := 0.3302393550_0125976316::DoubleFloat
> w1 := 0.3123470770_4000284007::DoubleFloat
> w2 := 0.2606106964_0293546232::DoubleFloat
> w3 := 0.1806481606_9485740405_8::DoubleFloat
> w4 := 0.0812743883_6157441197_2::DoubleFloat
> half := 0.5::DoubleFloat
>
> gauss9(f : FT -> FT, mid : FT, h : FT) : FT ==
> h1 := h*x1
> h2 := h*x2
> res := w0*f(mid) + w1*(f(mid + h1) + f(mid - h1))
>  + w2*(f(mid + h2) + f(mid - h2))
> h3 := h*x3
> h4 := h*x4
> res := res + w3*(f(mid + h3) + f(mid - h3))
>+ w4*(f(mid + h4) + f(mid - h4))
> h*res
>
> adaptive1(f : FT -> FT, mid : FT, h : FT, eps : FT,
>   n : Integer, g : (FT -> FT, FT, FT) -> FT, res0 : FT) : FT ==
> n < 0 => error "too many recursion levels"
> h1 := half*h
> mid1 := mid - h1
> mid2 := mid + h1
> res1 := g(f, mid1, h1)
> res2 := g(f, mid2, h1)
> nres := res1 + res2
> abs(res0 - nres) < eps => nres
> eps1 := half*eps
> adaptive1(f, mid1, h1, eps1, n - 1, g, res1)
>  + adaptive1(f, mid2, h1, eps1, n - 1, g, res2)
>
> adaptive(f : FT -> FT, a : FT, b : FT, eps : FT,
>  n : Integer, g : (FT -> FT, FT, FT) -> FT) : FT ==
> mid := half*(a + b)
> h := half*(b - a)
> res0 := g(f, mid, h)
> adaptive1(f, mid, h, eps, n, g, res0)
>
> ---
>
> --
>   Waldek Hebisch
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe.
> To unsubscribe from 

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-24 Thread Alasdair McAndrew
I'll give it my best shot... time permitting!  Here are the issues I face
so far:

QUADPACK is designed for use with IEEE double precision arithmetic.  Thus
the nodes and weights for numeric integration can be given as fixed
values.  However, for FriCAS it would be proper, I think, to allow
arbitrary precision.  The Gaussian nodes can be obtained as the roots of
Legendre polynomials, but the interpolating Kronrod nodes are more
difficult; one would have to use a method first developed by Dirk Laurie:
http://www.ams.org/mcom/1997-66-219/S0025-5718-97-00861-2/S0025-5718-97-00861-2.pdf
and since extended by Calvetti et al:
http://www.ams.org/mcom/2000-69-231/S0025-5718-00-01174-1/S0025-5718-00-01174-1.pdf

Many computations require eigenvalues of floating point matrices.  We could
probably do this in FriCAS by solving the characteristic equation - I don't
think FriCAS has a inbuilt method for floating point eigenvalues.  However
when I tried to create a characteristic equation just now FriCAS complained
that

"Union(Polynomial(Float),"failed") cannot be coerced to mode
Polynomial(Float)"

The QUADPACK routines were initially written in Fortran, then ported to C
for use in GSL, as well as to Lisp (GSLL), Python (Numpy), and lots of
other languages.  So it's a matter of picking one which is easiest to work
with!

Maxima (which is also written in Lisp) has a QUADPACK wrapper: there is a
function quadpack.lisp which allows access from with Maxima to all the
QUADPACK routines.  Unfortunately you can't browse Maxima source online, so
I've attached it here for your inspection.  This file requires access to
other files, just as the numeric routines of QUADPACK itself make use of
various "include" files (if in C) and associated libraries.

It is probably just a matter, in the first instance, of putting everything
where FriCAS can find it, and stitching everything together so that all the
necessary libraries can be found as needed.  However, the devil is in the
details, and my knowledge of how Lisp works could be engraved in 10pt bold
font on the head of a small pin.

I would be happy to start by being able to enter, in FriCAS, for example:

)lisp  (gsll:integration-qng (lambda (x) (exp (- (* x x 0.0 1.0)

but at the moment, although I can run that command from with SBCL, I can't
run it from FriCAS - there's a Lisp problem in making quicklisp libraries
and GSLL available from within FriCAS.  This is where my ignorance becomes
an obstacle.

If I was to choose one function it would be one of QNG (non-adaptive
integrator using Gauss-Kronrod-Peterson rules of increasing precision), or
QAG (an adaptive integrator using Gauss-Kronrod integration).

Righto, back to real work of collating student results...

On Sun, Oct 25, 2015 at 8:16 AM, Kurt Pagani  wrote:

>
> I'm endorsing what Bill suggested. If you are going to manage just one
> function the rest of it will be routine.
>
> This might interest you:
> https://github.com/matlisp/matlisp
>
> Especially
>
> https://github.com/matlisp/matlisp/blob/t2/src/packages/quadpack/quadpack.lisp
> which seems to me quite easier to implement.
>
>
>
> Am 24.10.2015 um 16:28 schrieb Bill Page:
> > Alasdair,
> >
> > For entirely selfish reasons :) I would like to encourage you to
> > continue work on this since I also would like to be able use some of
> > the standard numeric libraries in FriCAS. But I am also sympathetic to
> > your reaction concerning the details in Lisp. One thing that might
> > help is that both FriCAS and OpenAxiom follow the original design of
> > Axiom which includes an intermediate language called BOOT.  BOOT was
> > intended to make Lisp-level programming easier for people who mostly
> > program in SPAD since the syntax is similar to SPAD without static
> > types. Some (most?) of what Kurt wrote in Lisp below and all of the
> > interface code that he did not include could be written in a
> > combination of BOOT and SPAD.
> >
> > In any case I am motivated to try to help with this.
> >
> > Cheers,
> > Bill Page
> >
> > On 24 October 2015 at 04:28, Alasdair McAndrew  wrote:
> >>
> >> The more I read about Lisp the more difficult it seems.  It would
> probably be just as easy for me to write a integrate.input file from
> scratch containing the Gauss-Kronrod code, rather than wrestling with a
> language of which I have little understanding, and no competence!
> >>
> >> On Sat, Oct 24, 2015 at 3:11 PM, Kurt Pagani  wrote:
> >>>
> >>>
> >>> I'm trying to explain it as good as I can (experts will correct me):
> >>>
> >>> I see three different methods:
> >>>
> >>> 1. start your Lisp REPL (pref. SBCL) 

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-24 Thread Alasdair McAndrew
tring -> SExpression
>   ++ qlUnInstall is Lisp ql:uninstall
> qlSystemApropos  : String -> SExpression
>   ++ qlSystemApropos  is Lisp ql:system-apropos
> qlUpdateAllDists : () -> SExpression
>   ++ qlUpdateAllDists is Lisp ql:update-all-dists
> qlUpdateClient   : () -> SExpression
>   ++ qlUpdateClient is Lisp ql:update-client
> qlWhoDependsOn   : String -> SExpression
>   ++ qlWhoDependsOn is Lisp ql:who-depends-on
>
>
> mjax : Any -> SExpression
>   ++ mjax display any expression (if possible) in the browser
>
> evalToSlide  :  String -> SExpression
> evalToString :  String -> SExpression
>
>
>   Implementation ==  add
>
> %Exec(s) == CLX_-EXEC(s)$Lisp
> %writeMathJax(s) == CLX_-WRITE_-MATHJAX(s)$Lisp
> %displayMathJax(s) == CLX_-DISPLAY_-MATHJAX(s)$Lisp
>
> qlQuickLoad(s) == QL_-QUICKLOAD(s)$Lisp
> qlUnInstall(s) == QL_-UNINSTALL(s)$Lisp
> qlSystemApropos(s) == QL_-SYSTEM_-APROPOS(s)$Lisp
> qlUpdateAllDists() == QL_-UPDATE_-ALL_-DISTS()$Lisp
> qlUpdateClient()   == QL_-UPDATE_-CLIENT()$Lisp
> qlWhoDependsOn(s)  == QL_-WHO_-DEPENDS_-ON(s)$Lisp
>
> mjax(x:Any):SExpression ==
>   t:String:=first tex(x::OutputForm::TexFormat)
>   s:String:= concat ["$$", t::String, "$$"]
>   CLX_-DISPLAY_-MATHJAX(s)$Lisp
>
> --evalToString(s) == CLX_-EVAL_-TO_-STRING(s)$Lisp -- blocking ???
> --evalToSlide(s) == CLX_-EVAL_-TO_-SLIDE(s)$Lisp
>   --r:String:=
>   --split(r,char "@")
>
>
> 
> ;;; LISP ;;;
> 
>
> $ cat clx.lisp
> (in-package :boot)
>
> (defconstant *pkg-err-asdf* "ASDF package missing.")
> (defconstant *pkg-err-ql*   "QuickLisp package missing.")
>
> (defun clx-error (s)
>   "Print error message"
>   (print s))
>
> (defun clx-exec (s)
>   "Function: run-shell-command control-string &rest args [oboslete]"
>   (if (find-package "ASDF")
> (asdf:run-shell-command s)
>   (clx-error *pkg-err-asdf*)))
>
>
> (defun clx-concstr (list)
>   ;; concatenate a list of strings ; recall ~% = newline"
>   (if (listp list)
>   (with-output-to-string (s)
>  (dolist (item list)
>(if (stringp item)
>  (format s "~a~%" item))
>
>
> (defun clx-getenv (name &optional default)
>   "http://cl-cookbook.sourceforge.net/os.html; get env variables"
>   ;; e.g. (clx-getenv "OS") => "Windows_NT"
>   #+CMU
>   (let ((x (assoc name ext:*environment-list* :test #'string=)))
> (if x (cdr x) default))
>   #-CMU
>   (or
> #+Allegro (sys:getenv name)
> #+CLISP (ext:getenv name)
> #+ECL (si:getenv name)
> #+SBCL (sb-unix::posix-getenv name)
> #+LISPWORKS (lispworks:environment-variable name)
> default))
>
>
>
> ;;; =
> ;;; QuickLisp section
> ;;; =
>
> (defun ql-quickload (s)
>   (if (find-package "QUICKLISP")
> (ql:quickload s)
>   (clx-error *pkg-err-ql*)))
>
> (defun ql-uninstall (s)
>   (if (find-package "QUICKLISP")
> (ql:uninstall s)
>   (clx-error *pkg-err-ql*)))
>
> (defun ql-system-apropos (s)
>   (if (find-package "QUICKLISP")
> (ql:system-apropos s)
>   (clx-error *pkg-err-ql*)))
>
> (defun ql-update-all-dists ()
>   (if (find-package "QUICKLISP")
> (ql:update-all-dists)
>   (clx-error *pkg-err-ql*)))
>
> (defun ql-update-client ()
>   (if (find-package "QUICKLISP")
> (ql:update-client)
>   (clx-error *pkg-err-ql*)))
>
> (defun ql-who-depends-on (s)
>   (if (find-package "QUICKLISP")
> (ql:who-depends-on s)
>   (clx-error *pkg-err-ql*)))
>
>
> ;;; ===
> ;;; MathJax section
> ;;; ===
>
> (defconstant *url-show* "firefox -url file://C:/cygwin/tmp/~A")
>
> (defconstant *mjax-template* "
> 
> 
> FriCAS Output
> 
>   MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
> 
> 
> src='
> <a  rel="nofollow" href="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML</a>
> '>
> 
> 
> 
>  ~A
> 
> ")
>
> (defun clx-write-mathjax (s)
>   (with-open-file (*standard-output* "/tmp/mj

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-23 Thread Alasdair McAndrew
Just as an experiment I'm taking the quadpack.lisp file from the Maxima
distribution, to see if I can install it and have it working under FriCAS.
However, as a total Lisp newbie, I'm continuously stumped by trivial
errors.  For example, quadpack.lisp uses the f2cl-lib package.  I can
install this with quicklisp, but I don't know (yet) how to make that
package available from within FriCAS.  For that matter, I don't know how to
make the quicklisp package ql available: even the line

(load "~/quicklisp/setup.lisp")

which should work, doesn't appear to help - lines beginning with "(ql:  "
are immediately flagged as errors and the ")read" compile is aborted.

I'll keep on fiddling... (while Rome burns).

-Alasdair

On Sat, Oct 24, 2015 at 10:03 AM, Kurt Pagani  wrote:

> Hello Alasdair
>
> What I have completely forgotten to mention in the last post:
>
> In the fricas/contrib folder there is a file load-fricas.lisp which
> allows you to use FriCAS as a cl library itself. This way you can mix in
> any kind of library as long there is no interference to the "boot"
> package (I'm aware of only very few ones).
>
> BTW: I found that
> (load "../lisp/primitives.lisp")
> is missing in the file, so if you encounter problems it might be this
> what caused an error. (see below). I used it occasionally in the
> cl-jupyter frontend.
>
> --
> Kurt
>
> #|
> To use FriCAS as a Lisp library build FriCAS as usual and
> keep the build tree.  Change path below to point to build
> tree.  After that doing:
>
>  (load "load-fricas.lisp")
>
> will load and initialize FriCAS.
>
> Examples:
> Using FriCAS command interpreter:
>
>  (in-package "BOOT")
>  (|parseAndInterpret| "x^2")
>
>   2
>(2)  x
> Type: Polynomial
> Integer
>  ((Polynomial (Integer)) WRAPPED 1 x (2 0 . 1))
>
> Directly calling math functions:
>
>  (defvar  *mult-i-sup*
>  (|getFunctionFromDomain|
>'*
>'(|SparseUnivariatePolynomial| (|Integer|))
>'((|SparseUnivariatePolynomial| (|Integer|))
>(|SparseUnivariatePolynomial| (|Integer|)
>  *MULT-I-SUP*
>
>  (SPADCALL '((2 . 1) (0 . 1)) '((5 . 1) (0 . 1)) *mult-i-sup*)
>  ((7 . 1) (5 . 1) (2 . 1) (0 . 1))
>
>
> Notes:
> - all intersting functionality is in package called "BOOT".
> - at mathematical level FriCAS is case-sensitive, so at Lisp level one
>   has to use bars.
> - the simplest interface is |parseAndInterpret| which takes a string
>   as input and produces a Lisp form repesenting printed output.  As
>   side effect |parseAndInterpret| prints the result.
> - at deeper lever FriCAS functions are overloaded, so to call correct
>   function one has to first use |getFunctionFromDomain| to get
>   function which matches to given argument types.  Above I want to
>   multiply two sparse univarate polynomials with integer coefficients.
>   Since lookup may be expensive the caller is adviced to cache result
>   of the lookup.
> - FriCAS functions use special calling convention, so one has to use
>   SPADCALL macro to call them.  Actually, |getFunctionFromDomain|
>   returns a pair consistion of a function and an extra argument.
>   SPADCALL takes care of decomposing the pair and appending the
>   extra argument to the argument list.
>
> Currently FriCAS sets a few system (global) variables, for example
> *read-default-float-format* is set to 'double-float -- in principle
> FriCAS settings may interfere with other programs.
>
> |#
> (let ((*default-pathname-defaults*
>#P"~/Development/ax-build/src/interp/"))
>  (load "../lisp/fricas-package.lisp")
>  (load "../lisp/fricas-config.lisp")
>  (load "../lisp/fricas-lisp")
>  (load "../lisp/primitives.lisp") ;;;+kfp
>  (load "makeint.lisp"))
> (in-package "BOOT")
> (fricas-init)
>
> (in-package "BOOT")
>  (|parseAndInterpret| "x^2")
> kfp@helix:~/Development/fricas/contrib$
>
>
> Am 23.10.2015 um 09:24 schrieb Waldek Hebisch:
> > Alasdair McAndrew wrote:
> >>
> >> I was looking at some lisp numeric libraries: gsll at
> >> https://common-lisp.net/project/gsll/ (which is a wrapper for the Gnu
> >> Scientific Library GSL), as well as mjrcalc at
> >> http://www.mitchr.me/SS/mjrcalc/.  I imagined that as these were Lisp
> >> libraries, there would be some way of integrating them into FriCAS - or
> at
> >> least making them available so that the

Re: [fricas-devel] Linking (lisp) libraries to FriCAS?

2015-10-23 Thread Alasdair McAndrew
Well, I was just experimenting with one of the numerical integration
routines from GSLL, the Lisp wrapper library for GSL: Gnu Scientific
Laboratory.  In plain lisp, I can, for example enter:

*(ql:quickload "gsll")
*(gsll:integration-qng (lambda (x) (exp (- (* x x 0.0 1.0)

which produces

0.7468241328124271
8.291413475940725e-15
21

Here I'm using the SLIME Emacs mode, and quicklisp to manage the Lisp
libraries.

In FriCAS, I can:

)read /home/amca/quicklisp/setup.lisp
)lisp (ql:quickload "gsll")

but the command

)lisp (gsll:integration-qng (lambda (x) (exp (- (* x x 0.0 1.0)

produces the error

  NIL is not a valid identifier to use in FriCAS.

which I don't understand.

I notice in Maxima (which is also based on Lisp), there is a
"quadpack.lisp" file which provides an interface to the QUADPACK library.

However it seems from your detailed discussion that interfaces are in fact
more difficult than I expected.  Ah well.  If it was easy I might just be
able to manage a hacked work-around, but it looks like a job for a better
programmer than me!

On Fri, Oct 23, 2015 at 6:24 PM, Waldek Hebisch 
wrote:

> Alasdair McAndrew wrote:
> >
> > I was looking at some lisp numeric libraries: gsll at
> > https://common-lisp.net/project/gsll/ (which is a wrapper for the Gnu
> > Scientific Library GSL), as well as mjrcalc at
> > http://www.mitchr.me/SS/mjrcalc/.  I imagined that as these were Lisp
> > libraries, there would be some way of integrating them into FriCAS - or
> at
> > least making them available so that they can be used from within a FriCAS
> > session.  However, my attempts (such as they were) came to nothing: and I
> > wasn't sure whether to )compile, )read, or do something else.
> >
> > Is there some documented standard method of integrating external
> libraries
> > with FriCAS?
>
> Concerning documentation, I wrote some time ago about interfacing
> to one of Lapack function.
>
> Lisp functions are a bit easier than other languages, but not
> much.  To use a library from FriCAS, one need to first decide
> in interface.  That is how FriCAS types correspond to library
> types.  Normally this involves writing FriCAS domain/package
> with apropritate declarations.  One example may be plotting
> subsystem:  at Spad level there are viewport domains which
> export somewhat high-level interface and implement operations
> calling low-level functions.  The low-level parts are done
> by several Lisp functions which are called using '$Lisp'
> qualification.  The interface uses several constans defined
> as Spad macros -- the constants on Spad side must agree
> with constants used at other side (that is in C code).
>
> At lower level one needs to ensure that the code is available.
> Standard FriCAS code is either already loaded or FriCAS knows
> how to load it on demand.  With arbitrary Lisp code one
> can use ')read' (which compiles files and then loads it).
> I am affraid we do not have a special command to load
> Lisp without compiling, be one can do this via ')lisp'
> command like:
>
> )lisp (load "prog.fasl")
>
> Note that FriCAS may run only using AXIOMsys executable,
> which contains Lisp compiler but may miss large part
> of Lisp environment.  For example, you had problem
> because Lisp compiler inside FriCAS did not know
> where to find Lisp libraries bundled with sbcl.
>
> Currently for non-Lisp libraries one have to create
> apropriate wrappers at Lisp level -- basically specify
> type of C routine so that Lisp knowns how to pass
> arguments.  In sbcl non-Lisp dynamic libraries are
> easy to use: to load them one needs to use
> '|quiet_load_alien|' routine giving it path to the
> library.  After loadnig wrappers become usable.
> When it comes to Lisp libraries each Lisp is
> slightly different.  In sbcl one can load Lisp
> code (which either looses execution time if
> file is interpreted or looses time compiling it),
> load a fasl (which contains already compiled code
> but still needs nontrivial time to load) or create
> a new image.  Images start fast, but they take
> some effect to create, in particular one needs
> to make sure that they are properly initialised.
> Also. each image contains a copy of AXIOMsys
> executable so multiple images could take
> a lot of space.  Concerning fasl-s, there
> are some provisions to create aggregate fasl-s
> but usually each file gives a sparate fasl,
> so in case of multifile library one have to
> load several files.
>
> There is extra difficulty with using Lisp libraries:
> modern Lisp code frequently uses so called keyword
> arguments.  In FriCAS using keyword arguments is
> awkward, so one may 

[fricas-devel] Curious behaviour of 'digits' in relation to complexSolve

2015-10-21 Thread Alasdair McAndrew
If you start a new FriCAS, and then enter:

(1) -> digits 10
(2) -> complexSolve(x^3-6*x-6=0,1.e-10)

you obtain

 [x= 2.8473221018_6307233001_9122091471_217572689 - 0.4188072111 E -10 %i,
x= - 1.423661051 - 0.283606001 %i,
x= - 1.423661051 + 0.2836060010_2688149348_7508123507_7232122421 %i]

which as you see contains floating point values with far more the the
requested 10 digits.  How can I ensure that all real and imaginary parts of
the solution are displayed with only the 10 digits I want?

Thanks,
Alasdair

-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] When the iSPAD kernel in Jupyter freezes

2015-10-14 Thread Alasdair McAndrew
A couple of times I've given a command which causes a freeze - maybe my
syntax is at fault...

But anyway, instead of a command being executed and the command number
being given, the prompt at the left of the cell sits at [*] and nothing
happens.

Back in the console, from which I started the Jupyter notebook, there are
these messages:

[Heartbeat] thread started ...
[Shell] loop started
[Recv]: issue with UTF-8 decoding
[W 17:09:07.678 NotebookApp] Timeout waiting for kernel_info reply from
f3a09763-cd3e-47d1-bead-c27fd9879ccb
[W 17:09:07.795 NotebookApp] 404 GET
/static/components/codemirror/mode/spad/spad.js?v=2015100219
(127.0.0.1) 13.37ms referer=
http://localhost:/notebooks/Untitled5.ipynb?kernel_name=ispad

What's the best option here?  Restarting the kernel from the notebook
doesn't seem to do much, in fact I get this error message in the console:

   >> System error:
   C error EADDRINUSE: Address already in use.

which I understand to be a problem of an improper shut-down.

I can't restart the kernel... I have to stop and clear everything, and
restart from scratch.

So my question is: is there any way of aborting a frozen computation, or
one which is simply taking too long, and get back to working with the
notebook without losing anything?  In the Sage notebook, pressing the
Escape key a few times usually does the job, so I was hoping something
similar would work here.  Maybe Esc is not sending the correct message to
the kernel?

Many thanks,
Alasdair
-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] FriCAS in TeXmacs doesn't start HyperDoc, and

2015-10-10 Thread Alasdair McAndrew
My libzmq libraries are in /usr/lib/x86_64-linux-gnu:

libzmq.a  libzmq.so  libzmq.so.1  libzmq.so.1.0.1

Looks like I should upgrade my libzmq... which I've just done, using the
script at https://gist.github.com/cdjhlee/b8e3c927a01b0948b42d And it now
all works!  Fabulous!

For what it's worth, I've checked that efricas in emacs, with the commands
")set output tex on" and ")set output algebra off" gives nicely LaTeXed
output.  This is some of the best stuff I've seen for a long time - and in
many ways provides the sort of (Axiom)FriCAS interface which I think could
greatly increase its popularity.

Many thanks for your hard work!



On Sun, Oct 11, 2015 at 10:38 AM, Kurt Pagani  wrote:

>
> Great.
>
> What do you get when executing the command below ?
>
> kfp@helix:~$ ls /usr/local/lib/libzmq.*
> /usr/local/lib/libzmq.a   /usr/local/lib/libzmq.so.4
> /usr/local/lib/libzmq.la  /usr/local/lib/libzmq.so.4.0.0
> /usr/local/lib/libzmq.so
>
>
>
> Am 11.10.2015 um 01:32 schrieb Alasdair McAndrew:
> > Well, my jupyter is version 4.0.6, and I did install it with "sudo pip
> > install -U jupyter".  Just to be sure, I upgraded pip to the latest
> version
> > and ran the install command again, to be told that it was up to date.
> And
> > my pyzmq is also up to date.  I'm not quite sure what needs to be done...
> >
> > On Sun, Oct 11, 2015 at 9:26 AM, Kurt Pagani  wrote:
> >
> >>
> >> Jupyter development seems to be quite turbulent at the moment:
> >>
> >>
> >> from http://ipython.org/:
> >>> IPython is a growing project, with increasingly language-agnostic
> >>> components. IPython 3.x was the last monolithic release of IPython,
> >>> containing the notebook server, qtconsole, etc. As of IPython 4.0,
> >>> the language-agnostic parts of the project: the notebook format,
> >>> message protocol, qtconsole, notebook web application, etc. have
> >>> moved to new projects under the name Jupyter. IPython itself is
> >>> focused on interactive Python, part of which is providing a Python
> >>> kernel for Jupyter.
> >>
> >> Therefore it makes no sense to keep backward compatibility to IPython.
> >> Since telease 4.0 there are some issues which also touch this project:
> >>
> >> https://github.com/jupyter/notebook/issues/378 (libzmq mismatch,@end)
> >> https://groups.google.com/forum/#!topic/jupyter/XsiE82A8r9I
> >>
> >> See also:
> >>
> >> http://jupyter.readthedocs.org/en/latest/install.html
> >>
> http://jupyter.readthedocs.org/en/latest/system.html#the-jupyter-command
> >>
> >> To cut a long story short, a working Jupyter 4.x installation now is a
> >> basic requirement.
> >>
> >> -
> >> Kurt
> >>
> >>
> >>
> >> Am 10.10.2015 um 22:54 schrieb Alasdair:
> >>> Many thanks!  Yes: "export SBCL_HOME=/usr/lib/sbcl " certainly starts
> up
> >>> with everything as it should... except for one error:
> >>>
> >>>
> >>> iSPAD V0.9.3 :: 01-OCT-2015, Jupyter kernel based on
> >>> cl-jupyter: an enhanced interactive Common Lisp REPL
> >>> (Version 0.6 - Jupyter protocol v.5.0)
> >>> --> (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
> >>>
> >>>
> >>>>> System error:
> >>>The alien function "zmq_ctx_new" is undefined.
> >>>
> >>
> >> --
> >> You received this message because you are subscribed to a topic in the
> >> Google Groups "FriCAS - computer algebra system" group.
> >> To unsubscribe from this topic, visit
> >> https://groups.google.com/d/topic/fricas-devel/KsmUc_mFAis/unsubscribe.
> >> To unsubscribe from this group and all its topics, send an email to
> >> fricas-devel+unsubscr...@googlegroups.com.
> >> To post to this group, send email to fricas-devel@googlegroups.com.
> >> Visit this group at http://groups.google.com/group/fricas-devel.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >
> >
> >
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [fricas-devel] FriCAS in TeXmacs doesn't start HyperDoc, and

2015-10-10 Thread Alasdair McAndrew
Well, my jupyter is version 4.0.6, and I did install it with "sudo pip
install -U jupyter".  Just to be sure, I upgraded pip to the latest version
and ran the install command again, to be told that it was up to date.  And
my pyzmq is also up to date.  I'm not quite sure what needs to be done...

On Sun, Oct 11, 2015 at 9:26 AM, Kurt Pagani  wrote:

>
> Jupyter development seems to be quite turbulent at the moment:
>
>
> from http://ipython.org/:
> > IPython is a growing project, with increasingly language-agnostic
> > components. IPython 3.x was the last monolithic release of IPython,
> > containing the notebook server, qtconsole, etc. As of IPython 4.0,
> > the language-agnostic parts of the project: the notebook format,
> > message protocol, qtconsole, notebook web application, etc. have
> > moved to new projects under the name Jupyter. IPython itself is
> > focused on interactive Python, part of which is providing a Python
> > kernel for Jupyter.
>
> Therefore it makes no sense to keep backward compatibility to IPython.
> Since telease 4.0 there are some issues which also touch this project:
>
> https://github.com/jupyter/notebook/issues/378 (libzmq mismatch,@end)
> https://groups.google.com/forum/#!topic/jupyter/XsiE82A8r9I
>
> See also:
>
> http://jupyter.readthedocs.org/en/latest/install.html
> http://jupyter.readthedocs.org/en/latest/system.html#the-jupyter-command
>
> To cut a long story short, a working Jupyter 4.x installation now is a
> basic requirement.
>
> -
> Kurt
>
>
>
> Am 10.10.2015 um 22:54 schrieb Alasdair:
> > Many thanks!  Yes: "export SBCL_HOME=/usr/lib/sbcl " certainly starts up
> > with everything as it should... except for one error:
> >
> >
> > iSPAD V0.9.3 :: 01-OCT-2015, Jupyter kernel based on
> > cl-jupyter: an enhanced interactive Common Lisp REPL
> > (Version 0.6 - Jupyter protocol v.5.0)
> > --> (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
> >
> >
> >>> System error:
> >The alien function "zmq_ctx_new" is undefined.
> >
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/fricas-devel/KsmUc_mFAis/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> fricas-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to fricas-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: http://www.facebook.com/alasdair.mcandrew]
<http://www.facebook.com/alasdair.mcandrew> [image:
https://plus.google.com/+AlasdairMcAndrew/posts]
<https://plus.google.com/+AlasdairMcAndrew/posts> [image:
https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108]
<https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image:
https://twitter.com/amca01] <https://twitter.com/amca01> [image:
http://numbersandshapes.net] <http://numbersandshapes.net>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.