[elixir-core:5856] Re: Wrapping erlang modules with notoriously bad error messages

2016-05-26 Thread Ben Wilson
great. On Thursday, May 26, 2016 at 11:11:16 AM UTC-4, Myron Marston wrote: > > Maybe we could submit PRs to Erlang/OTP itself to improve the error > messages. That way, it helps Erlang developers and helps us :). > > Myron > > On Thursday, May 26, 2016 at 4:53:55 AM UT

[elixir-core:5915] Re: Proposal: Map.filter_values and Map.filter_keys

2016-06-18 Thread Ben Wilson
Your example implementation shows why this isn't really necessary. Moreover it doesn't compose well. Consider: map |> Enum.filter(fn {k, v} -> key_filter(k) && value_filter(v) end) |> Map.new vs map |> Map.filter_keys(key_filter) |> Map.filter_values(value_filter) In the latter it starts as a

Re: [elixir-core:5698] Add boolean methods for different unicode character groups (String.alphanumeric?, etc)

2016-05-09 Thread Ben Wilson
http://nerves-project.org/ Enjoy :) On Monday, May 9, 2016 at 12:36:45 PM UTC-4, Ed Wildgoose wrote: > > On 05/05/2016 17:44, w.m.w...@student.rug.nl wrote: > > > - when included in the stdlib, compiling/usin Elixir on embedded devices > becomes impossible because of the increased file size.

[elixir-core:6143] Re: why are zero arity anonymous functions not allowed?

2016-07-20 Thread Ben Wilson
The title is a bit misleading as it implies that Elixir doesn't have `fn -> "yo" end`, but at least that's cleared up in the body. I do think it can be useful, IE `Task.async((args))` is more succinct than `Task.async(fn -> foo(args) end)`. Spawning processes and the like are about the only

Re: [elixir-core:6832] [Proposal] Enum.sort for Dates

2017-01-21 Thread Ben Wilson
See an earlier discussion on a similar idea: https://groups.google.com/forum/#!topic/elixir-lang-core/eE_mMWKdVYY On Friday, January 20, 2017 at 3:12:37 PM UTC-5, Paul Schoenfelder wrote: > > Sorry Josh, I should have replied to your original proposal. What I was > getting at is that you can

Re: [elixir-core:6325] Improvement: the syntax for importing functions from modules

2016-09-15 Thread Ben Wilson
Here's the thing. Right now import doesn't require any special syntax. It's data driven, and uses elixir structures that already exist and are usable. Every single option you listed requires changes to the parser, new language constructs or both. All to do exactly what we can right now. I don't

[elixir-core:6257] Re: [proposal] Consider supporting a map shorthand syntax

2016-08-28 Thread Ben Wilson
You necro'ed a thread that was effectively a year old, it isn't an ideal place to receive feedback. Maybe try posting on the elixir forum? On Sunday, August 28, 2016 at 1:13:55 PM UTC-4, Hassan Zamani wrote: > > No comments? > > On Saturday, August 13, 2016 at 2:53:56 PM UTC+4:30, Hassan Zamani

[elixir-core:6444] Re: proposal: functional assertions, a case for assert_equal, assert_match, and possibly more

2016-09-30 Thread Ben Wilson
your feedback. Always interesting to build up a body of >> knowledge about how the community thinks about a particular subject. >> >> @eric: Why do you think they are both imperative, and how would you make >> them more declarative? Very interested! >> >> Ch

[elixir-core:6612] Re: Elixir Getting Started Guide Section for `use`

2016-11-22 Thread Ben Wilson
The documentation is pretty thorough here: http://elixir-lang.org/docs/master/elixir/Kernel.html#use/2 Honestly, use isn't really beginner material. What do you mean by "start using module that he himself wrote" ? On Tuesday, November 22, 2016 at 6:54:32 PM UTC-5, Razvan Musetescu wrote: > >

Re: [elixir-core:6643] Adding __APP__ or something similar

2016-12-01 Thread Ben Wilson
FWIW I have renamed a couple enormous projects and in all cases it took basically 2 find and replace runs and a folder move. -- 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,

Re: [elixir-core:7026] Passing the map to Map.get_lazy's function

2017-03-20 Thread Ben Wilson
Can you elaborate on the code you have in mind? This sounds like a general characteristic of pipes and not something specific to Map.get_lazy. On Monday, March 20, 2017 at 6:48:46 AM UTC-4, David Long wrote: > > That's not entirely accurate. In my case I was using a series of pipes so > I did

Re: [elixir-core:7347] Automatic inspect interpolation

2017-07-30 Thread Ben Wilson
Agreed. Inspect can leak sensitive information easily, and I think it's important to annotate that a structure will be using its debug representation in a string. On Sunday, July 30, 2017 at 3:31:57 AM UTC-4, José Valim wrote: > > I personally prefer the clearer approach of calling "inspect"

[elixir-core:7150] Re: Proposal: pipe and assign syntax

2017-05-19 Thread Ben Wilson
This has been proposed before, and it was rejected then as well. You're only saving a few characters, and it obfuscates that two completely different things are happening (assignment, function calling). On Friday, May 19, 2017 at 1:27:29 PM UTC-4, OvermindDL1 wrote: > > Actually that specific

[elixir-core:7449] Re: [Proposal] More intuitive import shadowing

2017-09-23 Thread Ben Wilson
Setting aside whether or not the existing functionality is intuitive or not, this isn't actually a proposal. You aren't suggesting an alternative. On Thursday, September 21, 2017 at 10:17:12 AM UTC-4, Krzysztof Wende wrote: > > Right now when we import a module A > > defmodule CurrentA do >

Re: [elixir-core:7468] [Proposal] Converting @type/@spec to contract/asserts at compile time?

2017-09-30 Thread Ben Wilson
No, there is intentionally no way to globally apply a macro. On Saturday, September 30, 2017 at 7:42:54 AM UTC-4, gasp...@gmail.com wrote: > > > > On Saturday, September 30, 2017 at 2:36:30 PM UTC+3, Louis Pilfold wrote: >> >> Heya >> >> You could write a library that does this rather than

[elixir-core:7829] Re: [Proposal] Add GenServer.query and GenServer.handle_query

2018-01-30 Thread Ben Wilson
Have you evaluated an Agent for your purposes? It has basically exactly this function. On Tuesday, January 30, 2018 at 9:17:08 AM UTC-5, Federico Bergero wrote: > > Hi all, > I'm proposing a new GenServer callback `query` similar to the > call but which does not change the process

Re: [elixir-core:7826] Proposal: allow newline after `with`

2018-01-30 Thread Ben Wilson
This is achievable with `\` btw: with \ %{x: x} <- y do x end On Tuesday, January 30, 2018 at 7:39:07 AM UTC-5, Po Chen wrote: > > Ah I thought `with` was part of the language, then I realized how small > the language core is. > Now I wish the language is actually a little bigger :S mixed

[elixir-core:7877] Re: Proposal: Option to omit comments from generated mix projects

2018-02-15 Thread Ben Wilson
I too would find this useful. On Wednesday, February 14, 2018 at 2:19:04 PM UTC-5, pragdave wrote: > > ✓ > > On Thursday, January 18, 2018 at 9:09:32 AM UTC-6, Ville Hellman wrote: >> >> Hey all, >> >> I'm proposing a new option for the `mix new` task: `--nocomments` when >> run with this

Re: [elixir-core:7885] Introduce Sum Types

2018-02-16 Thread Ben Wilson
Can you elaborate on the safety provided by doing `%Struct{} = ` on a function? There are no compile time checks that calls to that function are actually of that struct type, just runtime checks on the data. Put another way this isn't really a type check, but an assertion. On Friday, February

[elixir-core:7907] Re: [Proposal] Kernel.is_module?/1

2018-02-25 Thread Ben Wilson
Can you elaborate on motivating code patterns? Every instance where I've wanted to determine if a specific module is around has been a compile time question for meta-programming purposes, and the `Code.ensure_loaded?` function has worked great for that. On Sunday, February 25, 2018 at 6:56:25

[elixir-core:7726] Re: Proposal: Inspect implementation for URI

2018-01-01 Thread Ben Wilson
The downside here is that you can no longer copy and paste the output. On Monday, January 1, 2018 at 10:58:30 AM UTC-5, Wojtek Mach wrote: > > Hello, > > Having an Inspect implementation would make a shorter output in iex, > exunit diffs etc and the string representation is inambiguous. Under

Re: [elixir-core:7797] Re: [Proposal] Add async functions definitions

2018-01-23 Thread Ben Wilson
An important thing to note is that in Elixir it's generally the caller of a function that determines whether they want sync or async behaviour, not the callee. Generally speaking you simply write functions that take input and return output. If a given caller of that function wants that to

[elixir-core:7936] Re: [Proposal] Add a pipe-right macro |>> to Kernel

2018-03-09 Thread Ben Wilson
I would highly recommend taking a walk through existing threads in the mailing list and forums. This and other similar pipe additions have been requested before. I'm glad you're interested in improving the language, but the proposal itself doesn't reflect a familiarity with existing answers to

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

2018-02-27 Thread Ben Wilson
maybe(t) is traditionally `Some(t) | None`, which isn't really the same as `nil | t`. The closest analogue would seem to me to be `{:ok, t} | :error` although that doesn't quite communicate the same thing. On Tuesday, February 27, 2018 at 7:11:39 AM UTC-5, Yordis Prieto wrote: > > Introducing

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

2018-02-28 Thread Ben Wilson
Is nillable(String.t) less boilerplate than String.t | nil ? On Wednesday, February 28, 2018 at 9:12:42 AM UTC-5, Yordis Prieto wrote: > > I am more interested on the solution of `nil | t` I dont mind changing the > name to `nillable(t)` or whichever other word in English. > > The needs come

[elixir-core:8385] Re: Enum.sum/2

2018-12-02 Thread Ben Wilson
I don't really agree that it makes the intent clearer. It combines two distinct and unrelated activities. One takes the sum of a list, the other maps each value in a list to some other value. list |> Enum.map(& &1 * 2) |> Enum.sum expresses this perfectly. If you're going for lolspeed and need

[elixir-core:8560] Re: [proposal] Tree-Sitter grammar parser for Elixir

2019-03-29 Thread Ben Wilson
Can you elaborate for those of us with less context? What is tree-sitter? What are you proposing? On Thursday, March 28, 2019 at 10:10:14 PM UTC-4, João Paulo Silva de Souza wrote: > > Seems like I wrongly opened an issue instead of posting here first -> >

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

2019-02-10 Thread Ben Wilson
Ideally, > if possible, we can use a property-based test to validate that inverting > the map 2 times will always returns the initial map. > > What are your thoughts? > > Thanks, > > Justin > > > On Thursday, February 7, 2019 at 5:45:49 AM UTC-7, Andrea Leopar

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

2019-02-06 Thread Ben Wilson
Map.invert is at least largely harmless, unlike some of the other proposals that happen. It's still a little odd to me to have a function that boils down to just: Map.new(map, fn {k, v} -> {v, k} end) Honestly that is almost clearer if you've never heard the word "invert" with respect to

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

2019-07-30 Thread Ben Wilson
I think having Enum.filter(list, /1) actually reads pretty well. It avoids the issue with putting it in Kernel, and provides a very explicit name which speaks to Bruce's goal of naming concepts. On Tuesday, July 30, 2019 at 12:47:08 PM UTC-4, Allen Madsen wrote: > > I don't have a strong

[elixir-core:8987] Re: [Proposal] Map.put_new!

2019-07-25 Thread Ben Wilson
The presence of rarely used functions is not an argument for the addition of further rarely used functions. On Wednesday, July 24, 2019 at 1:05:59 PM UTC-4, Mário Guimarães wrote: > > It seems this function was proposed here > https://github.com/elixir-lang/elixir/pull/5917 > > and dropped

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

2019-09-30 Thread Ben Wilson
This function is really good as an exercise for new programmers to implement, for sure. In terms of regular workflows, how often does this exact function really come up? Given that it's only three lines to implement, I'm not sure that adding it to the standard library contributes much towards

Re: [elixir-core:9221] Re: Automatically time long-running iex commands.

2019-10-17 Thread Ben Wilson
I really like this feature idea. Often you don't know or expect that a particular function will take so long, and it's precisely at that point that you go "man, I wish I had timed that". Particularly if the function is doing a side effect, it may be non trivial to try again. Perhaps if the

[elixir-core:9146] Re: [Proposal] latest and earliest functions for DateTime and NaiveDateTime

2019-10-10 Thread Ben Wilson
FWIW We have an earliest_date and latest_date helper in almost every Elixir app we've built. The Enum.sort solution requires requires too many leaps to be at a glance readable if it's been a bit since you used DateTime.compare. Definitely a fan of including this. On Thursday, October 10, 2019

Re: [elixir-core:9360] [Proposal] Add Function.const/2

2020-02-04 Thread Ben Wilson
ut. * > > -bt > > > > On Tue, Feb 4, 2020 at 8:58 AM Amos King > wrote: > >> Ben, >> >> That is how const is used in Haskell. Although without currying I don’t >> see how it is useful. I’m waiting to see an example that drives it home. I >> agr

Re: [elixir-core:9356] [Proposal] Add Function.const/2

2020-02-04 Thread Ben Wilson
I agree with Michal. Additionally, I'm not clear how `const/1` could be used in Bruce's example at all. To elaborate, `fn -> foo() end` and `const(foo())` cannot be equivalent when `const/1` is merely a function. This becomes readily apparent when `foo()` is side effects or side causes. In

Re: [elixir-core:9357] [Proposal] Add Function.const/2

2020-02-04 Thread Ben Wilson
, because you could do: ``` Enum.map([1,2,3,4], (&1, :foo)) ``` which would return `[:foo, :foo, :foo, :foo]` effectively replacing the contents of the list with all `:foo`. Is that the idea? On Tuesday, February 4, 2020 at 8:16:53 AM UTC-5, Ben Wilson wrote: > > I agree with Michal. Additio

[elixir-core:9438] Re: Add a window function to Enum

2020-03-29 Thread Ben Wilson
Hi Adam, I believe this functionality already exists in the form of this function and others with the "chunk" name. https://hexdocs.pm/elixir/Enum.html#chunk_every/2 - Ben On Sunday, March 29, 2020 at 5:58:19 AM UTC-4, Adam Lancaster wrote: > > Hello, > > Elixir is great. The Enum module is

[elixir-core:9429] Re: Proposal: Enum.pop_by/2

2020-03-24 Thread Ben Wilson
Hi Eric, Whether or not this is functionally equivalent to split_with depends on how it handles non unique lists, eg: Enum.pop_by([1,2,2,3], fn x -> x == 2 end) If it returns {2, [1, 2, 3]} Then it is definitely at least different. This almost seems better suited for the List module. Map and

[elixir-core:9478] Re: Proposal: IO.error/2

2020-05-12 Thread Ben Wilson
Perhaps you addressed this, but how would IO.error behave when not compiling things? How would it behave if you remote console into a running system and call IO.error? On Monday, May 11, 2020 at 11:33:40 PM UTC-4, Dallin Osmun wrote: > > I understand at first glance this proposal might not seem

Re: [elixir-core:9576] Loading arbitrary packages during plain iex sessions

2020-06-15 Thread Ben Wilson
The issue is, those packages need to be compiled and in a specific order, how would that work? `hex` isn't a build tool, `mix` is. On Monday, June 15, 2020 at 6:07:49 AM UTC-4, Simon St.Laurent wrote: > > I would love to see (some version of) both the original proposal and this > one. They

Re: [elixir-core:9984] [Proposal] Make Kernel.tap/2 and Kernel.then/2 macros

2021-01-17 Thread Ben Wilson
Unfortunately it cannot do this in all cases: fun = /1 foo |> tap(fun) |> blah `tap` as a macro has no ability to know whether `fun` is a function at compile time. On Friday, January 15, 2021 at 1:54:58 PM UTC-5 Allen Madsen wrote: > I meant compile time. > > Allen Madsen >

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

2021-04-05 Thread Ben Wilson
Right, and this is why I think Jose is arguing that this is a job for Dialyzer. The only way to know that two specs are duplicate is if they are logically duplicate. Elixir does not know about the logic of specs today, that's dialyzer's job. eg: @type one :: 1 @spec foo(1) :: "one" @spec

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

2021-03-22 Thread Ben Wilson
The 1..9//2 structure feels like the best of the presented options to me. I think it reads well out loud, since .. often means "to" and / is often rendered as "by" so that would read 1 to 9 by 2. To make sure I'm clear about the semantics: If I have: ``` 1..x//1 |> Enum.to_list ``` Then if

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

2021-03-15 Thread Ben Wilson
I think eksperimental was dead on when he said what you really want is `cond`. ``` cond do val in ?a..?z val in ?A..?Z ``` Changing `case` to have an implicit `where` in certain special cases is going to make it behave inconsistently compared to other places that take patterns. Optimizing the

[elixir-core:10421] Re: Proposal: built-in DynamicSupervisor partitioning

2021-09-02 Thread Ben Wilson
Implemented this way, options like max_restarts max_children and so on would occur per partition. I take it the plan would be to simply note that in the docs? I don't see any easy way to enforce those values across all partitions, which I think is just fine. which_children/1 and so on won't

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

2021-12-20 Thread Ben Wilson
I believe this nicely addresses my concerns from the first proposal. Inner refactoring into functions is 100% possible, and there are no strange reassignment behaviors introduced that don't extend to the rest of the language. As for the questions outlined in the guide: 1) To Paren or not

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

2021-12-20 Thread Ben Wilson
To revisit the example situation from the original post: ``` {sections, _acc} = for let {section_counter, lesson_counter} = {1, 1}, section <- sections do lesson_counter = if section["reset_lesson_position"], do: 1, else: lesson_counter {lessons, lesson_counter} = for let lesson_counter, lesson

[elixir-core:10601] Re: Introduce :let in for-comprehensions

2021-12-16 Thread Ben Wilson
I am with Louis and Paul so far I think. I won't repeat their comments but I think I can extend the issue by pointing out that this breaks refactoring for the inner contents of `for`. Previously, if you have: ``` for lesson <- section["lessons"], reduce: 0 do counter -> # complex

Re: [elixir-core:10833] [Proposal] Add `List.pop/2`

2022-03-08 Thread Ben Wilson
I would benchmark to make sure that you're actually gaining something. If you are relying on it to be small, then at that specific size a list might also just be fine, and you won't be relying on behavior that could change in a future release. On Monday, March 7, 2022 at 11:49:06 AM UTC-5 Max

Re: [elixir-core:10851] [Proposal] - Add an option to deps.get to force failure on lock mismatch

2022-04-01 Thread Ben Wilson
Yup, I also see the value in a human check. I think it's analogous to `mix format --checked` where the option explicitly exists to allow systems to enforce expectations. +1 from me. On Friday, April 1, 2022 at 1:51:12 PM UTC-4 ma...@jonrowe.co.uk wrote: > If I'm understanding the original

Re: [elixir-core:10716] [Proposal] Add a shortcut to access a struct within the module where it is defined

2022-01-21 Thread Ben Wilson
__MODULE__ is the right answer here IMHO. It is consistent with the other "meta constants" like __ENV__, __DIR__ __FILE__ and so on in that they desugar to constants, but are file / code relative. It isn't a super common pattern, but last time I checked generated phoenix code does a

Re: [elixir-core:10725] Re: Wrapper for receive block.

2022-01-24 Thread Ben Wilson
For that purpose, I feel like: {:ok, %{pattern: [match, here]}} = Foo.await(item) would work right? Can you help me understand why the patterns themselves need to be passed to your `await` function? On Monday, January 24, 2022 at 12:09:56 PM UTC-5 mateus...@swmansion.com wrote: > Hi there, >

Re: [elixir-core:11542] Support using brackets to access an index of a list

2023-09-22 Thread Ben Wilson
> Personally, I don't see the harm in supporting it. If someone's going to abuse it, they'll abuse Enum.at() The harm isn't for people who doing it intentionally, the harm is for people who are doing it unintentionally. Index based array access is so common in certain languages that it's one

[elixir-core:10879] Re: [Proposal] GenServer response with exception control flow

2022-04-26 Thread Ben Wilson
> I'm sure there is the opinion that this is anti-pattern Yup. Side stepping this a bit though and getting to something deeper: This does not seem like it needs to be part of the standard library. You could make a library called GenServerWithExceptions or something and put it up on hex, and

Re: [elixir-core:10959] `Map.get/3` to return default value for `nil` value

2022-06-23 Thread Ben Wilson
> `Map.get(map, key, default_value)` looks better than `Map.get(map, key) || default_value` This isn't a matter of looks, these have straight up different functionality. You can't change this sort of thing in the language at this point in its lifecycle. Plus, you'd be forcing everyone who's

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

2022-10-25 Thread Ben Wilson
I think it would be helpful to see examples of regular Elixir code today that would be improved with this operator. The Plug example doesn't really work for me because Plug is doing a bunch of compile time stuff anyway and it also isn't using the pipe operator. On Tuesday, October 25, 2022 at

[elixir-core:11036] Re: Flow Ecto like assertions in ExUnit

2022-09-05 Thread Ben Wilson
Seems like a good opportunity for a library. There's not anything I'm seeing there that would require changes to the core language. Building a library is a good way to test out if it's a popular idea and work though any of the design challenges. On Sunday, September 4, 2022 at 3:52:04 PM UTC-4

[elixir-core:11017] Re: Proposal: Warn on assert %{} = x

2022-08-16 Thread Ben Wilson
To me this feels like a good use of credo or similar linter, not something that the Elixir compiler itself should warn about. `assert %{} = x` isn't the most idiomatic way to match but it isn't incoherent or invalid, just probably not best practice. On Tuesday, August 16, 2022 at 5:55:09 AM

Re: [elixir-core:11163] A More Human DateTime Comparison API

2022-10-31 Thread Ben Wilson
> DateTime.compare(a, :<, b) would get my vote of the alternative proposals but I think it doesn't move much the needle in comparison to DateTime.compare. To me this is a pretty big difference difference, because with an `import` it does 2 things: 1) Eliminates the existence of an irrelevant,

Re: [EXTERNAL] Re: [elixir-core:11221] [proposal] Use patterns to filter data (good for pipes)

2022-12-15 Thread Ben Wilson
Apologies, I missed that you addressed how `{1, 2, 3} |> pattern_filter({1, a, b})` would work in your earlier reply, in that you only allow a single variable to be bound. This further reduces its general applicability. On Thursday, December 15, 2022 at 4:12:37 PM UTC-5 Ben Wilson wrote: &

Re: [EXTERNAL] Re: [elixir-core:11219] [proposal] Use patterns to filter data (good for pipes)

2022-12-15 Thread Ben Wilson
Hi Matt, I am not on the core team nor do I speak for them. From what I have generally seen, "alternative APIs" that can be implemented as libraries generally should just stay libraries, unless there develops a strong following that makes it clear that such an API should be moved into the

[elixir-core:11190] Re: Proposal: Introduce string limit function.

2022-11-19 Thread Ben Wilson
This seems reasonably straight forward to implement in your own code base: ``` def truncate(string, length, padding \\ ".") do string |> String.slice(0, length) |> String.pad_trailing(String.length(string), padding) end ``` Not seeing a strong need to include it in the standard library.

Re: [elixir-core:11166] A More Human DateTime Comparison API

2022-10-31 Thread Ben Wilson
Making < and <= work in general for DateTime has been discussed and isn't feasible. The macro answer I kinda love. On Monday, October 31, 2022 at 3:42:16 PM UTC-4 m...@achempion.com wrote: > Is it possible to modify language in a way to make >,<, = work for dates? > > The datetime's struct has

Re: [elixir-core:11303] Multi-letter (uppercase) sigils

2023-03-05 Thread Ben Wilson
I'm generally +1 on this, but I am a tiny bit confused about the proposed change to interpolation. Does this propose a change to interpolation for all sigils, single or multi letter? If so, what is the deprecation plan for the current interpolation syntaxx? On Sunday, March 5, 2023 at 2:21:47 

[elixir-core:11417] Re: [Proposal] Pretty print diff when matching on context fails in ExUnit

2023-05-28 Thread Ben Wilson
Agreed. Can the formatter get invoked on output like that I wonder? On Friday, May 26, 2023 at 3:32:02 AM UTC-4 ifu...@gmail.com wrote: > Consider the following code: > > setup do > %{a: 1} > end > > test "test", %{b: b} do > IO.inspect(b) > end > > if we run the test, then it fails with the

Re: [elixir-core:11420] Re: [Proposal] Pretty print diff when matching on context fails in ExUnit

2023-05-28 Thread Ben Wilson
nction clause errors. :) If someone > wants to explore this path, please go ahead! > > On Sun, May 28, 2023 at 5:13 PM Ben Wilson wrote: > >> Agreed. Can the formatter get invoked on output like that I wonder? >> >> On Friday, May 26, 2023 at 3:32:02 AM UTC-4 ifu

[elixir-core:11426] Re: [Proposal] Syntax sugar for Maps construction and pattern matching

2023-06-26 Thread Ben Wilson
Hi, This has been proposed before. Someone came up with https://github.com/meyercm/shorter_maps which accomplishes this as a macro. It might be worth a discussion again at this point but it is worth noting that this is a proposal that has been on this list before, and so it would likely be

Re: [elixir-core:11396] Proposal: Add ~URI sigil

2023-05-18 Thread Ben Wilson
Question: Would this sigil support interpolation? Is that too clever? ~URI"https://#{path}?#{query_params}; - Ben On Thursday, May 18, 2023 at 1:37:37 AM UTC-4 christ...@gmail.com wrote: > I dislike +1 posts, but I feel very strongly about this—it'd be amazing to > have. > > I want booting an