FunScript is a lightweight F# library that lets you rapidly develop single-page applications. You can connect to external data sources and call REST APIs with intellisense, produce dashboards using JavaScript visualization libraries and write asynchronous computations easily without explicit callbacks.
Questions tagged [funscript]
20 questions
34
votes
6 answers
What's the easiest way to build an F# compiler that runs on the JVM and generates Java bytecode?
The current F# Compiler is written in F#, is open source and runs on .Net and Mono, allowing it to execute on many platforms including Windows, Mac and Linux. F#'s Code Quotations mechanism has been used to compile F# to JavaScript in projects like…

Phillip Trelford
- 6,513
- 25
- 40
13
votes
2 answers
Adding Funscript to an existing ASP.NET MVC project
I really like the FunScript's idea of writing F# instead of Javascript, but I cannot find any samples on how to integrate FunScript int an existing ASP.NET MVC solution.
Is it even possible? A "real-world example" would be really useful.

Igor Kulman
- 16,211
- 10
- 57
- 118
12
votes
3 answers
How to really 'get started' with FunScript
I'm having real trouble trying to get started with FunScript, I really love the idea of F# -> Javascript but constantly frustrated by the amount information/documentation of how to work with such beautiful-looking technologies.
Here's the…

Zaid Ajaj
- 680
- 8
- 16
7
votes
1 answer
Namespace or module "Runtime" not defined
So the "Funscript" page here has a sample. Now I have loaded the sample into my Visual Studio 2012. I am not familiar with Visual Studio .NET and am only learning F# very recently. The last line in the sample pages which is:
do…

N00bsie
- 469
- 3
- 19
4
votes
2 answers
Is there a way to effectively use reactjs with WebSharper
I am currently exploring websharper. However, the UI.Next API seems kind of sluggish. Albeit, it is still experimental. I am thinking the speed and flexibility offered by Facebook's, reactjs and it's functional design, should make a great fit. Has…

George
- 2,451
- 27
- 37
4
votes
2 answers
How are interfaces exported in Funscript
I've got the Funscript examples working. Now I'm trying to make something like a Funscript library which has functions (and hopefully classes!) that can be called from javascript code. But I can't see a way of accessing anything from the .js…

Ray
- 2,974
- 20
- 26
4
votes
1 answer
WebSharper issue on getting started
So I have been looking at developing RIA or MVC applications using F# and I saw that there were two options :
FunScript
WebSharper
I have a Visual Studio 2012 version and it's a student edition. So I just followed the getting started link here
Now…

N00bsie
- 469
- 3
- 19
3
votes
2 answers
Implement F# libraries for consumption by TypeScript/Javascript?
I know there are a number of projects which can compile F# to JavaScript.
Does any of these projects support this use case:
developing an application in TypeScript
but writing part of the application in F#, as a library
consuming this F# library…

wmeyer
- 3,426
- 1
- 18
- 26
2
votes
1 answer
FunScript querySelector null result
I want to use document.querySelector method to get html node. In Js I can receive null as a result. But in F# the result type is Element and it's neither nullable nor optional and it's not clear how to check it for null. How can I handle the…

Random
- 3,807
- 2
- 30
- 49
2
votes
1 answer
How to pass arguments to funscript function?
Is it possible to pass data generated locally in F# to the expression that's being compiled in Funscript?
Example of what I mean:
let MyJSFunc str () =
Globals.alert str
let myStr = File.ReadAllText "somefile.txt"
Compiler.Compiler.Compile(<@…

monoceres
- 4,722
- 4
- 38
- 63
2
votes
2 answers
Using decimal values in FunScript
I'm getting an exception when trying to use a decimal value with FunScript. It can be reproduced simply by using:
Globals.window.alert(Globals.JSON.stringify(3M))
The exception says:
System.Exception was unhandled
Message: An unhandled exception of…

jruizaranguren
- 12,679
- 7
- 55
- 73
1
vote
2 answers
FunScript: How to access TypeScript.Api<...>
I'm getting started with FunScript with a working example. Using Nuget to add the needed libraries, it works well.
In watching a 2013 video on channel9, they are making use of TypeScript.Api<...> to load types from typescript definition files.
I'm…

ritcoder
- 3,274
- 10
- 42
- 62
1
vote
1 answer
Using type from F# host via Ajax in FunScript JS code
How do I use types declared in my host project and served over Ajax in the generated FunScript code?
For example I lets say I declare a type T and then create a REST endpoint serving data in that format. Now if I want to load the data and use it…

Andre
- 4,560
- 2
- 21
- 27
1
vote
1 answer
F# Expr.TryGetReflectedDefinition with overloaded methods
I'm writing some extensions for the FunScript project (F# to Javascript compiler). If you're interested you can find the source here.
I was trying to emulate the AwaitObservable extension by Tomas Petricek. However, if I use overloaded methods like…

Alfonso Garcia-Caro
- 428
- 2
- 7
1
vote
0 answers
Funscript examples - can't connect to server
I finally can run the funscript examples. But they do not work as expected.
The last output I get is:
Searching for main function...
Found entry point...
Loaded assembly:…

rogergl
- 3,501
- 2
- 30
- 49