Aldor has generators:
The Aldor/FriCAS interface provides such a generator for the FriCAS Vector type. Let's try it. fricas (1) -> <aldor> #include "fricas" fricas Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/7106011744705935635-25px001.as
using Aldor compiler and options
-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra
Use the system command )set compiler args to change these
options.fricas Compiling Lisp source code from file
./7106011744705935635-25px001.lsp
Issuing )library command for 7106011744705935635-25px001fricas Reading #P"/var/aw/var/LatexWiki/7106011744705935635-25px001.asy" fricas V:Vector Integer:=[1,
Type: Vector(Integer)
fricas myList(V)
Type: List(Integer)
Re: aldor stream oddities --Bill Page, Thu, 09 Aug 2007 10:53:09 -0500 reply On Aug 9, 2007 10:07 AM Franz Lehner wrote:
Hello, is there a way to get hold of
=================================================
#include "axiom"
teststream: with {
zerostream:()->Stream Integer;
} == add {
zerostream():Stream Integer == {
import from Integer;
generate((x:Integer):Integer +-> 0@Integer,0@Integer);
}
}
=================================================
aldor -Fasy -Fao -Flsp -laxiom -DAxiom -Y/home/lehner/usr/local/lib/wh-sandbox_s1/target/x86_64-unknown-linux/algebra test1.as "test1.as", line 8:
generate((x:Integer):Integer +-> 0@Integer,0@Integer);
.........................^
[L8 C26] #1 (Error) Have determined 1 possible types for the expression.
Meaning 1: (x: Integer) -> Integer, Integer
The context requires an expression of type Stream(Integer).
make: *** [test.ao] Fehler 1
=========================================================
#include "axiom"
teststream: with {
zerostream:()->Stream Integer;
} == add {
zerostream():Stream Integer == {
import from Integer;
generate(():Integer +-> 0@Integer);
}
}
=========================================================
aldor -Fasy -Fao -Flsp -laxiom -DAxiom -Y/home/lehner/usr/local/lib/wh-sandbox_s1/target/x86_64-unknown-linux/algebra est2.as
Program fault (segmentation violation).#3 (Error) Program fault
(segmentation violation).
"test2.as", line 6: zerostream():Stream Integer == {
.......................................^
[L6 C40] #1 (Error) Have determined 0 possible types for the expression.
Subexpression `import from Integer':
Meaning 1: (0 types)
"test.as", line 9: generate(():Integer +-> 0@Integer);
.........................^
[L9 C26] #2 (Error) Have determined 0 possible types for the expression.
make: *** [test.ao] Fehler 1
Bill Page replied: Here is one way. The important thing is to escape the keyword
aldor #include "fricas" aldor Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/4578529267043810746-25px003.as
using Aldor compiler and options
-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra
Use the system command )set compiler args to change these
options.
"/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/4578529267043810746-25px003.as",fricas zerostream() |