Re: [elm-discuss] How to check if all Maybes are specified and use values directly (without using "withDefault")

2016-08-03 Thread Austin Baltes
Hi Janis, thank you for sharing that library. I wasn't familiar with it and it exposes some useful functionality -- I'll definitely keep in mind! On Wednesday, August 3, 2016 at 9:25:14 PM UTC-7, Janis Voigtländer wrote: > > Another possible take on your example: > > forecastProtected : Maybe

Re: [elm-discuss] Re: [ANN] elm-mdl 7.0.0 — supports all components of Material Design Lite

2016-08-03 Thread Peter Damoc
Congrats to the elm-mdl team for reaching the milestone! At around 5600 LOC, the elm-mdl Demo is one of the largest public projects of Elm code and a very good benchmark of what is needed in Elm to create complex UIs ! On Thu, Aug 4, 2016 at 8:15 AM, Max Goldstein

Re: [elm-discuss] Re: [ANN] elm-mdl 7.0.0 — supports all components of Material Design Lite

2016-08-03 Thread John Orford
Wow! On Thu, 4 Aug 2016 at 07:15 Max Goldstein wrote: > Seeing so many people adopt and contribute to this package is at least as > impressive as the code itself! Great job! > > -- > You received this message because you are subscribed to the Google Groups > "Elm

[elm-discuss] Re: [ANN] elm-mdl 7.0.0 — supports all components of Material Design Lite

2016-08-03 Thread Max Goldstein
Seeing so many people adopt and contribute to this package is at least as impressive as the code itself! Great job! -- 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

Re: [elm-discuss] Abort tasks?

2016-08-03 Thread Nikolai Koudelia
OK, I'll try to do it that way. Thanks! On Thursday, August 4, 2016 at 12:57:18 AM UTC+3, Max Goldstein wrote: > > It's not possible to unsend a network request, so you should generally > avoid trying to do so. > > I don't think having a flag in the Model is that bad. Keep enough state > that

Re: [elm-discuss] How to check if all Maybes are specified and use values directly (without using "withDefault")

2016-08-03 Thread Janis Voigtländer
Another possible take on your example: forecastProtected : Maybe Float -> Maybe Float -> Maybe Float -> (List Int) -> List FloatforecastProtected q d b months = case combine [q, d, b] of Just [q, d, b] -> forecast q d b months _ -> [] where combine is from

Re: [elm-discuss] Animation example on intro guide missing--alternatives?

2016-08-03 Thread Karl Smeltzer
Thanks, Duane. I haven't had a chance to dig into that library yet, but it looks like as good a place to start as any. I'd still very much appreciate any other pointers out there. -- Karl > On Aug 2, 2016, at 19:47, Duane Johnson wrote: > > This library and

[elm-discuss] How to check if all Maybes are specified and use values directly (without using "withDefault")

2016-08-03 Thread Austin B
I am trying to ensure that three arguments to a function are all not Nothing. Right now I have this (below), which works, but uses "withDefault." I want to avoid this because the default values are meaningless and I want to clearly and fundamentally avoid any possible situation where a Nothing

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
Huh, pretty major site-killing bug to go not only noticed or repaired, but no work-around listed either... Should I move my bug report to elm-core since mine has substantially more information about how and where it is happening? On Wednesday, August 3, 2016 at 3:46:26 PM UTC-6, Nick H wrote:

[elm-discuss] Re: Elm doesn't need source maps

2016-08-03 Thread OvermindDL1
I am a fan of source maps, in Elm too. On Wednesday, August 3, 2016 at 4:26:55 PM UTC-6, Charlie Koster wrote: > > >1. Elm actually can have runtime exceptions. It doesn't have >type-related runtime exceptions but it's completely possible to have >others

[elm-discuss] Re: [ANN] elm-mdl 7.0.0 — supports all components of Material Design Lite

2016-08-03 Thread OvermindDL1
Awesome, will be updating tomorrow morning! :-) On Wednesday, August 3, 2016 at 4:07:00 PM UTC-6, debois wrote: > > Dear all, > > I'm very happy to announce the release of elm-mdl 7.0.0. This release > marks a substantial achievement of elm-mdl: we have now ported *every* > component > of

[elm-discuss] Re: Elm doesn't need source maps

2016-08-03 Thread Charlie Koster
That's probably not an exact quote but I heard Richard say that today on the JavascriptAir podcast and I've heard it before on other podcasts or videos. The idea is why would you need source maps if there are no runtime exceptions? There are two reasons I think this isn't a useful line of

[elm-discuss] DailyDrip is giving away 5 copies of Richard Feldman's book, Elm in Action

2016-08-03 Thread josh
Just a quick note, we're giving away 5 copies of Richard's upcoming book. https://contest.dailydrip.com/giveaways/win-a-copy-of-elm-in-action-by-richard-feldman/ Good luck, if you want it! :) -Josh -- You received this message because you are subscribed to the Google Groups "Elm Discuss"

Re: [elm-discuss] [ANN] elm-mdl 7.0.0 — supports all components of Material Design Lite

2016-08-03 Thread Duane Johnson
Congrats! What a great achievement and contribution to the community. This will, no doubt, cement MDL as the go-to choice for many new Elm adopters. On Wed, Aug 3, 2016 at 4:07 PM, debois wrote: > Dear all, > > I'm very happy to announce the release of elm-mdl 7.0.0.

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread Nick H
This is a known issue with subscription swapping (see here , here , here , and here ). On Wed, Aug 3, 2016

Re: [elm-discuss] Abort tasks?

2016-08-03 Thread Nikolai Koudelia
I don't understand the API :( Using Process.spawn and kill, is it possible to completely skip receiving the Increment message in this demo program instead of

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
And found a workaround, but a really nasty horrible workaround. I had code kind of like this: ```elm subscriptions model = Sub.batch [ if List.isEmpty model.onNextFrame then Sub.none else AnimationFrame.times HelpersMsg_Frame ] ```

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
The message that contains the one that gets wiped is `id: 38` as stated before, it is a "_Task_andThen" with a `task` of what will become `id: 39`. When `id: 38` gets processed it enqueues `id: 39`, at this time the `cancel` key on the task that becomes Process `id: 39` is null, but walking

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
I find debugging oddly invigorating, plus this is hampering my actual job so I have an excuse. ^.^ On Wednesday, August 3, 2016 at 12:26:22 PM UTC-6, Duane Johnson wrote: > > > On Wed, Aug 3, 2016 at 12:21 PM, OvermindDL1 > wrote: > >> I am not yet seeing how the `root`

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
Sometime between when `id: 39` and `id: 40` is created during `rawSpawn` the `root` key in the object goes null. Still trying to find what code is wiping it... On Wednesday, August 3, 2016 at 12:21:18 PM UTC-6, OvermindDL1 wrote: > > The task object with `id: 39` does not have a null `root`

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread Duane Johnson
On Wed, Aug 3, 2016 at 12:21 PM, OvermindDL1 wrote: > I am not yet seeing how the `root` key on this "_Process" object is > getting cleared yet before it has a chance to be processed, still tracing... > Keep fighting the good fight. If this does turn out to be a bug in

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
Debugged into it and caught the exception at the point to get the stack values: ```javascript numSteps = 403 process = Object {ctor: "_Process", id: 39, root: null, stack: null, mailbox : Array[0]} ``` So root is null, why would it be trying to access a null value without checking if null? Any

[elm-discuss] Uncaught TypeError

2016-08-03 Thread OvermindDL1
I keep getting this exception thrown from inside Elm, so far only from Chrome Version 51.0.2704.103 m ``` elm.js:2417 Uncaught TypeError: Cannot read property 'ctor' of null ``` Where that line and the surrounding context is purely Elm generated code, and is: ```javascript // STEP PROCESSES

Re: [elm-discuss] Elm Records as a platform-agnostic data type?

2016-08-03 Thread Tiziano Santoro
An alternative could be to use protocol buffers or similar mechanisms. In fact, I have been working on supporting this in elm , although it is not production-ready yet. If anyone is willing to help

Re: [elm-discuss] Re: `Lazy` misnomer, lack of documentation, debugging difficulties, examples, etc.

2016-08-03 Thread Janis Voigtländer
This sounds like a serious bug (violating type safety inside a pure Elm program). Can you open a GitHub issue with an http://sscce.org/ please? ​ 2016-08-03 19:19 GMT+02:00 Kyle J. Kress : > And actually in my example issue last night, lazy made the Msg type > passed into

[elm-discuss] Re: `Lazy` misnomer, lack of documentation, debugging difficulties, examples, etc.

2016-08-03 Thread Kyle J. Kress
And actually in my example issue last night, lazy made the Msg type passed into the Foo.update function, the value violated type safety and a message not of the type specified was fell through the last case statement (which compiles out to the default on a JavaScript switch). -- You received

[elm-discuss] `Lazy` misnomer, lack of documentation, debugging difficulties, examples, etc.

2016-08-03 Thread Kyle J. Kress
I just spent a whole evening debugging a problem in my application with lazy because even though the component model had changed, lazy was memoizing the function. It was very confusing since events inside the component were firing, sort of (i.e. Html.App.map Msg.Foo (Html.Lazy.lazy Foo.view

[elm-discuss] My first Elm

2016-08-03 Thread 'Rupert Smith' via Elm Discuss
So I've read Czaplicki's paper, then read that its all changed since then (no Signals), tried out examples and surfed around github. A lot of example code is 0.16, but I am looking for something 0.17 to get stuck into. I have an existing project done in angular and paper.js. It has a grunt