Re: [fricas-devel] VECP

2014-03-26 Thread Ralf Hemmecke
On 03/26/2014 03:05 AM, Waldek Hebisch wrote: Ralf Hemmecke wrote: outputTran contains something like this... VECP x = outputTran ['BRACKET,['AGGLST,:[x.i for i in 0..MAXINDEX x]]] In order to translate that into spad I need to be able to deal with arrays in OutputForm. I would

[fricas-devel] strange behaviour in i-output

2014-03-26 Thread Ralf Hemmecke
I find [op,:l]:= flattenOps x --needed since op is string in some spad code if STRINGP op then (op := INTERN op; x:= [op,:l]) and a bit later op is [$elt,targ,fun] or not $InteractiveMode and op is [elt,targ,fun] = and x is [-,a,b] = How can the last expression ever become true if

[fricas-devel] calling outputTran recursively

2014-03-26 Thread Ralf Hemmecke
While in the definition of outputTran I can understand something like this: x is ['construct,:l] = ['BRACKET,['AGGLST,:[outputTran y for y in l]]] I don't understand why x is ['LIST,:l] = outputTran ['BRACKET,['AGGLST,:l]] is doing any useful recursive application of

Re: [fricas-devel] VECP

2014-03-26 Thread Waldek Hebisch
Ralf Hemmecke wrote: On 03/26/2014 03:05 AM, Waldek Hebisch wrote: Ralf Hemmecke wrote: outputTran contains something like this... VECP x = outputTran ['BRACKET,['AGGLST,:[x.i for i in 0..MAXINDEX x]]] In order to translate that into spad I need to be able to deal with

Re: [fricas-devel] calling outputTran recursively

2014-03-26 Thread Waldek Hebisch
Ralf Hemmecke wrote: While in the definition of outputTran I can understand something like this: x is ['construct,:l] = ['BRACKET,['AGGLST,:[outputTran y for y in l]]] I don't understand why x is ['LIST,:l] = outputTran ['BRACKET,['AGGLST,:l]] is doing any

Re: [fricas-devel] strange behaviour in i-output

2014-03-26 Thread Waldek Hebisch
Ralf Hemmecke wrote: I find [op,:l]:= flattenOps x --needed since op is string in some spad code if STRINGP op then (op := INTERN op; x:= [op,:l]) and a bit later op is [$elt,targ,fun] or not $InteractiveMode and op is [elt,targ,fun] = and x is [-,a,b] = How can

Re: [fricas-devel] VECP

2014-03-26 Thread Waldek Hebisch
More info about this: On 03/26/2014 03:05 AM, Waldek Hebisch wrote: Ralf Hemmecke wrote: outputTran contains something like this... VECP x = outputTran ['BRACKET,['AGGLST,:[x.i for i in 0..MAXINDEX x]]] In order to translate that into spad I need to be able to deal with

Re: [fricas-devel] VECP

2014-03-26 Thread Waldek Hebisch
I wrote: One more thing releated to this: outputTran has special case for handling Lisp representationof matrices in 'outputTranMatrix'. But this code can not work, because we use different representation of matrices (true 2D arrays instead of vectors of vectors). Actually, I was wrong:

Re: [fricas-devel] VECP

2014-03-26 Thread Ralf Hemmecke
On 03/26/2014 05:13 PM, Waldek Hebisch wrote: I wrote: One more thing releated to this: outputTran has special case for handling Lisp representationof matrices in 'outputTranMatrix'. But this code can not work, because we use different representation of matrices (true 2D arrays instead of

[fricas-devel] NUMBERP vs integer? + float?

2014-03-26 Thread Ralf Hemmecke
I see NUMBERP x = MINUSP x = [-,MINUS x] I would actually want to replace that with sex == x pretend SExpression integer? sex = - ((integer x)::OutputForm) float? sex = - ((float x)::OutputForm) but the Lisp NUMBERP is more general. Can I assume that we only have integers and

[fricas-devel] output hierarchy

2014-03-26 Thread Ralf Hemmecke
Hi Waldek, sorry for bothering you so much with this i-output stuff, but I am a bit concerned with type dependencies. If I replace certain boot/lisp functions with SPAD equivalents, how high in the type hierarchy am I supposed to go? I don't want to introduce unnecessary type dependencies, and

Re: [fricas-devel] VECP

2014-03-26 Thread Waldek Hebisch
On 03/26/2014 05:13 PM, Waldek Hebisch wrote: I wrote: One more thing releated to this: outputTran has special case for handling Lisp representationof matrices in 'outputTranMatrix'. But this code can not work, because we use different representation of matrices (true 2D arrays

Re: [fricas-devel] NUMBERP vs integer? + float?

2014-03-26 Thread Waldek Hebisch
Ralf Hemmecke wrote: I see NUMBERP x = MINUSP x = [-,MINUS x] I would actually want to replace that with sex == x pretend SExpression integer? sex = - ((integer x)::OutputForm) float? sex = - ((float x)::OutputForm) but the Lisp NUMBERP is more general. Can I

[fricas-devel] Re: [Texmacs-dev] Adding TeXmacs symbols to FriCAS math-mode input

2014-03-26 Thread Bill Page
On 26 March 2014 06:08, François Poulain fpoul...@metrodore.fr wrote: Hi Bill, Le Mon, 24 Mar 2014 11:40:06 -0400, Bill Page bill.p...@newsynthesis.org a écrit : The following patch is based on similar coding in mupad-input.scm It encodes all TeXmacs symbols as FriCAS identifiers by