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] Updating an image in the view.

2016-09-25 Thread Redvers Davies
I'm still too early in elm to know the correct question to ask so in the interests of avoiding the XY problem I'm just going to describe my end-goal and ask for the best approach to achieve it. I have (what I think is) an interesting use-case where I want to model on a webpage a physical

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

2016-09-25 Thread Aaron VonderHaar
You may be interested in looking at Auto Layout for Mac and iOS apps. https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/index.html It uses a system of linear equations to solve the defined layout constraints. On Sep 25, 2016 4:47 PM, "Duane Johnson"

Re: [elm-discuss] Re: Random in 0.17 and purity

2016-09-25 Thread Max Goldstein
Hi Andrew, The official docs are harder to change than I'd like, but I welcome docs issues and PRs to my library: https://github.com/mgold/elm-random-pcg Eventually the RNG will replace core's, and hopefully I'll be able to update the docs at that time. -- You received this message

Re: [elm-discuss] Re: Random in 0.17 and purity

2016-09-25 Thread Max Goldstein
Hi Andrew, The official docs are harder to change than I'd like, but I welcome docs issues and PRs to my library: https://github.com/mgold/elm-random-pcg Eventually the RNG will replace core's, and hopefully I'll be able to update the docs at that time. -- You received this message

[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] CSS in Elm: best practices?

2016-09-25 Thread Peter Damoc
Regarding 1. I don't see how the compiler can deduce that a certain union type you used was suppose to have the meaning of ID and another meaning of class One way you can do this manually is to specialize the namespace manually and then unpack it. namespace : Namespace String Classes Ids msg

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

2016-09-25 Thread Brian Marick
As a front end newbie, I was pleased I could make a clock hand with an arrow using a marker https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker That allows me a pretty(ish) clock hand that automagically has the arrowhead appropriately rotated to match the orientation of the line.

[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

[elm-discuss] Re: PSA for beginners

2016-09-25 Thread Emmanuel Rosa
Yeah, that it *really* good. I also watched Richard's Side-effects as Data and had my mind blown. In fact, I was in the middle of writing a Wordpress plugin and decided to see what would happen if I tried representing the database access as data.

[elm-discuss] Identity continuity for views

2016-09-25 Thread Mark Hamburg
There's been a discussion of what it would take to support Web Components well in Elm and one of the primary issues that has come up has been problems with the virtual DOM not preserving component DOM elements during an update or preserving them when it should not. This matters because these are

[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

Re: [elm-discuss] Re: Random in 0.17 and purity

2016-09-25 Thread 'Andrew Radford' via Elm Discuss
At the risk of necroposting, just thought I'd mention that today is the day that I first needed Random-ness in elm. After accidentally reading the old Random docs, encountering and wondering about the function signatures that pass the random seed around, having the lightbulb moment about this

[elm-discuss] Re: Confused by error (inline function, >, tagged type)

2016-09-25 Thread Wouter In t Velt
It looks like the error you get is because you redefine the '>' function by using the same function: - You redefine '>' to take 2 DropsPerSecond types - Inside this function you want to use the "old" '>' function to compare 2 Floats The compiler - I think - is ahead of you: it uses

[elm-discuss] Re: Modeling cross-references

2016-09-25 Thread Wouter In t Velt
> > On Sunday, September 25, 2016 at 8:54:50 AM UTC+10, Eric G wrote: >> >> - Is it better to use Dicts as the basic 'table' structure, if frequently >> rendering lists of items filtered and sorted in various ways? In short, is >> it better to convert a `List (ID, Item)` to a Dict for finding

Re: [elm-discuss] Re: pattern matching on a field within a record

2016-09-25 Thread Martin DeMello
On Sat, Sep 24, 2016 at 9:11 PM, Nick H wrote: > > Regarding null_square: If you want to make sure that null_square is passed > by reference, you can define it as a top-level value. (That said, the > record is so small, I doubt it would make a noticeable performance >

Re: [elm-discuss] Confused by error (inline function, >, tagged type)

2016-09-25 Thread Mark Hamburg
Type aliases will get you the documentation benefit of types, but I think they forego the type-checking benefit of types since a type alias to Float doesn't actually produce a type that is different from Float. Mark On Saturday, September 24, 2016, Joaquín Oltra wrote: