--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Is there any reason to assume that porting using MSYS2 is easier than
porting using Cygwin? Because the latter is already hard enough.
I can the main "elephant in the room" is the POSIX layer. Many pieces of
Sage assume some kind of POSIX environment.
Jeroen.
As far as I remember, apart from the lack of POSIX compatibility on Windows/MSYS, the main obstacle to "natively" compile Sage on Windows 64 were:
* PARI which assumes that sizeof(long) == sizeof(void*), there is an experimental branch fixing this: http://pari.math.u-bordeaux.fr/archives/pari-dev-1505/msg00021.html
* GAP memory allocation, no sure this is actually an issue, see https://groups.google.com/d/msg/sage-devel/QXy_2KMbP1k/Z3cfpCieYzgJ for "details".
On Wednesday, 7 October 2015 17:15:14 UTC+2, Jeroen Demeyer wrote:Is there any reason to assume that porting using MSYS2 is easier than
porting using Cygwin? Because the latter is already hard enough.Cygwin is personally of no use to me (native applications like Julia can't work with it). I don't think I've ever downloaded a Sage Cygwin binary. For one, it's bloated and too slow.Cygwin in not considered a native environment by serious Windows developers. It's a Linux on Windows, nothing more. It doesn't even try to play nice with native applications or the Windows ABI.The main reason for the existence of the MSYS2 project in their own words is "better interoperability with native Windows software".
* PARI which assumes that sizeof(long) == sizeof(void*), there is an experimental branch fixing this: http://pari.math.u-bordeaux.fr/archives/pari-dev-1505/msg00021.htmlI am using Pari (not GP) today on Windows 64. It was minimal effort on my part to do so. I am not using a special branch.
William Stein recently bemoaned the fact that SageMath currently only runs natively on some brands of Linux, and not natively on the latest Windows or OSX (that is to say nothing of BSD). [1]
Some random thoughts:- I am not so convinced the strategy of automatic long -> long long patching is actually feasible, I think in practice this is gonna be a big can of worms. Pushing upstream to fix their code is a much better long-term solution IMO (and I'd rather have nothing to do with projects which refuse portability and code-quality patches, but that's just me :)
I agree that's better if they will allow it. But I'm not sure some of the things SageMath depends on are even still maintained, let alone do all projects have the resources to keep maintaining such things, which is eventually what they get asked to do. Moreover, not all developers feel equally warm and fuzzy when you mention Windows. Some people are positively against supporting Windows. So what I am suggesting is a pragmatic compromise. And based on what I've seen with Pari, it works quite well. (I am sorry, I just haven't had the chance to look up when this porting work was done and how often it has been maintained, but I think it was something like 2008 or 2010 and with zero maintenance since, and it still works today).
--
HI all,William Stein recently bemoaned the fact that SageMath currently only runs natively on some brands of Linux, and not natively on the latest Windows or OSX (that is to say nothing of BSD). [1]Until recently, a port of SageMath to Windows has seemed like a pipe dream. However, things have changed a lot, and I think it would now be possible to achieve this (for some definition of the word "native").I've tried VM's before and it has always ended in disaster. They either screw up my networking, they have performance issues, or don't support my mouse properly, or change my keyboard layout, or it's impossible to get files from my hard drive into the system easily, or they take up too much disk space or need to be constantly downloaded to update them, or some features don't work, or people stop supporting them, etc. The disadvantages of VMs are so numerous I hardly need to enumerate them. And even if it is a solution for users, it's hardly a solution for serious Windows developers.As some people know, I've been recently working on a Julia based "computer algebra system" for a much more limited subset of "computer algebra" than Sage targets. What people may not know is that that entire technology stack works natively on Windows.I can't express how fantastic it was to be sitting on a train recently, with no web access whatsoever and to be able to do work on my Windows 10 (64 bit) laptop on the train. And everything ran as fast, or in some cases faster, than my Linux server. That's the first time that has happened since I started doing computational stuff about 10 years ago!MSYS2 as a solution================The new technology that makes all this work is MSYS2. Here are some of its features:* Installing MSYS2 on Windows couldn't be easier. [2]* It supports proper Windows exception handling protocols.* It has an amazing command line package manager called Pacman, which Just Works TM.* Unlike Cygwin, it's very minimal, and takes little time to install.* It's fast. Very fast.* Parallel make works.* The resulting binaries are fast, sometimes faster on my laptop than on the Linux server I usually use for development.* MSYS2 provides a posix layer! (Applications can be distributed with an MSYS2 dll for this.)* Multithreading using pthreads Just Works TM (Applications can be distributed with a winthreads dll for this. I've actually used this, no patching required, so I am not speaking theoretically here.)* Like native Windows, sizeof(long) = 4 and sizeof(long long) = 8 on MSYS2. This means interop with native Windows applications or assembly objects is a cynch.* The resulting applications can be run on Windows as essentially native applications. They don't have to be run from within the MSYS2 shell. They can also be distributed as binary packages for those that don't care about the source code. But here's the thing: it's not *necessary* to distribute them as binary packages. It's now quite feasible for developers to actually *build* packages on Windows. And let's face it, this is the type of developer we actually want on the Windows platform. Simply supporting users and not developers is just going to increase the maintenance burden for people who work on other platforms. We want actual Windows developers, not just users!The only bad thing about MSYS2 is that autotools is still incredibly slow (Flint roll-your-own configure takes 5s at most on Windows, whereas autotools can take some minutes to configure a package). Note: make is not slow (at least not on Windows 64 -- it's not as fast on 32 bit Windows, but fortunately almost no one is using Windows 32 any more anyway).
PARI requires (required?) sizeof(mp_limb_t)==sizeof(void*), which is not guaranteed and not enforceable by PARI (as it's up to GMP to decide what exactly an mp_limb_t is).
--
--
(Note that on Cygwin (like elsewhere) Sage does not use Cygwin's python, it uses its own Python, which
seems to be quite different from Cygwin's Python)
OK, let me try to see if one gets anywhere with GAP on MSYS2...
Practically, it's an architecture that supports "natively" 64 bit ints but the pointers are 32 bits wide. AFAIK, this is supposed to improve performance for pointer-heavy workloads that do not need to allocate much RAM but still benefit from the 64 bit ints.
I think in FLINT you also have the issue that you are using tagged pointers (last time I checked anyway).
I could be wrong, but this doesn't sound like it includes SageMath. :-)
On Wednesday, 7 October 2015 19:48:54 UTC+2, bluescarni wrote:PARI requires (required?) sizeof(mp_limb_t)==sizeof(void*), which is not guaranteed and not enforceable by PARI (as it's up to GMP to decide what exactly an mp_limb_t is).I think I understand now. I was misled by the person claiming Pari required sizeof(long) == sizeof(void*) and Bill Allombert debunking it. Bill was of course correct (he is a Pari dev).
Practically, it's an architecture that supports "natively" 64 bit ints but the pointers are 32 bits wide. AFAIK, this is supposed to improve performance for pointer-heavy workloads that do not need to allocate much RAM but still benefit from the 64 bit ints.
OK, after more reading I find that these are the main benefits of MSYS2 over Cygwin:* Support for interop with mingw-w64 built packages.* Ability to switch from MSYS to MinGW mode by setting an environment variable (MSYSTEM).* Automatic conversion on the fly in the msys2.0.dll between different path formats.* Automatic handling in the msys2.0.dll of the different line endings (posix vs Windows).* A direct recompilation of the Arch Linux package manager (Pacman).* Various other more technical things.
The main benefit as explained by an MSYS2 person is that with MSYS2 you'll use a lot more natively compiled binaries, which will be faster.
The main benefits over MinGW are:* It's actually being developed.* It is regularly synced with the Cygwin project.* MSYS2 bash is not inferior to Cygwin bash.
On Wednesday, October 7, 2015 at 11:27:25 PM UTC+2, Bill Hart wrote:OK, after more reading I find that these are the main benefits of MSYS2 over Cygwin:* Support for interop with mingw-w64 built packages.* Ability to switch from MSYS to MinGW mode by setting an environment variable (MSYSTEM).* Automatic conversion on the fly in the msys2.0.dll between different path formats.* Automatic handling in the msys2.0.dll of the different line endings (posix vs Windows).* A direct recompilation of the Arch Linux package manager (Pacman).* Various other more technical things.That's right. See:
* http://sourceforge.net/p/msys2/wiki/How%20does%20MSYS2%20differ%20from%20Cygwin/
In fact, there would even be a possibility to have a unique project offering both features but communication seems to be complicated between the two parties.
* https://github.com/Alexpux/MSYS2-packages/issues/83
* https://cygwin.com/ml/cygwin/2014-12/msg00143.html
The main benefit as explained by an MSYS2 person is that with MSYS2 you'll use a lot more natively compiled binaries, which will be faster.I'm not sure that's completely true nor what natively really means.
What's sure is that whatever uses the POSIX compatibility layer (whether it is called cygwin1.dll or msys-2.0.dll) will surely sacrifice performance.
So the real performance deal is rather to use the mingw-w64 compiler to compile without POSIX compatibility or the cygwin(32/64)/msys(2) and get POSIX compatibility through an "emulation layer".
Some random thoughts:- I am not so convinced the strategy of automatic long -> long long patching is actually feasible, I think in practice this is gonna be a big can of worms. Pushing upstream to fix their code is a much better long-term solution IMO (and I'd rather have nothing to do with projects which refuse portability and code-quality patches, but that's just me :)- mingw-w64 is a high quality compiler. I recently had to develop for a while on a Windows 64 machine, and had to recompile a full stacks of dependencies (MPFR, GMP, Boost, etc.). It was not so easy (most issues were related to build systems), but the end result was pretty impressive performance-wise.- While for C code you can probably interoperate with libraries compiled with MSVC, for C++ you will end up having issues related, e.g., to different implementations of exception handling. My suggestion would be to forget about MSVC and compile the full stack of dependencies exclusively with mingw.- Python on windows 64 does not play properly with mingw due to some long-standing issues in some header files. If you want to compile Python C/C++ extensions on Win64 you will have to patch slightly the Python headers and re-generate the definitions of the Python library. The issue is explored, e.g., here:
Generally speaking, mingw-w64 is a really good option for C/C++ development on Windows. The biggest problem is the proliferation of distributions (mingw-w64, TDM mingw, mingw-build, msys2, etc.), but the toolchain is solid. clang is getting there as well, so it's worth keeping it in mind for the future.Cheers,Francesco.
On 7 October 2015 at 16:35, Bill Hart <goodwi...@googlemail.com> wrote:
HI all,
William Stein recently bemoaned the fact that SageMath currently only runs natively on some brands of Linux, and not natively on the latest Windows or OSX (that is to say nothing of BSD). [1]Until recently, a port of SageMath to Windows has seemed like a pipe dream. However, things have changed a lot, and I think it would now be possible to achieve this (for some definition of the word "native").I've tried VM's before and it has always ended in disaster. They either screw up my networking, they have performance issues, or don't support my mouse properly, or change my keyboard layout, or it's impossible to get files from my hard drive into the system easily, or they take up too much disk space or need to be constantly downloaded to update them, or some features don't work, or people stop supporting them, etc. The disadvantages of VMs are so numerous I hardly need to enumerate them. And even if it is a solution for users, it's hardly a solution for serious Windows developers.As some people know, I've been recently working on a Julia based "computer algebra system" for a much more limited subset of "computer algebra" than Sage targets. What people may not know is that that entire technology stack works natively on Windows.I can't express how fantastic it was to be sitting on a train recently, with no web access whatsoever and to be able to do work on my Windows 10 (64 bit) laptop on the train. And everything ran as fast, or in some cases faster, than my Linux server. That's the first time that has happened since I started doing computational stuff about 10 years ago!MSYS2 as a solution================The new technology that makes all this work is MSYS2. Here are some of its features:* Installing MSYS2 on Windows couldn't be easier. [2]* It supports proper Windows exception handling protocols.* It has an amazing command line package manager called Pacman, which Just Works TM.* Unlike Cygwin, it's very minimal, and takes little time to install.* It's fast. Very fast.* Parallel make works.* The resulting binaries are fast, sometimes faster on my laptop than on the Linux server I usually use for development.* MSYS2 provides a posix layer! (Applications can be distributed with an MSYS2 dll for this.)* Multithreading using pthreads Just Works TM (Applications can be distributed with a winthreads dll for this. I've actually used this, no patching required, so I am not speaking theoretically here.)* Like native Windows, sizeof(long) = 4 and sizeof(long long) = 8 on MSYS2. This means interop with native Windows applications or assembly objects is a cynch.* The resulting applications can be run on Windows as essentially native applications. They don't have to be run from within the MSYS2 shell. They can also be distributed as binary packages for those that don't care about the source code. But here's the thing: it's not *necessary* to distribute them as binary packages. It's now quite feasible for developers to actually *build* packages on Windows. And let's face it, this is the type of developer we actually want on the Windows platform. Simply supporting users and not developers is just going to increase the maintenance burden for people who work on other platforms. We want actual Windows developers, not just users!The only bad thing about MSYS2 is that autotools is still incredibly slow (Flint roll-your-own configure takes 5s at most on Windows, whereas autotools can take some minutes to configure a package). Note: make is not slow (at least not on Windows 64 -- it's not as fast on 32 bit Windows, but fortunately almost no one is using Windows 32 any more anyway).
--
Before this thread drops off the radar, I have a question. How hard
would it be to rebuild (not port) Sage starting with windows Python,
then adding windows GAP, windows SIngular, networkxx, and
SymPy+friends, of which GAP+Singular communicate with the Sage
terminal via pexpect? Call it WinSage 1.0:-)
On Thu, Oct 8, 2015 at 2:58 PM, William Stein <wst...@gmail.com> wrote:
>
>
> On Thursday, October 8, 2015, David Joyner <wdjo...@gmail.com> wrote:
>>
>> Before this thread drops off the radar, I have a question. How hard
>> would it be to rebuild (not port) Sage starting with windows Python,
>> then adding windows GAP, windows SIngular, networkxx, and
>> SymPy+friends, of which GAP+Singular communicate with the Sage
>> terminal via pexpect? Call it WinSage 1.0:-)
>
>
> Just curious - what do you mean by "the sage terminal"?
>
I was referring to some sort of cygwin command line (since I hardly
ever use anything else), but if people prefer an ipython notebook-like
interface then that's fine too.
Before this thread drops off the radar, I have a question. How hard
would it be to rebuild (not port) Sage starting with windows Python,
then adding windows GAP, windows SIngular, networkxx, and
SymPy+friends, of which GAP+Singular communicate with the Sage
terminal via pexpect? Call it WinSage 1.0:-)
On Thursday, October 8, 2015, David Joyner <wdjo...@gmail.com> wrote:On Thu, Oct 8, 2015 at 2:58 PM, William Stein <wst...@gmail.com> wrote:
>
>
> On Thursday, October 8, 2015, David Joyner <wdjo...@gmail.com> wrote:
>>
>> Before this thread drops off the radar, I have a question. How hard
>> would it be to rebuild (not port) Sage starting with windows Python,
>> then adding windows GAP, windows SIngular, networkxx, and
>> SymPy+friends, of which GAP+Singular communicate with the Sage
>> terminal via pexpect? Call it WinSage 1.0:-)
>
>
> Just curious - what do you mean by "the sage terminal"?
>
I was referring to some sort of cygwin command line (since I hardly
ever use anything else), but if people prefer an ipython notebook-like
interface then that's fine too.This whole thread is about creating such a thing - in any way at all that actually *works* - in the first place.There is no usable sage command line for Windows. Native or not.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
On Thursday, October 8, 2015, Jean-Pierre Flori <jpf...@gmail.com> wrote:
On Thursday, October 8, 2015 at 9:10:17 PM UTC+2, William wrote:
On Thursday, October 8, 2015, David Joyner <wdjo...@gmail.com> wrote:On Thu, Oct 8, 2015 at 2:58 PM, William Stein <wst...@gmail.com> wrote:
>
>
> On Thursday, October 8, 2015, David Joyner <wdjo...@gmail.com> wrote:
>>
>> Before this thread drops off the radar, I have a question. How hard
>> would it be to rebuild (not port) Sage starting with windows Python,
>> then adding windows GAP, windows SIngular, networkxx, and
>> SymPy+friends, of which GAP+Singular communicate with the Sage
>> terminal via pexpect? Call it WinSage 1.0:-)
>
>
> Just curious - what do you mean by "the sage terminal"?
>
I was referring to some sort of cygwin command line (since I hardly
ever use anything else), but if people prefer an ipython notebook-like
interface then that's fine too.This whole thread is about creating such a thing - in any way at all that actually *works* - in the first place.There is no usable sage command line for Windows. Native or not.On cygwin32 the result was decent.How many people *use* it?