[elm-discuss] Re: Which text editor do you prefer for Elm?

2016-10-05 Thread Basel Hamadeh
I use Vim as my main text editor and i just started with Elm and i find the elm plugin for vim pretty good On Wednesday, August 10, 2016 at 6:47:34 PM UTC+8, Rupert Smith wrote: > > I'm trying the Elm emacs mode, but it is pretty bad. If I select and > indent a whole file for example all the

Re: [elm-discuss] Re: keeping functions out of the model

2016-10-05 Thread Mark Hamburg
> On Oct 5, 2016, at 6:17 PM, Joel Clermont wrote: > > Equality: Similar to serialization, is this just a matter of me having to be > smarter when doing manual optimizations that look at model equality? Or is > there something in the runtime/compiler that is going to

[elm-discuss] Re: keeping functions out of the model

2016-10-05 Thread Max Goldstein
Thank you for your kind words, Joel. If 0.18 debugging totally breaks an animations, I'll think of something. These are some valid concerns but I haven't seen a smoking gun yet. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread Ed Ilyin
I have created very tiny example of how to use polymer element in Elm: https://github.com/edvail/double-event-issue But, dear, why events are duplicated? Each typed character fires two identical events. Il giorno mer 5 ott 2016 alle ore 18:18 Peter Damoc ha scritto: > I have

[elm-discuss] Re: JS + React + Redux - How to emulate Elm?

2016-10-05 Thread Nicolas Artman
Here are some tools and libraries I think are worth looking into to give a redux application a more Elm feel: Eslint-plugin-immutable —one of the most critical pieces. Redux Saga / Redux Loop

Re: [elm-discuss] Re: How to decode a recursive JSON from a port?

2016-10-05 Thread Wil Chung
Ah. Dammit. It must have been late. I had put in a JS object, gotten another error, and thought it was because of the same problem. Then, subsequently, how do I write the childrenDecoder for a recursive model? I'm doing the customDecoder, but I'm getting the error: "TypeError: Cannot read

[elm-discuss] Functional programming, or why should I use Elm instead of vanilla javaScript?

2016-10-05 Thread Sarkis Arutiunian
Recently I read article about Functional programming, all 5 parts . Yes it's pretty interesting article, written in interesting way. And I really like pattern of 'functional programming',

[elm-discuss] Re: Teaching children Elm

2016-10-05 Thread Fed Reggiardo
Recently I've been working on some projects creating music in the browser with teens. I get them hooked with simple HTML + CSS projects so they can quickly see tangible results. Them slowly add some fun JS; in our case Web Audio but you could also do SVG, CSS animations, Canvas, etc. Giving

[elm-discuss] Re: JS + React + Redux - How to emulate Elm?

2016-10-05 Thread Bulat Shamsutdinov
It's not the answer for my case because React + Redux is the stack I'm to use now. But I will still look into it just because it looks interesting, thank you! On Wednesday, October 5, 2016 at 7:54:44 PM UTC+3, Charlie Koster wrote: > > I don't know if this is what you're looking for but rather

[elm-discuss] Re: Teaching children Elm

2016-10-05 Thread Rex van der Spuy
On Tuesday, October 4, 2016 at 9:08:45 PM UTC-4, Tanya Bouman wrote: > > We have also developed our own graphics library > http://package.elm-lang.org/packages/MacCASOutreach/graphicsvg/latest/GraphicSVG > > which makes it easy to use notifications. > This is awesome!!! -- You received

[elm-discuss] Re: JS + React + Redux - How to emulate Elm?

2016-10-05 Thread Charlie Koster
I don't know if this is what you're looking for but rather than React/Redux I personally think CycleJS is far closer to Elm. It uses observables to chain up pure functions. Side effects are handed off to the "CycleJS runtime" to do things like update the DOM or perform

[elm-discuss] JS + React + Redux - How to emulate Elm?

2016-10-05 Thread Bulat Shamsutdinov
Hello! After several weeks of learning elm (pleasant time) I found out that for reasons outside of my control I'm to use JS + React + Redux for now. Do anyone knows of a way to use JS+React+Redux in a manner close to Elm? I want to try to emulate elm architecture and whole FP paradigm as

[elm-discuss] Re: Backend to use with Elm

2016-10-05 Thread Bulat Shamsutdinov
Oh, that looks interesting, thank you for sharing! I'm going to look into it. On Wednesday, October 5, 2016 at 6:40:12 PM UTC+3, Charles Scalfani wrote: > > We're developing Elm programs that run in node. See > https://github.com/panosoft?utf8=%E2%9C%93=elm > > I just finished a Postgres

[elm-discuss] Re: Teaching children Elm

2016-10-05 Thread Will White
What about a homework diary? On Wednesday, October 5, 2016 at 11:43:40 AM UTC+1, Will White wrote: > > Knowing (ahead of time) if there's someone in the class with a good idea > for an application would be gold. > > On Tuesday, October 4, 2016 at 6:33:04 AM UTC+1, Fedor Nezhivoi wrote: >> >>

Re: [elm-discuss] Re: keeping functions out of the model

2016-10-05 Thread Max Goldstein
Zinggi: My objection is that the easing function is part of the logical identity of the animation. It's tedious to keep track of the function separately. Also, animation concepts like velocity and retargetting rely on the easing function. "The same animation with a different easing function"…

[elm-discuss] Re: How to decode a recursive JSON from a port?

2016-10-05 Thread Max Goldstein
To clarify Rupert: try removing the JSON.stringify call. Elm expects actual objects, not a string representation of objects. I think. -- 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

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 4:59:17 PM UTC+1, Rupert Smith wrote: > > On Wednesday, October 5, 2016 at 4:48:59 PM UTC+1, Peter Damoc wrote: >> >> This is very interesting. >> Can you share some code so others can look at this? >> > > Its here: > >

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 4:48:59 PM UTC+1, Peter Damoc wrote: > > This is very interesting. > Can you share some code so others can look at this? > Its here: https://github.com/rupertlssmith/thesett_style_lab I have no idea how I hook into the events that it generates using 'on',

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread Peter Damoc
This is very interesting. Can you share some code so others can look at this? On Wed, Oct 5, 2016 at 6:42 PM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > On Wednesday, October 5, 2016 at 11:44:35 AM UTC+1, Rupert Smith wrote: >> >> I am going to give this a go, as

[elm-discuss] Re: Backend to use with Elm

2016-10-05 Thread Charles Scalfani
We're developing Elm programs that run in node. See https://github.com/panosoft?utf8=%E2%9C%93=elm I just finished a Postgres Effects Manager and I'm working on a Websocket server Effects Manager. You can definitely write Elm on node. You're pretty much on your own, but it's doable. On

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread Peter Damoc
This is discussed in the video that I linked earlier. In a very simple demo he end up with 65 HTTP requests. That might be a lot. Also, in a more advanced app that number could be quite higher. However, the reason that I said that Polymers do not work like that is that if they would have worked

[elm-discuss] Re: Which text editor do you prefer for Elm?

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 3:15:42 PM UTC+1, Kristo Koert wrote: > > I use spacemacs with the Elm layer > https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/elm > Looks interesting. That could tempt me back to emacs. -- You received this message because you are subscribed

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 12:54:19 PM UTC+1, Peter Damoc wrote: > > Polymers do not work like that. > Why do you say this, in relation to using a CDN to fetch the bits? Is it because you always use vulcanize to package the component lib up into your own customized version of it? There

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread Peter Damoc
Yes! Also, if you naively import it without importing the dependencies, the JS Console will give you clues about missing links. as for the bower dependencies you listed, yes... they are all needed. The polymer project has and insane amount of dependencies. It's like every function in elm-html

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 3:32:21 PM UTC+1, Rupert Smith wrote: > > > > On Wednesday, October 5, 2016 at 3:28:31 PM UTC+1, Rupert Smith wrote: >> >> On Wednesday, October 5, 2016 at 12:54:19 PM UTC+1, Peter Damoc wrote: >>> >>> Polymers do not work like that. >>> For optimizing the size,

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 3:28:31 PM UTC+1, Rupert Smith wrote: > > On Wednesday, October 5, 2016 at 12:54:19 PM UTC+1, Peter Damoc wrote: >> >> Polymers do not work like that. >> For optimizing the size, see the links I posted in the previous comment. >> >> I have a personal

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 12:54:19 PM UTC+1, Peter Damoc wrote: > > Polymers do not work like that. > For optimizing the size, see the links I posted in the previous comment. > > I have a personal exploration of polymer that tried to minimize the output: >

[elm-discuss] Re: Which text editor do you prefer for Elm?

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, August 10, 2016 at 11:47:34 AM UTC+1, Rupert Smith wrote: > > I'm trying the Elm emacs mode, but it is pretty bad. If I select and > indent a whole file for example all the import statements and statements > within a let .. in get indented +1 more level as you go down the list. >

[elm-discuss] Re: Which text editor do you prefer for Elm?

2016-10-05 Thread Kristo Koert
I use spacemacs with the Elm layer https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/elm Works very well for me, and pretty easy to set up. I also tried tried these editors before settling on spacemacs: Sublime Text Plugin (Abandoned and missing some features) Atom (Too slow

[elm-discuss] Re: Is over-use of 'let... in' considered an anti-pattern?

2016-10-05 Thread Simone Vittori
I agree with everything said, however there's a specific case where I personally try to avoid `let` if possible. Sometimes view functions can be quite big, hence it makes sense to split them into smaller composable functions. So far so good, but as soon as we introduce the `let ... in` block,

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread Peter Damoc
Polymers do not work like that. For optimizing the size, see the links I posted in the previous comment. I have a personal exploration of polymer that tried to minimize the output: https://github.com/pdamoc/polymer-exploration On Wed, Oct 5, 2016 at 2:01 PM, 'Rupert Smith' via Elm Discuss <

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread Peter Damoc
For what is worth, the approach described here: https://github.com/Polymer/polycasts/tree/master/ep39-vulcanize/vulcanized-app https://www.youtube.com/watch?v=EUZWE8EZ0IU=PLOU2XLYxmsII5c3Mgw6fNYCzaWrsM3sMN=16 might provide some more ideas. On Wed, Oct 5, 2016 at 1:44 PM, 'Rupert Smith' via Elm

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread John Mayer
If I'm reading this right, you may be able to get just the polyfills. http://webcomponents.org/polyfills/ On Oct 5, 2016 7:01 AM, "'Rupert Smith' via Elm Discuss" < elm-discuss@googlegroups.com> wrote: > > > On Wednesday, October 5, 2016 at 11:44:35 AM UTC+1, Rupert Smith wrote: >> >> On

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 11:44:35 AM UTC+1, Rupert Smith wrote: > > On Tuesday, September 27, 2016 at 11:41:44 PM UTC+1, Frederick Yankowski > wrote: >> >> I took Peter’s gist as a basis and made a repo out of it: >> https://github.com/fredcy/elm-polymer-calendar >> > I am going to

Re: [elm-discuss] Re: keeping functions out of the model

2016-10-05 Thread Mark Hamburg
On Oct 5, 2016, at 5:22 AM, Noah Hall wrote: > > It makes it hard to perform eq on. This is the big one from my standpoint. To optimize lazy views (and memory/gc behavior), I've at times written "smart" update functions that check for equality with existing values before

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, September 27, 2016 at 11:41:44 PM UTC+1, Frederick Yankowski wrote: > > I took Peter’s gist as a basis and made a repo out of it: > https://github.com/fredcy/elm-polymer-calendar > I am going to give this a go, as I need an MDL styles multi-select:

[elm-discuss] Re: Teaching children Elm

2016-10-05 Thread Will White
Knowing (ahead of time) if there's someone in the class with a good idea for an application would be gold. On Tuesday, October 4, 2016 at 6:33:04 AM UTC+1, Fedor Nezhivoi wrote: > > Hello folks, > > > Evan, Richard and the whole community as well as Elm language itself do a > great job in

[elm-discuss] Re: How to decode a recursive JSON from a port?

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 11:40:24 AM UTC+1, Rupert Smith wrote: > > On Wednesday, October 5, 2016 at 11:15:13 AM UTC+1, Wil C wrote: >> >> Hi all, >> >> Thanks again for all your help. And when I've asked questions last year. >> >> I have another question. Here's my situation. I want to

[elm-discuss] Re: How to decode a recursive JSON from a port?

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 5, 2016 at 11:15:13 AM UTC+1, Wil C wrote: > > Hi all, > > Thanks again for all your help. And when I've asked questions last year. > > I have another question. Here's my situation. I want to pass a json from a > port, and decode the json into records. > > The recursive

[elm-discuss] How to decode a recursive JSON from a port?

2016-10-05 Thread Wil C
Hi all, Thanks again for all your help. And when I've asked questions last year. I have another question. Here's my situation. I want to pass a json from a port, and decode the json into records. My port: port parseSuccess : (Json.Encode.Value -> msg) -> Sub msg When calling it:

[elm-discuss] Re: A convenience pattern around Http?

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, October 4, 2016 at 5:54:01 PM UTC+1, Kasey Speakman wrote: > > Seems like this is trying to normalize operations to CRUD. I would be > careful of over-standardizing early. Because later you will likely have to > break those abstractions to implement new features. For example, the way

Re: [elm-discuss] What's the convention for modules with more than one word?

2016-10-05 Thread Wil C
Ah, thanks. On Thursday, September 29, 2016 at 1:10:04 PM UTC-7, Joey Eremondi wrote: > > CamelCase in both cases. The file names usually exactly match the module > name, with .elm added. > > On Thu, Sep 29, 2016 at 1:08 PM, Wil C > wrote: > >> Oddly enough, for the stuff

[elm-discuss] Underscores now allowed in repository URL.

2016-10-05 Thread 'Rupert Smith' via Elm Discuss
I have this repo URL in my elm-package.json "repository": "https://github.com/rupertlssmith/thesett_style_lab.git;, But elm refuses to compile with that complaining about the underscores. Is is possible to override the package owner and name explicitly, rather than trying to extract them from

Re: [elm-discuss] Re: keeping functions out of the model

2016-10-05 Thread Zinggi
This also has the added benefit that you can then use the same animation with different easing functions without having to duplicate the whole Animation record. On Wednesday, 5 October 2016 10:01:25 UTC+2, Zinggi wrote: > > I think you could create an animation library that doesn't store any >

Re: [elm-discuss] Re: keeping functions out of the model

2016-10-05 Thread Zinggi
I think you could create an animation library that doesn't store any functions in its model and still be able to let a user provide whatever easing function they want. E.g. remove the ease key from your AnimRecord and let all functions that currently take an Animation have an additional