In my not so long professional experience with elixir, you don't write bare
receive/after, usually it comes in some form of genserver callbacks. I agree
that after clause not being pattern matching is confusing, but it's a fair
trade-off to keep language at least visually consistent, and also
lang/otp/pull/6963.
>
>
> Le dim. 24 mars 2024 à 01:50, 'Rudolf Manusadzhian' via elixir-lang-core <
> elixir-l...@googlegroups.com> a écrit :
>
>> Hi there! Might be a naive question.
>>
>> Why don't we treat all local captures as external? Like at compile time,
ne
> remains very small: https://github.com/erlang/otp/pull/6963.
>
>
> Le dim. 24 mars 2024 à 01:50, 'Rudolf Manusadzhian' via elixir-lang-core <
> elixir-l...@googlegroups.com> a écrit :
>
>> Hi there! Might be a naive question.
>>
>> Why don't w
21f3b19f8af9d9d63a30618cdafeaa6367883#diff-3a3b83d8acad1d3b6faed87ba471843f4424b22c26c179bf1d86a87a880e8223R74-R93
>
> Even though, as far as I know, recent versions of Erlang
> have optimizations to make sure the overhead of lambdas like this one
> remains very small: https://github.com/erlang/otp/pull/6963.
>
>
> Le dim. 2
ch/4
<https://hexdocs.pm/telemetry/1.2.1/telemetry.html#attach/4> and the
suggestion to avoid using *local* captures raise that thought.
If that's not possible, does it make sense to add a note in the docs
Kernel.SpecialForms.&/1
# Capture
<https://hexdocs.pm/elixir/1.16.2/Kernel.Spec
l.
Best regards,
Oliver
On Saturday, January 27, 2024 at 7:08:20 PM UTC+1 gva...@gmail.com wrote:
> On Jan 26, 2024, at 10:52 PM, Robert Viragh wrote:
> >
> > As a user of Elixir, it seems to me that I can write ternary expressions
> in Elixir by treating the if statement as an e
` in the future to mirror `at!` as well.
>
> On Wed, Mar 20, 2024 at 12:00 PM 'oliver....@googlemail.com' via
> elixir-lang-core wrote:
>
>> This is what I found:
>>
>> From the original PR: https://github.com/elixir-lang/elixir/pull/6634
>> (this has a len
This is what I found:
>From the original PR: https://github.com/elixir-lang/elixir/pull/6634 (this
has a lengthy discussion on the merits).
The original discussion about including
both: https://groups.google.com/g/elixir-lang-core/c/LlZCz0iYgfc/m/5XLRvg8XAgAJ
(not very detailed, discuss
r`.
> I think it would be a nice addition as it can express operations that
> would be quite verbose otherwise.
>
> Le mer. 20 mars 2024 à 02:30, 'oliver@googlemail.com' via
> elixir-lang-core a écrit :
>
> Hi.
>
> I already made a PR but was redirected here. ;-)
>
: 10}, %{name: "francine", salary:
30}]
iex> get_in(list, [Access.find(&(&1.salary >= 50)), :name])
nil
iex> get_and_update_in(list, [Access.find(&(&1.salary >= 50)),
:name], fn prev ->
...> {prev, String.upcase(prev)
I quickly checked how a persistent term cached implementation would
compare, which turned out to perform almost equivalent. It seems
the :re.version and :erlang.system_info(:endian) values are already cached.
```elixir
defmodule RegexPersistent do
def version do
case :persistent_term.get
The benchmark results I'm getting are indeed not as dramatic as the fprof
results, but on the other hand also more than the 5% mentioned in the PR
which introduced the check: https://github.com/elixir-lang/elixir/pull/9040
```elixir
regex = ~r/^([a-z][a-z0-9\+\-\.]*):/i
re_pattern
in `Regex.safe_run/3`
(https://github.com/elixir-lang/elixir/blob/b8fca42e58850b56f65d0fb8a2086f2636141f61/lib/elixir/lib/regex.ex#L533)
still performs the `:erlang.system_info/0` call.
On Thursday 14 March 2024 at 17:15:40 UTC+1 jan.k...@gmail.com wrote:
> I read the commit, and I do
Right, it would make using a Duration in combination with the `add/2-3`
functions much harder than it needs to be. So far all time units in Elixir
are singular, and I think we do gain something from consistently sticking
to that, regardless of the context of durations, calendar types and what
gt;> * Postgrex, Explorer, CLDR, etc all implement their own version of
>>>> durations
>>>>
>>>> Arguments for not having it in core: it happens that all of the
>>>> arguments above can also be solved without adding Duration to Elixir and,
&
a few examples:
- https://github.com/elixir-lang/elixir/pull/10199
- https://elixirforum.com/t/get-date-n-months-years-in-the-past/48346/3
-
https://elixir-lang.slack.com/archives/C0HEX82NR/p1709581478427009?thread_ts=1709368588.334759=C0HEX82NR
Furthermore the shift behaviour in the extremely
a common use case for someone starting a new project.
>
> If being git specific is an issue, could be just --vcs.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and
t;
> —Andrew
>
> On October 19, 2023, elixir-lang-core
> wrote:
>
> We have a need to trigger recompilation of a module when any file inside a
> directory is added or removed since we add the list of files at compilation
> time as a module attribute which is used in guard
directory,
but there might be better ways to do this.
If there is another already existing way to achieve the same please let me
know, maybe I'm just missing something!
Best regards, Alex.
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
nt you are looking for
resides. This means that random access is constant time or O(1) if you prefer.
Having a convenient syntax for this makes sense since the time complexity is so
low.
Linked lists, which Elixir and Erlang use, are not necessarily stored as a
single contiguous block of
> It was pointed out that perhaps we don't do this to express that indexing a
> list is not fast in Elixir like it is in other languages, but I'm not sure if
> that is sufficient reason IMO to leave out a typically very standard feature
> of lists.
>
> Thoughts?
Can y
:
> Elixir for https://hacktoberfest.com/? ?
> [September is the perfect time to prepare for Hacktoberfest. Get a jump start
> by finding projects to contribute to, adding the ‘hacktoberfest’ tag to your
> projects, or familiarizing yourself with Git.](https://hacktoberfest.com/)
&g
any were executed
> successfully instead:
> 7 tests, 1 failure, 1 passed, 1 excluded, 4 invalid
>
> I didn't want to open a PR without your feedback but here is some POC
> https://github.com/elixir-lang/elixir/compare/main...iaguirre88:elixir:report-number-of-executed-tests?expand
ok at this syntax and say
"This is field punning". I would have no intuition what is going on.
Speaking as someone that has a decent amount of Elixir experience,
$"bar" looks like it should be closer in functionality to :"bar" than
field punning. Or maybe even similar to usi
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
Could you provide an elixir example with proposed new syntax, for those who is
not familiar with haskell?
Original Message
On 8 Jun 2023, 11:36, Corvo Liu wrote:
> In haskell there's a syntax sugar called as pattern. For example:
>
> ```
> f (x:xs) = x:x:xs
>
Disregard, José explained that this isn't possible because of the two ETS
tables that Registry uses under the hood. Oh well.
On Friday, May 26, 2023 at 1:12:26 PM UTC-7 Noah Betzen wrote:
I made a PR that implements this:
https://github.com/elixir-lang/elixir/pull/12609
On Friday, May 26
I made a PR that implements
this: https://github.com/elixir-lang/elixir/pull/12609
On Friday, May 26, 2023 at 10:39:28 AM UTC-7 Noah Betzen wrote:
> Erlang's process group module allows adding arbitrary PIDs to a group,
> which can be used for things like PubSub:
> https://www.erlan
/elixir/1.14.5/Registry.html#register/3
However, there are ways to work around this with Registry; see attached
Livebook markdown for an example.
I propose new functions:
- Registry.register/4
- register(pid, registry, key, value)
- Registry.unregister/3
- unregister(pid
will be happy to implement it.
>
> Example:
>
> iex> Enum.avg(0..10)
> 5
>
> --
> 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 a
age 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-co
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
block *setup*.
>
> Thoughts?
>
--
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 vie
block *setup*.
>
> Thoughts?
>
--
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 vi
addition?
>
> Including the arity would be more conventional, of course, but it's a
> bit redundant here.
>
> At quick glance, it does seem feasible, but it changes the API and I
> might be missing other caveats, so I'm not sure.
>
--
You received this message beca
, Jay Rogov wrote:
> Also note that there's is_map_key/2 guard that serves the same purpose when
> used as `is_map_key(arg, :__struct__)`, allowing only maps but not structures:
> https://hexdocs.pm/elixir/1.14.2/Kernel.html#is_map_key/2
>
> On Thursday, 22 December 2022 at 4:22:30
houghtful feedback I gained from you
and the others who replied! I’m glad to be working in Elixir.
From: on behalf of José Valim
Reply-To: "elixir-lang-core@googlegroups.com"
Date: Thursday, December 15, 2022 at 4:58 PM
To: "elixir-lang-core@googlegroups.com"
Subject: Re
Hi Ben,
I agree that it reduces its applicability, but I see that as a virtue. Filter
and Map are useful despite being less applicable than Reduce, since they are
simpler.
Matt F
From: on behalf of Ben Wilson
Reply-To: "elixir-lang-core@googlegroups.com"
Date: Thursday, Decembe
_a, b})
# 3
# or
{1, 2, 3} |> pattern_filter({1, a, _})
# 2
# would both work
```
The shape of the return is stereotyped, so it is simpler than `then`.
I will put the code up on github and share!
Thanks,
Matt F
From: on behalf of Ben Wilson
Reply-To: "elixir-lang-core@googlegrou
disagreement?
Thanks!
Matt F
From: on behalf of Sabiwara Yukichi
Reply-To: "elixir-lang-core@googlegroups.com"
Date: Tuesday, December 13, 2022 at 6:55 PM
To: "elixir-lang-core@googlegroups.com"
Subject: [EXTERNAL] Re: [elixir-core:11213] [proposal] Use patterns to filter
” anymore but
“restructure”.
I think it’d be somewhat verbose for the use cases I had in mind for
`pattern_filter`, but would make for a nice new way to pattern match!
From: on behalf of Jay Rogov
Reply-To: "elixir-lang-core@googlegroups.com"
Date: Wednesday, December 14, 2022 a
* This does raise a warning, though I’m not sure why the warning is
issued for a pattern like this. It just kind of (politely) tells me to remove
the underscores, though the code works as intended.
From: on behalf of Sabiwara Yukichi
Reply-To: "elixir-lang-core@googlegroups.com"
) no match of right hand side value: {1, 2, 3}
"""
This is my first proposal. Please let me know if this idea is worth some
attention, and how I might better do my part to present it. I have code
obviously but I'm not sure this is the place for it.
Thanks,
Matt F
--
You received this
lta = timedelta( days=50, seconds=27,
> microseconds=10, milliseconds=29000, minutes=5, hours=8, weeks=2)
> ```
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop rece
I wouldn't claim this is a good idea because `into` in your example looks like
leakage of app logic into DB level. If you're only ought to create user id -
user map, it is pretty easy to do in Elixir from just a list of users. If you
concerned about memory/time, you could try streaming from
Inspired by this Stack Overflow post:
https://stackoverflow.com/questions/49508509/idiom-to-construct-a-uri-with-a-query-string-in-elixir/72223901
I thought it might be useful to have helpers to update the struct fields,
rather than manipulating the struct directly.
Instead of:
%URI{uri | host
e list.
>
> iex(1)> List.includes_sublist?([1,2,3,4,5], [2,3])
> true
>
> iex(1)> List.includes_sublist?([1,2,3,4,5], [1,2])
> true
>
> iex(1)> List.includes_sublist?([1,2,3,4,5], [3,4,5])
> true
>
> iex(1)> List2.includes_sublist?([1,2,3,4,5],
dard library. I don't think that things only belong in the std
> > library if the std library offers an optimization. Sometimes the
> > important context is that the std library *doesn't* offer an
> > optimization. Personally, I believe things like `Enum.none?/2`
> > belong in the s
led my `Map.get/3` would be
> better.
>
> `Map.get(map, key, default_value)` looks better than `Map.get(map, key) ||
> default_value`
>
> On Wed, Jun 22, 2022 at 11:32 AM 'Andrey Yugai' via elixir-lang-core
> wrote:
>
>> For this behavior I think you'd be better of
key => value} ->
> value
>
> %{} ->
> default
>
> other ->
> :erlang.error({:badmap, other}, [map, key, default])
> end
> end
> ```
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core
in all cases.
> Example:
> If we have [false, true], !Enum.all?/1 will be true, but Enum.none?/1 will be
> false
>
> I would like your thoughts on this one.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" grou
Scala has a handy @tailrec annotation
<https://www.scala-lang.org/api/2.12.1/scala/annotation/tailrec.html> that
makes the compiler error out if the function is not amenable to tail call
optimization. One possible footgun while learning Elixir and recursion is
trying to implement
ery 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 they are macros they need to be req
ll the guard.
> >
> > What do you guys think?
> >
>
--
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+unsubs
that
since they are macros they need to be required, plus usually you
don't want to have the module name when you call the guard.
What do you guys think?
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To unsubscribe from this grou
Hi Rudolf. Elixir actually has such wrapper already, and what's more cool about
it, it's implemented exactly how you suggested:
https://github.com/elixir-lang/elixir/blob/a64d42f5d3cb6c32752af9d3312897e8cd5bb7ec/lib/elixir/lib/kernel.ex#L1724
Other tuple related functions are mentioned
ks,
Randson
From: 'Andrey Yugai' via elixir-lang-core
Sent: 07 June 2022 16:38
To: elixir-lang-core@googlegroups.com
Subject: Re: [elixir-core:10916] [Proposal] List.delete support for delete
multiple fields inside a list
Hey Randson, have you seen `Enum.filter`? It does almost exactly what
What I
want to add is the possibility to delete multiple fields by passing a list of
fields I want to remove.
Can be like this one:
```elixir
List.delete([:a, :b, :c, :d, :e], [:a, :b])
#=> [:c, :d, :e]
```
Or, it can be a new function to totally deal with that. like:
```elixir
List.de
ine argument and response types and
> automatically treat it as spec for following long_word?/1 function.
>
> What do you think?
>
> Also, in case of multiple arguments we can either wrap it in
> parentheses or just use a comma for separation.
>
--
You received this message be
I don't think there's much gain in fiddling with Elixir internals trying to
modify special form, or writing new macro specifically to omit the left
argument in `::/2` for function specs. Perhaps more profoundly, this would
implicitly tie one spec to one function clause, which is kinda odd
/elixir-lang/elixir/blob/1907914cf0d9d25b32373d3c8ad6b4b59877baaf/lib/elixir/lib/enum.ex#L3213-L3218
I see that it is already mapping after the sorting, in order to
return the original values.
So we are unnecessarily mapping once.
What I propose is introduce Enum.sort_by_transform/4 which takes
Hey there, I think that would be a nice addition in general, but
[Macro.camelize/1](https://hexdocs.pm/elixir/Macro.html#camelize/1) has a very
specific purpose:
> This function was designed to camelize language identifiers/tokens, that's
> why it belongs to the [Macro](https://hexd
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 el
to be accepted. A very important
>> design goal of `mix format` is never to change the semantics of the code
>> and changing the order of statements is changing semantics.
>>
>> On March 18, 2022, elixir-lang-core wrote:
>>
>> The Elixir style guide has guidance
The Elixir style guide has guidance on how to organise module attributes,
directives, and macros
-
https://github.com/christopheradams/elixir_style_guide#module-attribute-ordering
What do people think about applying these conventions as part of mix format?
Background - we have linting rules
I think Slack is a better place for you to ask.
On Monday, 7 March 2022 at 12:09:42 UTC+5 itssw...@gmail.com wrote:
> I'm working on image processing in elixir. Is there any library for
> implementing authentication process for images.
>
--
You received this message be
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
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.
>
&
replace_leading,
replace_trailing}/3
Please let me know what you think.
--
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.
is is already possible with `@describetag :skip` inside a describe
> block. There's a `@moduletag :skip` too!
>
> On February 3, 2022, elixir-lang-core c...@googlegroups.com> wrote:
> > Currently `@tag :skip` is only effictive in tests, but if I have a
> > describe block with 1
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/61fbe820.1c69
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 thi
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 preceden
When I try and add the `:console` logger backend during runtime I get:
```
iex(15)> Logger.remove_backend(:console, level: :info)
{:error, :not_found}
```
Looks like the `Logger.Backends.Console` is missing an init(:console,
opts)` implementation?
https://github.com/elixir-lang/elixir/b
pted only at the
beginning or we will be able to call them wherever we find suitable?
--
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
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
reason,
> data_so_far}.
>
> I have found only one usage of Enum.reduce_while in Elixir's codebase.
> Interestingly, the shape of the return value is always the same - a
> list of finished tests.
> https://github.com/elixir-lang/elixir/blob/main/lib/ex_unit/lib/ex_unit/runner.ex#L340
>
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
d proposal for-let. You can find it in a gist:
> https://gist.github.com/josevalim/fe6b0bcc728539a5adf9b2821bd4a0f5
>
> Please use the mailing list for comments and further discussion.
> Thanks for all the feedback so far!
>
--
You received this message because you are subscribed to
Good point, and that pretty much explains why this flag is a non-viable
feature.
I will make a proposal to Credo.
Thank you guys for your input.
On Mon, 20 Dec 2021 14:57:02 +0100
José Valim wrote:
> Elixir does not have optional warnings. Or the warnings are always
>
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
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
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
rth 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 y
"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/61b21664.1c69fb81.f6a30.02cfSMTPIN_ADDED_MIS
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
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) f
ependency resolution
> with git repos. It is going to quickly become too slow as the number of
> versions and dependencies grow.
>
> On Sat, Oct 23, 2021 at 4:03 PM 'Frerich Raabe' via elixir-lang-core <
> elixir-l...@googlegroups.com> wrote:
>
>> Hi all,
>>
>>
by the
dependency
resolution algorithm.
Motivation
==
Declaring dependencies of Elixir projects via Git, e.g. by defining
{:foobar, git: "https://github.com/elixir-lang/foobar.git;, tag: "0.1"}
is very convenient. In many cases, dependencies are already stored in G
", etc. Or just a plain old conditional. It
> should also be trivial enough to add to your own apps if really necessary.
>
> On Fri, Oct 8, 2021 at 8:02 PM 'Damir' via elixir-lang-core <
> elixir-l...@googlegroups.com> wrote:
>
>> Hi!
>>
>> Thanks for t
ty)
> |> apply_sales_tax(state). # apply_sales_tax would know whether or not to
> do anything based on the state
>
> You say you have to do this "often" -- can you give us some real-world
> examples of your code logic that you feel necessitates this kind of thing?
> I really
s anymore, improving composability.
Example usage:
y_needed = # true or false
some_value
|> do_something()
|> then(y_needed, _y(&1, arg0, arg1) )
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To unsubscribe from t
I've spent 5 days untangling module deps in a huge Elixir codebase. I'm
almost done, but I wish this problem didn't happen in the first place. I
want the compiler to SCREAM at me if I've introduced a compile-time
cyclic dependency.
In the short term, my plan is to add a stage to the CI, which
lt;https://www2.elixirconf.eu/elixir-conf-2021/es> 8-10 September
2021
Code
Beam SF: <https://www2.codesync.global/code-beam-sf-2021/es> 4-5 November
2021
Erlang Solutions cares about your data and privacy;
please find
all details about the basis for communicating with you and the
I felt that in my skin on my previous work. We had many different Elixir
apps, each one used a different library, each library was missing some
feature or had some bug, each library was forked to fill the missing gap,
every fork wasn't great.
Em quarta-feira, 9 de dezembro de 2020 às 18:13:25
change change the name if we land on
> something better: https://github.com/elixir-lang/elixir/pull/10532/files
>
> I personally still prefer `count_until`.
>
> On Friday, December 4, 2020 at 11:24:06 AM UTC-5 ad...@a-corp.co.uk wrote:
>
>> What about count_upto or count
t?/2
>>> > >
>>> > > On Thu, Dec 3, 2020 at 5:14 PM Michał Muskała
>>> > > wrote:
>>> > >
>>> > >> Unfortunately this can’t be done automatically since it has subtle
>>> > >> semantic difference
ing on
> `persistent_term` already on OTP 21.0+ would be to provide a non-NIF
> fallback implementation.
> After all, `persistent_term is based on userspace-libraries written in
> Elixir and Erlang that were released before (c.f. the FastGlobal Elixir
> library on Hex and mochiglobal
>
That would help with Ecto. Unfortunately we still see a bunch of stuff
from the likes of Elixir GRPC and various structs from libraries that don't
have that kind of functionality. We were kind of hoping for a top-down,
whitelist approach. We figure that it's easier to plug the leak from
brary does it, then you need
Override2 or 3 or 4...
- *Con:* Probably gets redundant if there ever is a blessed way to
override protocols.
- *Con:* I already pitched this to a few Elixir celebrities and they
thought it was a bit too hacky.
*In Closing*
So, yeah, in the long term, m
1 - 100 of 175 matches
Mail list logo