[elixir-core:5888] Bug when in string interpolation?

2016-05-31 Thread eksperimental
is 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/

Re: [elixir-core:5895] Bug when in string interpolation?

2016-06-01 Thread eksperimental
ent behavior for nil while Atom.to_string keeps a literal > conversion. > > On Wednesday, June 1, 2016, eksperimental > <eksperimen...@autistici.org> wrote: > > > I came across when writing a macro that created functions after > > atoms. I had the idead

Re: [elixir-core:5963] Proposal for Random related functions

2016-06-23 Thread eksperimental
to be converted to a list to later pick one element. It optimized Enum.at/2 when dealing with ranges. Thank you. On Sat, 4 Jun 2016 08:37:19 +0700 eksperimental <eksperimen...@autistici.org> wrote: > I forgot to mention that Range.at/3 has been implemented. > > *** > ### Range.

Re: [elixir-core:5964] Proposal: Enum.pad and Enum.pad_zip

2016-06-23 Thread eksperimental
Jose could you please give me an answer on this, as I would like to to finally make it into the Elixir. Thank you On Thu, 5 May 2016 11:56:47 +0700 eksperimental <eksperimen...@autistici.org> wrote: > Jose, > It was earlier suggested that we should have a function like this. > C

Re: [elixir-core:5968] Proposal for Random related functions

2016-06-23 Thread eksperimental
ular, if we implement Enum.random fast enough for ranges, it > would be enough to replace many of the other functions listed, like > Integer.random and Range.random. :) > > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R >

Re: [elixir-core:5692] Accessing typespecs from a module

2016-05-09 Thread eksperimental
gt; > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > On Mon, May 9, 2016 at 4:43 AM, eksperimental > <eksperimen...@autistici.org> wrote: > > > I'm trying to fix this bug. > > https://github.com/elixir-lang/el

Re: [elixir-core:5706] Can we have this convenience as a function in the File module: read(file, start, length)

2016-05-12 Thread eksperimental
gt; move the cursor when reading bytes. We would actually need to load > >> the file into Elixir. It would probably be more interesting to add > >> a File.position instead of hiding the underlying behaviour. > >> > >> > >> *José Valim* > >> www.plata

Re: [elixir-core:5702] Can we have this convenience as a function in the File module: read(file, start, length)

2016-05-12 Thread eksperimental
cribe 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/20160512192534.35e62698.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:6205] Introducing is_kind/2 and guard-safe operators: is, is_not, is_any, are, are_not, are_any

2016-08-12 Thread eksperimental
wrote: > Thank you Eksperimental for a great and detailed proposal with working > implementation. > > My biggest concern is that the "kinds" are not extensible. We are > replacing something that is extensible (defining functions) with an > atom-tuple based lookup that i

[elixir-core:6130] Proposal: Add Enum.at!/2

2016-07-18 Thread eksperimental
sit https://groups.google.com/d/msgid/elixir-lang-core/20160718222830.4f1c21d4.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:6068] Enum.index/0 type not very useful as it is

2016-07-07 Thread eksperimental
atible change if no APIs change. It also depends on if the > > type is used as arguments to functions or as return values. > > Accepting more values in arguments is backwards compatible, but > > returning more types of values is not. > > > > The solution might

[elixir-core:6019] Enum.index/0 type not very useful as it is

2016-07-04 Thread eksperimental
-lang-core/20160704233754.6acc2ca5.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:6173] Re: Proposal: guard-safe modulo function `mod(a, n)`

2016-08-08 Thread eksperimental
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/20160808212901.1360e245.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:6920] Proposal: add new tag to functions and modules: @available_since

2017-02-21 Thread eksperimental
he finds some time. :) > > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > On Tue, Feb 21, 2017 at 3:46 PM, eksperimental <eksperimen...@autistici.org> > wrote: > > > I would like to read at the documentation, and be a

Re: [elixir-core:6931] Questions about introduction of List.starts_with?/2

2017-02-21 Thread eksperimental
m.br > Skype: jv.ptec > Founder and Director of R > > On Tue, Feb 21, 2017 at 3:38 PM, eksperimental <eksperimen...@autistici.org> > wrote: > > > Hi, List.starts_with?/2 have recently been introduced > > https://github.com/elixir-lang/elixir/pull/5789 > >

[elixir-core:6933] Deprecation table

2017-02-21 Thread eksperimental
e+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/20170222090523.767b36c1.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:6939] Questions about introduction of List.starts_with?/2

2017-02-22 Thread eksperimental
.br > Skype: jv.ptec > Founder and Director of R > > On Tue, Feb 21, 2017 at 7:03 PM, eksperimental <eksperimen...@autistici.org> > wrote: > > > Sorry José, I was wrong when i wrote > > > If we support improper lists, prefix could be any term, not just a list. > >

Re: [elixir-core:6380] Re: Deprecate 'single quotes for char lists'

2016-09-23 Thread eksperimental
gt; > Thoughts? > > > > *José Valim* > > www.plataformatec.com.br > > Skype: jv.ptec > > Founder and Director of R > > > -- 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/20160923210603.67c79cf8.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:6481] add record/2 to Typespecs

2016-10-12 Thread eksperimental
ar Elixir macro and not a typespec construct. > > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > On Wed, Oct 12, 2016 at 7:46 PM, eksperimental <eksperimen...@autistici.org> > wrote: > > > Hi, > > I'm

Re: [elixir-core:6733] Do Elixir typespecs allow multiple clauses like Erlang's do?

2016-12-11 Thread eksperimental
isit > > https://groups.google.com/d/msgid/elixir-lang-core/6bf79af0-6f26-42f7-83e6-35c7f0b7c37f%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/20161212040836.157f25b6.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:7063] Cleaning out Elixir's .gitignore file and improve clarity

2017-04-16 Thread eksperimental
t; www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > On Thu, Apr 13, 2017 at 4:55 PM, eksperimental <eksperimen...@autistici.org> > wrote: > > > I'm working on improving the Makefile of Elixir, and I'm going through > > what's being ignored

[elixir-core:7060] Cleaning out Elixir's .gitignore file and improve clarity

2017-04-13 Thread eksperimental
cause 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

Re: [elixir-core:7168] Possible bug in doctests

2017-05-29 Thread eksperimental
I will submit a PR then On Mon, 29 May 2017 06:34:20 + José Valim <jose.va...@plataformatec.com.br> wrote: > Yes, I would say that it is incomplete. > > On Mon, May 29, 2017 at 02:55 eksperimental <eksperimen...@autistici.org> > wrote: > > > Working in the

[elixir-core:7166] Possible bug in doctests

2017-05-28 Thread eksperimental
Working in the latests addition to doctests let me found this bug, This is an actual test, defmodule ExUnit.DocTestTest.Incomplete do @doc ~S''' iex> 1 + 2 ''' def test_fun, do: :ok end it fails because there is nothing to evaluate against at the end of the doctest, But I see that

Re: [elixir-core:7165] [Proposal] Improve supported syntax in Doctest

2017-05-28 Thread eksperimental
omments (#=>, #>>) cannot be treated as regular comments, because doctests will always validate with them. And yes, they are not evaluated (that's the whole point of having them), otherwise we would just use regular code. Please have a look at the final implementation. https://gi

Re: [elixir-core:7178] Introducing is_kind/2 and guard-safe operators: is, is_not, is_any, are, are_not, are_any

2017-06-01 Thread eksperimental
ote do: ... but without putting the logic inside a quote (which will be invalid in a guard), and unquoting kind to get the value from its calling environment. thank you. On Sat, 13 Aug 2016 02:22:09 +0700 eksperimental <eksperimen...@autistici.org> wrote: > the Comparison group of kin

Re: [elixir-core:7114] [Proposal] Improve supported syntax in Doctest

2017-05-08 Thread eksperimental
0170508221600.66851fc4.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:7116] [Proposal] Improve supported syntax in Doctest

2017-05-08 Thread eksperimental
wd and ls are not going to be effective in doctests as the results will be > highly dependent of the user directory and what is on their machine. > > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > On Mon, May 8, 201

Re: [elixir-core:7118] [Proposal] Improve supported syntax in Doctest

2017-05-08 Thread eksperimental
API to do exactly that. Such as File.ls! and > File.cwd!. > > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > On Mon, May 8, 2017 at 6:26 PM, eksperimental <eksperimen...@autistici.org> > wrote: > >

Re: [elixir-core:7113] [Proposal] Improve supported syntax in Doctest

2017-05-08 Thread eksperimental
; Founder and Director of R > > On Mon, May 8, 2017 at 4:59 PM, eksperimental <eksperimen...@autistici.org> > wrote: > > > I have been working on a few improvements for doctests. > > Everything that I'm proposing here has already been implemented. > > The propos

[elixir-core:7111] [Proposal] Improve supported syntax in Doctest

2017-05-08 Thread eksperimental
rt, {self(), :close} #=> {#PID<0.80.0>, :close} iex> flush() #>> {#Port<0.1444>, :closed} :ok The implemented and tested code can be found here: https://github.com/eksperimental/elixir/tree/doctest_improvements3 Thank you for reading and looking

Re: [elixir-core:8270] Re: [elixir-lang]: Maintainership and CI for elixir-lang and good start issue newcomers

2018-09-08 Thread eksperimental
cb147c1%40googlegroups.com?utm_medium=email_source=footer> > >>> . > >>> 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/ms > >> gid/elixir-lang-core/CAK-y3CvWfMhgLqAVp5cncYVidxWOL9QMiH5qiL > >> DoCOeB-YOqww%40mail.gmail.com > >> <https://groups.google.com/d/msgid/elixir-lang-core/CAK-y3CvWfMhgLqAVp5cncYVidxWOL9QMiH5qiLDoCOeB-YOqww%40mail.gmail.com?utm_medium=email_source=footer> > >> . > >> > >> 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/CAAO6v52jgCn0JbYoAu2jssq4Zf9M5 > > BgKvuJyzgguXr5wwtWhNw%40mail.gmail.com > > <https://groups.google.com/d/msgid/elixir-lang-core/CAAO6v52jgCn0JbYoAu2jssq4Zf9M5BgKvuJyzgguXr5wwtWhNw%40mail.gmail.com?utm_medium=email_source=footer> > > . > > 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/20180909030806.51f20270.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:8347] Proposal: standardize expression to refer to functions with multiple arities (and ExDoc auto-linking)

2018-10-20 Thread eksperimental
we > would have Task.start_link/1,3, which is not handled by 1-3. :) > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > > On Sat, Oct 20, 2018 at 4:13 AM eksperimental > wrote: > > > Thanks for bring this up

[elixir-core:8343] Running `make test` with a specified seed

2018-10-19 Thread eksperimental
"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/20181020090639.3d881d02.eks

Re: [elixir-core:8344] Proposal: standardize expression to refer to functions with multiple arities (and ExDoc auto-linking)

2018-10-19 Thread eksperimental
Thanks for bring this up, as I thought the same way. Also we need to add support for this in ExDoc. I'm all for using ",". I have also found myself using Mod.fun/1-3 when refering to functions with default arguments. I find it cleaner than using commas when referring to the same function with

[elixir-core:8413] [Proposal] Add missing List.ends_with?/2

2018-12-31 Thread eksperimental
`. And implementation can be found in https://github.com/eksperimental/elixir/tree/list_ends_with What do you think about adding it? -- 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 fro

Re: [elixir-core:8416] [Proposal] Enum.split_with/2 to Enum.split_by/2

2018-12-31 Thread eksperimental
web visit https://groups.google.com/d/msgid/elixir-lang-core/20181231195201.1b3d1c08.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:8417] Running `make test` with a specified seed

2018-12-31 Thread eksperimental
; 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/20181231202127.14b05f14.eksperimental%40autistici.org. For more opt

[elixir-core:8414] [Proposal] Enum.split_with/2 to Enum.split_by/2

2018-12-31 Thread eksperimental
I would like to propose the renaming of Enum.split_with/2 to Enum.split_by/2, as it doesn't follow the naming rationale we currently have. Taken from https://github.com/eksperimental/elixir_inconsistencies#elixir-inconsistencies Affected: Enum.split_with/2. Proposed: Enum.split_by/2

[elixir-core:8452] Concurrent File.cp_r/3

2019-01-15 Thread eksperimental
-lang-core/20190116000134.15e73be0.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:8454] Concurrent File.cp_r/3

2019-01-15 Thread eksperimental
> www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R > > > On Tue, Jan 15, 2019 at 6:01 PM eksperimental > wrote: > > > Hi list, > > Reviewing the code from the File module, > > made me wonder this if there is a reason while File.cp_r

[elixir-core:8412] [PROPOSAL] Hint to add :ex_doc dependency when running `mix docs` and docs task not present #8554

2018-12-21 Thread eksperimental
to know if there's interest in such a feature thank you for your feedback, - Eksperimental -- 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

Re: [elixir-core:8432] [Proposal] Deprecate unless-else

2019-01-08 Thread eksperimental
> people using unless/else deserve to have their code broken... > > > On January 3, 2019 at 4:57:17 PM, eksperimental (eksperimen...@autistici.org) > wrote: > > On Fri, 4 Jan 2019 07:54:44 +0700 > eksperimental wrote: > > > On Thu, 3 Jan 2019 11:25:13 -0800 >

Re: [elixir-core:8433] [Proposal] Enum.split_with/2 to Enum.split_by/2

2019-01-08 Thread eksperimental
the suffixes in isolation. That would be an > >> unnatural way to organize the API. How "_with" is used in start_with? is a > >> different meaning than split_with which is marked by the preceding verbs. > >> So unless the preceding word is also in the same cat

Re: [elixir-core:8426] [Proposal] Deprecate unless-else

2019-01-03 Thread eksperimental
-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/20190104075444.30c1e2d7.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.

Re: [elixir-core:8427] [Proposal] Deprecate unless-else

2019-01-03 Thread eksperimental
On Fri, 4 Jan 2019 07:54:44 +0700 eksperimental wrote: > On Thu, 3 Jan 2019 11:25:13 -0800 > Ryan Winchester wrote: > > Have the formatter change it to an if/else , or just leave it for tools > > like Credo to yell at you for an unless/else. > > This is definitely

Re: [elixir-core:9001] [Proposal] identity function

2019-07-30 Thread eksperimental
>>> 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/2bb429a8-e583-48c1-a335-8660c115b24f%40googlegroups.com > >>> <https://groups.google.com/d/msgid/elixir-lang-core/2bb429a8-e583-48c1-a335-8660c115b24f%40googlegroups.com?utm_medium=email_source=footer> > >>> . > >>> For more options, visit https://groups.google.com/d/optout. > >>> > >> -- > >> > >> Andrea Leopardi > >> an.leopa...@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/CAM9Rf%2BJEN7vuwxxZFkrB8NytCCaSPAKtroMeA1sqe91n5SoFXg%40mail.gmail.com > >> <https://groups.google.com/d/msgid/elixir-lang-core/CAM9Rf%2BJEN7vuwxxZFkrB8NytCCaSPAKtroMeA1sqe91n5SoFXg%40mail.gmail.com?utm_medium=email_source=footer> > >> . > >> For more options, visit https://groups.google.com/d/optout. > >> > > > > > > -- > > > > Regards, > > Bruce Tate > > CEO > > > > > > <https://bowtie.mailbutler.io/tracking/hit/f8218219-d2a8-4de4-9fef-1cdde6e723f6/c7c97460-016e-45fb-a4ab-0a70318c7b97> > > > > Groxio, LLC. > > 512.799.9366 > > br...@grox.io > > grox.io > > > > -- > > 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/CAFXvW-65ztTOMoVhZ407PghmYA0OBcuVhDatcjYx6Xw7f52pMQ%40mail.gmail.com > > <https://groups.google.com/d/msgid/elixir-lang-core/CAFXvW-65ztTOMoVhZ407PghmYA0OBcuVhDatcjYx6Xw7f52pMQ%40mail.gmail.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/702CFF39-BCFF-416F-BF28-81A5E1516903%40chrismccord.com > > <https://groups.google.com/d/msgid/elixir-lang-core/702CFF39-BCFF-416F-BF28-81A5E1516903%40chrismccord.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/20190731104042.1b6a2fb4.eksperimental%40autistici.org.

Re: [elixir-core:9239] Re: Suggestion Add Rubys tally

2019-10-19 Thread eksperimental
The problem that I have with "frequencies" is that it means RATE over a PERIOD of time or some other unit. I like the move to a function name that uses nouns, instead of verbs. I think we should speak more of "repetition", "recurrence" or "occurrences", "instances" my two cents On Fri, 18 Oct

Re: [elixir-core:9286] Normalize compile errors and warnings

2019-11-27 Thread eksperimental
> Currently we have different ways to display errors or warnings during > compile time, we should normalize the output. I would say currently there is one way to displays errors and one way to display warnings. I think it is important to keep different formats to visually differentiate them

Re: [elixir-core:9130] Suggestion Add Rubys tally

2019-10-05 Thread eksperimental
Enum.group_count/2 would be a name that describe better what this function does IMO, but it wouldn't work as Enum.group_by/3 since this one groups by key, and group_count would group by elements ({key, value}) On Sun, 6 Oct 2019 01:09:06 +0700 eksperimental wrote: > The problem I h

Re: [elixir-core:9879] Proposal: Kernel.boolean/1

2020-12-25 Thread eksperimental
This will work: defguard to_boolean(term) when term not in [false, nil] On Wed, 23 Dec 2020 15:02:43 -0500 Austin Ziegler wrote: > It would be easy enough to provide this as a predicate in your own > code if that’s your style preference > > ```elixir > def boolean(falsy) when falsy in

Re: [elixir-core:9806] Proposal `Enum.more_than?/2` or `List.more_than?/2`

2020-12-03 Thread eksperimental
On Thu, 3 Dec 2020 19:06:18 -0500 Allen Madsen wrote: > Enum.compare_count([], 1) #=> :lt > Enum.compare_count([1], 1) #=> :eq > Enum.compare_count([1, 2], 1) #=> :gt This is the way to go, because in one function call we can determine the course of the action, such as in case

Re: [elixir-core:9854] Enum.fold/2 and Enum.fold/3

2020-12-09 Thread eksperimental
Looking back, I think having acc as the first argument would be have a better choice. But we have other functions named after "fold" such as List.foldl/3, List.foldr/3, Inspect.Algebra.fold_doc/2 that take a function in the same format as Enum.reduce/3. So having some fold functions that take a

[elixir-core:9857] Proposal: Add option to mix format to create .formatter.exs

2020-12-13 Thread eksperimental
It happens that when I want to update a project that has been created with an Elixir version prior to the introduction of the formatter, I need to manually copy a .formatter.exs file. So I need to create a new project and copy this file manually. What I propose is to add an option called

Re: [elixir-core:9873] Introduce guards in MapSet

2020-12-23 Thread eksperimental
On Mon, 21 Dec 2020 22:37:53 -0500 eksperimental wrote: > Hi list, > I would like to propose to convert two existing functions to guards in > the MapSet module. > > 1. Is MapSet.size/1. I found myself not being able to use this > function in guards, and having to port my c

[elixir-core:9862] Introduce guards in MapSet

2020-12-21 Thread eksperimental
Hi list, I would like to propose to convert two existing functions to guards in the MapSet module. 1. Is MapSet.size/1. I found myself not being able to use this function in guards, and having to port my code, unless I want to get into the bad habit of reading the internal structure of the struct

Re: [elixir-core:10007] Add Enum.every?

2021-01-21 Thread eksperimental
Adding Xavier's explanation to the documentation would be of great help, and easier to spot if they are contained in its own section. On Thu, 21 Jan 2021 14:28:00 + Mário Guimarães wrote: > I totally agree with Xavier. > > A qui, 21/01/2021, 13:33, Xavier Noria escreveu: > > > To me,

Re: [elixir-core:9992] Add Enum.every?

2021-01-21 Thread eksperimental
This version would be more idiomatic: `not Enum.empty?(enumerable) and Enum.all?(enumerable, &(&1 == :some))` If were were to choose a name for the new functions I would go with `Enum.every_one?(enumerable, fun)` On Thu, 21 Jan 2021 07:04:43 + Anil Kulkarni wrote: > Given that the

Re: [elixir-core:10000] Add Enum.every?

2021-01-21 Thread eksperimental
The use-case is totally fair. I would not consider it an edge-case. +1 for adding the `on_empty: boolean` option On Thu, 21 Jan 2021 10:00:02 -0300 Randson wrote: > Yeah, I agree with you guys. The words are synonyms and I think we > can add an option to all?/2, where default for breaking

Re: [elixir-core:9991] Proposal: Mix.install

2021-01-21 Thread eksperimental
`Mix.install(:decimal)` should also work out of the box IMO. On Thu, 21 Jan 2021 03:18:44 -0800 (PST) "woj...@wojtekmach.pl" wrote: > A minor addition: I'd like to add a shortcut so you can write > `Mix.install([:decimal])` instead of `Mix.install([{:decimal, ">= > 0.0.0"}])`. > > > The

Re: [elixir-core:9961] [Proposal] Surface Erlang's maps:map function

2021-01-14 Thread eksperimental
Thank you José and Michal for your input. I will write a benchmark then and see if there is room for improvement. On Thu, 14 Jan 2021 09:45:51 +0100 José Valim wrote: > Eksperimental, it is faster to build a list and call maps:from_list/1 > than build the map as we go forward. > >

Re: [elixir-core:9963] [Proposal] Surface Erlang's maps:map function

2021-01-14 Thread eksperimental
usability of > Elixir on map transformation. > > A different question: how can we make these rich Erlang functions > much more visible to Elixir users like myself? I don’t care that the > arguments are “backwards” from the pipeline, because `maps:map/2` is > _incredibly_ useful and

Re: [elixir-core:9964] Accessing the module name that implements a protocol

2021-01-14 Thread eksperimental
me it will be Protocol + Impl name. > > > On Thu, Jan 14, 2021 at 4:38 AM eksperimental > wrote: > > > I am working on a protocol, and I need to have access to the module > > that implements the protocol. For example, `Enumerable.List`. > > > > It is actu

Re: [elixir-core:9970] Accessing the module name that implements a protocol

2021-01-14 Thread eksperimental
This protocol has some behaviour callbacks, one of them is `empty/0`. So I cannot do MyProtocol.impl_for(term) because in that callback there is no term (I am returning a term though). https://github.com/eksperimental/buildable/blob/a2aa7658e58820472f56e7b1b7e3b3e2293c7950/lib/buildable

[elixir-core:9955] Accessing the module name that implements a protocol

2021-01-13 Thread eksperimental
I am working on a protocol, and I need to have access to the module that implements the protocol. For example, `Enumerable.List`. It is actually mentioned in the documentation, but I would like to know whether this is an implementation detail or a non-documented standard that I can rely on. In

Re: [elixir-core:9953] [Proposal] Surface Erlang's maps:map function

2021-01-13 Thread eksperimental
Great finding. Regardless the benchmarks, Map.new/2 should be optimized for maps using :maps.map/2, because as of now we are doing: map |> Enum.to_list() |> reduce list |> :lists.reverse() |> :maps.from_list() On Tue, 12 Jan 2021 14:09:26 -0800 (PST) "jonar...@gmail.com" wrote: > This usage of

Re: [elixir-core:9954] [Proposal] Surface Erlang's maps:map function

2021-01-13 Thread eksperimental
p, key, value) end) end It would be interesting to see how that benchmarks against :maps.map/2 when enumerable is a map. On Wed, 13 Jan 2021 14:49:59 -0500 eksperimental wrote: > Great finding. > Regardless the benchmarks, Map.new/2 should be optimized for maps > using :maps

Re: [elixir-core:10198] Proposal: Warn on duplicated specs

2021-04-05 Thread eksperimental
On Mon, 5 Apr 2021 09:48:21 -0400 Allen Madsen wrote: > @spec foo(1) :: "one" > @spec foo(2) :: "two" > def foo(1), do: "one" > def foo(2), do: "two" Yes, but those would not be duplicated. These would, and Dialyzer will error saying that "foo/1 has overlapping domains" @spec foo(1) :: "one"

[elixir-core:10194] Proposal: Warn on duplicated specs

2021-04-04 Thread eksperimental
Hi, I would like to propose that the compiler emits a warning when specs are duplicated. defmodule DuplicatedSpecs do @spec foo(arg) :: {:ok, arg} when arg: term @spec foo(arg) :: {:ok, arg} when arg: term def foo(term), do: {:ok, term} end The reason is that the duplicated line should

Re: [elixir-core:10196] Proposal: Warn on duplicated specs

2021-04-05 Thread eksperimental
On Mon, 5 Apr 2021 09:43:39 +0200 José Valim wrote: > This is most likely the job of Dialyzer and tools working on > typespecs to do. As they can do a better job at that. There are cases where specs may be used for documentation purposes only, and Dialyzer may not ever been run. I actually

Re: [elixir-core:10118] [Proposal] range pattern matching in case without when

2021-03-13 Thread eksperimental
On Sat, 13 Mar 2021 04:26:41 -0800 (PST) Igor Silva wrote: > Current behavior > > case ?a do > x when x in ?a..?z -> # code > x when x in ?A..?Z -> # code > _ -> # code > end > > Desired behavior > > case ?a do > ?a..?z -> # code > ?A..?Z -> # code > _ -> # code > end > >

Re: [elixir-core:10151] Ranges with steps

2021-03-22 Thread eksperimental
> 1. x..y and x..y..z won't be allowed in patterns (you will have to > match on %Range{}) José, wouldn't this be a backward incompatible introduction? Even if we still soft deprecated and emit a warning, there could be a lot of changes to do, since this is not just a function call that needs to

Re: [elixir-core:10155] Ranges with steps

2021-03-22 Thread eksperimental
On Mon, 22 Mar 2021 14:09:17 +0100 José Valim wrote: > > José, wouldn't this be a backward incompatible introduction? > > All code written today will still work. However, if you use the new > features (empty ranges or custom steps), then old code may not > process the range accordingly. So it

Re: [elixir-core:10154] Ranges with steps

2021-03-22 Thread eksperimental
On Mon, 22 Mar 2021 08:10:29 -0500 Amos King - Binary Noggin wrote: > I like the proposals using a different operator for the step. > `a..b\\c`? +1 on this one. Visually it is less confusing to have `1..100\\2` than to have `1..100..2` as it is easier to identify the range part, plus it keeps

Re: [elixir-core:10162] Proposal: Add return value to skip update in Access.get_and_update/3 callback

2021-03-22 Thread eksperimental
> Benchmark results. > - map: > https://gist.github.com/eksperimental/77d5c67427fed0a8a9e7eee21219febb > - keyword: > https://gist.github.com/eksperimental/1bac29e80fd8329940be2cc8e6b86d52 > > This is the repository for the benchmarks > https://github.com/eksperimental/

Re: [elixir-core:10160] Proposal: Add return value to skip update in Access.get_and_update/3 callback

2021-03-22 Thread eksperimental
o). The results took me by surprise for Maps. Benchmark results. - map: https://gist.github.com/eksperimental/77d5c67427fed0a8a9e7eee21219febb - keyword: https://gist.github.com/eksperimental/1bac29e80fd8329940be2cc8e6b86d52 This is the repository for the benchmarks https://github.com/eksp

[elixir-core:10123] Proposal: Add return value to skip update in Access.get_and_update/3 callback

2021-03-19 Thread eksperimental
I have noticed that there are times that based on the get value, there is no need to update the data, and we have just to pass the same data back. So in addition to `:pop` I propose to add `:keep` or `:skip`. This will optimize things quiet a not only in {Map, Keyword}.get_and_update/3 but aslo

Re: [elixir-core:10101] [Proposal] Integer.parse/2 should handle leading whitespace

2021-03-08 Thread eksperimental
It is documented. > If successful, returns a tuple in the form of `{integer, > remainder_of_binary}`. The spec could be improved to reflect this though On Mon, 8 Mar 2021 10:13:29 -0500 eksperimental wrote: > It is not documented, > but it does not trim your string, what is does

Re: [elixir-core:10099] [Proposal] Integer.parse/2 should handle leading whitespace

2021-03-08 Thread eksperimental
It is not documented, but it does not trim your string, what is does is to parse the first integers it finds, and returns the remainder of the string as the second element of the tuple. iex> Integer.parse("2ABC") {2, "ABC"} On Mon, 8 Mar 2021 07:04:54 -0800 (PST) Izzy Elwyn wrote: > Hello,

[elixir-core:10631] Proposal: Emit warning on public functions without a proper function signature

2021-12-19 Thread 'eksperimental' via elixir-lang-core
Hi all, Since documentation is taken seriously in Elixir, I would like to propose to emit a warning when a public function does not a have a proper/complete function signature. I describe an improper fucntion signature would look like this in your IEx/ExDoc documenation:

Re: [elixir-core:10649] Introduce let and reduce qualifiers to for

2021-12-20 Thread 'eksperimental' via elixir-lang-core
{:error, _reason} = error -> {error} > >>> end > >>> end > >>> > >>> Even if it did, it's not doing a great job of communicating the > >>> intent and still potentially requires a Enum.reverse call. The > >>> intent here is "early e

Re: [elixir-core:10650] Introduce let and reduce qualifiers to for

2021-12-20 Thread 'eksperimental' via elixir-lang-core
Not necessarily that they are replaceable, but that pattern of :cont, :halt, :suspend is most commonly used via Enumerable.reduce On Mon, 20 Dec 2021 19:18:53 -0500 "'eksperimental' via elixir-lang-core" wrote: > > I have found only one usage of Enum.reduce_while in Elixi

Re: [elixir-core:10665] Introduce let and reduce qualifiers to for

2021-12-21 Thread 'eksperimental' via elixir-lang-core
On Tue, 21 Dec 2021 14:03:49 +0100 José Valim wrote: > 2. By declaring the variables that are part of reduce prior to the > generators, they can be used as part of the filters. So we can further > change the code above to this: So, the reduce() and let() part is going to be accepted only at the

Re: [elixir-core:10637] Proposal: Emit warning on public functions without a proper function signature

2021-12-20 Thread 'eksperimental' via elixir-lang-core
useful and they are always enabled. Or they are not always useful and > therefore it should not be the responsibility of the compiler to > enforce it. > > On Mon, Dec 20, 2021 at 2:31 PM 'eksperimental' via elixir-lang-core < > elixir-lang-core@googlegroups.com> wrote: > > > That is

Re: [elixir-core:10635] Proposal: Emit warning on public functions without a proper function signature

2021-12-20 Thread 'eksperimental' via elixir-lang-core
ing useful for libraries, I think it is a > > very strong imposition for applications and I don’t think it should > > be the job of the compiler to enforce it. > > > > So my suggestion is to implement this as linter/credo check. > > > > On Sun, Dec 19, 2021

Re: [elixir-core:10641] Introduce let and reduce qualifiers to for

2021-12-20 Thread 'eksperimental' via elixir-lang-core
The proposal is very concise, the only thing that would be problematic is the use of `reduce` for two different things, for <>, x in ?a..?z, reduce: %{} do acc -> Map.update(acc, <>, 1, & &1 + 1) end {sum, count} = for reduce({sum, count} = {0, 0}), i <- [1, 2, 3] do sum = sum + i

Re: [elixir-core:10643] Introduce let and reduce qualifiers to for

2021-12-20 Thread 'eksperimental' via elixir-lang-core
t; Good point. I forgot to mention the :reduce option will be deprecated > in the long term. > > On Mon, Dec 20, 2021 at 7:53 PM 'eksperimental' via elixir-lang-core < > elixir-lang-core@googlegroups.com> wrote: > > > The proposal is very concise, > > the only thin

Re: [elixir-core:10530] Is `@__struct__` an implementation detail or a public API?

2021-11-19 Thread 'eksperimental' via elixir-lang-core
Sorry, that was the issue. This is the actual PR https://github.com/elixir-lang/elixir/pull/10354 On Fri, 19 Nov 2021 17:09:55 -0500 "'eksperimental' via elixir-lang-core" wrote: > Hi Marten, > You will find this PR interesting > https://github.com/elixir-lang/elixir/issue

Re: [elixir-core:10529] Is `@__struct__` an implementation detail or a public API?

2021-11-19 Thread 'eksperimental' via elixir-lang-core
Hi Marten, You will find this PR interesting https://github.com/elixir-lang/elixir/issues/10352 Cheers, - Eks On Fri, 19 Nov 2021 14:00:40 -0800 (PST) "w...@resilia.nl" wrote: > Hi all! > > I recently needed to check what fields for a struct were defined (if > any) for a particular module, at

[elixir-core:10566] Proposal: disable doctests per doc entry

2021-12-09 Thread 'eksperimental' via elixir-lang-core
file and have to switch back and forth to make sure of this. I would like to focus on my module and know whether I can write invalid doc tests or not. Please let me know what you thing about this, - Eksperimental -- You received this message because you are subscribed to the Google Groups

Re: [elixir-core:10574] Re: Proposal: disable doctests per doc entry

2021-12-10 Thread 'eksperimental' via elixir-lang-core
1 + 1 > 2 > > On Thursday, December 9, 2021 at 3:44:55 PM UTC+1 eksperimental wrote: > > > Hi list, > > documenting functions made me realize the need to be able to disable > > doctests per documentation entry. So I would like to propose the > > addition

Re: [elixir-core:10576] Proposal: disable doctests per doc entry

2021-12-10 Thread 'eksperimental' via elixir-lang-core
he test file, passing the > > :exclude > > or :only options to `doctest`, I find it inconvenient to define what > > gets doctested in another file and have to switch back and forth to > > make > > sure of this. > > I would like to focus on my module and know whet

Re: [elixir-core:10817] Proposal: Add support for list of strings in String.{trim, trim_leading, trim_trailing}

2022-03-02 Thread 'eksperimental' via elixir-lang-core
When starting to work in this implementation was wondering what should be the return value of String.trim_leading("--__--abc", [" ", "-", "_"]) and I realized that it should mimic String.replace_leading/3 Therefore it should returning "abc" Which leads me to think we should introduce

Re: [elixir-core:10819] Proposal: Add support for list of strings in String.{trim, trim_leading, trim_trailing}

2022-03-02 Thread 'eksperimental' via elixir-lang-core
to the behaviour of trim_leading/1 and trim_trailing/1). So we > could add trim_prefix/2 and trim_suffix/2, but then it is > inconsistent with other trim* functions. So unless there is a strong > reason for adding this, rather than consistency, I would not go this > route. > &

Re: [elixir-core:10821] Proposal: Add support for list of strings in String.{trim, trim_leading, trim_trailing}

2022-03-02 Thread 'eksperimental' via elixir-lang-core
place equivalents. Shall we go this route for > now? Please open up an issue and feel free to submit a PR. :) > > I am not convinced on trim_prefix/trim_suffix yet though, but you can > use the replace functions to achieve the same. > > On Wed, Mar 2, 2022 at 7:11 PM 'eksperiment

Re: [elixir-core:10841] [Proposal] Introduce `last` and `init` functions to Kernel

2022-03-24 Thread 'eksperimental' via elixir-lang-core
We already have List.last/1-2 On Thu, 24 Mar 2022 06:24:24 -0700 (PDT) Weslei Juan Novaes Pereira wrote: > As Elixir has the `hd` and `tl` functions, it'd be very useful to > have a `init` and `last` functions as well. For example: > > last: takes a list and returns its last element. > iex>

Re: [elixir-core:10748] Proposal: Allow `describe` blocks in ExUnit test to be skipped

2022-02-03 Thread 'eksperimental' via elixir-lang-core
It totally slipped my mind. I will update the docs to make this more noticeable, as of now if you look for "skip" the only relevant information is for skipping tests, not modules or describe blocks. Thank you Wojtek, On Thu, 03 Feb 2022 15:50:49 +0100 Wojtek Mach wrote: > This is already

[elixir-core:10746] Proposal: Allow `describe` blocks in ExUnit test to be skipped

2022-02-03 Thread 'eksperimental' via elixir-lang-core
Currently `@tag :skip` is only effictive in tests, but if I have a describe block with 10 test, i need to add the tag to each one individually. So I propose for the describe blocks to support the skip tag to ease development testing. -- You received this message because you are

[elixir-core:10727] Proposal: Add support for list of strings in String.{trim, trim_leading, trim_trailing}

2022-01-25 Thread 'eksperimental' via elixir-lang-core
Hello everyone, Currently the second argument of funtions String.{trim, trim_leading, trim_trailing}/2 can only be a string. I would like Elixir to support a list of strings to be trimmed, such as: String.trim_leading(tag_name, ["OTP_", "OTP-"]) There is a precedent of other functions

Re: [elixir-core:10729] Proposal: Add support for list of strings in String.{trim, trim_leading, trim_trailing}

2022-01-26 Thread 'eksperimental' via elixir-lang-core
On Tue, 25 Jan 2022 18:33:08 +0100 José Valim wrote: > Yes, I think those would be consistent additions! > I will try to submit a PR this week then. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop

  1   2   >