by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:41
    KevinRansom commented #9348
  • 20:26

    KevinRansom on master

    Update buildy wuildy (#9389) *… (compare)

  • 20:26
    KevinRansom closed #9389
  • 20:26

    KevinRansom on master

    moved fsharpqa/Libraries/Core/E… (compare)

  • 20:26
    KevinRansom closed #9388
  • 20:24
    TIHan closed #7243
  • 20:24
    TIHan commented #7243
  • 20:22

    TIHan on master

    Wrap prefix operator expression… (compare)

  • 20:22
    TIHan closed #9374
  • 20:09
    KevinRansom closed #9314
  • 19:48
    abelbraaksma edited #9390
  • 19:47

    TIHan on master

    Refactor async.fs. (#9341) * R… (compare)

  • 19:47
    TIHan closed #9341
  • 19:31
    KevinRansom review_requested #9374
  • 19:24

    brettfo on fsharp5-ca4f8775-20b6-4a3e-aa91-d0908e50ad91

    (compare)

  • 19:24
    brettfo closed #9315
  • 19:24

    cartermp on master

    Fix arcade (#9381) * fix loade… (compare)

  • 19:24
    cartermp closed #9381
  • 19:24
    dotnet-maestro[bot] commented #9315
  • 19:21
    cartermp commented #9387
Ze-Marcos
@MarkSchemmer
I'm part of codewars.com
also I have a question on why I can't run Unit tests in visual studio 2017 for F#
I have been trying for the last 3 days and I have not found a solution yet
Robin Munn
@rmunn
@MarkSchemmer - What unit test framework are you using? Nunit? Xunit? Expecto? Something else? Also, which version of the F# tools for VS 2017 are you running? I don't use Visual Studio myself so I can't help you with specifics, but I do know they had serious problems at first release (the VS 2017 build that became final had messed up on which version of the tools it included), and https://blogs.msdn.microsoft.com/dotnet/2017/03/14/announcing-nightly-releases-for-the-visual-f-tools/ strongly recommended running the nightly build. I don't know if that's still the case, but that might help. Finally, what precisely happens when you try to run unit tests? Do you get an error message, and if so, what is it? I think you'll need to provide more details of the problem before anyone will be able to help you. (And as I said, I don't use VS 2017 so the person who does end up helping you won't be me. But I can get the ball rolling by mentioning what other details you might need to provide.)
Patrick Loyd
@pnloyd
Is something like this possible?
type IInterface<'T when 'T :> IInterface<'T>> =
  abstract member Property : ICollection<IInterface<'T>>

type Implementor() =
  interface IPositioned<Implementor> with
    member Property = List<Implementor>() :> ICollection<IPositioned<Drop>>
Ignore that code..
type IInterface<'T when 'T :> IInterface<'T>> =
  abstract member Property : ICollection<IInterface<'T>>

type Implementor() =
  interface IInterface<Implementor> with
    member Property = List<Implementor>() :> ICollection<IInterface<Drop>>
Patrick Loyd
@pnloyd
I figured out my own question.
Eivind
@NonDesistas
hey. I'm kind of new to C# and need some help. How do I add a click event to an array of buttons?
Johan Larsson
@JohanLarsson
This is not the right chat for that question, try: https://chat.stackoverflow.com/rooms/18165/wpf
robertj
@robkuz

Is there a reason why it is not possible to implement generic methods on a interface implementation?

type IMap =
     abstract member Map: 'a -> 'b

type MapIntString() =
    interface IMap with
    member this.Map(x:int): string = sprintf "%i" x

type MapStringToInt() =
    interface IMap with 
    member this.Map(x:string): int = 0

I know I can

type IMap<'a, 'b> =
     abstract member Map: 'a -> 'b

type MapIntString() =
    interface IMap<int, string> with
    member this.Map x = sprintf "%i" x

type MapStringToInt() =
    interface Map<string, int> with
    member this.Map (x:string): int = 0

But that is not always possible or leads enormous amounts of code.
for example

type MapFoo(f: 'a -> 'b) =
    interface Map with
    member this.Map (x:Foo<'a>): Foo<'b> = 
       let (Foo a) = x
       Foo (f a)
robertj
@robkuz

In the above example at the moment I would have to create a specialized impl for any combination of 'a and 'b of Foo<_> whereas with an implementation like MapFoo I just need the functions that do the conversion and give one of these functions during construction time
So my question is: are there any hard technical limitations (CLR/.NET) or type theory or type inferrence that prevents this? And if so why is it even possible to define the interface like

type IMap =
     abstract member Map: 'a -> 'b

Why not have a compiler error when trying to define a generic abstract method that uses generic types that are not defined on the type itself?

Yemi Bedu @ P&R
@pr-yemibedu
@robkuz https://stackoverflow.com/questions/8115470/creating-and-using-a-generic-function-in-a-non-generic-f-interface and http://codebetter.com/matthewpodwysocki/2009/05/08/type-classes-are-the-secret-sauce/ F# does not have type classes. So you can not have a generic Add interface that both Number and String implementations source from. I am not sure why it compiles the interface itself as it always needs an obj that you can not cast to (like int).
Victor Peter Rouven Müller
@realvictorprm
Shouldn't traits be able to fix this in future
Onur Gumus
@OnurGumus
As an idea, don't you think it would have been better if akka.net used rx.net schedulers
This way we could have completed control over time.
Onur Gumus
@OnurGumus
Wrong channel
Robert Maxton
@robertmaxton42
Hey guys! I'm an F# newbie playing around in Visual Studio Code
Is this the right place?
Avi Avni
@AviAvni
Join fsharp software foundation slack
@robertmaxton42 ^
Robert Maxton
@robertmaxton42
@AviAvni Er.... how? Never used Slack before, sorry
Avi Avni
@AviAvni
@robertmaxton42 start http://foundation.fsharp.org/join
Robert Maxton
@robertmaxton42
@AviAvni Thanks!
Yemi Bedu @ P&R
@pr-yemibedu
@robertmaxton42 you can look here too if slack is overwhelming. ionide-project channel may come in handy if you have issues with their extension for vscode.
ShalokShalom
@ShalokShalom
You can also look in the Fable channel here, if the question relates to it
td-ideabox
@td-ideabox
Sorry if this is super obvious but how do I create a cli executable from an F# solution/project? Like I have source that builds in Rider, but the bin directory doesn't have anything that looks like something I could execute with ./myscript
I see a dll and pdb file and stuff
Victor Peter Rouven Müller
@realvictorprm
Are you in Unix?
td-ideabox
@td-ideabox
Yeah OSX
Victor Peter Rouven Müller
@realvictorprm
You must use .net core or mono to run an exe file
td-ideabox
@td-ideabox
k, so I used msbuild myscript.sln and it seemed to do a thing, what do I do after that?
Victor Peter Rouven Müller
@realvictorprm
E.g. for mono you simply type mono myapp.exe
td-ideabox
@td-ideabox
mono <something> ?
K, I don't see a .exe anywhere,
Victor Peter Rouven Müller
@realvictorprm
Is this a project generating a library?
td-ideabox
@td-ideabox
There is definitely a .dll generated
So I'm guessing I need to change a build setting or something?
Also thanks for your time!
Victor Peter Rouven Müller
@realvictorprm
Looks like. Sure no problem
td-ideabox
@td-ideabox
K, I'm working in Rider. Couldn't get things to play nice in Ionide.
I chose a Console Application
Victor Peter Rouven Müller
@realvictorprm
Console Application should work out
Alternatively you can try running the all although I'm a bit confused at this point :smile:
*dll=all
td-ideabox
@td-ideabox
So give mono <something>.dll a shot, k
Hmm, didn't do anything.
Victor Peter Rouven Müller
@realvictorprm
:confused: darn
I'm not familiar with Rider
Alternatively ask on the fsharp forums or in the Fsharp slack :smiley:
td-ideabox
@td-ideabox
Hah! so looking at the Rider output running a build, the command to get things happening is dotnet something.dll