Re: [elm-discuss] Re: Batching HTTP requests and then performing something after they all finish

2017-12-03 Thread Rafał Cieślak
Oh okay, sorry. :D But this won't batch the requests, right? By "batching" I mean "run all in parallel" as Cmd.batch seems to do. As far as I understand Task.sequence docs , it's going to make the requests one-by-one. I'd

[elm-discuss] Re: Batching HTTP requests and then performing something after they all finish

2017-12-03 Thread Rafał Cieślak
Eric: This is what I meant when I suggested wrapping the URLs with RemoteData . ;) It does pretty much exactly what you described and I'm thinking about using it anyway, as it seems that it's going to be helpful in other

[elm-discuss] Re: Distinguishing HTTP error codes

2017-12-03 Thread Rafał Cieślak
Did you look into Http.expectStringResponse ? I've never used it, but the docs say: Maybe you want the whole Response: status code, headers, body, etc. This > lets you get all of that information. From there

[elm-discuss] Re: Forms with Floats / Dates

2017-01-21 Thread Rafał Cieślak
I'd consider storing the whole string in the model and passing it to value. This way you can capture whatever input the user types and convert it to float only when you actually need to do something with the float. IMHO because the input tag allows you to type any kind of string, you should

Re: [elm-discuss] Re: How to prevent input field values persisting in new views?

2016-12-21 Thread Rafał Cieślak
opobepagu/edit?html,js,console,output> which displays such behavior in non-Elm environment. Elm's virtual DOM implementation must be doing some hacks to work around this fact. -- Rafał Cieślak -- You received this message because you are subscribed to the Google Groups "Elm Discu

[elm-discuss] Re: How to prevent input field values persisting in new views?

2016-12-21 Thread Rafał Cieślak
What I found is that defaultValue can't really be used with number inputs that are controlled (in the sense that defaultValue is changes with the model as in the first example in the thread). If you have such input, then start typing a valid number and then you add some commas/dots (depending

[elm-discuss] Re: Patterns for sum and product types

2016-12-18 Thread Rafał Cieślak
Oh, I'd forget that there's this post "Writing Friendly Elm Code" written by Tessa Kelly. http://tech.noredink.com/post/146963432518/writing-friendly-elm-code It also discusses how to model data in the app. On Sunday, December 11, 2016 at 8:01:09 PM UTC+1, Brian Marick wrote: > > I’m

[elm-discuss] Re: Patterns for sum and product types

2016-12-13 Thread Rafał Cieślak
I'd love to see those "patterns" written down, too! For now, other than Richard Feldman's talk "Making Impossible States Impossible", I have only found two F# resources: * The "Designing with types" series on F# for fun and profit

[elm-discuss] Re: Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-24 Thread Rafał Cieślak
Robin: I would just keep everything in one Elm app, then use a router to display > the correct page. The problem I see with this is that our app is not SPA, so each page that needs an Elm app would need to load a big blob of JS with dependencies of all the Elm modules in our source code.

[elm-discuss] Re: Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-23 Thread Rafał Cieślak
, November 19, 2016 at 9:58:27 PM UTC+1, Rafał Cieślak wrote: > > The project I'm working on is not a SPA, it's a rather big Rails app that > sometimes needs JS to make some part of the page dynamic – usually it's > about dynamic forms. > > When I was thinking about ways

[elm-discuss] Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-19 Thread Rafał Cieślak
The project I'm working on is not a SPA, it's a rather big Rails app that sometimes needs JS to make some part of the page dynamic – usually it's about dynamic forms. When I was thinking about ways in which I can integrate Elm into the project, I thought about having a separate Elm project for