Re: [elm-discuss] https://github.com/evancz down?

2016-06-25 Thread Tobias Hermann
No Problem. I think github usually can be considered very reliable though.


On Saturday, June 25, 2016 at 8:41:23 PM UTC+2, Evan wrote:
>
> Seems to be back! Actually sitting on the plane now, so I'm glad I found 
> out before it took off.
>
> Sorry for the trouble. I have some plans for package.elm-lang.org 
> that'll make download mirrors possible, so we'll be less open to problems 
> like this.
>
> On Saturday, June 25, 2016, Tobias Hermann > 
> wrote:
>
>> OK, thanks for the information. Have a nice flight. :)
>>
>>
>> On Saturday, June 25, 2016 at 7:58:58 PM UTC+2, Evan wrote:
>>>
>>> It is a GitHub problem. I have opened a support ticket and reached out 
>>> to them on Twitter 
>>> <https://twitter.com/czaplic/status/746761566255779840>.
>>>
>>> Hopefully it will be resolved soon. Though since it is Saturday, the 
>>> support staff is probably not in the office... Not really sure what actions 
>>> to take. I will be getting on a flight soon as well, so I can try more 
>>> things once I land.
>>>
>>> On Sat, Jun 25, 2016 at 1:30 PM, Tobias Hermann  
>>> wrote:
>>>
>>>> Just wanted to compile something using evancz/elm-markdown and the 
>>>> download failed <http://i.imgur.com/aIjs3Kv.png>. Is this a github 
>>>> problem or have things moved?
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] https://github.com/evancz down?

2016-06-25 Thread Tobias Hermann
OK, thanks for the information. Have a nice flight. :)


On Saturday, June 25, 2016 at 7:58:58 PM UTC+2, Evan wrote:
>
> It is a GitHub problem. I have opened a support ticket and reached out to 
> them on Twitter <https://twitter.com/czaplic/status/746761566255779840>.
>
> Hopefully it will be resolved soon. Though since it is Saturday, the 
> support staff is probably not in the office... Not really sure what actions 
> to take. I will be getting on a flight soon as well, so I can try more 
> things once I land.
>
> On Sat, Jun 25, 2016 at 1:30 PM, Tobias Hermann  > wrote:
>
>> Just wanted to compile something using evancz/elm-markdown and the 
>> download failed <http://i.imgur.com/aIjs3Kv.png>. Is this a github 
>> problem or have things moved?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elm-discuss...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] https://github.com/evancz down?

2016-06-25 Thread Tobias Hermann
Just wanted to compile something using evancz/elm-markdown and the download 
failed . Is this a github problem or have 
things moved?

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Updating a game using Forms and Elements for input to Elm 0.17

2016-05-18 Thread Tobias Hermann
Btw, it is not just this game, that worries me. In our company we 
internally use a tool written in Elm. I can not post its source code. But 
It has buttons, input fields etc., and they all are embedded in a quite 
deep structure of Elements (flow down, flow right, etc.). Since I have to 
extend this tool quite regularly, I of course want to update it to Elm 0.17 
too. Right now I have no idea how to do this without rewriting the view 
parts entirely.

Here is a minimal example showing my problem:
The following was possible in Elm 0.16:
source: http://daiw.de/share/elm/html_to_element_problem_0.17/Main.elm
online version: 
http://daiw.de/share/elm/html_to_element_problem_0.17/index.html
How can I convert this to 0.17?


On Tuesday, May 17, 2016 at 10:04:28 PM UTC+2, Tobias Hermann wrote:
>
> Hi,
>
> here I have this game "pick and gloat" (source 
> <https://github.com/Dobiasd/pick-and-gloat>, online version 
> <http://www.editgym.com/pick-and-gloat/>) I would like to update from Elm 
> 0.16 to Elm 0.17. It uses Forms and Elements to position stuff that can be 
> tapped/clicked. It does not even use the removed Touch package, but 
> Html.Events.on 
> "touchstart" etc. instead. Nevertheless I find the task extremely 
> difficult, because everything was based on the fact that Html could be 
> converted to Element 
> <https://github.com/Dobiasd/pick-and-gloat/blob/023649a4e8ba0fabaa90530a13214c8156082686/src/elm/Main.elm#L454>,
>  
> which no longer is possible 
> <https://groups.google.com/forum/?fromgroups#!topic/elm-discuss/anu_tJtm5Og>
> .
>
> How would you approach such a problem? I can hardly believe that 
> positioning everything manually low-level style with divs and css can be 
> the way to go.
> Could one abstract this away to get the old functionality back?
> Any help would be appreciated. I am quite desperate. :D
>
> Tobias
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Updating a game using Forms and Elements for input to Elm 0.17

2016-05-17 Thread Tobias Hermann
Hi,

here I have this game "pick and gloat" (source 
, online version 
) I would like to update from Elm 
0.16 to Elm 0.17. It uses Forms and Elements to position stuff that can be 
tapped/clicked. It does not even use the removed Touch package, but 
Html.Events.on 
"touchstart" etc. instead. Nevertheless I find the task extremely 
difficult, because everything was based on the fact that Html could be 
converted to Element 
,
 
which no longer is possible 

.

How would you approach such a problem? I can hardly believe that 
positioning everything manually low-level style with divs and css can be 
the way to go.
Could one abstract this away to get the old functionality back?
Any help would be appreciated. I am quite desperate. :D

Tobias

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Touch module in Elm 0.17

2016-05-16 Thread Tobias Hermann
Thank you very much. It works.
In case anybody is interested, here is the full minimal example using the 
snippet: https://gist.github.com/Dobiasd/5aba6bbf872301977bc35790a04bfde0

On Monday, May 16, 2016 at 8:09:26 PM UTC+2, art yerkes wrote:
>
> I do it like this:
>
> D.oneOf [
> D.at ["touches", "0"] (D.object2 TouchPosition ("pageX" := D.float) ("
> pageY" := D.float))
> , D.object2 TouchPosition ("pageX" := D.float) ("pageY" := D.float) ] 
> Which can be bound to both touch and mouse events and yields whatever the 
> event has.
>
> On Sunday, May 15, 2016 at 9:17:11 AM UTC-7, Tobias Hermann wrote:
>>
>> Thanks. I now can get messages for a touchstart on a specific element if 
>> I use Json.Decode.succeed to produce a fixed message. Additionally I 
>> would like to get the pixel coordinates for the touches. Any ideas on how 
>> the decoder for this could look like?
>>
>>
>> On Sunday, May 15, 2016 at 2:59:23 PM UTC+2, Glen Mailer wrote:
>>>
>>> If you skim over the code in the new mouse module, you'll see there's 
>>> not a huge amount there.
>>>
>>> You can probably write some very similar code using the "on" function in 
>>> Html.Events with a custom decoder.
>>>
>>> This has to be applied to an HTML element rather than being global, but 
>>> if you pick something near the top of your tree you should get a similar 
>>> effect
>>>
>>> Hope that helps!
>>> Glen
>>>
>>> On Sunday, 15 May 2016 13:19:58 UTC+1, Tobias Hermann wrote:
>>>>
>>>> I decided to update my old projects. It was a relatively big change to 
>>>> switch from signals to the Elm architecture, but I learned a lot and the 
>>>> code became easier to understand. But now I am back to my touch question. 
>>>> :D
>>>> Is there a specific reason the functionality is no longer available? I 
>>>> would think it is not that different from the mouse stuff, or is it?
>>>>
>>>>
>>>> On Saturday, May 14, 2016 at 9:02:13 PM UTC+2, Tobias Hermann wrote:
>>>>>
>>>>> OK, thanks guys. I will consider using ports for this. But perhaps I 
>>>>> will abandon some projects completely. This one 
>>>>> <https://github.com/Dobiasd/Breakout> for example is around since Elm 
>>>>> 0.10 and very far away from current best practice. :D
>>>>>
>>>>>
>>>>> On Saturday, May 14, 2016 at 8:54:03 PM UTC+2, Janis Voigtländer wrote:
>>>>>>
>>>>>> True, but I don't think that was the question. 
>>>>>>
>>>>>> Am 14.05.2016 um 20:53 schrieb Joey Eremondi :
>>>>>>
>>>>>> In principle, could you do touch support with Ports?
>>>>>>
>>>>>> Support for anything is never truly gone with ports!
>>>>>>
>>>>>> On Sat, May 14, 2016 at 11:50 AM, Janis Voigtländer <
>>>>>> janis.voi...@gmail.com> wrote:
>>>>>>
>>>>>>> Touch support is gone for now.
>>>>>>>
>>>>>>> Am 14.05.2016 um 20:39 schrieb Tobias Hermann :
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm currently trying to update some of my old elm code to version 
>>>>>>> 0.17. I see that Mouse and Keyboard were moved to separate packages, 
>>>>>>> but I 
>>>>>>> can not find anything touch related. Can the touch functionality still 
>>>>>>> be 
>>>>>>> found somewhere?
>>>>>>>
>>>>>>> Tobias
>>>>>>>
>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "Elm Discuss" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to elm-discuss...@googlegroups.com.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "Elm Discuss" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to elm-discuss...@googlegroups.com.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Elm Discuss" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to elm-discuss...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Html.toElement in Elm version 0.17?

2016-05-16 Thread Tobias Hermann
Yes, I know Element is available in the package. But without the Input 
stuff and without being able to convert Html to Element, is it not very 
useful to create GUIs.
Perhaps it can be enhanced in the future to produce Cmds for the Elm 
Architecture. :)



On Monday, May 16, 2016 at 4:41:51 PM UTC+2, Peter Damoc wrote:
>
> Graphics.Element is available as `Element` in the new evancz/elm-graphics 
> package but I would be surprised to see any of the Graphics.Input.* stuff 
> become available again. 
>
> Any kind of input should be handled through the Elm Architecture.
>
>
>
>  
>
> On Mon, May 16, 2016 at 5:05 PM, Tobias Hermann  > wrote:
>
>> I liked what Graphics.Element had to offer. For example using 
>> Graphics.Input.dropDown was pleasant. At the very moment I am trying to 
>> convert my code to Html.something. And it looks like having a simple 
>> drop-down menu has become much more complicated.
>> Do you guys see any chance Graphics.Element could get its old power back 
>> in the not-so-distant future?
>>
>>
>> On Monday, May 16, 2016 at 3:52:12 PM UTC+2, Peter Damoc wrote:
>>>
>>> Html layout is no longer the pain that it used to be back when Elm 
>>> started. 
>>> The adoption of the flexbox fixed most of the problems. 
>>>
>>> Not it is trivial to center a div if one uses flexbox.
>>>
>>> Of course, it would be oh so lovely to be able to brainstorm, as a 
>>> group, a way to do layout that makes use of the power of Elm. 
>>> Unfortunately, I don't have enough practical experience with web-dev in 
>>> order to do that. 
>>>
>>>
>>>
>>> On Mon, May 16, 2016 at 4:22 PM, Tobias Hermann  
>>> wrote:
>>>
>>>> OK, I understand.
>>>>
>>>> Right now I am updating my projects to version 0.17. I see the benefits 
>>>> of the Elm Architecture. The model/update parts become much cleaner 
>>>> compared to the old Signal way.
>>>>
>>>> But at the same time I am disappointed with the view parts. Elm once 
>>>> used slogans like "Centering a div should be easy." and "Try this with 
>>>> Html/CSS." to advertise itself. But now I have to painfully wade through 
>>>> all the annoying CSS stuff <http://i.imgur.com/oZXdQdV.gif> again to 
>>>> position widgets.
>>>>
>>>>
>>>> On Monday, May 16, 2016 at 2:29:08 PM UTC+2, Peter Damoc wrote:
>>>>>
>>>>> I'm not satisfied enough with the API to publish it. 
>>>>>
>>>>> This is mainly because I haven't yet done anything serious with it. :) 
>>>>>
>>>>>
>>>>>
>>>>> On Mon, May 16, 2016 at 11:05 AM, Tobias Hermann  
>>>>> wrote:
>>>>>
>>>>>> Wow, this looks extremely useful. I think this would make a great 
>>>>>> package and should not stay hidden in some github gist. *wink*
>>>>>>
>>>>>>
>>>>>> On Monday, May 16, 2016 at 9:46:50 AM UTC+2, Peter Damoc wrote:
>>>>>>>
>>>>>>> you can easily use Html for layout and create your own little layout 
>>>>>>> language with functions. 
>>>>>>>
>>>>>>> For example, you can use this playground for visually thinking about 
>>>>>>> the layout:
>>>>>>>
>>>>>>> https://demos.scotch.io/visual-guide-to-css3-flexbox-flexbox-playground/demos/
>>>>>>> and a little helper module like this one:
>>>>>>> https://gist.github.com/pdamoc/c07eee6b7ab761853d59d8db01d89b71
>>>>>>>
>>>>>>> to allow you to express your layout like 
>>>>>>>
>>>>>>> greyCenterStretch = 
>>>>>>>div [ design <| justifyCenter <| alignItemsStretch <| 
>>>>>>> [("background", "grey")] ]
>>>>>>>
>>>>>>> bottomDiv = div [design <| alignSelfEnd []]
>>>>>>>
>>>>>>> view model = 
>>>>>>> greyCenterStretch 
>>>>>>> [ bottomDiv
>>>>>>> [ ... ]
>>>>>>> , ...
>>>>>>> ]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>&g

Re: [elm-discuss] Html.toElement in Elm version 0.17?

2016-05-16 Thread Tobias Hermann
I liked what Graphics.Element had to offer. For example using 
Graphics.Input.dropDown was pleasant. At the very moment I am trying to 
convert my code to Html.something. And it looks like having a simple 
drop-down menu has become much more complicated.
Do you guys see any chance Graphics.Element could get its old power back in 
the not-so-distant future?


On Monday, May 16, 2016 at 3:52:12 PM UTC+2, Peter Damoc wrote:
>
> Html layout is no longer the pain that it used to be back when Elm 
> started. 
> The adoption of the flexbox fixed most of the problems. 
>
> Not it is trivial to center a div if one uses flexbox.
>
> Of course, it would be oh so lovely to be able to brainstorm, as a group, 
> a way to do layout that makes use of the power of Elm. 
> Unfortunately, I don't have enough practical experience with web-dev in 
> order to do that. 
>
>
>
> On Mon, May 16, 2016 at 4:22 PM, Tobias Hermann  > wrote:
>
>> OK, I understand.
>>
>> Right now I am updating my projects to version 0.17. I see the benefits 
>> of the Elm Architecture. The model/update parts become much cleaner 
>> compared to the old Signal way.
>>
>> But at the same time I am disappointed with the view parts. Elm once used 
>> slogans like "Centering a div should be easy." and "Try this with 
>> Html/CSS." to advertise itself. But now I have to painfully wade through 
>> all the annoying CSS stuff <http://i.imgur.com/oZXdQdV.gif> again to 
>> position widgets.
>>
>>
>> On Monday, May 16, 2016 at 2:29:08 PM UTC+2, Peter Damoc wrote:
>>>
>>> I'm not satisfied enough with the API to publish it. 
>>>
>>> This is mainly because I haven't yet done anything serious with it. :) 
>>>
>>>
>>>
>>> On Mon, May 16, 2016 at 11:05 AM, Tobias Hermann  
>>> wrote:
>>>
>>>> Wow, this looks extremely useful. I think this would make a great 
>>>> package and should not stay hidden in some github gist. *wink*
>>>>
>>>>
>>>> On Monday, May 16, 2016 at 9:46:50 AM UTC+2, Peter Damoc wrote:
>>>>>
>>>>> you can easily use Html for layout and create your own little layout 
>>>>> language with functions. 
>>>>>
>>>>> For example, you can use this playground for visually thinking about 
>>>>> the layout:
>>>>>
>>>>> https://demos.scotch.io/visual-guide-to-css3-flexbox-flexbox-playground/demos/
>>>>> and a little helper module like this one:
>>>>> https://gist.github.com/pdamoc/c07eee6b7ab761853d59d8db01d89b71
>>>>>
>>>>> to allow you to express your layout like 
>>>>>
>>>>> greyCenterStretch = 
>>>>>div [ design <| justifyCenter <| alignItemsStretch <| 
>>>>> [("background", "grey")] ]
>>>>>
>>>>> bottomDiv = div [design <| alignSelfEnd []]
>>>>>
>>>>> view model = 
>>>>> greyCenterStretch 
>>>>> [ bottomDiv
>>>>> [ ... ]
>>>>> , ...
>>>>> ]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, May 16, 2016 at 10:29 AM, Tobias Hermann  
>>>>> wrote:
>>>>>
>>>>>> Ok, thank you.
>>>>>> I liked to align input boxes etc. with the functions from 
>>>>>> Graphics.Element, because it isolated me from all the HTML/div/CSS 
>>>>>> thinking.
>>>>>> But of course I understand. Also thanks for the remark about 
>>>>>> Graphics.Input. I was already wondering where it went. ;-)
>>>>>>
>>>>>>
>>>>>> On Sunday, May 15, 2016 at 11:32:53 PM UTC+2, Janis Voigtländer wrote:
>>>>>>>
>>>>>>> No, this conversion is not conceptually possible anymore. Html can 
>>>>>>> have event listeners attached, but post-0.16 Elements are weaker than 
>>>>>>> 0.16 
>>>>>>> Elements in that they don't support events anymore (hence also no 
>>>>>>> Graphics.Input module anymore). Thus, the conversion from Html to 
>>>>>>> Element 
>>>>>>> had to go.
>>>>>>>
>>>>>>> (Conceptually, it should still be possible to convert values of type 
>>>>>>> Html

Re: [elm-discuss] Html.toElement in Elm version 0.17?

2016-05-16 Thread Tobias Hermann
OK, I understand.

Right now I am updating my projects to version 0.17. I see the benefits of 
the Elm Architecture. The model/update parts become much cleaner compared 
to the old Signal way.

But at the same time I am disappointed with the view parts. Elm once used 
slogans like "Centering a div should be easy." and "Try this with 
Html/CSS." to advertise itself. But now I have to painfully wade through 
all the annoying CSS stuff <http://i.imgur.com/oZXdQdV.gif> again to 
position widgets.


On Monday, May 16, 2016 at 2:29:08 PM UTC+2, Peter Damoc wrote:
>
> I'm not satisfied enough with the API to publish it. 
>
> This is mainly because I haven't yet done anything serious with it. :) 
>
>
>
> On Mon, May 16, 2016 at 11:05 AM, Tobias Hermann  > wrote:
>
>> Wow, this looks extremely useful. I think this would make a great package 
>> and should not stay hidden in some github gist. *wink*
>>
>>
>> On Monday, May 16, 2016 at 9:46:50 AM UTC+2, Peter Damoc wrote:
>>>
>>> you can easily use Html for layout and create your own little layout 
>>> language with functions. 
>>>
>>> For example, you can use this playground for visually thinking about the 
>>> layout:
>>>
>>> https://demos.scotch.io/visual-guide-to-css3-flexbox-flexbox-playground/demos/
>>> and a little helper module like this one:
>>> https://gist.github.com/pdamoc/c07eee6b7ab761853d59d8db01d89b71
>>>
>>> to allow you to express your layout like 
>>>
>>> greyCenterStretch = 
>>>div [ design <| justifyCenter <| alignItemsStretch <| [("background", 
>>> "grey")] ]
>>>
>>> bottomDiv = div [design <| alignSelfEnd []]
>>>
>>> view model = 
>>> greyCenterStretch 
>>> [ bottomDiv
>>> [ ... ]
>>> , ...
>>> ]
>>>
>>>
>>>
>>>
>>>
>>> On Mon, May 16, 2016 at 10:29 AM, Tobias Hermann  
>>> wrote:
>>>
>>>> Ok, thank you.
>>>> I liked to align input boxes etc. with the functions from 
>>>> Graphics.Element, because it isolated me from all the HTML/div/CSS 
>>>> thinking.
>>>> But of course I understand. Also thanks for the remark about 
>>>> Graphics.Input. I was already wondering where it went. ;-)
>>>>
>>>>
>>>> On Sunday, May 15, 2016 at 11:32:53 PM UTC+2, Janis Voigtländer wrote:
>>>>>
>>>>> No, this conversion is not conceptually possible anymore. Html can 
>>>>> have event listeners attached, but post-0.16 Elements are weaker than 
>>>>> 0.16 
>>>>> Elements in that they don't support events anymore (hence also no 
>>>>> Graphics.Input module anymore). Thus, the conversion from Html to Element 
>>>>> had to go.
>>>>>
>>>>> (Conceptually, it should still be possible to convert values of type 
>>>>> Html Never to Element, but it's not implemented.)
>>>>>
>>>>> Am Sonntag, 15. Mai 2016 schrieb Tobias Hermann :
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I used to utilize Html.toElement to embed divs in flow down lists 
>>>>>> etc. from Graphics.Element.
>>>>>> Html.toElement is gone with the version update. Is there still 
>>>>>> something available for this conversion?
>>>>>>
>>>>>> Tobias
>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Elm Discuss" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to elm-discuss+unsubscr...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Elm Discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to elm-discuss...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> There is NO FATE, we are the creators.
>>> blog: http://damoc.ro/
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elm-discuss...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Html.toElement in Elm version 0.17?

2016-05-16 Thread Tobias Hermann
Wow, this looks extremely useful. I think this would make a great package 
and should not stay hidden in some github gist. *wink*


On Monday, May 16, 2016 at 9:46:50 AM UTC+2, Peter Damoc wrote:
>
> you can easily use Html for layout and create your own little layout 
> language with functions. 
>
> For example, you can use this playground for visually thinking about the 
> layout:
>
> https://demos.scotch.io/visual-guide-to-css3-flexbox-flexbox-playground/demos/
> and a little helper module like this one:
> https://gist.github.com/pdamoc/c07eee6b7ab761853d59d8db01d89b71
>
> to allow you to express your layout like 
>
> greyCenterStretch = 
>div [ design <| justifyCenter <| alignItemsStretch <| [("background", 
> "grey")] ]
>
> bottomDiv = div [design <| alignSelfEnd []]
>
> view model = 
> greyCenterStretch 
>     [ bottomDiv
> [ ... ]
> , ...
> ]
>
>
>
>
>
> On Mon, May 16, 2016 at 10:29 AM, Tobias Hermann  > wrote:
>
>> Ok, thank you.
>> I liked to align input boxes etc. with the functions from 
>> Graphics.Element, because it isolated me from all the HTML/div/CSS thinking.
>> But of course I understand. Also thanks for the remark about 
>> Graphics.Input. I was already wondering where it went. ;-)
>>
>>
>> On Sunday, May 15, 2016 at 11:32:53 PM UTC+2, Janis Voigtländer wrote:
>>>
>>> No, this conversion is not conceptually possible anymore. Html can have 
>>> event listeners attached, but post-0.16 Elements are weaker than 0.16 
>>> Elements in that they don't support events anymore (hence also no 
>>> Graphics.Input module anymore). Thus, the conversion from Html to Element 
>>> had to go.
>>>
>>> (Conceptually, it should still be possible to convert values of type 
>>> Html Never to Element, but it's not implemented.)
>>>
>>> Am Sonntag, 15. Mai 2016 schrieb Tobias Hermann :
>>>
>>>> Hi,
>>>>
>>>> I used to utilize Html.toElement to embed divs in flow down lists etc. 
>>>> from Graphics.Element.
>>>> Html.toElement is gone with the version update. Is there still 
>>>> something available for this conversion?
>>>>
>>>> Tobias
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Elm Discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to elm-discuss+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elm-discuss...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Task that don't fail and Cmd

2016-05-16 Thread Tobias Hermann
I also have to say thank you, because I had exactly the same question, and 
this thread helped me a lot. :)

On Monday, May 16, 2016 at 12:27:30 AM UTC+2, Zinggi wrote:
>
> Thank you very much!
> Both your explanations make perfect sense and cleared that up for me.
>
> On Sunday, 15 May 2016 23:09:30 UTC+2, Janis Voigtländer wrote:
>>
>> Actually, maybe a more useful description would frame this not as what 
>> Cmd does not have that Task has, namely andThen, but instead frame it as 
>> what Cmd offers in addition. It’s the “managed effects” aspect discussed 
>> at http://guide.elm-lang.org/effect_managers/. The two examples you 
>> mentioned, Time.now and Random.generate, are nor actually as similar as 
>> you seem to assume. To support Time.now, the implementation doesn’t need 
>> any effect management in the background. It just asks the operating system 
>> for the current time, and done. To support Random.generate, the 
>> implementation does need to do effect management (magic) in the background. 
>> Namely, it needs to keep track of a hidden seed for the random generator. 
>> That must be preserved/propagated over several calls throughout the 
>> program’s life. That would not be possible with a Task, but it is 
>> possible with a Cmd, thanks to the concept of effect managers. That’s 
>> also the reason why a Task can be turned into a Cmd, but a Cmd can’t be 
>> turned into a Task. So when looking through the available core and 
>> platform libraries, and wondering about why some things are Tasks and 
>> others are Cmds, the reasoning in my understanding is that something is 
>> a Task if it can be, if it can be implemented without effect management 
>> magic behind the scenes, whereas something is a Cmd if it has to be, if 
>> it could not be implemented without hidden effect management.
>> ​
>>
>> 2016-05-15 22:39 GMT+02:00 Janis Voigtländer :
>>
>>> Let’s say you want to make an http request where the url to request 
>>> should depend on the current time. You can build a task that does this by 
>>> combining Time.now and Http.getString. Something like Time.now 
>>> `andThen` \time -> Http.getString (queryStringBuildFrom time). Then you 
>>> turn that combined task into a Cmd and return it from your update 
>>> function. If you were to try to do the same with just Cmds, you would 
>>> have to do Time.now, then have an extra round of the update function in 
>>> which you receive the resulting time, turn it into an Http request Cmd, 
>>> send that off, and wait for its result. That’s not necessarily what you 
>>> want, the extra update round, and no guarantee that no other message occurs 
>>> in between. (That is, with the Cmd-only thing, you don’t even know that 
>>> the two involved update rounds happen directly after each other. With 
>>> Task, you have built a thing consisting of time getting and request 
>>> sending that will definitely happen directly one after the other. At least 
>>> with the current state of the Task and scheduler implementation.)
>>> ​
>>>
>>> 2016-05-15 22:27 GMT+02:00 Zinggi :
>>>
 Thanks Joey and Janis, but I still don't really understand when to use 
 Task 
 x and when to use Cmd.

 I get that Tasks are more composable than Cmds, but the flexibility 
 (and complexity) seems only necessary if a Task can fail.

 Basically, I can't think of any actual use of Window.size that doesn't 
 use the just defined performSucceed function.
 Also, the random library 
  
 uses 
 a Cmd for something very similar, so I expected the Window.size would also 
 be a Cmd.
 Time.now 
  is 
 another such example where I would have expected a Cmd, but it uses a Task 
 instead.

 So, what's the difference in usage between a Task x Something and Cmd 
 Something?

 On Sunday, 15 May 2016 20:16:48 UTC+2, Janis Voigtländer wrote:
>
> About this:
>
> However I don’t understand how it works -.-> That never function looks 
> crazy indeed. Why does it use infinite recursion and not this:
> never n = Debug.crash “Well, we’re doomed _(ツ)_/“
>
> Joey has provided the answer.
>
> About this:
>
> Also regarding my second question, why does Window.size not return a 
> Cmd?
> What benefits does a Task that cannot fail have over a Cmd?
>
> Tasks are more composable, which you might need in some situations 
> (combining the Window.size with some other task before turning the 
> result into a Cmd). The key here is that nothing like 
> http://package.elm-lang.org/packages/elm-lang/core/4.0.0/Task#andThen 
> exists for Cmd.
> ​
>
> 2016-05-15 19:52 GMT+02:00 Zinggi :
>
>> Thank you very much!
>> This works and is exactly what I wanted.
>>
>> However I don't understand how it wo

Re: [elm-discuss] Html.toElement in Elm version 0.17?

2016-05-16 Thread Tobias Hermann
Ok, thank you.
I liked to align input boxes etc. with the functions from Graphics.Element, 
because it isolated me from all the HTML/div/CSS thinking.
But of course I understand. Also thanks for the remark about 
Graphics.Input. I was already wondering where it went. ;-)


On Sunday, May 15, 2016 at 11:32:53 PM UTC+2, Janis Voigtländer wrote:
>
> No, this conversion is not conceptually possible anymore. Html can have 
> event listeners attached, but post-0.16 Elements are weaker than 0.16 
> Elements in that they don't support events anymore (hence also no 
> Graphics.Input module anymore). Thus, the conversion from Html to Element 
> had to go.
>
> (Conceptually, it should still be possible to convert values of type Html 
> Never to Element, but it's not implemented.)
>
> Am Sonntag, 15. Mai 2016 schrieb Tobias Hermann :
>
>> Hi,
>>
>> I used to utilize Html.toElement to embed divs in flow down lists etc. 
>> from Graphics.Element.
>> Html.toElement is gone with the version update. Is there still something 
>> available for this conversion?
>>
>> Tobias
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elm-discuss+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.