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
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/el
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 of support for:
`@doc doctest: false`
`@moduledoc doctest: false`
`@typedoc doctest: false`
(In the same fashion as we declare guard
That's a nice trick Eric.
I didn't now about it, it formats well in ExDoc, with the exception that
">" is not hightlighted and it is selectable., but I can create a
feature request for MakeUp.
So far the only way I knew to disable it is not to use `iex>`
altogether.
Thank you
On Fri, 10 Dec 2021
That is pretty much what I was using (it is what we use in Elixir core
when an exception is raised),
the issue with that is the it does not play out well with multi-line
return values, which was my use case, and therefore this proposal.
On Fri, 10 Dec 2021 14:42:51 +0100
Wojtek Mach wrote:
> A
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:
your_function_name(arg
s being 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, De
ey 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:
>
> >
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
cou
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
ok, [bar | bars]}}
> >>> {: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
&
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_whil
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
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 takin
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
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 subscrib
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 possib
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 Stri
example, it
> it 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
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 'eksper
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> las
Hi group.
When working on sorting some data I realized that after sorting the
enumerable, I had to map and iterate again to do a data transformation
of the elements.
So I look for a function that would already do this and I cannot find
it. So by looking at the source code
https://github.com/elixi
> @spec word() :: boolean()
Hi Boris,
So if there is a function `word/0` how would you know this spec refers
to word/1 and not word/0?
On Thu, 2 Jun 2022 17:16:45 +0300
Boris Kuznetsov wrote:
> Currently, if you want to add spec to functions, you have to use
> @spec with a function name to de
Hi,
Currenly import/1 allows us to import :functions, :macros, :sigils with
the :only option.
I have found myself to manually have to list every guard I want to
import from my "Util" module. This has been a recurring issue.
I think it will be a good addition given the nature of guards that
since t
As of now, when you define a guard with `defguard` it adds the
attribute: `@doc guard: true`, we could include guards that are defined
with `defguard` and any other macros with this attribute set. Or we
could introduce a new attribute for identifying guards, as @doc seems
limited to documentation
> Would you think it would make sense to _exclude_ any 'guard macros'
> either NOT defined with `defguard` nor having whatever relevant
> attribute there might be?
How would you make the distinction between a guard and a regular macro?
> I'm trying to think how useful this
> request/proposal mig
You need to use is like this.
iex(1)> ["a","b","c"] |> Enum.any?(&String.valid?/1) |> Kernel.!()
false
iex(2)> !( ["a","b","c"] |> Enum.any?(&String.valid?/1))
false
On Wed, 22 Jun 2022 10:26:57 -0700
Kurtis Rainbolt-Greene wrote:
> While quippy `!Enum.any?` also just doesn't work
Hi Julian.
It think it is a good addition.
It is also analog to String.contains?/2
On Fri, 15 Jul 2022 04:58:59 -0700 (PDT)
Julian Somoza wrote:
> Hi everyone, I was working on a suggestion to add a new function on
> the List module in order to find out if a given sublist is inside
> another li
Hi Nikola
Have you tried?
`setup(context), do: Module.function_name(context)`
Cheers.
On Sun, 5 Feb 2023 03:21:12 -0800 (PST)
Nikola Begedin wrote:
> Hello everyone. 1st time writing here. I scanned through the repo
> docs, etc, and I'm not finding a guideline on how to do it. Apologies
> if I
On Sun, 12 Feb 2023 14:52:37 -0800 (PST)
Jose Vargas wrote:
> There is module-level *setup* and module-level *setup_all*
> There is describe-level *setup* but there is no describe-level
> *setup_all*
>
> I find it would be convenient to have *describe* level *setup_all*.
>
> Right now the solut
Hi Jose Vargas,
You can use tags as described in the `ExUnit.Callbacks` module docs:
Finally, as discussed in the ExUnit.Case documentation, remember that
the initial context metadata can also be set via @tags, which can then
be accessed in the setup block:
defmodule ExampleTagModificationTest d
Hi Ignacio. Thanks for the proposal.
I have been longing this feature for a long time as I have to end up
doing a mental subtraction every time. This is something that hits me
quite a few times a day, when I do something like:
`mix test --only bar` or `mix test --except bar`.
On Fri, 31 Mar 202
32 matches
Mail list logo