[elm-discuss] Curious about nested updates

2017-05-08 Thread Alex Lew
The rules are that in a record update, neither the record being updated (the thing to the left of the bar) nor the field names can have dots in them. In order to do nested record updates, you'll have to use `let...in...` to give simpler names to all your record's nested fields. I believe the

[elm-discuss] Re: Linear algebra for 2d geometry?

2017-05-08 Thread Ian Mackenzie
You're exactly right - if you construct a function like the following, I think it will almost certainly result in four separate transformations every time it's called: compositeTransformation1 : Point3d -> Point3d compositeTransformation1 = Point3d.scaleAbout Point3d.origin 5 >>

[elm-discuss] Re: Best practices to create examples for an elm package?

2017-05-08 Thread Matthieu Pizenberg
> > - Use elm-doc-test for examples whereever possible > - If you have views, use elm-html-test. > Thanks Noah, I didn't know about those for lack of using tests. Thank you everyone for your feedback. So if I sum up, the main ideas are: 1. Keep in sync doc examples by using doc tests. 2. For

[elm-discuss] Re: Missing json decoding tool to decode multitouch events cleanly

2017-05-08 Thread Matthieu Pizenberg
On Monday, May 8, 2017 at 11:36:13 PM UTC+8, Erik Lott wrote: > > Yeah, I think you spotted my bad logic. You're talking about functions > like this, right? > Yep that was it :) -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe

[elm-discuss] Re: Local third-party packages

2017-05-08 Thread 'Rupert Smith' via Elm Discuss
On Monday, May 8, 2017 at 8:39:57 PM UTC+1, Rupert Smith wrote: > > On Friday, May 5, 2017 at 11:52:09 AM UTC+1, Gusztáv Szikszai wrote: >> >> I've been working on this in the last few days, and published 1.0.0 >> >> of

[elm-discuss] Re: Local third-party packages

2017-05-08 Thread 'Rupert Smith' via Elm Discuss
On Monday, May 8, 2017 at 8:39:57 PM UTC+1, Rupert Smith wrote: > > On Friday, May 5, 2017 at 11:52:09 AM UTC+1, Gusztáv Szikszai wrote: >> >> I've been working on this in the last few days, and published 1.0.0 >> >> of

[elm-discuss] Feedback requested: crowdsourcing big computations with Elm

2017-05-08 Thread Carlos De la Guardia
Howdy folks, Here's a tentative idea I'd like to get some feedback on. I like the idea of crowdsourcing big computations (e.g. Folding@Home ). If you have a large problem to solve, you can distribute bits of work to a network of people. Your program can then

[elm-discuss] Re: Local third-party packages

2017-05-08 Thread 'Rupert Smith' via Elm Discuss
On Friday, May 5, 2017 at 11:52:09 AM UTC+1, Gusztáv Szikszai wrote: > > I've been working on this in the last few days, and published 1.0.0 > of > *elm-github-install* which handles using a fork (or any other git >

[elm-discuss] Docker image for create-elm-app tasks - kraklin/elm-app-ci

2017-05-08 Thread Tomas Latal
Hello, I needed to execute elm-app tests and build on CI server (GitLab). To make this simple and reusable, I have created a Docker image with create-elm-app in it. You can pull it from here https://github.com/kraklin/docker-elm-create-app I was unable to create an Alpine Linux image with

Re: [elm-discuss] Re: Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Richard Feldman
Agreed! That does sound like a useful (albeit separate) demo project. :D On Mon, May 8, 2017 at 10:03 AM Marek Fajkus wrote: >  It's clearly great contribution to educative materials around Elm. I've > seen your tweet before and was really pleased you've found time to

[elm-discuss] Re: Best practices to create examples for an elm package?

2017-05-08 Thread Marek Fajkus
My thoughts: - Most packages don't depend on `elm-lang/html` - Most examples do depent on `elm-lang/html` - It's good to enforce examples compatibility <-> library compatibility in CI (compiling examples in some step) Solution? - have `elm-package.json` without `elm-lang/html`

[elm-discuss] Re: Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Marek Fajkus
 It's clearly great contribution to educative materials around Elm. I've seen your tweet before and was really pleased you've found time to build it - give it your likes folks. About web-pack - even though we're using it with elm in company project I never used it for any of my hobby project

[elm-discuss] Re: File Uploads - as simple as I could manage

2017-05-08 Thread Kasey Speakman
That was one of the first things I found. I'm uploading to S3 too. But the API was a bit larger than I wanted to take on for my meager needs. Props to simonh1000 for leading the way. On Sunday, May 7, 2017 at 8:25:23 AM UTC-5, Erik Lott wrote: > > You may want to see "file-reader" if you

Re: [elm-discuss] Re: Best practices to create examples for an elm package?

2017-05-08 Thread Noah Hall
Best practice: - Use elm-doc-test for examples whereever possible, don't just write documentation examples. They easily fall out of sync. If your doc-tests start to look too crazy, it's possible your API could be simplified. - Have a test suite. Depending on your problem, your test suite may need

[elm-discuss] Re: Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Erik Lott
A great many folks are going to be thankful for this SPA example... You are a saint good sir. On Monday, May 8, 2017 at 3:59:16 AM UTC-4, Richard Feldman wrote: > > I get asked if there are any sizeable open-source Elm SPA examples out > there...so I made one! > > Hope it's useful:

[elm-discuss] Re: List of all members of a union type

2017-05-08 Thread OvermindDL1
OCaml has a set of extension points. You can write OCaml code, add it to an extension point (`derived` is precisely the use case of this) and it receives the AST of the expression and can transform it or add new code or whatever as you wish. Like a very common one for auto-json conversion

[elm-discuss] Re: Best practices to create examples for an elm package?

2017-05-08 Thread Eirik Sletteberg
Maybe write an example in the form of an integration test - then you know your example will be up to date with the actual code, and it may even discover bugs! -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and

[elm-discuss] Re: Best practices to create examples for an elm package?

2017-05-08 Thread Eric G
Good question, I'd like to hear what other people do as well. Just to add two other options to the mix: 5. Link to an example that uses the package in Ellie (https://ellie-app.com/) 6. Deploy an example to the Github project page (https://username.github.io/package/ ) 5. Is quick and painless

[elm-discuss] Re: Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Richard Feldman
> > Can you comment on why you did not use the elm-webpack-loader? > I'm trying to understand if we are moving towards a better approach or if > there are other considerations. > It honestly did not occur to me that I might do that! If I have the choice between using Webpack and not using

[elm-discuss] Re: Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Robin Heggelund Hansen
This is great Richard! I've already shown it to several people who've asked me how I structure my Elm apps :) mandag 8. mai 2017 09.59.16 UTC+2 skrev Richard Feldman følgende: > > I get asked if there are any sizeable open-source Elm SPA examples out > there...so I made one! > > Hope it's

[elm-discuss] Re: Linear algebra for 2d geometry?

2017-05-08 Thread 'Rupert Smith' via Elm Discuss
On Sunday, May 7, 2017 at 10:02:43 PM UTC+1, Rupert Smith wrote: > > On Friday, May 5, 2017 at 7:55:22 PM UTC+1, Ian Mackenzie wrote: >> >> So, nice library with lots of features, missed chance to work with a >>> better abstraction. >>> >> >> Ouch =) I've done lots of work with matrix-based

[elm-discuss] Announce: new package (elm-mouse-events), major update (elm-touch-events)

2017-05-08 Thread Matthieu Pizenberg
Hi all, Since I often need coordinates of mouse events and was getting tired of recoding the json encoders / decoders for each project, I made a package for this: mpizenberg/elm-mouse-events . The main differences from

Re: [elm-discuss] Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Peter Damoc
another advantage to a build system (webpack) is that you could create a `docs` folder where to output the current build, mount that folder to be used by the project as its Github Pages root and link it from the README.md. -- There is NO FATE, we are the creators. blog: http://damoc.ro/ --

Re: [elm-discuss] Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Peter Damoc
First, thank you so much for taking time from your already busy schedule to solve this for the community! I think it is an amazingly useful project as it short-circuits a lot of the potentially time-hungry decisions. Can you comment on why you did not use the elm-webpack-loader? I'm trying to

[elm-discuss] Tour of an open-source 4,000 LoC Elm SPA

2017-05-08 Thread Richard Feldman
I get asked if there are any sizeable open-source Elm SPA examples out there...so I made one! Hope it's useful: https://dev.to/rtfeldman/tour-of-an-open-source-elm-spa -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this

[elm-discuss] Re: Poll for Intermediate to Advanced topics that people struggle with

2017-05-08 Thread Richard Feldman
This open-source Elm SPA uses JWT authentication...maybe it's useful? https://dev.to/rtfeldman/tour-of-an-open-source-elm-spa On Tuesday, May 2, 2017 at 1:18:56 PM UTC-7, Erik Lott wrote: > > For the folks who are struggling with authentication, are you having > issues with authentication in