[elm-discuss] elm-make commands fails on Freebsd while working on MacOS

2017-11-27 Thread Julien Wazné


Hello,


I've having a problem to compile ELM code on Freebsd server while 
everything is OK on my laptop (MacOS Sierra).


Here's the command that fails on freebsd : elm-make --yes --output 
../static/vendor/app.js App.elm


The error message is :



> *I cannot find module 'Users.Model'.*
> *Module 'Types' is trying to import it.*
> *Potential problems could be:*
> ** Misspelled the module name*** Need to add a source directory or new 
> dependency to elm-package.json*


Application structure looks like this:
[image: image] 


users/Model.elm starts like this:
module Users.Model exposing (..)


Types.elm starts like this:
module Types exposing (..)

import Users.Model exposing (..)


elm-package.json like this:
{
"version": "1.0.0",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/user/project.git;,
"license": "BSD3",
"source-directories": [
"."
],
"exposed-modules": [],
"dependencies": {
...
},
"elm-version": "0.18.0 <= v < 0.19.0"
}


I've installed ELM on freebsd using the following commands:
*as root*
$ pkg install ghc hs-cabal-install
*Change Path to 
PATH="$PATH:/usr/local/elm/Elm-Platform/0.18/.cabal-sandbox/bin"*


$ curl 
https://raw.githubusercontent.com/elm-lang/elm-platform/master/installers/BuildFromSource.hs
 > 
BuildFromSource.hs


$ runhaskell BuildFromSource.hs 0.18


Any help would be appreciated.


Thks !

-- 
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: Randoms as LazyLists

2017-11-27 Thread Mark Hamburg
My bad. Cyclic generator not decoder. Recursive decoders have the same issues.

Mark

> On Nov 27, 2017, at 8:45 AM, 'Rupert Smith' via Elm Discuss 
>  wrote:
> 
>> On Monday, November 27, 2017 at 4:33:57 PM UTC, Mark Hamburg wrote:
>> That page already has an example built using the decoder APIs so unless 
>> something is changing to disallow the creation of such cyclic decoders, 
>> cycles remain. 
> 
> I'm looking at the page. I don't see a cyclic example built with the Decoder 
> API. What am I missing? 
> -- 
> 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] How to enforce Elm to recreate HTML tags instead of reusing existing tags?

2017-11-27 Thread Kadzuya OKAMOTO
This is what I wanted.
Thanks very much!

2017/11/28 午前2:25 "Peter Damoc" :

> Use Html.Keyed for managing the troublesome kids.
>
> Here is your example adapted based on your feedback that it is the age
> field that's the problem.
> https://ellie-app.com/czbx9WRyDa1/0
>
>
>
> On Mon, Nov 27, 2017 at 7:12 PM, Kadzuya OKAMOTO 
> wrote:
>
>> Here is an example app to explain this problem.
>> https://ellie-app.com/c5X3fGFPha1/1
>>
>> In this example, a popup window flashes unexpectedly when "Tab B" is
>> clicked.
>> The reason why this occurs, I guess, is bellow.
>>
>> * "Tab B" is clicked
>> * Elm tries to reuse HTML tag (in this case the tag of the age field).
>> * It causes `addAttribute("aria-hidden", "true")` on the tag
>> * CSS transition fires because `aria-hidden` attribute was changed
>>
>> To prevent this unexpected phenomenon, I'm looking for a way to prohibit
>> Elm to reuse existing tags.
>> Is any workaround for this?
>> Or is my hypothesis above wrong?
>>
>> I believe this is a usual requirement especially when we use
>> `elm-lang/navigation` package to realize SPA routing.
>>
>> --
>> 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.
>>
>
>
>
> --
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>
> --
> 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/RwYF8CAdMWA/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.
>

-- 
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 to enforce Elm to recreate HTML tags instead of reusing existing tags?

2017-11-27 Thread Peter Damoc
Use Html.Keyed for managing the troublesome kids.

Here is your example adapted based on your feedback that it is the age
field that's the problem.
https://ellie-app.com/czbx9WRyDa1/0



On Mon, Nov 27, 2017 at 7:12 PM, Kadzuya OKAMOTO 
wrote:

> Here is an example app to explain this problem.
> https://ellie-app.com/c5X3fGFPha1/1
>
> In this example, a popup window flashes unexpectedly when "Tab B" is
> clicked.
> The reason why this occurs, I guess, is bellow.
>
> * "Tab B" is clicked
> * Elm tries to reuse HTML tag (in this case the tag of the age field).
> * It causes `addAttribute("aria-hidden", "true")` on the tag
> * CSS transition fires because `aria-hidden` attribute was changed
>
> To prevent this unexpected phenomenon, I'm looking for a way to prohibit
> Elm to reuse existing tags.
> Is any workaround for this?
> Or is my hypothesis above wrong?
>
> I believe this is a usual requirement especially when we use
> `elm-lang/navigation` package to realize SPA routing.
>
> --
> 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.
>



-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

-- 
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] How to enforce Elm to recreate HTML tags instead of reusing existing tags?

2017-11-27 Thread Kadzuya OKAMOTO
Here is an example app to explain this problem.
https://ellie-app.com/c5X3fGFPha1/1

In this example, a popup window flashes unexpectedly when "Tab B" is 
clicked.
The reason why this occurs, I guess, is bellow.

* "Tab B" is clicked
* Elm tries to reuse HTML tag (in this case the tag of the age field).
* It causes `addAttribute("aria-hidden", "true")` on the tag
* CSS transition fires because `aria-hidden` attribute was changed

To prevent this unexpected phenomenon, I'm looking for a way to prohibit 
Elm to reuse existing tags.
Is any workaround for this?
Or is my hypothesis above wrong?

I believe this is a usual requirement especially when we use 
`elm-lang/navigation` package to realize SPA routing.

-- 
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: Randoms as LazyLists

2017-11-27 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 27, 2017 at 4:33:57 PM UTC, Mark Hamburg wrote:
>
> That page already has an example built using the decoder APIs so unless 
> something is changing to disallow the creation of such cyclic decoders, 
> cycles remain. 
>

I'm looking at the page. I don't see a cyclic example built with the 
Decoder API. What am I missing? 

-- 
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: Randoms as LazyLists

2017-11-27 Thread Mark Hamburg
That page already has an example built using the decoder APIs so unless 
something is changing to disallow the creation of such cyclic decoders, cycles 
remain. The lifting trick still has a cycle at the end — it has to given the 
desire to build something recursive —through the functions and variables even 
if it doesn't end up in some of the data structures.

Specifically, since the lifting is being done to prevent repeated allocations 
of the Random.andThen and we potentially need to pass through the 
Random.andThen logic multiple times, the node must lead back to itself.

Mark

> On Nov 27, 2017, at 2:37 AM, 'Rupert Smith' via Elm Discuss 
>  wrote:
> 
> 
>> On Monday, November 27, 2017 at 7:50:01 AM UTC, Mark Hamburg wrote:
>> P.S. Cyclic structures can be avoided by having the compiler perform a 
>> strongly connected component analysis (e.g., using Tarjan's algorithm) and 
>> disallowing any SCC's that include anything other than function definitions. 
>> In fact, not doing so likely leaves open other cyclic cases and hence 
>> getting rid of Lazy likely does not eliminate cycles and instead just 
>> narrows the cases for which Elm is suitable.
> 
> My hunch is that enough has been done to make cyclic structures impossible, 
> but I have made no detailed analysis to support that. If all data structures 
> are immutable, then references within them have to be created when the 
> structure is first created. The first structure in a cycle to be created must 
> contain a reference to another structure in the cycle, for a cycle to be 
> formed, but as the other structures have not yet been created, this cannot be 
> done.
> 
> I think you should post an example of building a cyclic structure here, if 
> you think it can be done:
> 
> https://gist.github.com/evancz/07436448b7d6c947f21742dab46d1218 
> -- 
> 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] JS typed array implementation for elm

2017-11-27 Thread Francisco Ramos
That's great!!

Watching the project. Let me know if you need some help with this, or
somehow I can contribute with it. Being using TypedArrays for a while
already, and in my opinion they are the most thriving way to achieve the
best performance in a N-dimensional array implementation, and ultimately
Machine/Deep Learning algorithms, which is my main goal.

Fran

On Mon, Nov 27, 2017 at 11:50 AM Matthieu Pizenberg <
matthieu.pizenb...@gmail.com> wrote:

>

-- 
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: Array map with start and end

2017-11-27 Thread Matthieu Pizenberg
Following your advice, I came back to elm 0.18 and just started a 
repository to try to wrap JS typed arrays in elm. I've moved the discussion 
to a new post [1] since we were drifting from the original post here.
Cheers

[1] JS typed array implementation for elm: 
https://groups.google.com/d/topic/elm-discuss/ZfdV85yq9jU/discussion

-- 
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: Randoms as LazyLists

2017-11-27 Thread 'Rupert Smith' via Elm Discuss

On Monday, November 27, 2017 at 7:50:01 AM UTC, Mark Hamburg wrote:
>
> P.S. Cyclic structures can be avoided by having the compiler perform a 
> strongly connected component analysis (e.g., using Tarjan's algorithm) and 
> disallowing any SCC's that include anything other than function 
> definitions. In fact, not doing so likely leaves open other cyclic cases 
> and hence getting rid of Lazy likely does not eliminate cycles and instead 
> just narrows the cases for which Elm is suitable.
>

My hunch is that enough has been done to make cyclic structures impossible, 
but I have made no detailed analysis to support that. If all data 
structures are immutable, then references within them have to be created 
when the structure is first created. The first structure in a cycle to be 
created must contain a reference to another structure in the cycle, for a 
cycle to be formed, but as the other structures have not yet been created, 
this cannot be done.

I think you should post an example of building a cyclic structure here, if 
you think it can be done:

https://gist.github.com/evancz/07436448b7d6c947f21742dab46d1218 

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