Re: [elixir-core:7294] Enhancement propsal: @doc for types

2017-07-18 Thread Krzysztof Wende
I have honestly never seen this before! How did I miss it?
Thank you!

W dniu wtorek, 18 lipca 2017 08:09:02 UTC+2 użytkownik Wojtek Mach napisał:
>
> Folks at Elixir Core already thought about it: @typedoc :)
>
>
> https://github.com/elixir-lang/elixir/blob/v1.5.0-rc.1/lib/elixir/lib/calendar.ex#L26:L33
> https://hexdocs.pm/elixir/1.5.0-rc.1/Calendar.html#t:day_fraction/0
>
> 2017-07-18 1:11 GMT+02:00 Krzysztof Wende  >:
>
>> Hello everyone!
>>
>> This is my first proposal, but it's not huge and I believe would yield 
>> some positive value to the elixir community.
>>
>> Every time we write bigger systems in Neon Tree Solutions Ltd we try to 
>> define all the specs and types to make the code look clearer.
>> A pattern that emerges very commonly is writing a big comment block 
>> before a type, to describe what it does and how it's supposed to be used.
>> And as elixir treats documentation as first class citizen I believe it 
>> would be a valuable feature to treat `@doc` blocks before types, the same 
>> way they are treated before functions. Right now they are just discarded 
>> with a warning:
>>
>>
>>
>> 
>>
>> I am aware that it isn't simple in terms of implementation, since a `def` 
>> is a macro and a type is defined with a module attribute `@type`, but I 
>> think it'd be worth discussing a possible ways of implementing such feature.
>>
>> Plus imagine how beautiful Hex Docs would be if these gaps were filled:
>>
>>
>> 
>>
>>
>> Thank you for taking time discussing this topic!
>>
>> Cheers
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elixir-lang-co...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-core/098b967e-d38c-47aa-8783-34e76bff00c0%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Wojtek Mach
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/662afc8e-d580-429f-ae95-d707f12eacf3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elixir-core:7295] easy dependencies installation

2017-07-18 Thread Vitaly Shvedchenko
Hi guys,

I'd like to suggest a feature and may be implement it. I've found somebody 
proposed this feature earlier, but it was a long time ago and there was not 
a single reply to it. So I'd try one more time for that poor guy and for 
me. 

When you develop elixir project and adding new dependencies to the project, 
you always have to find needed package onlline, find out it's latest 
version number and put it in your mix.exs dependencies for yourself. What 
could be helpful is some equivalent of a 
npm install --save
command from nodejs world. It would be like
mix deps.install package_name
What this command has to do is just 
1. check if hex is installed, propose to install it if it is not, 
2. get the hex package info, parse its version, 
3. put it in mix.exs file (with some conventional semantic versioning 
pattern like "~> x.y")
4. and call mix deps.get—thats it! 
It probably would not put the dependency in OTP applications to start list, 
but still it is much easier way of installing dependencies.

I guess there is some conventional reasons to not implement such way of 
installing new dependencies, but it's not obvious for me and many other 
people why there is no such option.

Thanks! Will be glad to have some feedback. 

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/9daf03ef-a9a6-44d2-b7d5-68c345b42d76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elixir-core:7295] easy dependencies installation

2017-07-18 Thread Louis Pilfold
Hey Vitaly

The dependency file for mix is an Elixir program rather than just a simple
JSON file. There's no way reliably and safely programatically modify the
mix.exs file as a result.

Cheers,
Louis

On Tue, 18 Jul 2017 at 22:17 Vitaly Shvedchenko <
vitaly.shvedche...@gmail.com> wrote:

> Hi guys,
>
> I'd like to suggest a feature and may be implement it. I've found somebody
> proposed this feature earlier, but it was a long time ago and there was not
> a single reply to it. So I'd try one more time for that poor guy and for
> me.
>
> When you develop elixir project and adding new dependencies to the
> project, you always have to find needed package onlline, find out it's
> latest version number and put it in your mix.exs dependencies for yourself.
> What could be helpful is some equivalent of a
> npm install --save
> command from nodejs world. It would be like
> mix deps.install package_name
> What this command has to do is just
> 1. check if hex is installed, propose to install it if it is not,
> 2. get the hex package info, parse its version,
> 3. put it in mix.exs file (with some conventional semantic versioning
> pattern like "~> x.y")
> 4. and call mix deps.get—thats it!
> It probably would not put the dependency in OTP applications to start
> list, but still it is much easier way of installing dependencies.
>
> I guess there is some conventional reasons to not implement such way of
> installing new dependencies, but it's not obvious for me and many other
> people why there is no such option.
>
> Thanks! Will be glad to have some feedback.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/9daf03ef-a9a6-44d2-b7d5-68c345b42d76%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CABu8xFAmKrBVsFNtEtzocY0pXCeSzFa7epxP7Fm0VdFVg7x1nA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elixir-core:7297] easy dependencies installation

2017-07-18 Thread Vitaly Shvedchenko
Ok, so it would be just an option to leave a version string empty to let 
mix just get the latest version of a package. This is how a ruby gem 
dependencies with Gemfile works.

On Wednesday, July 19, 2017 at 12:37:57 AM UTC+3, Louis Pilfold wrote:
>
> Hey Vitaly
>
> The dependency file for mix is an Elixir program rather than just a simple 
> JSON file. There's no way reliably and safely programatically modify the 
> mix.exs file as a result.
>
> Cheers,
> Louis
>
> On Tue, 18 Jul 2017 at 22:17 Vitaly Shvedchenko  > wrote:
>
>> Hi guys,
>>
>> I'd like to suggest a feature and may be implement it. I've found 
>> somebody proposed this feature earlier, but it was a long time ago and 
>> there was not a single reply to it. So I'd try one more time for that poor 
>> guy and for me. 
>>
>> When you develop elixir project and adding new dependencies to the 
>> project, you always have to find needed package onlline, find out it's 
>> latest version number and put it in your mix.exs dependencies for yourself. 
>> What could be helpful is some equivalent of a 
>> npm install --save
>> command from nodejs world. It would be like
>> mix deps.install package_name
>> What this command has to do is just 
>> 1. check if hex is installed, propose to install it if it is not, 
>> 2. get the hex package info, parse its version, 
>> 3. put it in mix.exs file (with some conventional semantic versioning 
>> pattern like "~> x.y")
>> 4. and call mix deps.get—thats it! 
>> It probably would not put the dependency in OTP applications to start 
>> list, but still it is much easier way of installing dependencies.
>>
>> I guess there is some conventional reasons to not implement such way of 
>> installing new dependencies, but it's not obvious for me and many other 
>> people why there is no such option.
>>
>> Thanks! Will be glad to have some feedback. 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elixir-lang-co...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-core/9daf03ef-a9a6-44d2-b7d5-68c345b42d76%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/2c6070cd-f108-4ddc-90f3-77f77d1b6298%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elixir-core:7297] easy dependencies installation

2017-07-18 Thread Bryan Stearns
It’d be hard to reliably parse & edit mix.exs files in general, but since I
can promise myself that I’ll adhere to certain formatting rules in my own
projects, I wrote https://github.com/bryanstearns/mix_deps_add … and if you
don’t like my rules (see the README), please file an issue or send a PR.
(As it happens, I didn’t support comments within the deps/0 function in the
versions I’ve released, but I’ll eventually finish the branch that supports
them.)

I definitely don’t think something this arbitrary belongs in Mix itself!

On Tue, Jul 18, 2017 at 4:30 PM, Vitaly Shvedchenko <
vitaly.shvedche...@gmail.com> wrote:

> Ok, so it would be just an option to leave a version string empty to let
> mix just get the latest version of a package. This is how a ruby gem
> dependencies with Gemfile works.
>
> On Wednesday, July 19, 2017 at 12:37:57 AM UTC+3, Louis Pilfold wrote:
>>
>> Hey Vitaly
>>
>> The dependency file for mix is an Elixir program rather than just a
>> simple JSON file. There's no way reliably and safely programatically modify
>> the mix.exs file as a result.
>>
>> Cheers,
>> Louis
>>
>> On Tue, 18 Jul 2017 at 22:17 Vitaly Shvedchenko 
>> wrote:
>>
>>> Hi guys,
>>>
>>> I'd like to suggest a feature and may be implement it. I've found
>>> somebody proposed this feature earlier, but it was a long time ago and
>>> there was not a single reply to it. So I'd try one more time for that poor
>>> guy and for me.
>>>
>>> When you develop elixir project and adding new dependencies to the
>>> project, you always have to find needed package onlline, find out it's
>>> latest version number and put it in your mix.exs dependencies for yourself.
>>> What could be helpful is some equivalent of a
>>> npm install --save
>>> command from nodejs world. It would be like
>>> mix deps.install package_name
>>> What this command has to do is just
>>> 1. check if hex is installed, propose to install it if it is not,
>>> 2. get the hex package info, parse its version,
>>> 3. put it in mix.exs file (with some conventional semantic versioning
>>> pattern like "~> x.y")
>>> 4. and call mix deps.get—thats it!
>>> It probably would not put the dependency in OTP applications to start
>>> list, but still it is much easier way of installing dependencies.
>>>
>>> I guess there is some conventional reasons to not implement such way of
>>> installing new dependencies, but it's not obvious for me and many other
>>> people why there is no such option.
>>>
>>> Thanks! Will be glad to have some feedback.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "elixir-lang-core" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to elixir-lang-co...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/elixir-lang-core/9daf03ef-a9a6-44d2-b7d5-68c345b42d76%
>>> 40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-core/2c6070cd-f108-4ddc-90f3-
> 77f77d1b6298%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGt18Nhg_8nUg-MdXAOU%2BCH_svif%2BXue5tE-V7Ko7j2vYStc7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.