[elixir-core:8357] [Proposal] Add function Kernel.delete_in/2

2018-10-27 Thread Jonathan Arnett
It would be useful to have a function that uses the Access protocol to delete elements within nested data structures. This is similar in concept to Kernel.pop_in/2 , but Kernel.delete_in/2 should just return the data structure without the specifie

Re: [elixir-core:9172] Recognizing more `ctrl-` keys in Iex

2019-10-14 Thread Jonathan Arnett
For what it's worth, bash also uses Emacs-style line editing. The difference between bash and erl is that bash will exit when there's nothing after the prompt and ctrl-d is received. When there is something after the prompt, bash will either delete the following character, if it exists, or ring

Re: [elixir-core:9563] Add ex_unit line limit for printing non_failures

2020-06-09 Thread Jonathan Arnett
Emacs has visual-line-mode (originally called longlines-mode), which can be enabled in at least eshell and shell (not sure about ansi-term) and will automatically wrap long lines and modify the navigation keybindings to treat those wrapped lines as if they are separate lines, which I think acco

[elixir-core:9666] Feature: Add Map.rename_key/3 and/or Map.rename_keys/3

2020-08-17 Thread Jonathan Arnett
I often times find myself in situations where I need to rename one or more keys in a Map, when for instance, converting from Strings to Atoms: new_map = %{ foo: Map.fetch!(old_map, "foo"), bar: Map.fetch!(old_map, "bar"), ... } or otherwise taking a Map from one part of the system and rena

Re: [elixir-core:10008] Proposal: Mix.install

2021-01-21 Thread Jonathan Arnett
I am also a fan of the proposal. One addendum that I would like to suggest is adding a flag to IEx such that a library can be "installed" when the shell starts. e.g. iex --install :decimal On 1/21/21 9:01 AM, Anil Kulkarni wrote: I love the general idea. I think it's a great solution for copy

Re: [elixir-core:10022] [Proposal] Keyword.fetch!/3 and Map.fetch!/3

2021-01-26 Thread Jonathan Arnett
One potential benefit to a Map.fetch/3 command that wasn't considered is that it could help users define more specific error types. There's a loose convention to use {:ok, val} | :error | {:error, reason} as a "result" type in Elixir (analogous to Rust's Option and Result or Haskell's Maybe and

[elixir-core:11324] Re: mix deps.sync

2023-03-18 Thread Jonathan Arnett
I fully agree that this needs to be more discoverable. Every year or so, I remove a dependency and then have to go find that TIL article that gives me the right flags. On Friday, March 17, 2023 at 12:18:45 PM UTC-4 Neil Lyons wrote: > I removed a dependency from `deps/0` in `mix.exs` and real

[elixir-core:11483] [Proposal] mix build task

2023-07-13 Thread Jonathan Arnett
When I first clone an Elixir repository, usually the first thing I do is run `mix do deps.get, compile`. It gets the job done, but it's a bit verbose. Build tools in other languages (e.g. Rust's cargo, Haskell's stack, Gleam's gleam) have a "build" command that both pulls dependencies *and* c

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

2023-07-13 Thread Jonathan Arnett
ng developers a jumping-off-point for when their > build's complexity grows. > > On Thursday, July 13, 2023 at 9:08:55 AM UTC-5 Jonathan Arnett wrote: > >> When I first clone an Elixir repository, usually the first thing I do is >> run `mix do deps.get, compile`. It get

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

2023-07-14 Thread Jonathan Arnett
I ultimately don't care if the name is "setup" or "build", but I do wonder if compilation fits conceptually under the name "setup". To expound on my original idea, I was thinking of having a command that I would run both on the first pull, but also fairly regularly while working on the project.