>While adding type annotations I encountered something I didn't understand 
that I worked around at 
https://github.com/thomasballinger/loveinthetimeoftetris/blob/3f968afad490ebab54b4f0c3bafdf45b779ebc4b/src/Main.elm#L278
 
<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fthomasballinger%2Floveinthetimeoftetris%2Fblob%2F3f968afad490ebab54b4f0c3bafdf45b779ebc4b%2Fsrc%2FMain.elm%23L278&sa=D&sntz=1&usg=AFQjCNHWWle8K9N4ns0hPN_ZsfHuLhyhMA>,
 
I tried to simplify the behavior and got it down to this 
https://gist.github.com/thomasballinger/a0d8b38fa7186ee2e608d4772f2ebe7e 
<https://www.google.com/url?q=https%3A%2F%2Fgist.github.com%2Fthomasballinger%2Fa0d8b38fa7186ee2e608d4772f2ebe7e&sa=D&sntz=1&usg=AFQjCNGqGdcDpNNLJcdHYuk4QmwUE0kuzA>
 which 
I'd appreciate a hand from anyone in understanding.
I haven't used extensible records very much, but I think it's because 
the signatures don't match.
The first is:
>hasBothXAndY : HasXAndY (HasX a)
but the other is:
>fieldOfBothTypes : HasX (HasXAndY {})
The order matters.

(Btw, the (<|) function is the opposite of (|>). I personally use only the 
former, because it does things in the same order that you normally write a 
function. The latter makes things look "backwards".)

On Thursday, August 18, 2016 at 7:06:13 PM UTC-5, Thomas Ballinger wrote:
>
> Thanks very much John. The auto-formatter I'm using is 
> https://github.com/avh4/elm-format, I also found it to be a bit much. I'm 
> a big fan of automatic formatting so might look at changing these settings 
> in elm-format, or if anyone knows of other autoformatters please let me 
> know.
>
> While adding type annotations I encountered something I didn't understand 
> that I worked around at 
> https://github.com/thomasballinger/loveinthetimeoftetris/blob/3f968afad490ebab54b4f0c3bafdf45b779ebc4b/src/Main.elm#L278,
>  
> I tried to simplify the behavior and got it down to this 
> https://gist.github.com/thomasballinger/a0d8b38fa7186ee2e608d4772f2ebe7e 
> which I'd appreciate a hand from anyone in understanding.
>
> I did the rest of these except for switching to SVG, but I'm looking 
> forward to that too.
>  
>
>> >* I don't think I'll be using evancz/elm-graphics in the future since 
>> I'll be doing less gamey stuff or want to work with canvas more directly. 
>> How is this usually done?
>> By using Svg instead: 
>> http://package.elm-lang.org/packages/elm-lang/svg/1.1.1
>>
>> On Wednesday, August 17, 2016 at 4:40:38 PM UTC-5, Thomas Ballinger wrote:
>>>
>>> Hi Elm folks! I've enjoyed reading this list for a bit. I've written my 
>>> first Elm thing over the last couple weeks and would love to hear any kind 
>>> of feedback on it. It's an unfinished game jam piece I kept running with so 
>>> the title doesn't make sense.
>>>
>>> code: https://github.com/thomasballinger/loveinthetimeoftetris
>>> live: love.ballingt.com (takes about 70 seconds to play all of)
>>>
>>> I was going to clean things up the way I know how, but I need to take a 
>>> break to get some other things done and I thought I'd learn more by asking 
>>> how someone else might clean it up. Please don't assume I know what I'm 
>>> doing in the slightest :)
>>>
>>> Any feedback would be great, but if prompts are helpful:
>>> * what does this code make it look like I'm missing about Elm?
>>> * what do you think of the extensible record type aliases? I think the 
>>> way I've used them is mostly terrible, I designed them up front instead of 
>>> letting them evolve.
>>> * code style?
>>> * I'm using an elm autoformatter, how's my formatting? Is this style 
>>> common?
>>> * I don't think I'll be using evancz/elm-graphics in the future since 
>>> I'll be doing less gamey stuff or want to work with canvas more directly. 
>>> How is this usually done?
>>> * I abandoned elm reactor once I started embedding in html, is that a 
>>> viable workflow I should have stuck with for longer?
>>> * I was tempted to start a utils file or look for an external lib but 
>>> was trying to focus on learning the stdlib. Are there pretty common util 
>>> libs folks use? I sure missed some list functions.
>>> * I escaped to JavaScript anytime I thought it would be hard to do 
>>> something with the stdlib, presumably it would be nice to use Elm for some 
>>> of these things?
>>>
>>> Thanks so much, and feel free to contact off list if you prefer at 
>>> [email protected] - if you do I'll report back what I learned to the 
>>> list.
>>>
>>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to