[elm-discuss] Re: Post Examples of Painful Record Updates Here!

2017-03-06 Thread Charlie Koster
Here's my example from an attempt to approach this topic in a similar way . *My use case is my data is modeled in a “has a” kind of way. I have rounds and I have lightning talks. A round has a date, it

[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 yea

[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 are

[elm-discuss] A Sufficiently Complex Elm example

2017-01-10 Thread Charlie Koster
I'm cross posting this here since both elm-discuss and /r/elm or both actively used. I open sourced a project we've been working on for the past couple of months here . My intent is that we'll learn

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 w

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 h

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&order=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 (c

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 Ms

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 wor

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

[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 i

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 `*Task.

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 `sendMsg

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 in

[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 thi

[elm-discuss] Proposed addition to Result in elm-lang/core

2016-11-19 Thread Charlie Koster
Just this morning I upgraded a 3500 line Elm 0.17 project to Elm 0.18. I wrote down my experience that I will share at a later date but I wanted to share a suggestion. My app makes a handful of Http requests. For example I have a user model and Msgs for when the user logs in or out. type alias

[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 HTT

[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 r

Re: [elm-discuss] How to sell Elm to your client / boss

2016-09-29 Thread Charlie Koster
Agreed with Martin. Start small. Demonstrate the value of Elm through an actual small scale application. If you can touch it and see it it's more convincing. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and sto

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 good

[elm-discuss] Re: Elm Runtime Exceptions

2016-09-07 Thread Charlie Koster
Having said all of that, Elm can legitimately have runtime exceptions. One example is you overflow the stack in an infinitely recursive call. Another example is there's a bug in the transpiled code. Both can and do happen and I've honestly seen a handful of runtime exceptions, most of which wer

[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: Image navigation and interaction

2016-09-07 Thread Charlie Koster
The first thing I'll mention is writing your own map application is a huge undertaking. But it doesn't hurt to try with Elm :) Have you considered rendering that huge map image on a canvas? Image manipulation on a canvas might give you better performance. -- You received this message because y

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 s

[elm-discuss] Re: Nested JSON decoder issue

2016-09-04 Thread Charlie Koster
When I say "array" I meant to type "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 https:

[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 https://groups.goog

[elm-discuss] Nested JSON decoder issue

2016-09-04 Thread Charlie Koster
I'm attempting to write a simple program that will show me the latest posts on the r/programming sub-reddit (https://www.reddit.com/r/programming.json). As you can see if you click on that link the JSON response is really nasty which is why I'm having a great deal of problems trying to decode t

[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: Possible bug in Html

2016-08-16 Thread Charlie Koster
By the way, that conclusion is on the assumption that "selected False" actually puts selected="false" on the element which I haven't confirmed. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving ema

[elm-discuss] Re: Possible bug in Html

2016-08-16 Thread Charlie Koster
I think this is the problem. selected <| k == selectedKey I assume this sets a selected="true" or selected="false" attribute on the element. That's not how the selected attribute works. The mere appearance of an attribute called "selected" on an option makes that option selected and if there a

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 dif

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 =

[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 to

[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 reaso

[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 great

Re: [elm-discuss] Debouncing in Elm 0.17

2016-07-08 Thread Charlie Koster
Thanks for the replies. The custom Time Tick code is more understandable and straightforward in my opinion so I'll use that in the future. I'm curious if there's an opportunity to build debouncing into the language. That seems possible for subscriptions but I'm not so sure about other actions t

[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 fun

[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 scien

[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 y