Exploring 4 Languages: Project Setup
Getting Rust, Elm, Fâ¯, and ReasonML installed; their editor plugins configured; and their project files ready.
In this post, Iâm just going to briefly talk through the steps I needed to do to set up each of the languages and my editor setup for them. Gladly, it was pretty simple. At the end, Iâll offer a note on my thoughts on the setup processes. (Note that this isnât âHow to do this for anyone everââitâs âhow I did it, with some notes where it might be relevant to you.â)
For context, Iâm running macOS and using VS Code as my editor. Whenever I say âInstall the VS Code extension,â you can do it either by opening the extension side panel and searching for <Extension Name>
, or by typing ext install <extension label>
âIâll write it like <Extension Name>
/<extension label>
.
The source code as of what Iâm describing in this post is at the project-setup
tag in the repo.
Rust
Elm
- Language installation: There are installers, but I just did
npm i -g elm
. - Editor setup: Installed the VS Code Elm extension:
Elm
/elm
.2 - Project setup:
- Install the
create-elm-app
tool:npm i -g create-elm-app
- In the root of the project, I ran
create-elm-app elm
.
- Install the
Fâ¯
- Language installation: Install mono:
brew install mono
(note installation instructions here). - Editor setup: Install the VS Code Ionide extension:
Ionide-fsharp
/ionide-fsharp
. Itâll automatically install the associated Paket and FAKE extensions from the Ionide project as well, and those will install Paket and FAKE during installation. - Project setup:
- In the root of the repo, I created the
fsharp
directory. - Then I opened a VS Code instance to to that directory, opened the command palette, and ran
F#: New Project
.- I chose
console
- I left the directory blank
- I named the project
dmmf
(for Domain Modeling Made Functional). - Since F⯠(like Câ¯) prefers PascalCase names, I renamed the generated module
DMMF
.
- I chose
- In the root of the repo, I created the
ReasonML
- Language installation: Following the setup instructions here, I ran
npm install -g bs-platform
. - Editor setup: following the official instructionsâ
- I ran
npm install -g https://github.com/reasonml/reason-cli/archive/3.0.4-bin-darwin.tar.gz
to install the dependencies for the editor configuration. - I installed the VS Code extension:
Reason
/reasonml
.
- I ran
- Project setup: In the root of the repo, I ran
bsb -init reason -theme basic-reason
.
If youâre uncomfortable with running that script, there are other options as well.â©
Note that the VS Code extension is not the best experience out there for Elm: the Atom extensions (language-elm and elmjutsu) are. I stuck with VS Code because itâs good enough and, more importantly, the Code extensions are arguably best in class for the other languages⦠and itâs what I use every day.â©
Iâm not just saying that because Iâm a Rust fanboy, either! If Rust were hard to use, Iâd be complaining louder because of my enthusiasm for the language.â©
Comments on the setup processes
Most of the languages have fairly straightforward processes to get up and running with a good-to-excellent tooling experience.
The best of them is Rust, which is extremely easy to get up and running with.3 Elm is roughly in the middleâitâs less straightforward than Rust in that
create-elm-app
is not an officially supported approach, unlikerustup
andcargo
, so youâre going to have a much less awesome experience if you donât know about it.Reason and F⯠both have slightly larger negatives.
Reason requires you to
npm install
a large, gzipped file with multiple dependencies all bundled, instead of having a dedicated installer a larustup
. It also has the possibility for a not-so-great first-run experience in the editor, which I discovered all too quickly.F⯠essentially requires you to use an editor extension to get the language setup with Paket, which is a much better choice of package manager than the default .NET package manager NuGet. Command line tools exist and are improving rapidly, and you can get them working⦠but itâs harder than it needs to be. And that project setup wizard is fine, but itâs a lot noisier than just doing
create-elm-app
or especiallycargo new
.In any case, though, I have them all up and running now! More soon!