Re: [elixir-core:11267] [Question] :math module

2023-02-23 Thread José Valim
FWIW, Elixir already has a GCD: Integer.gcd/2
.

On Thu, Feb 23, 2023 at 6:32 PM 'Andrey Yugai' via elixir-lang-core <
elixir-lang-core@googlegroups.com> wrote:

> There's not so much elixir can do to improve erlang's :math, it's already 
> implemented
> with
> NIFs. Rewriting it in pure elixir/erlang would only degrade performance.
>
> Other question is why doesn't :math have more functions? BEAM wasn't
> built for the purpose of number crunching - there's plenty info about slow
> math in erlang. Although it had improved recently, I'd recommend to look
> into elixir nx or similar tools. If I understand correctly, they
> effectively bypass BEAM bytecode/NIFs shenanigans, and compile to native
> code with vectorization and whatnot.
>
> If erlang would add something unholy to its stdlib, you'll be free to
> ignore it, and keep using your righteous implementation :)
>
> --- Original Message ---
> On Thursday, February 23rd, 2023 at 22:23, Julian Somoza <
> julian.som...@gmail.com> wrote:
>
> Hi, I would like to understand why or what would be the problem with
> having our own Math module on Elixir. I know that some people think that
> has no sense to duplicate modules that already exist in Erlang but... Where
> is the "sovereignty"?
>
> If I would like to add a new math function, why do I need to ask another
> language (Erlang) to be able to have it in Elixir. Elixir could have a Math
> module implementing/bypassing :erlang base function, and adding extra
> functions "over" without dependency...
>
> For example, if I would like to propose a GCD function for :math and the
> community approve the de proposal, I would need to go to another community,
> ask there, program it in erlang (learn a bit of erlang of course), wait for
> the release, update and update the erlang version on my servers...
>
> On the other hand, what happen if Erlang add things to the core which we
> don't like to have? We are always obliged to accept what comes from above?
> Having our own Math module we could decide to not have GCD function if in
> Elixir we think that is not necessary or just don't like to have it.
>
> Just sharing my thought, I hope I don't offend anyone, and wish to read
> another point of view.
>
> Best,
> Julian.
>
> --
> 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/b66261a7-9f17-4c10-b2d8-0f77b0c338ben%40googlegroups.com
> 
> .
>
>
> --
> 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/HYb5YF6P5tzJFgwRetwx29BnzhQhx6qysrldv8ST-TaQ5hGTHkFWOGuQJevlHOxgCYgJ7XQX_NkXsi0ZNMbtezuS6N7g5u3aSBpJhrmjRWo%3D%40pm.me
> 
> .
>

-- 
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/CAGnRm4J2EAfyP_3_94tjKoNDjNJePB6Nwijea7oz9z8L9tbkjA%40mail.gmail.com.


Re: [elixir-core:11269] [Question] :math module

2023-02-23 Thread Julian Somoza
I was left wanting to comment on the following, perhaps for fear of
responding to Valim himself  and sounding daring.

>From my humble opinion and user experience of several years programming
(other languages), I feel more comfortable with an *Integer* module for
things like* Integer.to_string* and a *Math* module for operations or
things more related to mathematics, without having to think that gcd is in
the *Integer* module and not in the *Float* module for obvious reasons...

Anyway, I respect the giant's decisions.

Best,
Julian.

-- 
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/CACFi_YMSUhhW5vmMxVK-2HHus-0ykVwKAz5YsM6tLo0qA4RyHw%40mail.gmail.com.


Re: [elixir-core:11268] [Question] :math module

2023-02-23 Thread Julian Somoza
Thanks Jose! I didn't know about Integer.gcd/2

Although *gcd* was an example, I assume that any proposal related with
Maths must be added on Integer / Float, etc modules... Is that the way to
add "number-crunch" functions?

This is what I had in my head:

defmodule Math do
def pow(base, exp), do: :math.pow(base, exp)
# All the others :math functions...
# Elixir's own functions
def gcd(a, 0), do: a
def gcd(a, b), do: gcd(b, rem(a, b))
end

 I think I got your point now...

Thank you all, as always.



El jue, 23 feb 2023 a las 20:11, José Valim ()
escribió:

> FWIW, Elixir already has a GCD: Integer.gcd/2
> .
>
> On Thu, Feb 23, 2023 at 6:32 PM 'Andrey Yugai' via elixir-lang-core <
> elixir-lang-core@googlegroups.com> wrote:
>
>> There's not so much elixir can do to improve erlang's :math, it's
>> already implemented
>> with
>> NIFs. Rewriting it in pure elixir/erlang would only degrade performance.
>>
>> Other question is why doesn't :math have more functions? BEAM wasn't
>> built for the purpose of number crunching - there's plenty info about slow
>> math in erlang. Although it had improved recently, I'd recommend to look
>> into elixir nx or similar tools. If I understand correctly, they
>> effectively bypass BEAM bytecode/NIFs shenanigans, and compile to native
>> code with vectorization and whatnot.
>>
>> If erlang would add something unholy to its stdlib, you'll be free to
>> ignore it, and keep using your righteous implementation :)
>>
>> --- Original Message ---
>> On Thursday, February 23rd, 2023 at 22:23, Julian Somoza <
>> julian.som...@gmail.com> wrote:
>>
>> Hi, I would like to understand why or what would be the problem with
>> having our own Math module on Elixir. I know that some people think that
>> has no sense to duplicate modules that already exist in Erlang but... Where
>> is the "sovereignty"?
>>
>> If I would like to add a new math function, why do I need to ask another
>> language (Erlang) to be able to have it in Elixir. Elixir could have a Math
>> module implementing/bypassing :erlang base function, and adding extra
>> functions "over" without dependency...
>>
>> For example, if I would like to propose a GCD function for :math and the
>> community approve the de proposal, I would need to go to another community,
>> ask there, program it in erlang (learn a bit of erlang of course), wait for
>> the release, update and update the erlang version on my servers...
>>
>> On the other hand, what happen if Erlang add things to the core which we
>> don't like to have? We are always obliged to accept what comes from above?
>> Having our own Math module we could decide to not have GCD function if in
>> Elixir we think that is not necessary or just don't like to have it.
>>
>> Just sharing my thought, I hope I don't offend anyone, and wish to read
>> another point of view.
>>
>> Best,
>> Julian.
>>
>> --
>> 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/b66261a7-9f17-4c10-b2d8-0f77b0c338ben%40googlegroups.com
>> 
>> .
>>
>>
>> --
>> 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/HYb5YF6P5tzJFgwRetwx29BnzhQhx6qysrldv8ST-TaQ5hGTHkFWOGuQJevlHOxgCYgJ7XQX_NkXsi0ZNMbtezuS6N7g5u3aSBpJhrmjRWo%3D%40pm.me
>> 
>> .
>>
> --
> 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/CAGnRm4J2EAfyP_3_94tjKoNDjNJePB6Nwijea7oz9z8L9tbkjA%40mail.gmail.com
> 
> .
>

-- 
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-core:11261] Force compilation of a single file/files for benchmarking purposes

2023-02-23 Thread Tobias Pfeiffer
Hi everyone and as always, thanks for your amazing work!

Jokes have been lobbied at me in the spirit of the "breaks my worlfow" XKCD 
[1]  - but, please here me out!

Since the (amazing!) 1.13 [2] elixir semantic recompilation changes I can't 
easily force recompilation on single files.

The best I know how, is adding empty comments to the files. That is fine 
for single tries. However, for those who know me, I like benchmarking. 
Particularly, I'd like to use something like hyperfine [3] to benchmark the 
compilation. I could write scripts to add/remove comments in between but it 
seems clumsy. 

I might be missing a variant to get this done here.If so, I apologize for 
not first going to elixirforum.

As for _why_ do I want to do this: I have 3 implementations of the same 
module. I'd really like to compare the impact of the implementation on 
compilation time (one generates a bunch of functions to pattern match, the 
other one just uses a map, there is one variant which also does a file 
read) to provide general guidance on the impact.

I had hoped that I could do `mix compile --force lib/my_file.ex`, but it 
always compiles everything. Enabling this interface would be my proposal to 
remedy this, but y'all might have better ideas or tell me it's not worth it 
:)

Cheers + thanks,
Tobi

[1] https://xkcd.com/1172/
[2] https://hexdocs.pm/elixir/1.13/changelog.html#semantic-recompilation
[3] https://github.com/sharkdp/hyperfine

-- 
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/97956f7b-f789-4b9f-94e3-c3b1bda462d0n%40googlegroups.com.


Re: [elixir-core:11261] Force compilation of a single file/files for benchmarking purposes

2023-02-23 Thread José Valim
Could you potentially use `mix run lib/my_file.ex` for those cases?

On Thu, Feb 23, 2023 at 10:27 AM Tobias Pfeiffer  wrote:

> Hi everyone and as always, thanks for your amazing work!
>
> Jokes have been lobbied at me in the spirit of the "breaks my worlfow"
> XKCD [1]  - but, please here me out!
>
> Since the (amazing!) 1.13 [2] elixir semantic recompilation changes I
> can't easily force recompilation on single files.
>
> The best I know how, is adding empty comments to the files. That is fine
> for single tries. However, for those who know me, I like benchmarking.
> Particularly, I'd like to use something like hyperfine [3] to benchmark the
> compilation. I could write scripts to add/remove comments in between but it
> seems clumsy.
>
> I might be missing a variant to get this done here.If so, I apologize for
> not first going to elixirforum.
>
> As for _why_ do I want to do this: I have 3 implementations of the same
> module. I'd really like to compare the impact of the implementation on
> compilation time (one generates a bunch of functions to pattern match, the
> other one just uses a map, there is one variant which also does a file
> read) to provide general guidance on the impact.
>
> I had hoped that I could do `mix compile --force lib/my_file.ex`, but it
> always compiles everything. Enabling this interface would be my proposal to
> remedy this, but y'all might have better ideas or tell me it's not worth it
> :)
>
> Cheers + thanks,
> Tobi
>
> [1] https://xkcd.com/1172/
> [2] https://hexdocs.pm/elixir/1.13/changelog.html#semantic-recompilation
> [3] https://github.com/sharkdp/hyperfine
>
> --
> 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/97956f7b-f789-4b9f-94e3-c3b1bda462d0n%40googlegroups.com
> 
> .
>

-- 
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/CAGnRm4KRdqMGcOoPs-F5XHSGP%2Bz2_BKtFe%3Dj07qhrJbpsCmxoQ%40mail.gmail.com.


Re: [elixir-core:11262] Force compilation of a single file/files for benchmarking purposes

2023-02-23 Thread Wojtek Mach
You can also force recompilation by defining this function:    def __mix_recompile__?, do: trueWiadomość napisana przez José Valim  w dniu 23.02.2023, o godz. 11:20:Could you potentially use `mix run lib/my_file.ex` for those cases?On Thu, Feb 23, 2023 at 10:27 AM Tobias Pfeiffer  wrote:Hi everyone and as always, thanks for your amazing work!Jokes have been lobbied at me in the spirit of the "breaks my worlfow" XKCD [1]  - but, please here me out!Since the (amazing!) 1.13 [2] elixir semantic recompilation changes I can't easily force recompilation on single files.The best I know how, is adding empty comments to the files. That is fine for single tries. However, for those who know me, I like benchmarking. Particularly, I'd like to use something like hyperfine [3] to benchmark the compilation. I could write scripts to add/remove comments in between but it seems clumsy. I might be missing a variant to get this done here.If so, I apologize for not first going to elixirforum.As for _why_ do I want to do this: I have 3 implementations of the same module. I'd really like to compare the impact of the implementation on compilation time (one generates a bunch of functions to pattern match, the other one just uses a map, there is one variant which also does a file read) to provide general guidance on the impact.I had hoped that I could do `mix compile --force lib/my_file.ex`, but it always compiles everything. Enabling this interface would be my proposal to remedy this, but y'all might have better ideas or tell me it's not worth it :)Cheers + thanks,Tobi[1] https://xkcd.com/1172/[2] https://hexdocs.pm/elixir/1.13/changelog.html#semantic-recompilation[3] https://github.com/sharkdp/hyperfine



-- 
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/97956f7b-f789-4b9f-94e3-c3b1bda462d0n%40googlegroups.com.




-- 
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/CAGnRm4KRdqMGcOoPs-F5XHSGP%2Bz2_BKtFe%3Dj07qhrJbpsCmxoQ%40mail.gmail.com.




-- 
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/DFFC1FE0-87D2-4286-AF47-647825BAD460%40wojtekmach.pl.


Re: [elixir-core:11264] Force compilation of a single file/files for benchmarking purposes

2023-02-23 Thread Tobias Pfeiffer
Interesting! I always forget elixir modules are also "just" evaluated until 
I don't. `mix run --no-start` does indeed seem to work for this use case!

Thank you!

On Thursday, February 23, 2023 at 11:20:01 AM UTC+1 José Valim wrote:

> Could you potentially use `mix run lib/my_file.ex` for those cases?
>
> On Thu, Feb 23, 2023 at 10:27 AM Tobias Pfeiffer  wrote:
>
>> Hi everyone and as always, thanks for your amazing work!
>>
>> Jokes have been lobbied at me in the spirit of the "breaks my worlfow" 
>> XKCD [1]  - but, please here me out!
>>
>> Since the (amazing!) 1.13 [2] elixir semantic recompilation changes I 
>> can't easily force recompilation on single files.
>>
>> The best I know how, is adding empty comments to the files. That is fine 
>> for single tries. However, for those who know me, I like benchmarking. 
>> Particularly, I'd like to use something like hyperfine [3] to benchmark the 
>> compilation. I could write scripts to add/remove comments in between but it 
>> seems clumsy. 
>>
>> I might be missing a variant to get this done here.If so, I apologize for 
>> not first going to elixirforum.
>>
>> As for _why_ do I want to do this: I have 3 implementations of the same 
>> module. I'd really like to compare the impact of the implementation on 
>> compilation time (one generates a bunch of functions to pattern match, the 
>> other one just uses a map, there is one variant which also does a file 
>> read) to provide general guidance on the impact.
>>
>> I had hoped that I could do `mix compile --force lib/my_file.ex`, but it 
>> always compiles everything. Enabling this interface would be my proposal to 
>> remedy this, but y'all might have better ideas or tell me it's not worth it 
>> :)
>>
>> Cheers + thanks,
>> Tobi
>>
>> [1] https://xkcd.com/1172/
>> [2] https://hexdocs.pm/elixir/1.13/changelog.html#semantic-recompilation
>> [3] https://github.com/sharkdp/hyperfine
>>
>> -- 
>> 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/97956f7b-f789-4b9f-94e3-c3b1bda462d0n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/cbeea434-3645-4692-acbe-558f17b333een%40googlegroups.com.


[elixir-core:11265] [Question] :math module

2023-02-23 Thread Julian Somoza
Hi, I would like to understand why or what would be the problem with having 
our own Math module on Elixir. I know that some people think that has no 
sense to duplicate modules that already exist in Erlang but... Where is the 
"sovereignty"? 

If I would like to add a new math function, why do I need to ask another 
language (Erlang) to be able to have it in Elixir. Elixir could have a Math 
module implementing/bypassing :erlang base function, and adding extra 
functions "over" without dependency... 

For example, if I would like to propose a GCD function for :math and the 
community approve the de proposal, I would need to go to another community, 
ask there, program it in erlang (learn a bit of erlang of course), wait for 
the release, update and update the erlang version on my servers...

On the other hand, what happen if Erlang add things to the core which we 
don't like to have? We are always obliged to accept what comes from above? 
Having our own Math module we could decide to not have GCD function if in 
Elixir we think that is not necessary or just don't like to have it.

Just sharing my thought, I hope I don't offend anyone, and wish to read 
another point of view.

Best, 
Julian.

-- 
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/b66261a7-9f17-4c10-b2d8-0f77b0c338ben%40googlegroups.com.


Re: [elixir-core:11266] Force compilation of a single file/files for benchmarking purposes

2023-02-23 Thread Tobias Pfeiffer

Thanks, I know :) The problem with that is wanting to run a benchmark with 
all examples in it, so this would always force compilation for all 3 files 
which doesn't help with that particular benchmarking case.
On Thursday, February 23, 2023 at 1:26:59 PM UTC+1 woj...@wojtekmach.pl 
wrote:

> You can also force recompilation by defining this function:
>
> def __mix_recompile__?, do: true
>
> Wiadomość napisana przez José Valim  w dniu 
> 23.02.2023, o godz. 11:20:
>
> 
>
> Could you potentially use `mix run lib/my_file.ex` for those cases?
>
> On Thu, Feb 23, 2023 at 10:27 AM Tobias Pfeiffer  wrote:
>
>> Hi everyone and as always, thanks for your amazing work!
>>
>> Jokes have been lobbied at me in the spirit of the "breaks my worlfow" 
>> XKCD [1]  - but, please here me out!
>>
>> Since the (amazing!) 1.13 [2] elixir semantic recompilation changes I 
>> can't easily force recompilation on single files.
>>
>> The best I know how, is adding empty comments to the files. That is fine 
>> for single tries. However, for those who know me, I like benchmarking. 
>> Particularly, I'd like to use something like hyperfine [3] to benchmark the 
>> compilation. I could write scripts to add/remove comments in between but it 
>> seems clumsy. 
>>
>> I might be missing a variant to get this done here.If so, I apologize for 
>> not first going to elixirforum.
>>
>> As for _why_ do I want to do this: I have 3 implementations of the same 
>> module. I'd really like to compare the impact of the implementation on 
>> compilation time (one generates a bunch of functions to pattern match, the 
>> other one just uses a map, there is one variant which also does a file 
>> read) to provide general guidance on the impact.
>>
>> I had hoped that I could do `mix compile --force lib/my_file.ex`, but it 
>> always compiles everything. Enabling this interface would be my proposal to 
>> remedy this, but y'all might have better ideas or tell me it's not worth it 
>> :)
>>
>> Cheers + thanks,
>> Tobi
>>
>> [1] https://xkcd.com/1172/
>> [2] https://hexdocs.pm/elixir/1.13/changelog.html#semantic-recompilation
>> [3] https://github.com/sharkdp/hyperfine
>>
>> -- 
>> 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/97956f7b-f789-4b9f-94e3-c3b1bda462d0n%40googlegroups.com
>>  
>> 
>> .
>>
> -- 
> 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/CAGnRm4KRdqMGcOoPs-F5XHSGP%2Bz2_BKtFe%3Dj07qhrJbpsCmxoQ%40mail.gmail.com
>  
> 
> .
>
>

-- 
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/801a29b1-7521-4096-8d40-07fd3b3beaaen%40googlegroups.com.


Re: [elixir-core:11266] [Question] :math module

2023-02-23 Thread 'Andrey Yugai' via elixir-lang-core
There's not so much elixir can do to improve erlang's :math​, it's already 
[implemented](https://github.com/erlang/otp/blob/master/lib/stdlib/src/math.erl)with
 NIFs. Rewriting it in pure elixir/erlang would only degrade performance.

Other question is why doesn't :math​ have more functions? BEAM wasn't built for 
the purpose of number crunching - there's plenty info about slow math in 
erlang. Although it had improved recently, I'd recommend to look into elixir nx 
or similar tools. If I understand correctly, they effectively bypass BEAM 
bytecode/NIFs shenanigans, and compile to native code with vectorization and 
whatnot.

If erlang would add something unholy to its stdlib, you'll be free to ignore 
it, and keep using your righteous implementation :)

--- Original Message ---
On Thursday, February 23rd, 2023 at 22:23, Julian Somoza 
 wrote:

> Hi, I would like to understand why or what would be the problem with having 
> our own Math module on Elixir. I know that some people think that has no 
> sense to duplicate modules that already exist in Erlang but... Where is the 
> "sovereignty"?
>
> If I would like to add a new math function, why do I need to ask another 
> language (Erlang) to be able to have it in Elixir. Elixir could have a Math 
> module implementing/bypassing :erlang base function, and adding extra 
> functions "over" without dependency...
>
> For example, if I would like to propose a GCD function for :math and the 
> community approve the de proposal, I would need to go to another community, 
> ask there, program it in erlang (learn a bit of erlang of course), wait for 
> the release, update and update the erlang version on my servers...
>
> On the other hand, what happen if Erlang add things to the core which we 
> don't like to have? We are always obliged to accept what comes from above? 
> Having our own Math module we could decide to not have GCD function if in 
> Elixir we think that is not necessary or just don't like to have it.
>
> Just sharing my thought, I hope I don't offend anyone, and wish to read 
> another point of view.
>
> Best,
> Julian.
>
> --
> 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/b66261a7-9f17-4c10-b2d8-0f77b0c338ben%40googlegroups.com](https://groups.google.com/d/msgid/elixir-lang-core/b66261a7-9f17-4c10-b2d8-0f77b0c338ben%40googlegroups.com?utm_medium=email_source=footer).

-- 
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/HYb5YF6P5tzJFgwRetwx29BnzhQhx6qysrldv8ST-TaQ5hGTHkFWOGuQJevlHOxgCYgJ7XQX_NkXsi0ZNMbtezuS6N7g5u3aSBpJhrmjRWo%3D%40pm.me.