Re: [elm-discuss] Equality Error Undecidable

2016-07-09 Thread Mark Hamburg
This is the issue that drove me to stop using the equality operator in any "generic" code. It would be nice if the compiler would catch this. I would argue for using instantiation equality as a fallback but that would eliminate various opportunities for compiler optimization. Mark > On Jul

Re: [elm-discuss] adding animations causes 100% CPU burn, fans go crazy, even when animations idle

2016-07-09 Thread William Bailey
That worked like a charm. Thanks! I changed subscriptions = handleSubs in App.program and added this. CPU not under control. handleSubs : Model -> Sub Msg handleSubs model = if model.liveAnims then Sub.batch [ Window.resizes WinResize , Mouse.moves MouseMove

Re: [elm-discuss] Sending messages up the component tree in Elm 0.17

2016-07-09 Thread Mark Hamburg
Here is a quick sketch (untested) of a generic container class for children whose views support generating a remove message. I left out the logic for passing commands up through update for brevity: type alias Model childModel = { nextId : Int, children : List (Int, childModel) } type Message

Re: [elm-discuss] Sending messages up the component tree in Elm 0.17

2016-07-09 Thread Mark Hamburg
On Jul 7, 2016, at 6:22 PM, Alex Lew wrote: > > I wrote about a generalization of that pattern a week or so ago, in case > you're interested: > https://medium.com/@alex.lew/the-translator-pattern-a-model-for-child-to-parent-communication-in-elm-f4bfaa1d3f98 I like this

[elm-discuss] Multiple Sublists Elm Decoder

2016-07-09 Thread Matic Zavadlal
Hi! I am trying to create a decoder function which could return a list of "Tags" from json file like this one: { "aggregations" : { "tags" : { "by_field" : { "buckets" : [ { --bucket structure explanation is posted below "key" : "grade", "values" : {

Re: [elm-discuss] Re: Sending messages up the component tree in Elm 0.17

2016-07-09 Thread Sandi Dušić
So many decisions... Really hope Evan announces the official method soon. 2016-07-08 14:43 GMT+02:00 Adam Waselnuk : > I asked about this as well and tried an approach where you return a three > element tuple from the update function. The third element is a message for >

Re: [elm-discuss] adding animations causes 100% CPU burn, fans go crazy, even when animations idle

2016-07-09 Thread Janis Voigtländer
You could try to go with turning the AnimationFrame.times subscription off (based on the current model) whenever you don’t need it because no animation is currently running (which you should be able to know from the current model). Alike to the last example in the

[elm-discuss] Re: Draft blog post - "How to Use Elm at Work" - looking for feedback

2016-07-09 Thread William Bailey
Oh dear. >> Elm promised to offer a nicer interface to creating web apps and isolate people from the insanity of HTML/CSS/JS This is exactly why I chose to go with Elm a couple months ago. I had no interest in becoming enough of an expert on HTML/CSS/JS to do a complex animated game in them.

Re: [elm-discuss] Re: Draft blog post - "How to Use Elm at Work" - looking for feedback

2016-07-09 Thread Janis Voigtländer
Richard, this is the post I had been remembering: https://groups.google.com/d/msg/elm-discuss/Y1B6kKdXCNw/5Ky57c-IAQAJ Sounds like these are other folks, aside from CircuitHub, that have been using Graphics.* in production (but I don’t know for sure what your definition of “in production” is;

Re: [elm-discuss] Re: Draft blog post - "How to Use Elm at Work" - looking for feedback

2016-07-09 Thread Janis Voigtländer
This: Also, Graphics.* has not been “abandoned without an alternative” considering it’s been updated for 0.17 . Anyone who thinks it’s a good choice for work has just as much ability to use it today as they have for the past 3 years! is simply not true, is

[elm-discuss] adding animations causes 100% CPU burn, fans go crazy, even when animations idle

2016-07-09 Thread William Bailey
I recently added animations to my game: deepfinesse.com/demo >From my testing, CPU is 100% even when nothing is animating. This seems to be a consequence of simply adding AnimationFrame.times to my subscriptions. CPU is still 100% if I do nothing but return an unchanged model when

Re: [elm-discuss] An Evidence-Oriented Programming approach to designingElm

2016-07-09 Thread John Orford
there's a podcast about this https://www.functionalgeekery.com/episode-56-garrett-smith/ On Fri, 8 Jul 2016 at 21:34 Raoul Duke wrote: > See ppig.org > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe