Forums  > Software  > F#  
     
Page 1 of 2Goto to page: [1], 2 Next
Display using:  

Maggette


Total Posts: 1097
Joined: Jun 2007
 
Posted: 2013-08-31 11:41
Hi,

I am kind of intrigued by F#. Reason is I learned that I love using the more "functional" features of the later C# versions (Linq, Lambda Expressions,anonymous methods etc).

Now I wanted to ask: is somebody in the industry (Banks, Hedge Funds, Prop Shops,Market Maker, Commodity trading etc) , scientist or data mining/business intelligence really using it?

And what is Microsoft trying to achieve with F#? Just a toy to keep in touch with computer science?

Thanks

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

Steve Castle


Total Posts: 306
Joined: Sep 2010
 
Posted: 2013-08-31 13:17
The new-ish bank paradigm is using modified python to achieve functional programming goals.

The problem with (relatively) obscure languages is finding people who know it well enough.

that being said, I don't know about the smaller shops. I'm sure you can find a shop out there using it.

If your goal is to be widely useful, I'd suggest reading about Haskell and learning how to do all the functional stuff in python. Putting that kind of stuff on your LinkedIn gets you phone calls.

e.g.: Read this as lessons on functional programming. I stole this from here

If you are really intrigued by F# specifically, I can't help you :)

in the words of one such quant ‘were on the whole either less quanted or not quanted at all’.

YukaRedux
Now with added evil

Total Posts: 650
Joined: Dec 2004
 
Posted: 2013-08-31 14:17
Close to 100% of what I do now is in F# - so at least one person in the industry is really using it :-)

That aside, Credit Suisse is a fairly big proponent of both F# and Haskell from what I've heard - Luca Bolognese, who worked on F# at Microsoft, joined them a couple of years ago. You've also got Jane St Capital who claim to do everything in OCaml.

Here's what I wrote in an earlier post about it:

I'm a bit of an F# evangelist - the learning curve really isn't *that* steep, and honestly I couldn't live without it now.

- This is the video that got me hooked. A highly entertaining 1:18 minutes, well worth your time, and a great introduction to the language. Luca now works for Credit Suisse, where F# is making a major inroad. http://channel9.msdn.com/Blogs/pdc2008/TL11

Books:

- Expert F#. Still the best book on F#.

- Visual F# 2010 For Technical Computing (the updated version of F# For Scientists). Excellent, with a strong focus on efficient computation through data structure selection and management.

- Programming F#. Reasonable, lots of overlap with the above.

- Real World Functional Programming in F# and C#. I didn't get much from this - an ambitious project that fell a bit short, I felt. But you might find some value, especially if your coming from a deep C# or imperative background.

Blogs/Web Resources:

- Don Syme is F#'s architect, his blog is here: http://blogs.msdn.com/b/dsyme/
- FPish is the central repository for F# questions & issues: http://hubfs.fpish.net/topics
- F# tag on StackOverflow has some interesting stuff: http://stackoverflow.com/questions/tagged/f%23
- F# for Game Design: http://sharp-gamedev.blogspot.sg/ - some innovative approaches, with some relationship to quant finance in parts.
- FSharpChart - wrapper for the DataVisualization.Charting namespace, make simple charts very easy. I use this daily: http://code.msdn.microsoft.com/windowsdesktop/FSharpChart-b59073f5

Also:

- R to F# type providers library: http://techblog.bluemountaincapital.com/2012/08/01/announcing-the-f-r-type-provider/ - not perfect by any means (I tend to default to Rdotnet if needed) but it makes things marginally less painful for simple cases
- F# and CUDA for GPUs - saw this recently, looks very sexy: http://skillsmatter.com/podcast/scala/alea-cuda-combining-the-computational-power-of-gpus-with-the-functional-elegance-of-f/mh-5630
- Type Providers - these are sexy: https://github.com/fsharp/FSharp.Data/blob/master/samples/library/CsvProvider.fsx

The pros to F# are definitely productivity and clarity. There's really no debugging cycle - the combination of a functional approach (writing largely side effect-free code) and the FSI (like the REPL that you get in LISP - an instant compilation, prototyping tool) just makes everything work almost first time. And if it doesn't work, it's very easy to reason through the code. I find myself thinking more (especially about data structures and algorithms) and coding less, which can only be a good thing.

Everything is strongly typed but with type inference - kinda like using var in C# for everything. You can, if you really wish, build in an OOP style with classes, but you'll figure out that you rarely need to. Features like Pattern Matching, curried functions, sequence compositions, once you use them, make it very hard to consider coding in any other language again that doesn't offer these. Parallelism is just built in.

The cons are mainly the learning curve, which is steep but short. I dived straight in from C#, and went from zero to production ready systems in only a few weeks. You can write GUIs in F#, but it's a pain - you're better off using C# to lay out the forms, but then do all the business logic, event handling, etc, in F#. That said, if you're coming from an R background, then you'll be happy sticking with the REPL approach that F# most naturally offers.

Finally, as a first class citizen in the .net zoo, it plays nicely with anything you might use in C#.

Patience is just desperation disguised as a virtue.

Maggette


Total Posts: 1097
Joined: Jun 2007
 
Posted: 2013-09-02 19:28
Thanks to both of you for the interesting stuff!!!

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

Maggette


Total Posts: 1097
Joined: Jun 2007
 
Posted: 2013-11-05 22:53

Hi all,

I finally managed to get some time to have a look at F#. So far like it a lot and decided to play around with it a bit more.

I will miss all the pre implemented scientific computing functionality from R ...or maybe not. Tryed to get the RProvider going, but ran into an emberassing problem.

I use VisualStudio2010 and created an F# library, downloaded the RProvider via NUGet and referenced it in my project.

If I get the namespace concept in F# right, I have to reference these packages/libraries/dll in an script/interactive session in manual fashion, like

#r @"..\packages\RProvider.1.0.3\lib\RProvider.dll"

Basically I followed this demo: 

http://clear-lines.com/blog/post/Visualize-WorldBank-data-with-R-and-FSharp-Type-Providers.aspx#comment 

My problem is,

open RProvider

works fine, but I cant't open

open RProvider.``base``
open RProvider.graphics

Autocompletion on Rprovider. does not offer me anything. NamesSpace "base" is not defined?  I expet it to be something stupid, but I am a little bit confused by the F# namespace concept, which seems to be close to C# but still different.

Any help welcome.

Thanks


Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

YukaRedux
Now with added evil

Total Posts: 650
Joined: Dec 2004
 
Posted: 2013-11-06 04:19
I've had problems with the RProvider if R was not installed using an administrator account. You might want to try uninstalling, then reinstalling with admin rights.

Patience is just desperation disguised as a virtue.

Maggette


Total Posts: 1097
Joined: Jun 2007
 
Posted: 2013-11-06 21:40
Hi,
I am afraid that won't do the trick. I do not have local admin rights on my machine by default. if i want to install anything I have to switch the user to my local admin user...hence I installed r with an local admin profile.

Will have a closer look at it during the week.

Edit: thanks to your help

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

Polter


Total Posts: 130
Joined: Jun 2008
 
Posted: 2013-11-12 00:29
On-topic videos from Øredev 2013 -- somewhat brief -- introductory overview, really -- but perhaps of some interest as a starting point / list of pointers:

F# for C# developers:
http://oredev.org/2013/wed-fri-conference/f-for-c-developers

F# for trading:
http://oredev.org/2013/wed-fri-conference/f-for-trading
// note: this one isn't up yet at the moment of writing
// here are the slides: http://www.slideshare.net/ptrelford/f-for-trading-0redev-2013

jslade


Total Posts: 1168
Joined: Feb 2007
 
Posted: 2013-11-13 06:37
I don't really have any need for a "new" programming language, other than curiosity (TonyC got me hooked on J), but the two which stand out as tempting are F# and Haskell. Mostly, in case I ever need something which does parallel numerics reasonably well. But also because ML is good juju.

Since I never use windows, does F# work reasonably well on Mono? By "reasonably well" I mean, "doesn't need to resort to abortions like JBLAS to get things done."

Otherwise, the Haskell GPU stuff would at least allow me to fiddle with a cool architecture in a high level language.

FWIIW, I knew a guy at Blue Fin who used F#.

"Learning, n. The kind of ignorance distinguishing the studious."

YukaRedux
Now with added evil

Total Posts: 650
Joined: Dec 2004
 
Posted: 2013-11-13 07:51
I'd love to know the answer to that one too...

Patience is just desperation disguised as a virtue.

MadMax


Total Posts: 424
Joined: Feb 2006
 
Posted: 2013-11-13 13:59
If you are interested in F# but don't use windows,  then you should look into scala instead.

YukaRedux
Now with added evil

Total Posts: 650
Joined: Dec 2004
 
Posted: 2013-11-13 14:35
It's been a while since I looked at Scala, but my recollection was that it felt a lot less "pure FP" than F#, with a higher dependency on trying to model everything in an object-like sense, and with less emphasis on type safety. Scala felt more like C# done better, whereas F# feels (cue blinding glimpse of the obvious) like OCaml done better.

At some point I should really try to get F# running on a Linux machine...

Patience is just desperation disguised as a virtue.

astar


Total Posts: 176
Joined: Mar 2007
 
Posted: 2013-11-13 17:24
I haven't played with F#, but have played with ocaml some time ago. Is F# actually better? I thought it was just a reimplementation on the Net platform?

Not trying to start a religious war or anything...

jslade


Total Posts: 1168
Joined: Feb 2007
 
Posted: 2013-11-13 21:12
F# pretty much is OCaML, with some parallel facilities, and without functors, which I never figured out anyway. Oh yeah: no objects.

I will never use another JVM language if I can avoid it.

"Learning, n. The kind of ignorance distinguishing the studious."

leftic


Total Posts: 86
Joined: Jun 2007
 
Posted: 2013-11-13 21:46
Abstracting over modules can get you some really general, orthogonal code. Functors are pretty great when used properly, and an unnecessary complication when misused. Just like any other powerful language feature.

FDAXHunter
Founding Member

Total Posts: 8371
Joined: Mar 2004
 
Posted: 2013-11-14 08:41
jslade: I will never use another JVM language if I can avoid it.

I cannot tell you just how much I agree with this sentiment. JVM Puke

The Figs Protocol.

henderson


Total Posts: 175
Joined: Jul 2007
 
Posted: 2013-11-14 15:37
ditto.

Nonius
Founding Member
Nonius Unbound
Total Posts: 12773
Joined: Mar 2004
 
Posted: 2013-11-14 22:25
fdax gave me shit about java, an old man's language. now I gotta learn C#. Angry looks kinda similar though. Smiley

Chiral is Tyler Durden

YukaRedux
Now with added evil

Total Posts: 650
Joined: Dec 2004
 
Posted: 2013-11-14 23:48
Skip it, and go to F# instead. Same tools, same libraries, and (without wanting to be too hyperbolic) virtually no debugging cycle as you commonly know and hate it.

Join us, the water is warm, the beers are cold, and the chicks are AAA and double D.

OK, I might be lying about the chicks.

Patience is just desperation disguised as a virtue.

MadMax


Total Posts: 424
Joined: Feb 2006
 
Posted: 2013-11-15 07:08
I can see why one would dislike JVM if you compare to .NET.

Scala offers remote actors through akka library, while last time I checked F# had only local implementation.

YukaRedux
Now with added evil

Total Posts: 650
Joined: Dec 2004
 
Posted: 2013-11-15 07:58
I'm not entirely sure what akka does, but if it's distributed computation you're after then the {m}brace product does this in F# (assuming it ever comes out of alpha stage development..)

Patience is just desperation disguised as a virtue.

FDAXHunter
Founding Member

Total Posts: 8371
Joined: Mar 2004
 
Posted: 2013-11-15 09:15
Yes, Akka is truly cool. It really is. But even with Akka, the water in the JVM pool is still way too fetid.

The Figs Protocol.

YukaRedux
Now with added evil

Total Posts: 650
Joined: Dec 2004
 
Posted: 2013-12-02 10:21
I think I'll pass on Scala... http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/

Patience is just desperation disguised as a virtue.

Patrik
Founding Member

Total Posts: 1358
Joined: Mar 2004
 
Posted: 2013-12-02 14:08
Slight thread jack, but I'm curious about the JVM hate. What are the pain points?

(excluding security track record, which is horrific but doesn't affect me too much on in-house development)

Capital Structure Demolition LLC Radiation

jslade


Total Posts: 1168
Joined: Feb 2007
 
Posted: 2013-12-04 00:53
"I'm curious about the JVM hate. What are the pain points"

Imagine someone invented a gizmo to safely run code in your browser, and then 20 years later tried to talk you into using it to run numerics or supercomputing problems.

Practical issues:

1) Bad type model/boxing/reflection
2) Lack of useful numerics types
3) Lack of array math primitives (using JBLAS is stupid; you'd think, 20 years later, they'd have a better solution than this, but they don't)
4) Classpath hell (irrelevant in some languages, but it's always lurking there)
5) Build tools using ... XML ...
6) JVM barfing Java stack traces at me
7) Lack of useful math libraries of any kind
8) Memory hog/heap allocation
9) VM incompatibilities; and why is a VM useful at all, frankly?
10) 80s era start up times for complex applications
11) weird leftovers from when it was a browser execution thing

Java itself is an OK language for building big, bureaucratic networky things, using teams of not-so-talented developers, and deploying distributed applications on homogeneous networks. This isn't what I do for a living.

Nothing good can come of fiddling with Java and friends. I don't like C++ much either, but I feel that worrying about memory leaks is easier than worrying about all the stupid crap that comes with the JVM. I'd like a C++ replacement with a REPL, but nobody has managed to sell me one (Golang, Rust, SBCL, F#, Haskell).


"Learning, n. The kind of ignorance distinguishing the studious."
Previous Thread :: Next Thread 
Page 1 of 2Goto to page: [1], 2 Next