A move away from CLN?

Duraid Madina duraid at fl.net.au
Tue Jul 24 06:23:49 CEST 2001


> What's so wrong about Mark and his henchmen?  In my impression they are
> producing an excellent compiler.

You must be living in x86 land, then. We poor souls stuck with alpha and
IA64 are not so lucky. (If you want to know what I mean, try searching for
some combination of {stupid, insane, broken, disgusting, alpha, ia64} in the
GCC mailing list archive ;-)

> Both GiNaC and CLN should compile fine with GCC-3.0.  (CLN-1.1.1 has
> compilation problems on non-x86 platforms with GCC-3.0, but I am working
> on these and plan to release 1.1.2 this week.)

Thanks for the heads-up :-) I'll see how I go with 1.1.2!
 
> What is the exact problem?  What alternative compiler are you having in
> mind?

The Intel C++ compiler, which rocks hard. It's turned into a hybrid of GCC
and the KAI compiler, and it's just plain excellent, front-end and back!

> Note that CLN is ideally suited as a basis for computer algebra systems,
> mainly for three reasons:
> 1) Immediate types.  An integer with absolute value smaller than 2^29 
>    is immediate, not heap-allocated.  Saves one indirection.

Does NTL do this? I haven't looked. NTL feels a lot, lot faster than CLN,
though this is just an awesomely subjective remark based on my experience
with Not That Many programs I've written.

> 2) Honors the injection of integers into rationals automatically, many
>    aspects are more algebraic than in any other comparable library.

This has to be pretty easy to wrap around. I'm talking 0.4 undergrads here.
;-)

> 3) Reference-counted memory management.  This works seamlessly with
>    GiNaC's memory management.  Compare this with MuPAD, where the memory
>    management occassionally clashes with that from the underlying PARI
>    library or with Magma, which occassionaly blows up out of the blue
>    sky because of interferences with some Kant remnants.

Hey, if memory management was ever a problem for me, I just threw the Boehm
garbage collector at it, and hey presto, no more problem. ;-) I know, I
know, I'm pretty damn lazy sometimes, but really, is anyone going to be
using CLN in a life support machine? Hmmm.

> > 	What sort of obstacles would such a 'port' face? Just how many innocent 
> > undergrad students would need to be tortured for such a feat to occur?
> 
> On the source-front only files numeric.h and numeric.cpp would have to be
> touched.  But quite a number of functions would need to be implemented in
> GiNaC as opposed to delegating them to CLN.  Hmm, I haven't gone through
> them and compared them with NTL's capabilities.  Maybe one half or three 
> undergrad students?  Do you have some spare undergrads?   ;-)

I wish I did, the only one I can think of is my Significant Other and she's
so busy with her thesis that I can therefore only donate 0.05 undergrads to
GiNaC right now. There's a subject at our university 'Symbolic Computation',
every student has to do some sort of 'project' to pass it. I might try
talking to the lecturer...

> There is of course also the packaging-front: NTL has no suitable
> packaging, in my opinion it badly needs to be libtoolized!

Hey! HEY! Are we _completely_ forgetting about the Win32 community? ;-)
(Visual C++ 7 seems to be coming along half- (third-?) decently with regards
to Compliance, it's funny how many MSVC 5/6 programs now break in 7 though.)
 
> Oh, you shameless flatterer!  Seriously, if making things work on another
> compiler is all you are concerned with, I can assure you that CLN is not
> so non-portable.  Here is demo that it can be done with moderate effort: 
> <http://www.ginac.de/lists/ginac-list/msg00028.html>.

Thank you! I will always maintain that CLN is a bit perverted, but I only
praise NTL because it Builds Anywhere.

> Be warned though: On non-GCC you must probably compile CLN with
> "-DNO_ASM -DNO_PROVIDE_REQUIRE", and build a static library only.

Thank you, thank you, I will be quiet now and see where I get with that!

> If you then still find CLN sillinesses I'ld
> definitely like to hear about them and see if they can be fixed.

I can't remember the last time I ever built something without warnings
disabled. (Please don't laugh/cry) So I can't promise too much, but if I
have real problems, I may well come back jumping up and
down!^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^Hsend you an email.

	Duraid



More information about the GiNaC-devel mailing list