[elm-discuss] Re: Seeking feedback: CSS Modules in Elm

2017-06-15 Thread Eirik Sletteberg
It would be great to be able to distinguish between local and global CSS classes, with the :local and :global syntax from CSS modules. That's possible with Webpack today; any CSS class marked :local will be hashed. (Using style-loader + css-loader + postcss-loader) tirsdag 6. juni 2017

[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

Re: [elm-discuss] Re: Moving on

2017-04-26 Thread Eirik Sletteberg
e people a tool, you can > never take it back, even if it is a bad tool. The goal is to make Elm solid > *before* 1.0, so that after 1.0, we won't be plagued by backwards > compatibility issues. > > On Wed, Apr 26, 2017 at 12:57 PM, Eirik Sletteberg <eiriksl...@gmail.com >

Re: [elm-discuss] Re: Moving on

2017-04-26 Thread Eirik Sletteberg
I used the persistent-cache code once. I just copied the source code into my project. The library readme makes some bold statements, like "it is the right technical choice" to expose a LRU cache for localStorage in Elm. It certainly wasn't the right choice for my use case, where "least recently

Re: [elm-discuss] Re: elmvm (Elm Version Manager)

2017-04-06 Thread Eirik Sletteberg
None of these tools are mentioned in the Elm documentation. It only points to installers and the npm module. -- 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] elmvm (Elm Version Manager)

2017-04-05 Thread Eirik Sletteberg
https://github.com/eirslett/elmvm This is a simple utility inspired by nvm (Node Version Manager). It lets you install and manage multiple versions of Elm on the same machine, and switch between them easily. -- You received this message because you are subscribed to the Google Groups "Elm

[elm-discuss] Re: elm debugger as a browser extension

2017-03-25 Thread Eirik Sletteberg
Looks good, that's what I was looking for! fredag 24. mars 2017 23.26.41 UTC+1 skrev Roman Frołow følgende: > > Have you seen this? https://github.com/jinjor/elm-devtool > > -- > Roman > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To

[elm-discuss] elm debugger as a browser extension

2017-03-24 Thread Eirik Sletteberg
It would be nice to have the elm debugger (the overlay one you get when running apps with elm-reactor) as a browser extension, instead of being embedded in the document. Something like the redux-devtools-extension: https://github.com/zalmoxisus/redux-devtools-extension How would one approach

[elm-discuss] Re: How do you handle dependencies between updaters?

2017-03-21 Thread Eirik Sletteberg
That was what I was thinking, put all the application state in one model, and all updaters will deal with that single model, instead of each Updater having its own sub-model. In the end, almost all the data is dependent somehow. tirsdag 21. mars 2017 12.22.15 UTC+1 skrev Fedor Nezhivoi

[elm-discuss] Re: How do you handle dependencies between updaters?

2017-03-21 Thread Eirik Sletteberg
mandag 20. mars 2017 12.58.38 UTC+1 skrev Eirik Sletteberg følgende: > > In larger Elm apps, it makes sense to divide Updaters so you can > package-by-feature. > For example, a single page application could have updaters like this: > > - Configuration updater > - Session u

[elm-discuss] How do you handle dependencies between updaters?

2017-03-20 Thread Eirik Sletteberg
In larger Elm apps, it makes sense to divide Updaters so you can package-by-feature. For example, a single page application could have updaters like this: - Configuration updater - Session updater - User Profile updater - User Settings updater - Content updater - Some other business specific

[elm-discuss] Re: Task ports: A proposal to make it easier to integrate JS with Elm.

2017-03-07 Thread Eirik Sletteberg
It's easy to find concrete issues - a whole class of issues would be solved with task ports. All problems that require interop between Elm and JS, where a message from Elm to JS must be correlated with a message from JS to Elm. The async request-response pattern. Like callbacks or Promises in

[elm-discuss] Re: Task ports: A proposal to make it easier to integrate JS with Elm.

2017-03-04 Thread Eirik Sletteberg
I think this would be a very useful feature! I forked the Elm compiler and made a working proof of concept: https://github.com/eirslett/elm-task-port-example Is this still something people think would be a good idea? lørdag 13. august 2016 17.31.07 UTC+2 skrev James Wilson følgende: > > The

Re: [elm-discuss] Multiple views sharing the same state?

2017-03-03 Thread Eirik Sletteberg
al Elm components as > flags. > You could also wire the components by connecting their ports in such a way > that one component could push state and that state be sent to the rest of > the components. > > On Fri, Mar 3, 2017 at 3:56 PM, Eirik Sletteberg <eiriksl...@gmail.com

Re: [elm-discuss] Re: Sending tagged unions through ports

2017-03-03 Thread Eirik Sletteberg
Friday, March 3, 2017 at 4:35:00 PM UTC, Eirik Sletteberg wrote: >> >> type alias Car = >> { numberOfDoors: Int >> } >> >> type alias Plane = >> { maxSpeed: Int >> } >> >> type Transport = Walk >> | Ride Car >> | Fly

Re: [elm-discuss] Re: Sending tagged unions through ports

2017-03-03 Thread Eirik Sletteberg
type alias Car = { numberOfDoors: Int } type alias Plane = { maxSpeed: Int } type Transport = Walk | Ride Car | Fly Plane Could be encoded as [name, encoded] or just [name] if it's only an identifier without a value. So they would be encoded as ['Walk'] or ['Ride', {

[elm-discuss] Multiple views sharing the same state?

2017-03-03 Thread Eirik Sletteberg
Another use case for a migration from JS app to Elm app; You rewrite one view JS -> Elm, and then another view, and so on, and then some components on the page are JS views, some are Elm views. But if there is state in Elm, it would be desirable for all the views to share the same state (for

[elm-discuss] Sending tagged unions through ports

2017-03-03 Thread Eirik Sletteberg
An example use case for this would be when gradually porting an existing Redux-based app to Elm. One could rewrite state handling from Redux into Elm updaters/messages, and wrap the Elm app's main updater, so that after every message is passed through the updater, it sends the whole state tree

[elm-discuss] Ports and Tasks

2017-03-03 Thread Eirik Sletteberg
I'm trying to build a userland interface for localStorage: -- Send in key port storageGetItem : String -> Cmd msg -- Returns key + Just value if it exists, Nothing if it doesn't. I guess it could also return just the value. port storageGetItemResult : ((String, Maybe String) -> msg) -> Sub