[elm-discuss] Re: Displaying text with elm-graphics

2016-06-03 Thread Max Goldstein
Seems to be this bug: https://github.com/evancz/elm-graphics/issues/3 No workaround, I'm afraid. -- 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+unsu

[elm-discuss] Re: Proposal: flip argument order when using backticks

2016-06-03 Thread Max Goldstein
You can use pipelines in Elm; in fact they are preferred. Somewhat handwavey example: getAuthToken |> andThen getHomepage |> andThen doBackgroundStuff |> andThen showResultsOfBackgroundStuff (Think of |> as a unix pipe.) This proposal is about backticks. As background, a function that's a word

Re: [elm-discuss] Signals... are they really gone?

2016-06-03 Thread Conrad Dean
The purpose of Signals are now satisfied by Subscriptions. see http://elm-lang.org/blog/farewell-to-frp and https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.17.md On Fri, Jun 3, 2016 at 3:03 PM, Nick H wrote: > They are completely gone. > > If you have any local projects, you

Re: [elm-discuss] Re: Improving collaboration - part 2

2016-06-03 Thread Magnus Rundberget
I have only been part of the Elm community for something like 7-8 months, but i'll still take the chance and say a few words. I hadn't seen part 1 of this topic https://groups.google.com/forum/#!msg/elm-discuss/np3BO9X5rEc/jG3AIiU2zYEJ before, but found it enlightening. - I'm not worried about

Re: [elm-discuss] Signals... are they really gone?

2016-06-03 Thread Nick H
They are completely gone. If you have any local projects, you can browse the source of core by looking in elm-stuff/packages/elm-lang/core/ On Fri, Jun 3, 2016 at 2:49 PM, Da Best wrote: > I'm new to Elm and have played around with it briefly. I started with > 0.16. In 0.16, signals were a pr

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Joey Eremondi
> > Or are String and Int on "type MyType = String | Int" just tags? Yes, exactly! On Fri, Jun 3, 2016 at 2:53 PM, Lambder wrote: > Or are String and Int on "type MyType = String | Int" just tags? > > > On Friday, 3 June 2016 22:50:34 UTC+1, Lambder wrote: >> >> I still like to ask for som

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Joey Eremondi
type MyType = String | Int It is legal, but it does NOT do what you think it does. There are NO non-tagged union types in Elm. This type definition is no different than "type MyType = Foo | Bar ". It defines two tags for the type MyType, and the fact that those tags share the name with the existi

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Lambder
Or are String and Int on "type MyType = String | Int" just tags? On Friday, 3 June 2016 22:50:34 UTC+1, Lambder wrote: > > I still like to ask for some clarification. > > type MyType = String | Int > > is legal type definition in elm. How to define function which accept one > parameter of type

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Lambder
I still like to ask for some clarification. type MyType = String | Int is legal type definition in elm. How to define function which accept one parameter of type MyType and if it is String return it with 'x' appended as a result. If it is a number return its increment? If what I am asking make

[elm-discuss] Signals... are they really gone?

2016-06-03 Thread Da Best
I'm new to Elm and have played around with it briefly. I started with 0.16. In 0.16, signals were a pretty important thing. Now I see that in 0.17, signals have been removed. From a programming/language standpoint, I am wondering if signals have been abstracted to the point that we don't see th

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Lambder
Thank you very much for this explanation. I'm still new to elm but your post clarified that part I was missing. On Friday, 3 June 2016 22:25:59 UTC+1, Joey Eremondi wrote: > > The problem here is that you're confusing Types (which you can never > pattern match on) with Value Constructors, which

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Joey Eremondi
The problem here is that you're confusing Types (which you can never pattern match on) with Value Constructors, which are the only things you can pattern match on. When you declare a "type", you need to give a distinct tag name to each variant. Each "type" declaration has the form type Name typ

[elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Daniel Kwiecinski
Hi Elmers, How do I pattern match on aliased types? E.g lets assume I have the following type definitions: type alias View a m = m -> Html a -- view is a function which turns a model (m) into html (Html a) type alias ModelAndView a m = (m, View a m) -- a pair of a model an

[elm-discuss] would it be helpful if I built a fancy front end for the package manager?

2016-06-03 Thread Craig Ambrose
Hi folks, I was wondering if building a somewhat fancier UI for the package manager might be something that I could do as a medium sized project. The think that really excites me about elm is the great experience for new developers, so I'm wondering if we could do something to really help them

Re: [elm-discuss] Re: Improving collaboration - part 2

2016-06-03 Thread Daniel Bachler
This is a good thread. I think a lot of important opinions have been voiced here so far. The thing I personally miss most, and I think this is also what Peter was getting at, is a new big statement on the direction and the process. I personally started to do some serious work with Elm last autu

Re: [elm-discuss] Re: Improving collaboration - part 2

2016-06-03 Thread Ryan Rempel
Noah, that is a very thoughtful post, and I appreciate it. I think you are right that problems can be solved at a fast pace, and that many people can do that. The thing which is sometimes frustrating is the limits on sharing those solutions. I wonder whether this might feel a little different i

[elm-discuss] using different json decoders based on the value of a field

2016-06-03 Thread surfncode
Thanks you very much. I dont know How i missed that. I have used andThen in numerous occasions before but never for that specific use case. Now that you say it, it seems obvious :-) -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe

[elm-discuss] Re: Error installing elm-html

2016-06-03 Thread curious2learn
So, so funny! This has happened multiple times. I try many things. None of them work. Then I ask a question. Then I go and try some more and I find the solution. Wonder why I don't find it before I ask a question. Anyhow, the answer is that the html package is not elm-lang/html NOT evancz/elm-h

[elm-discuss] Error installing elm-html

2016-06-03 Thread curious2learn
I installed elm for mac this morning (within the last hour). Then I created a directory myproj and in that directory ran the following command: elm-package install and got the following elm-package.json file { "version": "1.0.0", "summary": "helpful summary of your project, less t

Re: [elm-discuss] Re: Improving collaboration - part 2

2016-06-03 Thread Noah Hall
> I must say one of the main reasons I'm not using Elm today nor do I plan to > use it on the medium term is how slow paced, constraining and tightly > controlled it is. I disagree that it's slow paced. I agree that it is constrained and tightly controlled. Part of this is the focus on deliverin

Re: [elm-discuss] Re: "Random" example - help needed

2016-06-03 Thread Peter Damoc
You can also express that as: update : Msg -> Model -> (Model, Cmd Msg) update msg model = case msg of Roll -> (model, Random.generate NewFace (Random.pair (Random.int 1 6) (Random.int 1 6))) NewFace newFace -> ((uncurry Model) newFace, Cmd.none) On Fri, Jun 3, 2016 at 5:

Re: [elm-discuss] "Random" example - help needed

2016-06-03 Thread Robert Walter
Well, that works as well... ;) Oh boy... thanks On Friday, June 3, 2016 at 4:50:58 PM UTC+2, Peter Damoc wrote: > > You forgot to give newModel its value > > Change to this: > > NewFace newFace -> > (newModel newFace, Cmd.none) > > and all should be OK > > > On Fri, Jun 3, 2016 at 5:40 PM,

[elm-discuss] Re: Proposal: flip argument order when using backticks

2016-06-03 Thread Johan
I'm still learning ELM, so I'm sure there are plenty of history and reasoning here I'm not aware of. But speaking simply from my current viewpoint: I'd like to use ELM with an Elixir backend, and wish for the same pipeline order as Elixir. That would certainly make my head hurt less. More im

Re: [elm-discuss] "Random" example - help needed

2016-06-03 Thread Peter Damoc
You forgot to give newModel its value Change to this: NewFace newFace -> (newModel newFace, Cmd.none) and all should be OK On Fri, Jun 3, 2016 at 5:40 PM, Robert Walter wrote: > If this is not the right forum for these kinds of questions, please point > me to the right place. > > Anyw

[elm-discuss] Re: "Random" example - help needed

2016-06-03 Thread Robert Walter
Okay, once I thought of the correct search term, I found a solution (using fst and snd from Basics): update : Msg -> Model -> (Model, Cmd Msg) update msg model = case msg of Roll -> (model, Random.generate NewFace (Random.pair (Random.int 1 6) (Random. int 1 6))) NewFace newFace

[elm-discuss] "Random" example - help needed

2016-06-03 Thread Robert Walter
If this is not the right forum for these kinds of questions, please point me to the right place. Anyway, I try to work my way the The Elm Architecture. As an exercise, I tried to enhance the Random Dice example by adding a second die. My idea is to add a second Int to the Model and use the Rand

Re: [elm-discuss] how to send message from one component to another

2016-06-03 Thread Peter Damoc
Here is some code to get your started: https://gist.github.com/pdamoc/ee32b8e163f371f95d9a8ba9db2f0132 On Fri, Jun 3, 2016 at 4:58 AM, 诺铁 wrote: > hi, > > I want to make some component parts, instead of a complete component. > for example, I have a search bar, it will send user input query to

[elm-discuss] using different json decoders based on the value of a field

2016-06-03 Thread Ian Mackenzie
Decode.andThen should do what you want: http://package.elm-lang.org/packages/elm-lang/core/4.0.1/Json-Decode#andThen. The example given there seems very similar to what you're trying to do. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To uns

Re: [elm-discuss] how to send message from one component to another

2016-06-03 Thread Peter Damoc
Let's say that you have a Parent + ChidA & ChildB. If you want ChildA to have an effect on ChildB, the best way to do it is to send this effect upstream to the parent by extending the update return `update : Msg -> Model -> (Model, SomeEffectRequest)` The parent should have a way to convert SomeE

Re: [elm-discuss] using different json decoders based on the value of a field

2016-06-03 Thread Matthew Bray
Yep, take a look at Json.Decode.andThen. http://package.elm-lang.org/packages/elm-lang/core/4.0.1/Json-Decode#andThen On Fri, 3 Jun 2016 at 10:21 surfncode wrote: > Hello, > > I'm currently stuck trying to decode one portion of my model. The problem > I have is the following: > > The portion I'

[elm-discuss] Re: State of CSS in Elm

2016-06-03 Thread David Legard
How difficult would it be to write an automated script to turn CSS into Elm-Css? > i.e. to turn h1 { background-color: green; } into h1 = style ["background-color","green"] -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe f

[elm-discuss] Re: Improving collaboration - part 2

2016-06-03 Thread Alexandre Galays
I follow Elm updates with great interest and I think 0.17 improved things once again. But I must say one of the main reasons I'm not using Elm today nor do I plan to use it on the medium term is how slow paced, constraining and tightly controlled it is. This is so contrary to the world will live

[elm-discuss] using different json decoders based on the value of a field

2016-06-03 Thread surfncode
Hello, I'm currently stuck trying to decode one portion of my model. The problem I have is the following: The portion I'm trying to decode looks like this: { ... filter_type: "int", data: { predicate: "less than", operand: 10 } ... } filter type can be one of (int,text,enum etc...) I w

Re: [elm-discuss] Re: Improving collaboration - part 2

2016-06-03 Thread Simon
Peter, you are very right. There is global attention on Elm at present because it gets things very right, and that's down to Evan. But getting the big things right is very different from managing a process that lets the gaps get filled in by a growing and eager community. Simon On Friday, 3 Ju

[elm-discuss] Displaying text with elm-graphics

2016-06-03 Thread slawekk
I expect the following to display text "Hello world!" in the browser: import Html import Element exposing (..) import Text main: Html.Html a main = Text.fromString "Hello world!" |> centered |> toHtml However, I get only a blank (white) page. In fact, it seems that using Text.fromString "Hell

Re: [elm-discuss] Re: Improving collaboration - part 2

2016-06-03 Thread Peter Damoc
Evan, Nobody is questioning your technical decisions here. You don't need to justify choosing to work on 0.17 rather than fixing some lower priority thing. The case I was reacting to is but a mere symptom of a much larger problem. If you simply make the case go away by just adopting Fred's code i