Re: [elixir-core:11105] Partially applied pipelines/currying/etc

2022-10-25 Thread i Dorgan
For the plugs example, how is it better than the alternative that exists today? browser_pipeline = fn conn -> conn |> accepts("html") |> fetch_session() |> fetch_flash() |> protect_from_forgery() end This would allow pipelines to be composed. Think Plug, but functional. > I think this is a

Re: [elixir-core:10315] Preserve metadata for qualified identifiers and alias segments

2021-06-13 Thread i Dorgan
it's up to the user > to figure out how to merge them together. > > Making it as easy as possible to preserve comments will aid AST > manipulation of files that are human created and then augmented > programmatically. > > On Sun, Jun 6, 2021 at 9:20 AM i Dorgan wrote: > >> I

Re: [elixir-core:10299] Preserve metadata for qualified identifiers and alias segments

2021-06-06 Thread i Dorgan
UTC-3, steve...@gmail.com escribió: > Will that meta data extend to comments? > > On Fri, Jun 4, 2021 at 5:32 PM i Dorgan wrote: > >> Sounds good! >> I will send some PRs soon :) >> >> El viernes, 4 de junio de 2021 a las 18:10:41 UTC-3, José Valim escr

Re: [elixir-core:10297] Preserve metadata for qualified identifiers and alias segments

2021-06-04 Thread i Dorgan
Sounds good! I will send some PRs soon :) El viernes, 4 de junio de 2021 a las 18:10:41 UTC-3, José Valim escribió: > Ah, let’s call it :last then and it points to the segment. There is always > one too, so it is always available. > > On Fri, Jun 4, 2021 at 22:34 i Dorgan wrote: &g

Re: [elixir-core:10295] Preserve metadata for qualified identifiers and alias segments

2021-06-04 Thread i Dorgan
euse closing? Or maybe last_dot? And what > happens when the alias has no dot? We don't set it? > > On Fri, Jun 4, 2021 at 10:02 PM i Dorgan wrote: > >> > The dot one is easy, I think we can have the outer meta be the meta of >> the call identifier. A PR is welcome. >> Gr

Re: [elixir-core:10293] Preserve metadata for qualified identifiers and alias segments

2021-06-04 Thread i Dorgan
> so we can at least say where the whole alias extends to? WDYT? > > On Fri, Jun 4, 2021 at 6:00 PM i Dorgan wrote: > >> Hi all, >> >> I'm writing a function that takes a quoted expression and calculates the >> start and end positions of the node in the source code. S

[elixir-core:10291] Preserve metadata for qualified identifiers and alias segments

2021-06-04 Thread i Dorgan
Hi all, I'm writing a function that takes a quoted expression and calculates the start and end positions of the node in the source code. So for example for this expression: :"foo#{ 2 }bar" It would tell us that it starts at line: 1, column: 1 and ends at line: 3, column: 6. The idea is

Re: [elixir-core:10278] [Proposal] Expose functions from `Code.Formatter` via the `Code` module

2021-05-24 Thread i Dorgan
For anyone following this, this was already implemented :) El martes, 18 de mayo de 2021 a las 10:32:28 UTC-3, i Dorgan escribió: > Yes, the split is meant for the internal API. User API would remain > unchanged except for the addition of quoted_to_algebra and > string_to_quoted_with

Re: [elixir-core:10263] [Proposal] Expose functions from `Code.Formatter` via the `Code` module

2021-05-18 Thread i Dorgan
les to the user API but internally we can > split them in whatever way we want. Splitting also depends on how large it > is, but probably best to avoid adding it to the formatter since that's > already 2k LOC. > > > On Tue, May 18, 2021 at 2:49 PM i Dorgan wrote: > >>

Re: [elixir-core:10261] [Proposal] Expose functions from `Code.Formatter` via the `Code` module

2021-05-18 Thread i Dorgan
make the code that does the actual formatting easier to follow. El domingo, 9 de mayo de 2021 a las 0:20:37 UTC-3, i Dorgan escribió: > I tried manual traversal and that made things so much easier, the literal? > field is no longer needed. I made good progress on the conversion and I >

Re: [elixir-core:10247] [Proposal] Expose functions from `Code.Formatter` via the `Code` module

2021-05-08 Thread i Dorgan
t; block node you add on postwalk won't be traversed (IIRC). > > The approach looks good to me. Note for some of those, I would prefer to > push the fix to the formatter (for example, we can assume :delimiter > defaults to ~s""). > > On Sat, May 8, 2021 at 12:12 AM

Re: [elixir-core:10244] [Proposal] Expose functions from `Code.Formatter` via the `Code` module

2021-05-07 Thread i Dorgan
d nodes introduced by user may still not be >>> annotated - which means we still need to care about those scenarios. >>> >>> On Fri, May 7, 2021 at 5:07 AM i Dorgan wrote: >>> >>>> Thanks for your thoughts! >>>> >>>> > If an

Re: [elixir-core:10240] [Proposal] Expose functions from `Code.Formatter` via the `Code` module

2021-05-06 Thread i Dorgan
oid breaking changes in the future. A PR > for this particular issue is very welcome! > Thank you for the proposal and thinking about these problems. > On Wed, May 5, 2021 at 21:16 i Dorgan wrote: > > Hi all, >> >> The motivation for this proposal is to make it easier

[elixir-core:10237] [Proposal] Expose functions from `Code.Formatter` via the `Code` module

2021-05-05 Thread i Dorgan
Hi all, The motivation for this proposal is to make it easier for tools to alter and format elixir code while preserving the current behavior of the formatter. Most of the functionality is already there, and a little change in the APIs would enable a wide variety of new use cases. If we want