Giter Club home page Giter Club logo

haskell-trainings's Issues

101 codelab: Remove "Spacing is irrelevant" sentance

Haskell is actually sensitive to spaces in the let binding, so this sentence is confusing.
It is also is unnecessary, as people should probably follow examples, and not address this question until later.
But, we may want to add an examples of a multiple if/then/else expression, to show how to write it over multiple lines into the codelab comments.

101: Types people see when they use ":t" is confusing to them

tl;dr: Mention that :t output will not be useful until 102 material.

This is something we have discussed a few times in the past.
Until typeclasses in 102, types even for simple functions such as (+) and div are not really that helpful.

We have tried looking into monomorphising ghci output and considered writing a replacement for a limited number of operations in Prelude, so that during 101 people would not see typeclasess.

While been technically challenging, it might also not be the best solution from the educational standpoint.

An alternative is to mention, in 101, that types people will see when they type :t involve abstractions covered in 102, and just suggest they wait until 102, to understand them.
We literally start 102 with slides that explain what those types are.

System.Random is missing

Hi, I'm trying to complete the 102 codelab but I get an error when I'm doing make:

→ make
ghc -Wall -O2 -threaded -feager-blackholing Main.hs -o codelab
[1 of 3] Compiling Codelab          ( Codelab.hs, Codelab.o )
[2 of 3] Compiling Game             ( Game.hs, Game.o )

Game.hs:29:1: error:
    Failed to load interface for ‘System.Random’
    Use -v to see a list of the files searched for.
Makefile:15: recipe for target 'codelab' failed
make: *** [codelab] Error 1

My GHC version is 8.0.1. ;) Thanks!
The videos are very good by the way!

A branch in my name

I am planning to keep working on this material, but in my own way. I do not agree with all the changes that have been made in master, far from it. If someone were to create a branch with my name, based on v1.0, I could start submitting PRs with my modifications.

Need a better example for immutability

In slide 7 in Haskell 101, it uses the following example to show immutability:

let a = 3
in a = a + 1

I think we need a better example than this one. Because of the following reasons:

(1) This is syntactically wrong. And the syntactic failure has nothing to do with immutability. We can, for example, rewrite it to

let a = 3
in b = c + 1

and it just fails.

(2) We can, actually, slightly revise the example to:

let a = 3
in let a = 4
in a + 1

This works. But this is, of course, related to shadowing rather than immutability. Then this example is quite confusing.

(3) We can, actually, further revise the example to:

let a = 3
in let a = a + 1
in a + 1

This works. But it just loops forever, because in the definition a = a + 1, the a being defined is brought into the scope of a + 1. So it just recurs forever. Again, this example is being confusing.

PDFs?

Why don't you upload the PDFs too? If it's a material from 2016, I don't think it would change much in the future.

102 should mention what the game is going to be

The codelab just seems to start right in on implementing low-level stuff with no explanation of how it's going to be related to the game, and the slides don't mention the game at all. It would be more fun if students knew what they were building.

101: Add example of the tuple destructuring

People are confused as to how to destructure a tuple. Probably explain in the exercise comments.
Adding it to the slides would be overloading the slides with too much detail.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.