Re: [elm-discuss] Re: Design of Large Elm apps

2016-08-04 Thread Peter Damoc
That gist is old. For current Elm Architecture, please refer to the guide. http://guide.elm-lang.org/ I don't know about "the best way" but I can share how my App is structured. I have two types of pages in my app: Interactive and Informational. The informational pages are typically generated

[elm-discuss] Sharing test code

2016-08-04 Thread Ian Mackenzie
I've been working on a bunch of related geometric packages and one thing I haven't quite figured out is the best way to structure test code. So far I've been using the fairly common pattern of having a 'test' subdirectory with its own elm-package.json that has "../src" in its source-directories

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

2016-08-04 Thread Nick Hollon
Why not just keep using JSON? I don't see what advantage Elm records offer, as a data format. Robin's encoder/decoder argument is a separate (but interesting!) topic. Elm ports could be altered to translate between JSON and a structurally-equivalent Elm record. I mean, you'd have to make a

[elm-discuss] vscode elm not working?

2016-08-04 Thread William Bailey
Decided to give vscode with sbrink/vscode-elm extension a try today (previously using atom.io). It advertises auto-complete and hover on function to see signature but non of that is happening for me. Coloring works and I see elm options in the default config file, so it seems installed

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

2016-08-04 Thread Ian Mackenzie
Someone actually did implement Hoogle-like search for Elm, and it works pretty well, although using it is probably not kind to the package.elm-lang.org server: http://klaftertief.github.io/package.elm-lang.org/ I'm all for replacing special syntax with List.range or something similar. I'd

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

2016-08-04 Thread Jesse Schoch
why not just pick something like Ion and make it first class? On Monday, August 1, 2016 at 12:28:45 PM UTC-7, suttlecommakevin wrote: > > http://elm-lang.org/docs/records > > Much in the same spirit as EDN, Datomic, Ion, etc., would it make sense to > enable non-Elm programs to describe data in

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

2016-08-04 Thread Jesse Schoch
outstanding! -- 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+unsubscr...@googlegroups.com. For more options, visit

Re: [elm-discuss] Re: Design of Large Elm apps

2016-08-04 Thread Nick Hollon
That is the approach I would take. Don't forget that the elm website and package manager are written in elm, and they are open source! Recommended reading ;-) > On Aug 4, 2016, at 6:45 PM, Ryan Erb wrote: > > Well after a bit more searching found this > >

[elm-discuss] Re: Why some things are explicitly typed:

2016-08-04 Thread 'Rupert Smith' via Elm Discuss
On Thursday, August 4, 2016 at 11:32:07 PM UTC+1, Rupert Smith wrote: > > A wee newb question: > > I notice in some examples the types are explicitly stated. For example: > > http://elm-lang.org/examples/clock > > has > > view : Model -> Html Msg > view model = > > Why is this so? Can the

[elm-discuss] Re: My first Elm

2016-08-04 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, August 3, 2016 at 3:04:53 PM UTC+1, Rupert Smith wrote: > > Now I have decided to grab the Elm Clock example from here: > > http://elm-lang.org/examples/time > > And have a go at hacking it along these lines: > > * Add separate second, minute and hour hands to the clock. > * Maybe

[elm-discuss] Re: Elm fiddle for 0.17?

2016-08-04 Thread 'Rupert Smith' via Elm Discuss
On Thursday, August 4, 2016 at 3:53:52 PM UTC+1, Wouter In t Velt wrote: > > PS: Whenever I want to try some Elm online, I go to > http://elm-lang.org/try > Which does run 0.17 under the hood (as far as I can tell). > Yes, elm-lang.org/try is working nicely. But I can't save my snippet and

[elm-discuss] Design of Large Elm apps

2016-08-04 Thread Ryan Erb
Got a few questions regarding the best way, or what options there are for scaling up to a large site. If i have a site with lots of features what is the best way to orgainze everything? *One Elm page to rule them all?* With this approach you only have to deal with one update happening, you can

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

2016-08-04 Thread Robin Heggelund Hansen
I actually use ranges a whole lot, but it doesn't really matter much if I have special syntax or if I perform a function call. If there are advantages to removing the special syntax for ranges, then by all means do it :) -- You received this message because you are subscribed to the Google

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

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

2016-08-04 Thread Joey Eremondi
As for getting rid of ranges, I'd be fine with this: 1. Python just uses a function for ranges, so it's not entirely unheard of in the imperative world 2. Ranges seem to fall in the same category as list comprehensions, a nice shorthand from Haskell that can end up leading to more cryptic code in

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

2016-08-04 Thread Joey Eremondi
> > 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 is just to have Hoogle-like search, where you put in the type, and it tells you what

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

2016-08-04 Thread Ambrose Laing
To be completely honest, I would much prefer to keep the notation, but suggest a different possible solution. I would not complain if the notation goes away, but I would also like to hear how you feel about the following possible alternative: Maybe we need a formal way to associate keywords

[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

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

2016-08-04 Thread Richard Feldman
Currently the way you do ranges (like, say, to create the list [ 1, 2, 3, 4, 5 ]) is this: [ 1..5 ] This comes up super infrequently, and whenever it does, it's hard to Google for - when you want to know things like "can I use variables in there?" "is [1..5] going to give me 1,2,3,4,5 or

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

2016-08-04 Thread John Bugner
I just realized that Elm already uses this strategy... with `Color`! It has two constructors: RGBA and HSLA ( https://github.com/elm-lang/core/blob/master/src/Color.elm ), but neither is exported. This forces the user to use the various 'creation' functions to create one (

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

2016-08-04 Thread Paul Blair
Just wanted to update with an experience report. I wound up writing a native module myself, since the json-to-elm project doesn't have a published package and the native module was not in the Elm 0.17 format. (It also returns an empty JSON object if there is a parse exception, rather than a

[elm-discuss] Re: Uncaught TypeError

2016-08-04 Thread OvermindDL1
Already did, and it looks like it was just fixed via https://github.com/elm-lang/core/commit/9320969bf47082b902d4511ef8a48a93612d7bf0 and we might be getting a patch release here very shortly! ^.^ This makes me happier than it probably should, but I really hate it when my app in chrome

Re: [elm-discuss] Re: Elm fiddle for 0.17?

2016-08-04 Thread Nick H
Yes, elm-lang.org/try is officially supported, so it should always be running the most recent version of Elm. But besides language version, Try doesn't ever get any updates. The goal is to make it easy for people to *try* Elm for the first time, not be a full in-browser IDE. Elm Fiddle was very

[elm-discuss] Re: Elm fiddle for 0.17?

2016-08-04 Thread Wouter In t Velt
PS: Whenever I want to try some Elm online, I go to http://elm-lang.org/try Which does run 0.17 under the hood (as far as I can tell). -- 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: Elm fiddle for 0.17?

2016-08-04 Thread Wouter In t Velt
>From the GitHub Readme of Elm Fiddle: Unfortunately most work on this was made before 0.17 was released, and it > was written for 0.16, and It's far from being production ready, so it might crash and your snippets > may be deleted. Adding to

[elm-discuss] Re: Uncaught TypeError

2016-08-04 Thread OvermindDL1
Managed to reduce a program, it happens for me quite reliably in Chrome, just click On then Off a few times and you will eventually see ```javascript Main.elm:2417 Uncaught TypeError: Cannot read property 'ctor' of null step @ Main.elm:2417 work @ Main.elm:2533 ``` pop up into your javascript

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-04 Thread OvermindDL1
Done, how about a work-around that does not involve editing the generated javascript to check for null first? On Wednesday, August 3, 2016 at 6:31:24 PM UTC-6, Nick Hollon wrote: > > Don't open a new one. Add the new information to an existing bug report. > I would guess probably the one in

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

2016-08-04 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, August 3, 2016 at 11:07:00 PM UTC+1, debois wrote: > > I'm very happy to announce the release of elm-mdl 7.0.0. > Wow, can't wait to try this out. Congratulations to you all. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To

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

2016-08-04 Thread Charlie Koster
> > Secondly, in my experience these sorts of bugs are rare. > When working on non-trivial applications I come across these kinds of bugs all of the time. Granted, that anecdote comes from developing AngularJS on a medium sized team. You're right that the culprit usually is that the code is

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

2016-08-04 Thread Wouter In t Velt
Congrats on the great achievement, and thank you for contributing this to the community! Will update asap. -- 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] Re: [ANN] elm-mdl 7.0.0 — supports all components of Material Design Lite

2016-08-04 Thread Herwig Habenbacher
Thank you very much for your work! It helps a lot for the Adaption of Elm! -- 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] Experienced Elm & Erlang dev looking for work

2016-08-04 Thread Zachary Kessin
Hi All I have been doing elm development since last November and have been doing web development for 20 years. I am looking for a contract building apps in Elm. I have also been using Erlang for about 5 years and doing web development for about 20 Zach -- Zach Kessin SquareTarget

[elm-discuss] Preserving DOM state on update

2016-08-04 Thread debois
Look into Html.Keyed and/or Html.Lazy. -- 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+unsubscr...@googlegroups.com. For more options, visit