[elm-discuss] Strnage compiler error

2016-07-17 Thread Zachary Kessin
I am trying to compile this code
https://gist.github.com/zkessin/e19640130ba33099a9c209b98b012815

when I am getting this error

(line 1, column 31): unexpected "." expecting space, "&" or escape code

7| re = regex "\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b"
 ^
Maybe  can help you figure it out.


-- 
Zach Kessin
Twitter: @zkessin 
Skype: zachkessin
ᐧ

-- 
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: html formatting words in string

2016-07-17 Thread Max Goldstein
I'll jump in here and say that this is one of the things I really like 
about Elm views. Instead of needing to learn some crippled templating 
language (handlebars, JSX) you can just use all the normal list functions.

-- 
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] How do I organize "inheritance" between my data types?

2016-07-17 Thread Leonardo Sá
Those are some great suggestions. Thank you everyone!

On Sun, Jul 17, 2016 at 9:07 PM, Aaron VonderHaar 
wrote:

> To restate my previous post, I think you should spend some time
> considering whether you actually have a case where you need to write code
> that deals with both Customers and Employees, or whether you are just
> asking because you would use inheritance if you were using an OO language.
> Making a "generic" Person type won't necessarily help you because you still
> have to create all the values.  If they are coming from a database, then
> it's likely that employees and customer will be coming from different
> tables and possibly from different backend APIs.  I'd also be curious about
> what UI you are trying to implement that needs customers and employees to
> be handled in the same way.  At NoRedInk, we have several different user
> types: teachers, students and admins, but most pages in our app treat
> teachers and students completely differently in the UI, so there's no need
> for a "Person" type.  We do have an admin page that shows a list of all
> users, but for that page we have a "User" model and there's no need for the
> Teacher and Student types on that page.
>
>
> But if you do really need a Person type, if you had independent Person,
> Customer, and Employee modules with `toPerson` functions as I suggested
> before, then you can reuse any functions in the Person module with
> Customers and Employees by using function composition.  If you are still
> concerned about duplicating code, you may also choose to implement Customer
> and Employee such that `toPerson` is as simple as `toPerson customer =
> customer.person`.  I believe having small, composable functions and
> independent modules is preferable to having an interconnected system of
> types.
>
>
> Another way to consider is this:
>
> type alias Person =
> { name : String
> , address : String
> , employeeInfo : Maybe EmployeeInfo
> , customerInfo : Maybe CustomerInfo
> }
>
> (Note that modeling this way allows for a person to be both a customer and
> an employee at the same time, which may be something you need.)  This is
> similar to what you originally proposed, but I think it will probably lead
> to a bit cleaner code because you don't need `PersonType`.
>
>
> You can also use extensible records as others noted, but it's unlikely
> that you actually need that much complexity for whatever you are trying to
> do with Employees and Customers.
>
>
> On Sun, Jul 17, 2016 at 5:37 PM, Leonardo Sá  wrote:
>
>> I think the idea is that both Employees and Customers are Persons - as
>> in, they have shared fields such as name and address. So potentially we
>> could write functions that operate directly on Person without caring
>> whether the person is an employee or a customer, and we'd write functions
>> that operate directly on Employee or Customers without losing the context
>> that they are in fact Persons. Just as you'd have in OO, where Person is
>> the base class for Employee and Customer.
>>
>> Or maybe I am just too stuck on my OO ways.
>>
>> Sorry I can't provide more details (the lawyers would kill me)! That, and
>> the schema I'm trying to work with is really convoluted.
>>
>> But what it boils down to is: how does one emulates a traditional OO
>> inheritance with ADTs, in such a way that I can write functions that
>> operate on the base class, and functions that operate on child classes, and
>> it's all type safe?
>>
>> On Sunday, July 17, 2016 at 7:13:33 PM UTC-5, Aaron VonderHaar wrote:
>>>
>>> Can you give more details about what you are trying to do that requires
>>> a Person type that can be either an employee or a customer?  As you noted,
>>> `nameAndDepartment` would only apply to Employees, so why do you need to
>>> use it on Customers?  Can you simply deal with employees and customers
>>> independently?
>>>
>>> If you do really need to have a Person type, my first thought would be
>>> to have Person be an independent module, and have Employee.toPerson and
>>> Customer.toPerson.  That way all the modules can be independent w/r to the
>>> way the data is modeled and will have more stable interfaces than if you
>>> try to have a Person type that depends on both the Employee and Customer
>>> types.
>>>
>>> On Sun, Jul 17, 2016 at 4:06 PM, Leonardo Sá  wrote:
>>>
 Short question:

 What is the best way to create relationships between my types so it is
 easy to access data present in both types?

 Long question:

 Suppose I have the following types:

 type alias Person =
   { name : String
   , address : String
   , personType : PersonType
   }

 type alias Employee =
   { department : String }

 type alias Customer =
   { itemsPurchased : Int }

 type PersonType = EmployeeType Employee | CustomerType Customer

 Then I think it's not straight 

Re: [elm-discuss] How do I organize "inheritance" between my data types?

2016-07-17 Thread Aaron VonderHaar
To restate my previous post, I think you should spend some time considering
whether you actually have a case where you need to write code that deals
with both Customers and Employees, or whether you are just asking because
you would use inheritance if you were using an OO language.  Making a
"generic" Person type won't necessarily help you because you still have to
create all the values.  If they are coming from a database, then it's
likely that employees and customer will be coming from different tables and
possibly from different backend APIs.  I'd also be curious about what UI
you are trying to implement that needs customers and employees to be
handled in the same way.  At NoRedInk, we have several different user
types: teachers, students and admins, but most pages in our app treat
teachers and students completely differently in the UI, so there's no need
for a "Person" type.  We do have an admin page that shows a list of all
users, but for that page we have a "User" model and there's no need for the
Teacher and Student types on that page.


But if you do really need a Person type, if you had independent Person,
Customer, and Employee modules with `toPerson` functions as I suggested
before, then you can reuse any functions in the Person module with
Customers and Employees by using function composition.  If you are still
concerned about duplicating code, you may also choose to implement Customer
and Employee such that `toPerson` is as simple as `toPerson customer =
customer.person`.  I believe having small, composable functions and
independent modules is preferable to having an interconnected system of
types.


Another way to consider is this:

type alias Person =
{ name : String
, address : String
, employeeInfo : Maybe EmployeeInfo
, customerInfo : Maybe CustomerInfo
}

(Note that modeling this way allows for a person to be both a customer and
an employee at the same time, which may be something you need.)  This is
similar to what you originally proposed, but I think it will probably lead
to a bit cleaner code because you don't need `PersonType`.


You can also use extensible records as others noted, but it's unlikely that
you actually need that much complexity for whatever you are trying to do
with Employees and Customers.


On Sun, Jul 17, 2016 at 5:37 PM, Leonardo Sá  wrote:

> I think the idea is that both Employees and Customers are Persons - as in,
> they have shared fields such as name and address. So potentially we could
> write functions that operate directly on Person without caring whether the
> person is an employee or a customer, and we'd write functions that operate
> directly on Employee or Customers without losing the context that they are
> in fact Persons. Just as you'd have in OO, where Person is the base class
> for Employee and Customer.
>
> Or maybe I am just too stuck on my OO ways.
>
> Sorry I can't provide more details (the lawyers would kill me)! That, and
> the schema I'm trying to work with is really convoluted.
>
> But what it boils down to is: how does one emulates a traditional OO
> inheritance with ADTs, in such a way that I can write functions that
> operate on the base class, and functions that operate on child classes, and
> it's all type safe?
>
> On Sunday, July 17, 2016 at 7:13:33 PM UTC-5, Aaron VonderHaar wrote:
>>
>> Can you give more details about what you are trying to do that requires a
>> Person type that can be either an employee or a customer?  As you noted,
>> `nameAndDepartment` would only apply to Employees, so why do you need to
>> use it on Customers?  Can you simply deal with employees and customers
>> independently?
>>
>> If you do really need to have a Person type, my first thought would be to
>> have Person be an independent module, and have Employee.toPerson and
>> Customer.toPerson.  That way all the modules can be independent w/r to the
>> way the data is modeled and will have more stable interfaces than if you
>> try to have a Person type that depends on both the Employee and Customer
>> types.
>>
>> On Sun, Jul 17, 2016 at 4:06 PM, Leonardo Sá  wrote:
>>
>>> Short question:
>>>
>>> What is the best way to create relationships between my types so it is
>>> easy to access data present in both types?
>>>
>>> Long question:
>>>
>>> Suppose I have the following types:
>>>
>>> type alias Person =
>>>   { name : String
>>>   , address : String
>>>   , personType : PersonType
>>>   }
>>>
>>> type alias Employee =
>>>   { department : String }
>>>
>>> type alias Customer =
>>>   { itemsPurchased : Int }
>>>
>>> type PersonType = EmployeeType Employee | CustomerType Customer
>>>
>>> Then I think it's not straight forward to write a function that
>>> retrieves me the department and name for an employee:
>>>
>>> nameAndDepartment : Person -> (String, String)
>>>
>>> It seems to me this function would be a Maybe (String, String) and
>>> return Nothing if the Person is not an Employee. But in 

[elm-discuss] Re: How do I organize "inheritance" between my data types?

2016-07-17 Thread Max Goldstein
Aaron's solution is a good one, but since customers and employees are both 
people, you may want:

type alias Person a =
{ a | name : String
, address : String
}

type alias Employee =
Person { department : String }

type alias Customer =
Person { itemsPurchased : Int }

-- 
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: How do I organize "inheritance" between my data types?

2016-07-17 Thread Aaron PS
Hello, you might be looking for "extensible records", check this out 
http://elm-lang.org/docs/records

import Html exposing (Html, div, ul, li, text)

type alias Person a =
{ a | name : String
, address : String
}

type alias Employee a =
{ a | department : String }

type alias Customer a =
{ a | itemsPurchased : Int }

changeName : String -> Person a -> Person a
changeName newName person =
{ person | name = newName }

changeDepartment : String -> Employee a -> Employee a
changeDepartment newDepartment employee =
   { employee | department = newDepartment }

changeItemsPurchased : Int -> Customer a -> Customer a
changeItemsPurchased newItemsPurchased customer =
{ customer | itemsPurchased = newItemsPurchased }

main =
let
person = { name="person name", address="person address"}
employee = { name="employee name", address="employee address", 
department = "employee department" }
customer = { name="customer name", address="customer address", 
itemsPurchased = 42 }
in
div [] 
[ ul []
[ renderIt person
, renderIt employee
, renderIt customer
, renderIt (changeName "name changed" person)
, renderIt (changeName "name changed" employee)
, renderIt (changeName "name changed" customer)

-- , renderIt (changchangeDepartmenteName "department changed" 
person) 
, renderIt (changeDepartment "department changed" employee)
-- , renderIt (changeDepartment "department changed" customer)

-- , renderIt (changeItemsPurchased 55 person)
-- , renderIt (changeItemsPurchased 55 employee)
, renderIt (changeItemsPurchased 55 customer)
]
]


renderIt : a -> Html b
renderIt r =
li [] [text (toString r)]





On Monday, July 18, 2016 at 7:06:32 AM UTC+8, Leonardo Sá wrote:
>
> Short question:
>
> What is the best way to create relationships between my types so it is 
> easy to access data present in both types?
>
> Long question:
>
> Suppose I have the following types:
>
> type alias Person =
>   { name : String
>   , address : String
>   , personType : PersonType 
>   }
>
> type alias Employee =
>   { department : String }
>
> type alias Customer =
>   { itemsPurchased : Int }
>
> type PersonType = EmployeeType Employee | CustomerType Customer
>
> Then I think it's not straight forward to write a function that retrieves 
> me the department and name for an employee:
>
> nameAndDepartment : Person -> (String, String)
>
> It seems to me this function would be a Maybe (String, String) and return 
> Nothing if the Person is not an Employee. But in that case, I am relying on 
> the runtime to type check things for me, which tells me there is probably a 
> better way to structure this.
>
>

-- 
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] How do I organize "inheritance" between my data types?

2016-07-17 Thread Leonardo Sá
I think the idea is that both Employees and Customers are Persons - as in, 
they have shared fields such as name and address. So potentially we could 
write functions that operate directly on Person without caring whether the 
person is an employee or a customer, and we'd write functions that operate 
directly on Employee or Customers without losing the context that they are 
in fact Persons. Just as you'd have in OO, where Person is the base class 
for Employee and Customer.

Or maybe I am just too stuck on my OO ways.

Sorry I can't provide more details (the lawyers would kill me)! That, and 
the schema I'm trying to work with is really convoluted.

But what it boils down to is: how does one emulates a traditional OO 
inheritance with ADTs, in such a way that I can write functions that 
operate on the base class, and functions that operate on child classes, and 
it's all type safe?

On Sunday, July 17, 2016 at 7:13:33 PM UTC-5, Aaron VonderHaar wrote:
>
> Can you give more details about what you are trying to do that requires a 
> Person type that can be either an employee or a customer?  As you noted, 
> `nameAndDepartment` would only apply to Employees, so why do you need to 
> use it on Customers?  Can you simply deal with employees and customers 
> independently?
>
> If you do really need to have a Person type, my first thought would be to 
> have Person be an independent module, and have Employee.toPerson and 
> Customer.toPerson.  That way all the modules can be independent w/r to the 
> way the data is modeled and will have more stable interfaces than if you 
> try to have a Person type that depends on both the Employee and Customer 
> types.
>
> On Sun, Jul 17, 2016 at 4:06 PM, Leonardo Sá  > wrote:
>
>> Short question:
>>
>> What is the best way to create relationships between my types so it is 
>> easy to access data present in both types?
>>
>> Long question:
>>
>> Suppose I have the following types:
>>
>> type alias Person =
>>   { name : String
>>   , address : String
>>   , personType : PersonType 
>>   }
>>
>> type alias Employee =
>>   { department : String }
>>
>> type alias Customer =
>>   { itemsPurchased : Int }
>>
>> type PersonType = EmployeeType Employee | CustomerType Customer
>>
>> Then I think it's not straight forward to write a function that retrieves 
>> me the department and name for an employee:
>>
>> nameAndDepartment : Person -> (String, String)
>>
>> It seems to me this function would be a Maybe (String, String) and return 
>> Nothing if the Person is not an Employee. But in that case, I am relying on 
>> the runtime to type check things for me, which tells me there is probably a 
>> better way to structure this.
>>
>> -- 
>> 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...@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.


Re: [elm-discuss] How do I organize "inheritance" between my data types?

2016-07-17 Thread Aaron VonderHaar
Can you give more details about what you are trying to do that requires a
Person type that can be either an employee or a customer?  As you noted,
`nameAndDepartment` would only apply to Employees, so why do you need to
use it on Customers?  Can you simply deal with employees and customers
independently?

If you do really need to have a Person type, my first thought would be to
have Person be an independent module, and have Employee.toPerson and
Customer.toPerson.  That way all the modules can be independent w/r to the
way the data is modeled and will have more stable interfaces than if you
try to have a Person type that depends on both the Employee and Customer
types.

On Sun, Jul 17, 2016 at 4:06 PM, Leonardo Sá  wrote:

> Short question:
>
> What is the best way to create relationships between my types so it is
> easy to access data present in both types?
>
> Long question:
>
> Suppose I have the following types:
>
> type alias Person =
>   { name : String
>   , address : String
>   , personType : PersonType
>   }
>
> type alias Employee =
>   { department : String }
>
> type alias Customer =
>   { itemsPurchased : Int }
>
> type PersonType = EmployeeType Employee | CustomerType Customer
>
> Then I think it's not straight forward to write a function that retrieves
> me the department and name for an employee:
>
> nameAndDepartment : Person -> (String, String)
>
> It seems to me this function would be a Maybe (String, String) and return
> Nothing if the Person is not an Employee. But in that case, I am relying on
> the runtime to type check things for me, which tells me there is probably a
> better way to structure this.
>
> --
> 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.


Re: [elm-discuss] Writing tests on elm-lang/html data structures

2016-07-17 Thread Noah Hall
Yep, if you want to use karma

On Sun, Jul 17, 2016 at 6:40 PM, Conrad Dean  wrote:
> By that do you mean write the test suite in JS and call elm with ports?
>
> On Sat, Jul 16, 2016 at 5:22 PM, Noah Hall  wrote:
>>
>> It has a native function to grab the internal node representation, so
>> you'll have to clone it and replace some of the refereneces to instead
>> talk about your package name.
>>
>> One caveat is that I don't remember if it works with Markdown right
>> now, since Markdown uses a custom renderer which has a different
>> internal representation.
>>
>> You might be better off writing tests using karma or something for
>> now, actually. Or just implement the representation of the call to the
>> markdown renderer.
>>
>> On Sat, Jul 16, 2016 at 11:04 PM, Conrad Dean 
>> wrote:
>> > oh this looks great!  how do i install/vendor it?
>> >
>> > On Sat, Jul 16, 2016 at 4:49 PM, Noah Hall  wrote:
>> >>
>> >> We've been using this ->
>> >> https://github.com/eeue56/elm-server-side-renderer for testing that in
>> >> 0.17.
>> >>
>> >>
>> >> On Saturday, July 16, 2016, Conrad Dean 
>> >> wrote:
>> >>>
>> >>> I want to write tests for https://github.com/evancz/elm-markdown , but
>> >>> I'm having problems comparing Html objects.
>> >>>
>> >>> There's something about the internals of a VirtualDom/Html object that
>> >>> are preventing me from testing if two html nodes are equal and I was
>> >>> wondering if someone could get me up to speed with how to strip that
>> >>> stuff
>> >>> out so that I'm just comparing either the raw HTML strings, or more
>> >>> basic
>> >>> Html type objects.
>> >>>
>> >>> Here's my test and error message from running my ElmTest suite:
>> >>>
>> >>> module MarkdownSpec exposing (all)
>> >>>
>> >>> import ElmTest exposing (..)
>> >>>
>> >>> import Html exposing (Html, Attribute)
>> >>> import Markdown exposing (toHtml)
>> >>>
>> >>> all : Test
>> >>> all =
>> >>> suite "MAKR DOEN"
>> >>> , test "simple html"
>> >>> <| assertHtmlEqual (Html.text "sup") (Html.text "sup")
>> >>> , test "basic MD"
>> >>> <| assertHtmlEqual (toHtml [] "sup") (Html.text "sup")
>> >>> ]
>> >>>
>> >>> assertHtmlEqual: Html msg -> Html msg -> Assertion
>> >>> assertHtmlEqual a b = assertEqual a b
>> >>>
>> >>>
>> >>> Error:
>> >>>
>> >>> $ elm make test/TestRunner.elm --output _build/test.js && node
>> >>> _build/test.js
>> >>> Success! Compiled 2 modules.
>> >>> Successfully generated _build/test.js
>> >>> /Users/conrad/dev/foss/elm/elm-markdown/_build/test.js:567
>> >>> throw new Error(
>> >>> ^
>> >>>
>> >>> Error: Ran into a `Debug.crash` in module `ElmTest.Runner.Console`
>> >>>
>> >>> This was caused by the `case` expression between lines 28 and 33.
>> >>> One of the branches ended with a crash and the following value got
>> >>> through:
>> >>>
>> >>> False
>> >>>
>> >>> The message provided by the code author is:
>> >>>
>> >>>   3 suites run, containing 5 tests
>> >>>   1 suites and 4 tests passed
>> >>>   2 suites and 1 tests failed
>> >>>
>> >>> Test Suite: very tests: FAILED
>> >>>   Test Suite: A Test Suite: all tests passed
>> >>>   Test Suite: MAKR DOEN: FAILED
>> >>> Addition: passed.
>> >>> simple html: passed.
>> >>> basic MD: FAILED. Expected: { type = "custom", facts = {}, model =
>> >>> {
>> >>> options = { githubFlavored = Just { tables = False, breaks = False },
>> >>> defaultHighlighting = Nothing, sanitize = False, smartypants = False
>> >>> },
>> >>> markdown = "sup" }, impl = { render = , diff =
>> >>>  } }; got: { type = "text", text = "sup" }
>> >>> at /Users/conrad/dev/foss/elm/elm-markdown/_build/test.js:567:9
>> >>> at _elm_community$elm_test$ElmTest_Runner_Console$runDisplay
>> >>> (/Users/conrad/dev/foss/elm/elm-markdown/_build/test.js:7778:9)
>> >>> at _elm_community$elm_test$ElmTest_Runner_Console$runSuite
>> >>> (/Users/conrad/dev/foss/elm/elm-markdown/_build/test.js:7793:11)
>> >>> at Object.
>> >>> (/Users/conrad/dev/foss/elm/elm-markdown/_build/test.js:8061:8)
>> >>> at Object.
>> >>> (/Users/conrad/dev/foss/elm/elm-markdown/_build/test.js:8096:4)
>> >>> at Module._compile (module.js:435:26)
>> >>> at Object.Module._extensions..js (module.js:442:10)
>> >>> at Module.load (module.js:356:32)
>> >>> at Function.Module._load (module.js:311:12)
>> >>> at Function.Module.runMain (module.js:467:10)
>> >>>
>> >>>
>> >>> --
>> >>> 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 

Re: [elm-discuss] Trying to understand the community overlap between Elm and Elixir

2016-07-17 Thread John Orford
My feeling is that their conception was at about the same time and had
broadly the same goals.

I.e. make complicated programs sane.

On top of that, I see the adopters being similar.

Those who are looking for a better way and open to new ideas.

I agree with you.

Elm has many nice features that Elixir does not. Until we can run Elm on
the BEAM Elixir is probably the way to go server-side : )

On Sun, 17 Jul 2016 at 15:56 Charlie Koster  wrote:

> For those of you who learned Elm before learning Elixir can you describe
> the appeal of Elixir from an Elm dev standpoint? I'm having trouble finding
> appealing similarities between the two.
>
> While there are some similarities to be found, Elixir doesn't appear to
> have a lot of what makes Elm great. For example, Elixir is dynamically
> typed, uses impure functions, has try-catch, and has other language
> constructs that remind me why I prefer Elm over Javascript.
>
> Can someone help clarify why Elixir is appealing to Elm developers
> specifically (as opposed to Elixir being appealing on its own merits)?
>
> --
> 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] Trying to understand the community overlap between Elm and Elixir

2016-07-17 Thread Charlie Koster
For those of you who learned Elm before learning Elixir can you describe 
the appeal of Elixir from an Elm dev standpoint? I'm having trouble finding 
appealing similarities between the two.

While there are some similarities to be found, Elixir doesn't appear to 
have a lot of what makes Elm great. For example, Elixir is dynamically 
typed, uses impure functions, has try-catch, and has other language 
constructs that remind me why I prefer Elm over Javascript.

Can someone help clarify why Elixir is appealing to Elm developers 
specifically (as opposed to Elixir being appealing on its own merits)?

-- 
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: html formatting words in string

2016-07-17 Thread Rex van der Spuy
Hi, what's the bigger picture that you're trying to accomplish?
Have you looked at Elm's Markdown package?

http://package.elm-lang.org/packages/evancz/elm-markdown/3.0.0/

Markdown will format any words surrounded by double asterisks as bold text, 
like this: **this is bold**


-- 
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] Fingertree used to make priority queue and deque

2016-07-17 Thread Matt Heath
I absolutely do need to document that. That's just a mistake. Thanks for
spotting it

On 16 July 2016 at 19:32, Nick H  wrote:

> Thank you for sharing!
>
> I think it would be worth the trouble of fleshing out the documentation a
> bit. For instance, it's not clear what a Monoid is. It appears that you
> need a Monoid to construct an AnnotatedFingerTree, but there's no
> indication of how to construct a Monoid. Some example code of how to use
> the library would be a big help!
>
> On Fri, Jul 15, 2016 at 8:42 AM, Matthew Heath <
> matthew.john.he...@gmail.com> wrote:
>
>> I have made a fingertree package
>> 
>>  and
>> used it to make a persistent priority queue and a deque with random acces.
>> I hope these are of use to someone
>>
>> --
>> 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 a topic in the
> Google Groups "Elm Discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elm-discuss/eNlJ2W-EBms/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Heath,
http://mattheath.wordpress.com

-- 
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.