Re: [elm-discuss] TypeNats, SafeList and Array-Multidim updated for 0.17

2016-08-22 Thread Janis Voigtländer
I agree with Martin. Do it the way that suits your own organizing best. (But all else being equal, maybe it is not worth troubling users of your packages to rename their dependencies.) As to the original question about there being a guideline against elm- prefixes in package names: Note that

[elm-discuss] Re: Hide component on document click

2016-08-22 Thread Francisco Ramos
Hi, OvermindDL1 Thanks a lot. This is exaclty what I need... and great examples. I wasn't aware of `elm-mdl` :-) Fran On Monday, August 22, 2016 at 5:46:53 PM UTC+2, OvermindDL1 wrote: > > For an example look at `elm-mdl`'s Menu. Basically what it does is use >

[elm-discuss] Re: In a select element, how do I designate the initially selected option from my model?

2016-08-22 Thread Gabe Krambs
Brilliant. Thanks! On Tuesday, August 23, 2016 at 12:04:52 AM UTC-5, Gabe Krambs wrote: > > Let's say I have a select element to choose a person, and I want to have a > certain person, say with id = 3, to be initially selected. How do I pass > this id down into my options, and then set the

[elm-discuss] In a select element, how do I designate the initially selected option from my model?

2016-08-22 Thread Gabe Krambs
Let's say I have a select element to choose a person, and I want to have a certain person, say with id = 3, to be initially selected. How do I pass this id down into my options, and then set the selected attribute to True in that options? Some sample code: personSelect : List Person ->

[elm-discuss] Re: Task ports: A proposal to make it easier to integrate JS with Elm.

2016-08-22 Thread Maxwell Gurewitz
I've had the same idea. Really hope this gets noticed! On Saturday, August 13, 2016 at 8:31:07 AM UTC-7, James Wilson wrote: > > The problem > > ports as they stand are fundamentally incompatible with Tasks. Being > backed by Cmd's, they are harder to compose. A frustration of mine is that >

[elm-discuss] Unrelated modules having ports with the same name

2016-08-22 Thread b123400
Hello, I find it confusing about ports in modules, I have sent an issue but didn't get notice for a month, so I'd like to post it here for discussion. I have two modules, they both have a port with the same name: port module ModuleA

[elm-discuss] Re: So how do *you* handle Dates through ports?

2016-08-22 Thread OvermindDL1
On Monday, August 22, 2016 at 10:44:24 AM UTC-6, Kasey Speakman wrote: > > Re encoding: You can pass the value over as Json.Value and decode it, no? > Still involves an extra step regardless, and I like being explicit about types so I have my record. It is a standard Javascript Date time object

[elm-discuss] Re: Possible compiler bug?

2016-08-22 Thread Max Goldstein
Ah, yup that looks fine. I had thought about adding some functions like this to Pcg but never got around to it. One of these days... -- 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

[elm-discuss] Re: So how do *you* handle Dates through ports?

2016-08-22 Thread Kasey Speakman
The only ones that really makes sense to auto convert through a port is ISO string or JS native. If you use a strange object, then yeah you would need manual conversion. Re encoding: You can pass the value over as Json.Value and decode it, no? On Monday, August 22, 2016 at 11:25:31 AM UTC-5,

[elm-discuss] Re: So how do *you* handle Dates through ports?

2016-08-22 Thread OvermindDL1
Too many formats for date though. ;-) Such as is it in a format of a String? With or without timezone? Is it in the format of a record like this that I use: ```elm type alias JsonDateTime = { year : Int , timezone : { until : String , offset_utc : Int ,

Re: [elm-discuss] Re: Making imports more pleasant

2016-08-22 Thread Francesco Orsenigo
Are you going to write such plugin for every possible editor? Is every newbie going to have such plugin? What about browsing code from GitHub? A language's readability should not depend on tooling. On Mon, Aug 22, 2016 at 5:52 PM, William Bailey wrote: > For years I coded

[elm-discuss] Re: So how do *you* handle Dates through ports?

2016-08-22 Thread Kasey Speakman
Well, I'd wish for Dates to just automatically come over first. :) On Monday, August 22, 2016 at 10:50:39 AM UTC-5, OvermindDL1 wrote: > > I use the method of two records, one that comes in the port and one after > massaging it into the better format at the subscription step. It is ugly > but

[elm-discuss] Re: Making imports more pleasant

2016-08-22 Thread William Bailey
For years I coded in Java using IntelliJ. It was super easy in that IDE to hover on any symbol, system or otherwise, and learn all about it. Or hit ctrl-B (eg) to drill into the source. Again, worked fine for system libraries and was really useful for seeing how the under-the-covers stuff

[elm-discuss] So how do *you* handle Dates through ports?

2016-08-22 Thread Kasey Speakman
If I have a record with a Date field, and I need to receive that through a port (which I understand is not possible). Do I have to de/code the whole record just because of this or is there a better way? Another way that occurs to me is to create two records, one with the date as a string for

Re: [elm-discuss] Re: Making imports more pleasant

2016-08-22 Thread Francesco Orsenigo
Not at all. You'd use qualified imports. `import Html exposing (div, span, text, input, form)` or `import Html as H` and then `H.div` `H.text` and so on. One of the strength of Elm is keeping everything very explicit, which makes it super newbie friendly. On Mon, Aug 22, 2016 at 3:08 PM,

Re: [elm-discuss] Re: Making imports more pleasant

2016-08-22 Thread Will White
I don't think it should be disallowed entirely. Disallowing it would make Html and other familiar things like that harder to read, without helping understanding. On Monday, August 22, 2016 at 11:10:38 AM UTC+1, Francesco Orsenigo wrote: > > The only issue I have with imports is that any code

[elm-discuss] Dynamic implementation resolving

2016-08-22 Thread Larry Weya
I have a project where I would like to have different implementations depending on a provided value. I have what we are referring to as Commands and we are using elm provide a UI used to configure a command's parameters so e.g. we have 2 Commands, a CreateInvoice command and a SendText

Re: [elm-discuss] Re: Making imports more pleasant

2016-08-22 Thread Francesco Orsenigo
The only issue I have with imports is that any code that contains several unqualified imports is a pain in the ass to learn. Example: https://github.com/Bogdanp/elm-combine/blob/2.2.1/examples/Python.elm As a newbie, it's immensely frustrating being unable to easily track which of the `import

[elm-discuss] Re: Possible compiler bug?

2016-08-22 Thread Martin Janiczek
Sure, I just copied the function definition to my module that uses Random.Pcg instead of Random. There was no need to change the implementation, it just uses Random.Pcg.constant instead of Random.Extra.constant, I believe. import Random.Pcg as Random exposing (Generator) {-| Turn a list of

[elm-discuss] Hide component on document click

2016-08-22 Thread Francisco Ramos
Hi there, I'm fairly new with Elm. I'm currently working on a personal project (Minesweeper, repo here: https://github.com/jscriptcoder/minesweeper-elm) to learn this fascinating language and architecture. I have this menu that opens when you click on a link. What I'd like to do is to hide it