google / haskell-trainings Goto Github PK
View Code? Open in Web Editor NEWHaskell 101 and 102: slides and codelabs
License: Apache License 2.0
Haskell 101 and 102: slides and codelabs
License: Apache License 2.0
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.
Update README.md with a separate section for recordings.
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.
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!
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.
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.
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.