[elm-discuss] Re: How to convince your boss to start using Elm in the company

2016-06-21 Thread Charlie Koster
I think it's worth pointing out that even though Elm will be here tomorrow, Elm is still evolving. Take as an example the latest release. If you had sold your boss on Elm 0.16 six months ago and then 0.17 comes out with very large changes, what are you going to recommend? Do you recommend that

Re: [elm-discuss] Curious - Why have both Html Msg and Cmd Msg?

2016-08-10 Thread Charlie Koster
I don't fully understand your explanation but that is in part due to my ignorance of the underlying implementation of both Cmd and Html. Let's see if we can discuss at a more conceptual level. Here is a snippet from the Elm examples page: getRandomGif : String -> Cmd Msg getRandomGif topic =

Re: [elm-discuss] Curious - Why have both Html Msg and Cmd Msg?

2016-08-10 Thread Charlie Koster
> > If all commands were treated equally, abstracting away these optimizations > would not be possible. > Got it. The virtual DOM diffing makes sense that this is a special case. A slight tangent to this post, I would assume that this pattern (using a separate construct for the purposes of

[elm-discuss] Curious - Why have both Html Msg and Cmd Msg?

2016-08-10 Thread Charlie Koster
I can speculate as to why DOM side effects are different than all other side effects. But when explaining the Elm architecture to a friend I explained it like this: - Elm apps take in a model and a Msg as inputs and run those two inputs through an update function - The update function

[elm-discuss] Re: Elm doesn't need source maps

2016-08-04 Thread Charlie Koster
> > Secondly, in my experience these sorts of bugs are rare. > When working on non-trivial applications I come across these kinds of bugs all of the time. Granted, that anecdote comes from developing AngularJS on a medium sized team. You're right that the culprit usually is that the code is

[elm-discuss] Trying to understand the community overlap between Elm and Elixir

2016-07-17 Thread Charlie Koster
For those of you who learned Elm before learning Elixir can you describe the appeal of Elixir from an Elm dev standpoint? I'm having trouble finding appealing similarities between the two. While there are some similarities to be found, Elixir doesn't appear to have a lot of what makes Elm

[elm-discuss] Debouncing in Elm 0.17

2016-07-08 Thread Charlie Koster
Now that signals are gone I'm not quite sure how I would debounce inputs. The typical example is an auto-complete search box or a typeahead. In Elm 0.17, what is the recommended way for debouncing inputs/actions received in the update function? If on every keypress on an input box my update

[elm-discuss] An Evidence-Oriented Programming approach to designing Elm

2016-07-07 Thread Charlie Koster
I watched a video from StrangeLoop 2015 and it made assertions that I think are worth considering when making decisions about Elm's future design. In summary, the presenter asserted that programming language design should be guided through the

[elm-discuss] Re: Elm doesn't need source maps

2016-08-03 Thread Charlie Koster
That's probably not an exact quote but I heard Richard say that today on the JavascriptAir podcast and I've heard it before on other podcasts or videos. The idea is why would you need source maps if there are no runtime exceptions? There are two reasons I think this isn't a useful line of

[elm-discuss] Re: How to order imports?

2016-09-02 Thread Charlie Koster
I really wish elm-format re-ordered imports so that I didn't have to care and it'd be consistent internal to my project and across community projects that use elm-format. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this

[elm-discuss] Re: Nested JSON decoder issue

2016-09-04 Thread Charlie Koster
Any by "array" I mean "list" -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit

Re: [elm-discuss] Re: Nested JSON decoder issue

2016-09-04 Thread Charlie Koster
Oh sweet. I guess that makes sense since := is an infix function. I guess I'm surprised that the compiler didn't say anything. Precedence issues usually end up sending the wrong things to functions in my experience. Anyway, I appreciate the help! -- You received this message because you are

[elm-discuss] Re: JS + React + Redux - How to emulate Elm?

2016-10-05 Thread Charlie Koster
I don't know if this is what you're looking for but rather than React/Redux I personally think CycleJS is far closer to Elm. It uses observables to chain up pure functions. Side effects are handed off to the "CycleJS runtime" to do things like update the DOM or perform

Re: [elm-discuss] Structuring a simple App

2016-09-22 Thread Charlie Koster
As far as Msgs go, why not just flatten it since it's, as you say, a simple app? type Msg = NoOp | Component1Msg | Component2Msg We decided to go down that route on our project and we currently have 10 Msgs, and it will likely grow to be a few dozen. Unless there's a really

[elm-discuss] Re: Elm Runtime Exceptions

2016-09-07 Thread Charlie Koster
Your description of Maybe isn't correct. When a function returns a Maybe it's not throwing an exception. Maybe is a separate type (like String) so when a function returns a Maybe String that is the type of the returned value. It's saying the returned value is one of two things. It's a Nothing,

[elm-discuss] Re: Feedback of a new learner

2016-10-01 Thread Charlie Koster
Thanks for the input Nathan and welcome! I think it's hard to disagree with your comments on the rough edges. Documentation has been scattered and incomplete for a while now. Something that I personally think deters newcomers, and it sounds like you would agree. Whether it's production ready

[elm-discuss] Proposed addition for Task package

2016-11-21 Thread Charlie Koster
I'm a fan of the changes to Task.perform in Elm 0.18. However, I'm still finding that I'm writing a lot of boilerplate in some situations. For example, there are several instances when I want to send a msg which has no payload. Task.perform (\_ -> GoToLoginPage) (Task.succeed Nothing) I do

Re: [elm-discuss] Proposed addition for Task package

2016-11-22 Thread Charlie Koster
> but I have seen terrible bugs being introduced by improper use, caused by > Cmd messages being created based on model state A, and because of race > conditions (e.g. fetch results coming in in the meantime) > My assumption is a race condition here wouldn't be possible since calling

Re: [elm-discuss] Proposed addition for Task package

2016-11-22 Thread Charlie Koster
> > One reason is what Evan says at > https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions: > > new functions are not so quickly expected to go into core, instead to be > accumulated in *-extra packages first. > I didn't realize that was the case. Thanks for the

Re: [elm-discuss] Proposed addition for Task package

2016-11-22 Thread Charlie Koster
> > The log then shows that between the DoStuff message and the DoMore > message, a Tick message comes in. > Well, that's troubling and undermines my assumption. That's for looking into this. For those skimming through this post, *race conditions are possible when doing something like

[elm-discuss] elm-lang/Navigation with hash and query string

2016-12-09 Thread Charlie Koster
I submitted an issue to evancz/url-parser but it ended up being human error on my part. However, I'm making this post because of my closing comment on that

Re: [elm-discuss] elm-lang/Navigation with hash and query string

2016-12-10 Thread Charlie Koster
Thanks for the responses. As a follow up, I want to start using parsePath instead of parseHash so that I can start using the query string. A problem I'm noticing is that if I have links in the app with the href attribute set to "/somePage" the page reloads which is undesirable with it being a

Re: [elm-discuss] elm-lang/Navigation with hash and query string

2016-12-10 Thread Charlie Koster
Thanks for the responses. As a follow up, I want to start using parsePath instead of parseHash so that I can start using the query string. A problem I'm noticing is that if I have links in the app with the href attribute set to "/somePage" the page reloads which is undesirable with it being a

Re: [elm-discuss] elm-lang/Navigation with hash and query string

2016-12-11 Thread Charlie Koster
Thanks for the response, Magnus. If I'm understanding correctly, you have a parent div that prevents default click events of child elements, including your anchor tag, and turns them into `Attribute msg`. Your solution is interesting, although it looks like a fair amount of boilerplate and

Re: [elm-discuss] elm-lang/Navigation with hash and query string

2016-12-11 Thread Charlie Koster
If I use hashes I now have to do manual work in order to use and parse query strings. Let's say I want to handle a query string such as "myPage?search=things=asc". If there's a hash in front of "myPage" the query string doesn't get interpreted as a search string by elm-lang/Navigation

Re: [elm-discuss] elm-lang/Navigation with hash and query string

2016-12-11 Thread Charlie Koster
I think I came up with a workable solution by adding a tiny bit of abstraction. import Html exposing (Attribute, Html, a) import Html.Events exposing (onWithOptions, defaultOptions) import Model exposing (Msg(..)) import Json.Decode as Json link : String -> List (Attribute Msg) -> List (Html

Re: [elm-discuss] elm-lang/Navigation with hash and query string

2016-12-11 Thread Charlie Koster
I don't disagree with anything your wrote there, but I still have this problem to deal with now. The path of least resistance happens to also be the path that uses query strings that are technically correct (nevermind about technically correct URLs). If a library comes along and makes parsing

[elm-discuss] Re: My Argument for "Why Elm" please review before I present to my company

2017-01-11 Thread Charlie Koster
Who is your target audience? Are you pitching to a CTO? A Scrum Master? A Project Manager? A handful of Developers? Why did the last pitch get turned down. Those are two important pieces of information to have if you want this one to be successful. -- You received this message because you

[elm-discuss] Re: My Argument for "Why Elm" please review before I present to my company

2017-01-11 Thread Charlie Koster
I'll recommend a different approach based on my personal experience with trying to sell Elm. Rather than showing a laundry list of technical points, start off with something that really grabs their attention and gives them a "holy crap" moment. Two examples: I gave a meetup talk early last

Re: [elm-discuss] Re: Emphasizing /r/elm more

2017-01-04 Thread Charlie Koster
Mark, Reddit is what you make of it. Subreddits (such as /r/elm) are self-moderated and it's easy enough to unsubscribe from the bad ones. I think you can be rest assured that /r/elm will be devoid of hate speech.

[elm-discuss] Re: Emphasizing /r/elm more

2017-01-02 Thread Charlie Koster
I just wanted to confirm one of your assertions anecdotally. In the past week I wrote two Elm blog posts and opted to post them to /r/elm rather than elm-discuss for precisely the first two bullet points you listed. A linear discussion would have been largely unhelpful and distracting. I also