Re: [elm-discuss] Re: Post Examples of Painful Record Updates Here!

2017-03-10 Thread 'Andrew Radford' via Elm Discuss
Great post Mark - I've been working on a project lately and setters are fast becoming my #1 pain. I can relate to every one of those points you outlined, and you said it better than I could. On Thursday, March 9, 2017 at 11:09:22 PM UTC, Mark Hamburg wrote: > > I got asked for non obfuscated/si

[elm-discuss] Re: elm + reactive programming

2017-03-10 Thread 'Andrew Radford' via Elm Discuss
I think the double-click / swipe examples are actually the things that need addressing. Throttling events from the DOM is a hard thing to do in TEA, is a very common requirement, and the transient state of the throttling operation (i.e setting/resetting timers) is not of interest to the model at

[elm-discuss] Re: Again: which editor do you like best for Elm?

2017-02-02 Thread 'Andrew Radford' via Elm Discuss
Try elmjutsu if you haven't already. On Thursday, 2 February 2017 16:53:59 UTC, Rupert Smith wrote: > > I'm currently using Atom. > > I see lots of new features are getting added to the Light-Table plug in > though... (Right now I want to be able to preview wha

Re: [elm-discuss] elm-lang/http and evancz/elm-http

2017-01-30 Thread 'Andrew Radford' via Elm Discuss
This sort of thing happens a lot (that and re-naming like elm-linear-algebra to just linear-algebra). bit of a trap for new users. I wonder if there is a formal way to leave a trail to the superseding package. The old packages usually still get a lot of hits from Google and references from proj

[elm-discuss] Re: [early prototype] Elm-Data: a server loading code generator

2017-01-19 Thread 'Andrew Radford' via Elm Discuss
FYI https://github.com/ahultgren/swagger-elm still a work in progress though AFAIK. > > >> Another possibility would be to use an API description meta-data such as >> Swagger. A Swagger codegen for Elm could easily output something useable. >> > > I've used both Swagger and JSON API before,

Re: [elm-discuss] Re: Guidance for using "type alias" vs. single-constructor union types

2017-01-16 Thread 'Andrew Radford' via Elm Discuss
+1, One of those awesome features in F# that does not seem to be that widely known. > > I believe F# also does this quite well: > > https://fsharpforfunandprofit.com/posts/units-of-measure/ > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. T

Re: [elm-discuss] Re: Feature: 'where' expressions (continued from GitHub)

2017-01-04 Thread 'Andrew Radford' via Elm Discuss
Gotcha. Presumably there would have to be an Elm flavor of it, which may not work the same way but kept the core concept of being an 'let..in' the other way up. I have a feeling that 'where' would clarify a lot of my code. But I also have a feeling I'll never see it in Elm. On Wednesday, 4 Ja

Re: [elm-discuss] Re: Feature: 'where' expressions (continued from GitHub)

2017-01-04 Thread 'Andrew Radford' via Elm Discuss
Heh ok read it again I'll make it more programmer friendly: ( |> and <| ) and ( >> and << ) They (each) have identical behavior in what they do, with a left/right symmetry. (I guess you just confirmed it is the same for let/where, with a top/bottom symmetry) On Wednesday, 4 January 2017 20:

[elm-discuss] Re: Feature: 'where' expressions (continued from GitHub)

2017-01-04 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Colin, Thanks for this comprehensive post - very well thought out and reasonably considered TIL about 'where' - wow so much awesome stuff is in Haskell. Let...in now seems to be upside down! 'Where' seems to closer suit describing *ideas* like you would in Plain English: Kinetic Energy is:

[elm-discuss] Re: Game entities design question

2017-01-04 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Martin are there any pros/cons to using extensible records for the game entities? i.e closer conceptually to an OOP model where an entity might inherit Collision/Physics properties from a common base class? Andrew >> -- You received this message because you are subscribed to the Google Group

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-22 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I don’t >>>> think it’s >>>> > arbitrary though from an accessibility point of view. Some or None is >>>> easier >>>> > for newcomers to understand than Just or Nothing, especially as Some >>>> isn’t >>>> > misleadi

Re: [elm-discuss] Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Probably inherited from Haskell, like a lot of other stuff. Doubt if there was any other thought put into it if I'm honest. On Monday, 21 November 2016 14:46:40 UTC, Will White wrote: > > Sorry, meant to say “I guess he’s already considered and rejected them”. > > On 21 Nov 2016, at 14:21, Will W

[elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-21 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I dunno - I don't find either a clear winner over the other; years ago when I came across 'Just' I was a little confused because it's not strictly the opposite of 'nothing' when used in spoken English, it's normally used to also express there is a limitation at work, in the presence of a greater

[elm-discuss] Re: Rename Just to Something, as the counterpart to Nothing?

2016-11-20 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
"Something 2" ? I think the popular choices are Some/None and Just/Nothing. I wonder if there are any other better versions out there... On Sunday, 20 November 2016 17:18:17 UTC, Will White wrote: > > What's strange is that "Just 2" makes it sound lik

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-15 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I agree with you there. I'm just pointing out that calling this a community decision is misrepresenting things. On Tuesday, 15 November 2016 21:04:27 UTC, Duane Johnson wrote: > > > On Tue, Nov 15, 2016 at 1:23 PM, 'Andrew Radford' via Elm Discuss < > elm-d...@goo

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-15 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
No, it wasn't. Some parts of the community were aware of it, but calling it a community decision is overstating it. On Tuesday, 15 November 2016 15:30:52 UTC, Robin Heggelund Hansen wrote: > > This was very much a community decision > -- You received this message because you are subscribed t

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-15 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I don't think flippantly dismissing anyone who abandons Elm as having a tenuous connection is fair. A lot of existing users, especially long time users who when they started, may have done so because of the 'niceties' like this, and they are now being slowly eroded. Maybe you could say they ar

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-15 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I'd agree with all that - but it was also trivially achievable in 0.17. Make no mistake, this is a *reduction* of the Elm language, the gamble being that it will result in more new users moving to and sticking with Elm, than existing users bailing in favour of some other alternative. I suspect

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-15 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Lists are pretty core, I don't really have a problem with short expressive syntax that reads well. 'Well' meaning closer to reading like English. i.e I'd never say "I'll drink Bourbon on the range of days from 1 to 3, then Scotch on the days that range from day 4 to day 7". No way, it's just "B

Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-13 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Not really, with familiar symbols, you can construct very unreadable things. On Sunday, 13 November 2016 22:32:12 UTC, Francesco Orsenigo wrote: > > What do you mean with "suits best"? > Readability is largely a matter of familiarity. > -- You received this message because you are subscribed

[elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-13 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Simply cause then I can use whichever one suits best, makes the code more readable etc On Sunday, 13 November 2016 21:47:17 UTC, Francesco Orsenigo wrote: > > > Why would you want two different (and entirely equivalent) solutions to > the same problem? > > > On Monday, November 14, 2016 at 8:37

[elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-13 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Yeah It would be great if there was [x..y] and Range On Sunday, 13 November 2016 19:04:52 UTC, Robin Heggelund Hansen wrote: > > Fixing the docs could of course be done, and you're right, it's not > something that's hard to understand. However, the question you should be > asking is "is there an

Re: [elm-discuss] Re: Is Elm really wrong?

2016-11-10 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
On Thursday, 10 November 2016 20:49:08 UTC, Max Goldstein wrote: > > What I meant was, Elm needs to choose differently from Haskell, at least > some of the time, or else there wouldn't be a reason for it to exist. And, > what seems weak and limited to one person can seem friendly and > easy-to-

Re: [elm-discuss] Re: Is Elm really wrong?

2016-11-10 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
On Thursday, 10 November 2016 19:01:38 UTC, Janis Voigtländer wrote: > > > "We" means the Elm community. > > > I disagree with the first sentence, then. "That the Elm community is > pissing off Haskellers is good" is not something I agree to. > Neither do I. Or for that matter "...for JS devel

Re: [elm-discuss] Re: Is Elm really wrong?

2016-11-10 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
+1 This really is a challenge for Evan. Being a BDFL probably is *really* hard. Especially convincing people of the 'B' part! In practice this means explaining language decisions to newcomers in a way that does not appear like a slap-down, and reining in the the 'lieutenants' (as you say) who

Re: [elm-discuss] why no more primes on 0.18 ?

2016-10-26 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Yeah but it does beg the question whether type'' should become type__ and of course suggesting a possible hell scenario when this goes further: type__, type___, type ?! Or, is that considered a code smell anyway so it should not be catered for? On Wednesday, 26 October 2016 12:29:10 UTC+

Re: [elm-discuss] why no more primes on 0.18 ?

2016-10-26 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Yeah comparing underscore length seems inferior to counting back ticks.. Maybe that was the idea? to discourage the use of double/triple primes etc and steer people to a more point free style? The 0.18 migration guidance does not mention anything like that though On Sunday, 23 October 2016 18:

[elm-discuss] Re: zip function in the standard library

2016-10-26 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I Had that reaction at first also, however I don't mind so much now cause you do see map2 appear in other core packages (e.g Task), so the change must be for consistency. Much as I dislike function names with numbers in them like 'map2', 'zip' doesn't work well everywhere. In other words, it

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

2016-10-25 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
As people pointed out - it's a BDFL call, but it feels to me that this is the closest candidate to the spirit of the recent 'Let's go mainstream' BDFL calls. (Assuming that foldRight is sufficiently less commonly used so as to not make the ample suffix 'Right' burdensome, and the lack of suffix

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

2016-10-20 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Changes like this I think make sense if it is part of a more general effort - i.e 'Elm is going to be known as the language with proper function names"i.e it sounds like a BDFL call. Has that every been stated by Evan or is it just something that appears to be in the same line of thinking as re

Re: [elm-discuss] Re: Pattern matching functions

2016-10-08 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Well the idea is to add a *different* keyword to make a function, using similar syntax to case/of . As above, you can see F# uses the 'function' keyword, which TBH I'm not huge fan of, it's really hard to google. Elm already has syntax of convenience like this, for example instead of having t

[elm-discuss] Pattern matching functions

2016-10-08 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
In F# there are pattern matching case/of statements can be written as functions, which is handy for composing with other functions, piping with |> etc: let foo1 x = match x with | 1 -> "one" | _ -> "not one" let foo2 = function | 1 -> "one" | _ -> "not one" Has there bee

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

2016-10-05 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
On Wednesday, 5 October 2016 01:55:40 UTC+1, Max Goldstein wrote: > > >> they start to *resemble *OO/imperitive style variable assignments >> > > But they're not. You can't assign to the same value more than once. You > can actually have some values before the *in* depend on others, but you > c

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

2016-10-04 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I've been trying out Elm, and although I have a little functional programming experience from F#, mostly I have used OO languages. With my experiments in Elm, I have found sometimes I end up with something like this foofunction model = let something = foo bar baz somethingElse = foo

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

2016-10-04 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
I'm also using this, but one thing that I can't figure out is how to copy code to the elm repl. Never works if you copy more than one line... Would love to see a matrix of capabilities for common editors, covering things like * Intellisense * Send to Repl * Go to definition * Rename Refactor *

[elm-discuss] Re: Is a decoder the right level of abstraction for parsing JSON?

2016-10-01 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Not sure if it has been mentioned but there is this effort to create decoders from swagger definitions: https://github.com/ahultgren/swagger-elm Still a work in progress, but looks promising. > > A tool that would really help me right now would be a json-schema-to-elm > converter. > > --

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

2016-09-25 Thread &#x27;Andrew Radford&#x27; 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 be

[elm-discuss] Task mapError vs Result formatError

2016-09-21 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
They seem like pretty much the same concept. Any reason for the difference in name? Andrew -- 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+unsubscr.

[elm-discuss] Moving from RX to Elm - beginner program structure advice needed

2016-09-13 Thread &#x27;Andrew Radford&#x27; via Elm Discuss
Hi there, I'm learning Elm, coming from a background of creating 'Reactive' GUIs with RX and C#. The first thing I'm trying to code in elm is a 'real time text search', where the user types in the text input, and as he types HTTP requests are created. When the latest request returns with the r