On Mon, Feb 26, 2018 at 2:35 AM, Waldek Hebisch
<[email protected]> wrote:
> oldk1331 wrote:
>>
>> I would like to include these patches also:
>>
>>
>> compiler gives error on non-exist imports:
>>
>> https://github.com/oldk1331/fricas/commit/89dd2e8008602ed00cf1f13fe0d75c50205cbfcc.patch
>
> Eliminating non-existing imports is nice.  But the change to compiler
> looks fragile, it is not clear for me if we get "is an unknown mode"
> error only for non-existing imports and if it catches all such cases.
> BTW: depending on text of error messages is bad design, we may
> decide to change wording of the message and this should not change
> which programs are accepted by the compiler.

A more comprehensive checking in compiler will require more work,
I'll look into it.  You can include the part that removes invalid imports.

>> fix input/fns.input:
>>
>> https://github.com/oldk1331/fricas/commit/1c589fe749c4d9f59b35ef2cc038d77fed33dfda.patch
>>
>
> I am not 100% sure if we want to "fix" this file.  At leat partially
> it looks like request for new features.  I we decide that it is too
> much like junk it makes more sense to delete it than to fix.

That file is not interesting, I'm OK with deleting it.

>> I wish my 10 patches that imporves the TeXmacs interface
>> could also get merged, so that I can upstream relevant
>> parts to TeXmacs project.
>
> Which ones?  I see 7 patches marked "texmacs".  I looked at

The 3 patches between them is also used.

> one, "texmacs : move texmacs init code into lisp file; add variable 
> fricasi..."
> and have the following comments:
> - fricas-lisp.lisp is very bad place for this code.  The intent of
>   fricas-lisp.lisp is define a dialect of Lisp (a virtual machine
>   if you prefer to think in that way) custmised for supporting
>   FriCAS.  It is for low-level code, frequently dependent on Lisp
>   implementation.  Functions there should not depend on anything
>   that we define at higher layers.  The 'init-texmacs' function
>   is just ordinary interpter function, in fact it seems that it
>   could be easily written in Boot
> - AFAICS initialization of texmacs interface was done via eval
>   due to flexibility (initialization code can be changed just
>   by editing the script, without any need to touch binaries).
>   I am not sure if this flexibility is needed, but also do
>   not see reason to change the current way.  Could you explain
>   why you want to move the code?

I'm just uncomfortable with having 440 characters lisp code
in one line in shell script.


And another bug fix:

fix ^ : (%, NNI) -> % in Factored

test case: "factor(6)^0" returns "1" instead of "2^0*3^0"

diff --git a/src/algebra/fr.spad b/src/algebra/fr.spad
index 92c8c33d..073de49c 100644
--- a/src/algebra/fr.spad
+++ b/src/algebra/fr.spad
@@ -245,6 +245,8 @@
           SimplifyFactorization concat(factorList u, copy factorList v))

     u : % ^ n : NonNegativeInteger ==
+      n = 0 => 1
+      n = 1 => u
       mkFF(unit(u)^n, [[x.flag, x.factor, n * x.exponent] for x in
factorList u])

     SimplifyFactorization x ==

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to