[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Nils Bruin
On Nov 24, 10:53 pm, Dima Pasechnik dimp...@gmail.com wrote: It's a good question how to make this capability used in Sage. This capability is already perfectly usable in Sage: sage: M=sage.calculus.calculus.maxima sage: M.eval(g(x):=block([s:0],for i thru x do s:s+i^2,s);)

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Robert Bradshaw
On Wed, Nov 23, 2011 at 2:16 PM, rjf fate...@gmail.com wrote: Maxima compiles code to binary, and has done so, oh for a couple of decades.  Since Maxima is part of Sage, one might hope that William would be aware of this feature. In the spirit of being mutually informative, here's how it's

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Volker Braun
On Friday, November 25, 2011 10:33:24 AM UTC, Robert Bradshaw wrote: Note that another selling point of Cython is not just writing new (fast) code, but interfacing with existing low-level libraries in a clean way. I think thats the actual advantage of Cython. Every interpreter can dload a

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread rjf
re: writing stubs to access C (etc) libraries from Lisp. There are several lisp programs which will take your *.h files and attempt to automatically write all the stubs. This cannot be entirely automated but my limited experience with this suggests it can be quite successful. I've linked to

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Alfredo Portes
On Fri, Nov 25, 2011 at 7:29 AM, Volker Braun vbraun.n...@gmail.com wrote: I think thats the actual advantage of Cython. Every interpreter can dload a library somehow. But try to mix a shared library, some custom C++ code, and the interpreter of your choice. In any commercial Ma* or Java JNI

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Tom Boothby
On Thu, Nov 24, 2011 at 9:25 PM, rjf fate...@gmail.com wrote: William seems to prefer to tout the Sage-Cython link. That's because we use Cython, and it's easy to use in Sage, and provides a fully-functional language-native interface between Cython and Sage. Not a single part of that is true

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread William Stein
Sage-devel was so nice for the last few months with out Richard Fateman FUD... On Nov 25, 2011 8:13 AM, rjf fate...@gmail.com wrote: re: writing stubs to access C (etc) libraries from Lisp. There are several lisp programs which will take your *.h files and attempt to automatically write all

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Volker Braun
Thanks for your well-thought out contribution. I'm sure you are aware that JNA, although it sucks slightly less than JNI, doesn't support C++. So its back to writing C stubs to use instances from one object-oriented language in another object-oriented language. WTF! On Friday, November 25,

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Alfredo Portes
I was not trying to make any claims. My link was only for those that are not aware of JNA and usually make the claim that JNI is the only way. But I appreciate your message as it reminds me of how welcoming this list is. No WTFs needed, ignore me, and like Ted Kosan I am out of here. On Fri, Nov

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread rjf
We could always continue this discussion on sage-flame. I think that persons who wish to use this functionality in Maxima could consider that maybe they should just use Maxima. Exposing this functionality better from the Sage top level may be possible, but not something that I am interested in

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread William Stein
On Nov 25, 2011 9:30 AM, Alfredo Portes doyenatc...@gmail.com wrote: I was not trying to make any claims. My link was only for those that are not aware of JNA and usually make the claim that JNI is the only way. But I appreciate your message as it reminds me of how welcoming this list is.

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread William Stein
On Nov 25, 2011 10:18 AM, rjf fate...@gmail.com wrote: We could always continue this discussion on sage-flame. Please do. This thread should be about Mathematica and the extent to which their claim to have a compiler for arbitrary Mathematica programs is actually true. William I think that

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread rjf
On Nov 25, 10:28 am, William Stein wst...@gmail.com wrote: On Nov 25, 2011 10:18 AM, rjf fate...@gmail.com wrote: We could always continue this discussion on sage-flame. Please do.   This thread should be about Mathematica and the extent to which their claim to have a compiler for

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Volker Braun
Poking around a bit on the wolfram web page, it seems that * Compiling C code requires a 3rd party compiler, otherwise it will fall back to mathematica byte-code * Mathematica will run the compiler for you, you only have to point Mathematica to the desired compiler. * this is new in

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Volker Braun
On Friday, November 25, 2011 5:30:40 PM UTC, doyen...@gmail.com wrote: I was not trying to make any claims. My link was only for those that are not aware of JNA and usually make the claim that JNI is the only way. I'm sorry if I offended you. If you would have posted the above explanation

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread rjf
On Nov 25, 11:30 am, Volker Braun vbraun.n...@gmail.com wrote: Poking around a bit on the wolfram web page, it seems that   * Compiling C code requires a 3rd party compiler, otherwise it will fall back to mathematica byte-code   * Mathematica will run the compiler for you, you only have to

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-24 Thread Simon King
On 23 Nov., 23:16, rjf fate...@gmail.com wrote: Maxima compiles code to binary, and has done so, oh for a couple of decades. Is Maxima considered to be in the class Ma*? I thought the definition of Ma* is: Name starts with Ma and code is closed source? Cheers, Simon -- To post to this group,

Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-24 Thread William Stein
On Nov 24, 2011 4:56 AM, Simon King simon.k...@uni-jena.de wrote: On 23 Nov., 23:16, rjf fate...@gmail.com wrote: Maxima compiles code to binary, and has done so, oh for a couple of decades. Is Maxima considered to be in the class Ma*? I thought the definition of Ma* is: Name starts with

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-24 Thread rjf
I was not claiming that Maxima was part of William's Ma* classification (Though perhaps Macsyma would be -- if it were marketed). My objection is that William neglects (or is ignorant of?) features that are in Maxima, and especially those that are superior to features he seems to want to market,

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-24 Thread Dima Pasechnik
Unless I am missing something, Maxima in Sage is compiled into C using ECL. How fully these capabilities are exploited in Sage, is another question. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-24 Thread rjf
On Nov 24, 6:52 pm, Dima Pasechnik dimp...@gmail.com wrote: Unless I am missing something, Maxima in Sage is compiled into C using ECL. How fully these capabilities are exploited in Sage, is another question. I think you are missing the point. Unless the ECL system is sadly broken, the

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-24 Thread Dima Pasechnik
On Friday, 25 November 2011 13:25:43 UTC+8, rjf wrote: On Nov 24, 6:52 pm, Dima Pasechnik dim...@gmail.com wrote: Unless I am missing something, Maxima in Sage is compiled into C using ECL. How fully these capabilities are exploited in Sage, is another question. I think you are missing

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-23 Thread Jason Grout
On 11/23/11 9:36 AM, William Stein wrote: -- Forwarded message -- From: Andrew Moylan Date: Wednesday, November 23, 2011 Subject: C compiler in Mathematica To: wst...@gmail.com mailto:wst...@gmail.com Hello Prof Stein, In your FoCM 11 article at

[sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-23 Thread rjf
Maxima compiles code to binary, and has done so, oh for a couple of decades. Since Maxima is part of Sage, one might hope that William would be aware of this feature. Example. g(x):=block([s:0],for i thru x do s:s+i^2,s); g(1); takes 0.15 seconds. compile(g); converts g to lisp and