Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:04

    dotnet-bot on main-to-release

    (compare)

  • 06:04

    dotnet-bot on main-to-release

    (compare)

  • 06:04

    dotnet-bot on release

    (compare)

  • 06:04

    dotnet-bot on release

    (compare)

  • 06:04

    dotnet-bot on dev16.0-to-main

    (compare)

  • 06:04

    dotnet-bot on dev16.0-to-main

    (compare)

  • 04:32
    TysonMN commented #7775
  • 04:13
    KevinRansom synchronize #10569
  • 03:59
    KevinRansom review_requested #10569
  • 03:59
    KevinRansom opened #10569
  • 03:04

    dotnet-bot on main-to-release

    (compare)

  • 03:04

    dotnet-bot on main-to-release

    (compare)

  • 03:04

    dotnet-bot on release

    (compare)

  • 03:04

    dotnet-bot on release

    (compare)

  • 03:04

    dotnet-bot on dev16.0-to-main

    (compare)

  • 03:04

    dotnet-bot on dev16.0-to-main

    (compare)

  • 02:41
    TysonMN commented #7775
  • 01:29

    cartermp on dev16.9

    Add field names to ILNativeType… Merge pull request #10568 from … (compare)

  • 01:29
    cartermp closed #10568
  • 00:05
    dotnet-bot labeled #10568
Patrick Loyd
@pnloyd
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
And it works!
Thanks for rubberducking for me @realvictorprm !
Victor Peter Rouven Müller
@realvictorprm
Ah dotnet ja tue command kg used with .Met Code
Sorry german keyboard lol
No problem, I'm glad it works now for you :+1: