elm / elm-lang.org

Server and client code for the Elm website.
http://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
1.99k stars 365 forks source link

model-the-problem features a jump in tooling from previous section #552

Closed toolness closed 7 years ago

toolness commented 8 years ago

Hi! I originally started at the Elm Architecture Tutorial, which told me to read the first two sections of the complete guide.

So, I read the Core Language tutorial, which was excellent and instructed me to download Elm and run the REPL to follow along with the tutorial.

However, when I moved on to the next section, Model The Problem, I noticed that the example snippets were much lengthier, and they weren't formatted in the REPL style of the previous tutorial. It seemed as though I was supposed to now be writing my code in a file and executing it somehow, but there weren't any instructions on how to do this.

I did try putting the first example in a foo.elm file and then running elm foo.elm, but this didn't work.

I also tried inputting the example code into the REPL, but surprisingly, even this didn't work:

> fortyTwo : Int \
| fortyTwo = \
|   42
-- SYNTAX PROBLEM -------------------------------------------- repl-temp-000.elm

I ran into something unexpected when parsing your code!

3│   fortyTwo : Int
              ^
I am looking for one of the following things:

    end of input
    whitespace

Running the above without the \ line continuations produced the same error.

It's not a huge problem, but it is a bit of a hiccup in my otherwise enjoyable experience learning this language so far. I like following along with tutorials so I can get practice writing the language and tinkering with the code to better understand it, but I guess I'll just read this tutorial for now. :grin:

Update: I ended up finding the Pragmatic Studio post on Getting Started With Elm and found it immensely helpful in bridging the gap between these two tutorials, because it introduces elm-reactor with some very simple example programs.

evancz commented 7 years ago

These resources have moved to guide.elm-lang.org. The transition happens on this page now, and is preceded by this page all about how each tool works. Hopefully that helps with this jagged path between pages!