8 ms·
Contributing to the F# Language, Library and Tools
- mands 13y agoPretty great news to complement the open-sourcing of Roslyn I think - was hoping to hear something about F# at Build.
- srean 13y agoI am waiting for the runtime to be opened up. Although I know that is unlikely to happen. Opening up C# and F# are indeed interesting, but as far as engineering is concerned the real heavy lifting is done in the runtime. Unfortunately, as a Linux user the mono runtime has left me with a bad aftertaste. It is perhaps ok for C#, perhaps ok for use with unity, but for functional code that depends so heavily on proper handling of tail calls, mono is (well at least was) a mess and unstable. Further, developers in charge refused to concede that buggy/incorrect tail call behavior was a problem (why dont you just right loops). If anyone can report that this has changed I would be happy to give it another shot. I wont be able to thank all of you with a comment, but will certainly upvote.
- bad_user 13y agoThe latest Mono should be much better for handling F#, as it received some love from Xamarin, as they started promoting it. You can't blame Mono for not running F# well, when .NET itself had and probably still has its own share of problems: http://blogs.msdn.com/b/clrcodegeneration/archive/2009/05/11/tail-call-improvements-in-net-framework-4.aspx http://blogs.msdn.com/b/clrcodegeneration/archive/2009/05/11...
- enricosada 13y agomono team is really fast to address problem found by fsharp on runtime/msbuild/corelib/etc. Xamarin sponsor one dev fulltime (@7sharp9) to work on F# (see activity on github, is not only about Xamarin projects). This link on .NET is really old (2009)
- sixbrx 13y agoI agree that even the CLR itself needs improvements for functional programming. Besides the tail calls link you gave, there is also (according to MS) inability to implement type classes because of CLR changes that would be necessary: https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2228766-add-higher-order-generics-to-f-type-classes https://visualstudio.uservoice.com/forums/121579-visual-stud... I think F# would benefit a lot from either ML's module system or at least type classes as a simpler case. As it is it can only (directly) do single virtual dispatch (mainstream OO dispatch), which is pretty limiting and makes it more of a C# with different syntax.
- profquail 13y agoF# could potentially get a module system in the future (a la OCaml or SML). I've put together some proof-of-concept code to show how modules could be implemented on top of the existing .NET type system, so at this point it's just a matter of refining that representation and then implementing that in the language/compiler.
- Hakeashar 13y agoI'd love to see some kind of typeclass support in F#... In the meantime, honest question: what are modules in OCaml? I tried to read up on it online, but my understanding of the topic is still murky. Regular modules don't really seem that interesting (they look like modules and/or types/classes in F#), parametrized modules seem to be something that is missing in F#. Second question, do you have that proof of concept code laying somewhere around? I'm just curious how it would look in F#...
- profquail 13y agoYes, F# is missing parameterized modules ("functors"); these are simply modules which are parameterized by other modules in the same way .NET generics (for example) allow you to parameterize one type by another type. The reason this would be nice to have in F# is that, while the CLR's generics are excellent in general, there are some things that can't be expressed using the CLR's type constraints. Supporting functors in F# would provide a nice way to work around this and allow you to write code which is more generic. Here's my proof-of-concept code. I'll warn you now though -- it looks quite messy, because the goal was to show that functors could be supported on top of the existing .NET type system. If functors are ever added to the F# language, the syntax will be much, much cleaner. https://github.com/jack-pappas/experimental-functors https://github.com/jack-pappas/experimental-functors
- mands 13y agoTrue, a lot of the heavy lifting is done within the runtime. However Mono has been improving at a break-neck pace over the past few years - Mono 3.x with the new garbage-collector and LLVM backend can be quite efficient. Furthermore F# is bundled with Mono nowadays so hopefully they are aware of/fixing any issues with functional-style code, e.g. tail-calls. I used Mono and F# for a project earlier this year and had no particular performance or behaviour issues, although my work was not generally performance-sensitive.
- rjzzleep 13y agocan someone explain this to me? i thought f# was open source for years? isn't that how most people compile it on their machines? is it just that people don't know that half the things that were open sourced have already been open sourced(like the asp.net stuff) or do we just copy and paste microsoft press releases here? OR am i missing something crucial that someone can elaborate on please? https://github.com/fsharp/fsharp/ https://github.com/fsharp/fsharp/ EDIT2: thanks to the responses, it's about accepting contributions EDIT: for those that don't know the asp.net developments had a lot of influence from the alt.net movements. it was ms' attempt to keep the c# web developers from moving to other frameworks that let you do similar things much easier.
- bad_user 13y agoF# has been licensed under an open-source license for some time, but in Microsoft fashion, they weren't accepting contributions from third-parties, so the repository was read-only.
- darklajid 13y ago"but in Microsoft fashion" ... Show me where I can directly contribute to random Apple products or where I'd send my upstream Android improvements. Worse, the Linux kernel is open source, but getting my own changes into the main distribution is probably taking some work and the chance that they won't be accepted is rather good. No offense, but I'm really unhappy about the continued MS bashing. Yes, right now (due to the BUILD conference) there are a good number of Microsoft related posts on this site. Yes, Microsoft wasn't the corporate citizen most of us wanted them to be in the past. But these news are _nice_ and the slights are really misplaced.
- wcarss 13y agoIt would be difficult to submit a patch to the Linux kernel, yes. Especially as an outsider with no history with the project. But people do submit them. Because that is how open source projects operate. As for apple: bugzilla.webkit.org and llvm.org/bugs - you have to invest real time in these before you can submit patches, but they take take them. 'In Microsoft Fashion' here may be more mean than it needs to be, but I do not think it refers to a general greed or selfishness or what-have-you. It sounds to me like it refers specifically to the sort of open source that major Microsoft products had previously been released under, and that was it. Any hating ascribed to the statement is interpretation. I agree about Android. I wish it were actually open source -- maybe someday. :)
- skywhopper 13y agoIt sure feels like there's a strong force within the MS dev tools team to be far more open, and the only thing holding them back was the CEO. I sincerely hope Microsoft continues to open more and more products and truly integrate the open source philosophy into their culture.
- Already__Taken 13y agoI don't have the greatest grasp of licences but once they go open and take pull requests they can't go back can they? Are they even allowed? It would mean binning the project and starting from scratch privately right? At the risk of being accused of stealing the open contributed code.
- eitland 13y agoShort answer: Depends on copyright assignments or not. (I'm very sure however that they have this worked out. )
- lucian1900 13y agoEverything else they've released has been Apache2, so assuming that, they could decide stop releasing new versions of it. They couldn't "take back" the versions already released, though.
- skywhopper 13y agoMy understanding is that the copyright owner may do whatever they please, including selling modified versions with their own custom proprietary changes, or maintaining multiple versions under differing licenses. However, it's true that once they've released the code under an open license, anyone who has saved a copy of the code may release their own forked version in the future, regardless of what the copyright owner does with their version, so long as the forker continues to follow the terms of that license for the code still under copyright of the original owner. New code under the forker's copyright may be released under other licenses if the forker chooses, etc, etc.
- bunderbunder 13y ago
- untothebreach 13y agoCan someone give reasons why you would want to use this over, say, OCaml, when on a non-MS platform? My understanding is that the Mono runtime on *nix is significantly less {mature,performant,stable} that the Windows .Net runtime. Are there any benefits besides the obvious 'write-once, run-anywhere' one? EDIT: I just want to be clear that I don't have any negative opinion of F#, I am genuinely curious why someone would want to use this on a platform that is not Windows.
- jnazario 13y agoi used a lot of F# in the past year for one big reason - access to the dotNet platform. similar to how scala gives you access to the JVM and the massive number of java libraries out there, F# gives you access to a wide and growing body of dotNet tools and libraries out there. in my investigations i found that while the dotNet ecosystem for what i want is smaller than java's it's larger than the OCaml one.
- mtct 13y agoNo, you probably don't want to use F# if you can't use the .NET framework.
- untothebreach 13y agodo you mean the runtime, rather than the framework? my limited understanding of Mono is that it will _run_ most .Net libraries, albeit not as fast.
- enricosada 13y ago.NET framework is: + runtime + core = standard library, io/string/async/thread/etc/linq. + some bundled stack, like wcf for create service, wpf for ui, mef for plugin, xml serialization, json serialization, asp.net webforms, etc. Mono try to reimplement all. Runtime and standard library work very well on mono. bundled stacks can work, work partially or not implemented, depends (on contribution, check mono website). Some stack are really old way to do things, deprecated, usefull only on windows. Also Microsoft for new stacks (like asp.net MVC) try to open source, so mono need to compile source and fix bug/different behaviour, not rewrite If you use a library who depends on a bundled stack, can or cannot work on mono. Library who depends on open source or standard lib, should work
- Flenser 13y agoNow that they're dogfooding codeplex for such high profile projects I hope we'll see some improvements to it. [edit] I suppose if I'm complaining I ought to make some constructive suggestions: * central page listing my subscribed/voted issues/discussions. * The only history link on a projects homepage is for the wiki. It should have a prominent link to the latest changeset with a date or age. * Project wide search: issues, code, wiki, discussions * In fact, remove discussions completely, everything should be an issue.
- hkphooey 13y agoI like the look of Codeplex, very clean design, feels more 'professional' than Github.
- rch 13y agoI haven't looked closely -- my assumption is that despite this string of announcements we are not really any closer to simply running pkg_add or apt-get to install a real MS development environment (i.e. not Mono). I could be wrong though, of course.
- cjbarber 13y agoIf anyone on HN works in F#.. then you should definitely check out Tachyus.com A few of the top contributing F# devs are there, it's an amazing company. Investors include Joe Lonsdale (founder of Palantir). They are helping oil companies optimize oil and gas production - not your average startup problem.