Re: [elm-discuss] Re: fold function argument order

2016-12-08 Thread Aaron VonderHaar
What's confusing here is how currying works with infix operators. It's idiomatic in Elm to have your accumulator be the last argument, and, for instance, if you were writing your own data type, you would want to write your functions so that they can be chained together easily: myMatrix

[elm-discuss] Re: launchaco built in Elm

2016-12-08 Thread Marc Laventure
Hey! I am the author, great to hear your satisfaction with Launchaco. I am also super excited to play around with elm on server side rendering! Fun tidbit, we used golang to generate the html and assets when you click the download button using the "html/template" library. Its very fun to use! M

[elm-discuss] Re: fold function argument order

2016-12-08 Thread Kasey Speakman
(deleted and corrected original post with proper expansion of Elm's foldl) I know this is a really old thread, but I ran into this precise question and thought I would add a perspective. The form a -> b -> b is not left-building, regardless of the direction you are traversing the list. An exam

[elm-discuss] Re: fold function argument order

2016-12-08 Thread Kasey Speakman
I know this is a really old thread, but I ran into this precise question and thought I would add a perspective. The form a -> b -> b actually makes the fold right-building, regardless of the direction you are traversing the list. An example: Starting from zero, subtract the numbers 1, 2, and 3.

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

2016-12-08 Thread Wil C
So now, either I write a ports for commonmark.js, or I write it as a native >> module. I asked about it here >> with >> no answers. >> > > I think if you write it as ports or native, you'll still need to map the > AST between

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

2016-12-08 Thread 'Rupert Smith' via Elm Discuss
On Thursday, December 8, 2016 at 5:27:53 PM UTC, Vojtěch Král wrote: > > Dne středa 7. prosince 2016 17:18:37 UTC+1 Mark Hamburg napsal(a): >> >> Would it help if there were a standard mechanism to invoke JavaScript >> code as a task (or equivalently to make JavaScript code available as a >> task

[elm-discuss] Re: Decoding childNodes textContent

2016-12-08 Thread Laurence Roberts
For anyone who comes across this, see this PR - https://github.com/elm-lang/core/pull/768 On Thursday, 24 November 2016 23:58:27 UTC, Laurence Roberts wrote: > > I've become stumped by a json decode issue where the code compiles > correctly but does not appear to actually run. > > If you run thi

[elm-discuss] Re: Simple Fade In/Out effect?

2016-12-08 Thread Rex van der Spuy
On Tuesday, October 4, 2016 at 2:46:50 PM UTC-4, Joaquín Oltra wrote: > > Here's a mini-example for posterity > http://jsbin.com/hipeba/edit?html,css,js,output > Thanks Joaquín, I just had an opportunity to use your code snippet and it was extremely handy! -- You received this message because

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

2016-12-08 Thread OvermindDL1
`opaque type DBConnection` perhaps would be the common way to write such a type that can only be passed in and passed out but not created. On Thursday, December 8, 2016 at 11:28:22 AM UTC-7, Mark Hamburg wrote: > > I was talking about this further with my coworkers and we more or less > agreed

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

2016-12-08 Thread Mark Hamburg
I was talking about this further with my coworkers and we more or less agreed that the key things that could help with Elm's interface to JavaScript were: * Task ports. Tasks are a building block in a way that commands are not. Forcing all external interactions to be asynchronous makes it more cle

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

2016-12-08 Thread Vojtěch Král
Dne úterý 6. prosince 2016 23:14:06 UTC+1 Rupert Smith napsal(a): > > The thing about ports for something like this is it feels a bit unnatural > to invoke the port resulting in a Cmd. Then you'll need a subscription port > to get the result back in, and have that pass it to your update function

[elm-discuss] Re: launchaco built in Elm

2016-12-08 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, December 7, 2016 at 11:32:54 PM UTC, Duane Johnson wrote: > > I just saw this (very popular link) on hacker news and was very impressed > with the UI. Turns out it's built with Elm and Go! > > http://launchaco.com/build/ > I like how you can edit the templates WYSIWYG, rather than