Re: [elm-discuss] Re: Why does this not work via record intersection

2016-10-09 Thread Martin DeMello
thanks! now that i know the answer i can see that it was in the docs under "extensible records", but it was indeed non-obvious. martin On Sun, Oct 9, 2016 at 9:09 PM, Max Goldstein wrote: > You need a rather non-obvious piece of syntax: > > make_xword : { a | rows : Int, cols : Int } -> Xword >

[elm-discuss] Re: Why does this not work via record intersection

2016-10-09 Thread Max Goldstein
You need a rather non-obvious piece of syntax: make_xword : { a | rows : Int, cols : Int } -> Xword This basically means that the input is a record with rows and cols, and any other fields. The origin of this syntax is that any record *a*, as long as it's extended with these fields, is acceptab

[elm-discuss] Why does this not work via record intersection

2016-10-09 Thread Martin DeMello
If I have the following: make_xword : { rows : Int, cols : Int } -> Xword import Xword exposing (Xword, make_xword) type alias InCell = { x : Int , y : Int , contents : String } type alias InXword = { rows : Int , cols : Int , cells : List InCell } to_xword : InXword -> Xword t

[elm-discuss] Re: Anyone working on audio stuff?

2016-10-09 Thread Francesco Orsenigo
I did this https://github.com/xarvh/elm-audio On Sunday, October 9, 2016 at 11:24:10 AM UTC+11, ratvis wrote: > > Either just HTLM5 audio element or web-audio? I kind of thought after .17 > came out, some more stuff would come out. > Just a wrapper thing around html5 audio (onPause, onEnded,..

Re: [elm-discuss] Re: Integrating Elm with Web Components / Polymer

2016-10-09 Thread Peter Damoc
You seam to have summarized the discussion pretty well. The only thing that remained to be shown with code is how to implement a component in Elm and use it in Elm (yo, dawg style) . On Sun, Oct 9, 2016 at 12:29 AM, Richard Feldman < richard.t.feld...@gmail.com> wrote: > I'm catching up on thi

[elm-discuss] Re: elm-new, a CLI tool for initializing new Elm projects

2016-10-09 Thread Erkal Selman
great, I needed something like this. thanks. On Monday, August 8, 2016 at 9:11:15 AM UTC+2, Simone Vittori wrote: > > I recently worked on elm-new, a tool for creating a project scaffolding to > get started with Elm more easily and quickly. Please check it out: > > https://github.com/simonewebde

[elm-discuss] Re: Anyone working on audio stuff?

2016-10-09 Thread Josh Adams
I can second that newslandvalley's stuff is great. I used one of his projects to power https://github.com/knewter/colluder which is a real-time collaborative music tracker. It needs some more work to be full-featured, but all the hard stuff is covered and it works :) On Sunday, October 9, 201

Re: [elm-discuss] Maybe.andThen with List.foldr type trick?

2016-10-09 Thread Wouter In t Velt
Maybe (pun intended) the catMaybes function from http://package.elm-lang.org/packages/krisajenkins/elm-exts/25.13.0/Exts-Maybe will help you. It has a signature of: catMaybes : List (Maybe a) -> List a Which keeps all your Just a items in the list. So adding a Nothing would be relatively s

[elm-discuss] Re: elm-new, a CLI tool for initializing new Elm projects

2016-10-09 Thread Simone Vittori
Thanks for the feedback guys, I decided to publish it on npm. Now you can do: npm install -g elm-new @Witold, feel free to install it locally if you want, but I think "global" makes more sense for this tool. It's something you may want to use independently between projects. create-elm-app is

[elm-discuss] Re: Anyone working on audio stuff?

2016-10-09 Thread John Watson
I've been working primarily on audio for the last 6 or 7 months. Some examples: A soundfont javascript wrapper that gives you a grand piano A MIDI parser A module that encapsulates a MIDI play