Giter VIP home page Giter VIP logo

learn-elm's People

Contributors

arhell avatar christian-fei avatar cleop avatar conorc1000 avatar danwhy avatar debck avatar gabrielperales avatar iteles avatar jsms90 avatar katbow avatar lucymonie avatar naazy avatar nelsonic avatar sckelemen avatar seangallen avatar simonlab avatar thisislawatts avatar yousefvand avatar zooeymiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn-elm's Issues

elm-compiler master build failing ?

A "sign" of "health" for a project I always look at is their "Continuous Integration" ...
At the time of writing, the elm-lang compiler: https://github.com/elm-lang/elm-compiler has Build Status
https://travis-ci.org/elm-lang/elm-compiler/builds/172483668
elm-compiler-build-failing

And having master in a failing state is not an isolated event:
elm-compiler-build-history-fails

Granted, the last release v0.17.1 was in June and there is no "Rule" stating that the master branch of a project has to always be Build Status but in general we prefer the idea of having a "Golden Master" branch to "Last Known Good" ... see: http://www.smaclellan.com/posts/shippable-at-all-times/ only merge your feature branch into master when it's passing ...

We understand that Evan does not want/need continuous deployment for the elm-compiler.
working on an incremental release with a bunch of new features arguably makes life easier for developers because they don't have to be constantly distracted by new features or braking changes.

Cost-Benefit Table in Readme

Cost Beneft
Time to learn/master a new language Saves time debugging code in the long run

What other "costs" are there?

relates to #1

Installing elm on Ubuntu

This seems like quite the process. I'm wondering if:

  1. I am missing something and there's a smoother way to install

  2. If the process I'm following is correct, then what is the best way to include the instructions for installing on Ubuntu in the repo

I am mostly following this but with some minor tweaks. It seems rather long to include all of that directly in the readme, so perhaps I can make an updated version in another repo and it can be linked to? Ideally there is a quicker install process but doesn't seem so.

P.S. I tried npm install -g elm and that doesn't work 😒

What is debugging like?

@nelsonic I know you said there are really good stack traces, but I'm also curious: how are the source maps? Is it easy to put a breakpoint in the Elm code and step through it in Chrome dev tools? I guess this would be my main concern with a non-JS based language. I've found it easy enough to read and set breakpoints in Babel-transpiled ES6 at least (since using full sourcemaps for production-scale apps is really slow on each recompile).

Quick-Start

For the Quick-Start, is there any reason we don't use elm-reactor instead of elm-make?

I found Elm-reactor relatively faster, more informative and it shows some of the cool factors with Elm. But I might be missing something about elm-make so I wanted to ask.

what is elm-format and how do I use it with my editor/IDE?

should this go in the How? section of the readme? πŸ€”

Elm Format

elm-format formats your code so that it is consistent with the community standard format.
Let go of your preconceptions of how code should look in other languages, elm is your chance to embrace a new paradigm so don't waste time discussing spaces vs. tabs? or one statement per line? or newline after code block? Simply use the community standard and focus on your feature.

See: https://github.com/avh4/elm-format
Editor integrations: https://github.com/avh4/elm-format#editor-integration

Case Studies

There is one example in the Elm-Specific Articles section

How Elm made our work better (success story): http://futurice.com/blog/elm-in-the-real-world

I'd love to see more success stories or case studies of where Elm is used over traditional JavaScript Web Applications

Add examples of Elm ports

Sometimes you are going to need interoperate with javascript, maybe because you need access to some native APIs and there isn't any elm library to interop with that native api yet. Or maybe because you already have javascript code and you want Elm to be able to communicate with it.

For those cases, Elm comes with Elm ports, and they will allow us do that communication.

Elm and progressive web apps (pwa)

People is raising their interest about progressive web apps.

Other technologies have tools for code splitting, so service workers can cache chunks of that code to load faster. Does anybody knows if there is any tool to do something similar in elm? maybe there is a way to split the runtime from the rest of your application and also split your app by routes.

Useful Links & Further Reading

##Β Reading

##Β Videos

Once we have a decent intro to elm-lang we should respond to this thread (with a back-link):
https://www.quora.com/What-do-you-think-is-the-future-of-the-Elm-programming-language

We asked people how they feel about elm ...

In our Anonymous Public Twitter Poll: https://twitter.com/nelsonic/status/795164336834617344
There was an almost perfect Pareto distribution which I totally did not expect:

anon-elm-lang-twitter-poll

The beauty of using a Twitter Poll is that it's:

  • low friction (one-click to vote)
  • true anonymity (twitter gives us no ability to see who voted or how people voted!)

The downside of using the Twitter Poll is that:

  • We have no idea who the people that don't like elm-lang are And given the final result they are unlikely to speak up... 😞

I did not expect the result to be this positive (in favour of).
I'm excited about the future again! (even if half of Americans aren't!!)

Reference "Official guide" _after_ DWYL's 5 minute guide

Because of the ordering on the how section

How?

The best place to start is with the "Official Guide": http://guide.elm-lang.org/get_started.html

we have condensed the steps into the 5-minute instructions below:

I think people are quite likely to click on the link and start working through the installation guide, before even reading "we have condensed the steps below" - something I see really often when people are going through online tutorials.

If you think it is better/easier for people to follow DWYL's condensed version (which I definitely do), I would suggest you change the order, so that you reference the official guide at the end

Elm learning curve

Dwyl's learn-elm tutorial instructs you to clone the repo and fire up elm reactor after changing one piece of text in one file, and then pause to reflect on the experience. The next step is to begin An Introduction to Elm, which starts with some playing around in the repl and then swiftly moves into quite complex tasks. I am concerned that the curve is too steep and that some may be discouraged and give up.

I would suggest that people do the following:

  1. Core language: https://guide.elm-lang.org/core_language.html
  2. Elm architecture: https://guide.elm-lang.org/architecture/
  3. Elm for Beginners: http://courses.knowthen.com/p/elm-for-beginners
  4. Elm architecture tutorial: https://guide.elm-lang.org/architecture/user_input/

Atomist :: Rug -> Elm

Jessica Kerr, aka @jessitron [blog], is working on a really neat usage of Rug called Atomist which is sort of like Rails or Yeoman, for an Elm project. πŸ€·β€β™‚οΈ

Rug files are usually called "editors", you can see some here.

However, Atomist will act like a pair-programming bot, you can tell it to add new features, make code amendments and automate a lot of tasks, all from Slack.

It's still in the early stages, but she's just started working on it full-time. Atomist/Rug could give us a way to build out Elm projects much faster. It aims to alleviate some of the repetitive tasks like having to update multiple files when adding a new feature. From the looks of it, I would postpone adding much of anything about it to the guide, at least until they have a stable runway, but it looks very promising! πŸ‘€

Atomist: website || twitter

Video: "The Clockwork Gardener: Growing an Elm App With Templates" by Jessica Kerr

Write-up

Elm-Rugs

Rug Language

Why and What is Rug?

TL;DR :: Rails for Elm, yo!

How?

Examples: http://elm-lang.org/examples

The (online) GitBook seems to be the best place to start: http://guide.elm-lang.org/get_started.html

Adventures in Elm β€’ Jessica Kerr @jessitron -> https://youtu.be/cgXhMc8M4X4

  • "As a maintenance developer, I really, really, really appreciate elm because of it's focus because it's not JavaScript and it really focusses on my feelings as a person both right now while I'm writing the code and also later when I'm reading the code and when I'm changing the code."
  • "Elm is a language of compassion..."
  • "My fingers work. And I would rather do a little more work with my fingers a less work with my brain so I can use my decision power for actual business logic" 9:10

Why?

We are constantly on the lookout for a "(less but) better" way to build web applications.

elm-lang first came to our attention in 2014 when Seven More Languages in Seven Weeks: Languages That Are Shaping the Future showed how to build a game "without callbacks" ...
Then last year when @gaearon mentioned it in his "Hot Reloading with Time Travel" talk we were reminded that elm was a source of inspiration for Redux ...
When @rjmk mentioned it in dwyl/technology-stack#12 we looked at it at the time with some excitement but decided it was not going to be suitable for our project(s) because it was front-end only ("Single Page App focused") and the "bundle" size for the compiled app was quite large and there was no support for server-side rendering (so we could not build apps progressively...).

Some people have reached "JavaScript Fatigue" (as exemplified in this post by @jjperezaguinaga https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f ... yes, the post is "satire" but it has roots in reality!) and are considering other options...

The question we want to answer with this investigation is: can we use elm-lang to build "Full Stack Progressive Web Apps" ?

Which Programming Language (Warning: Rabbit Hole)

Setting up elm-format in Atom

Do we have a Gitter channel for this repo? would love to ask a couple of setup questions in it. πŸ˜„

help-wanted question πŸ‘

What?

Wikipedia has a decent intro: https://en.wikipedia.org/wiki/Elm_(programming_language) (always a good sign when there's a wikipedia page...):

Elm is a domain-specific programming language for declaratively creating web browser-based graphical user interfaces. Elm is purely functional, and is developed with emphasis on usability, performance, and robustness. It advertises "no runtime exceptions in practice,"[3] made possible by the Elm compiler's static type checking.

so far, so good...

Salient Features

  • no side effects, all functions are stateless, and all data is immutable
  • Much smaller language than ES2015, so technically people could go from basic JS straight into elm and skip ES6/React/Redux/WebPack/Babel/etc ...
  • Apparently it's "fast" too: http://elm-lang.org/blog/blazing-fast-html
  • The debugger is probably my most 😍 feature: http://debug.elm-lang.org/

Further Reading:

Add creating a new Elm package instructions

There is a command in node for creating a new node package (npm init), but I couldn't easily find how to do something similar for Elm, but at the end is just elm-package install or elm-package install -y if you want to avoid the interactive mode.

Why NOT?

A few reasons why we might NOT want to use Elm: (feel free to add to this list!)

  • additional learning curve for people who have only just learned JavaScript
  • functional/immutable paradigm is not everyone's cup-of-tea. it can be perceived as "too mathematical" and not very beginner-friendly...
  • it's virtually impossible to find/hire a person with Elm experience on their "CV" (which means our clients will have to train up anyone they hire to maintain/extend any code we write for them...)
  • encourages more front-end-heavy apps as opposed to progressive web apps
  • no server-side rendering (yet) ... see: https://github.com/elm-lang/virtual-dom/issues/29
  • may be "difficult to sell" to organisations who have not heard of it. (i.e. all orgs that don't have a tech-focus or at least a tech-curious person in a decision making capacity!!)
  • (I might be mistaken, but...) at the time of writing, it appears that there are Zero Female Contributors to the Elm Compiler: https://github.com/elm-lang/elm-compiler/graphs/contributors this could be a coincidence or it could be that the Elm community is not very welcoming...? @jessitron might be able to enlighten on this... https://youtu.be/cgXhMc8M4X4?t=5m11s
  • There is no published book on Elm or the Elm Architecture which can suggest immaturity... the online resources are good and there's "Elm in Action" which is due Summer 2017 ... but that won't be enough to "convince" some clients.
  • What else...?

Note: some of these "reasons" are not specific to elm but are applicable to all compile-to-JS languages e.g. clojurescript because by deciding to use them you are forcing all the people on your team and client(s) team(s) to learn a whole other language just so they can update a line of code in the codebase...

Elm vs React/Redux?

Elm

Pros
There are lots of very positive blog posts about Elm e.g. here

  • Beginner friendly
  • Quicker debugging due to very clear error messages
    e.g.

screen shot 2016-11-29 at 12 52 57

screen shot 2016-11-29 at 12 16 22

  • No null or undefined
  • Total immutability -> makes it easier to keep track of state
  • Purely functional -> code can be more easily refactored
  • No runtime exceptions
  • Reactive

In this blog post, the author explains

The strictness of the type system eliminates an enormous amount β€” if not the vast majority of β€” mundane errors. Furthermore, refactoring is incredibly nice. Daniel Bachler had a relatable talk in BerlinJS not long ago: Fearless refactoring with Elm. The refactoring experience most of the time is:
Make changes, any changes.
The compiler tells what you missed.
Go to 1.
When the code compiles, it will work. There will not be any crashes. The only things that can go wrong are application logic. Application logic is what we should be focused on at all times, but many languages don’t let us do that. And since Elm enforces immutability and functional style, it is in fact very hard to cause regressions that you don’t know about.
I find that when coding Elm, I get to spend most of my time thinking about the actual problem that I am solving. Whereas when coding JavaScript, I spend my time debugging and only every once in a while get to think about the actual problem.

Cons

  • Relatively new so potentially less of a community when we run into problems

React/Redux

Pros

  • Ability to keep track of state
  • Lots of existing components already
  • Javascript so potentially easier for us to get started at first
  • Bigger community

Cons

@dwyl/ateam Please add your thoughts πŸ‘

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.