Hacker News new | past | comments | ask | show | jobs | submit login
F# from your browser (tryfsharp.org)
88 points by btian on Dec 20, 2012 | hide | past | favorite | 35 comments



This seems to depend on Silverlight and so doesn't work on my system. (Actually, I'm just guessing that it needs Silverlight--the page explaining why it doesn't work also doesn't work. Either way, it doesn't work.)

You should check out OCaml on the browser[1]. This takes advantage of js_of_ocaml, which is a very good OCaml to JavaScript compiler. You can also try running OCaml with access to the browser apis[2], which is pretty cool.

[1]: http://try.ocamlpro.com/

[2]: http://try.ocamlpro.com/js_of_ocaml/


The reason the dependency exists is because silverlight includes the .net compiler and, in addition to literally executing the code on the client, is used for a lot of the IDE sugar, like Intellisense. Additionally, you don't just get the f# language here but also access to a lot of the standard .net libraries. So while I agree it's annoying that the dependency exists, it's not an arbitrary requirement to do accomplish something that could have easily been replicated in another technology


Sure, but what makes the whole "in a browser" genre interesting is that (usually) you don't need special dependencies to get started. If I need Silverlight and the whole .NET compiler, why not just tell me to download Visual F# Express Edition to get started?


Because silverlight takes all of 15 seconds to download and install, and Visual F# is an hour+ to install, plus a couple hundred megabytes of additional assets?


I don't do windows development, and I've never installed any of the Visual <insert proprietary language here> environments, but I cannot believe that Visual F# takes over an hour to install. Is this true?


Much more if you consider the install time of Microsoft Windows.


Complexity. Target achieved.


Well, it's not like the apt-get solution is a whole lot more elegant: http://thecodedecanter.wordpress.com/2012/09/06/installing-m...


That's... not apt-get. Three commands that can be copy and pasted is about 10000x more elegant. In that it works in Linux and Siverlight doesn't.


In most cases Moonlight works just fine for my F# silverlight stuff. You should give it a go.


I guess it's an effect/payoff tradeoff. All the same, it's an annoying reminder of how Silverlight helped in a very small way to tarnish the web for Linux and Mac users.


Silverlight for Mac exists and is updated in line with the Windows version. Works great.


I anticipated "works for me" comments, I have no doubt experiences vary. I've installed Moonlight dozens of times in both Firefox and Chrome. I've used Silverlight on my MBA. I can absolutely say they are second class compared to Windows with Linux being unusable for anything interactive Silverlight and I can say for certain that the Azure portal was often unstable or annoying to deal with in Mac in the pre-HTML5-Azure portal era.


Well, if you're going to dismiss anecdotes, you probably shouldn't provide your own. (OS X Silverlight always seemed to work okay for me, too).

That said, the Azure portal never seemed to work that great for me, even if I was running Silverlight on a Windows box. The HTML5 portal actually seems worse, to me, though.

You might be interested in this, the azure-cli tools: http://blogs.msdn.com/b/windowsazure/archive/2012/12/19/azur...


Sorry, I wasn't trying to dismiss them, I was saying that while Silverlight for Mac works for somethings, it doesn't work for plenty. Further, not a single person in this thread has defended interactive Silverlight in Linux because Moonlight has never been but a joke.

I don't know how you can find the new portal to be worse. That Silverlight portal was one of the single worst thing I've ever used in my life. The HTML5 portal is quite nice, it uses the same endpoints the VS extension uses, giving them a single point of entry for management actions. I'm happy with the management portal now but am already aware of the CLI tools too.


Works perfectly for me on all my 5 Macs. And on windows..


It doesn't have all the great learning resources that tryfsharp has but I believe tryfs.net works by sending the code for compilation on the server so you don't need silverlight:

http://tryfs.net/


It's not quite as nice but you can use http://tryfs.net to play without the silverlight dependency.

Edit: it seems to be under quite a bit of load right now, but usually works just fine.


Be sure to check out the content on the Learn pages [1], which present a structured introduction to various aspects of the language (as opposed to the blank slate of the Create page). The examples really show off what you can do with F#, even in the browser environment (type providers with IntelliSense, charting, etc.).

[1] http://test.tryfsharp.org/Learn


That's the first thing I did and that is what makes this an impressive offering. The smoothness of the introduction is very well done and you can easily see how it slowly introduces a novice, which you can easily skip as a more experienced dev because of how well it is structured. A difficult challenge which they've pulled off well.


>Welcome to Try F#! Your system does not support the execution of F# code in the browser. >For additional help: http://test.tryfsharp.org/Help

Help doesn't do anything. Thanks?


That's the beta site and it seems to be down at the moment. Have you looked at http://www.tryfsharp.org/Tutorials.aspx


Chrome on Debian user here, that link actually provided a link to a moonlight installer for chrome (crx file), however chrome no longer allows downloaded extensions to be installed.

Just tried firefox (called Iceweasel in Debian), and moonlight installed ok, but I got this message:

// Due to differences between Silverlight and Moonlight, the Linux version of the // Try F# control is not fully functional at this time. // // We will make the Try F# control available on this page as soon as all issues // are resolved. Please check back later and thank you for your understanding. //


That is a shame. Thanks for putting the effort in.


I'm interested in learning F# but can't get past the "Your system does not support the execution of F# code in the browser." Any other pretty painless way to try it? I've been messing with Haskell and like it a lot but it would be nice to have access to the .NET libraries when I wanted them.


You can run it in mono (it's part of the standard package now) or you can give it a go on tryfs.net once the load goes down.

If you're on windows, there's an addon for VS2012 Express Web Edition for F#: http://blogs.msdn.com/b/fsharpteam/archive/2012/09/12/announ...


Also cool, all of the samples on http://fssnip.net can be loaded into tryfsharp.org and tryfs.net with the click of a button.


I can't help notice some similarity in name and motivation to http://tryclj.com .

http://www.tryfsharp.org/Help 404s for me. My browser "does not support the execution of F# code in the browser", probably because I don't have Silverlight.

I install Silverlight (for Chrome on OS X). "Could not load Silverlight Plug-In."


you may have missed it but sites like this have been around for a lot of time, so the similarity and motivation are obviously similar :)

TryRuby (which I believe was the first for a non-toy language, and the starter of the try* nomenclature) was put online somewhen in 2005 IIRC.



That's a very interesting learning resource. I wish something similar came for Scala or Clojure (as opposed to tryclj, which does not have all those "Learn" pages).


Here's a monstrous list of online sandboxed REPLs, i think the first group, codepad, IDEone, etc can do scala and clojure but probably you'll want to go with one of the one click donwloads like Haskell platform, the typesafe installer or leiningen, unless they've somehow developed a miraculous classpath hell resolver.

http://jkirchartz.com/2012/06/rocking-stackoverflow-sites-to...

http://joel.franusic.com/Online-REPs-and-REPLs


What I found very useful was http://4clojure.org . The elementary-level and easy-level problems provide a good start.


The Intellisense doesn't seem to work for me. Ctr-Space brings up the dialog which just contains "Loading..."


F# really does look like an amazing language. I'll consider it seriously when someone ports it to the JVM.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: