Re: [elm-discuss] Re: Elm not for my use case

2016-07-16 Thread barmin
There are utilities to help automate that: https://github.com/eeue56/json-to-elm Thanks for the link, but... I had tried http://noredink.github.io/json-to-elm/ but the generated code does not compile. Just to be sure I tried with the code from the repo, but it does not work either. I spent s

[elm-discuss] Elm not for my use case

2016-07-15 Thread barmin
Hello, I've been exploring elm for the past few weeks and I did enjoy it very much. But I came to the conclusion that this is not a language I'm going to use any time soon. Before unsubscribing from this list, I just wanted to let you know why I'm leaving. Please keep in mind that this is abs

Re: [elm-discuss] Re: Impressions from a new user

2016-06-24 Thread barmin
You could define emptyLine somewhere in your code and just do Maybe.withDefault emptyLine (Dict.get name model.lines) Oh yes, that's great! Adopted! Thanks for the others pointers. I obviously still have quite a lot to discover in the language and its ecosystem! (although I was already aware

Re: [elm-discuss] Re: Impressions from a new user

2016-06-24 Thread barmin
Hi Matt, Thanks for your nice answer! As for Dicts, I would say double check to make sure you don't actually want a record. Basically if you know all the fields at compile time...you probably want a record, not a dict. I may have an habit of using dicts too often... (in python, almost everyth

Re: [elm-discuss] Re: Impressions from a new user

2016-06-23 Thread barmin
Thanks Ian for your suggestions! As for pulling the common code into another function, my threshold is probably still the python one ;-) But I finally adopted your solution with the helper function defined in a let expression. That's already much better than my initial code! let f

Re: [elm-discuss] Impressions from a new user

2016-06-23 Thread barmin
Thanks for the answers and sorry that I raised a known issue. I'll try to avoid that in the future. Matthieu Le 23. 06. 16 à 16:47, Janis Voigtländer a écrit : To answer two of your questions: There are no list comprehensions in Elm. The thing with printing Date is a known issue. See https:

Re: [elm-discuss] Element to list?

2016-06-23 Thread barmin
Thanks! :-) Le 23. 06. 16 à 16:40, Janis Voigtländer a écrit : http://package.elm-lang.org/packages/elm-community/list-extra/2.0.1/List-Extra#singleton Am Donnerstag, 23. Juni 2016 schrieb barmin : Hello again, Maybe this is a silly question, but does the function (\x -> [x]) ex

[elm-discuss] Abort tasks?

2016-06-23 Thread barmin
Hello again, As an exercise for learning elm, I'm making a small app that aggregates the timetables of different bus and train lines on the same page. So when launching the program I Task.perform a bunch of Http.get's to get the departures from on online API. Now I want to allow the user to c

[elm-discuss] Element to list?

2016-06-23 Thread barmin
Hello again, Maybe this is a silly question, but does the function (\x -> [x]) exist in the standard libraries? I'm using it in my code but I'd like to be sure I'm not reinventing the wheel... Matthieu -- You received this message because you are subscribed to the Google Groups "Elm Discuss"

[elm-discuss] Impressions from a new user

2016-06-23 Thread barmin
Hello, This is my first post on this list. I've been experimenting with elm for the last few days and this is a very pleasant experience. First I want to thank Evan and the community for the excellent documentation. The guide and other docs allowed me to get into the language much quicker than