Thank you to the Free Software Universe

Posted on March 7, 2019 by emisshula

Table of Contents

  1. My first accepted pull-request and many thank yous
    1. The problem I solved
    2. The Yak shave I am on
    3. Why Nix is important to me, functional reactive programming
    4. Nix haskell resources
    5. If you want help you need to get on IRC

My first accepted pull-request and many thank yous

Last night, I wrote my first issue on a reasonably popular haskell library with an associated pull-request to close the issue. The pull-request was accepted just a few hours later with no revisions. I am unjustifably proud of myself and in that spirit I offer thank-you’s to the many people and resources that helped me. It is my sincere hope that other self-learners and math junkies will find this post and use it as a Treasure map to find the named resources on Free Software, Category Theory, Functional Programming and of course, Emacs.

The problem I solved

Haskell has a library called containers-unicode-symbols which turns your ascii keystrokes to unicode. You also need to add the language extension UnicodeSyntax. See the Haskell Wiki for more details and examples. Briefly, if you are using a Set and do an intersection, it will display the mathematical symbol. It emphasizes the deep connection between Haskell and Math. For some programmers this is discouraging but for myself and others it is inspiring. The library recieved 268 downloads last month and is maintained by Roel Van Dijk. However, on June 18 of 2018, the Haskell containers library was upgraded to version 0.6.0.1. This broke containers-unicode-symbols in an interesting way. There is an if statement in the cabal configuration file and now the case for anything with version 6 and over was not addressed. For a great tutorial on cabal and its new style commands please see Haskell-at-work Intro to Cabal.

The Yak shave I am on

I noticed this because I am updating a great learner resource for Haskell beginners called Haskell-Katas which are exercises for the most popular free and playful introduction to Haskell Learn you a Haskell. I want to configure this so it will build easily using Nix purely functional package manager. Pause for definitions, Katas are small exercises used to learn martial arts and they are great for learning both programming and spoken languages and a yak-shave is an apparently useless which allows you to solve a bigger and worthwhile goal.

Listen to the Yak

Listen to the Yak

I have rewritten Haskell-Katas so that it will work with Nix and unicode. However I could not compile it because Nix uses containers 0.6.0.1 but until my pull request containers-unicode-symbols only worked with versions less than 0.6. A reasonable person would ask, why do you care about Nix at all?

Why Nix is important to me, functional reactive programming

Functional languages are important because they do not rely on State. The same input will always produce the same output. This allows for referential transparency. Haskell is a purely functional language but most common operating systems are not. I shamefully use Mac OSX but even Debian is not guaranteed to have produce the same configuration with the same inputs. This goes for almost all flavors of Linux, Ubuntu, Mint, Arch, Gentoo and of course Windows and Mac. That is why the author of an incredibly important Haskell library Ryan Trinkle used it to control the configuration around reflex-platform which is really an ecosystem which allows the development of referentially transparent web and mobile applications.

It is my hope to offer my programming language students an opportunity to be able build mobile and web programs in a one semester course.

Nix haskell resources

I have found two resources indespensible in journey. First Gabriel Gonzalez who wrote Haskell-Nix in production a five part tutorial that is in my view indespensible for learning Nix. He also maintains the blog http://www.haskellforall.com/ which is worth taking a look at. The other is John Weigley who has a great talk on How I use Nix for Haskell Development at the Bay Area Haskell Meetup. He maintains a blog called http://www.newartisans.com/. I believe he is or was the global maintainer of Emacs.

If you want help you need to get on IRC

Finally I was able to understand that since the containers library was part of “base”, the libraries automatically imported with the Haskell Compiler, I could not choose a lower version of containers without lowering the version of the compiler from clever on IRC. This is a great resource for learners at any level with chanels on Haskell, Emacs, Emacs-Haskell, Math, Statistics, Machine Learning, Nixos and Reflex-frp. Please use IRC tutorials to register a Nick and then I use https://webchat.freenode.net/ to connect without figuring out how to install anything. Being on IRC may make you feel dumb initially but it will make you much smarter, faster than any time you spend on Twitter, LinkedIn or Facebook.