git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] feat: add Elixir to supported userdiff languages

From
Łukasz Niemier <lukasz@niemier.pl>
Date
Nov 6, 2019, 22:07 UTC
Message-ID
<ED332708-76D5-447F-A2D7-6495CC6A76DC@niemier.pl>
In-Reply-To
<672bdea4-180a-89e0-c420-df2704ed887e@kdbg.org>
Show 5 quoted lines
> Please use "subsystem: short description" in the subject. For example:
> 
>   userdiff: support Elixir
> 
> would be sufficient in this case.
Ok, will fix.
> Please add your sign-off before the three-dash line so that we know that
> you are entitled to publish this patch. See Documentation/SubmittingPatches.
Yeah, I have seen it too late to fix. Will do.
> It would be enlightening to know what Elixir is. (I haven't googled it,
> yet.)
It is language with Ruby-like syntax for BEAM (Erlang virtual machine).
https://elixir-lang.org
> If it were a popular language, I think I would have heard about
> it. But it may well be possible that I have lived under a rock for too
> long... ;)

It is quite popular among few services (Pinterest, Discord, Bleacher Report), but it is still pretty new, and still need to get a little more spotlight.

> This list is sorted, basically, but your addition perturbates the order.
Oh, sorry, I missed dts.
Show 16 quoted lines
> The default hunk header pattern picks up lines that begin with a letter
> without leading whitespace. The tests that you present here do not show
> that the language specific hunk header pattern is better. The default
> would have picked up the correct lines. And, in fact, when I remove the
> pattern from the code, these tests still pass!
> 
> I'm not saying that the pattern is bad; I say that the tests do not show
> its worthiness. More tests are needed. For example:
> 
> --- 8< ---
> defmodule RIGHT do
> end
> #
> #
> # ChangeMe; do not pick up 'end' line
> --- 8< —
Yeah, I will provide such
> BTW, I guess that any def, defmodule, etc. as the first word on a line
> in the docstring would be picked up incorrectly. Is that a problem?

No, as this would (almost?) always be the definition of the module/function, so it is not a problem at all.

>> +	 "|:'a-zA-Z0-9@_]+'"
> 
> The opening bracket is missing here.
Whoops.
Show 7 quoted lines
> Would it be an option to collapse all but the first pattern (because I
> do not want to start the pattern with an optional part) to
> 
> 	"[:@]['\"]?[a-zA-Z0-9@_]"
> 
> This assumes that @"x1 and @'y2 cannot occur in a syntactically valid
> program.
No, these aren’t valid.
> Remember: the patterns can be loose; they do not have to
> validate the input, but can assume that it is syntactically valid.
Ok
> Does the language not have any two-character operators, such as '<=‚?
It has, I should add them as well (it even has 3 letter operators).
--

Łukasz Niemier lukasz@niemier.pl

Previous: Johannes Sixt
Message 3 of 3 in “feat: add Elixir to supported userdiff languages”
  1. feat: add Elixir to supported userdiff languagesŁukasz Niemier, Nov 6, 2019
  2. Johannes SixtNov 6, 2019
  3. Łukasz NiemierNov 6, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.