Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Fedor Nezhivoi
You might be interested in checking examples here: https://github.com/gyzerok/elm-architecture-plus-tutorial 2016-05-26 21:18 GMT+06:00 germain : > Thanks ~ > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To

[elm-discuss] Re: How can I do module level configuration?

2016-05-26 Thread Ian Mackenzie
I think the first solution (context/options argument) is the clearest and simplest. Yes, it's a bit verbose, but: - You can use the 'view' and 'viewWithOptions' pattern where the former calls the latter with a default primary color etc., so you can get convenience if you don't care

[elm-discuss] Re: Cannot get elm-community/elm-test to work as advertised on the command line

2016-05-26 Thread Ray Toal
Also, PR sent. On Thursday, May 26, 2016 at 10:19:44 PM UTC-7, Ray Toal wrote: > > Thanks for the pointer to that article...Very helpful! > > On Thursday, May 26, 2016 at 9:49:08 PM UTC-7, Max Goldstein wrote: >> >> Hi Ray, sorry for the trouble, glad you got it sorted out. If you like, >> you

[elm-discuss] Re: Cannot get elm-community/elm-test to work as advertised on the command line

2016-05-26 Thread Ray Toal
Thanks for the pointer to that article...Very helpful! On Thursday, May 26, 2016 at 9:49:08 PM UTC-7, Max Goldstein wrote: > > Hi Ray, sorry for the trouble, glad you got it sorted out. If you like, > you can send a PR to elm-community/elm-test to update the README. > > There's also this

[elm-discuss] Re: how to stop subscription?

2016-05-26 Thread Max Goldstein
What's the type of the thing passed to Html.App.program that controls subscriptions? -- 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] Re: Cannot get elm-community/elm-test to work as advertised on the command line

2016-05-26 Thread Max Goldstein
Hi Ray, sorry for the trouble, glad you got it sorted out. If you like, you can send a PR to elm-community/elm-test to update the README. There's also this article: https://medium.com/@_rchaves_/testing-in-elm-93ad05ee1832#.csdz7ictf -- You received this message because you are subscribed to

Re: [elm-discuss] Re: possible race condition in Elm

2016-05-26 Thread Janis Voigtländer
so it seems like the bug might be related to turning the subscription on and off. Sounds a bit like this existing issue on the core repo: https://github.com/elm-lang/core/issues/612 ​ 2016-05-27 2:56 GMT+02:00 Nick H : > I also notice that the problem goes away if you

[elm-discuss] how to stop subscription?

2016-05-26 Thread 诺铁
hi, in the guide http://guide.elm-lang.org/architecture/effects/time.html there is an exercise: Exercises: - Add a button to pause the clock, turning the Time subscription off. but I search the api doc, and didn't find out how to do this? any hints? -- You received this message because

[elm-discuss] Cannot get elm-community/elm-test to work as advertised on the command line

2016-05-26 Thread Ray Toal
Hello I'm doing lots of updating from 0.16 to 0.17 and since Graphics.Element was moved out of core, I figured it was time to ditch ElementRunner and do some nice command line testing. This is great because I have a ton of files with tests in them and would like to just run them all on the

[elm-discuss] Re: Elm 0.16 access

2016-05-26 Thread Max Goldstein
I think there's truth in both positions. Elm is unstable and that's part of the fun, but we need docs for people who didn't experience 0.16. 0.17 is a groundbreaking release, not a polished one. In the meantime we should collect all the docs we DO have and see if that's enough for Mark. --

[elm-discuss] Re: Elm 0.16 access

2016-05-26 Thread Gage Peterson
Mark, it sounds bad but in some ways I think Elm is really only ready for those who are willing to ride a little with the waves of change. If you want something stable for a long period of time I don't think Elm is ready for that. That said, the upside is that Elm is a very simple language

[elm-discuss] Re: possible race condition in Elm

2016-05-26 Thread Fernando Alegre
Yes. It is definitely related to the subscription. I have a large simulation that drains laptop batteries if I keep polling for events when the program is paused. That is why I keep subscribing and un-subscribing, to save customers' batteries. On Thursday, May 26, 2016 at 9:57:46 AM UTC-5,

Re: [elm-discuss] Re: possible race condition in Elm

2016-05-26 Thread Nick H
I also notice that the problem goes away if you leave the AnimationFrame subscription on. (Combined with the code change I suggested above, the program still behaves the same). subs model = AnimationFrame.diffs Tick so it seems like the bug might be related to turning the subscription on and

Re: [elm-discuss] Re: possible race condition in Elm

2016-05-26 Thread Nick H
Hmm, it's not just unresponsive, it is crashing. In Firefox it crashes with this console output: 17:24:41.933 TypeError: process.root is null step() index.html:2342 work() index.html:2458 1 index.html:2342:7 Chrome crashes at the same lines for the same reason. I couldn't find a relevant issue

[elm-discuss] Re: possible race condition in Elm

2016-05-26 Thread Fernando Alegre
Nick: Changing the code as you suggested does not fix it. There is a race condition that is going on at some level below, either on the Elm runtime or the browser code. Please try it, and you see that even with your suggestion, the program will become unresponsive after clicking a dozen times

[elm-discuss] Re: Nested components and async JS via ports

2016-05-26 Thread besuikerd
I have come across this problem aswell. I made an example that illustrates this issue when composing the spellchecker described in the guide . It can be found ar besuikerd/port-clash . AFAIK The only

Re: [elm-discuss] Re: [ANN] ElmFiddle.io - Elm snippets sharing made almost entirely using Elm

2016-05-26 Thread Joey Eremondi
I've fiddled with GHCJS Elm before, and it's a complicated road to go down. Elm-format on GHCJS is a much easier starting point. Compiling a single Elm file with no standard library is quite easy, since you can just compile the elm-compiler library using GHCJS. However, it's trickier to get the

Re: [elm-discuss] Announcing elm-lang/navigation for "routing in single-page apps"

2016-05-26 Thread Cristian Garcia
Max and Ryan have very good points: 1. The community was somehow expecting a subscription/effect system for the location, this way a library like e.g. Hop could build upon it. 2. In theory, exposing an "update" function for the router that the user could use when a "Navigation" message comes in

Re: [elm-discuss] Re: [ANN] ElmFiddle.io - Elm snippets sharing made almost entirely using Elm

2016-05-26 Thread Gabriel Grinberg
Thanks Rex! I actually wanted to do that in the first place - compile the Elm compiler to JS but that didn't go to well. I hope it's possible and will try to find time to try again. If anyone has experience with GHCJS a client side elm com.piler can be awesome! On May 26, 2016 11:02 PM, "Joey

Re: [elm-discuss] Announcing elm-lang/navigation for "routing in single-page apps"

2016-05-26 Thread Evan
Simon, just like I said here , create an http://sscce.org/ and open a new issue. Provide a minimal Elm program that exhibits the error, compiles, etc. Read http://sscce.org/, particularly the part about self-contained. On Thursday, May 26, 2016

Re: [elm-discuss] Re: Elm 0.16 access

2016-05-26 Thread Mark Hamburg
I've been swimming in Elm for a while and generally understand the changes. My problem is that at the current state of 0.17 (documentation, missing features, external tutorials), I can't readily recommend that someone else dive in to try it. There are too many rough edges where support is

[elm-discuss] Re: New App running Elm

2016-05-26 Thread Gage Peterson
looks nice man :D. I love to see new things in Elm. On Wednesday, May 25, 2016 at 11:59:44 PM UTC-6, Zachary Kessin wrote: > > Hi All > > I just wanted to let you know about my new App that runs on Elm > SquareTarget! http://squaretarget.rocks > > The signup on the main page, as well as

[elm-discuss] pong example

2016-05-26 Thread Luis
Hello I found very clear the making-pong blog here: http://elm-lang.org/blog/making-pong but the source code is on 404 ;( Where can I found the code and information to install dependencies ? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To

Re: [elm-discuss] Re: [ANN] ElmFiddle.io - Elm snippets sharing made almost entirely using Elm

2016-05-26 Thread Joey Eremondi
Either that or GHCJS, which seems to have a lot more support from the Haskell community. (Not sure why though). Looking here it sounds like GHCJS is more complete and closer to GHC, but Haste makes

[elm-discuss] Re: [ANN] ElmFiddle.io - Elm snippets sharing made almost entirely using Elm

2016-05-26 Thread Gage Peterson
I think that looking at: https://github.com/valderman/haste-compiler would be cool. This means that things like the elm-fmt and the elm compiler itself could be (maybe easily) run in the browser. On Thursday, May 26, 2016 at 10:52:10 AM UTC-6, Rex van der Spuy wrote: > > This is wonderful,

[elm-discuss] Re: Elm 0.16 access

2016-05-26 Thread Rex van der Spuy
Hi Mark, Until Elm reaches 1.0, frequent, breaking API changes with every new release are what we all sign-up for if we choose to use Elm. In fact, that's part of the fun :) I would just jump headlong into 0.17 and enjoy it. - Rex On Tuesday, May 24, 2016 at 12:26:31 PM UTC-4, Mark Hamburg

Re: [elm-discuss] proof of concept share/import feature for elm-lang.org/try

2016-05-26 Thread Nick H
Sounds like you should check out (and maybe contribute to) ElmFiddle.io! On Thu, May 26, 2016 at 3:04 AM, Janis Voigtländer < janis.voigtlaen...@gmail.com> wrote: > Concerning the question whether this is a wanted feature at > http://elm-lang.org/, there is this comment by Evan: >

Re: [elm-discuss] Re: possible race condition in Elm

2016-05-26 Thread Nick H
This is indeed a race condition, but it looks like the fault may be in your code. The only thing that should transition the model from Stopped to Running is a Resume message. If a Tick is received when the model is Stopped, the tick needs to be ignored. let model' = case msg of ...

Re: [elm-discuss] Re: unexpected behavior when double nesting modules

2016-05-26 Thread Janis Voigtländer
So maybe an additional case to report at https://github.com/elm-lang/virtual-dom/issues/21 (though I don’t know whether an additional report is really needed — it’s not fully clear to me whether 4.0.1 was supposed to fix this or whether to expect a separate bug fix release for that). ​ 2016-05-26

Re: [elm-discuss] Static Tzpe Checking in Elm vs Java

2016-05-26 Thread Joey Eremondi
I feel Elm with dependent types is probably just Idris. They seem to have similar pragmatic philosophies, started from Haskell but have been gradually breaking in ways to make things nicer, try to make good error messages, etc. I'd love to see what TEA looks like in Idris though. And it compiles

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Peter Damoc
You can also call the function recursively: update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of IncrementBothCounters -> model |> update IncrementFirstCounter |> fst |> update IncrementFirstCounter

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Janis Voigtländer
Well, of course Cmd.batch [send IncrementFirstCounter, send IncrementSecondCounter]. ​ 2016-05-26 16:29 GMT+02:00 Janis Voigtländer : > Cmd.batch [ send IncrementFirstCounter, send IncrementFirstCounter] > > where: > > send msg = performFailproof identity

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Janis Voigtländer
Cmd.batch [ send IncrementFirstCounter, send IncrementFirstCounter] where: send msg = performFailproof identity (Task.succeed msg) and where performFailproof comes from http://package.elm-lang.org/packages/NoRedInk/elm-task-extra. ​ 2016-05-26 16:24 GMT+02:00 germain :

[elm-discuss] Import module from src directory in elm-repl

2016-05-26 Thread Max Goldstein
Have a look at elm-package.json. It lists the source directories, and probably had . instead of ./src. -- 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

Re: [elm-discuss] Re: unexpected behavior when double nesting modules

2016-05-26 Thread Janis Voigtländer
If that’s indeed what you ran into, it would be good if you can check it persists when using version 4.0.1 of core, and report back whether or not that version fixes things for you. ​ 2016-05-26 16:20 GMT+02:00 Janis Voigtländer : > It could be this:

[elm-discuss] one message calls two messages

2016-05-26 Thread germain
Hi, This is the plan: There is one counter with its button which increments it by one. There is another counter with its button which increments it by one. And finally there is another button which increments both above counters by one. Is it possible to the last button to send a message to

Re: [elm-discuss] Re: unexpected behavior when double nesting modules

2016-05-26 Thread Janis Voigtländer
It could be this: https://github.com/elm-lang/virtual-dom/issues/21, if your nesting means that you have to repeatedly Html.App.map messages to route them around. ​ 2016-05-26 15:31 GMT+02:00 John Askew : > Hi Max, > > The results of that bug do sound similar, but I tried

[elm-discuss] Heisenbug report :)

2016-05-26 Thread Peter Damoc
I sometime get this error in the console: "Deferred long-running timer task(s) to improve scrolling smoothness. See crbug.com/574343." I have no idea what causes it and I cannot reproduce it consistently. I first saw this error after I started using the new elm-lang/navigation module but that's

[elm-discuss] Import module from src directory in elm-repl

2016-05-26 Thread Julian
Hi! I just started working on my first elm app after a year or so of lurking the elm community. I have written a few functions and put them into a module located in my `src` directory and everything compiles fine. But when I start elm-repl from the root of my project (where the `elm-stuff`

Re: [elm-discuss] Static Tzpe Checking in Elm vs Java

2016-05-26 Thread John Orford
the first rule of Elm Type Club is you don't have to talk about types. adding them back into the mix'd prob be hairy for a lot of people - then again if you could do it in a v friendly way, there's lotsa benefits... I heard Matz of Ruby fame talk about something similar once. On Thu, 26 May 2016

Re: [elm-discuss] Static Tzpe Checking in Elm vs Java

2016-05-26 Thread Zachary Kessin
I have thought about the idea of building a next gen elm with idris style dependent types. To be called "Pine" of course ;) Mind you I have neither the skills nor the time to do such a thing. But its a cool idea Zach ᐧ On Thu, May 26, 2016 at 9:56 AM, John Orford wrote:

Re: [elm-discuss] Announcing elm-lang/navigation for "routing in single-page apps"

2016-05-26 Thread Fedor Nezhivoi
Shouldn't "s" function be named as "strict"? 2016-05-26 12:10 GMT+06:00 Bogdan Popa : > I've updated elm-route's example app to use `elm-lang/navigation`[1]. > The diff[2] looks pretty good if you ask me. Thanks guys! > > 1:

[elm-discuss] How can I do module level configuration?

2016-05-26 Thread Peter Damoc
Let's say I have a module that encapsulates a series of widgets and I want to publish this module with elm-package in order to make it available to others. Let's say that there is the concept of a `primaryColor` for these widgets. How can I have the users change the `primaryColor`? I can think

Re: [elm-discuss] proof of concept share/import feature for elm-lang.org/try

2016-05-26 Thread Janis Voigtländer
Concerning the question whether this is a wanted feature at http://elm-lang.org/, there is this comment by Evan: https://github.com/elm-lang/elm-lang.org/issues/519#issuecomment-218553560 ​ 2016-05-25 18:29 GMT+02:00 Matteo Bertini : > I have a proof of concept

Re: [elm-discuss] Trigger child action from parent

2016-05-26 Thread TheGryzor123
Thanks @Peter, I like your update pattern. On Thursday, May 26, 2016 at 8:00:32 AM UTC+2, Milos Nedeljkovic wrote: > > I find first pattern (sending information upstream) a lot better, becuase > it seems to be more versatile. > It covers well also scenario where message does not come from view

Re: [elm-discuss] Announcing elm-lang/navigation for "routing in single-page apps"

2016-05-26 Thread Bogdan Popa
I've updated elm-route's example app to use `elm-lang/navigation`[1]. The diff[2] looks pretty good if you ask me. Thanks guys! 1: https://github.com/Bogdanp/elm-route/tree/master/examples/app 2: https://github.com/Bogdanp/elm-route/commit/2b33522c09213b1197fe9512c9ac3fc745b1f16d Evan

[elm-discuss] Elm Training in Israel & Europe

2016-05-26 Thread Zachary Kessin
Hi All I am putting together a 3 or 4 day Elm training class for companies which are thinking about adopting elm. I will be happy to bring this to your company in Israel or Europe. Topics to be covered - Introduction to Elm - Understanding the type system - The Elm Architecture -

Re: [elm-discuss] Trigger child action from parent

2016-05-26 Thread Milos Nedeljkovic
I find first pattern (sending information upstream) a lot better, becuase it seems to be more versatile. It covers well also scenario where message does not come from view but from command or subscription. Take for example List of Gif fetchers variation, where RandomGif should be removed from

[elm-discuss] New App running Elm

2016-05-26 Thread Zachary Kessin
Hi All I just wanted to let you know about my new App that runs on Elm SquareTarget! http://squaretarget.rocks The signup on the main page, as well as several internal pages are in Elm. I have to say of all the years I have been doing JavaScript development this is the first time I have managed