Re: [elm-discuss] Result.mapX should be Result.foldlX?

2016-07-25 Thread Duane Johnson
FWIW, also as a new Elm user, I find the Maybe.map and Result.map functions to be confusing names. It may just be my use of lodash and Ruby arrays that are sending my brain off track, but I find myself resisting this naming a lot (and still don't naturally reach for it on these modules). On Mon,

Re: [elm-discuss] Re: Inter-Component Communication in 0.17

2016-07-21 Thread Duane Johnson
On Thu, Jul 21, 2016 at 1:47 PM, Erik Lott wrote: > type alias DTO = > (String, String) > What does DTO stand for in your example? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop

Re: [elm-discuss] How to test JSON decoding when you need a raw Json Value?

2016-07-29 Thread Duane Johnson
incoming message to get the value from the message_type key. The type of > the data field is opaque to the top-level; the top-level just sees it as > Json.Value. This does in fact work; it's just hard to test. > > > On Fri, Jul 29, 2016 at 3:47 PM, Duane Johnson <duane.john...@g

Re: [elm-discuss] Re: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-07-31 Thread Duane Johnson
Cool bug find :) Is it tracked on https://github.com/elm-lang/elm-compiler/issues ? On Sun, Jul 31, 2016 at 3:01 AM, Aditya Vishwakarma < blackleopar...@gmail.com> wrote: > Hi > > So I dug deeper into this issue. turns out that the JS code for my port > module was being emitted before the JS of

Re: [elm-discuss] Elm good for graphical apps?

2016-07-30 Thread Duane Johnson
Welcome, Rupert! Elm started small and has been growing significantly in the last year. In its initial phase, it focused a lot on the graphical/canvas oriented possibilities. Many web developers gravitated toward its innovative ideas and its javascript-community-friendly culture, however, and

Re: [elm-discuss] Elm good for graphical apps?

2016-07-30 Thread Duane Johnson
On Sat, Jul 30, 2016 at 1:03 PM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > Is SVG good for interactive GUIs though? In my experience, SVG is even better for interactive GUIs, unless you have very dense graphic elements, or your UI is more on the

Re: [elm-discuss] Decoding JSON for Lists of Objects With Arbitrary Fields

2016-07-30 Thread Duane Johnson
Yes, if you keep the objects in the Json.Encode.Value type, then you can contain a tree of arbitrary JSON types all the way down. This helped me understand the above Json.Encode.Value type a little bit better: $ elm repl > import Json.Encode > Json.Encode.string "hi" "hi" : Json.Encode.Value >

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

Re: [elm-discuss] Re: share-elm.com seems to be down?

2016-08-13 Thread Duane Johnson
Can confirm (it's down for me as well). On Fri, Aug 12, 2016 at 10:00 PM, Carlos De la Guardia wrote: > Seems to be down again? > > On Wednesday, March 4, 2015 at 10:52:25 PM UTC-8, Janis Voigtländer wrote: >> >> Or something like that. I get a "502 Bad Gateway" error. >> >>

Re: [elm-discuss] Converting regex submatches to tuple?

2016-07-20 Thread Duane Johnson
're > doing it wrong. Map or foldl or foldr is what you want in this case. > > On Wed, Jul 20, 2016 at 3:50 PM, Duane Johnson <duane.john...@gmail.com> > wrote: > >> I have a regex match whose result is guaranteed to have two submatches, >> if an

Re: [elm-discuss] Converting regex submatches to tuple?

2016-07-20 Thread Duane Johnson
On Wed, Jul 20, 2016 at 5:35 PM, Joey Eremondi wrote: > Follow Nick's suggestion, use :: instead of :, otherwise you'll get a > weird parse error. > > They're reversed in Haskell, which I was working in when I responded, so I > got confused. > No problem, it's working

Re: [elm-discuss] Port Error

2016-07-18 Thread Duane Johnson
Where is `subs` coming from? I see it used in the onEffects function, but I don't see its definition. On Mon, Jul 18, 2016 at 2:40 AM, Zachary Kessin wrote: > I am having a strange problem with ports, I am trying to send a list of > data through the port (see gist) and I it

Re: [elm-discuss] Elm Brackets extension

2016-07-20 Thread Duane Johnson
What is "brackets"? On Wed, Jul 20, 2016 at 5:51 AM, 'Thomas Prebeck' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > Hi there, > > I noticed that the elm Brackets extension does not work on linux/mac and > is no longer maintained. > So I forked it and fixed it:

Re: [elm-discuss] Re: Should [ 1..5 ] exist?

2016-08-04 Thread Duane Johnson
On Thu, Aug 4, 2016 at 3:36 PM, Joey Eremondi wrote: > If we went crazy with this, most keywords / common functions from other >> languages would be listed as keywords for their elm equivalents >> and it could make life easier, I imagine > > > A far more robust solution

[elm-discuss] Re: Should [ 1..5 ] exist?

2016-08-04 Thread Duane Johnson
I can attest to this being difficult to search for. I ended up having to ask on the slack channel how to do ranges. Personally, I like the syntax, but making it easier to find would be my suggestion (e.g. referring to it as more things, spelled out, such as "range", "ellipsis", etc. in the

Re: [elm-discuss] Re: public keyword instead of exposing

2016-08-08 Thread Duane Johnson
Could this be a feature of the text editor? i.e. a marginal annotation indicating the function is exposed, based on the module's signature at the top of the file? On Mon, Aug 8, 2016 at 3:18 PM, Robin Heggelund Hansen wrote: > Yeah, I assumed this would be a preference

Re: [elm-discuss] Re: How are deeply nested records updated or what alternatives are typically used?

2016-08-02 Thread Duane Johnson
I like the syntax. It's intent is clear. However, correct me if I'm wrong, but it would only work for records of records, correct? No way to deal with a "Maybe Forecast", right? On Tue, Aug 2, 2016 at 12:53 PM, Ambrose Laing wrote: > Correction: what I should have written is:

Re: [elm-discuss] WYSIWYG editor for Elm ?

2016-07-23 Thread Duane Johnson
I've heard these called "RCEs"--Rich Content Editors. Might be worth a search using that term. I haven't seen an Elm one yet. On Sat, Jul 23, 2016 at 6:04 AM, Stephane Wirtel wrote: > Hello, > > Do you know a WYSIWYG editor written in ELM ? > > Thank you, > > Stephane

Re: [elm-discuss] Re: Unit Types : A Radical Proposal

2016-07-29 Thread Duane Johnson
On Fri, Jul 29, 2016 at 10:48 AM, Anton Lorenzen wrote: > I just created a small library for this: > https://github.com/anfelor/elm-units > > It allows for time to be used like this: > Units.Time.every (30 ::: milliseconds) Tick > Neat! I'm surprised at what can be done with

Re: [elm-discuss] Re: Unit Types : A Radical Proposal

2016-07-28 Thread Duane Johnson
On Thu, Jul 28, 2016 at 1:11 PM, art yerkes wrote: > F# is kind of radical in that it has units. > > https://fsharpforfunandprofit.com/posts/units-of-measure/ > Wow, very neat! I like that F# keeps the units after the number, actually adding to readability. -- You

Re: [elm-discuss] Unit Types : A Radical Proposal

2016-07-28 Thread Duane Johnson
This would be a nice fix to the Radians / Degrees issue too. Every language seems to settle on one or the other as "the base unit" but newcomers have to learn the assumption or face bad accidental outputs. On Thu, Jul 28, 2016 at 12:42 PM, John Bugner wrote: > In the time

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] ANN: opensolid/geometry, a comprehensive 2D/3D geometry package for Elm

2017-02-01 Thread Duane Johnson
Nice work! I hope to use this in some of my projects (like the HCCB package I just released perhaps...) On Wed, Feb 1, 2017 at 10:31 AM, Ian Mackenzie wrote: > Just posted this to Reddit, but thought I

Re: [elm-discuss] Re: Emphasizing /r/elm more

2017-01-27 Thread Duane Johnson
On Fri, Jan 27, 2017 at 10:52 AM, Rex van der Spuy wrote: > And, I hope he always remains the sole maintainer and developer of the > language, because, frankly, I just don't trust anyone else :) > Gosh, I hope not, because that would mean he failed to teach anyone else

Re: [elm-discuss] Using Elm with existing UI controls

2017-01-29 Thread Duane Johnson
Nice work, and nice presentation. On Sat, Jan 28, 2017 at 9:27 PM, Joe Andaverde wrote: > Statement: Elm is difficult to adopt for some groups because they require > UI controls that may be difficult or time-prohibitive to re-implement. > > Current Approach: Use ports

Re: [elm-discuss] Build iOS apps with Elm

2017-01-25 Thread Duane Johnson
(Note from list admin: Rudolf, I didn't approve your second message because it seemed like a duplicate attempt. We've had problems with spam in the past, so first-time posts require moderator approval. Your future posts will not need moderation.) On Wed, Jan 25, 2017 at 4:13 PM, Rudolf Adamkovič

[elm-discuss] Convert Char to Int?

2017-01-26 Thread Duane Johnson
inary data stream as a series of 16-bit integers. I've attempted String.toList which results in a (List Char) type, but what should I do with Char? Char.toCode and Char.fromCode seem specifically tuned for use with keyboard events. Is there a way to handle a binary data series in Elm? Thanks, Dua

Re: [elm-discuss] Re: Support for binary data

2017-01-26 Thread Duane Johnson
My use case: I have a compiled microcontroller file (a ".hex" file) delivered to the client browser. I use the data to draw a fancy SVG barcode that is subsequently displayed on the screen and scanned by a camera (like a QR Code). I need a way to retrieve binary data from the server, and

Re: [elm-discuss] Convert Char to Int?

2017-01-27 Thread Duane Johnson
On Thu, Jan 26, 2017 at 11:52 PM, Peter Damoc wrote: > What does this mean? KeyCode is an alias to Int so, at least in theory, > you should have the actual Int value of the Char. > What happens if you display this Int value? How does it differ from what > you need? > I was

Re: [elm-discuss] Generating reports for printing

2017-01-28 Thread Duane Johnson
Hi Rory, forgive me if you've already been down this path, but wouldn't CSS be the right place to apply page breaks for printable documents / reports? For instance: https://css-tricks.com/almanac/properties/p/page-break/ Are you trying to generate PDFs specifically, or just create reports that

Re: [elm-discuss] How up update sub-models ...

2017-02-25 Thread Duane Johnson
I think what you're looking for is this syntax: ( { model | email = { emailModel | value = email, errors = validateEmail email } }, Cmd.none ) and ( { model | password = { passwordModel | value = password, errors = validatePassword password } }, Cmd.none ) On Sat, Feb 25, 2017 at 2:08 PM,

Re: [elm-discuss] Re: Seeking feedback: What Elm and Rust teach us about the future

2017-02-10 Thread Duane Johnson
I haven't seen it said explicitly, but is it expected that any "fairly powerful macro" type system would be implemented outside of / around Elm? Or anything "meta", really. It seems like Elm eschews power for simplicity, so maybe the recommended solution is to use external tools, e.g. code

Re: [elm-discuss] New to Elm, need help understanding type Node msg = Node in source code

2017-02-15 Thread Duane Johnson
On Wed, Feb 15, 2017 at 11:31 AM, Will Tian wrote: > type Node msg = Node > > what is the purpose of the above line? > I think it's a placeholder type that is not handled in Elm proper, but by the compiler itself. See

Re: [elm-discuss] Re: Guidance for using "type alias" vs. single-constructor union types

2017-01-16 Thread Duane Johnson
On Mon, Jan 16, 2017 at 10:26 AM, Max Goldstein wrote: > More concretely, say one defines type clones for Length and Width in the > hope of avoiding accidentally adding them, which would make no sense. But > we'd want to allow multiplying them to obtain Area. The only

Re: [elm-discuss] POST Http.request in Elm 0.18

2017-01-18 Thread Duane Johnson
It sounds like you might be trying to do a "cross-domain" post, i.e. are you running your elm app on one port, and attempting to POST to another port? If so, this is considered "cross-domain". (Of course, if you have an IP address or domain that's different, that's "cross-domain" as well). If

[elm-discuss] Moderating elm-discuss

2016-09-06 Thread Duane Johnson
e approved by a moderator 2. require messages by new members to be approved by a moderator This list has 2,652 members. I think its size is making it become a target for spammers. Both options, however, add a burden to moderators. Are there other options? Duane Johnson -- You received this message b

Re: [elm-discuss] Moderating elm-discuss

2016-09-06 Thread Duane Johnson
I just saw another spam message get through. I've switched the forum to "New member posts are moderated". Let's see if that helps and is something we as moderators can maintain. Duane On Tue, Sep 6, 2016 at 12:59 PM, Anton Lorenzen wrote: > They are using Discourse, which is

[elm-discuss] CSS in Elm: best practices?

2016-09-25 Thread Duane Johnson
I built a small app using elm-css to spin the wheels. One of the things I'm looking for is a "compiler's got my back" kind of experience with CSS; however, I found a couple of oversights. I'm curious if there are some best practices that might have given me a better experience: 1. I accidentally

[elm-discuss] Does CSS model the right problem?

2016-09-25 Thread Duane Johnson
Cascading Style Sheets are a way of selecting elements of a document and describing their properties. At a high level, as a designer (be gentle as I pretend to be a designer), I want to precisely articulate certain requirements of the properties of a website, while playing with (i.e. allowing

Re: [elm-discuss] How to use elm-style-animation to make smoothly moving clock hand

2016-09-25 Thread Duane Johnson
On Sun, Sep 25, 2016 at 4:06 PM, Brian Marick wrote: > I’m wondering how to do this. SVG lines are driven by x1, x2, y1, and y2 > coordinates, but those aren’t animatable properties in > `elm-style-animation`. > > Perhaps I could have each hand in the clock have a `fill

[elm-discuss] elm-format and long strings

2016-09-25 Thread Duane Johnson
I'm curious if there are other options for making long inline strings look good in Elm: 1. Use double quotes and (++) to concatenate. Cons: adds runtime operation; must add parens around the string block if it's an argument, e.g. the following does not compile ```elm |> Dict.insert 2

Re: [elm-discuss] Error following introduction

2016-09-26 Thread Duane Johnson
Could it your use of the backslash? This worked for me in elm-repl: ```elm elm-repl elm-repl 0.17.1 --- :help for help, :exit to exit, more at < https://github.com/elm-lang/elm-repl>

Re: [elm-discuss] Does CSS model the right problem?

2016-09-26 Thread Duane Johnson
On Mon, Sep 26, 2016 at 2:00 AM, Peter Damoc wrote: > For progressive customization you could take a look at SemanticUI's 3 > layer structure (Defaults -> Theme -> Site) > http://semantic-ui.com/usage/theming.html > > For constrains based layouts you could take a look at GSS >

Re: [elm-discuss] Newbie syntax confusion in Elm

2016-09-26 Thread Duane Johnson
Yes, you're correct. Consider the case where you want to make a function that returns a function. Perhaps you'd write: ```elm makeMeAFunction : Int -> (Int -> Int) makeMeAFunction i = (\j -> i) ``` If you call (makeMeAFunction 1), the result would be a function that takes any integer and returns

Re: [elm-discuss] Does CSS model the right problem?

2016-09-26 Thread Duane Johnson
ing about it. I have neither the time nor the > expertise to build something like this. > > Op maandag 26 september 2016 16:56:44 UTC+2 schreef Duane Johnson: >> >> >> On Mon, Sep 26, 2016 at 2:00 AM, Peter Damoc <pda...@gmail.com> wrote: >> >>> For

Re: [elm-discuss] Re: Does CSS model the right problem?

2016-09-26 Thread Duane Johnson
On Mon, Sep 26, 2016 at 10:22 AM, Rex van der Spuy wrote: > So far the best solution I've seen for CSS is Elm's own Graphics.Element: > > http://package.elm-lang.org/packages/elm-lang/core/3.0.0/Graphics-Element > > A little more granularity, and integration with elm-html,

[elm-discuss] Re: How to use Svg.Events.onResize?

2016-10-04 Thread Duane Johnson
Hi Michel, I think you need to listen to the Window.resizes subscription in order to get window resize events (i.e. they do not propagate to the SVG element). Here is a sample solution I've created for you using your code as a starting point: https://github.com/canadaduane/elm-resize On

Re: [elm-discuss] Maybe.andThen with List.foldr type trick?

2016-10-08 Thread Duane Johnson
Ah, I misunderstood the order of foldr. Thanks alll. BTW, this helped me see where I'd gone wrong: http://stackoverflow.com/questions/1757740/how-foldr-works#1763323 On Sat, Oct 8, 2016 at 10:09 AM, Janis Voigtländer < janis.voigtlaen...@gmail.com> wrote: >

[elm-discuss] Maybe.andThen with List.foldr type trick?

2016-10-08 Thread Duane Johnson
To avoid the XY problem: I'm aiming to create a function that will take a List (Maybe a) and return a Maybe (List a), where the result will be Nothing if ANY of the (Maybe a)s are Nothing, otherwise it will be a list of just the "a"s. Here's where I'm getting tripped up in that quest, however:

Re: [elm-discuss] Problem with beginnerProgram

2016-10-06 Thread Duane Johnson
Right here, you're saying that the UpdateModel type takes a String: > type Msg = UpdateModel String > > update: Msg -> String -> String > update action model = > case action of > UpdateModel newModel -> > newModel > > view: String -> Html a > view model = > div[] > [ >

Re: [elm-discuss] No Runtime Exceptions - Still not computing

2016-10-06 Thread Duane Johnson
On Thu, Oct 6, 2016 at 8:13 PM, Dave Ford wrote: > 2. *Runtime Exception. *Like a NullPointerException or an > IllegalArgumentException. I *love* these kind of bugs. Super easy to > find. Super easy to fix. A stack trace tells me exactly where to look. > These kind of

Re: [elm-discuss] Re: Elm, Objects and Components

2016-09-20 Thread Duane Johnson
On Tue, Sep 20, 2016 at 8:34 AM, Max Goldstein wrote: > Respectfully, the discussions around components keep happening because > people start them. Asking "how do I have stateful components with > closure/nesting" falls prey to the XY problem, and also misses a lot of

Re: [elm-discuss] Getting started with the serial port (in Electron)

2016-09-16 Thread Duane Johnson
Ian, FYI new members to this mailing list have to have their first message approved by a moderator due to an excess of unsavory spam. I saw that you send 3 or 4 similar messages. I approved the first one and removed the others. You should be able to post future messages without a moderation step

Re: [elm-discuss] Is a decoder the right level of abstraction for parsing JSON?

2016-09-28 Thread Duane Johnson
On Wed, Sep 28, 2016 at 5:34 PM, Kasey Speakman wrote: > In the longer term, the solution that jumps out at me is the compiler > could generate decoders for marked type aliases automatically. (I assume > ports work this way already.) And decoding is still there for fuzzy >

Re: [elm-discuss] Can anyone get linter-elm-make working on Atom?

2016-09-28 Thread Duane Johnson
On Wed, Sep 28, 2016 at 4:50 AM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > However, when running linter-elm-make it will say "Error, I cannot find > module 'Log'" - perhaps a "source-directories" needs to be added to > elm-package.json to locate it? As a low-cost

Re: [elm-discuss] D3js for 0.17??

2016-10-18 Thread Duane Johnson
On Tue, Oct 18, 2016 at 2:59 PM, Jakub Hampl wrote: > I wrote a library that is somewhat similar to d3 called > gampleman/elm-visualization. It doesn't do any selections and doesn't > contain all the "utilities" that d3 has (on purpose) and the number of > visualisation tools

Re: [elm-discuss] Re: Atom Editor Race Condition (elm-format on save)

2016-10-20 Thread Duane Johnson
Thanks for the explanation and suggestion! I have `elm-format` (the atom package) installed now. On Thu, Oct 20, 2016 at 4:11 AM, halohalospecial wrote: > Hi! > > After invoking the "save" command, `linter-elm-make` will execute the > elm-make process behind the

[elm-discuss] Atom Editor Race Condition (elm-format on save)

2016-10-20 Thread Duane Johnson
ssing that some kind of race condition exists between one or more of these packages, so that when I save, one part of the checking occasionally finishes before the other. However, I'm not well-versed in the details of these packages to know what might be racing. Thanks, Duane Johnson -- You r

Re: [elm-discuss] Why aren't doc PRs merged?

2016-10-18 Thread Duane Johnson
On Tue, Oct 18, 2016 at 7:51 AM, Eric Thomas wrote: > Why is it that the language is entirely dependent on one person? I get > that Evan is the BDFL but there should be a core community that can approve > these without his approval. > As for the book, I do remember

[elm-discuss] List.filter -> List.keep?

2016-10-18 Thread Duane Johnson
I saw @_chunglou's tweet yesterday and wondered if this had been discussed before: "I can never, ever remember whether `filter` needs `true` or `false`. `keep` would be a nicer name." I agree `keep` would remove the ambiguity. Thoughts?

Re: [elm-discuss] 2 yr. quest to learn front-end programming

2016-10-24 Thread Duane Johnson
These two might be helpful: https://www.gitbook.com/book/sporto/elm-tutorial/details https://johncrane.gitbooks.io/ninety-nine-elm-problems/content/ On Mon, Oct 24, 2016 at 10:34 AM, douglas smith <395curra...@gmail.com> wrote: > Hey everyone- > > Over the past 10 years I have causally studied

Re: [elm-discuss] Re: Elm-discuss admin help?

2016-11-25 Thread Duane Johnson
Thanks Max! I just recently approved everything in the queue (we've had a lot of great questions from newcomers this week!) Going forward, it might be useful to coordinate some of this approving business. I think it's been 100% successful at preventing spam (I've banned about 4 or 5 posters in

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-25 Thread Duane Johnson
On Fri, Nov 25, 2016 at 3:49 PM, Joey Eremondi wrote: > To me this makes no sense. Maybe implies uncertainty: it's either there or > it's not. I think the beauty Witold was pointing to is in the way the `case` statement reads, not the way the type reads on its own.

Re: [elm-discuss] What is the motivation for using google groups?

2016-11-25 Thread Duane Johnson
On Fri, Nov 25, 2016 at 7:34 PM, Richard Feldman < richard.t.feld...@gmail.com> wrote: > We've talked in the past about moving to https://reddit.com/r/elm - in > part for threaded discussions and voting, but also more to have things more > centralized. > I like reddit and use it frequently.

[elm-discuss] Elm-discuss admin help?

2016-11-24 Thread Duane Johnson
I've been away on a Thanksgiving trip this week and have not had time to approve newcomer posts to this mailing list. There are usually 2-3 newcomers per day, posting for their first time. Would another admin check to see if there are posts needing approval? Thanks, Duane -- You received this

Re: [elm-discuss] Re: Elm-discuss admin help?

2016-11-27 Thread Duane Johnson
Great, thanks! On Fri, Nov 25, 2016 at 8:42 PM, Brian Hicks wrote: > Hey, Evan just added me and Noah Hall as moderators as well. I'll try and > make a habit of clearing the queue at least on weekday mornings, US Central > Time. > > -- > You received this message because

Re: [elm-discuss] Welcome feedback on article about JSON Decoding Posted on Medium

2016-11-16 Thread Duane Johnson
If you'd like to clean up the code blocks, apparently `Cmd+6` does the trick on medium.com: https://help.medium.com/hc/en-us/articles/214465537-How-can-I-include-a-code-snippet-or-block-in-a-story- On Wed, Nov 16, 2016 at 7:06 PM, Kk Kruups wrote: > hi folks, I just posted

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-15 Thread Duane Johnson
On Tue, Nov 15, 2016 at 2:38 PM, 'Andrew Radford' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > I agree with you there. I'm just pointing out that calling this a > community decision is misrepresenting things. > What would a community decision look like to you (procedurally)? -- You

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-15 Thread Duane Johnson
On Tue, Nov 15, 2016 at 1:23 PM, 'Andrew Radford' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > No, it wasn't. Some parts of the community were aware of it, but calling > it a community decision is overstating it. While I wish it were otherwise, my experience from other communities

Re: [elm-discuss] Changing root font size

2016-11-03 Thread Duane Johnson
; html.medium {font-size:16px} > html.large {font-size:18px} > > Here you need to apply the class change to `html` which is out of Elm's > reach > and seems that you can only do it in port. > > On Wednesday, November 2, 2016 at 1:22:17 PM UTC+8, Duane Johnson wrote: >> &g

Re: [elm-discuss] Changing root font size

2016-11-01 Thread Duane Johnson
Why not use a stylesheet? On Tue, Nov 1, 2016 at 9:22 PM, Jacky wrote: > For app that use `rem` for styling, the font size is set at html node > > html { font-size: 18px; } > > Is that the only way to control this value is by port and do it in js? > -- > Best Regards, >

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

2016-10-11 Thread Duane Johnson
On Tue, Oct 11, 2016 at 7:36 AM, Ethan Martin wrote: > How does one check against a List containing a certain type? For instance, > I only want to map all elements of a string through the toString function > if that list does not already contain strings. The end result

Re: [elm-discuss] control structure

2016-10-12 Thread Duane Johnson
Recursion is the basic principle on which repetition is based in functional languages like Elm. However, in most cases, recursion is not needed for day to day programming, because functions such as List.map and List.foldr will accept functions, and repeat the application of the passed-in function

Re: [elm-discuss] Re: using js library inside elm?

2016-10-13 Thread Duane Johnson
The example in the guide (the link that Matthew sent) is about as compact as you're going to find as an example. I know you're probably looking for a simple example, but calling an external javascript method is not a one-liner in Elm. On Thu, Oct 13, 2016 at 5:46 AM, António Ramos

Re: [elm-discuss] Re: elm-new, a CLI tool for initializing new Elm projects

2016-10-10 Thread Duane Johnson
Thanks for this tool Simone. I use it frequently for quick tests and new learning projects in Elm. Duane On Sun, Oct 9, 2016 at 5:22 AM, Simone Vittori wrote: > Thanks for the feedback guys, I decided to publish it on npm. Now you can > do: > > npm install -g elm-new

Re: [elm-discuss] beginner question - updating property on child of model

2016-10-11 Thread Duane Johnson
On Mon, Oct 10, 2016 at 9:43 AM, Chad Deutmeyer wrote: > { model | someOtherProperty = item } I think you're looking for this: let c = model.child in { model | child = { c | currentItem = item } } -- You received this message because you are subscribed to the

Re: [elm-discuss] control structure

2016-10-16 Thread Duane Johnson
Here is an Array: ```elm import Array Array.fromList [1, 90, 5, 2] ``` http://package.elm-lang.org/packages/elm-lang/core/4.0.5/Array Note that in many cases a list is preferred to an Array (and they are treated as separate types in Elm). Lists are for sequences of things that need to be

Re: [elm-discuss] Uncaught TypeError: Cannot read property 'style' of null

2016-10-17 Thread Duane Johnson
I believe ghostery.js is a Firefox plugin? What happens if you disable it in your browser? On Mon, Oct 17, 2016 at 2:03 AM, kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: > I started my first Elm project. It compiles without errors. If I load the > index.html in Chrome I get: > Uncaught

Re: [elm-discuss] Re: This week, we hit 5000+ users on Slack

2016-10-17 Thread Duane Johnson
Wow, that's incredible! On this mailing list, I approve messages from newcomers at a rate of about 3 per day. (Once the first message is approved, they can send messages without mod approval thereafter). It's neat to see how vibrant the growth of this community is. On Sun, Oct 16, 2016 at 6:09

Re: [elm-discuss] Re: Stance on native APIs for 0.18?

2016-12-09 Thread Duane Johnson
On Fri, Dec 9, 2016 at 1:07 PM, Mark Hamburg wrote: > operations that need to deal with the external world The one thing I don't like about Elm is the feeling that it's *hard work* to deal with the world. I wish it felt like a happy place, a tool I would easily reach

Re: [elm-discuss] What do you think Elm's biggest shortcomings are when it comes to natively supported API's?

2016-12-11 Thread Duane Johnson
I think this list is for discussion and is not as frequented by the elm core developers, so you might try https://groups.google.com/forum/?fromgroups#!forum/elm-dev They still show up here on occasion, but my impression is that they primarily hang out over there. On Sat, Dec 10, 2016 at 3:03 PM,

[elm-discuss] launchaco built in Elm

2016-12-07 Thread Duane Johnson
I just saw this (very popular link) on hacker news and was very impressed with the UI. Turns out it's built with Elm and Go! http://launchaco.com/build/ See https://news.ycombinator.com/item?id=13126494 for the author's reference to Elm. Duane -- You received this message because you are

Re: [elm-discuss] Proposal: Main.attach(node) to attach Elm to existing DOM?

2017-01-13 Thread Duane Johnson
On Fri, Jan 13, 2017 at 5:28 AM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > I said that it might add some complexity or be a little slower but only in > the case where 'attach' is being used. A further observation is that the > extra complexity would only be needed on

Re: [elm-discuss] [Suggestion] Type values and simplifying the language still

2017-01-15 Thread Duane Johnson
I'm trying to see if I understand your suggestion correctly. So would an enumeration like this: type Msg = ClickedButton | EnteredAge value | EnteredHeight value become... type Msg = { action : String, value : String } ? I'm trying to figure out how you'd "authorize up to one

Re: [elm-discuss] Proposal: Main.attach(node) to attach Elm to existing DOM?

2017-01-12 Thread Duane Johnson
I like this direction. One of the things I want in an app is near-instant load time. In addition, this leads nicely toward a server-side Elm "some day" which is another thing I hope for :) Duane On Thu, Jan 12, 2017 at 10:02 AM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com>

[elm-discuss] Svelte for components?

2016-11-30 Thread Duane Johnson
There's been some ongoing discussion about components (web components, simplifying design with component re-use, etc.) and I saw this introduction to Svelte today: https://svelte.technology/blog/frameworks-without-the-framework/ It seems like a compiler that produces bare-metal components by

Re: [elm-discuss] Pattern matching using existing bound variables

2016-12-03 Thread Duane Johnson
I don't know of a way. Use if...then...else? On Sat, Dec 3, 2016 at 12:08 PM, Michał Podwórny wrote: > Hi, > > Consider this: > let > x = 1 > in > case something of > x -> (...) > _ -> (...) > > The compiler will complain that "The following pattern is

Re: [elm-discuss] Re: Pattern matching using existing bound variables

2016-12-05 Thread Duane Johnson
On Sun, Dec 4, 2016 at 6:53 PM, David Andrews wrote: > I expect that you are actually looking to do something like this: > let > x = 1 > in > case something of > Just x -> ... > Nothing -> ... > David, are you sure you didn't mean the following?

Re: [elm-discuss] towards enact-like coding? ideas for future directions

2016-12-05 Thread Duane Johnson
No traveling!? I think this should be called the Archeological Debugger. :) On Mon, Dec 5, 2016 at 1:35 PM, Nick H wrote: > Thanks for sharing your thoughts! > > The "time split" you describe actually used to be a feature of the time > travel debugger. But judging

Re: [elm-discuss] Re: Pattern matching using existing bound variables

2016-12-05 Thread Duane Johnson
case str of > Just str -> str > Nothing -> "something" > > I realize, though, that I misunderstood the original question. > > On Monday, December 5, 2016 at 3:25:07 PM UTC-5, Duane Johnson wrote: >> >> >> On Sun, Dec 4, 2016 at 6:53 PM,

Re: [elm-discuss] Re: Unable to render updates to text fields in Elm 0.18

2016-12-30 Thread Duane Johnson
s the > downside of breaking certain aspects of Elm's rendering process. Was > extremely weird and hard to pin down. > > Chris > > On Tuesday, December 27, 2016 at 7:16:30 PM UTC-5, Duane Johnson wrote: >> >> Using your code snippet, I created a project that changes th

Re: [elm-discuss] How to prevent input field values persisting in new views?

2016-12-20 Thread Duane Johnson
On Tue, Dec 20, 2016 at 2:03 PM, Wouter In t Velt wrote: > >- Is there a better way to *prevent* this from happening (rather than >relying on our predictive instincts and applying Keyed when we suspect a >leak)? > > I like that you're asking this question,

[elm-discuss] Re: Unable to render updates to text fields in Elm 0.18

2016-12-27 Thread Duane Johnson
Using your code snippet, I created a project that changes the text value, as you would expect it to do. Is my code set up differently than yours? https://github.com/canadaduane/elm-dd Initial state and "after clicking" state images are attached. -- Duane On Tuesday, December 27, 2016 at

Re: [elm-discuss] How to structure Elm with multiple models?

2016-12-20 Thread Duane Johnson
I haven't built it in Elm before, but I assume the architecture would be similar to any other request-based website: you need a session, and a way to store the session data on the server, so that when each page loads, it gets the data it needs. On Tue, Dec 20, 2016 at 5:56 AM, Woodson Delhia

Re: [elm-discuss] Re: Elm events 2017

2017-03-23 Thread Duane Johnson
Hi Salas, since you had two nearly identical posts, I approved this one and rejected the other (I'm assuming you didn't know we moderate first-time posters). -- Duane Johnson (elm-discuss moderator) On Thu, Mar 23, 2017 at 4:47 PM, Salas Sanchez-Bennasar <salas...@gmail.com> wrote: > I

Re: [elm-discuss] Kite, An Interactive Visualization Tool for Graph Theory

2017-03-23 Thread Duane Johnson
Very cool project! I saw this today and was equally impressed: http://ncase.me/loopy/v1/ It might be a source of ideas for your own UI (I like the way a user can just "draw" a node and then connect them in this Loopy app). Thanks for highlighting the portions of your app that may be useful to

[elm-discuss] ANN: TypedSvg

2017-03-30 Thread Duane Johnson
with the progress that's been made. I'm announcing this now so that if others are interested in a similar package, we can consolidate effort and help one another rather than duplicate effort. Thanks, Duane Johnson -- You received this message because you are subscribed to the Google Groups "Elm Di

Re: [elm-discuss] Beginner Question: pattern matching a math expression

2017-03-25 Thread Duane Johnson
Hi Tim, I think the comma might be what's tripping up the pattern matching: type Expression = Const Int | Mul Expression Expression calculate expr = case expr of Mul (Const 1) x -> x Mul x (Const 1) -> x _ -> expr On Sat, Mar 25, 2017 at 5:43 PM, Tim Elliot

Re: [elm-discuss] Uncaught TypeError in Elm

2017-03-15 Thread Duane Johnson
ct setup... > > On Tue, Mar 14, 2017 at 3:40 PM, Juan Ibiapina <juanibiap...@gmail.com> > wrote: > >> Because the original error is related to the order of the functions in >> the generated code. It doesn't get past that so it doesn't actually call >> `document

Re: [elm-discuss] Re: elm-package install doing nothing?

2017-03-17 Thread Duane Johnson
That seems like a case where Elm could have given you a better message--perhaps a warning that some packages were skipped because the Elm version and the package version reduced the subset of acceptable packages to zero? On Fri, Mar 17, 2017 at 1:44 AM, Matthieu Pizenberg <

  1   2   >