Re: [elm-discuss] Re: [elm-dev] Re: 0.17 Tasks vs Cmds

2016-12-12 Thread Mark Hamburg
More "implementation" notes for this theoretical discussion. If you dropped off earlier, you can stay dropped off and leave it to Janis and me. If you are following along, here's another little tweak: I just looked at the implementation of tasks and saw that they make very heavy use of andThen.

Re: [elm-discuss] What do you think Elm's biggest shortcomings are when it comes to natively supported API's?

2016-12-12 Thread Zinggi
> typed-arrays and ArrayBuffer. That's basically it. Plus it would be nice if we could pattern match on binary files like in elixir/erlang. On Monday, 12 December 2016 01:17:39 UTC+1, W. Brian Gourlie wrote: > > With regards to working with binary files, what all does that entail? I > assume

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

2016-12-12 Thread Birowsky
Erik, Mark, thanx a ton for your responses! Erik, I was using that approach solely for the views but you made me think how I might do it in the updates too, which from here, seems like quite the prettification. Thanx for that! Mark, wow, thanx for the effort. If you could believe it, I built

Re: [elm-discuss] Re: [elm-dev] Re: 0.17 Tasks vs Cmds

2016-12-12 Thread Janis Voigtländer
Okay, so I think that your implementation strategy is viable and addresses the use cases that the earlier tick batching trick addressed. One could do this as you propose with tasks, handling the “what about chained continuations?” concern (that I had brought up) by deferring any andThened tasks

[elm-discuss] “TypeError: domNode is undefined” and other errors with Elm and 3rd party JS libraries

2016-12-12 Thread ryanbarth
I posted this over on Stack Overflow , but thought I would ask here too. I have been trying to use Elm applications to work with a handful of "UI Widget" type libraries.

[elm-discuss] onClick while shift key pressed

2016-12-12 Thread Marshall handheld Flax
Is there an idiomatic to either: (a) trigger a message to fire only when the mouse is clicked *while the shift button is pressed*, or (b) include attributes (such as whether the shift button is pressed) as part of the message trigged by onClick? Thanks so much for Elm! Marshall -- You

Re: [elm-discuss] Re: Stance on native APIs for 0.18?

2016-12-12 Thread Mark Hamburg
A better way of putting this: Haskell's IO monad structures a particular set of interactions with the outside world. By making all foreign interactions go through tasks, Elm could use its task monad to structure interactions with the outside world. The difference then is that Haskell has more

Re: [elm-discuss] Re: Stance on native APIs for 0.18?

2016-12-12 Thread Mark Hamburg
One doesn't need them to be asynchronous but making them asynchronous helps reinforce the notion that this is happening outside the Elm universe. And if you want monads, Elm's tasks are monadic. Mark On Mon, Dec 12, 2016 at 6:16 AM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com>

[elm-discuss] Re: Documentation storage : IN or OUT ?

2016-12-12 Thread 'Rupert Smith' via Elm Discuss
On Sunday, December 11, 2016 at 3:51:43 PM UTC, Ford wrote: > > I am wondering whether the current approach of mixing documentation with > real code is a good idea. I feel like placing it into separate file might > be better. > > *Which approach do you favor and why?* > +1 for inline docs with

Re: [elm-discuss] Re: Stance on native APIs for 0.18?

2016-12-12 Thread 'Rupert Smith' via Elm Discuss
On Friday, December 9, 2016 at 8:07:33 PM UTC, Mark Hamburg wrote: > > While there are certainly times when synchronous calls would have been > nice, I recognize that having synchronous behavior for potentially mutable > external state also tends to imply a lot about execution order — something

Re: [elm-discuss] Re: [elm-dev] Re: 0.17 Tasks vs Cmds

2016-12-12 Thread Mark Hamburg
Ah. Sorry. My misunderstanding. I went looking for the Effects.tick replacement in 0.17+ and only found AnimationFrame. Mark On Sun, Dec 11, 2016 at 10:32 PM Janis Voigtländer < janis.voigtlaen...@gmail.com> wrote: > Mark, wow, a lot of material. I’m not able to digest all of it right now. >

Re: [elm-discuss] What do you think Elm's biggest shortcomings are when it comes to natively supported API's?

2016-12-12 Thread Rex van der Spuy
> For me, these things would be nice to have: > * WebAudio API > That's a big one for me too because I use Elm exclusively for game and "interactive multimedia" development. At the moment I have to drop into ports for Audio - I'd love to it all in Elm. -- You received this message

Re: [elm-discuss] What do you think Elm's biggest shortcomings are when it comes to natively supported API's?

2016-12-12 Thread Christopher Anand
I would use an elm-only audio solution in teaching. > On Dec 12, 2016, at 1:00 PM, Rex van der Spuy wrote: > > > For me, these things would be nice to have: > * WebAudio API > > That's a big one for me too because I use Elm exclusively for game and > "interactive