Skip to content

Commit 3dc9db8

Browse files
authored
Update chapter 1 & 2 (learnyouahaskell#24)
1 parent 0e4787b commit 3dc9db8

File tree

2 files changed

+33
-36
lines changed

2 files changed

+33
-36
lines changed

docs/introduction.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h2>About this tutorial</h2>
4444
This tutorial is aimed at people who have experience in imperative programming languages (C, C++, Java, Python &hellip;) but haven't programmed in a functional language before (Haskell, ML, OCaml &hellip;). Although I bet that even if you don't have any significant programming experience, a smart person such as yourself will be able to follow along and learn Haskell.
4545
</p>
4646
<p>
47-
The channel #haskell on the freenode network is a great place to ask questions if you're feeling stuck. People there are extremely nice, patient and understanding to newbies.
47+
The channel #haskell on the Libera.Chat network is a great place to ask questions if you're feeling stuck. People there are extremely nice, patient and understanding to newbies.
4848
</p>
4949
<p>
5050
I failed to learn Haskell approximately 2 times before finally grasping it because it all just seemed too weird to me and I didn't get it. But then once it just "clicked" and after getting over that initial hurdle, it was pretty much smooth sailing. I guess what I'm trying to say is: Haskell is great and if you're interested in programming you should really learn it even if it seems weird at first. Learning Haskell is much like learning to program for the first time &mdash; it's fun! It forces you to think differently, which brings us to the next section &hellip;
@@ -72,10 +72,10 @@ <h2>About this tutorial</h2>
7272
</p>
7373
<a name="what-you-need"></a><h2>What you need to dive in</h2>
7474
<p>
75-
A text editor and a Haskell compiler. You probably already have your favorite text editor installed so we won't waste time on that. For the purposes of this tutorial we'll be using GHC, the most widely used Haskell compiler. The best way to get started is to download the <a href="https://www.haskell.org/platform/">Haskell Platform</a>, which is basically Haskell with batteries included.
75+
A text editor and a Haskell compiler. You probably already have your favorite text editor installed so we won't waste time on that. For the purposes of this tutorial we'll be using GHC, the most widely used Haskell compiler. The best way to get started is to download <a href="https://www.haskell.org/ghcup/">GHCup</a>, which is the recommended Haskell installer.
7676
</p>
7777
<p>
78-
GHC can take a Haskell script (they usually have a .hs extension) and compile it but it also has an interactive mode which allows you to interactively interact with scripts. Interactively. You can call functions from scripts that you load and the results are displayed immediately. For learning it's a lot easier and faster than compiling every time you make a change and then running the program from the prompt. The interactive mode is invoked by typing in <span class="fixed">ghci</span> at your prompt. If you have defined some functions in a file called, say, <span class="fixed">myfunctions.hs</span>, you load up those functions by typing in <span class="fixed">:l myfunctions</span> and then you can play with them, provided <span class="fixed">myfunctions.hs</span> is in the same folder from which <span class="fixed">ghci</span> was invoked. If you change the .hs script, just run <span class="fixed">:l myfunctions</span> again or do <span class="fixed">:r</span>, which is equivalent because it reloads the current script. The usual workflow for me when playing around in stuff is defining some functions in a .hs file, loading it up and messing around with them and then changing the .hs file, loading it up again and so on. This is also what we'll be doing here.
78+
GHC can take a Haskell file (they usually have a .hs extension) and compile it but it also has an interactive mode which allows you to interactively interact with files. Interactively. You can call functions from files that you load and the results are displayed immediately. For learning it's a lot easier and faster than compiling every time you make a change and then running the program from the prompt. The interactive mode is invoked by typing in <span class="fixed">ghci</span> at your prompt. If you have defined some functions in a file called, say, <span class="fixed">myfunctions.hs</span>, you load up those functions by typing in <span class="fixed">:l myfunctions</span> and then you can play with them, provided <span class="fixed">myfunctions.hs</span> is in the same folder from which <span class="fixed">ghci</span> was invoked. If you change the .hs file, just run <span class="fixed">:l myfunctions</span> again or do <span class="fixed">:r</span>, which is equivalent because it reloads the current file. The usual workflow for me when playing around in stuff is defining some functions in a .hs file, loading it up and messing around with them and then changing the .hs file, loading it up again and so on. This is also what we'll be doing here.
7979
</p>
8080
<div class="footdiv">
8181
<ul>

0 commit comments

Comments
 (0)