Option 2 of my poll has to do with actors (and an actor is not an object)
1, Actors use message passing ==> no shared data => problem solved?
2. Null references ==> non-issue in typical producer-consumer applications??
So, objects were NOT built for concurrent access, but actors are...
Quizzie
1. channels can be found in C++ Actor libraries
Asynchronous Agents Library
2. C++ Concepts are a superset of Rust traits.
3. Would you write a CAD library or Black Scholes option pricer in Rust?
4. How does Rust generics compare to C# generics or C++ templates? The follow-on...
I'll let them argue among themselves over there:) but I see some use cases of interest to C++.
1. vanilla structs
2. generic structs
3 traits
4 channels
You learn this in a week if you know the adv C++ course. No kidding.
Why not just learn Rust _and_ C++?
Your post is a bit ambiguous, it is not precise. C++ Concepts were based on Haskell TYPECLASSES. But who cares now, it works.
I know C++ Concepts and it then took me a day or so to learn Rust traits..
It takes 15 years before a technology becomes accepted.
Nope. Correlation is not causation!
I spent the last 2 weeks experimenting with Rust code and benchmarking with C++ (BTW I was the 1st C++ programmer in the Netherlands in 1990 and I originated the QN C++ courses).
summary: Rust is rather incomplete compared to C++, a kind of carbon copy of...
A safe pair of hands.
// unsafe code 101
unsafe fn dangerous() {}
unsafe
{
dangerous();
}
// unsafe code, raw ptr and dereferencing
let mut num = 5;
let r1 = &num as *const i32;
let r2 = &mut num as *mut i32;
//println!("r1 is: {}", *r1);
unsafe
{...
“When I was a boy of 14, my father was so ignorant I could hardly stand to have the old man around. But when I got to be 21, I was astonished at how much the old man had learned in seven years.”
Mark Twain
A little learning is a dangerous thing ;
Drink deep, or taste not the Pierian spring ...
In cause some people missed this quote
This is a symptom of a larger immaturity in the crypto space. Crypto is replete with recent students who chase after buzzwords and new fads but can't see the forest from the trees. They don't understand the pitfalls of experimenting with a new technology...
I am a veteran in this industry and I know that computer scientists love new technologies. Many (technolgies) turn out to be fads. (caveat: I am not CS).
In 1991 there were at least 10 object-oriented languages.
All the functionality in Rust is in C++20 (and more).
Rust and OOP is not there...
Can you back up your claims? Not everyone is doing crypto.
BTW I am working on a report/critique
"If Rust is the answer, then what is the question?" (w/o handwaving or waffle).
Rust is way down the list here #18.
https://www.tiobe.com/tiobe-index/
Congratulations!
General question, @Fangtong
How did you find the usefulness of traits and C++20 Concepts in particular?
Game changer and highly future-proof imo. Rust has exactly the same features, but lesser. It is lagging.
@Devon Kaberna
@Paul Lopez
@APalley
Good idea. This week I'm just kicking the tyres (like uchi komi) and then I can go to a small app, e.g. Black Scholes (call C++/C maths function from Rust). yes??
Rust does not have much OOP support ..
Our goal is eventually interop.
I spent the last 3 days doing Rust programming for a bit of relaxation (am almost an expert by now :), but being my age means I'm a fast learner). I plan to spend a few more days to suss out more features. It is just a C++20 lookalike; if you know C++20 (and you do) then it is a piece of cake...
Developers use Rust for general programming, web development, data science and video gaming, as well as for augmented reality (AR), virtual reality (VR) and blockchain projects.
OK, any other applications?
Question: has anyone written an in-depth, "scientific" comparison of Rust and C++ at a level higher than "factional cheerleading" (no offence intended :-)?
I found blogs like this.
https://www.techtarget.com/searchapparchitecture/tip/Rust-vs-C-Differences-and-use-cases
In particular...
A general related remark:
Remark on code speedup.
The prevailing "mindset" is to write sequential (single-threaded) code and to profile it to locate performance bottlenecks. Then we pepper the code using #pragma and @decorator etc. This is fine-grained paralled pattern (e.g. parallel loop)...
I just caught ChatGPT-4 blatantly lying about the differences between user-level and system-level OS threads. When I confronted it, it confessed, apologized, and thanked me for the correction. Students, beware: Unless you can tell the right from the wrong, assume that ChatGPT-4 lies to you.
I offer Maths courses for MFE etc.
e.g. ODE/PDE, Numerics
(Students Euro 1500 1st course, Euro 995 each course after first course).
https://www.datasim.nl/onlinecourses
https://www.datasim.nl/testimonials
"To prevent the unexpected execution of batch files, you should consider moving the batch files to a directory that is not included in the PATH environment variable," Ryotak advised.
"In this case, the batch files won’t be executed unless the full path is specified, so the unexpected execution...
Firsy, we intend documenting it in book form. I get quite a number of requests for these kinds of application-oriented (for want of a better name) courses.
a lot of effort and work..:whistle:
My feeling is if you know C++ then learning Rust is easy.
e.g.
Rust is a multi-paradigm, general-purpose programming language that emphasizes performance, type safety, and concurrency. It enforces memory safety—meaning that all references point to valid memory—without a garbage collector. To...
“Do not judge, or you too will be judged. For in the same way you judge others, you will be judged, and with the measure you use, it will be measured to you."
Matthew 7:1-6
As an author, I would suggest doing some grammar checks. For example, " We will not." should be "we shall not".
It could be structured better.
Personally, I hate the widespread use of commas to structure sentences.
We should entertain all scenarios, one of which Rust is and will remain a niche product. It may have vocal cheerleaders. Due diligence and all that.
Of course, I still think Rust-C++ interop is important.
So, Rust is a silver bullet?
If you are getting segfaults with smart ptrs probably means you are doing something wrong.. At the least, this should be investigated.
But the core question remains: what is the root cause of this fiasco?
General Remark: wondering why developers have issues with pointers?
1. Are you using raw or smart pointers?
2. Incorrect use of raw pointers (code is a ball of mud with no centralised control).
3. Wrong design, no modular decomposition.
4. Developer does not fully understand pointers/using...
one more thing..
If Rust is the answer, what is the question, i.e. why all the hullabaloo?
Thinking out loud.
1. Better memory mgt than C++.
2. Better language features than C++ (at face value, can't imagine that).
3. Call C++ from Rust(*). 3A. vide versa.
4. Rust's channels look promising...
Volume II is the interop book.
Am thinking about Rust/C++.
What are the uses cases?
1. Call C++ from Rust
2. Vice versa
3. Using Rust Actor frameworks?
no idea 🙃
What about C++ Rust interop
https://google.github.io/comprehensive-rust/chromium/interoperability-with-cpp.html
Q What is CXX
A C++ rotated \pi /4
//
CXX was coined by John Carolan
http://www.edm2.com/index.php/Glockenspiel_C%2B%2B...
Our manuscript is in the copy/print edit phase. Contents are ready. We discusss Cython.
I Volume II (2025 hopefully) ==> more interop e.g. pybind11, Boost Python.
Thank you!
My company Datasim was probably the first OOP/C++ in the Netherlands and we worked with industrial/business clients from the outset. Our designs were stress-tested in real-life environments. And having a mathematical background and having worked in industry doesn't do any harm :)
If...
Why not do both?
A big miss in C++ is support for asychronicity, events, signals, Actor model.
TBH, saying that Rust is great for memory management is not all that exciting.
A general remark on learning.
It is always human to want to cram in as much stuff as possible, but this is not a good idea for at least 4 reasons. Compare to getting a black belt from blue belt level.
1. Blue to brown
2. Practice as a brown for a year
3. Brown to black.
(boost test, google test, ...)
Good idea.
A concern for me is which Boost libraries are alive and kicking; some are on sabbatical, rigor mortis etc.
https://www.boost.org/doc/libs/1_34_1/libs/test/doc/index.html
All this stuff has been extensively documented.
I think having a look at the work of the late Mark Joshi is good
https://fbe.unimelb.edu.au/__data/assets/pdf_file/0011/2591732/MARK_JOSHI_SSRN-id2277854.pdf
This code is from my 2018 C++ book for barrier options!
On a pedagogical advice to everyone , learn the maths of the binomial method and program it yourselves instead of copying from all kinds of (possibly dodgy) sites.
My two cents..
The first 2 modules are difficult indeed because it's C and a kind of survival guide to be honest.
In the past (and courses) people tried to learn C++ w/o C savvy. That does not work.
Like learning to fall before the real work.
and then the next steps (do each step 3 times). I reckon Ruska...
An emerging design pattern, an improved 3-layer model for OO inheritance.
This exposes a number of flaws in traditional approaches to OOP, plus a multiparadigm resolution thereof.
You could try designing it using C++20 Concepts.:ninja:
@APalley
@Paul Lopez
@Andy Nguyen
Don't want to scare you , but..
The political/work situation but it's all becoming a tad anti-immigrant.
https://www.dutchnews.nl/2024/03/ministers-set-up-secret-operation-to-keep-asml-in-nl-telegraaf/
As Nvidia hits $2 trillion, billionaire Marc Rowan’s asset manager Apollo calls AI a ‘bubble’ worse than even the dotcom era
https://finance.yahoo.com/news/nvidia-h ... OUzgY4qnCO
Optimisation is soo important
https://m.media-amazon.com/images/I/61RMTGsXzPL._SY466_.jpg
https://www.datasim.nl/application/files/5915/4999/4170/DL_Applied_Numerical_Methods_II.pdf
“Nothing takes place in the world whose meaning is not that of some maximum or minimum.”
― Leonhard Euler
It's not going to happen, methinks.
Mac will always be associated with DTP in my environment.
https://en.wikipedia.org/wiki/Desktop_publishing
Wintel is for engineering.
A bit off topic, nuance is
As George Bernard Shaw said: "England and America are two countries separated by a common language"
Oscar Wilde->
"We have really everything in common with America nowadays except, of course, language."
Also, im going to make an assumption given your spelling of "programme" that you are either in the eu or uk.
This is the correct spelling in this case.
Bachelors Economics programmes can give you exposure to ODEs and PDEs,
Maybe not hard enough for more hard quant role...
ODE/PDE for Economics students moves maths to next level
https://www.datasim.nl/onlinecourses/97/distance-learning-ordinary-and-partial-differential-equations
The Black Scholes option pricer in Fortran95
// DJD
real*8 Function pdf(x)
real*8 x,A
A = 1.0/Sqrt(2.0*3.1415)
pdf = A * Exp(-0.5*x*x)
return
end
real*8 Function cdf(x)
real*8 DPI,x,L,k,a1,a2,a3,tmp,pdf...
Yes, econometrics seems to be quite strong. I am not an economist.
There is a big skills shortage here. Having said that, it is almost impossible to find somewhere to live. Amsterdam is booming.
The (extreme?) right-wing PVV got 37 votes at recent general election, mainly based on an...
There is only one thing in life worse than being talked about, and that is not being talked about.
Oscar Wilde
Baruch must be doing something right. :ninja:
I am not really familiar with these programs. I know more about US and UK degrees,
Do you want to work in a bank or in trading?
Amsterdam is quite small.
The topics you mention are wonderful (I took most of them at university, I loved FA) but not directly applicable to finance IMO. But with your maths backgound, it's very impressive!
Can you program, e.g. solve Black Scholes PDE numerically ?
etc.
see random example
It's just a reminder.
You've posted ten thousand messages and received five thousand likes. You are a great human being.
You received 5,000 likes. You must be very popular around here.
A follow-on remark: a number of useful features in C++11 (e.g. enable_if etc.) can now be done much more easily in C++20 Concepts.
C++20 Concepts are mathematically quite robust.
C++23
Many low-level syntaxes, defect reports etc.
https://en.wikipedia.org/wiki/C%2B%2B23
In February 2020, at the final meeting for C++20 in Prague, an overall plan for C++23 was adopted:[3][4] planned features for C++23 are library support for coroutines, a modular standard library...
or even
int x = 4;
int z = [&r = x, y = x+1] {
r += 2; // set x to 6; "R is for Renamed Ref"
return y+2; // return 7 to initialize z
}(); // invoke lambda
Chapter 20 One Step Beyond: Component-based Software Development
The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.
Edsger Dijkstra
@Paul Lopez
@APalley
I don't think so; it is not based on reality.
No future, at least not the way CS is approaching it.
I am not a betting man, but my money would not be on it.
Is this a compute-intense parallel program or some kind of asych event flow app, like a data feed pipeline?
So, what is the _problem_ ?
edit: is throughput more important; thread start/stop is costly.
I don't do much of this in general apart from coarse-grained parallelism ball park stuff ...
What about Boost? just a guess?
https://www.boost.org/doc/libs/1_80_0/libs/timer/doc/cpu_timers.html
Plan B ... a commercial product .. doesn't grow on trees.
Math 442 (Introduction to Partial Differential Equations): Rating: 70/100. Partial Differential Equations (PDEs) have their place in the quant finance realm, especially when modeling derivative pricing and other financial instruments. However, this course dives into a lot of mathematical theory...
Alan's chapter 5 has
Step I: Standsardised SDE
Step II: Discretize the SDE (Euler (x) and NR lattice (y), others?)
Step III: HMM structures (construct Q_n(x) matrix)
?? Step IV: what's next? is that section 5.5's use cases?
Fundamental data input?
Final output?
I would like to this problem a bit of a whack in C++. Ideally, C++20 and possibly Boost C++ libraries.
Is there a defined process (input-processing-output)?
Some hints:
First, you have to understand the problem.
After understanding, make a plan.(algorithm)
Carry out the plan.
Look back on your...
Ciao Marco,
The approach taken in this article (Monte Carlo in C#) might help (separation of concerns) is not a million miles away from the approach/recommendations here (especially Figures 1 and 2).
A useful quiz: "align" your DFD with context diagram Figure 1 (or 2).
I looked at the DFD. At this stage I do not have enough information to go on. Some issues IMHO are:
1. The scope of the article is rather diffuse .. I would scope the problem to a well-known concrete problem and start again (e.g. take a 1-factor barrier option and work the whole process out A-Z...
A 101 example could be to take the simplest (not too simple) and trace/paraphrase the steps from Input to Output "meeting" Simplex, Transition along the way i.e. data flow diagram, like Figure 2 in Chun's thesis.
block diagram with a clear workflow. In this way, it should be easier to explain...
Prego Marco,
This was my thinking as well. I'll go through your paper again in the light of your points 1), 2) above. I do have some (numerical) questions will pose in a couple days.
// I used Bezier stuff when in CAD (I once designed a Pirelli tire with Bezier) and for holography, but the...
1. The scope, rationale, reader group, how the article is written (similar to Marsden's recommendation). The article does not flow yet, it is a description.
2. Technical stuff (density, simplex, transition matrix, Bezier etc.)
1.continued.
I think the goal should be to restructure the article...
Marco,
I use this below all the time, in maths, for C++, for books etc.
(my very first _proposed_ chapter of my very first book From Chaos to Classes (1996) had > 40 pages 🤖)
Some initial tips.
https://en.wikipedia.org/wiki/How_to_Solve_It
Niels Bohr say
1.tell 'em what you are gonna tell 'em...
I don't doubt that.
What are the gems that new C++ programmers can take from this video. People ask us quite often
1. How to design a trading system in C++.
2. Which language features are useful.
Maybe I've missed something.
// There seems to be a trading module in one of the Baruch projects.
yes and no.
This is Optiver which is a major user of C++.
To understand this you probably need quite a few years of industrial experience. A bit like martial arts belts
white -> yellow -> ... -> brown -> black 1 -> black 10.
It's called experience. First we learn the fundamentals.
The last module is an application project.
https://quantnet.com/threads/blog-articles-on-c-11-and-computational-finance-by-daniel-j-duffy.32237/page-6#post-310389...
Prego :)
Ciao Marco,
I am going through your (mega ) article and I am preparing some feedback. It is a huge endeavour and my two main perspectives soon are:
1. The scope, rationale, reader group, how the article is written (similar to Marsden's recommendation). The article does not flow yet...
If I were in this position, focus on applied/numerical maths degree.
And learn C++ asap.
Everything else follows, more or less.
// not sure if actuary is quant as such.. but useful skills nonetheless.
The Microsoft Implementation of CRTP in Active Template Library (ATL) was independently discovered, also in 1995, by Jan Falkin, who accidentally derived a base class from a derived class. Christian Beaumont first saw Jan's code and initially thought it could not possibly compile in the...
"People talk about teaching programming, I think that's a great idea. The problem is, as near as I can tell, they're *not* teaching programming ... they're teaching coding.
Hardly anybody in the outside world understands the difference between #programming and #coding "
— Dr. Leslie Lamport...
Another way, from 1st principles from definition of upper and lower limits U and L, value always in (L,U), let N -> 2,4, ...
The way Archimedes wudda done it.
p. 26 A good test: compute Lebesgue integral numerically + manually using N subdivisions of y axis
e.g. f(x) = x^2
N = 2,4,8 etc.
// figures not numbered.
https://www.efinancialcareers.com/news/finance/python-vs-c
Python is great for prototypes, but not so much for building trading systems, says Peacock. "It's almost like a toy language," he says, before quickly correcting himself for fear of upsetting Python developers. "- Python is a serious...
But I know nothing about C++ and have very little experience in using computer programs to automate mundane tasks.
I would say QN C++
Not being able to program is like not having a driver's license IMHO.
And from a structural point of view, generics were added to Java very late in the game. And it's not to everyone's taste.
https://en.wikipedia.org/wiki/Generics_in_Java#:~:text=Generics%20are%20a%20facility%20of,compile%2Dtime%20type%20safety%22.
AFAIR Visual Studio is mandatory?
I don't use Mac, so personally I can't help here. Sorry :oops:
The original VS2015 is embedded/ hard coded in the videos. It is a question of learning each new version of Visual Studio.It is a bit annoyng, but not the end of the world.
There is lots of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.