[elm-discuss] Animation example on intro guide missing--alternatives?

2016-08-02 Thread smeltzek
Hello, I've been working through the early examples in the guide (guide.elm-lang.org) and discovered that the animation example doesn't exist yet. Unfortunately for me, this is one of my main areas of interest at the moment, and while the guide says to expect an update in the next few weeks,

Re: [elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Ambrose Laing
In the previous posting there is a bug -- I should simply use e = ... instead of e = f ... If you want to make the previous write up work, then you need f : X -> E and ... is of type X rather than the following which is a mistake. f: E -> X and ... is of type E On Tuesday, August 2,

Re: [elm-discuss] Shouldn't this kind of naming error... be an error?

2016-08-02 Thread John Bugner
I made an issue here: https://github.com/elm-lang/error-message-catalog/issues/150 Perhaps it'll be easier to understand with some examples: (a) file name : Main.elm module name : Main result : No error is given, just as it should be. (b) file name : Main.elm module name : NotMain result :

[elm-discuss] Re: Scheduling tasks

2016-08-02 Thread Nikolai Koudelia
Yes, it works , thanks for the tip. Didn't figure out to search for it under Process because I somehow expected that module to contain process-related stuff (which it does too - spawn, kill). Also "sleep" as a name for such a

Re: [elm-discuss] Shouldn't this kind of naming error... be an error?

2016-08-02 Thread Joey Eremondi
I'm not sure that the problem is that the filename doesn't match the module name, but that the module name needs to start with a capital letter. That's why it's a syntax error: the parser is looking for a capitalized word, and it's not seeing one. Certainly the message could be more clear and

Re: [elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Austin B
I think that would be the case. Although, I'd imagine I'd be using dictionaries in this situation once I get to the point of having "Maybe" data in this particular example. I am beginning to understand the value of flattening data structures in this context. On Tuesday, August 2, 2016 at

[elm-discuss] Preserving DOM state on update

2016-08-02 Thread Nick Johnson
Hi, I've been working through the Elm Guide recently to learn about the updates in 0.17, and just completed the example gif-fetching app in the HTTP effects section. http://elm-lang.org/examples/http I noticed that when pressing the "More Please" button, the GIF playback restarts while the

[elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Austin B
Hi all, I really appreciate the ample feedback. As I am new to the functional style, Sergey, your input is extremely helpful. For some reason, I felt like I was supposed to have all my modifiers and data structure definitions in one place, which became unmanageable. I am currently refactoring

Re: [elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Duane Johnson
I like the syntax. It's intent is clear. However, correct me if I'm wrong, but it would only work for records of records, correct? No way to deal with a "Maybe Forecast", right? On Tue, Aug 2, 2016 at 12:53 PM, Ambrose Laing wrote: > Correction: what I should have written is:

[elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Ambrose Laing
Correction: what I should have written is: { model | primaryForecast.parameters.q = ... } instead of { model | model.primaryForecast.parameters.q = ... } because the former is more consistent with the notion that the field between the | and the = must exist inside the record to the left of

[elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Anton Lorenzen
I think we should wait for Elm to get typeclasses and use lenses for that. https://en.wikibooks.org/wiki/Haskell/Lenses_and_functional_references -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving

[elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Anton Lorenzen
You might want to look into the Focus library: http://package.elm-lang.org/packages/evancz/focus/2.0.1/ But as you probably want to render your data as html, I would recommend you to break your data into modules and use the Elm Architecture:

[elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Robin Heggelund Hansen
As far as I know, this is how you must do at present. It's a recorded issue though (https://github.com/elm-lang/elm-compiler/issues/1375) so it will hopefully be fixed in a future release. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To

Re: [elm-discuss] Re: elm first impressions (and frustrations)

2016-08-02 Thread Zachary Kessin
That would be amazing. I would settle for having a way to export all the ajax calls from a program (and ports) with what kind of data they expect. So you could say that there can be a post to /path/to/resource with a json of this shape. That alone would let me write a test on the server side (or