Live data from Hacker News

F# Not just for finance

fsharp.tv

111–120 of 138 posts

Re: F# Not just for finance

#111
post #106
post #99

Earlier quoted context omitted.

> What languages and platform are you using? C# for the core app, C# and F# for satellite services. Not sure on what you're asking re: platform. If you mean hosting? Then we roll our own servers in tier 4 data-centres. If you mean OS/framework: Windows Server/.NET

Thanks for the information. Any mobile dev with F#, or is it all desk-based?

All our mobile stuff is thin web-layers that consume our core APIs, so it's all js. I started looking at WebSharper and FunScript for a more strongly-typed and robust web-development experience, but they're all a bit too 'awkward'.

I keep meaning to look into Elm as it appears to be a more thoughtful approach to functional programming on the client.

Re: F# Not just for finance

#112
post #86

Is porting OCaml code to F# on Unix straight forward? Is there something similar to the Opam package manager in F#? Thanks for your thoughts.

F# is similar but if you're using features like polymorphic variants, functors, or first class modules, it might take more effort. In terms of package management, I'd check out paket. It wraps up the otherwise very quirky nuget system that .Net uses and also supports things like source dependencies.

Re: F# Not just for finance

#113
post #108

Earlier quoted context omitted.

> "I haven't mentioned or was making any points about F# or C#; I was commenting on what appears to be your definition of a functional language" sremani != ZenoArrow (though if you read this sremani, thank you for attempting to clarify). There are many 'multi-paradigm' languages, and C# is one of them. From the C# Wikipedia page... https://en.wikipedia.org/wiki/C_Sharp_(programming_language) "C# (pronounced as see sh…

> sremani != ZenoArrow Apologies, my mistake. > Hope that clears it up. First paragraph on the Wikipedia page for Functional Programming [1]: "In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative program…

With your definition, is Lisp a functional language? Is it expression-oriented or statement-oriented?

Re: F# Not just for finance

#114
post #71

Earlier quoted context omitted.

This is a really great case study, but I can't help but think some of the improvement comes from it being the second attempt at the project. I'd really like to see some case studies going the other way: F# --> C# [or C++]. At the least, you could do C# --> C# [ie complete rewrite]. Any time you do a rewrite with more knowledge of what worked and what didn't, you'll have a better system. So ultimately, the essay [like…

From all I gathered about people that story was related to, it seems the F# project was done without looking at the C# implementation, on basis of same specifications. If you were tasked to implement a project because first implementation failed, would you even read the first implementation or just base your work on the specification?

Oh good point -- it does say they were separate teams.

Should one read previous implementation? That's a difficult question. If you're worried about losing your perspective from seeing a single solution, then perhaps you're right that you shouldn't.

But it's possible that merely implementing it in a different [more functional] language would encourage sufficiently different patterns to allow you to keep perspective.

With all of this said, I am a huge fan of both C++ and Haskell. I had just had an internal realization that these stories might not be extracting the positive effect that a rewrite might have on a code base [even though, as you say, that is likely not relevant here].

Re: F# Not just for finance

#115

Earlier quoted context omitted.

As far as I'm aware, the most popular F# tools for writing code are (from most to least popular): Visual Studio, Ionide (either using Atom or VS Code) and Emacs. I haven't seen that many people coding in F# using anything else, but I'm sure you'd find a few people using the usual suspects (Vim, Sublime Text, etc...).

Xamarin Studio 6 has gotten a lot of F# support. I've seen a lot of folks using that for coding in F#.

+1 for Xamarin Studio. That's what we're using for F# / iOS / Android.

Re: F# Not just for finance

#116
post #85

Earlier quoted context omitted.

I only know Go well enough to comment on his comments, but he did not do a good job testing and reporting on it in his posts, ignoring basic recommendations about safety taught to all beginners. (Ignores err responses from functions and then later complains that things fail later, most particularly). I would be cautious about drawing too many conclusions about languages he didn't end up picking; clearly he knows OCam…

You should read the first two blog posts in detail. He didn't knew OCaml at all at the time, and answers your remark about Go directly in the second post.

I did read those. I think it comes down to speed on boot, which seems like a legit concern, and a matter of taste. To wit:

Should os.Getenv return an empty string or an error if the environment variable is not set? -- The answer to this depends on how unix-y you are, I suspect. We might disagree, but it's not wrong to say that you're going to do what bash does, which is, after all the fundamental place these are kept, and return an empty string. In particular, this is well documented in the API, regardless.

If I create an empty list, then marshal some uninspected text into it, and that marshal function fails but I don't check its error status, should my list be poisoned, or should it continue on as empty? -- The idiomatic answer to this is that you should check error status and remediate.

He would prefer that the program vomit when marshaling fails. Fine, but it was entirely his choice to code in this style, against go style guides. To then claim the compiler is 'unhelpful' later when he tries to read the list he declared is empty is blame shifting in my opinion.

I would guess he does not prefer in-line error checking and remediation as a pattern; that's totally fine, but it's annoying to read snark about it.

Re: F# Not just for finance

#117
post #82

Earlier quoted context omitted.

Functional programming is a broad term that at its core describes languages that allow you to pass functions around as values to other functions. In other words, when using a function the parameters of that function can be defined as other functions instead of needing to be precalculated variables or constants. That's basically all that links functional programming languages, all other language design decisions can v…

Most OO languages can do this now, and they wouldn't be classed as functional languages. I know this is always a sticky subject, but for me I prefer to think of functional languages as 'expression oriented' rather than 'statement oriented'.

I'm not an expert on this subject (have only dabbled in a few FP languages over the years), but what I've read in various sources leads me to think that the term "functional programming" itself is not very well-defined, or, to put it another way, different people may have different definitions of it, each including and excluding various language features or capabilities. Is that right? Any experts care to comment?

Re: F# Not just for finance

#118
post #95

Earlier quoted context omitted.

I haven't mentioned or was making any points about F# or C#; I was commenting on what appears to be your definition of a functional language, that is "Functional programming is a broad term that at its core describes languages that allow you to pass functions around as values to other functions". Even if that meant something in the past, it really isn't a useful definition any more, because pretty much all languages…

Pure functions, i.e. that are 1) idempotent 2) have all their arguments passed in 3) cause no side effects as a by product of evaluating the function are fundamental to functional programming.

Are there any terms/concepts in math/CS that are related to or similar to "idempotence"?

Re: F# Not just for finance

#119
post #65

Earlier quoted context omitted.

As far as I'm aware, the most popular F# tools for writing code are (from most to least popular): Visual Studio, Ionide (either using Atom or VS Code) and Emacs. I haven't seen that many people coding in F# using anything else, but I'm sure you'd find a few people using the usual suspects (Vim, Sublime Text, etc...).

I use vim, but the lack of autoindent support is a bit of a pain. I've been meaning to check out spacemacs and see if it does any better there. also I'm just learning f# and I've started a small project to capture the paket and forge commands needed to get up and running: https://github.com/martindemello/fsharp-quickstart

Last I tried there were a couple of issues with autoindentation with the fsharp plugin for emacs, but they're well aware of the issue and have been working on it last I checked.

Re: F# Not just for finance

#120
post #118

Earlier quoted context omitted.

Pure functions, i.e. that are 1) idempotent 2) have all their arguments passed in 3) cause no side effects as a by product of evaluating the function are fundamental to functional programming.

Are there any terms/concepts in math/CS that are related to or similar to "idempotence"?

I think in this case, referential transparency means the same thing. That is, produce the same output given the same input, every time.
Post reply on HN