Basic stdin/stdout programs in Haskell

It is not very complicated to write basic stdin/stdout Unix-style programs in Haskell. For example, the following one-line program copies stdin to stdout. main = interact id This might not look very useful, but this code is a good starting point to implement, for […]

Haskell development environment

I finally found some time to adjust my Haskell development environment. Up to now, I was just trying some snippets in GHCi. But as I am used to IDEs, I would prefer to have at least some kind of build tool connected to my […]

Pattern matching in Haskell and F#

After I had to deal with the fizzbuzz programmer test, I became interested how pattern matching works in Haskell and F#. I found the following solution for Haskell on the web. {- - Fizzbuzz, https://wiki.haskell.org/index.php?title=Fizzbuzz&oldid=33893 (last visited January 19, 2020). -} fizz n | […]

Haskell web stack

A DEAD-SIMPLE WEB STACK IN HASKELL Haskell has a proliferation of libraries to choose from for all of your basic backend needs, from logging to database access to routing and web server definition. https://williamyaoh.com/posts/2019-11-16-a-dead-simple-web-stack.html © Copyright 2019 William Yao This doesn’t look good to […]

Monads mystery solved

Finally an article to solve the monad mystery! Monads as a Programming Pattern This article is written from a programmer’s perspective, where a monad is a software engineering pattern. Like other patterns, you may have already used it without knowing it was the monad […]

Programming Languages Power Usage

Interesting article on The New Stack about programming languages power usage. Which Programming Languages Use the Least Electricity? https://thenewstack.io/which-programming-languages-use-the-least-electricity/ © 2019 The New Stack. All rights reserved. Should we all go back to C now?

Associative Arrays

When working with associative arrays in Python, I wonder how these work in other languages. Especially functional programming languages. For example, one would create a dictionary, as associative arrays are called in Python, as follows. >>> dic = {'foo': 42, 'bar': 43}>>> dic{'foo': 42, […]

Lambda Expressions

In Python you can use lambda expressions to avoid the creation of temporary, one-time use functions. Look at the following example. def power(x): return x**2 l1 = map(power, range(4)) If you don’t need the power() function in another place, it’s a bit annoying to […]

On list comprehensions II

In my previous blog entry, I shared some findings on creating lists with list comprehensions. I had a further look on this and how to use map and filter functions for list creation with list comprehensions. For example, in Python you can map a […]

On list comprehensions

I first read about list comprehensions when I started with Python. One application of list comprehensions is to avoid loops. A very simple example in Python would be as follows. l1 = [] for i in range(5): l1.append(i) print(l1) l2 = [x for x in […]

Generative Art With Haskell

https://www.kovach.me/posts/2018-03-07-generating-art.html Interesting post about generative art with Haskell by Benjamin Kovach. Make sure you read the referenced article by Tyler Hobbs about writing Processing code through Quil in Clojure as well.

Haskell Code Style

Getty Ritter writes about Haskell Code Style Some Notes About How I Write Haskell https://blog.infinitenegativeutility.com/2017/12/some-notes-about-how-i-write-haskell Maybe one day I’ll understand all this.

Haskell Overview

Nice Haskell overview from Alexis King. An opinionated guide to Haskell in 2018 https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/ An exhausting read for me. I’m overwhelmed.

Return type polymorphism in Haskell

Eli Bendersky writes about return type polymorphism in Haskell. https://eli.thegreenplace.net/2018/return-type-polymorphism-in-haskell/ My knowledge of Haskell is too limited to understand all the code. However, it’s interesting to see what is possible.