4 ms·
The Fibonacci one-liners are just one example of the large amount of wank that exists in the functional world. However, there are quite a few banks, hedge funds
by 0db532a0 8y ago
The Fibonacci one-liners are just one example of the large amount of wank that exists in the functional world. However, there are quite a few banks, hedge funds and quant trading firms using functional programming now to model their financial instruments and contracts. Off the top of my head, I know for a fact that Standard Chartered and Barclays use Haskell to this end. Jane Street uses OCaml as its main language.
Functional programming lends itself to writing solid, verifiable code, and I trust these firms know what they’re doing given the amount of money involved.
Obviously you use the right tool for the job. For low-latency/HFT, it’s still probably going to be C/C++/ASM.
- flukus 8y ago> Off the top of my head, I know for a fact that Standard Chartered and Barclays use Haskell to this end. Jane Street uses OCaml as its main language. KDB is also fairly common at these sorts of companies and that was top of my mind when thinking of Fibonacci one liners. I've been through their youtube tutorials and various other bits of documentation and their are plenty of fibonacci like examples and precisely zero information on how to create a project, share code, deploy, etc. Smalltalk and other image based environments are much the same, they don't seem to have a lot of good answers for sharing code, or at least they don't show how. Another thing to keep in mind is what precisely they're used for at these companies, for some it's the core of the whole company for others it's just a fairly irelevent side project, I'd be willing to bet if you added up lines of code java would still come out on top by a mile. Our industry has a "you can prove anything with case studies" problem, see that one game built with lisp 20 years ago. > Functional programming lends itself to writing solid, verifiable code, I'm not sure that's true, it's a largely self selecting group that use these languages and I'm sure if you put them in front of an imperative compiler they'd be writing a lot of pure functions with little state. At worst imperative languages make it easier for state to creep in, but I consider that more of a feature in reality. > and I trust these firms know what they’re doing given the amount of money involved. I wouldn't be so sure, the industry has everything from old conservative companies still running COBOL mainframes to more cutting edge stuff, I know of one big progress user and even a large betting company building on nodejs. I personally worked on a 64-bit upgrade for a large company last year, finally they can run code on servers from this decade. And they're all held together by csv and tab delimited files flying in every direction, automated systems watching for FTP file drops, others scanning for email attachments and being run through a complex web of regexes. Not to mention the excel, if every copy of excel disapeared the industry would cease to function overnight. I've spent enough time in finance that keeping my money under a mattress seems somewhat prudent. There might be some good companies but there is no correlation between size/wealth and quality.
- 0db532a0 8y agoI completely agree that the publicly available tooling in the functional world is shit. Haskell doesn't even have a proper debugger, let alone IDE support. KDB as you say is common with financial companies. In fact I have only heard about it being used by financial companies. I have only used J, another array based programming system, and I found it brilliant for processing data. KDB has a niche in the financial world, and there is a reason for it. First Derivatives relies on KDB. Obviously anyone who is doing anything interesting and profitable in this area is not going to be making it public, just like the world of betting. There's another problem in the functional world, which is that the vast majority of publicly available talks you can find involve 90% wanking over the type system or how functional can beat C in some edge case (inevitably coded C-style) rather than focussing on the real world applications of what functional is suited to. You're right that there are a lot of people in the functional world who have no idea about imperative, and could probably not tell the difference between a MOV and an LEA. I wager that these are not the same types of people who have actual high-paying jobs writing functional code. The companies I mentioned have their own tooling, even their own compilers. They're applying functional programming to the niche it's suited to, namely providing a well-typed, functional interface to the more nitty-gritty systems, which are necessarily made up of Excel, COBOL and FTP file drops. You're just not going to hear about this in the typical type-system wank talk/blog on Youtube/Medium.