git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Utsav Parmar <utsavp0213@gmail.com>
To: git@vger.kernel.org
Subject: [GSoC] microproject: builtin patterns for userdiff
Date: Sun, 17 Mar 2024 02:46:18 +0530	[thread overview]
Message-ID: <20240316211618.490683-1-utsavp0213@gmail.com> (raw)

Hello,

I am Utsav, a Computer Engineering graduate, with 2.5+ years of experience in the technical industry.

I am writing to express my interest in contributing to the Git project as part of the GSoC internship. While I have had some experience contributing to open-source projects, Git had felt a bit daunting to start. I am happy to use GSoC as a reason to introduce myself to the Git community and start contributing via microprojects initially. I am aware that I am far late in starting with this but I'd like to use this opportunity to learn and contribute more even if my proposal is not accepted.

I am passionate about TDD and work at an organization that fosters a culture for writing tests first and continuously improving tests and thus, naturally, the project idea "Move existing tests to a unit testing framework" caught my interest. While I have some ideas around this, I've been focused on choosing a microproject and implementing it lately.

I have been working on "Add more builtin patterns for userdiff" for Haskell language but a regex for checking the beginning of a function definition here is tricky.

Haskell has function definitions that look like - 
```haskell
main = do
	putStrLn "The addition of the two numbers is:"
	print(add 2 5)
```
This is fairly easy to implement and I have been successful is doing so as well with verifying them with tests.

However, Haskell also has function definitions that look like - 
```haskell
zip (x:xs) (y:ys) = (x,y) : zip xs ys
zip  xs     ys    = []
```
Notice how the function name is repeated on every line. (and this is perfectly legal in Haskell!)
I couldn't think of a way around this. Please let me know if you have any ideas on this.

I'd like to know if there are any criteria for selecting languages to write built-in drivers for the hunk header as I only see a small subset of languages already added. Is it left open as a good-first-contribution for beginners and so can we add any language/s? I am asking this because I noticed a pattern for css and instantly thought of it for writing for scss files and would like to understand any implications of this before I send a patch.

I observed that javascript and typescript have not been added yet despite being popular languages. It seems that someone else has already been working on javascript, so I'll implement it for typescript language.

Upon implement this locally, I got confused a bit about `t/t4034/` directory. Could you tell me more about it please and especially `expect` files here? Are these auto generated? How can I trace these?

Thank you for taking time to read through this. Looking forward to contributing!

Sincerely,
Utsav

             reply	other threads:[~2024-03-16 21:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-16 21:16 Utsav Parmar [this message]
2024-03-21 12:12 ` [GSoC] microproject: builtin patterns for userdiff Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240316211618.490683-1-utsavp0213@gmail.com \
    --to=utsavp0213@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).