Back when Silverlight was still "majorly" (read: somewhat) supported by browsers, http://tryfsharp.org was a website where you could write, compile, and execute F# code in your browser. Through the Silverlight stuff.
The site has since broken, and it's a shame, because it was a really useful resource! It's actually what got me into F# in the first place.
Anyway, lately there have been two new projects trying to solve this problem! Which is really exciting.
The Fable REPL, at https://fable.io/repl2, with the previous version now at https://fable.io/repl-legacy. These projects work by compiling the compiler[1] into JS, and then running your compiled F# code (now JS!) in the browser.
This new thing by the WebSharper people, solving a very similar problem, but with WebAssembly and some WebSharper stuff that I'm ignorant of.
I think the key take-aways from this article are:
- Cool, we're going to have a few "Try F#" replacements stable soon!
- Neat; WebSharper has really been increasing their PR lately - time to invest a bit of time learning more about this scene.
[1] Fable is a thing that compiles F# to JS. The F# Compiler itself is written in F#. So, they use Fable to compile the F# Compiler into JS, and then use *that* JS to compile your source code. In the browser. It never even touches a server!
What does it do? It wouldn't load on my phone for me. Browser said script was unresponsive
statuek 5 points · Dec 2018
Back when Silverlight was still "majorly" (read: somewhat) supported by browsers, http://tryfsharp.org was a website where you could write, compile, and execute F# code in your browser. Through the Silverlight stuff.
The site has since broken, and it's a shame, because it was a really useful resource! It's actually what got me into F# in the first place.
Anyway, lately there have been two new projects trying to solve this problem! Which is really exciting.
I think the key take-aways from this article are:
- Cool, we're going to have a few "Try F#" replacements stable soon!
- Neat; WebSharper has really been increasing their PR lately - time to invest a bit of time learning more about this scene.
[1] Fable is a thing that compiles F# to JS. The F# Compiler itself is written in F#. So, they use Fable to compile the F# Compiler into JS, and then use *that* JS to compile your source code. In the browser. It never even touches a server!
danysdragons 1 points · Dec 2018
The Fable REPL (current) doesn't work for me in Chrome, I just get a blank canvas no matter what example I pick. It works great in Firefox though.
statuek 3 points · Dec 2018
Sounds like you should file a GitHub issue!
[deleted] 1 points · Jan 2019
This reminds me of T-diagrams from my compilers course. It's good to see these concepts in actual practice!