[elm-discuss] Re: Cell - simple web framework

2017-06-15 Thread Simone Vittori
Very interesting and minimalistic approach for building web apps. Thanks for sharing, Franček! On Wednesday, 14 June 2017 11:42:24 UTC+1, Franček Prijatelj wrote: > > Hi > > Cell is very simple web framework (no APPI). > > http://www.celljs.org/index.html?hn >

[elm-discuss] Re: How do you name messages?

2016-10-21 Thread Simone Vittori
Why not both? Usually I find myself using the first approach more, especially when I have "actions" coming from the view (e.g. ChangeInput, SubmitForm). However I also use the second approach when I get some value back from a task (e.g. ParsedInput, ReceivedData). On Friday, 21 October 2016 09

[elm-discuss] Re: Can I use css animations normally in elm?

2016-10-15 Thread Simone Vittori
I think it's worth mentioning your Elm code can be totally independent from any animation done in an external stylesheet. See this style for example: https://github.com/simonewebdesign/elm-double-folding-pattern/blob/a27de84ba14f46f46d4d3878b233dcd32b31d13d/style.css#L357 The animation starts

[elm-discuss] Re: elm-new, a CLI tool for initializing new Elm projects

2016-10-09 Thread Simone Vittori
eate-elm-app is pretty cool indeed, however it's also very different from elm new. My tool not only is independent from Node, it also tries to stay unopinionated. I'll write a blog post to explain my view when I have time. On Monday, 8 August 2016 08:11:15 UTC+1, Simone Vittori wrote:

[elm-discuss] Re: Is over-use of 'let... in' considered an anti-pattern?

2016-10-05 Thread Simone Vittori
I agree with everything said, however there's a specific case where I personally try to avoid `let` if possible. Sometimes view functions can be quite big, hence it makes sense to split them into smaller composable functions. So far so good, but as soon as we introduce the `let ... in` block, t

[elm-discuss] Re: elm-new, a CLI tool for initializing new Elm projects

2016-10-01 Thread Simone Vittori
I finally took some time to work on supporting Windows, and I can announce that *elm new * is now supporting all major operating systems! :) What I did for Windows was fiddling with Batch scripting. Painful, but works. I could have rewritten it from s

[elm-discuss] Re: When to use Dict vs. List?

2016-09-03 Thread Simone Vittori
I'm not an expert, but I'd say you should use a Dict whenever you have key-value data and you need insert, remove and/or query operations. You can always achieve the same with a List, but with a naive implementation you wouldn't get the same performance. I bet the TodoMVC uses a List for simplic

[elm-discuss] Re: How to order imports?

2016-09-02 Thread Simone Vittori
At my company we have our own conventions, which are always good to have I think, even though the order doesn't really matter in this case. This is our convention: 1) Core modules; 2) Public modules from elm-lang; 3) Other public modules; 4) Project modules. Anyway I see you mentioned List and

[elm-discuss] Re: Which text editor do you prefer for Elm?

2016-08-10 Thread Simone Vittori
> Any idea how to tell linter-elm-make where to pick up the elm-package.json > from? > Go to linter-elm-make's settings and tick "Always Compile Main". -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop re

[elm-discuss] Re: Which text editor do you prefer for Elm?

2016-08-10 Thread Simone Vittori
I tried Atom recently, it gets pretty good when you start using the linter-elm-make package. You get inline errors and some other goodies. Anyway I've been a happy Sublime Text user for a long time now. Elm support is quite good too, I used to have inl

Re: [elm-discuss] elm-new, a CLI tool for initializing new Elm projects

2016-08-08 Thread Simone Vittori
commands like you can with `mix > blah`? > > > On Monday, August 8, 2016 at 1:55:27 AM UTC-6, Simone Vittori wrote: >> >> Good call Peter, I think it's worth adding a node wrapper, it will >> definitely bring more portability. >> Thanks for the f

Re: [elm-discuss] elm-new, a CLI tool for initializing new Elm projects

2016-08-08 Thread Simone Vittori
> > Consider porting it to node. I would much rather do a `npm install -g > elm-new` than have to deal with make and such. > Also, it assumes a POSIX system which needlessly rules out the people > using Windows. > > > On Mon, Aug 8, 2016 at 10:11 AM, Simone Vittori > wr

[elm-discuss] elm-new, a CLI tool for initializing new Elm projects

2016-08-08 Thread Simone Vittori
I recently worked on elm-new, a tool for creating a project scaffolding to get started with Elm more easily and quickly. Please check it out: https://github.com/simonewebdesign/elm-new Personally I had the need to do some quick prototyping with Elm, but always having to manually create a Main.e

[elm-discuss] Re: Form with union type

2016-07-29 Thread Simone Vittori
Elm <http://elm-lang.org/try>). > Union type was not wrong. The `on` function assumes an event object to be > decoded, but you expect a string. > So I used `targetValue` decoder, which is a shortcut for `e.target.value`. > > > 2016年7月28日木曜日 0時25分46秒 UTC+9 Simone Vittori: >> &

[elm-discuss] Form with union type

2016-07-27 Thread Simone Vittori
I'm building a language selector and I'd like to map the options to a union type. Here's what I tried: import Json.Decode exposing (Decoder, customDecoder, string) {-| Currently supported languages. -} type Language = English | Japanese {-| A JSON decoder of Language. -} languageDecod