Re: [elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread Peter Damoc
The reason I asked for the URL examples is because I wanted to understand the nature of the dynamic part. I was curious if maybe the kind of need that you have from the parser couldn't be solved without flags. Why couldn't you just trim the url in the parser function? On Tue, Sep 13, 2016

Re: [elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread d . vandeneijkel
Ok, the solution would look like this; but not sure if it's ok to create a new parser every time the addressbar changes... https://github.com/aische/navigation/blob/master/src/Navigation.elm (new function: programWithFlags' )

Re: [elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread OvermindDL1
In my case it is because I have a single app that can be instanced into multiple pages (or twice in a single page) and need to prune the url of a part that needs to be ignored and need to completely ignore the url entirely (pure internal navigation for this state). The url's can be dynamic so

Re: [elm-discuss] Re: Request: loosen syntactic constraints on base-record in record extend/update syntax

2016-09-13 Thread Nick H
Another solution might be to define some setters, so that you could write something like: [ defaultCustomer 1 |> setName "Smith" |> setOccupation |> "Clerk", defaultCustomer 2 |> setName "Jones", defaultCustomer 3 |> setNickname "R2-D2" |> setHeight 0.5 ] Unfortunately, defining all those

Re: [elm-discuss] Proposal for a 1st-class, officially-supported CSS package

2016-09-13 Thread Noah Hall
elm-css doesn't need extra first class Elm support. It has first class Elm support - everything is a function. As Nick said, focus on how you _use_ elm-css. It's plenty first-class enough wihtout burdening the compiler with excessive language features. On Tue, Sep 13, 2016 at 7:17 PM, Nick H

Re: [elm-discuss] Re: Request: loosen syntactic constraints on base-record in record extend/update syntax

2016-09-13 Thread Nick H
OK, this is a more complex issue than what I had in mind. If you have a small number of desired initializations (maybe 2 or 3 cases besides defaultCustomer), I think it would make sense to have multiple construction functions. But of course that won't scale at all. On Tue, Sep 13, 2016 at 7:03

Re: [elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread Peter Damoc
Out of curiosity, what functionality are you actually trying to achieve? I'm trying to understand the need behind wanting to be dynamic in ignoring a certain part of the url. Can you give some URL examples that show what you want to achieve? On Tue, Sep 13, 2016 at 8:12 PM, OvermindDL1

Re: [elm-discuss] Proposal for a 1st-class, officially-supported CSS package

2016-09-13 Thread Nick H
Hi Kevin, As far as I can tell, the type alias you are quoting (Value, All, NumberedWeight) are not part of the elm-css API. I can't find them in the package documentation . Are you suggesting a change to the *implementation* of

Re: [elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread OvermindDL1
Does not work in my case of needing to specify a part of the url to ignore and to only change the remaining part. Right now I just have this in my code to 'work around it for now': ``` module SomeApp.Hacks exposing (..) {-| https://github.com/elm-lang/navigation/issues/9 -} navigationHack :

Re: [elm-discuss] Re: Problem with Html.Lazy

2016-09-13 Thread Mark Hamburg
There are things you can do in your code to help and things that Elm could do (maybe already does) in its implementation to help: For the data construction issue, you need to create an intervening function that does the construction: view model = lazy someViewHelper model.data someViewHelper

Re: [elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread d . vandeneijkel
That's a good idea. It does not play well with the architecture of the program I was working on, but I will investigate it. Thank you! BTW, I just realized, that my original suggestion would not work, because the parser is used at two places; in the init-function it has access to the flags,

Re: [elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread Peter Damoc
On Tue, Sep 13, 2016 at 6:55 PM, wrote: > > 2. Giving the Url-Parser (of the Navigation package) access to the program > flags. > > This was a little show stopper for me. I wanted to write a single page app > that does not have to be recompiled if you switch the

[elm-discuss] Two suggestions for improvements (Regex and Navigation)

2016-09-13 Thread d . vandeneijkel
Hello everyone, Elm is great, and version 0.17 is wonderfull. Most of the time, programming in Elm feels like exactly how you would like to build things. A big thank-you to all the people who made it happen! However, I stumbled over two litte things that could be improved. One concerns the

[elm-discuss] Proposal for a 1st-class, officially-supported CSS package

2016-09-13 Thread suttlecommakevin
*Preface* Saying Elm is a language for front-end apps, but leaving out 1/3 of the stack isn't confidence-inspiring. Between our collective experience, I think we can make something awesome and fun to use, while leveraging the features that make Elm a great language. *Problem to be solved*

Re: [elm-discuss] Re: Module manipulation

2016-09-13 Thread OvermindDL1
On Tuesday, September 13, 2016 at 8:43:27 AM UTC-6, Joey Eremondi wrote: > > It's also worth mentioning that first class modules are a decent > replacement for type classes. > That is precisely the main reason that I am wanting them. ^.^ Although in that case having OCaml'ish Class

Re: [elm-discuss] Re: Module manipulation

2016-09-13 Thread Joey Eremondi
It's also worth mentioning that first class modules are a decent replacement for type classes. On Sep 13, 2016 7:28 AM, "OvermindDL1" wrote: > It seems you are wanting something like OCaml has, first-class modules > that can be passed around like types and data like OCaml

[elm-discuss] Re: My second Elm project.

2016-09-13 Thread OvermindDL1
It is to help enforce usage with the spec: https://material.google.com/components/dialogs.html#dialogs-specs You can actually very easily use mdl directly by just putting the right classes and attributes on things, elm-mdl is to help enforce following the official spec. :-) On Tuesday,

[elm-discuss] Re: Minimize Javascript for deploys

2016-09-13 Thread OvermindDL1
It works via brunch fine as well. On Tuesday, September 13, 2016 at 3:02:22 AM UTC-6, Rupert Smith wrote: > > On Tuesday, September 13, 2016 at 9:19:27 AM UTC+1, Håkon Rossebø wrote: >> >> This is how the clojure compiler is used in the elm-mdl makefile: >> >> java -jar closure-compiler.jar -O

[elm-discuss] Re: Module manipulation

2016-09-13 Thread OvermindDL1
It seems you are wanting something like OCaml has, first-class modules that can be passed around like types and data like OCaml does it? I would love that and it would fix a lot of the verbosity I have. On Tuesday, September 13, 2016 at 1:23:55 AM UTC-6, Charles-Edouard Cady wrote: > > Would

Re: [elm-discuss] Re: Request: loosen syntactic constraints on base-record in record extend/update syntax

2016-09-13 Thread Martin Cerny
Hi, thanks for the suggestion, but I think you are answering to a different problem than the one I had in mind, I'll try to be more clear to avoid confusion. In my use case, I have a lot of fields, which usually can be kept with their default values, but some of them aren't. So not all

[elm-discuss] Re: What languages do you write your back-ends in?

2016-09-13 Thread Matt Hughes
I'm just playing around and don't want to learn another language at the moment, so although I'd like to look at Elixir/Phoenix, or F#, or Haskell, or Scala, I'm using Java via Dropwizard. http://www.dropwizard.io/1.0.0/docs/ If you already know Java, it's a fairly lightweight (for Java) way

Re: [elm-discuss] What languages do you write your back-ends in?

2016-09-13 Thread John Orford
what libs do you use to that? how idiomatic is it in the end? On Sun, 11 Sep 2016 at 20:55 Eric G wrote: > Python at the moment (on Google App Engine), increasingly written in a > Elm-y/monadic style ;) > > > On Sunday, September 11, 2016 at 12:36:03 PM UTC-4, John Mayer

[elm-discuss] Re: Problem with Html.Lazy

2016-09-13 Thread James Wilson
I had similar feelings; lazy uses a magical referential equality between things that afaik isn't exposed elsewhere; to me it would be more obvious/clear if it used the same sort of equality as everything else (==), which I'd hope would be able to short circuit the meat of the checking if

[elm-discuss] Problem with Html.Lazy

2016-09-13 Thread Yosuke Torii
Hi, I have a question about Html.Lazy. Now I'm optimizing rendering using Html.Lazy but I feel it is difficult to use. I found the arguments are not often *referentially* equal and the view functions are unfortunately called. There are some problems around this. 1. Sometimes new values are

[elm-discuss] Re: Minimize Javascript for deploys

2016-09-13 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, September 13, 2016 at 9:19:27 AM UTC+1, Håkon Rossebø wrote: > > This is how the clojure compiler is used in the elm-mdl makefile: > > java -jar closure-compiler.jar -O ADVANCED --assume_function_wrapper --js > elm.js > /tmp/elm.js && mv /tmp/elm.js elm.js > > I just tried it on one

[elm-discuss] Re: My second Elm project.

2016-09-13 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, September 13, 2016 at 9:39:25 AM UTC+1, Rupert Smith wrote: > > I first developed the 'style lab' as static HTML, then converted it to > elm-mdl, using html-to-elm along the way then converting all the various > components to elm-mdl as necessary. > One thing that I found a little

[elm-discuss] My second Elm project.

2016-09-13 Thread 'Rupert Smith' via Elm Discuss
https://github.com/rupertlssmith/thesett_style_lab I first developed the 'style lab' as static HTML, then converted it to elm-mdl, using html-to-elm along the way then converting all the various components to elm-mdl as necessary. The main difference with pure MDL is that I have developed

[elm-discuss] Re: Minimize Javascript for deploys

2016-09-13 Thread Håkon Rossebø
This is how the clojure compiler is used in the elm-mdl makefile: java -jar closure-compiler.jar -O ADVANCED --assume_function_wrapper --js elm.js > /tmp/elm.js && mv /tmp/elm.js elm.js I just tried it on one of my own projects and it seems to work fine. mandag 12. september 2016 23.03.02

[elm-discuss] Module manipulation

2016-09-13 Thread Charles-Edouard Cady
Would anybody besides me be interested in being able to manipulate module? I was thinking something on the lines of: getUpdate : m -> (m.Model -> m.Msg -> m.Model) getUpdate module = module.update Then if you have a module, say module Counter exposing (update, Msg, Model) type Model = Int