[elm-discuss] Re: Is Elm really wrong?

2016-11-09 Thread Alexandre Galays
Both articles are quite shallow. In particular, the first one only focuses on one (lack of) feature of the language. No talk about the rest of the language (is it expressive enough?), the Elm architecture, the interop with JS/TS, how easy/hard it is to write rich custom components, etc. On

Re: [elm-discuss] Is Elm really wrong?

2016-11-09 Thread Peter Damoc
On Wed, Nov 9, 2016 at 11:27 PM, Gaëtan André wrote: > As a newcomer it puzzles me. What are your opinions on it? > > People look for different things in Elm. Some look for a Haskell replacement in the front-end domain. Some of these people do not spend enough time to

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
heh...that episode was next in my podcast queue! I'll give it a listen. Thanks! On Wednesday, November 9, 2016 at 10:19:09 PM UTC+1, Rolf Sievers wrote: > > The lastest Elm Town Podcast did discuss JS interop and also mentioned > waiting for the dom to update. > > They suggest you wait for the

Re: [elm-discuss] Re: Is Elm really wrong?

2016-11-09 Thread John Orford
+1 On Wed, 9 Nov 2016 23:20 Kasey Speakman, wrote: > I read the article. > > Summary: "I expected Elm to be much more like Haskell, but it wasn't. > Therefore, I'm exerting all my saved-up anger." > > Meanwhile, I'm getting actual work done in Elm. > > Elm's not perfect,

Re: [elm-discuss] How do you test a TEA `update` function?

2016-11-09 Thread Francesco Orsenigo
Fair enough! On Thu, Nov 10, 2016 at 3:23 AM, Mark Hamburg wrote: > We didn't do it to enable testing. We did it because it also regularizes a > lot of other module interactions. Improving testing is a bonus. > > Mark > > On Nov 8, 2016, at 1:31 PM, Francesco Orsenigo >

[elm-discuss] Re: Is Elm really wrong?

2016-11-09 Thread Daniel Walker
This is a nice retort. http://www.gizra.com/content/elm-business-perspective/ Let's not forget, Elm is a young language. I think a roadmap that is in no particular order would be helpful. Just a list of things that are on the TODO list ...no timeframe. On Wednesday, November 9, 2016 at

[elm-discuss] Is Elm really wrong?

2016-11-09 Thread Gaëtan André
Hello, A bit of a bad buzz today around Elm: https://news.ycombinator.com/item?id=12906119 As a newcomer it puzzles me. What are your opinions on it? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread 'Rolf Sievers' via Elm Discuss
The lastest Elm Town Podcast did discuss JS interop and also mentioned waiting for the dom to update. They suggest you wait for the next animation frame, then the DOM will be rendered. I guess that is what you want over waiting 50ms. I did a quick search on elm-package and found this one:

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
I think I've got it somewhat sorted. First, I needed to explicitly destroy the chart object prior to making certain changes to the view/dom. I'm not entirely sure why (or if) this is necessary, but it seems to alleviate the problem. I assume that the chart object was holding on to and using

Re: [elm-discuss] Modulus Error

2016-11-09 Thread John Orford
Ahh, much quicker than me : ) On Wed, 9 Nov 2016 at 19:31 Janis Voigtländer wrote: > Yes, quite old news: https://github.com/elm-lang/core/issues/590 > > Am 09.11.2016 um 19:27 schrieb John Orford : > > I get an error when I try > > 8 % 0 > >

Re: [elm-discuss] Modulus Error

2016-11-09 Thread Janis Voigtländer
Yes, quite old news: https://github.com/elm-lang/core/issues/590 > Am 09.11.2016 um 19:27 schrieb John Orford : > > I get an error when I try > > 8 % 0 > > In 17.1. > > Is this old news? > -- > You received this message because you are subscribed to the Google Groups

[elm-discuss] Modulus Error

2016-11-09 Thread John Orford
I get an error when I try 8 % 0 In 17.1. Is this old news? -- 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

Re: [elm-discuss] How do you test a TEA `update` function?

2016-11-09 Thread Mark Hamburg
We didn't do it to enable testing. We did it because it also regularizes a lot of other module interactions. Improving testing is a bonus. Mark > On Nov 8, 2016, at 1:31 PM, Francesco Orsenigo > wrote: > > > Ok, but is it justified to make your code more

Re: [elm-discuss] Re: Convincing my team that Elm isn't just going to die like CoffeeScript

2016-11-09 Thread OvermindDL1
Indeed, React is more of a stop-gap before full webcomponent support is out in browsers. And nowadays with webcomponents.js emulating webcomponents on about everything 'fairly' decently (although some slowly, which libraries like Polymer smooth out) it is becoming less interesting. In my

Re: [elm-discuss] How do I subscribe to an event at a fixed point in time?

2016-11-09 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, November 9, 2016 at 10:22:05 AM UTC, Rupert Smith wrote: > > Or can I chain Time.now andThen Process.sleep andThen invokeRefresh > together without needing to issue a Cmd and have and update handler for the > intermediate steps? I'll look into that. > Chaining the tasks together

[elm-discuss] Re: Promises

2016-11-09 Thread Emmanuel Rosa
No, Elm doesn't provide access to JavaScript promises. But what it really boils down to is that from Elm you cannot access a JavaScript object directly. You need a *foreign-function interface* to act as a gateway between Elm and JavaScript, which is what Elm ports do:

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
There does seem to be some effect related to the timing of dom rendering, but it's not really clear what it is. If I add a setTimeout on the js function, the very first rendering of the chart works without an error, but subsequent renderings have errors. In fact, based on the timing of errors and

Re: [elm-discuss] How do I subscribe to an event at a fixed point in time?

2016-11-09 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, November 9, 2016 at 10:18:39 AM UTC, Rupert Smith wrote: > > On Tuesday, November 8, 2016 at 8:09:25 PM UTC, Max Goldstein wrote: >> >> Could you run Time.now andThen calculate the amount of time left until >> expiry, then Process.sleep until then? > > > Yes, I think this is how it

[elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread Magnus Rundberget
I'm guessing that you are contructing the div inside your Elm app and that the virtual dom might not have completed rendering/updating the div in question before you try using it on the js side of things. Maybe just try to introduce a setTimeOut on the js sider or something to that effect, so

Re: [elm-discuss] How do I subscribe to an event at a fixed point in time?

2016-11-09 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, November 8, 2016 at 5:28:26 PM UTC, Witold Szczerba wrote: > > You could propably "tick" (as in example from docs) every few seconds and > return Cmd.none if you're before expiration, and some other Cmd otherwise. > Does it make sense? > I could, but there is still the inconvenience

Re: [elm-discuss] How do I subscribe to an event at a fixed point in time?

2016-11-09 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, November 8, 2016 at 8:09:25 PM UTC, Max Goldstein wrote: > > Could you run Time.now andThen calculate the amount of time left until > expiry, then Process.sleep until then? Yes, I think this is how it needs to be done: Run Time.now to produce a Msg, say 'SetupRefresh' In the

[elm-discuss] Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
I'm trying to use Chart.js from my elm app, and I'm running into some errors that I can't sort out. In short, I've got a elm-to-javascript port that takes in a data structure describing the chart I want to draw. Then on the javascript side I've got a subscription to that port that renders that