Re: [elm-discuss] Local third-party packages

2017-07-04 Thread 'Rupert Smith' via Elm Discuss

On Tuesday, July 4, 2017 at 7:27:10 AM UTC+1, Peter Damoc wrote:
>
> On Mon, Jul 3, 2017 at 4:15 PM, Jens Egholm  > wrote:
>
>> Just a thought; shouldn't this be available through native Elm package 
>> management?
>>
>>
> NO! 
>
> This kind of unsafe use of code is and should forever be discouraged.
>

On the whole, yes. And it is not possible to publish these packages so 
there is no danger of polluting the kernel.

The one exception I think, is for testing/development both on kernel code 
and other libraries that you already have code running on top of. For 
example, maybe I am hacking at the virtual dom code, or maybe I have my own 
package that handles authentication that I want to make some changes too 
but test an application against.

In the virtual dom kernel code case, I cannot publish that package, so how 
to run my experimental changes?
In the auth case, I have not completed and tested my changes, so I should 
not publish a new version of my package.

It is very handy to be able to substitute a package in the build to do 
this. I use elm-install to accomplish this, so its not a problem being 
absent from the official tool. But I don't think it would be a bad feature 
to have in the official tool, and the safeguard of not being able to 
publish native, effect or port modules to the package repo is there to make 
it a safe feature.

-- 
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] Local third-party packages

2017-07-03 Thread Peter Damoc
On Mon, Jul 3, 2017 at 4:15 PM, Jens Egholm  wrote:

> Just a thought; shouldn't this be available through native Elm package
> management?
>
>
NO!

This kind of unsafe use of code is and should forever be discouraged.

I have dabbled in Native code and the main lesson from my experiences is
that this is highly dangerous and should be avoided as long as possible.

There are contexts in which using Native is unavoidable but one should be
very careful treading on those paths. If they want to encourage others to
follow them, a warning should be issued about dangers.

The official package is for safe things that every beginner could use.


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


Re: [elm-discuss] Local third-party packages

2017-07-03 Thread Jens Egholm
Just a thought; shouldn't this be available through native Elm package 
management?

Le lundi 30 janvier 2017 08:23:09 UTC+1, Peter Damoc a écrit :
>
>
>
> On Mon, Jan 30, 2017 at 8:48 AM, Lyle Kopnicky  > wrote:
>
>> So I wonder if I can use elm-package to install a package from another 
>> directory, so hopefully the references will work out right?
>>
>
> elm-package does not support that BUT, elm-github-install 
>  was designed for such 
> contexts. 
> Add the package manually to your dependencies and then use 
> elm-github-install to install it. 
>  
>
>> when I build my project, because I'm using the default project URL, it 
>> gets referenced as _user$project$Native_KaTeX, which doesn't match.
>
>
> You need a valid github project. Default values don't work. So, if you 
> fork the project and replace the user in that Native function name, you 
> should be able to compile it just fine. 
>  
>
>> Another possibility is given by looking at 
>> https://github.com/eeue56/take-home/wiki/Writing-your-first-Elm-Native-module.
>>  
>> Here the author shows some very different boilerplate, which doesn't seem 
>> to involve the project name in the variable names. I'd have to copy the 
>> elm-katex code into my own project and tweak it a bit, but that's OK for 
>> now as I'll only be building/running my project locally for the foreseeable 
>> future. Also I'd be able to update the version of KaTeX that's embedded in 
>> the file.
>>
>
> The guide you referenced is for an old way to do Native. That API is 
> obsolete. 
>
>
> -- 
> 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.


Re: [elm-discuss] Local third-party packages

2017-01-30 Thread Lyle Kopnicky
That worked great, thanks!

I used elm-github-install to install the bsouthga/elm-katex package
directly from GitHub. I didn't have to rename my own local project. I only
need to fork bsouthga's project if I want to update it to use a newer
version of KaTeX.

I didn't want to install gems in my global system dir as root, so I
installed rvm and the latest version of Ruby. Then I did gem install
elm_install.

Unlike elm-package where you can specify a package name and it will
automatically update your elm-package.json, I had to manually add an entry
each to dependencies and dependency-sources, then run elm-install. Then I
was able to build my project with no problem, and everything worked.


On Sun, Jan 29, 2017 at 11:23 PM, Peter Damoc  wrote:

>
>
> On Mon, Jan 30, 2017 at 8:48 AM, Lyle Kopnicky  wrote:
>
>> So I wonder if I can use elm-package to install a package from another
>> directory, so hopefully the references will work out right?
>>
>
> elm-package does not support that BUT, elm-github-install
>  was designed for such
> contexts.
> Add the package manually to your dependencies and then use
> elm-github-install to install it.
>
>
>> when I build my project, because I'm using the default project URL, it
>> gets referenced as _user$project$Native_KaTeX, which doesn't match.
>
>
> You need a valid github project. Default values don't work. So, if you
> fork the project and replace the user in that Native function name, you
> should be able to compile it just fine.
>
>
>> Another possibility is given by looking at https://github.com/eeue56/t
>> ake-home/wiki/Writing-your-first-Elm-Native-module. Here the author
>> shows some very different boilerplate, which doesn't seem to involve the
>> project name in the variable names. I'd have to copy the elm-katex code
>> into my own project and tweak it a bit, but that's OK for now as I'll only
>> be building/running my project locally for the foreseeable future. Also I'd
>> be able to update the version of KaTeX that's embedded in the file.
>>
>
> The guide you referenced is for an old way to do Native. That API is
> obsolete.
>
>
> --
> 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/eusppnDgN-A/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] Local third-party packages

2017-01-29 Thread Peter Damoc
On Mon, Jan 30, 2017 at 8:48 AM, Lyle Kopnicky  wrote:

> So I wonder if I can use elm-package to install a package from another
> directory, so hopefully the references will work out right?
>

elm-package does not support that BUT, elm-github-install
 was designed for such
contexts.
Add the package manually to your dependencies and then use
elm-github-install to install it.


> when I build my project, because I'm using the default project URL, it
> gets referenced as _user$project$Native_KaTeX, which doesn't match.


You need a valid github project. Default values don't work. So, if you fork
the project and replace the user in that Native function name, you should
be able to compile it just fine.


> Another possibility is given by looking at https://github.com/eeue56/
> take-home/wiki/Writing-your-first-Elm-Native-module. Here the author
> shows some very different boilerplate, which doesn't seem to involve the
> project name in the variable names. I'd have to copy the elm-katex code
> into my own project and tweak it a bit, but that's OK for now as I'll only
> be building/running my project locally for the foreseeable future. Also I'd
> be able to update the version of KaTeX that's embedded in the file.
>

The guide you referenced is for an old way to do Native. That API is
obsolete.


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