[elm-discuss] How to convince your boss to start using Elm in the company

2016-06-23 Thread Gage Peterson
Really, although Elm is young and changing its also simple and strong. Here's the argument: - do you want runtime errors? - do you want to use something simple or complex? (In a Rich Hickey sense) there strives to be one way to do things. This saves valuable decision time that JavaScript develo

Re: [elm-discuss] Re: Unable to access DataTransfer from Drag and Drop event - Elm 0.17

2016-06-23 Thread Ronn Ross
I finally reached out to Evan, and he said the dataTransfer is not supported yet in Elm. I'm not sure when it will be either. I ended up using JS. So part of my page is not in Elm. I too would love to see this support added. Sorry On Thu, Jun 23, 2016 at 6:02 PM Joe Fontana wrote: > Hi Ronn - di

[elm-discuss] Re: Beginner: Help with tasks: now : Task x Time

2016-06-23 Thread Ian Mackenzie
An alternate approach is just to use 'never' from elm-community/basics-extra directly for your '[WHAT HERE?]'. Although the error case actually comes first, so your example should be Task.perform [WHAT HERE?] NewEntry Time.now and my preferred answer would be (assuming 'import Basics.Extra expo

[elm-discuss] Re: Unable to access DataTransfer from Drag and Drop event - Elm 0.17

2016-06-23 Thread Joe Fontana
Hi Ronn - did you ever figure this out? I have a similar requirement for my app and would like to use native elm if possible. On Monday, May 16, 2016 at 6:09:18 PM UTC-4, Ronn Ross wrote: > > Still no luck, but I'm getting closer. The problem is I'm not sure how to > build the decoder for th

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

2016-06-23 Thread Matthew Griffith
Hi Matthieu, Welcome to elm! I too have a background in Python and here are some things I've learned as I've written projects in elm. You're right it is more verbose in a lot of cases. What you get in a lot of cases is that it's very clear what's going on while in python there can be a decen

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] Abort tasks?

2016-06-23 Thread Matthew Bray
It's not possible to abort requests using the HTTP library (yet). See this issue[1] for some discussion. [1] https://github.com/evancz/elm-http/issues/17 On Thu, 23 Jun 2016 at 15:29 barmin wrote: > Hello again, > > As an exercise for learning elm, I'm making a small app that aggregates > the t

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

2016-06-23 Thread Ian McCowan
Little suggestions on your no-string-interpolation example: (String.pad 2 '0' <| toString (hour date)) ++ ":" ++ (String.pad 2 '0' <| toString (minute date)) 1. You could try http://package.elm-lang.org/packages/mgold/elm-date-format/1.1.4/ if you're not opposed to using a third party package.

[elm-discuss] Re: virtual-dom hooks

2016-06-23 Thread Dmytro Zaienchyk
Hi, It works for me with Elm 0.16 (using elm-codemirror). Thanks guys! But it is possible to make it workable for Elm 0.17? Or solution is only to use ports? Thanks! On Friday, 25 March 2016 16:03:39 UTC+1, San Gillis wrote: > > Hi, > > I built a simple integration of Highcarts.js in Elm usi

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]) exist in

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

2016-06-23 Thread Janis Voigtländer
To answer two of your questions: There are no list comprehensions in Elm. The thing with printing Date is a known issue. See https://github.com/elm-lang/core/pull/442. Am Donnerstag, 23. Juni 2016 schrieb barmin : > Hello, > > This is my first post on this list. I've been experimenting with elm

Re: [elm-discuss] Element to list?

2016-06-23 Thread Janis Voigtländer
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]) exist in > the standard libraries? > > I'm using it in my code but I'd like t

[elm-discuss] Re: State of CSS in Elm

2016-06-23 Thread Yosuke Torii
FYI, I just released jinjor/elm-inline-hover . I hope it would be helpful for you ;) 2016年5月31日火曜日 18時26分37秒 UTC+9 Peter Damoc: > > How do you handle styling in your Elm programs? > > Do you use one of the following libraries

[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

[elm-discuss] Re: Create my own cmd

2016-06-23 Thread Luke Williams
You might also want to check out Cmd.Extra (shmookey/cmd-extra), which has a function just for this: message : msg -> Cmd msg Docs are available at http://package.elm-lang.org/packages/shmookey/cmd-extra/1.0.0/ Cheers, Luke On Thursday, June 23, 2016 at 4:18:37 PM UTC+10, Juan Martin Buire

Re: [elm-discuss] help appricated to get-started

2016-06-23 Thread Immanuel Normann
Am Donnerstag, 23. Juni 2016 10:59:32 UTC+2 schrieb Peter Damoc: > > It is preferable to case against a finite number of cases than against an > infinite number that forces you to have a "_" fallback. Indeed. Replacing the cases of strings by cases of the finite number of CheckBox type const

[elm-discuss] adding link tag to head

2016-06-23 Thread Robert Walter
Hello, I think I went down the rabbit hole too fast and got something working which I don't understand why/how it works. Context: I try to the Ace editor in my Elm application. I found this discussion here, that helped me to fir

Re: [elm-discuss] help appricated to get-started

2016-06-23 Thread Peter Damoc
Excellent! Here is another take on this extraction just to give you some food for thought. import Html exposing (..) import Html.App exposing (beginnerProgram) import Html.Attributes exposing (..) import Html.Events exposing (onCheck, onClick) main = beginnerProgram { model = model, view

Re: [elm-discuss] help appricated to get-started

2016-06-23 Thread Immanuel Normann
Thanks Peter! You are right: I simply forgot to add model as argument to my radio function. For whom it may interest, this is my revised version that works as required - with little minor improvments: - I replaced the clear checkbox by a button and changed the Model and Msg type and the update