Live data from Hacker News

Fable 3: F# to JavaScript compiler

fable.io

91–100 of 131 posts

Re: Fable 3: F# to JavaScript compiler

#91
post #88
post #68

Earlier quoted context omitted.

MS is making a conscious effort to push into the ML space with libraries such as ML.NET https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotn... . IMO, the combination of a strongly-typed language with features such as type inference, data providers and discriminated unions/pattern matching make F# a perfect fit for this space. It's just unfortunate that they had to go through the .NET Framework -> .NET Core j…

On the other hand, they just hired Guido, have first class support for Python across VS and VSCode, and are in the process of creating a Python projection for UWP (which still doesn't support F#). From the outside it always looks like an uphill battle for F#. It would be great if F# finally gets its place across the .NET stack.

Odd. I've been using F# for a UWP app since 2018.

Re: Fable 3: F# to JavaScript compiler

#92
post #84

Earlier quoted context omitted.

Please can you sure more about this? > We also make ample use of quotations to do some cool tricks (like predict the future states some type can take, based on current state + available transitions).

Here's is a simplistic example of a state machine: let transition (state: State) (action: Action) : State option = match (state, action) with | (StateA, ActionA) -> Some StateB | (StateA, ActionB) -> Some StateC | (StateB, ActionA) -> Some StateB | _ -> None If you get the quoted representation of the transition function, it can be visualized as a tree data structure (like code-as-data in LISP). You can analyze that…

Do you blog any of this or do any sort of writing on the topic. I think I could learn a lot from the way you are doing things.

Re: Fable 3: F# to JavaScript compiler

#93
post #91
post #88

Earlier quoted context omitted.

On the other hand, they just hired Guido, have first class support for Python across VS and VSCode, and are in the process of creating a Python projection for UWP (which still doesn't support F#). From the outside it always looks like an uphill battle for F#. It would be great if F# finally gets its place across the .NET stack.

Odd. I've been using F# for a UWP app since 2018.

Odd indeed, given that .NET Native doesn't support it without a couple of hacks.

https://github.com/dotnet/corert/issues/5780

https://github.com/dotnet/fsharp/issues/1096

Re: Fable 3: F# to JavaScript compiler

#94
post #8

Is concurrency supported?

Yes - F# provides its own async model via an `async` computation expression. But you can also use the TPL in .NET BCL. F# 6 will have native support for TPL via a `task` computation expression.

But honestly, its own async model is great - arguably better than TPL for business systems. It sacrifices a little top-end performance/power and in return you get a supremely clean abstraction.

Re: Fable 3: F# to JavaScript compiler

#95
We’ve started adopting ReasonML on the server side (using nodejs as the end runtime). Anybody have ides on why ReScript/ReasonML on the server side isn’t more popular or targeted? Initially I considered F# and Fable but decided I wanted to adopt the same stack for the client side as well.

Re: Fable 3: F# to JavaScript compiler

#96
post #93
post #91

Earlier quoted context omitted.

Odd. I've been using F# for a UWP app since 2018.

Odd indeed, given that .NET Native doesn't support it without a couple of hacks. https://github.com/dotnet/corert/issues/5780 https://github.com/dotnet/fsharp/issues/1096

As per those links - the workarounds found in 2018 allow you to submit to Windows Store.

But even still - my app is sideloaded and never needed to care about .NET Native at all.

Re: Fable 3: F# to JavaScript compiler

#97
post #96
post #93

Earlier quoted context omitted.

Odd indeed, given that .NET Native doesn't support it without a couple of hacks. https://github.com/dotnet/corert/issues/5780 https://github.com/dotnet/fsharp/issues/1096

As per those links - the workarounds found in 2018 allow you to submit to Windows Store. But even still - my app is sideloaded and never needed to care about .NET Native at all.

Workarounds are not official support and won't fly for many customers deciding what to place in production when picking technology stacks, so the choice ends up being C#, VB, C++, Rust, JavaScript and Python.

The official set of programming languages getting UWP support as part of Project Reunion.

Re: Fable 3: F# to JavaScript compiler

#98

I see some F# praising in here. any good learning resources one can recommend to me (Ik I can "google it" or whatever. I mean something you had experience with and would recommend)

Stylish F# is a good book to go with all of Scott’s works https://www.apress.com/gp/book/9781484239995

Re: Fable 3: F# to JavaScript compiler

#99
post #97
post #96

Earlier quoted context omitted.

As per those links - the workarounds found in 2018 allow you to submit to Windows Store. But even still - my app is sideloaded and never needed to care about .NET Native at all.

Workarounds are not official support and won't fly for many customers deciding what to place in production when picking technology stacks, so the choice ends up being C#, VB, C++, Rust, JavaScript and Python. The official set of programming languages getting UWP support as part of Project Reunion.

WinUI / Project Reunion is just a continuation of the UAP (Universal App Platform) libraries. The support for C# works for F# - just like basically any other C# library can be used from F#. I figure the reason they don't mention F# is because it is obvious and/or implied but perhaps at the same time don't want to infer there is some kind of F#/FP-style syntax.

I wouldn't confuse Project Reunion and the arbitrary Windows Store requirement that apps be compiled with .NET Native. A requirement that, frankly, is on borrowed time anyway and I can't envisage it surviving much longer. Once .NET 6 delivers Mono-style AOT support - .NET Native's sole remaining purpose will cease to exist. Not that modern hardware ever needed it. It was intended for Windows Phones.

If the choice facing us was a simple as you describe then, for example, we wouldn't have ended up building a UWP app in F# back in 2018, would we? Not everything is black and white nor zero sum.

Re: Fable 3: F# to JavaScript compiler

#100
post #77

Is there any note on if F# will gain concepts/type classes?

I don’t know, but I think this GitHub issue will probably give you the current status and background on this point https://github.com/fsharp/fslang-suggestions/issues/243

Update: the issue is tagged await-csharp-alignment, which is probably the relevant status.

Post reply on HN