Learning F#
-
I remember that notation from university, but they really need to explain it. Lots of the tutorials assume that you have been taught discrete maths, and over and above that loads of the examples are hairy mathematical functions. MS really need tutorials and examples that don't assume a compsci background if they want to get traction for F#. Many of us know that pure functional programming is going to be a good solution for dealing with multiple cores but find the existing documentation very heavy going, they really need to do some functional programming for business programmers tutorials.
Required base compsci MS would go out of business. If I had a dollar for all the times I had to explain basic data structures and algorithms ...
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway -
leppie wrote:
It's called common sense, aka from 'int' -> (to) 'int'
You call that common sense? I call that conditioning. Every language I've ever worked with before, all of which are C-based, put the return type on the left side.
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Josh Smith wrote:
I call that conditioning
No, it's a clever convention. Especially when you start mixing in currying and composition. It's an algebra. :)
-- Kein Mitleid Für Die Mehrheit
-
I'll bet if you get a good grip on Lisp in the meantime, that will help you out, since I would imagine that a lot of the ideas in F# have their roots in Lisp.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
Hrm.. I think F# has more roots in languages such as Haskell, than in Lisp. F# seems much more pure than Lisp is, from a functional point of view.
-- Kein Mitleid Für Die Mehrheit
-
I've been spending some of my free time trying to learn about F# because it seems really interesting. The problem is, the existing F# tutorials SUCK. I think that the language tutorials provided by Microsoft were written by brainiacs in the Microsoft Research group, so it's not really helpful at all. For example, I read that this:
int -> int
...represents a function which takes and int and returns an int. The problem is, the author failed to mention which "int" represents the return type and which the parameter type. :| There's only one F# book out there yet, and all the reviews I've read of it say that it sucks too. Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us! ;)
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
I think most of the F# docs assume you already know another functional language like OCaml or Haskell. I haven't used OCaml much, but Haskell has some good books written for it.
This blanket smells like ham
-
I've been spending some of my free time trying to learn about F# because it seems really interesting. The problem is, the existing F# tutorials SUCK. I think that the language tutorials provided by Microsoft were written by brainiacs in the Microsoft Research group, so it's not really helpful at all. For example, I read that this:
int -> int
...represents a function which takes and int and returns an int. The problem is, the author failed to mention which "int" represents the return type and which the parameter type. :| There's only one F# book out there yet, and all the reviews I've read of it say that it sucks too. Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us! ;)
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Josh Smith wrote:
Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us!
Oh come now. They do this with actual products, why not continue the trend with experimental ones? Besides, it's written by a bunch of geeks. Do you think geeks document? Marc
-
Josh Smith wrote:
Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us!
Oh come now. They do this with actual products, why not continue the trend with experimental ones? Besides, it's written by a bunch of geeks. Do you think geeks document? Marc
Marc Clifton wrote:
Besides, it's written by a bunch of geeks. Do you think geeks document?
Point well taken!
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
-
Required base compsci MS would go out of business. If I had a dollar for all the times I had to explain basic data structures and algorithms ...
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest HemingwayEnnis Ray Lynch, Jr. wrote:
If I had a dollar for all the times I had to explain basic data structures and algorithms ...
You'd be a CompSci professor?
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
-
I've been spending some of my free time trying to learn about F# because it seems really interesting. The problem is, the existing F# tutorials SUCK. I think that the language tutorials provided by Microsoft were written by brainiacs in the Microsoft Research group, so it's not really helpful at all. For example, I read that this:
int -> int
...represents a function which takes and int and returns an int. The problem is, the author failed to mention which "int" represents the return type and which the parameter type. :| There's only one F# book out there yet, and all the reviews I've read of it say that it sucks too. Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us! ;)
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Like others have mentioned, the documentation should state this. That said, mathematics contributes to it being this way, the doc writers must have assumed a mathematics background. C# 3 has something like this with lambdas:
var square = int i => i*i; // takes an int i, returns i * i
As a side note, I know some folks have played with WPF and F# together. A quick search reveals a few hits: XAML or F#[^]? F# meets 3d[^].Tech, life, family, faith: Give me a visit. I'm currently blogging about: No, Not I - A poem by Holocaust escapee, chief rabbi, and Messiah-follower Daniel Zion The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Like others have mentioned, the documentation should state this. That said, mathematics contributes to it being this way, the doc writers must have assumed a mathematics background. C# 3 has something like this with lambdas:
var square = int i => i*i; // takes an int i, returns i * i
As a side note, I know some folks have played with WPF and F# together. A quick search reveals a few hits: XAML or F#[^]? F# meets 3d[^].Tech, life, family, faith: Give me a visit. I'm currently blogging about: No, Not I - A poem by Holocaust escapee, chief rabbi, and Messiah-follower Daniel Zion The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Judah Himango wrote:
int i => i*i
To me that is just syntactic sugar for anonymous delegates.
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach." -
Like others have mentioned, the documentation should state this. That said, mathematics contributes to it being this way, the doc writers must have assumed a mathematics background. C# 3 has something like this with lambdas:
var square = int i => i*i; // takes an int i, returns i * i
As a side note, I know some folks have played with WPF and F# together. A quick search reveals a few hits: XAML or F#[^]? F# meets 3d[^].Tech, life, family, faith: Give me a visit. I'm currently blogging about: No, Not I - A poem by Holocaust escapee, chief rabbi, and Messiah-follower Daniel Zion The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Judah Himango wrote:
As a side note, I know some folks have played with WPF and F# together.
Yeah, I've already seen that crazy stuff. :cool:
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
-
Ennis Ray Lynch, Jr. wrote:
If I had a dollar for all the times I had to explain basic data structures and algorithms ...
You'd be a CompSci professor?
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
-
I've been spending some of my free time trying to learn about F# because it seems really interesting. The problem is, the existing F# tutorials SUCK. I think that the language tutorials provided by Microsoft were written by brainiacs in the Microsoft Research group, so it's not really helpful at all. For example, I read that this:
int -> int
...represents a function which takes and int and returns an int. The problem is, the author failed to mention which "int" represents the return type and which the parameter type. :| There's only one F# book out there yet, and all the reviews I've read of it say that it sucks too. Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us! ;)
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Josh Smith wrote:
The problem is, the existing F# tutorials SUCK.
Let's ask Chris to change that Java section of CodeProject into a F# section... :)
Hope is the negation of reality - Raistlin Majere
-
Josh Smith wrote:
The problem is, the existing F# tutorials SUCK.
Let's ask Chris to change that Java section of CodeProject into a F# section... :)
Hope is the negation of reality - Raistlin Majere
Fernando A. Gomez F. wrote:
Let's ask Chris to change that Java section of CodeProject into a F# section...
Yeah, then it might actually be used!
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
-
Ennis Ray Lynch, Jr. wrote:
If I had a dollar for all the times I had to explain basic data structures and algorithms ...
You'd be a CompSci professor?
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Seriously though, a lot of the code I end up fixing would never had been authored if the original author had a foundation in computer science. I try not to be pedantic and ignore it most of the time but sometimes they are so bad that something must be said for the greater good. My most insane political belief is that social problems can be solved with good education. It equates well to any field.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway -
peterchen wrote:
from -< to
Haha. Stop screwing with my brain! ;P
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Sorry, this was an honest typo (but a good one! :cool: ) It was supposed to be from -> to, as in mathematical notation, e.g. f: N2 -> N would be equivaluent to C monkeys int f(int x, int y)
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
My first real C# project | Linkify!|FoldWithUs! | sighist -
Sorry, this was an honest typo (but a good one! :cool: ) It was supposed to be from -> to, as in mathematical notation, e.g. f: N2 -> N would be equivaluent to C monkeys int f(int x, int y)
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
My first real C# project | Linkify!|FoldWithUs! | sighistpeterchen wrote:
Sorry, this was an honest typo (but a good one! :cool: )
Ok, I understand. Thanks for the advice!
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
-
I've been spending some of my free time trying to learn about F# because it seems really interesting. The problem is, the existing F# tutorials SUCK. I think that the language tutorials provided by Microsoft were written by brainiacs in the Microsoft Research group, so it's not really helpful at all. For example, I read that this:
int -> int
...represents a function which takes and int and returns an int. The problem is, the author failed to mention which "int" represents the return type and which the parameter type. :| There's only one F# book out there yet, and all the reviews I've read of it say that it sucks too. Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us! ;)
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Hi Josh, First of all, I should mention that I started learning F# more than a year ago and I'm using it a lot (so I'm very glad to hear that it will get more support from Developer Division). Regarding the books, I have seen both of them. "Foundations of F#" by Robert Pickering and I think it is a great book that I would recommend to anyone with C# backround. There is also second book "Expert F#" by Don Syme and others, which explains more details and uses the new F# syntax, so if you want to become F# expert, you'll need this one (too) :-). I agree that there are only a few resources about F#, but I hope that it will get better. As someone already mentioned, you can read an introduction to OCaml language, because F# is largely based on this language. Anyway, I started writing a tutorial about F# some time ago (though it is quite short and covers many things, so it may not be appropriate for a complete beginner in the field). It is almost done :-), but I still have a few remaining parts to finish, but if you (or anyone else) wanted to read at the unfinished version, send me a private message. I hope to publish it on my blog in a next few days. BTW: I'd be glad to post it to the F# section at CodeProject once Chris creates this section :rolleyes:
Homepage: TomasP.net | Photo of the month: Calendar | C# and LINQ, F#, Phalanger: My Blog
Latest article: Phalanger, PHP for .NET: Introduction for .NET developers -
leppie wrote:
It's called common sense, aka from 'int' -> (to) 'int'
You call that common sense? I call that conditioning. Every language I've ever worked with before, all of which are C-based, put the return type on the left side.
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
Actually, languages like ML (which F# is based on), Haskell, etc all do the same sort of thing. It's very math-oriented.
-
I've been spending some of my free time trying to learn about F# because it seems really interesting. The problem is, the existing F# tutorials SUCK. I think that the language tutorials provided by Microsoft were written by brainiacs in the Microsoft Research group, so it's not really helpful at all. For example, I read that this:
int -> int
...represents a function which takes and int and returns an int. The problem is, the author failed to mention which "int" represents the return type and which the parameter type. :| There's only one F# book out there yet, and all the reviews I've read of it say that it sucks too. Come on MS, if you're gonna publicly announce[^] that F# is on the rise, at least give us some good introductory material first!! Don't make it so f#ckin hard for us! ;)
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.
-
Blanking out one letter of the F-bomb does not make it kid-sister-friendly. Please clean up your language.
bscaer wrote:
Please clean up your language.
:zzz:
:josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.