<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Do you want it to be <span style=" font-style:italic;">fast</span>?</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Python is fast (and fun!) to write but slow to run. Although actually, not that slow. <a href="http://percival-music.ca/artifastring/"><span style=" text-decoration: underline; color:#0057ae;">Artifastring</span></a>, a modal physical model written by my ex-postgrad in C++ as the engine behind <a href="http://percival-music.ca/vivi.html"><span style=" text-decoration: underline; color:#0057ae;">Vivi</span></a>, the virtual violinist, actually ran faster when bound to Python than when linked to a larger C++ program! I didn't look into why. Curious.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Anyway, if you want fast, I'd write in C++ with as much built-in operator overloading as you can so that you can read your own code. You can test that to hell, then pull it in to Python using <a href="http://www.swig.org/"><span style=" text-decoration: underline; color:#0057ae;">swig</span></a> or <a href="https://riverbankcomputing.com/software/sip/intro"><span style=" text-decoration: underline; color:#0057ae;">sip</span></a>.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Alternatively, I suppose one could think of starting with Python and extending the functionality of a numeric module such as <a href="http://www.numpy.org/"><span style=" text-decoration: underline; color:#0057ae;">numpy</span></a>.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The other advantage of having at least the possibility of running C++ instead of Python is that Python doesn't support threads (because of the <a href="https://www.jeffknupp.com/blog/2012/03/31/pythons-hardest-problem/"><span style=" text-decoration: underline; color:#0057ae;">Global Intepreter Lock</span></a> problem) and if you want to do real heavy duty number crunching on multiple cores, you'd best use C++ with <a href="http://www.boost.org/"><span style=" text-decoration: underline; color:#0057ae;">boost</span></a> or something like that. Boost is proposed to be included in the standard library in C++17 anyway.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Nick/.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Thursday 12 November 2015 13:37:03 John Williamson wrote:<br /></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Firstly need to implement a system with primitive operations which parallel the workings of the space-time algebra. Multiplications, divisions and differentiations in particular.  It would be nice if such a framework existed already, but I do not think so. Stephen has written a suite in PYTHON to deal with the multiplications, which may be a start. Not sure what is best here: C++?, Python?, Something else? </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p></body></html>