Re: [elm-discuss] Re: Scaling Elm

2017-04-23 Thread Francesco Orsenigo
Yes I did. It does not support keyboard. As I wrote, "implementing keyboard support requires side effects and state". On Mon, Apr 24, 2017 at 3:50 AM, Lourens Rolograaf wrote: > Hi Fransesco, did you read this? >

[elm-discuss] Re: Elm-reactor and static files (images & videos)

2017-04-23 Thread Arnau Orriols
FWIW, As a work around, I tried using a common http server to serve the app and > was able to have hotreloading using a file system watching library to > automatically build and reload the browser. But I lost the debugger :( > Elm-live is basically what

[elm-discuss] Re: Looking for a better way to use `andThen` chains (and other beginner questions)

2017-04-23 Thread Max Goldstein
> > If you're looking for a somewhat broader background on data modeling in > Elm, this talk is a must-watch: Making Impossible States Impossible > Sorry, looks like the YouTube link got put at the top of the post. -- You received this message because you are subscribed to the Google Groups

[elm-discuss] Re: Looking for a better way to use `andThen` chains (and other beginner questions)

2017-04-23 Thread Max Goldstein
https://www.youtube.com/watch?v=IcgmSRJHu_8Instead of lists with numbered items, have you thought about using a dictionary ? Something like this? import Dict exposing (Dict) type alias No = Int type alias Game = { stars : Dict No

Re: [elm-discuss] Unexpected error when parsing what seems to be reasonable code (Bug in parser maybe?)

2017-04-23 Thread Ilias Van Peer
If I'm not mistaken, this isn't so much about nested records as it is about referencing a qualified record in a record update expression. This seems related to - but not exactly the same thing as - https://github.com/elm-lang/elm-compiler/issues/1549 So yeah, you could either create a local

[elm-discuss] Re: Scaling Elm

2017-04-23 Thread Lourens Rolograaf
Hi Fransesco, did you read this? https://medium.com/elm-shorts/a-reusable-dropdown-in-elm-part-1-d7ac2d106f13 part 2 https://medium.com/elm-shorts/a-reusable-dropdown-in-elm-part-2-9659ef988441 Op donderdag 20 april 2017 23:45:07 UTC+2 schreef Francesco Orsenigo: > > > I would add a

[elm-discuss] Re: view function to call other view function with different Msg type

2017-04-23 Thread Max Goldstein
Yes, Ian is correct. Html.Attributes.map : (a -> msg) -> Attribute a -> Attribute msg Html.map : (a -> msg) -> Html a -> Html msg -- You

[elm-discuss] Re: view function to call other view function with different Msg type

2017-04-23 Thread Ian Mackenzie
Shouldn't that be Html.map, not Html.Attributes.map? itemView returns a Html msg, not an Html.Attribute msg... On Saturday, 22 April 2017 21:53:47 UTC-4, Erik Lott wrote: > > view : Model -> Html Msg > view model = > div [] > (model.items > |> List.map itemView >

[elm-discuss] Re: Elm-reactor and static files (images & videos)

2017-04-23 Thread Ian Mackenzie
You should be able to use the debugger outside of elm-reactor if you compile with the --debug flag, for example elm make --debug Main.elm --output main.js You should then be able to use whatever you want to serve the HTML/JS and you'll still get the debug overlay. On Saturday, 22 April 2017

[elm-discuss] Re: Discovery: Model /= Database

2017-04-23 Thread Rehno Lindeque
Hi Kasey, I just wanted to mention that the wikipedia article Model-view-viewmodel might be helpful reading. In some architectural patterns this is called the viewmodel rather than the model. (A couple of GUI oriented

Re: [elm-discuss] Why `let`?

2017-04-23 Thread Wojciech S. Czarnecki
Dnia 2017-04-23, o godz. 10:34:22 Tom Ayerst napisaƂ(a): > "where" would be nice though... > > foo a b = >x + y > where > x = a > y = b Most people read from top to bottom not otherwise. So let - in gives information in proper order: Let -- using this

Re: [elm-discuss] Why `let`?

2017-04-23 Thread Tom Ayerst
"where" would be nice though... foo a b = x + y where x = a y = b On 23 April 2017 at 10:17, Jan Tojnar wrote: > On Sunday, 23 April 2017 02:23:20 UTC+2, Witold Szczerba wrote: >> >> in real code things are much more complicated and confusing. I have >> looked at

Re: [elm-discuss] Why `let`?

2017-04-23 Thread Jan Tojnar
On Sunday, 23 April 2017 02:23:20 UTC+2, Witold Szczerba wrote: > > in real code things are much more complicated and confusing. I have looked > at the Todo.elm you prepared and (for me) it is much harder to reason about. > I agree, it is especially confusing once we get to *destructing*:

Re: [elm-discuss] Unexpected error when parsing what seems to be reasonable code (Bug in parser maybe?)

2017-04-23 Thread Peter Damoc
On Sat, Apr 22, 2017 at 11:50 AM, Dwayne Crooks wrote: > However, if I update the let bindings as follows: > > let >> defaultViewConfig = Rating.defaultViewConfig >> ratingViewConfig = >> { defaultViewConfig | readOnly = model.readOnly }

Re: [elm-discuss] Optimisation in Elm

2017-04-23 Thread Peter Damoc
Hi Ana, 1. Elm is fast because it use a very fast implementation of a virtual dom. 2. Elm compiler outputs JavaScript so all the low level memory concerns are handled by the JavaScript VM, not by Elm 3. No, Cmds do not influence the purity of Elm. If a function returns Cmds, it will always return

Re: [elm-discuss] Looking for a better way to use `andThen` chains (and other beginner questions)

2017-04-23 Thread Peter Damoc
On Sat, Apr 22, 2017 at 12:37 AM, Stefan Matthias Aust wrote: > > *My first question*: Is there any way to create a constrained type like > "something that has a `no` field? > > Right now, I have a lot of nearly identical code like this: > > findStar : StarNo -> Game -> Maybe