# Functional programming on Linux

**URL:** <https://boards.straightdope.com/t/functional-programming-on-linux/795117>\
**Category:** Factual Questions\
**Created:** [August 30, 2017, 6:29pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117 "2017-08-30T18:29:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saffer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saffer/32/6440_2.png) [@Saffer](https://boards.straightdope.com/u/Saffer)\
**Post date:** [August 30, 2017, 6:29pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/1 "2017-08-30T18:29:28Z")

</div>

I have recently divorced myself from Windows 10, and have started a relationship with Ubuntu. I am tired of not having full control over my PC, but that is not what this thread is about.  
I have also become a big fan of functional programming in F#. I way prefer the functional paradigm over the imperative paradigm.  
However, in Linux, mono and .Net core is a huge PITA. Especially when comparing VS Code to Visual Studio Community. I know there is a product from Jetbrains but you have to pay for that. I have had limited success porting over my F# programs to run in Ubuntu on mono using Ionide and VS Code. It kinda works but not really and requires too much fiddling to be worth it, compared to running Windows.  
So what I am looking for is  
[ol]  
[li]A functional programming language[/li][li]That has a free fully featured IDE[/li][li]That runs on Linux[/li][li]And has a rich library of extras\*[/li][/ol]

\*By extras, I mean things like working with zip files, working with http, etc. All the extras that aren’t part of the core language but are required to do anything useful.

I should also mention, I am not a professional programer. I am a hobbyist looking to expand my skills into the world of Linux. I have also decided that I like functional programming.

Options I know of are Scala, Haskell, and Lisp. I think F# was partly based on something called ML so I guess that might be an option too.

So the question is: What are my options and what do I need to know to make a decision?

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [August 30, 2017, 8:03pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/2 "2017-08-30T20:03:17Z")

</div>

The limiting aspect is almost certainly going to be the IDE. There are a number of IDEish things available for Linux, but the ones which are stable tend to not support any real IDE features (like debugging) and are really just glorified text editors. Everything else (including Eclipse) has always proved to be unstable.

I haven’t done a check in a few years so it’s possible that the landscape has improved. Maybe check to see what all plugins are available for Sublime or Atom.

You might also consider a two-pronged approach where you separate the text editing portion from the debugging portion. There are some (crappy looking but functional) standalone debuggers available.

IntelliJ Community Edition is a free, stable IDE that runs on Linux, but it only does Java. However, there are a few programming languages, like Groovy, that are based on the Java runtime. Potentially, one of those can be made to run on IntelliJ CE and, potentially, one of them is functional.

> **[List of JVM languages](https://en.wikipedia.org/wiki/List_of_JVM_languages)**
>
> This list of JVM Languages comprises notable computer programming languages that are used to produce computer software that runs on the Java virtual machine (JVM). Some of these languages are interpreted by a Java program, and some are compiled to Java bytecode and JIT-compiled during execution as regular Java programs to improve performance.
> The JVM was initially designed to support only the programming language Java. However, as time passed, even more languages were adapted or designed to ru...

Scala perhaps? This indicates that it should work via a plugin:

> **[JetBrains Products Comparison](https://www.jetbrains.com/products/compare/?product=idea&product=idea-ce)**

---

<div class="post-metadata">

**Author:** ![GreenWyvern](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/greenwyvern/32/2834_2.png) [@GreenWyvern](https://boards.straightdope.com/u/GreenWyvern)\
**Post date:** [August 30, 2017, 9:08pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/3 "2017-08-30T21:08:25Z")

</div>

Can I suggest [Lazarus](https://www.lazarus-ide.org/)

- Open source and being actively developed
- [Project of the month](https://sourceforge.net/blog/august-2017-community-choice-project-of-the-month-lazarus/) on SourceForge - August 2017
- Sophisticated and bug-free product developed over many years
- Full, serious IDE with many features and options
- Runs on Linux, Windows, Mac, and a few others
- Platform independent. Philosophy is ‘write once, run anywhere’. Compiled native binaries.
- Interactive debugger
- Database support for various databases
- Fast and efficient
- Comes with a library of over 200 components out of the box, and easy support for add-ons
- Just download, install, and run - everything you need is included in the package.

Lazarus is basically the IDE for Free Pascal. The two together are based on Borland Delphi, but with further development. This means that you can import millions of lines of Delphi code and thousands of components freely available on the internet. Also there’s any amount of information available on language-related questions.

I’ve used it a bit, and my experience is that it works very well.

---

<div class="post-metadata">

**Author:** ![gnoitall](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@gnoitall](https://boards.straightdope.com/u/gnoitall)\
**Post date:** [August 30, 2017, 9:25pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/4 "2017-08-30T21:25:39Z")

</div>

> [@GreenWyvern](#):
>
> Can I suggest [Lazarus](https://www.lazarus-ide.org/)
> 
> - Open source and being actively developed
> - [Project of the month](https://sourceforge.net/blog/august-2017-community-choice-project-of-the-month-lazarus/) on SourceForge - August 2017
> - Sophisticated and bug-free product developed over many years
> - Full, serious IDE with many features and options
> - Runs on Linux, Windows, Mac, and a few others
> - Platform independent. Philosophy is ‘write once, run anywhere’. Compiled native binaries.
> - Interactive debugger
> - Database support for various databases
> - Fast and efficient
> - Comes with a library of over 200 components out of the box, and easy support for add-ons
> - Just download, install, and run - everything you need is included in the package.
> 
> Lazarus is basically the IDE for Free Pascal. The two together are based on Borland Delphi, but with further development. This means that you can import millions of lines of Delphi code and thousands of components freely available on the internet. Also there’s any amount of information available on language-related questions.
> 
> I’ve used it a bit, and my experience is that it works very well.

I’m not sure how this suggestion helps, since OP’s explicit goal is F# in a CLI environment.

OP: [This page](http://fsharp.org/use/linux/) indicates that Mono’s F# package will solve the runtime and compiler question, and Linux Visual Studio Code plus Ionide-F# will handle the IDE parts of the issue.

No personal experience or interest in trying it myself, but the advice seems realistic to me. Almost anyone using Linux for anything other than a hands-off server or a toy adds specialty repositories to the system’s package management, so adding Mono’s repo seems harmless and easy to me.

ETA: no knowledge or research indicating whether Mono makes pre-packaged libraries (or whatever they’re called in that religion) for the “extras” you speak of, but my impression is that Mono is pretty mature and feature-complete, so it may be the best answer.

Extended ETA: “CLI” in this context means Common Language Infrastructure, not Command Line Interface. In other words, the runtime core of .Net/Mono.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [August 30, 2017, 9:33pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/5 "2017-08-30T21:33:39Z")

</div>

Haskell with Emacs is a good setup, which is well-supported and has plenty of add-ons, and, unlike Lazarus, isn’t Pascal.

[From the Haskell wiki](https://wiki.haskell.org/Emacs):

> [@](#):
>
> The haskell-mode package is a set of major modes for Emacs for writing Haskell code and working with Haskell projects. Features syntax highlighting, intelligent indentation, interaction with inferior Haskell interpreter, code browsing, and Cabal project integration. It support Hugs, GHCi, Cabal and hslint, hoogle, cabal-dev, and other utilities.

---

<div class="post-metadata">

**Author:** ![Red\_Skeezix](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@Red\_Skeezix](https://boards.straightdope.com/u/Red_Skeezix)\
**Post date:** [August 30, 2017, 11:58pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/6 "2017-08-30T23:58:04Z")

</div>

I was going to recommend scheme but it’s been a few years since I used it and it’s now become racket. It’s a lisp like language that comes with an ide called DrRacket. It was pretty good for small projects. But probably doesn’t have all the library support of a CLR/DLR language.

Sent from my Pixel using Tapatalk

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [August 31, 2017, 12:49am UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/7 "2017-08-31T00:49:17Z")

</div>

> [@Red\_Skeezix](#):
>
> I was going to recommend scheme but it’s been a few years since I used it and it’s now become racket. It’s a lisp like language that comes with an ide called DrRacket. It was pretty good for small projects. But probably doesn’t have all the library support of a CLR/DLR language.

There are multiple Scheme implementations for Linux, including the implementation which comes with PLT Scheme, which also includes Racket.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [August 31, 2017, 1:06am UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/8 "2017-08-31T01:06:31Z")

</div>

Is Scheme recommended over regular (Common) LISP? The usual Lisp package library includes thousands of packages, which was one of the OP’s requirements. I do not know what is the latest and best recommended IDE, though there are surely good ones. I suppose it’s not purely functional, but you can program in that style.

---

<div class="post-metadata">

**Author:** ![MrDibble](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mrdibble/32/114_2.png) [@MrDibble](https://boards.straightdope.com/u/MrDibble)\
**Post date:** [August 31, 2017, 5:09am UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/9 "2017-08-31T05:09:26Z")

</div>

Jetbrains’ Pycharm (community edition) is a fully-featured free IDE. Primarily for Python (which can be programmed functional-style with full-featured lamda functions). It’s totally stable, I’ve used it for years - and the debugging and, especially, version control integration, are awesome.

---

<div class="post-metadata">

**Author:** ![Saffer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saffer/32/6440_2.png) [@Saffer](https://boards.straightdope.com/u/Saffer)\
**Post date:** [August 31, 2017, 1:05pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/10 "2017-08-31T13:05:13Z")

</div>

Thank you for the advice everyone.  
I decided to try Rider from Jetbrains, even though it is a non free product. This way I can continue to code in F#.  
I have to say this is pretty good. Almost as good as using Visual Studio Community on Windows. Much much better than VS Code.

I think in addition to this I should broaden my horizons a bit and learn one or both of Haskell or Common Lisp.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [August 31, 2017, 8:14pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/11 "2017-08-31T20:14:49Z")

</div>

> [@DPRK](#):
>
> Is Scheme recommended over regular (Common) LISP? The usual Lisp package library includes thousands of packages, which was one of the OP’s requirements. I do not know what is the latest and best recommended IDE, though there are surely good ones. I suppose it’s not purely functional, but you can program in that style.

Common Lisp is well-supported on Linux as well, with Emacs plus Slime and SBCL being the common development environment. SBCL has the advantage of compiling to native binary code and, with Emacs+Slime, is a good interactive system as well. It also has the advantage of a large and active development community, and lots of third-party packages, as you say.

Scheme also has native code compilers, such as Chicken and Stalin, but those aren’t interactive; to use them, you’d develop the code in an interactive system and then compile the finished program.

---

<div class="post-metadata">

**Author:** ![Blakeyrat](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@Blakeyrat](https://boards.straightdope.com/u/Blakeyrat)\
**Post date:** [August 31, 2017, 11:05pm UTC](https://boards.straightdope.com/t/functional-programming-on-linux/795117/12 "2017-08-31T23:05:44Z")

</div>

I’m glad you’re sticking with F# because the .Net runtime and frameworks (and Mono port of it) are really first-class and there’s not much else that comes even close.

If you do decide to move to something more “linux-y”, I’d recommend Scala. It’s functional, it runs on the Java VM instead of the .Net VM so it’s a familiar-ish runtime, and there’s decent IDEs available for it, and it’s popular enough that you should have no problem getting support or finding libraries.

You’re not going to find anything on Linux as good as Visual Studio, I’m afraid. But lucky for you, VS’ F# support was pretty janky anyway, compared to its support for C++ and C#, so hopefully you won’t miss it too much.
