User Tools

Site Tools


background

This is an old revision of the document!


Background

I am going to update this wiki as I am learning Haskell, and reading your comments.

Difficulties? You are not allone.

Learning Haskell is still quite hard for me, and I need my own code knowing that the code really works, and under which conditions. This is may be the same for you.

The reasons for the difficulties in learning Haskell, may be:

  • Before I started with Haskell, I was only used to imperative languages (Assembler, C, Pascal, Modula-2, C++, PHP, and more). The most, I was used to C++.
  • The difference between the imperative paradigm and the functional paradigm is like the differnce between hockey and chess.
  • Often, the code examples are not appropriate.
    • ..or I am to stupid?
    • Some of the available examples are outdated.
    • Somtimes just incomplete.
    • Sometimes incompatible with the current packages.
    • Sometimes they contain confusing usless, warning generating statements.
  • Some of the available documentation is incomplete or inaccurate.
    • See the comments in here
  • Some information are only available on stackoverflow or reddit.
  • If you place questions on stackoverflow, and don't know how to formulate the question from the very beginning then you are also risking your reputation, like here, again

About Jörg Brüggamnn

Understanding

I was may be a techie since I was a curious child. At an age of approximately 8 years, I assambled an electric DC Motor, and was amased that it worked. I was so keen on understanding.

This understanding is very deep and also related to other topics:

* Technology * Why is the world like this? * Why is the world at all? * How do computers work? * I have to know how a computer works. * I build my computer? * I need to program. * Assembler * Modula-2 * C * C++ * PHP * Java script * Java * Haskell * Scala * … * Spirit * How does the brain work? * Does psychology work? * Can someone change himself or herself? * Is there a god? * How do neuronal networks work? * I have to program a neronal network. * What is spirituality, at all? * What is Zen? * I have to practice Zen. * I practice Meditation, since November 2008. * What is enlightenment? * Why is the driven mind so reluctant to try this? * … * Beeing one society * How can people live together and accepting eachother as they are? * …

Understanding Haskell

Let's put this question on hold: How can people live together and accepting eachother as they are?

In the meantime, let's understand how Haskell works?

  • Output:
    • [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541]

The code above works without any warnings with ghc 8.10.4 and option -Wall.

To understand this code (7 lines of code) completely I have to understand the following:

  1. Packets
  2. Prelude
  3. Monads
  4. do-notation
  5. Type signatures
  6. Type defaulting
  7. Type classes
  8. Type constraints
  9. Lists
  10. List comprehension
  11. Function composition

And there is also

  • design
  • optimisation
  • test
  • proove its validity
  • to estabish

) 1 The code above may not work with extrem large numbers. I do not know at which conditions the floor function would fail. My calculator says sqrt((1E16x1E16)-1) is 9.999.999.999.999.999,9999999999999999, but sqrt((1E17x1E17)-1) is (1E17)!

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
You could leave a comment if you were logged in.
background.1616518040.txt.gz · Last modified: (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki