Re: [elm-discuss] recursively generating a tree

2016-07-12 Thread Ian Mackenzie
Good to know! By the way, is the original code you were working on part of an open-source library, by any chance? I'm working on some 2D/3D geometric libraries for Elm myself, including stuff like bounding boxes and spatial trees much like the one you describe. Might would be worth seeing if

Re: [elm-discuss] recursively generating a tree

2016-07-12 Thread Max Goldstein
Nah, trampoline takes some mental gymnastics! Hope it's helpful for your tree problem. -- 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] DependencyCI, new CI tool with Elm support

2016-07-12 Thread Joey Eremondi
I haven't tried it, but they list Elm as one of their supported languages on the main page, which is also some nice exposure for us. As usual, it's free to use with open-source projects. https://dependencyci.com/ -- You received this message because you are subscribed to the Google Groups "Elm

Re: [elm-discuss] recursively generating a tree

2016-07-12 Thread Nick H
*sigh* Never mind, I am being dumb. factorial : Int -> Int factorial x = Trampoline.evaluate (fac 1 x) fac : Int -> Int -> Trampoline Int fac acc n = if n <= 0 then Trampoline.done acc else Trampoline.jump (\_ -> fac (n * acc) (n - 1)) On Tue, Jul 12, 2016 at 9:17

Re: [elm-discuss] recursively generating a tree

2016-07-12 Thread Nick H
... and I have no idea how this is supposed to work. Even for primitive recursion factorial : Int -> Int factorial x = Trampoline.evaluate (fac x) fac : Int -> Trampoline Int fac x = if x <= 0 then Trampoline.done 1 else Trampoline.jump (\_ ->

Re: [elm-discuss] recursively generating a tree

2016-07-12 Thread Nick H
Ian, that is a great thought, but even if we split the list exactly in half, the call stack fills up when the list length gets to around 4500. partition _ list = let n = List.length list // 2 in (List.take n list, List.drop n list) In my specific problem, the "wrap" function finds

Re: [elm-discuss] Czaplicki on Elixir Fountain

2016-07-12 Thread John Orford
at the end Elm mentions the technical similarity between Elm & Erlang - pity they didn't talk more about that... On Tue, 12 Jul 2016 at 13:48 Luis Arias wrote: > Nice! Thanks! > > On Mon, Jul 11, 2016 at 9:05 PM, John Orford > wrote: > >> Great

Re: [elm-discuss] Czaplicki on Elixir Fountain

2016-07-12 Thread Luis Arias
Nice! Thanks! On Mon, Jul 11, 2016 at 9:05 PM, John Orford wrote: > Great interview > > > https://soundcloud.com/elixirfountain/elixir-fountain-evan-czaplicki-2016-07-11 > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss"

Re: [elm-discuss] How would you generalise Elm?

2016-07-12 Thread Peter Damoc
but is there anything ever a type? I mean, of course everything in elm HAS a type but you cannot pass around types and you cannot use them in any way (interrogate, compose) . On Tue, Jul 12, 2016 at 2:25 PM, John Orford wrote: > even values are functions (if we squint

Re: [elm-discuss] How would you generalise Elm?

2016-07-12 Thread John Orford
even values are functions (if we squint hard enough and think about church numerals etc. : ) so I would just amend, "everything's" a type or a function On Tue, 12 Jul 2016 at 12:26 Peter Damoc wrote: > I think you can reuse Haskell's generalization: "everything is a function"

[elm-discuss] How would you generalise Elm?

2016-07-12 Thread Galfarragem
Using the mental model "everything is a" [1] as a way to generalise something how would you define Elm? [1] - http://c2.com/cgi/wiki?EverythingIsa -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop

[elm-discuss] Elixir users: have you made Brunch work?

2016-07-12 Thread Simon
Hi, I've built a couple of projects now using Phoenix and Elm, but both quickly started misbehaving in that the file watchers were not picking up changes properly and causing recompilation. I'm thinking of substituting in Gulp next time as I know it is reliable, but wanted to see whether I have

Re: [elm-discuss] Re: Draft blog post - "How to Use Elm at Work" - looking for feedback

2016-07-12 Thread Yosuke Torii
Sorry, please let me adjust my previous comment. I said React+Elm is too large, but now I found it's NOT so large as I thought. (Of course not as small as lightweight libraries yet) I just saw the number at TodoMVC. elm.js: 69.7 KB gziped (including all user code) react-with-addons.js: 174 KB

Re: [elm-discuss] Re: handling URL params in ELM

2016-07-12 Thread Peter Damoc
If you look here: https://github.com/elm-lang/navigation/blob/master/examples/Counter.elm#L42 you can see that it's using the .hash part of the Location. If you look here: http://package.elm-lang.org/packages/elm-lang/navigation/1.0.0/Navigation#Location I'm sure you will find what you need. ;)