[elm-discuss] How are people deploying their Elm applications?

2016-12-26 Thread Anthony Naddeo
I've been beating my head against a wall trying to integrate Elm into my companies build system. Whether its getting haskell running at all, getting the right version of glibc to execute the elm binaries or hacking the elm-stuff folder to fake private repos, I'm hitting walls at every turn. To

[elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2016-12-26 Thread GordonBGood
On Tuesday, 27 December 2016 05:37:43 UTC+7, Robin Heggelund Hansen wrote: > > Part I: Evan is already aware of this issue, you can see the full > discussion in this github issue: > https://github.com/elm-lang/elm-compiler/issues/1528 > The short of it is that the code generator part of the

[elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2016-12-26 Thread Robin Heggelund Hansen
Part I: Evan is already aware of this issue, you can see the full discussion in this github issue: https://github.com/elm-lang/elm-compiler/issues/1528 The short of it is that the code generator part of the compiler is not aware of type information, and adding this would be a serious

[elm-discuss] Re: JSON Decoder for list of objects

2016-12-26 Thread Sekib Omazic
Got it like this: decodeNotes : Decoder (List DailyNotes) decodeNotes = list (field "day_entry" decodeDailyNotes) decodeDailyNotes : Decoder DailyNotes decodeDailyNotes = map2 DailyNotes (field "id" int) (maybe (field "notes" string)) Didn't use type alias

[elm-discuss] Re: JSON Decoder for list of objects

2016-12-26 Thread Sekib Omazic
Actually I don't need: type alias Notes = { dailyNotes : List DailyNotes } Am Montag, 26. Dezember 2016 21:31:45 UTC+1 schrieb Sekib Omazic: > > Hi all, > > I got stuck trying to decode a list of JSON objects I get from server: > > -- JSON response from server > > [ > {"day_entry":

[elm-discuss] JSON Decoder for list of objects

2016-12-26 Thread Sekib Omazic
Hi all, I got stuck trying to decode a list of JSON objects I get from server: -- JSON response from server [ {"day_entry": {"id":1234,"notes":"Map Json "} }, {"day_entry": {"id":5678,"notes":"Learn Elm"} } ] -- types type alias Notes = { dailyNotes : List DailyNotes } type

[elm-discuss] Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2016-12-26 Thread GordonBGood
*Synopsis:* Some, including Evan, maintain that Elm can be "faster than JavaScipt". While that may be true for some use cases including use of perhaps more efficient UI updates due to compartmentalized use of VirtualDOM, the actaul Javascript code generated by the compiler is not very

Re: [elm-discuss] How can I iterate over the list of records to apply a function

2016-12-26 Thread Aaron VonderHaar
Hello, the answer depends a bit on what you intend to do with the Bools after you have them... But if, as you describe, you just want to end up with a List of Bools, then List.map (\r -> r.age >= 21) yourRecords But I expect you may also be interested in one of `List.filter`, `List.all`, or

[elm-discuss] How can I iterate over the list of records to apply a function

2016-12-26 Thread alexmurjani0
Hello, I am new to elm syntax. I have a list of records with name and age. I want to apply a test function to each record. The function takes one record as input and returns a boolean value. Depending on True or false, I want to take a specific action for each record. How can I implement this