This is about starting to use functional programming paradigms that get used more and more?

It is mainly about rewriting a small test program (repclean) in a functional style, using immutablity, parallelism and async techniques.

Looking for mad skills in:

Nothing? Add some keywords!

This project is part of:

Hack Week 11 Hack Week 12

Activity Show All

  • over 1 year ago: asemen left Get my hands wet with functional programming
  • over 1 year ago: ozyfatco joined Get my hands wet with functional programming
  • almost 2 years ago: hennevogel liked Get my hands wet with functional programming
  • almost 2 years ago: crazy0man liked Get my hands wet with functional programming
  • over 2 years ago: drpaneas joined Get my hands wet with functional programming
  • Comments

    • asemen
      over 2 years ago by asemen | Reply

      Let us do it in haskell?

    • yac
      over 2 years ago by yac | Reply

      FYI: I'm not sure rep-clean is good choice for this as there is requirement that rep-clean runs on all the supported platforms (like sle9 through 12, some redhat systems, etc and then all the arches like s390, ppc variants etc).

      That's certainly not supported out-of-the box by SLE systems and I don't know how much effort would be required to be able to build & install haskell based rep-clean on those systems. However, that's probably only a packaging issue.

      What would be more problematic is if there is missing support in the haskell compilers for some of the platforms.

    • yac
      over 2 years ago by yac | Reply

      Monday

      • Follow up on rainbow https://github.com/ccampbell/rainbow/issues/169#issuecomment-59734163

      • Bug reports

        • cabal linking issue with sscce https://github.com/haskell/cabal/issues/2170
        • https://github.com/simonmar/happy/issues/36
      • Found cabal-install >= 1.18 is available in d:l:haskell:platform

      • Found tmux has no library to link against but the output can be get relatively safely with formatting and conditionals like::

        tmux ls -F '#{?sessionattached,,#{sessionname}}'

      • installed

        • FreeBSD test system
        • opensuse 13.1 singularity test system
      • Singularity

        • drafted RPMpackage promise and RPMPackageList getter
        • hit issues with running cabal install <pkg>. Turns out it's good idea to rm -rf ~/.cabal ~/.ghc and re-install after ghc upgrade.
        • also outside packages (~/.cabal and system ones) are visible inside cabal sandbox.
        • And weird things can happen in sandbox. I eg couldn't install happy with really weird error messages but outside of the sandbox it installed fine. And then I could continue with cabal install hlint hspec inside the sandbox (which implies the above paragraph)

      Tuesday

      • Made os-release prototype https://github.com/yaccz/os-release

      • bug report https://github.com/haskell/hackage-server/issues/271

      • learn about haskell pattern matchin syntax to match only a field::

        fx (C { field = "foo" }) = ...

      and bind the whole pattern match via::

      fx (b @ (C { field = "foo"})) = field2 b
      

      Wednesday

      • got prototype working https://github.com/yaccz/singularity

      • Added acceptance testsuite prototype to singularity. It distributes itself to the configured list of SUTs and executes itself there so it can be easily run wide range of systems

      Thursday

      • Turns out some packages are required only for the binary they provide. Like package 'happy' and you need to ensure you have ~/.cabal/bin in your PATH yourself. Otherwise the dependers won't find the binary and fail to build with correct error message, it is confusin.

      • Turned the self-distributing acceptance testsuite into a CI server. https://github.com/yaccz/yac-build-server While ugly, it does the job for what I need right now.

      Friday

      • parsing yaml is pretty cool https://github.com/yaccz/code-snippets/blob/master/haskell/parsing-yaml/main.hs

      • More progress on build server

        • Run jobs concurrently
        • Handle exceptions at connection and thread level so they don't take down rest of the job / server.
        • Configure the job via yaml file similar to travis-ci