[elm-discuss] Re: Convincing my team that Elm isn't just going to die like CoffeeScript

2016-11-12 Thread Michael B
I just released http://elmalytics.xyz, which has some statistics on Elm 
usage (particularly in Github open source projects)

As you can see, the number of contributions continues to grow nearly 
exponentially. I don't think Elm is going away any time very soon :)

On Sunday, November 6, 2016 at 9:01:42 AM UTC+11, Zacqary Adam Xeper wrote:
>
> Hey Elmos,
>
> I've finally gotten an opportunity to pitch Elm to my fairly large dev 
> team. I feel like I'm prepared to make the case for it against a lot of 
> objections: i.e. how will we learn yet another programming language, do we 
> really need something that never throws exceptions, etc. etc.
>
> The one thing I'm not really sure I'm prepared to answer is how I can be 
> sure that Elm isn't just another CoffeeScript or Dart, and in 2 or 3 years 
> we'll have an impossible time hiring anyone who knows how to use it because 
> everyone's going to go back to JavaScript.
>
> How do I convince Elm skeptics that this thing is here to stay? I can do a 
> great job of incorporating a small bit of Elm code into our stack to show 
> how great it is, but they won't even let me merge it into prod unless I can 
> make the case for its longevity.
>
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Re: Convincing my team that Elm isn't just going to die like CoffeeScript

2016-11-12 Thread Michael B
I just released http://elmalytics.xyz, which has some statistics on Elm 
usage (particularly in Github open source projects)

As you can see, the number of contributions continues to grow nearly 
exponentially. I don't think Elm is going away any time very soon :)

On Thursday, November 10, 2016 at 9:58:04 PM UTC+11, Rupert Smith wrote:
>
> On Wednesday, November 9, 2016 at 4:02:42 PM UTC, OvermindDL1 wrote:
>>
>> In my opinion Elm really needs to have a smooth integration with 
>> webcomponents.  A webcomponent is a very small unit, something elm fits 
>> fantastically in, has two way data-binding up/down the DOM stack, and 
>> getting built-in to browsers (Chrome is about the only one with near-full 
>> support though, but it is coming in others).  It is something that Elm 
>> would fit fantastically in if we could somehow get information *out* of a 
>> webcomponent, right now elm can only put information 'in'.  A binding to 
>> the HTML5 Observer API being transformed into Elm Messages would be about 
>> perfect.
>>
>
> Lets take this to a new thread. I guess you read the previous thread on 
> Elm/Polymer integration? I suggested 3 ways forward, one of which was 
> language/framework changes to Elm to enable encapsulation of state and 
> defining a message in/out interface to an Elm program, so that an Elm 
> program can be encapsulated as a webcomponent. But I am pretty vague on the 
> details of that, so if you are interested lets take a new thread and try 
> and work out what that might look like in a bit more concrete detail? 
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-11-12 Thread Joey Eremondi
>
> it's also not as flexible as a regular function
>

For example, if you want the range [0 .. n] for n in [0 .. k]:

Old syntax:
  map (\x -> [0 .. x]) [0 .. k]
New syntax:
  map (Range 0) (Range 0 k)

Not much savings in terms of length, but one less lambda, since it turns
into a partial application.

One of the main goals of elm is simplicity: with a small core of features
that are easy for someone to learn. It's much easier to learn all of Elm
than all of Haskell, Java, C#, or even JS. So when we can make the language
smaller with virtually no harm, we do.

There's nothing special about ranges, so they don't get special treatment.
They were there probably only as a leftover from Haskell, and many of those
leftovers have already been removed (i.e. $ and . replaced with <| and <<)
.

On Sat, Nov 12, 2016 at 6:01 PM, Robin Heggelund Hansen <
skinney...@gmail.com> wrote:

> I remember Evan said that range syntax was one of the things he was asked
> most about from new coders. Not only "what's this?" but also "how do I make
> a range, I couldn't find anything in the documentation."
>
> Then one comes to realize that there are other problems with range syntax.
> In addition to being more syntax to learn, and harder to discover through
> documentation, it's also not as flexible as a regular function. Then you
> also have to ask yourself if you use ranges enough that it actually
> warrants its own syntax.
>
> søndag 13. november 2016 00.53.05 UTC+1 skrev أحمد حبنكة følgende:
>>
>> I was reading the elm-dev list and I knew that elm 0.18 removed the range
>> syntax, so code like this :
>> [2..3]
>> won't work anymore.
>>
>> I want to know what are the foundations behind this decision ?
>>
>> --
> 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...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Split a list into a list of lists with a comparator

2016-11-12 Thread John Kelly
import Html exposing (text)




splitWith fn list = 
  List.foldr 
  (\next total -> 
case total of 
  [] -> 
if fn next then 
  []
else
  [next] :: total
  first :: rest -> 
if fn next then 
  [] :: total
else
  (next :: first) :: rest
  )
  []
  list




main =
  [1,2,3]
|> splitWith ((==) 2)
|> toString 
|> text

Hey! Just wanted to post my solution (let me know if there is a bug!). 
Thanks for the fun problem :)



On Saturday, November 12, 2016 at 5:46:53 PM UTC-8, Laurence Roberts wrote:
>
> How would you write this function:
>
> splitWith : (a -> Bool) -> List a -> List (List a)
>
> such that this is true:
>
> splitWith (\x -> x == 2) [1,2,3,4,2,5,6,7] == [[1],[3,4],[5,6,7]]
>
> It's clear how to would do it in non-FP but I'm struggling to visualise it 
> in FP, it's been a little while since I've done any.
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Split a list into a list of lists with a comparator

2016-11-12 Thread Joey Eremondi
So, to be clear, you want to remove, and split on, any element that
satisfies the predicate?

How's this?

splitWith : (a -> Bool) -> List a -> List (List a)
splitWith =
  let
helper accum current f lst =
  case lst of
[] ->
  accum
(first :: rest) ->
  if (f first) then
helper (accum ++ [current]) [] f rest
  else
helper accum (current ++ [first]) f rest
  in
helper [] []

On Sat, Nov 12, 2016 at 5:46 PM, Laurence Roberts 
wrote:

> How would you write this function:
>
> splitWith : (a -> Bool) -> List a -> List (List a)
>
> such that this is true:
>
> splitWith (\x -> x == 2) [1,2,3,4,2,5,6,7] == [[1],[3,4],[5,6,7]]
>
> It's clear how to would do it in non-FP but I'm struggling to visualise it
> in FP, it's been a little while since I've done any.
>
> --
> 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...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Parallelism support in Elm

2016-11-12 Thread Robin Heggelund Hansen
What would you use it for?

søndag 13. november 2016 00.53.05 UTC+1 skrev أحمد حبنكة følgende:
>
> according to this 
>  
> question, 
> Elm doesn't support parallelism yet.  
>
>
> I know that right now the idiomatic way in JS (and in result Elm) is to do 
> concurrency instead of parallelism but I think in the future web workers 
> might become as idiomatic as AJAX or Promises.  
>
> Given that JS does now support it via web workers, I was wondering what 
> are the plans for adding Parallelism to Elm ?
>
>
>
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-11-12 Thread Robin Heggelund Hansen
I remember Evan said that range syntax was one of the things he was asked 
most about from new coders. Not only "what's this?" but also "how do I make 
a range, I couldn't find anything in the documentation."

Then one comes to realize that there are other problems with range syntax. 
In addition to being more syntax to learn, and harder to discover through 
documentation, it's also not as flexible as a regular function. Then you 
also have to ask yourself if you use ranges enough that it actually 
warrants its own syntax.

søndag 13. november 2016 00.53.05 UTC+1 skrev أحمد حبنكة følgende:
>
> I was reading the elm-dev list and I knew that elm 0.18 removed the range 
> syntax, so code like this : 
> [2..3]
> won't work anymore.
>
> I want to know what are the foundations behind this decision ?
>
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-11-12 Thread أحمد حبنكة
I was reading the elm-dev list and I knew that elm 0.18 removed the range 
syntax, so code like this : 
[2..3]
won't work anymore.

I want to know what are the foundations behind this decision ?

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Parallelism support in Elm

2016-11-12 Thread أحمد حبنكة
according to this 
 
question, 
Elm doesn't support parallelism yet.  


I know that right now the idiomatic way in JS (and in result Elm) is to do 
concurrency instead of parallelism but I think in the future web workers 
might become as idiomatic as AJAX or Promises.  

Given that JS does now support it via web workers, I was wondering what are 
the plans for adding Parallelism to Elm ?



-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.