3 ms·
One thing I always loved about C was how easily you could slip in and out of x86 assembler with the __asm__ tag. There is no ceremony & it seems like magic. Lik
by dxbydt 4y ago
One thing I always loved about C was how easily you could slip in and out of x86 assembler with the __asm__ tag. There is no ceremony & it seems like magic. Like if you have 3 C int's a,b & c, and you want to add a & b and store the result in c, you would do:
__asm__ ( "addl %%ebx, %%eax;" : "=a" (c) : "a" (a) , "b" (b) );
Then you could just continue in C as if nothing had happened, and a printf("%d",c) would give you the right result. When I worked as a quant, I saw such code snippets quite frequently. Those days (late 90s early 2k), individual programmers had a certain amount of freedom that is completely missing today. You would have a cohesive team with a C programmer, java programmer, a sysadmin, an R guy, a kdb/q quant - no issues. The front end was all java awt widgets, and you would jni to do the hard bits. jni would pull in the C code, which was peppered with little bits of __asm__ to speed things up. Everytime you needed to interact with the outer ecosystem, C would do an fwrite to the file system, then R would pick up the file, do its montecarlo simulations & write back to the filesystem, the algotrading bits would be in q, and even the sysadmin had his share of awk/sed to massage all the back & forth data. It was smooth & nice & pulled 100x its weight. Best of all, the individual programmers had respect for each other's skills & would learn from each other. These days, some asshole CIO would fire the whole bunch & replace them with 10 pythonistas & insist everything should be coded in one true language - and as one of those pythonistas, while I am happy I still have a job in this recession, it is kinda sad, those languages were so much more fun & it was exciting to watch the interplay of different languages bearing their own strengths, whereas python otoh is so terribly boring & everyday is same verbose torch.autograd.Function crap oh well back to the coal mines.
- rramadass 4y agoMan, that is one complex, interconnected and interesting System! I would love to work on something like that even if it is just maintaining a legacy product. Seriously, let me know (contact in my profile). On similar lines, I have been thinking of using Erlang/Elixir for distributed programming over the Web (even in the browser if possible) and dropping down to C/C++ and J programming languages as required on individual nodes.
- dxbydt 4y agoIf you like such systems, backend systems in investment banks is where its at. Most of my experience was at Goldman, but similar systems exist in Morgan, Deutsche, Citi, UBS, Bloomberg or old PE firms. Look for C programmer careers in trade publications like efinancialcareers.com, or work with Huxley, Selby Jennings etc. Combination of C/C++ and certification in Q/kdb - will keep you employed pretty much into your 60s. Those languages are intrinsically hard & imo a real pleasure to code in. Well, I liked it.
- rramadass 4y agoThanks for the pointers, appreciate it very much.