ionide-vscode-fsharp
elmish
Our great sponsors
ionide-vscode-fsharp | elmish | |
---|---|---|
16 | 14 | |
836 | 807 | |
0.4% | 1.5% | |
8.7 | 4.4 | |
14 days ago | 5 months ago | |
F# | F# | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ionide-vscode-fsharp
-
Is there a modern IDE with good support for OCaml?
I'd love to see something similar to Microsoft's Ionide project or for JetBrains to invest in IDE support.
-
Why OCaml?
> Pretty good, https://ionide.io
It pains me to admit it because I really like F# but, with due respect to the developers, Ionide and its related projects are the most unstable toolchain I've ever used.
Spend half a day reloading the editor because the extension keeps hanging on non-trivial MSBuild only to discover that the formatter has truncated in half one of the files you worked on due to a soundness bug. (OCaml's editor support, in contrast, is quite stable.)
Rider is the best editing experience I've had with F#, by far.
The DarkLang project was originally written in OCaml and was recently ported to F# (https://blog.darklang.com/new-backend-fsharp/)
> How much work would it take in term of code rewriting?
There are definitely code changes required, but I think those are quite manageable as concepts mostly map 1:1 from OCaml to F#.
> can it compile to native code?
Yup, https://learn.microsoft.com/en-us/dotnet/core/deploying/nati...
> how good is the language support experience in vscode?
Pretty good, https://ionide.io
(but I personally prefer JetBrains Rider)
> any reason not to do it?
Compilation speed, some OCaml language features?
-
How to get a non-broken F# development experience?
I know it's a recurring topic but it's reaching a high level of pain *again* (see NET SDK 6.0.400 and 7.0.100 previews don't currently work with Ionide).
-
The Case for C# and .NET
I don't disagree but it owes a lot of that to OCaml. That said, since we're talking about C#, F# and VS Code I'm gonna talk about a pet peeve I have. If you open a C# project in VS Code when the "Ionide" (basically the F# plugin for Code) is installed then Ionide thinks it's a F# project and will open some F# stuff after a few seconds (or prompt you to setup some F# stuff in its gitignore). The root cause has been identified (plugin activates when it sees a ".sln" file), a PR have been opened and rejected with no mention as to why (https://github.com/ionide/ionide-vscode-fsharp/pull/1401) and the developers behind it are frustratingly non-communicative about it, closing issues about it (https://github.com/ionide/ionide-vscode-fsharp/issues/1701). Usual rules about OSS maintainers apply, they don't technically owe us users anything ... but man it feels like we're being trolled by now :D
-
Rust Is Hard, Or: The Misery of Mainstream Programming
F# doesn't have a hard dependency on vscode. Resources from MS will obviously encourage using MS tooling, but ionide [1] is really good. The lsp+neovim workflow is not as good but getting better.
-
Perf Avore: A Rule Based CrossPlatform Performance Based Monitoring and Analysis Tool
Perf Avore was developed on VSCode using the ionide plugin and dotnet cli.
-
A few newbie questions
I was on .Net 5 but same issue on 6. I tried the fix here- setting FSharp.dotnetRoot explicitly in settings.json and so far it seems better.
-
Web Scrapping with F#
Once we have our dependencies ready, we can start digging in with the code in VSCode using Ionide, Rider or Visual Studio.
elmish
- A new F# compiler feature: graph-based type-checking
-
ASP.NET Core Blazor
For those interested in .NET languages with alternative compilation targets, Elmish (https://elmish.github.io/elmish/) is pretty unique.
We use F# on the front end (instead of TS), and thanks to the Fable compiler (which transpiles F# to JS, Python, Dart, PHP and Rust), most of the benefits of an Elm-style model in the UI can be ported to all sorts of different outputs languages. The rust target is in beta, but its promising because the WASM bundle size stands to be dramatically lower.
While the default is reactivity library for Elmish is React, you can swap in Avalonia/FuncUI (https://github.com/fsprojects/Avalonia.FuncUI) pretty easily as well.
-
Building React Components Using Unions in TypeScript
Naturally I’d recommend using a better language such as ReScript or Elm or PureScript or F#‘s Fable + Elmish, but “React” is the king right now and people perceive TypeScript as “less risky” for jobs/hiring, so here we are.
-
F(#)ront-end Experience like Re-Frame (clojure(script))?
Since you're familiar with React + Reframe, you can try Elmish! You can use F# to write [Elmish](https://elmish.github.io/elmish/) apps. It takes the Elm approach to building apps.
-
Should I pick up OCaml or Haskell?
Try F# with Elmish.
-
Functional Reactive Programming
Maybe elmish could be of interest to you? https://github.com/elmish/elmish
-
Has TypeScript made you a better developer?
I never tried Elm directly, but I have used the F# equivalent Elmish - super productive idea.
-
F# and WebAssembly
You can also get nested templates, bind inputs, and radios for example by the way don't be scared by the mutable keyword right there is just to show a brief example in a normal situation you would likely be using Elmish
-
Managing State in Comet
Comet promotes a variation of the Model-View-Update pattern popularized by The Elm Architecture, Elmish, Fabulous and others. The major parts of MVU are:
-
Type Safe HTML With FSharp
Lastly let's check Notes.fs, this file has an elmish implementation, to handle a form submission. I'll skip the whole elmish implementation and focus on the view.
What are some alternatives?
Feliz - A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
type-challenges - Collection of TypeScript type challenges with online judge
playwright-dotnet - .NET version of the Playwright testing and automation library.
Fable: F# |> BABEL - F# to JavaScript, TypeScript, Python, Rust and Dart Compiler
Sutil - Lightweight front-end framework for F# / Fable. No dependencies.
proposal-pipeline-operator - A proposal for adding a useful pipe operator to JavaScript.
fs-components
Perla - A cross-platform tool for unbundled front-end development that doesn't depend on Node or requires you to install a complex toolchain
jakt - The Jakt Programming Language
Escalin
Bolero - Bolero brings Blazor to F# developers with an easy to use Model-View-Update architecture, HTML combinators, hot reloaded templates, type-safe endpoints, advanced routing and remoting capabilities, and more.