Re: [elm-discuss] Re: Open discussion about optimization of code potentially triggered very often (mousemove) ?

2016-11-20 Thread Matthieu Pizenberg
Thank you Nick, indeed it worked. It is far better now :). Though there is still a minor issue. It is the fact that some applications may become incorrect if some events are ignored (the ones before view update at next frame). Meanwhile, I have been digging a bit and found one quite impressive

[elm-discuss] Re: Proposal: import groups

2016-11-20 Thread Robin Heggelund Hansen
Hmm. What makes it less clear? It essentially just removes the need to write `import` for every line. mandag 21. november 2016 03.07.29 UTC+1 skrev Daniel Walker følgende: > > I was referring to your proposal. Josh's proposal is clearer but still not > as clear as what we have today IMHO. > >

[elm-discuss] Re: Proposal: import groups

2016-11-20 Thread Daniel Walker
I was referring to your proposal. Josh's proposal is clearer but still not as clear as what we have today IMHO. On Sunday, November 20, 2016 at 5:25:29 PM UTC-7, Robin Heggelund Hansen wrote: > > My proposal, Josh's proposal, or both? > > mandag 21. november 2016 00.51.36 UTC+1 skrev Daniel

Re: [elm-discuss] Re: Open discussion about optimization of code potentially triggered very often (mousemove) ?

2016-11-20 Thread Nick H
That actually sounds like it works pretty well. Even though you are getting multiple triggers, you are still preventing an enormous volume of mousemove updates. (I am assuming the time until reactivation is relatively long). The only thing that I would add is a filter on MoveMsg updates... if

[elm-discuss] Re: Proposal: import groups

2016-11-20 Thread Robin Heggelund Hansen
My proposal, Josh's proposal, or both? mandag 21. november 2016 00.51.36 UTC+1 skrev Daniel Walker følgende: > > This seems a lot less readable than what we currently have to me. > > On Saturday, November 19, 2016 at 11:38:16 PM UTC-7, Robin Heggelund > Hansen wrote: >> >> I've done some Go

[elm-discuss] Re: Proposal: Shorter qualified imports

2016-11-20 Thread Max Goldstein
It's tedious to write, and slightly tedious to read, but Elm thinks that *tedium is better than mystery* and anything implicit or shortcut-like would be mysterious. Elm also doesn't like having multiple ways to do things. -- You received this message because you are subscribed to the Google

[elm-discuss] Re: Proposal: import groups

2016-11-20 Thread Daniel Walker
This seems a lot less readable than what we currently have to me. On Saturday, November 19, 2016 at 11:38:16 PM UTC-7, Robin Heggelund Hansen wrote: > > I've done some Go programming lately, and have been inspired by the way > imports are handled. This is one of two proposals to make minor >

Re: [elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread Martin DeMello
I like Some and None, plus it'd be consistent with ocaml martin On Sun, Nov 20, 2016 at 3:41 PM, Robin Heggelund Hansen < skinney...@gmail.com> wrote: > How about 'Some' and 'None'? > Those are not longer to type than what we have today, and they should > solve your initial confusion. > > >

[elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread Robin Heggelund Hansen
How about 'Some' and 'None'? Those are not longer to type than what we have today, and they should solve your initial confusion. søndag 20. november 2016 18.16.26 UTC+1 skrev Will White følgende: > > I'm talking about Maybe.Just, of course. Just has always seemed strange to > me, as if it's

[elm-discuss] Can Javascript to start Elm app be attached per page?

2016-11-20 Thread Brian Marick
Note: newbie to Javascript and frontend in general. TL/DR: I would like to see an example of the Best Way to (1) have N urls invoke N single-page Elm apps, and (2) pass each of them url-specific flags (to be received by `Html.App.programWithFlags`). - The Elixir/Phoenix book [1]

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Wouter In t Velt
To get decent styling of tables I always use CSS flexbox, as classes for plane and tags. I'm sure there are ways to work too, but for me, they also tend to jump around and behave in unexpected ways. For elm specifically, you could look at devoid/elm-mdl, Or use material design light CSS

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Thomas Shelton
Thanks ... I think I understand how it works now. I agree on the editing and using input tags but I haven't been able to come up with easy way to prevent the table from jumping around when I set up the input field. I'll give it a bit more thought. Thanks again for the help. Thomas On Sun,

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Wouter In t Velt
Op zondag 20 november 2016 20:17:04 UTC+1 schreef Thomas Shelton: > > I'm not sure onInput will work with TD's though. I'm not seeing any > messages logged in the console. > Yeah, you are right. `onInput` does not fire on TDs. I have changed my example to include your custom `on` handler for

Re: [elm-discuss] Re: ANN: update-clock for fixed-time-step game loops

2016-11-20 Thread Nick H
The purpose of the Clock is to relate the passage of time in the "real" world to the passage of time in the simulated world. So the Clock is fundamentally something that exists outside of the simulation... there is no need for the simulation to know about it. Having said that, I feel more

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Witold Szczerba
Just my 2 cents: instead of (sometimes) cryptic: type Msg = Input Int Int String one can use something more explicit like: type Msg = Input {row: Int, col:Int, value: String} It depends on the very case though, too verbose does not help either :) Regards, Witold Szczerba On Sun, Nov 20, 2016 at

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Thomas Shelton
Thanks for the insights ... I'm not sure onInput will work with TD's though. I'm not seeing any messages logged in the console. I had to create a separate function to parse out the innerHTML and use that as the string. I think this is where my confusion sets in. How can you do that and still

[elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Wouter In t Velt
Your Msg is the type you use to send data back. You actually send it to the Elm runtime. The Elm runtime then sends it to your update function, together with a model. The nice thing is, you can pass more than one parameter in your message. If you define your message as: type Msg = Input Int

[elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread 'Andrew Radford' via Elm Discuss
"Something 2" ? I think the popular choices are Some/None and Just/Nothing. I wonder if there are any other better versions out there... On Sunday, 20 November 2016 17:18:17 UTC, Will White wrote: > > What's strange is that "Just 2" makes it sound

[elm-discuss] Re: Proposal: import groups

2016-11-20 Thread Will White
Makes sense. It reads as it would be spoken. On Sunday, November 20, 2016 at 6:38:16 AM UTC, Robin Heggelund Hansen wrote: > > I've done some Go programming lately, and have been inspired by the way > imports are handled. This is one of two proposals to make minor > modifications to how

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread Witold Szczerba
Something would be too long in my opinion. 20.11.2016 6:16 PM "Will White" napisał(a): > I'm talking about Maybe.Just, of course. Just has always seemed strange to > me, as if it's hinting that it's something other than just the counterpart > to Nothing. I don't know the

[elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread Will White
What's strange is that "Just 2" makes it sound like the alternative is "*more than* Just 2", the *opposite* of Nothing. On Sunday, November 20, 2016 at 5:16:26 PM UTC, Will White wrote: > > I'm talking about Maybe.Just, of course. Just has always seemed strange to > me, as if it's hinting that

[elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread Will White
I'm talking about Maybe.Just, of course. Just has always seemed strange to me, as if it's hinting that it's something other than just the counterpart to Nothing. I don't know the reasons behind its naming, but I think I would prefer Something, as in "something or nothing". What do you think?

[elm-discuss] Edit Table Cell

2016-11-20 Thread Thomas Shelton
Hi all, I need some basic table functionality and though about adding in one of the many JS libraries but decided to try and work it out in Elm since I only need some very basic functionality. I have this working but need some direction on how to pass information about the TD being edited. I

Re: [elm-discuss] Re: ANN: update-clock for fixed-time-step game loops

2016-11-20 Thread Gaëtan André
Passing Clock.period would be indeed more useful in the example's use case. Could we imagine update functions where the total elapsed time is needed? Wouldn't it be more flexible to pass the Clock object? Le samedi 19 novembre 2016 18:59:02 UTC+1, Nick H a écrit : > > Great questions. > > I am

[elm-discuss] Re: Proposal: import groups

2016-11-20 Thread Josh Adams
> > I propose to change the current import syntax so that there can only be > one import statement per module, and that it looks like the following: > > ``` > imports ( > Module.A, > Module.B exposing (..), > Module.C as Name > ) > ``` > This one, I feel a lot better about. I could

[elm-discuss] Re: Proposal: Shorter qualified imports

2016-11-20 Thread Josh Adams
> > What I am concerned about is that it would be implicit, and all implicit > things tend to lead to confusion. > I'm  on this proposal for the same reason. Elm changed me on this. I'm now *substantially happier* when wiring everything up explicitly. Having said this, I was  on 4-spaces

Re: [elm-discuss] Re: Open discussion about optimization of code potentially triggered very often (mousemove) ?

2016-11-20 Thread Matthieu Pizenberg
I have been trying something that I think could be shared. Basically I tried to see if it was possible to throttle commands by controlling the event attributes in the view that generate those commands. Well, turns out, not really ^^. The idea was the following: * In the model, have an

Re: [elm-discuss] --debug with Navigation

2016-11-20 Thread Marcus Roberts
It's working for me. I had to switch to using fullscreen rather than embedded but apart from that it's working fine in Safari and Chrome on the Mac. Elm.Main.fullscreen() On Sun, Nov 20, 2016 at 7:23 AM, Simon wrote: > Is it possible that the two are not compatible?