Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-31 Thread Kasey Speakman
> > "Explicit is better than implicit." -- Tim Peters So the main way "data-centric" happens is by modeling behaviors implicitly in the data. A common example is an item being active or not. I often model this as a boolean property "isActive". The usual way to tweak this value is to have

[elm-discuss] Re: Sub.filterMap and Sub.concatMap

2016-10-31 Thread David Andrews
I found a discussion from May that has many thoughts on this. https://groups.google.com/d/msg/elm-discuss/u-6aCwaJezo/fu-HMPy6CQAJ My actual use case is that I'm looking into implementing a 0.17-compatible local storage library (which I'll post about in another thread), and would love to be

Re: [elm-discuss] 0.17-compatible web storage

2016-10-31 Thread Peter Damoc
On Mon, Oct 31, 2016 at 8:38 AM, David Andrews wrote: > I would really like to be able to use local storage in elm. There have > been several libraries that implement this, but none of them have been > updated to elm 0.17. So far the advice I've seen is just to wait, but

Re: [elm-discuss] Re: Sub.filterMap and Sub.concatMap

2016-10-31 Thread Janis Voigtländer
You may also want to read this later discussion: https://groups.google.com/forum/#!topic/elm-discuss/Ud7WzAhRsqE > Am 31.10.2016 um 07:25 schrieb David Andrews : > > I found a discussion from May that has many thoughts on this. > >

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Ed Ilyin
I'm actively using Polymer Paper Elements. And they accept mixings like this: ```css paper-dropdown-menu { --paper-input-container-input: { color: white; } --paper-input-container-underline: { display: none; }

[elm-discuss] Re: Ecto enforce unwanted "sort by" when "distinct" is used

2016-10-31 Thread Magnus Rundberget
I'm sure someone on here can answer your question, I'm just curious how this relates to Elm ? Isn't this an Elixir related question ? cheers -magnus On Monday, 31 October 2016 01:30:36 UTC+1, Jaroslaw Zabiello wrote: > > Why Ecto is adding sort by rule for the column used in distinct? > >

[elm-discuss] Re: Sub.filterMap and Sub.concatMap

2016-10-31 Thread David Andrews
I found a discussion from May that has many thoughts on this. https://groups.google.com/d/msg/elm-discuss/u-6aCwaJezo/fu-HMPy6CQAJ My actual use case is that I'm looking into implementing a 0.17-compatible local storage library (which I'll post about in another thread), and would love to be

Re: [elm-discuss] 0.17-compatible web storage

2016-10-31 Thread Joe Clay
I think it ties in with the general theme of Elm trying to guide you into making the right choices - if there's no real use case for LocalStorage other than using it as a cache, why expose the low level bindings and allow people to shoot themselves in the foot with them? On Monday, October 31,

[elm-discuss] 0.17-compatible web storage

2016-10-31 Thread David Andrews
I would really like to be able to use local storage in elm. There have been several libraries that implement this, but none of them have been updated to elm 0.17. So far the advice I've seen is just to wait, but I'm tired of waiting. The specification for web storage is here:

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Ed Ilyin
Will it render native CSS mixin? Actually I can't figure out how to create native CSS mixins even using elm-css module. Il giorno lun 31 ott 2016 alle ore 13:49 Matthew Griffith < mdg.griff...@gmail.com> ha scritto: > You can create a mixin as a function. > > > > myMixin : Style.Model ->

[elm-discuss] Re: Ecto enforce unwanted "sort by" when "distinct" is used

2016-10-31 Thread Jaroslaw Zabiello
Sorry, wrong group. On Monday, October 31, 2016 at 6:28:38 AM UTC, Magnus Rundberget wrote: > > I'm sure someone on here can answer your question, I'm just curious how > this relates to Elm ? Isn't this an Elixir related question ? > > cheers > -magnus > > On Monday, 31 October 2016 01:30:36

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Matthew Griffith
You can create a mixin as a function. myMixin : Style.Model -> Style.Model myMixin style = { style | visibility = hidden } myMixinColor : Style.Model -> Style.Model myMixinColor style = { style | colors = palette.blue } dropDown : List (Html.Attribute a) ->

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Matthew Griffith
Yeah, this library is more about smart styling in elm rather than interfacing with polymer. Since we can do mixins in elm, native mixins probably won't be supported :/ I have thought that you could make a polymer or mdl type library in pure elm using the style-elements library, though it

Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-31 Thread Kasey Speakman
On Friday, October 28, 2016 at 4:58:34 PM UTC-5, Rupert Smith wrote: > > On Friday, October 28, 2016 at 6:26:46 PM UTC+1, Kasey Speakman wrote: >> >> As best I can, I try to look at the system as use cases and events. >> >> With legacy systems, we are tied to a normalized data model (which is

Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-31 Thread Peter Damoc
On Mon, Oct 31, 2016 at 5:24 PM, Kasey Speakman wrote: > There is a danger in focusing on data over use cases. It's not a guarantee > that you make this mistake (I have), but you know you've gone too far with > it when most workflows are Load/Edit/Save (or Create/Save). And

Re: [elm-discuss] 0.17-compatible web storage

2016-10-31 Thread David Andrews
Because primitives rock. If we expose API primitives in a typesafe way, we allow the community to use them to create useful libraries. I actually see that the persistent cache package has a LocalStorage module which exposes a subset of my proposed API. However, It does not implement the storage

Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-31 Thread Kasey Speakman
There is a danger in focusing on data over use cases. It's not a guarantee that you make this mistake (I have), but you know you've gone too far with it when most workflows are Load/Edit/Save (or Create/Save). And the user is left to know what field to change to have a specific effect in the

[elm-discuss] Thoughts on a "verbal json decoder"

2016-10-31 Thread John Kelly
It's great to see that independent efforts have come to the same conclusion. Check this out http://package.elm-lang.org/packages/NoRedInk/elm-decode-pipeline/latest I liked your approach of using overly descriptive names, but maybe only necessary from a learning/beginner standpoint. It's

[elm-discuss] text editor in Elm

2016-10-31 Thread Haitao Zhang
Can anyone point to an editor done in Elm? I am particularly interested in seeing how mouse interaction (highlight, selection, copy, paste etc) is handled. I looked through DreamWriter. I don't think it implements the part I mentioned in Elm, though to be honest I am not quite sure how it

Re: [elm-discuss] 0.17-compatible web storage

2016-10-31 Thread Frederick Yankowski
https://github.com/fredcy/localstorage runs in Elm 0.17 and has storage events. The provided examples show it handling some events. That repo will never be published as an Elm package though. I originally named it "Storage", thinking to do session storage next. But it's a dead end and I gave