Open dasch opened 9 years ago
Would you have been saved that trouble if you had first read http://elm-lang.org/get-started?
Nope. I was specifically drawn to the Elm Architecture Tutorial.
I understand that. My question was meant as: If you had read that page first (specifically the first few sections of it, describing the Elm tools), for example if the Elm Architecture Tutorial had pointed you to that part (which it currently doesn't), would you still have struggled so much?
For example, you wrote you didn't know about the package system. The get-started page would have introduced it to you.
I'm just trying to find out whether the get-started page would have helped you, not admonishing you for not having read it. :smile:
I think maybe the tutorial should be more specific about the level of proficiency expected of the reader – from the tutorial:
If you are new to reading Elm code, check out the language docs which covers everything from syntax to getting into a “functional mindset”. The first two sections of the complete guide will get you up to speed!
I read the syntax stuff (and having written a bit of Haskell that wasn't much of a problem) but there were no references to the packaging stuff. When doing a tutorial I prefer typing everything myself rather than cloning some pre-made repo, so including the steps required to get started using the "Architecture" toolset would be nice. Since they're not part of the language, but very much seem to be part of the architecture (at least as sane defaults) it makes sense to me to include that information directly in the tutorial.
Yeah, the "first two sections of the complete guide" do not give that information about packages, so that seems to claim too much. If the get-started page (or the part of it that speaks about the Elm tools and how they cooperate) were included in the "complete guide", that might become different.
But even then, what you say makes sense: The tutorial itself could be made self-contained in that regard. Maybe it's time for a pull request to https://github.com/evancz/elm-architecture-tutorial/?
And that isn't to say that what you suggest in the issue here could not also be useful: to give the programmer a suitable hint concerning elm package install
in that error message.
Yeah, both would be nice. There doesn't seem to be much consistency in how module and package names relate to each other – a package is essentially a Github repo namespaced with a username, right? In Ruby, I'm used to package names corresponding with the module name, even to the degree that there's a convention that a package foo-bar
should be included as foo/bar
, i.e. have the module Foo::Bar
. This is all based on convention and the fact that package names are global.
We should at the very least have the package name needed for installation listed (and document deprecation)
I'm was just trying to import Text and forgetting that it was deprecated (its still in the examples but not in the elm-lang packages).
Please let me know if this is not the case.
This is something I ran into when doing the Elm architecture tutorial. I've removed all extraneous code, but this is something that actually took me a while to figure out.
echo "import Html" > Main.elm
.elm make Main.elm
.You become sad:
Suggesting that I do
elm package install evancz/elm-html
would have saved me quite some time. I initially assumed that theHtml
module would be part of the standard library (maybe it should?) and didn't know about the package system, nor thatevancz/elm-html
was the HTML library referenced in the tutorial.Things that would've made me happy: