Re: [elm-discuss] Re: Code review request

2016-08-23 Thread Janis Voigtländer
It’s some form of compiler bug. If in your gist, you replace the output type HasX a by { a | x : Float }, which is its definition, then the gist will suddenly compile. So I think you should try to bring this example down to a minimal case and then open a bug report at

Re: [elm-discuss] Re: Composability without extensible records

2016-08-23 Thread Peter Damoc
On Wed, Aug 24, 2016 at 12:30 AM, Richard Feldman < richard.t.feld...@gmail.com> wrote: > At work we have 36,000 LoC of production Elm. One of our most complicated > pages has a Model with 55 fields in it, and a Msg with 40 type > constructors, and it feels *nice to maintain*. A year ago it was a

[elm-discuss] Re: Code review request

2016-08-23 Thread Thomas Ballinger
I thought I'd bump this, I'd appreciate a pointer of something to read or an example that might clarify things. On Friday, August 19, 2016 at 12:43:13 PM UTC-4, Thomas Ballinger wrote: > > I can see experimentally this is the case, but would someone mind spelling > this out a bit for me? I

[elm-discuss] Re: Task ports: A proposal to make it easier to integrate JS with Elm.

2016-08-23 Thread Erik Lott
> > But isn't that covered by the error handling of tasks? The same way as > when you use the "built-in" tasks like Http? Http gets around the general > issue of "what happens if this never returns" using the Http.Error value > Timeout. Maybe something similar could be used for Task Ports.

[elm-discuss] Re: Composability without extensible records

2016-08-23 Thread Charles-Edouard Cady
While I understand that not breaking things up too often is sound advice in elm, I still think this doesn't answer my question: you're basically saying "you're doing it way too often" but you're not saying "don't do it at all" so I do need to find a scalable way of doing it a bit. The problem I

[elm-discuss] Re: Task ports: A proposal to make it easier to integrate JS with Elm.

2016-08-23 Thread Tim Stewart
But isn't that covered by the error handling of tasks? The same way as when you use the "built-in" tasks like Http? Http gets around the general issue of "what happens if this never returns" using the Http.Error value Timeout. Maybe something similar could be used for Task Ports. In the same

Re: [elm-discuss] Re: Composability without extensible records

2016-08-23 Thread Richard Feldman
For sure! :D On Tue, Aug 23, 2016, 2:51 PM OvermindDL1 wrote: > That is quite true, taking only the parts the function needs via matching > out `{ parts, of, a, model }` is quite nice and extendable as needed. :-) > > > On Tuesday, August 23, 2016 at 3:30:46 PM UTC-6,

[elm-discuss] Re: Composability without extensible records

2016-08-23 Thread OvermindDL1
That is quite true, taking only the parts the function needs via matching out `{ parts, of, a, model }` is quite nice and extendable as needed. :-) On Tuesday, August 23, 2016 at 3:30:46 PM UTC-6, Richard Feldman wrote: > > > > On Tuesday, August 23, 2016 at 11:43:49 AM UTC-7, OvermindDL1

[elm-discuss] Re: Elm-mdl implementations - suggest projects that can be added to reference list

2016-08-23 Thread Gary Stanton
Hi I see you have got my project in there: https://github.com/stanton-gary/force-pong I've now added a Live Demo of it along with renaming the project which you can reflect in your list. Also added another project that uses elm-mdl which also has a live demo:

[elm-discuss] Re: Composability without extensible records

2016-08-23 Thread Richard Feldman
On Tuesday, August 23, 2016 at 11:43:49 AM UTC-7, OvermindDL1 wrote: > > On Tuesday, August 23, 2016 at 11:24:22 AM UTC-6, Richard Feldman wrote: >> >> You are on the road to #2, so my macro-level suggestion would be to go >> back to #1. :) >> > > #1 also ends up making utterly *huge* model and

[elm-discuss] Re: elm-lang/virtual-dom/VirtualDom.js, F2(), F3(), A2(), A3()

2016-08-23 Thread jeffb0098
Thanks. -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Re: [elm-discuss] Old browsers

2016-08-23 Thread Nick H
summary of that link, regarding IE... Elm should work in IE9 and above. Even though IE9 doesn't support strict mode, strict mode is backwards-compatible, so it won't cause any issues. On Tue, Aug 23, 2016 at 12:43 PM, Nick H wrote: > As far as I know there is no

Re: [elm-discuss] Old browsers

2016-08-23 Thread Nick H
As far as I know there is no official list, but Elm's compiler output is plain old ECMAScript 5, so I imagine its compatibility table looks the same as this . On Tue, Aug 23, 2016 at 9:45 AM, Max Froumentin wrote: > Hi there,

Re: [elm-discuss] elm-lang/virtual-dom/VirtualDom.js, F2(), F3(), A2(), A3()

2016-08-23 Thread Joey Eremondi
https://github.com/elm-lang/elm-make/blob/master/src/Pipeline/Generate.hs They get bundled into the Runtime of a generated Elm file. They allow for currying of JS functions. F2 takes a 2-argument JS function and returns a curried version of it (takes one argument, and returns another function

[elm-discuss] elm-lang/virtual-dom/VirtualDom.js, F2(), F3(), A2(), A3()

2016-08-23 Thread jeffb0098
The source code for Elm virtual-dom contains a file VirtualDom.js In this file are calls to functions F2(), F3(), A2(), A3(). I can't find where these functions are defined or what they do, and I would like to know. -- You received this message because you are subscribed to the Google Groups

[elm-discuss] Re: Composability without extensible records

2016-08-23 Thread OvermindDL1
On Tuesday, August 23, 2016 at 11:24:22 AM UTC-6, Richard Feldman wrote: > > You are on the road to #2, so my macro-level suggestion would be to go > back to #1. :) > #1 also ends up making utterly *huge* model and message unions though, with extremely non-reusable parts. :-) But yes, for a

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

2016-08-23 Thread Jessica Kerr
In case someone else finds this by googling like I did -- elm-test wasn't working for me; running `elm-test` worked once, and every time after that I saw an error like "Cannot find package Mouse" (when the package was installed fine) It was fixed by updating node. On Thursday, May 26, 2016 at

[elm-discuss] Re: Composability without extensible records

2016-08-23 Thread Richard Feldman
> I'm building an application to help ship captains create routes. My > question is about the organization of the model of this application. > > The application *currently has one page* containing *three widgets* > Sorry to ramble on about this, but it's been a thorn in my side for a long >

Re: [elm-discuss] Dynamic implementation resolving

2016-08-23 Thread Nick H
I am not sure what you mean by routing to an implementation "in a generic way". You can clean up your code a lot by merging your "Model" type with "Impl". This is the more idiomatic way of writing in Elm: type alias Model = CreateInvoiceImpl CreateInvoice.Model | SendTextImpl

[elm-discuss] Old browsers

2016-08-23 Thread Max Froumentin
Hi there, Is there an official list of the browsers that the developers of elm support? I've found bits of discussions here and there, but nothing definitive (ie, that will help me introduce elm in a project that has to work in IE8-11). Running elm in IE8 clearly doesn't work. A quick try at

[elm-discuss] Looking for in-house Elm training / consultant (2-3 days)

2016-08-23 Thread Nima Birgani
Hi All, Avetta is looking for in-house elm trainer / consultant to bring a team of 5 devs up to speed. We are looking for someone who has delivered mid-large application in production and very proficient with elm-lang and toolings around it (testing, css pre-processors,

Re: [elm-discuss] Managing global state in Elm

2016-08-23 Thread suttlecommakevin
Great question, OP. I've been wondering about the same thing. React has pretty clear "best practices " when it comes to component vs global state, but it's also not immutable by default

[elm-discuss] Re: Will server side elm be a game changer?

2016-08-23 Thread suttlecommakevin
Oh, I did the same. :/ -- 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+unsubscr...@googlegroups.com. For more options, visit

Re: [elm-discuss] Re: Basic behavioral composition

2016-08-23 Thread suttlecommakevin
Yes, a wonderful and much appreciated breakdown, @debois. Couldn't have said it better @Wouter. -- 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] Unrelated modules having ports with the same name

2016-08-23 Thread Nick H
This is the intended behavior. The strange thing about what you are trying to do is that ModuleA and ModuleB both have a function called main. Are you intending them to be a part of the same program? Programs should only have one "main" function. If ModuleA and ModuleB are supposed to be

[elm-discuss] Re: Unrelated modules having ports with the same name

2016-08-23 Thread Markus
I think you are seeing the intended behavior. In the first example, you're generating one Elm runtime that includes ModuleA and ModuleB, in the second example, you're generating two different elm runtimes, and that's the reason there isn't any name collision. You can easily check this by

[elm-discuss] Re: So how do *you* handle Dates through ports?

2016-08-23 Thread Kasey Speakman
Doesn't seems like it would be much different from passing the ISO string through as I mentioned before. It just has the same tradeoffs of using a number to represent a Date. On Tuesday, August 23, 2016 at 5:16:10 AM UTC-5, Markus wrote: > > I'm wondering, wouldn't be enough to convert the date

Re: [elm-discuss] Should I have a CSS file for my made-with-Elm web app?

2016-08-23 Thread Wouter In t Velt
What works for me is: - Separate CSS file for static styling and basic UI animations, so I only need to add class attributes in view functions. - Layout, fonts, hover and focused states etc etc all go in css file. - So e.g. if I want to make give a "selected" element in a list

[elm-discuss] Re: Task ports: A proposal to make it easier to integrate JS with Elm.

2016-08-23 Thread Erik Lott
Although I'd love to be able to use and compose port commands like tasks, I'm not a big fan of this solution. regular ports only let you send data off or receive data back, not both. This is a good design decision. Ports isolate Elm from the underlaying language (javascript) and avoids

Re: [elm-discuss] Composability without extensible records

2016-08-23 Thread 'Dave Keen' via Elm Discuss
I've been using this pattern in a large application for a while now. The way I deal with the init issue is for each component to have two models - the main extensible model, plus it's own model (a locally scoped ComponentModel) which follows the normal nested Elm Architecture pattern. Anything

Re: [elm-discuss] Re: Basic behavioral composition

2016-08-23 Thread Wouter In t Velt
Thank you for this very clear and concise description @debois! Coming from React+Flux, I've followed much of the discussions on child-parent communication, components etcetera, but I found it really hard to scale in elm. The "everything is a component" from react is a hard habit to break, and

Re: [elm-discuss] Should I have a CSS file for my made-with-Elm web app?

2016-08-23 Thread Peter Damoc
Elm does not have an official CSS approach yet. You can do whatever you like. If your styling needs are simple, use inline styles. If your styling needs are more complex, use a build system (webpack or gulp) There is also a hack described in the elm-community FAQ

Re: [elm-discuss] Composability without extensible records

2016-08-23 Thread Janis Voigtländer
Well, actually it would have been (swapped argument order compared to what I wrote before): init : a -> Model ainit old = Model 4 old But the point stands, that you would only need the row "record constructors that add fields" from

Re: [elm-discuss] Composability without extensible records

2016-08-23 Thread Janis Voigtländer
Is it correct that your issue could be addressed by not bringing back arbitrary record extension in expressions via the pre-0.16 syntax { ... | ... = ... }, but *only* bringing back constructor functions for extensible records? That is, if from the table at https://github.com/elm-lang/

[elm-discuss] Re: Hide component on document click

2016-08-23 Thread Charles-Edouard Cady
I had the same problem for a calendar widget: I wanted to hide the calendar whenever you click outside of it. What I ended up doing was using a big fat ugly modal div and change its z-offset: renderWidget : Model -> Html Msg renderWidget model = let big_fat_modal : Html Msg