[elm-discuss] (at least) one example of each function in the standard library

2016-10-15 Thread Fa Qing
There are plenty of tutorials, etc., to help newcomers get started, but as we start to delve deeper into the Elm ecosystem, it would be super helpful if each function in the standard library included at least one simple example. It would require a bit of effort and discipline, but this seems to

[elm-discuss] Re: Catching error in fullscreen/App.programWithFlags

2016-10-15 Thread OvermindDL1
You will not be able to do that as Elm has its own scheduler that uses `setTimeout(0, ...)` to do the event loops, including the very first init, and that errors causes that event loop to die. I'd probably recommend changing your flags to handle this case differently or you might be able to do

Re: [elm-discuss] Re: Html.Keyed

2016-10-15 Thread OvermindDL1
On Wednesday, October 12, 2016 at 5:32:09 AM UTC-6, Max Froumentin wrote: > > Thanks OvermindDL1, that's very helpful. I now understand it's down to the > lack of two-way binding. Makes sense. > Wouldn't it be useful to use a change of id attribute as a change of key? > Yep, adding an attribute I

Re: [elm-discuss] Catch Elm.Main.fullscreen "unexpected argument" error?

2016-10-15 Thread Peter Damoc
You can check for a version of the storage schema and patch the data before sending it to Elm (or just drop it). In your case, you could also work with the fact that you know that the new version has comments: const storedState = localStorage.getItem('model'); var startingStat

Re: [elm-discuss] Outgoing port event ordering

2016-10-15 Thread Peter Damoc
Cmd.batch does not make any guarantee about the order of execution. It is use to bundle a batch of commands in one entity. If you need order of execution, you need to use something lower level, like Tasks where you have `andThen`. On Thu, Oct 13, 2016 at 9:59 PM, David Andrews wrote: > When us

[elm-discuss] Re: Can I use css animations normally in elm?

2016-10-15 Thread Wouter In t Velt
Interesting! Having only discrete state in elm, with animations in CSS will definitely keep code simpler. -- 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-dis

Re: [elm-discuss] Properly using Task.perform with tasks that always succeed

2016-10-15 Thread Austin Bingham
Brilliant, thanks! On Sat, Oct 15, 2016 at 8:06 PM Janis Voigtländer < janis.voigtlaen...@gmail.com> wrote: > The function from that thread exists as > http://package.elm-lang.org/packages/NoRedInk/elm-task-extra/2.0.0/Task-Extra#performFailproof > > > > Am 15.10.2016 um 19:39 schrieb Austin Bing

Re: [elm-discuss] Properly using Task.perform with tasks that always succeed

2016-10-15 Thread Janis Voigtländer
The function from that thread exists as http://package.elm-lang.org/packages/NoRedInk/elm-task-extra/2.0.0/Task-Extra#performFailproof > Am 15.10.2016 um 19:39 schrieb Austin Bingham : > > I've got a situation where I've got task that will always succeed, and I want > to know the best practic

[elm-discuss] Properly using Task.perform with tasks that always succeed

2016-10-15 Thread Austin Bingham
I've got a situation where I've got task that will always succeed, and I want to know the best practice for using it with Task.perform. The task itself is a Task.sequence of tasks that may individually fail, and I want to report the result - success or failure - for each of them. So there's no

[elm-discuss] Catching error in fullscreen/App.programWithFlags

2016-10-15 Thread Kevin Berridge
I'm using App.programWithFlags to initialize the state of my model from local storage (as described in this blog article ). But when the schema of my model changes (ex: I added a new field to a record ty

[elm-discuss] Outgoing port event ordering

2016-10-15 Thread David Andrews
When using Cmd.batch to send data over two ports, the ports receive the events in the same order regardless of the order in which they appear in the batch. I would expect the events to occur in the order they appear in the batch. Working example: https://daviddta.github.io/elm-port-order-bug/

[elm-discuss] Order of outgoing port events

2016-10-15 Thread David Andrews
When using Cmd.batch to send data over two ports, the ports receive events in the same order regardless of the order in which they appear in the batch. I think that they should occur in the order in which they appear in the batch instead. Working example: https://daviddta.github.io/elm-port-or

[elm-discuss] Catch Elm.Main.fullscreen "unexpected argument" error?

2016-10-15 Thread Kevin Berridge
Is there a way to catch the "You are trying to initialize module `Main` with an unexpected argument." error when calling Elm.Main.fullscreen({}) with out of date arguments? I tried wrapping it in a try/catch, but the catch is not running. What I'm really trying to do is pass in state that was

[elm-discuss] Re: trying to draw a diagram about elm-architecture

2016-10-15 Thread Lidor Cohen
I did some drawing myself in attempt to understand better the elm architecture. It's by hand and focusing mostly on basic data flow... https://drive.google.com/open?id=0B7DsiWb2uc5AOGxiZVZoMFNxbW8 I'd love to get some feedback :) On Tuesday, May 31, 2016 at 6:14:38 AM UTC+3, 大魔头 wrote: > > hi,

[elm-discuss] Where have the nested counter examples gone ?

2016-10-15 Thread clouddie
Hi, a few months ago there were examples to scale and nest elm apps with list of counters ? I cannot find them anymore, does anyone know where they have been ? Was it bad practice ? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe

[elm-discuss] Re: Can I use css animations normally in elm?

2016-10-15 Thread Simone Vittori
I think it's worth mentioning your Elm code can be totally independent from any animation done in an external stylesheet. See this style for example: https://github.com/simonewebdesign/elm-double-folding-pattern/blob/a27de84ba14f46f46d4d3878b233dcd32b31d13d/style.css#L357 The animation starts

[elm-discuss] Re: Can I use css animations normally in elm?

2016-10-15 Thread Wouter In t Velt
Op vrijdag 14 oktober 2016 21:21:03 UTC+2 schreef Aislan de Sousa Maia: > > Some repo to see this more advanced animations with CSS + Elm ?? > Sorry, no repo (have yet to learn more about github). But let's say, you want to animate adding an item to a list, and do stuff after the animation ended,

[elm-discuss] Re: Another case of functions in the model

2016-10-15 Thread Oliver Searle-Barnes
Have you had a look at (the currently not released) https://github.com/saschatimme/elm-phoenix? Phoenix channels have request/response semantics built in which you can use in elm-phoenix via Phoenix.push - https://github.com/saschatimme/elm-phoenix/blob/master/src/Phoenix.elm#L85. See Push.ok