[elm-discuss] Re: Pre-requisites for learning Elm?

2016-10-24 Thread OvermindDL1
That is a very good point, you can make a lot of cool things in pure elm, I whipped up an incremental clicker in an hour a few days ago when I was screwing around, dead simple. ^.^ On Monday, October 24, 2016 at 4:44:53 PM UTC-6, joseph ni wrote: > > Hey Razi, > > That sounds great! I wish I

Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-24 Thread Max Goldstein
I would love more Ruby-like names across the board, except for the presence of aliases, but Elm grew out of Haskell so it carries some of that history. It really comes down to what Evan wants to do. People come to Elm from many languages, and everyone has preferences. Changing things makes

[elm-discuss] Re: IntelliJ (WebStorm) devs, how do you read the compiler errors?

2016-10-24 Thread Carlos Poon
@Birowsky - Hi Daniel, sorry last screenshot was a bit too wide: So this is going to sound a little crazy, but it seems like we can put in custom config files for

[elm-discuss] Re: IntelliJ (WebStorm) devs, how do you read the compiler errors?

2016-10-24 Thread Carlos Poon
@Birowsky - Hi Daniel, This is as much as I can get, in terms of errors:

Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-24 Thread Brian Marick
> On Oct 20, 2016, at 9:12 AM, Robin Heggelund Hansen > wrote: > > In Elm 0.18, primes are being removed as valid characters in a > variable/function name. That’s unfortunate. Non-alphabetical characters can be really useful for signaling intent. For example, an

[elm-discuss] Re: IntelliJ (WebStorm) devs, how do you read the compiler errors?

2016-10-24 Thread Birowsky
@Keith I have just the man for that. My colleague uses Kotlin for the backend, this is how hard his life is: hover over the 5:

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

2016-10-24 Thread Birowsky
Thanx for this discussion, fellas. I cannot fully digest it at the moment, but I'm sure I'll be coming back to this as I go. -- 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

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

2016-10-24 Thread John Kelly
On Monday, October 24, 2016 at 1:15:14 PM UTC-7, Peter Damoc wrote: > > Think about the role that a ORM is playing. What I want to understand is > what would a functional equivalent would look like in Elm. > > What would sit above graphQL or REST or some other lower level tech? > > Another way

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

2016-10-24 Thread Peter Damoc
I cannot provide sample code because I don't have a clear idea how the API could look. Think about the role that a ORM is playing. What I want to understand is what would a functional equivalent would look like in Elm. What would sit above graphQL or REST or some other lower level tech? Another

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

2016-10-24 Thread John Kelly
On Monday, October 24, 2016 at 8:33:55 AM UTC-7, Peter Damoc wrote: > > I'm more interested in how one would solve this in a multilayer system > where the actual remote persistence is abstracted from the app. > > The actual remote persistence might be implemented with REST, or it might > be

Re: [elm-discuss] Naming functions

2016-10-24 Thread Mark Hamburg
Elm style puts the items last so that you can write: items |> replaceItemById id item On Monday, October 24, 2016, Lars Jacobsson wrote: > | The names were inspired by Dict.insert and Dict.update, which were the > closest to what I was looking for. > > Yeah, I'm

Re: [elm-discuss] Proposal: Add Debug.breakpoint to core

2016-10-24 Thread Nick H
That makes total sense. Being able to monitor model updates in debug mode isn't the same as being able to step through the call stack. Being able to do the latter by setting breakpoints would be useful. On Mon, Oct 24, 2016 at 11:24 AM, Robin Heggelund Hansen < skinney...@gmail.com> wrote: >

Re: [elm-discuss] Structure for large Elm apps

2016-10-24 Thread Erik Lott
> > Above all of this, the other key subdivision we are making in our SPA and > that I would recommend having seen where other programmers often first > head, is having a top layer that handles overall app state — e.g., logged > in v not logged in — as a type union. This can also often be

Re: [elm-discuss] Proposal: Add Debug.breakpoint to core

2016-10-24 Thread Robin Heggelund Hansen
I've done a lot of library work lately where Cmds and Subs haven't been a part of the project, so yes, in a project where the main way to run your code is through fuzz tests, breakpoints would be immensively helpful. That being said, having a Debug.breakpoint function is just a convenience,

Re: [elm-discuss] Proposal: Add Debug.breakpoint to core

2016-10-24 Thread Nick H
Don't forget, the time-travelling debug mode is coming in 0.18. Do you think setting breakpoints like this is still going to be useful? On Mon, Oct 24, 2016 at 5:59 AM, Robin Heggelund Hansen < skinney...@gmail.com> wrote: > Elm, as great as it is, doesn't save you from debugging every once in a

Re: [elm-discuss] 2 yr. quest to learn front-end programming

2016-10-24 Thread John Orford
Doug, I have been rereading the Evan's elm tutorial. Actually I don't think I read it before, so it has been enjoyable. I know Elm pretty OK, so my opinion about the tutorial is... Elm is a bit like Mario Kart. The basics are easy, and when you read the tutorial, you have covered a good 90% of

Re: [elm-discuss] 2 yr. quest to learn front-end programming

2016-10-24 Thread Duane Johnson
These two might be helpful: https://www.gitbook.com/book/sporto/elm-tutorial/details https://johncrane.gitbooks.io/ninety-nine-elm-problems/content/ On Mon, Oct 24, 2016 at 10:34 AM, douglas smith <395curra...@gmail.com> wrote: > Hey everyone- > > Over the past 10 years I have causally studied

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

2016-10-24 Thread Peter Damoc
What I'm looking here is more like a strategy that takes into account the entire persistence layer from the perspective of an Elm Architecture app. If one doesn't need to store data remotely, one could simply either use just some transient model OR, use something like localstorage to persist some

[elm-discuss] Re: Naming functions

2016-10-24 Thread Lars Jacobsson
Ok Max, thanks I'll give it a go and see how it works out. On Monday, October 24, 2016 at 4:13:33 PM UTC+2, Max Goldstein wrote: > > If you're going to refer to items by ID a lot, you should probably use a > dictionary keyed on ID. Assuming items is a record with an id field: > > { model | >

[elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-24 Thread 'Rupert Smith' via Elm Discuss
On Thursday, October 20, 2016 at 7:19:05 PM UTC+1, John Kelly wrote: > > I'm sorry to link drop, but I've been doing a bit of work on a library to > remove some of the boilerplate when writing client code for a REST API. The > library is currently locked in / specific to what is called

[elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-24 Thread 'Rupert Smith' via Elm Discuss
On Thursday, October 20, 2016 at 7:19:05 PM UTC+1, John Kelly wrote: > > I'm sorry to link drop, but I've been doing a bit of work on a library to > remove some of the boilerplate when writing client code for a REST API. The > library is currently locked in / specific to what is called

[elm-discuss] Re: Naming functions

2016-10-24 Thread Max Goldstein
If you're going to refer to items by ID a lot, you should probably use a dictionary keyed on ID. Assuming items is a record with an id field: { model | items = model.items |> Dict.insert updatedItem.id updatedItem } -- You received this message because you are subscribed to the Google

[elm-discuss] Re: Naming functions

2016-10-24 Thread Lars Jacobsson
| The names were inspired by Dict.insert and Dict.update, which were the closest to what I was looking for. Yeah, I'm probably just too used to that dot notation. I don't know why but items.replaceItemById id item looks better than replaceItemById items id item . Somehow it feels like a

[elm-discuss] Re: Naming functions

2016-10-24 Thread Wouter In t Velt
Op maandag 24 oktober 2016 13:18:59 UTC+2 schreef Lars Jacobsson: > > Any thinking going out there on around naming conventions OOP vs > functional? I'd be grateful for any input on this matter of life or death! > I always try to keep my naming conventions close to the Core functions. E.g. in my

[elm-discuss] Re: Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-24 Thread Robin Heggelund Hansen
Define "other functional languages". Clojure(script) doesn't have fold, but reduce. F# has fold and foldBack. What other languages do is, however, besides the point. The question is, what is more readable? It's easier to confuse foldl with foldr than it is to confuse fold(Left) with foldRight.

Re: [elm-discuss] Proposal: Add Debug.breakpoint to core

2016-10-24 Thread Robin Heggelund Hansen
Elm, as great as it is, doesn't save you from debugging every once in a while. The one option we have now, is logging. Logging is great, but it can quickly become painful in loops. Since Elm compiles to a single JS file with long mangled names, setting a breakpoint from the code would sometimes

Re: [elm-discuss] tictactoe game with elm (newbie)

2016-10-24 Thread Peter Damoc
You almost got it right. Here is your program with the view altered a little bit (I've extracted the row display and the style of the cell) import Html.App as App import Html exposing (..) import Html.Attributes exposing(..) main = App.program { init = init, update = update, view = view,

Re: [elm-discuss] Re: Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-24 Thread Peter Damoc
On Mon, Oct 24, 2016 at 2:12 PM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > -1 from me. foldl and foldr are so commonly in use in other functional > languages that they are an acceptable short hand. Who cares what Scala does. > > The main target of Elm are developers

[elm-discuss] tictactoe game with elm (newbie)

2016-10-24 Thread Did
Hello there! As a newbie, and in order to learn elm, I started to write a tic tac toe game. I wanted to start by drawing the game area but I'm stuck with one thing. I decided that my area was a list of list of Box : List (List Box). A box is defined by an id and maybe a player (so that I can

Re: [elm-discuss] Structure for large Elm apps

2016-10-24 Thread Oliver Searle-Barnes
@Mark this is a pattern I've been exploring recently. An area that I haven't found a solution to is keeping the view model in sync with the shared models. For instance, let's say I have a view with a list of checkboxes next to each user. The state for the checkboxes would be kept in the view

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

2016-10-24 Thread 'Rupert Smith' via Elm Discuss
On Monday, October 24, 2016 at 1:17:30 AM UTC+1, John Kelly wrote: > > I'm coming to the sad realization that an api like this is simply not > possible: > > ``` > session = > resource "sessions" > { id = int "id" > , speaker_id = int "speaker_id" > , start_time =

[elm-discuss] Naming functions

2016-10-24 Thread Lars Jacobsson
Hey you guys! I've started to build out my first real Elm app and I'm loving it. On my model there is a field called items Model ... items : List Item ... which is a list of the type Item. Coming from a rails mindset I created an "updateItemById" -function, which I use like this

[elm-discuss] Re: Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-24 Thread 'Rupert Smith' via Elm Discuss
On Thursday, October 20, 2016 at 3:12:57 PM UTC+1, Robin Heggelund Hansen wrote: > > In Elm 0.18, primes are being removed as valid characters in a > variable/function name. The reason being, which I whole heartedly agree > with, that removing primes will incentivize people to write proper

Re: [elm-discuss] Elm GUI component library

2016-10-24 Thread António Ramos
If you prefer js and keep the ELM architecture in your code you can try Choo framework https://github.com/yoshuawuyts/choo 2016-10-24 9:14 GMT+01:00 Witold Szczerba : > I love Elm. The problem with it is that's a niche. It is now and, sadly, > it will be :( > Last

Re: [elm-discuss] Elm GUI component library

2016-10-24 Thread Witold Szczerba
I love Elm. The problem with it is that's a niche. It is now and, sadly, it will be :( Last time I used it for my pet project I was looking for tree components, so I could draw files and directories. The problem is, in Elm you are left alone. For JS there are many libraries, not only showing the