Live data from Hacker News

Fable: F# to JavaScript compiler

fable.io

61–70 of 74 posts

Re: Fable: F# to JavaScript compiler

#61
post #60
post #4

Earlier quoted context omitted.

some people said in the Reason3 update article that F# is better suited for JS devs than OCaml.

Ocaml is the worst variant of ML in my opinion. Like usual, programmers always seem intent on making the worst option the biggest one (seriously, SML syntax is better than Ocaml syntax in almost every way).

> (seriously, SML syntax is better than Ocaml syntax in almost every way)

Except that for the most part, that's subjected, and even more importantly, there are plenty of reasons to prefer OCaml over SML even if you don't like the syntax.

Re: Fable: F# to JavaScript compiler

#62
post #38

Earlier quoted context omitted.

I have to agree, the pragmatic and thoughtful approach that the TS team has brought to the language makes it reasonable to write in and easy enough to reason about at any given time. Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed. Coming from a C# and Python fan, TS hits the mark pretty solidly o…

> Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed. This is an exact example of what GP was talking about with leaky abstractions though. You don't have to just learn TS to use TS, you need to learn TS and JS. IMO a proper, strict typed language; and plain Javascript; are both much better options t…

Well I'm perfectly fine with something what languages like C++ or Objective-C are to C since the whole C interface is still available. If I have a problem in the C layer I can touch that directly and fix it. But I don't think it's possible to mix F# and JS code in the same code file without doing really ugly stuff.

Re: Fable: F# to JavaScript compiler

#63
post #43

Earlier quoted context omitted.

UWP is the future of Windows APIs, in case you missed Windows Developer day earlier this month. So if F# doesn't speak UWP, the community keeps tweeting that GNU/Linux is so much better than Windows, and that we enterprise devs just don't get it, should we bet which of those technologies will last longer on MS roadmap?

My F# code runs on Linux. My client code is migrating to the web and mobile, as is just about every enterprise in the US. Why would I watch Windows developer day?

Because Microsoft is the one paying the salaries of F# developer team.

The F# comunity has become quite strange, always bashing the products of the company that actually develops their programming language.

Not a good way to keep them motivated into supporting F#.

Re: Fable: F# to JavaScript compiler

#64
post #41

Earlier quoted context omitted.

How things are going, I bet those dead-end technologies have a brighter future than F#, specially when I see those Microsoft bashing comments. If it comes to be, lets see how long F# survives without Microsoft support.

Microsoft bashing? Where did I do that? I run a few things on .NET Core today and it’s great. I’ll probably runs some things in Azure soon enough. I just think UWP has no future because its primary device type (Windows phone) is dead, and it hasn’t seen any uptake in the enterprise to replace Winforms and WPF. F# seems just fine to me, and it’s supported for my app type. Perhaps you need to rethink your choices in de…

I am speaking about the tone on F# tweets and on Github coments regarding Windows, UWP and .NET Native.

I did rethink my choices in technology, F# is not worth my time for production code anymore.

Re: Fable: F# to JavaScript compiler

#65

Why not show a code sample on the homepage? None of Home, Docs, or Samples have a single code snippet on the entire page, you have to click through. Crystal and Rust are good examples of language homepages that give you an idea of what you're getting into up front. Or for a transpiled language, PureScript.

You can see examples here: http://fable.io/repl

Re: Fable: F# to JavaScript compiler

#66
Can anyone point to a resource for learning F# from scratch?

I have tried a few tutorials but the syntax is so foreign to me that I've found it hard to grasp.

What would be awesome with a project like Fable would be to have a tutorial for existing JavaScript devs to learn F#. For example, have JavaScript and F# code side-by-side.

Re: Fable: F# to JavaScript compiler

#67
post #66

Can anyone point to a resource for learning F# from scratch? I have tried a few tutorials but the syntax is so foreign to me that I've found it hard to grasp. What would be awesome with a project like Fable would be to have a tutorial for existing JavaScript devs to learn F#. For example, have JavaScript and F# code side-by-side.

Try this course from FSharpTV: https://fsharp.tv/courses/fsharp-programming-intro/. They have a lot of other content too but this is the introductory course that's aimed towards beginners. It might be helpful.

And try the https://fsharpforfunandprofit.com/ site too.

Re: Fable: F# to JavaScript compiler

#68
post #60
post #4

Earlier quoted context omitted.

some people said in the Reason3 update article that F# is better suited for JS devs than OCaml.

Ocaml is the worst variant of ML in my opinion. Like usual, programmers always seem intent on making the worst option the biggest one (seriously, SML syntax is better than Ocaml syntax in almost every way).

The syntax might be better, but the "ML for the Working Programmer" book was the only place I actually saw some SML code being used.

Re: Fable: F# to JavaScript compiler

#69
post #63

Earlier quoted context omitted.

My F# code runs on Linux. My client code is migrating to the web and mobile, as is just about every enterprise in the US. Why would I watch Windows developer day?

Because Microsoft is the one paying the salaries of F# developer team. The F# comunity has become quite strange, always bashing the products of the company that actually develops their programming language. Not a good way to keep them motivated into supporting F#.

There are lot of scenario where F# can be used.

In some scenario support is more stable, other experimental, other are not supported. like every technology.

Because budget is not infinite, you need to prioritize.

Just to show you things happened MS tech related to F# and .NET in the last two years:

- .net core

- .net standard (is not the same as .net core)

- new project system for VS

- new .net sdk (that mean work to support these on VS)

- portable pdb

- F# 4.1

- temporary stuff like project.json, who added work and was replaced

- new .net templating

- F# in VS now use roslyn workspaces (yes, that's big)

- integration of VisualF# powertools in default VS extension

- f# bundled in .net sdk and compiler in .net core sdk

- F# on azure notebooks

- F# on azure functions

- VS 2017

- VS 2017 installer (yes, that was annoying)

And that list is just some of MS technologies, who VF# team need to support/adapt too.

NOTE the list doesnt contains things created from community itself, like Fable. and some of these were added by community

Yes, and there is too:

- UWP

- .NET Native

- Corert

but you need to prioritize and choose your (moving) targets.

So ihmo while UWP can be nice to have (ihmo), was put in a lower priority than the others.

When you choose there are lot of factors:

- time to implement

- unknown

- other things open in parallel scenarios

- support needed to complete/make it usable

Community help a lot the F# development, and also a lot the VS VF# extension, see the repo. Because F# has lot of OSS in the dna.

But that doesnt mean we cannot complain when things need improvements, in some important scenario.

And as a note, the MS VF# project manager was awarded the `F# community Hero award`, that mean the community like and support his work (the award is indipendent and run from community voting)

Re: Fable: F# to JavaScript compiler

#70
post #35

Why not show a code sample on the homepage? None of Home, Docs, or Samples have a single code snippet on the entire page, you have to click through. Crystal and Rust are good examples of language homepages that give you an idea of what you're getting into up front. Or for a transpiled language, PureScript.

you can go to the samples... but you will quickly notice a lot of the samples are canvas orineted things, because Fable gets to be in control to do things F# like. There's a vue and react example, but the code doesn't show any real advantage. Very little examples of typical web pages.... just a link to fable-elmish..... so... you may as well use elm. This is a common problem for F# in general, it hasn't really carved…

This is true we still need to work on promoting our documentation and samples.

We are a small team working on it, and we try to constantly improve it.

I will provide you some links here if you can find them useful:

- File explorer using electron: https://github.com/fable-compiler/samples-electron#samples

- Pixi.js samples (quite new we are working on them): https://github.com/fable-compiler/samples-pixi/

- Elmish central website: https://fable-elmish.github.io/

- Bulma wrapper for Elmish: https://mangelmaxime.github.io/Fulma/

- A demo of Fulma + Elmish

  - Live demo: https://mangelmaxime.github.io/fulma-demo/

  - Source code: https://github.com/MangelMaxime/fulma-demo
And also, a really cool place is Fable awesome: https://github.com/kunjee17/awesome-fable
Post reply on HN