Tenerife Skunkworks

When one door closes, another will open, but standing in that hallway can be hell. You just have to persevere. Quite often that dragon of failure is really chasing you off the wrong road and on to the right one. “Failure” speech, Paul Tudor Jones, 2009

what is the point?



+4 37444c71  pushl %ebx

+5  37444c72 subl  $0x30,%esp

+8  37444c75 calll 0x37444c7a

+13 37444c7a popl  %ebx

What is the point of pushing %EBX just to “call” the next instruction and pop it? Is this some kind of an idiom?

Update:

Mistery solved. The code in question is how GCC calculates the Objective-C selector (method pointer).

This is where I live!
Don’t worry about people stealing your ideas. If your ideas are any good, you’ll have to ram them down people’s throats. Howard Aiken, IBM
indoctrination
indoctrination
Things look scary but looks can be deceiving! That’s Tenerife, the island where I live.
Things look scary but looks can be deceiving! That’s Tenerife, the island where I live.
low-level haskell code is usually 3 times harder to write and 3 times slower than gcc code. native haskell code is tens to thousands times slower than C code ghc vs gcc thread at fa.haskell

OCaml+LLVM vs C++

I’m prone to cooking with too many ingredients and my latest project is a great example. I want to build a Mac trading platform and it must allow EasyLanguage for writing of trading systems. I have a parser already written in OCaml and I would like to compile EasyLanguage rather than interpret. I want vectorization and huge optimization speedups. This is where LLVM comes in.

LLVM has excellent OCaml bindings but code generated by the LLVM just-in-time (JIT) compiler cannot call out to OCaml. I would need to generate C wrappers for OCaml code using LLVM, basically wrapping my OCaml trading platform in C code. The alternative is to write the trading platform in C or C++ but where does that leave OCaml? Is there a huge benefit to OCaml when I’m only using it to implement the parser? I don’t think so!

That leaves me actively looking at using Boost::Spirit for the parser and C++ for the rest of AlgoKit. It’s often said that the right thing to do is the thing you are most afraid of. I have conquered Erlang, OCaml, Haskell and Lisp but I’m scared of C++. Would you believe it?

Cooking with too many ingredients.
Cooking with too many ingredients.