Re: [elixir-core:11727] [Proposal] introduce with_env in ExUnit

2024-03-29 Thread Andrea Leopardi
You could experiment with a library that does this: - Provides alternatives for System.get_env/2 and friends to use in their place - Uses https://github.com/dashbitco/nimble_ownership to set and retrieve env in tests, to allow for asynchronous tests However, system env is still global state. At

Re: [elixir-core:11708] [Proposal] Adding Access.find/1

2024-03-20 Thread Andrea Leopardi
Right now I’m a bit drowning in work but IIRC there already was a proposal for this, has anyone searched the mailing list? On Wed, Mar 20, 2024, at 12:17 AM, Jean Klingler wrote: > I like it. It would be to `Access.filter` what `Enum.find` is to > `Enum.filter`. > I think it would be a nice

Re: [elixir-core:11491] [Proposal] mix build task

2023-07-14 Thread Andrea Leopardi
I'd be super ok with "mix setup" as a standard-ish name, to be clear. :) And I think "mix setup" followed by "iex" or whatever would be good too. > On 14 Jul 2023, at 11:43, Wojtek Mach wrote: > > >> - People new to Elixir just checking out a project from source and trying to >> see if it

Re: [elixir-core:11485] [Proposal] mix build task

2023-07-14 Thread Andrea Leopardi
I personally like the idea of a mix build alias defined by mix new. The reason is that, while mix build is usually different for different projects, I like the idea of standardizing on the terminology "build". > On 13 Jul 2023, at 21:21, Jonathan Arnett wrote: > > I'm definitely open to

Re: [elixir-core:10886] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread Andrea Leopardi
ou for the proposal, however I would prefer to not add this behaviour. >> >> It is definitely possible to do it today and at the same time we don't want >> to encourage excluding some files, unless absolutely necessary. And for the >> cases it is absolutely necessary, the current ways

Re: [elixir-core:10882] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread Andrea Leopardi
Hey Ignacio, thanks for the proposal. I don't feel too strongly about this, but I think it could be a useful addition. One note: I think :exclude should rather be exclude_pattern and be a regex. If an expanded filename matches the regex, it gets excluded. I think having a wildcard limits us

Re: [elixir-core:10847] Re: [Proposal] `start_link_supervised`

2022-03-31 Thread Andrea Leopardi
ver direction we want to go. > > On Wed, Mar 30, 2022 at 7:53 AM Andrea Leopardi wrote: >> Hey there, >> >> I like this idea. I don't feel strongly on whether this is a new pair of >> functions (start_supervised_link/2 and start_supervised_link!/2) or if this >> is

[elixir-core:10845] Re: [Proposal] `start_link_supervised`

2022-03-30 Thread Andrea Leopardi
Hey there, I like this idea. I don't feel strongly on whether this is a new pair of functions (start_supervised_link/2 and start_supervised_link!/2) or if this is a callout in the docs for the existing start_supervised* functions, but I like the idea of having one of those two  If others in

Re: [elixir-core:10839] [Proposal] Add auto-formatting of alias/import/use statements to mix format

2022-03-18 Thread Andrea Leopardi
Hey Tim, thanks for the proposal. As Wojtek mentioned, a strict goal of "mix format" is to never change the AST. This means that, in principle, we should not reorder statements. In this particular case though, we have a much bigger issue: these statements might depend on each other. Take this

Re: [elixir-core:10581] Proposal: Map.replace/3 with a (map, key, fun) option

2021-12-12 Thread Andrea Leopardi
the "_lazy" suffix, which is about invoking a function. So far, the lazy > suffix is "if such key does not exist, invoke this", but I think it would > work on "replace_lazy" such as, "invoke this function only if the key exists". > > Thoughts?

Re: [elixir-core:10579] Proposal: Map.replace/3 with a (map, key, fun) option

2021-12-11 Thread Andrea Leopardi
I really like this and was thinking about this just yesterday, but was struggling to come up with a name. I was thinking of "update_if_existing" but "replace_with" is actually fantastic, follows our conventions, and sounds great. Awesome job!! If others on the core team agree, I think you could

Re: [elixir-core:10354] Base45 Encoding / Decoding

2021-06-23 Thread Andrea Leopardi
Hey Jonatan! This looks very interesting. As you mentioned, I think this would be great as a library for now until the RFC gets stable so that the Elixir standard library won't have to adapt and support potentially outdated draft specs. Thoughts? Andrea On Wed, Jun 23, 2021 at 11:24 AM Jonatan

Re: [elixir-core:10175] [Proposal] I'd like this => _all_env!/1

2021-03-29 Thread Andrea Leopardi
Hi Michael, could you please go into more detail about this proposal, including exact behavior of the new function as well as practical use cases? Thanks! Andrea On Mon, 29 Mar 2021 at 02:21, Michael Pope wrote: > May I code it up and submit a PR? > > Cheers! > Michael > > On Sunday, March

Re: [elixir-core:9911] Validating keywords keys

2020-12-29 Thread Andrea Leopardi
Considering how straightforward the code you showed is, and that for more complex scenarios we have libraries like nimble_options, I might be slightly hesitant to add this to core. Andrea On Wed, 30 Dec 2020 at 08:53, José Valim wrote: > Hi everyone, > > I am working on a new project and

Re: [elixir-core:9886] import a function having default values: we must specify each arity used

2020-12-26 Thread Andrea Leopardi
:* has precedents in Elixir for formatter stuff for example, so I say stick with it  On Sat, 26 Dec 2020 at 11:19, José Valim wrote: > Good points Devon. Do you think using :* makes it explicit and consistent > enough, or still not worth it in your opinion? > > On Sat, Dec 26, 2020 at 11:11

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

2020-12-23 Thread Andrea Leopardi
What's the particular advantage of "to_boolean(term)" over "not is_nil(term)"? That it supports also booleans, which however could be used directly in predicates? Andrea On Wed, Dec 23, 2020 at 4:32 PM Moxley Stratton wrote: > Here are examples: > > def has_access? do >

Re: [elixir-core:9730] Proposal: Enum.zip/3

2020-10-07 Thread Andrea Leopardi
+1 for "zip_with" naming On Wed, Oct 7, 2020 at 3:40 PM José Valim wrote: > Yes, please. I believe it is conventionally called Enum.zip_with/3, so > perhaps we should go with the same name? > > On Wed, Oct 7, 2020 at 3:36 PM ad...@a-corp.co.uk > wrote: > >> Hello, >> >> Would the community be

Re: [elixir-core:9598] Proposal: ExUnit.Callbacks.tmp_dir!/0

2020-06-27 Thread Andrea Leopardi
Personally, given the gotchas you mentioned, I feel like it's easy enough to do this manually in a setup block that it doesn't warrant more stuff added to stdlib. Andrea On Sat, 27 Jun 2020 at 13:19, Wojtek Mach wrote: > It’s common to create temporary directories for tests, ideally a unique >

Re: [elixir-core:9589] Shouldn't empty if .. do ..else blocks give a compilation error instead ?

2020-06-24 Thread Andrea Leopardi
It can't error out on compilation because it would be a breaking change. However, personally I'm not against a compilation warning here, but there's a chance we decided to not emit that for a reason that I can't recall right now  Andrea On Wed, 24 Jun 2020 at 13:19, Mário Guimarães <

Re: [elixir-core:9505] Proposal: implements?/2

2020-05-17 Thread Andrea Leopardi
Hey Thomas, do you have a specific use case in mind to check that a module implements a behaviour? The fact that you can do this today by getting the module attributes makes me lean towards not adding this to the standard library, but I'm curious as to that's the use case you're thinking of :)

Re: [elixir-core:9431] Add Turkish language support to things like `String.downcase/2` `String.upcase/2`.

2020-03-28 Thread Andrea Leopardi
Hey Cemre, > "ı" will be "I" This is already the case. You can try String.upcase("ı") == "I". In any case, Elixir uses the Unicode standard to do upcasing and downcasing. Do other languages that support Unicode behave differently for these letters? Andrea On Sat, Mar 28, 2020 at 6:02 PM Cemre

Re: [elixir-core:9348] add subtract functions in date-related modules to increase readability?

2020-01-31 Thread Andrea Leopardi
be a readability concern. Personally, I feel like using "add/2" and negating the second argument is clear enough that it doesn't warrant an additional function to the date-related modules. Cheers, Andrea Leopardi an.leopa...@gmail.com On Thu, Jan 30, 2020 at 1:42 PM Thomas J. wrote

Re: [elixir-core:9334] Allow get_env/2 and get_env/3 to accept not only key but also path (same as compile_env)

2020-01-27 Thread Andrea Leopardi
roups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/8a370017-815f-4ea5-a288-c0c87489f775%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/8a370017-815f-4ea5-a288-c0c87489f775%40googlegroups.com?utm_medium=email_source=f

Re: [elixir-core:9255] [Proposal] Create a sigil_P for PIDs, and use it for inspection

2019-10-24 Thread Andrea Leopardi
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-cor

Re: [elixir-core:9075] Enum.strain and Stream.strain

2019-08-20 Thread Andrea Leopardi
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/bff44726-95f0-4e71-8783-a67bfad043ef%40googlegroups.com > <https://grou

Re: [elixir-core:9068] [Proposal] Map.filter/2 based on :maps.filter

2019-08-18 Thread Andrea Leopardi
> Why? How Enum.drop/2 is related to Enum.filter/2? They are doing completely different things. My bad, I was referring to Enum.reject/2! Andrea Leopardi an.leopa...@gmail.com On Sat, Aug 17, 2019 at 11:42 PM Roman Smirnov wrote: > Why? How Enum.drop/2 is related to Enum.fi

Re: [elixir-core:9061] [Proposal] Map.filter/2 based on :maps.filter

2019-08-15 Thread Andrea Leopardi
le.com/d/msgid/elixir-lang-core/CAAPY6eO5aDifRxHxv7QtD4%3Di_bYbUw1sphxMhq4jEjuR9naPSQ%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

Re: [elixir-core:9004] Elixir Hadoop integration

2019-07-31 Thread Andrea Leopardi
om/d/msgid/elixir-lang-core/1981f4af-ed1a-4ed5-9a24-3c3d12a0ebc3%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/1981f4af-ed1a-4ed5-9a24-3c3d12a0ebc3%40googlegroups.com?utm_medium=email_source=footer> > . > -- Andrea Leopardi an.leopa...@gmail.com -- You

Re: [elixir-core:8952] [Proposal] Document the Big-O complexity (time and space) of every collection and their functions

2019-07-18 Thread Andrea Leopardi
sion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4Je_JcgPxKo_rCtYkHhdUzT2HOtP5GeT%2BqVtXV6vXgPXQ%40mail.gmail.com > <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4Je_JcgPxKo_rCtYkHhdUzT2HOtP5GeT%2BqVtXV6vXgPXQ%40mail.gmail.com?utm_medium=email_s

Re: [elixir-core:8845] Re: Provide DateTime.from_iso8601!/2

2019-06-19 Thread Andrea Leopardi
} and get a MatchError). Andrea Leopardi an.leopa...@gmail.com On Wed, Jun 19, 2019 at 10:40 AM Fernando Tapia Rico wrote: > This has been suggested in the past. For example > https://github.com/elixir-lang/elixir/pull/6514 > > The main reason why there is not a bang variant is because

Re: [elixir-core:8843] Re: Provide DateTime.from_iso8601!/2

2019-06-19 Thread Andrea Leopardi
I can't see a reason why not to add this. I think a PR would be welcome! Andrea Leopardi an.leopa...@gmail.com On Mon, Jun 17, 2019 at 4:31 PM Mário Guimarães < mario.luis.guimar...@gmail.com> wrote: > The proposed function could be implemented like this > > def from_

Re: [elixir-core:8811] Suggestion for documenting defdelegate

2019-05-24 Thread Andrea Leopardi
Michal, TIL. Awesome, I'm looking forward to using this. No idea how I missed it, I suspect I just removed it from my memory lol Andrea Leopardi an.leopa...@gmail.com On Fri, May 24, 2019 at 11:30 PM José Valim wrote: > I think an “import See” at the top of the modules delegating wo

Re: [elixir-core:8805] Suggestion for documenting defdelegate

2019-05-24 Thread Andrea Leopardi
nRm4KT55uQMFn6t6xGFed%2BgSHFL%2BYUJ7BhieAx_ov_B5FJ4Q%40mail.gmail.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

Re: [elixir-core:8803] Suggestion for documenting defdelegate

2019-05-24 Thread Andrea Leopardi
.google.com/d/msgid/elixir-lang-core/d94f489a-74cc-4f79-9c77-d13a06d68123%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 sub

Re: [elixir-core:8756] Move dependencies into a separate file (e.g. deps.exs)

2019-05-10 Thread Andrea Leopardi
.exs is not worth that saved time IMO. Hopefully that makes things a little more clear. Cheers, Andrea Leopardi an.leopa...@gmail.com On Fri, May 10, 2019 at 11:19 PM 'boris kotov' via elixir-lang-core < elixir-lang-core@googlegroups.com> wrote: > Hi Andrea, > > this is not mea

Re: [elixir-core:8694] Bisect tests question

2019-04-20 Thread Andrea Leopardi
ster/lib/rspec/core/bisect >> >> This was useful when tests would fail in a mysterious way. This would >> give us some added introspection when it succeeded. It felt like a `git >> bisect` that was done automatically for you. >> >> On Wed, Apr 17, 2019 at 12:5

Re: [elixir-core:8691] Bisect tests question

2019-04-17 Thread Andrea Leopardi
I can't recall if this has been discussed before but I don't think it has. Could you expand in more detail what --bisect does? Andrea Leopardi an.leopa...@gmail.com On Wed, Apr 17, 2019 at 7:38 PM Paulo D Gonzalez wrote: > In my previous life ( :) ) I was able to use something that wo

Re: [elixir-core:8684] Proposal to add Registry function to get all keys

2019-04-17 Thread Andrea Leopardi
directly? It seems to be a lower abstraction than the concatenated list and the list is just an "Enum.to_list/1" call away for users. Andrea Leopardi an.leopa...@gmail.com On Wed, Apr 17, 2019 at 9:56 AM José Valim wrote: > I agree. Let's go ahead with what you have originally proposed. In

Re: [elixir-core:8657] Re: Proposal Tuple.ok/1 and Tuple.error/1

2019-04-16 Thread Andrea Leopardi
8d340%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 >>&g

Re: [elixir-core:8613] Missing tuple access idioms

2019-04-05 Thread Andrea Leopardi
, send >>> an email to elixir-l...@googlegroups.com. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/elixir-lang-core/da9cc177-513d-4683-8f4e-1c8b9c8286ca%40googlegroups.com >>> <https://groups.google.com/d/msgid/el

Re: [elixir-core:8569] New feature Enum.reverse_map

2019-03-31 Thread Andrea Leopardi
t; And also would Enum.map_reverse/2 not be even more optimized, although > performance was not my primary motivation. > -- > Non datemi consigli che so sbagliare da solo > (Giuseppe Di Stefano) > > > > On Sun, Mar 31, 2019 at 6:01 PM Andrea Leopardi > wrote: > >> Y

Re: [elixir-core:8567] New feature Enum.reverse_map

2019-03-31 Thread Andrea Leopardi
this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/a4fe903e-9661-448e-ba80-0b8cfc4f8bff%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/a4fe903e-9661-448e-ba80-0b8cfc4f8bff%40googlegroups.com?utm_medium=email_source=footer>

Re: [elixir-core:8555] [Proposal] More info when mix format --check-formatted have failed

2019-03-22 Thread Andrea Leopardi
elixir-lang-core/42dd75b1-a6ad-445b-845b-5df89cc4c5fe%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

Re: [elixir-core:8550] Re: Proposal: ex_unit test data provider

2019-03-18 Thread Andrea Leopardi
p 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/36931be4-2d15-435b-8d64-f9829f6a0dac%40googlegroups.com > <https://groups.google.com/d

Re: [elixir-core:8540] [Proposal] Simplify @spec def and @spec defp for efficiency and maintenance purpose

2019-03-14 Thread Andrea Leopardi
ecdef like you proposed would suggest that types are something baked into the language instead. Hopefully this helped clarify the situation. Andrea Leopardi an.leopa...@gmail.com On Thu, Mar 14, 2019 at 10:10 AM wrote: > Hi Louis > Thanks for your reply, but I was more thinking of the be

Re: [elixir-core:8519] Re: Proposal for System.get_env!

2019-03-01 Thread Andrea Leopardi
I'm working on it, PR will be up in a few minutes. Andrea Leopardi an.leopa...@gmail.com On Fri, Mar 1, 2019 at 10:00 AM José Valim wrote: > I agree. But it should be called System.fetch_env!/2 and we should have > System.fetch_env/2 too. PR is welcome. > > &

Re: [elixir-core:8483] Re: [Proposal] Support function captures without the need for any argument

2019-02-15 Thread Andrea Leopardi
> 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/a8c88a03-3a3a-4161-bbe4-52f24e1592e9%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/a8c88a03-3a3a-4161-bb

Re: [elixir-core:8471] Re: [Proposal] Add invert() method to Map module

2019-02-07 Thread Andrea Leopardi
ave been created in the Ruby >> community. >> >> -- > 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-c

Re: [elixir-core:8441] [Proposal] Map.drop : friendlier error message if atom given instead of list

2019-01-12 Thread Andrea Leopardi
801-c0d9-41ea-947a-8c3ee483c76a%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/550f8801-c0d9-41ea-947a-8c3ee483c76a%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Andrea Leopardi an.leopa

Re: [elixir-core:8297] GenStage, Plug, Hooks, ...

2018-09-17 Thread Andrea Leopardi
post might be a better fit for the Elixir Forum ( https://elixirforum.com), where discussions similar to this happen daily. Andrea Leopardi an.leopa...@gmail.com On Mon, Sep 17, 2018 at 12:12 PM Manuel Rubio wrote: > Hello, > > I was thinking to create a system which let me to

Re: [elixir-core:8231] Proposal: Add @safe_in attribute to enable compile time warnings for "private" modules.

2018-08-01 Thread Andrea Leopardi
, [...]). Not saying I am in favour or opposed to this feature, but I think it would be fine to implement from a consistency standpoint. Andrea Leopardi an.leopa...@gmail.com On Wed, Aug 1, 2018 at 6:25 PM 'Justin Wood' via elixir-lang-core < elixir-lang-core@googlegroups.com> wrote: &

Re: [elixir-core:8017] A better pattern matching

2018-05-22 Thread Andrea Leopardi
a2-adfb-d1dd7c4223f5%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/9be39b53-4884-4ca2-adfb-d1dd7c4223f5%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Andrea Leopardi a

Re: [elixir-core:7919] Re: [Proposal] Create maybe(t) typespec

2018-02-27 Thread Andrea Leopardi
ion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/3b39e876-4286-4602-955a-de513d4dfc27%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/3b39e876-4286-4602-955a-de513d4dfc27%40googlegroups.com?utm_medium=email_source=footer> > .

Re: [elixir-core:7896] [Proposal] Mix flag to tune deprecations warning

2018-02-24 Thread Andrea Leopardi
), do: :chunk_every, else: :chunk defp enum_chunk_every(enum, n), do: apply(Enum, unquote(chunk_every), [enum, n]) or something along those lines. Andrea Andrea Leopardi an.leopa...@gmail.com On Sat, Feb 24, 2018 at 2:59 AM, José Valim <jose.va...@gmail.com> wrote: > The issue is th

Re: [elixir-core:7728] Proposal: mix compile to have --no-warnings option

2018-01-02 Thread Andrea Leopardi
). Hope this clarifies a bit :) Andrea Leopardi an.leopa...@gmail.com On Tue, Jan 2, 2018 at 10:52 AM, Syed Murtza <syed.mur...@gmail.com> wrote: > I think we don’t have to add this because every time I see warnings it > reminds me to cleanup the code base and on a large project

Re: [elixir-core:7667] [Proposal] Enhancing the standard Logger interfaces with application-specific logging

2017-12-08 Thread Andrea Leopardi
llowing you to >>>>>>>> opt in on package or class level (also hugely popular). >>>>>>>> - Rust's official logging framework defaults to actually hiding all >>>>>>>> logging, making you explicitly ask to see logs (of any kind).

Re: [elixir-core:7604] Re: [Proposal] Introduce is_positive/1 and is_negative/1 macros

2017-11-22 Thread Andrea Leopardi
is_nil/1 is harder to justify for me and I get that it could be implemented as "== nil". As for is_odd/1 and is_even/1, have a look at they implementation. They are implemented in a faster but more obscure way than the simple "rem() == 0" or "rem() == 1". Andrea

Re: [elixir-core:7591] [Proposal] Introduce is_positive/1 and is_negative/1 macros

2017-11-19 Thread Andrea Leopardi
on on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/1d9f2250-9783-4af8-b2bb-9c0379f3b122%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/1d9f2250-9783-4af8-b2bb-9c0379f3b122%40googlegroups.com?utm_medium=email_source=footer> > . > For mor

[elixir-core:7381] StreamData: data generation and property testing for Elixir

2017-08-11 Thread Andrea Leopardi
Hello folks, I am super excited to finally share what I've been working on in the last few months: StreamData , an Elixir library for data generation and property testing. StreamData is a candidate to be included in Elixir itself but we wanted to

Re: [elixir-core:7349] [[Proposa]] Nested functions

2017-08-02 Thread Andrea Leopardi
d-039d391c879b%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/5c89cded-89a6-4ea5-befd-039d391c879b%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Andrea Leopardi an.leopa...@gm

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

2017-05-08 Thread Andrea Leopardi
FWIW, when I need to test messages today I use `receive` in doctests as well. On May 8, 2017, 6:35 PM +0200, eksperimental , wrote: > I see your point. But I think it would simplify things if what's available in > IEx is available > in doctests, since that's the

Re: [elixir-core:7086] Proposal: `Enum.filter_map/2`

2017-04-26 Thread Andrea Leopardi
I tend to use Enum.flat_map/2 for that and return [element] instead of {:keep, _} and [] instead of :ignore. It may be a bit slower because of the flattening, but it's never been the bottleneck (or even noticeable) in any code I wrote. On Apr 26, 2017, 12:42 PM +0200, Łukasz Niemier

Re: [elixir-core:6697] I think the new 1.4 warning about missing () on zero arity functions is a cure that's worse than the disease

2016-12-05 Thread Andrea Leopardi
t strictly related, but this is the same reason why I always use parens on 0-arity functions called on a module that is stored in a variable, such as my_module.my_fun(), in order to avoid the cognitive load of having to find out if my_module is a module or a map. Andrea Leopardi an.leopa...@gmail.c

Re: [elixir-core:6583] Queue module ?

2016-11-10 Thread Andrea Leopardi
Also, https://groups.google.com/forum/#!searchin/elixir-lang-core/queue%7Csort:relevance/elixir-lang-core/zvsBt6ndLwk/lOTUHFEcBQAJ :) Andrea Leopardi an.leopa...@gmail.com On Thu, Nov 10, 2016 at 3:12 PM, Michał Muskała <mic...@muskala.eu> wrote: > What's wrong with using the erlan

Re: [elixir-core:6145] Feature Request: @see_also attribute

2016-07-24 Thread Andrea Leopardi
email to elixir-lang-core+unsubscr...@googlegroups.com > <javascript:;>. > > > To view this discussion on the web visit > > > > https://groups.google.com/d/msgid/elixir-lang-core/20160719054127.7a04ed2d.eksperimental%40autistici.org > > > . > > > For more options, visi

Re: [elixir-core:6058] Proposal: Add optional `into:` argument to Enum.map

2016-07-07 Thread Andrea Leopardi
1-48ea-8db0-6d2e9e700473%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/23c345b9-9ba1-48ea-8db0-6d2e9e700473%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Andrea Leopardi an.l

Re: [elixir-core:5867] Test grouping and named setups

2016-05-27 Thread Andrea Leopardi
om');> >> . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JpFn-%3DGkG_Ya-w64Qqt7OoworqUSAUgzqgWtTFU1fyrw%40mail.gmail.com >> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JpFn-%3DGkG_Ya-w64Qqt7OoworqUSAUgz