Welcome to HCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to HCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Compile and run F# code online instantly with HCODX. Our free cloud-based F# compiler supports real-time execution, standard input, syntax highlighting, and code download. No installation or configuration required. Start coding in F# now.
Run F# instantly without installing any IDEs or configuring environments. Our cloud-based F# handles libraries, runtimes, and dependencies automatically so you can focus on writing code.
Whether you are studying algorithms in F#, practicing data structures in F#, or exploring functional programming, our tool provides real-time stdout/stderr feedback with interactive standard input support.
HCODX is a free online compiler and code runner: write code in your browser, execute it on a cloud sandbox, and interact with your program through a live terminal. Students use it for coursework and interview practice; developers use it to test snippets in 85+ languages without setting up a local environment.
F# Interactive — fsi, the engine behind dotnet fsi — is how most F# developers actually explore code: no project files, no build step, just evaluate and see. It executes .fsx-style scripts and is the backbone of F#'s celebrated REPL-driven workflow, used for everything from data exploration to build scripting (the FAKE build system runs on it). Under the hood it's the same F# compiler and .NET runtime as compiled F#, so results are identical — you simply skip the ceremony. Scripting is a first-class scenario in current F# releases on modern .NET. On this page, fsi runs your script against a genuine interactive terminal: ReadLine pauses for your typed input and every printfn streams instantly.
let rec collatz steps n =
match n with
| 1L -> steps
| n when n % 2L = 0L -> collatz (steps + 1) (n / 2L)
| n -> collatz (steps + 1) (3L * n + 1L)
printf "Pick a starting number: "
let start = int64 (System.Console.ReadLine())
printfn "From %d, the Collatz sequence reaches 1 in %d steps." start (collatz 0 start)
printf "Pick another to compare: "
let second = int64 (System.Console.ReadLine())
let winner = if collatz 0 second > collatz 0 start then second else start
printfn "%d takes more steps. Try beating it!" winner
Reach for fsi when iteration speed matters more than a build artifact: sketching an algorithm, checking what the type checker infers, verifying a pattern match, or doing quick calculations with .NET libraries. It mirrors the workflow F# developers use daily in VS Code's FSI panel, so students learning F# in a functional programming course can practice the exact evaluate-inspect-refine loop their tooling expects. It's also handy for comparing script behavior against the compiled F# variant when debugging something subtle like startup or console encoding differences. HCODX is a free online F# editor, runner and interpreter — an IDE-grade compiler and playground to write and run code online, execute code with live output and live preview, no downloads or web server required.
Yes — even though fsi is a script evaluator, your code runs attached to this page's live terminal, so System.Console.ReadLine() blocks until you type a response. Prompts written with printf appear first, making multi-question interactive scripts work the same as they would in a local dotnet fsi session.
Pick fsi for exploration: it starts evaluating without a separate build, which suits quick experiments, homework snippets, and iterating on a function. Pick the compiled variant when you want behavior identical to a shipped binary. The language is the same; only the execution pipeline differs, and results match for typical code.
No — the sandbox has no network package restore, so #r "nuget: ..." won't fetch anything, and execution is limited to one script file. The full .NET base class library and FSharp.Core are available directly, which covers collections, LINQ-style Seq pipelines, regex, math, and JSON via System.Text.Json.
Your current code will be replaced with the default sample. This cannot be undone — download your code first if you want to keep it.
You have unsaved changes. Do you want to save your code before continuing?