Re: [elm-discuss] Re: Code review request

2016-08-23 Thread Janis Voigtländer
It’s some form of compiler bug. If in your gist, you replace the output type HasX a by { a | x : Float }, which is its definition, then the gist will suddenly compile. So I think you should try to bring this example down to a minimal case and then open a bug report at https://github.com/elm-lang/el

[elm-discuss] Re: Code review request

2016-08-23 Thread Thomas Ballinger
I thought I'd bump this, I'd appreciate a pointer of something to read or an example that might clarify things. On Friday, August 19, 2016 at 12:43:13 PM UTC-4, Thomas Ballinger wrote: > > I can see experimentally this is the case, but would someone mind spelling > this out a bit for me? I think

[elm-discuss] Re: Code review request

2016-08-19 Thread Thomas Ballinger
I can see experimentally this is the case, but would someone mind spelling this out a bit for me? I think I don't understand * why the order of lines 55/56 matter * how HasX (HasXAndY {}) and HasXAndY (Has X a) could behave differently * what the error message is trying to say; what is the differe

Re: [elm-discuss] Re: Code review request

2016-08-18 Thread Nick H
> > (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".) I personally use only the latter, because it works like the pipe operator in bash :-)

Re: [elm-discuss] Re: Code review request

2016-08-18 Thread Joey Eremondi
> > 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. Tha

[elm-discuss] Re: Code review request

2016-08-18 Thread John Bugner
>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

Re: [elm-discuss] Re: Code review request

2016-08-18 Thread Thomas Ballinger
Thanks very much for all this Nick! Re Maybe use, good call Re List methods: I had seen elm-community/list-extra but wanted to m

[elm-discuss] Re: Code review request

2016-08-18 Thread Thomas Ballinger
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

Re: [elm-discuss] Re: Code review request

2016-08-18 Thread Nick H
Regarding the extensible records... Movable (Standable (Collidable (Drawable {}))) sure is a mouthful isn't it? :-) It looks like every thing in your game is the union of all four type aliases... so why not just make it one type alias? OK, one last thing. This type definition... type PossibleCo

Re: [elm-discuss] Re: Code review request

2016-08-18 Thread Nick H
(Well, I don't know if the reactor will be *replaced*, but a debug mode will be added, and it sounds like it will be much more useful for serious projects.) On Thu, Aug 18, 2016 at 4:04 PM, Nick H wrote: > Couple of things I noticed: > > You are handling window resizing with a port. Elm has a Wi

Re: [elm-discuss] Re: Code review request

2016-08-18 Thread Nick H
Couple of things I noticed: You are handling window resizing with a port. Elm has a Window module that can handle this for you. Your Util.range can be replaced by built in syntax [ 0 .. max ] For list utilities, I highly recommend loo

[elm-discuss] Re: Code review request

2016-08-18 Thread Thomas Ballinger
Thanks so much for taking a look! I've fixed (a likely cause of) the collision bug. It's fun to hear about your experience playing, despite the current lack of game experience. I'm a fan of the "h it's tetris" realization (and ideally would like to time the music's transition to the tetris

[elm-discuss] Re: Code review request

2016-08-18 Thread John Bugner
I just browsed around a bit, and noticed the following things: (1) Put your code in a source folder. Having all your elm files in the same folder as elm-package.json, .gitignore, index.html, etc is distracting. To do this, add your source folder to the "source-directories" property in elm-packag

[elm-discuss] Re: Code review request

2016-08-18 Thread Will White
Screenshot On Thursday, August 18, 2016 at 6:25:24 PM UTC+1, Will White wrote: > > Hi Thomas! > > I've played the game and I'd like to give you my thoughts on the UX. I may > be able to review the code later. I wish I'd recorded my thoughts as I > played. > > I ran right (it's Mario), bumped int

[elm-discuss] Re: Code review request

2016-08-18 Thread Will White
Hi Thomas! I've played the game and I'd like to give you my thoughts on the UX. I may be able to review the code later. I wish I'd recorded my thoughts as I played. I ran right (it's Mario), bumped into a red wall. Ran left, same. What do I do? Ran right, green block has appeared. Jump over it