SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Cuchulainn
Posts: 59409
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Python tricks

July 16th, 2019, 10:21 am

The problem is that those errors are hard to find, e.g. when two well-tested parts of code don't work together and you're left with no clue why.
That's why you need contracts as I mentioned

https://www.wired.com/2010/11/1110mars- ... er-report/

Is NASA can get it wrong, what can we say about the somewhat more humble NumPy and SciPy?


The whole thing could be written off as a miscommunication. Propulsion engineers, like those at Lockheed Martin who built the craft, typically express force in pounds, but it was standard practice to convert to newtons for space missions. One pound of force is about 4.45 newtons. Engineers at NASA's Jet Propulsion Lab assumed the conversion had been made, and didn't check.

But there was an underlying issue in the culture of NASA's space exploration at the time, Cook said.
 
User avatar
Cuchulainn
Posts: 59409
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Python tricks

July 16th, 2019, 10:39 am

ADA knows how to live with UNITS

http://www.dmitry-kazakov.de/ada/units.htm
 
User avatar
Cuchulainn
Posts: 59409
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Python tricks

July 16th, 2019, 12:24 pm

Question: all Python exceptions are run-time only? Even assert?
 
User avatar
ISayMoo
Posts: 1894
Joined: September 30th, 2015, 8:30 pm

Re: Python tricks

July 16th, 2019, 1:50 pm

The problem is that those errors are hard to find, e.g. when two well-tested parts of code don't work together and you're left with no clue why.
That's why you need contracts as I mentioned

https://www.wired.com/2010/11/1110mars- ... er-report/

Is NASA can get it wrong, what can we say about the somewhat more humble NumPy and SciPy?
The problem is that what "contract" means depends on the context. Maintainers of Python libraries specify their contracts in Python terms. Maintainers of C++ libraries specify their contracts in C++ terms. They don't think about interfacing with another languages.
 
User avatar
katastrofa
Posts: 7947
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Python tricks

July 16th, 2019, 2:44 pm

The problem is that those errors are hard to find, e.g. when two well-tested parts of code don't work together and you're left with no clue why.
That's why you need contracts as I mentioned

https://www.wired.com/2010/11/1110mars- ... er-report/

Is NASA can get it wrong, what can we say about the somewhat more humble NumPy and SciPy?


The whole thing could be written off as a miscommunication. Propulsion engineers, like those at Lockheed Martin who built the craft, typically express force in pounds, but it was standard practice to convert to newtons for space missions. One pound of force is about 4.45 newtons. Engineers at NASA's Jet Propulsion Lab assumed the conversion had been made, and didn't check.

But there was an underlying issue in the culture of NASA's space exploration at the time, Cook said.
I love such stories. An analogue version of this error happened to the engineers building Vasa.
"The use of different measuring systems on either side of the vessel caused its mass to be distributed asymmetrically, heavier to port. During construction both Swedish feet and Amsterdam feet were in use by different teams. Archaeologists have found four rulers used by the workmen who built the ship. Two were calibrated in Swedish feet, which had 12 inches, while the other two measured Amsterdam feet, which had 11 inches.[56]"
 
User avatar
FaridMoussaoui
Posts: 401
Joined: June 20th, 2008, 10:05 am
Location: Genève, Genf, Ginevra, Geneva

Re: Python tricks

July 16th, 2019, 3:01 pm

Why do you use "inch" instead of "cm"? :)
 
User avatar
katastrofa
Posts: 7947
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Python tricks

July 16th, 2019, 3:26 pm

We use inches in Ukraine. We just called them палець (finger) =1 inch. There's also стопа (foot) =12 fingers, which is a standard set of fingers every Ukrainian has (though it can vary depending on how far from Chernobyl they live), and лікоть (elbow) = 2 feet.
 
User avatar
ISayMoo
Posts: 1894
Joined: September 30th, 2015, 8:30 pm

Re: Python tricks

July 16th, 2019, 7:43 pm

Why do you use "inch" instead of "cm"? :)
There were no centimeters in the XVIIth century.
 
User avatar
Cuchulainn
Posts: 59409
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Python tricks

July 16th, 2019, 9:18 pm

Why do you use "inch" instead of "cm"? :)
There were no centimeters in the XVIIth century.
Centimetres were invented by Europeans to undermine the British Empire. 
 
User avatar
Cuchulainn
Posts: 59409
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Python tricks

July 16th, 2019, 9:24 pm

Why do you use "inch" instead of "cm"? :)
There were no centimeters in the XVIIth century.
Centimetres were invented by Europeans to undermine the British Empire. 

An old Etonian neighbour was a consultant in factories here along the border. The wife of the director asked him if he noticed any differences: "one group measures in cm and the other in inches" ;)
 
User avatar
FaridMoussaoui
Posts: 401
Joined: June 20th, 2008, 10:05 am
Location: Genève, Genf, Ginevra, Geneva

Re: Python tricks

July 16th, 2019, 11:56 pm

Why do you use "inch" instead of "cm"? :)
There were no centimeters in the XVIIth century.
Centimetres were invented by Europeans to undermine the British Empire. 
Well, it was the french.

PS: Europe is not a continent as it is a continium of Asia.
 
User avatar
katastrofa
Posts: 7947
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Python tricks

July 17th, 2019, 12:24 am



There were no centimeters in the XVIIth century.
Centimetres were invented by Europeans to undermine the British Empire. 
Well, it was the french.

PS: Europe is not a continent as it is a continium of Asia.
French? It was Burattini, an Italian in the service of a Polish king.
 
User avatar
Cuchulainn
Posts: 59409
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Python tricks

July 17th, 2019, 9:48 am

Dumb question. are Python36/include/  and  Python36/libs/  (or the like)  in your Includes?
The issue was related to this indeed. The correct Python 3.7 needs to be installed and be compatible with VS2019 and the Boost 1_70 build. 
I would imagine that Farid's seamless linux solution is more rigorous.
 
User avatar
ISayMoo
Posts: 1894
Joined: September 30th, 2015, 8:30 pm

Re: Python tricks

July 19th, 2019, 11:54 pm

C# experts: what's the best online tutorial for C#? I know Java, C++ and Python.
 
User avatar
Cuchulainn
Posts: 59409
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Python tricks

July 20th, 2019, 4:48 pm

C# experts: what's the best online tutorial for C#? I know Java, C++ and Python.
C# in a Nutshell by Albahari brothers is great. I reckon you can learn the language essentials in a few weeks. C# is closer to C++11 than it is to Java.

And C++/CLI speaks both C# and native C++.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On