{"thread":{"id":"61138","subject":"[GSoC] microproject: builtin patterns for userdiff","startedAt":"2024-03-16T21:16:28Z","lastAt":"2024-03-21T12:12:16Z","messageCount":2,"participants":["Utsav Parmar","Patrick Steinhardt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"490803","messageId":"20240316211618.490683-1-utsavp0213@gmail.com","threadId":"61138","inReplyTo":null,"subject":"[GSoC] microproject: builtin patterns for userdiff","fromName":"Utsav Parmar","fromEmail":"utsavp0213@gmail.com","sentAt":"2024-03-16T21:16:18Z","receivedAt":"2024-03-16T21:16:28Z","isPatch":false,"sender":{"key":"utsavp0213@gmail.com","avatar":null},"body":"Hello,\n\nI am Utsav, a Computer Engineering graduate, with 2.5+ years of experience in the technical industry.\n\nI 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.\n\nI 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.\n\nI 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.\n\nHaskell has function definitions that look like - \n```haskell\nmain = do\n\tputStrLn \"The addition of the two numbers is:\"\n\tprint(add 2 5)\n```\nThis is fairly easy to implement and I have been successful is doing so as well with verifying them with tests.\n\nHowever, Haskell also has function definitions that look like - \n```haskell\nzip (x:xs) (y:ys) = (x,y) : zip xs ys\nzip  xs     ys    = []\n```\nNotice how the function name is repeated on every line. (and this is perfectly legal in Haskell!)\nI couldn't think of a way around this. Please let me know if you have any ideas on this.\n\nI'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.\n\nI 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.\n\nUpon 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?\n\nThank you for taking time to read through this. Looking forward to contributing!\n\nSincerely,\nUtsav\n"},{"id":"491120","messageId":"ZfwkGjdeHDpFAPrM@tanuki","threadId":"61138","inReplyTo":"20240316211618.490683-1-utsavp0213@gmail.com","subject":"Re: [GSoC] microproject: builtin patterns for userdiff","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-03-21T12:12:10Z","receivedAt":"2024-03-21T12:12:16Z","isPatch":false,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Sun, Mar 17, 2024 at 02:46:18AM +0530, Utsav Parmar wrote:\n> Hello,\n> \n> I am Utsav, a Computer Engineering graduate, with 2.5+ years of\n> experience in the technical industry.\n> \n> I am writing to express my interest in contributing to the Git project\n> as part of the GSoC internship. While I have had some experience\n> contributing to open-source projects, Git had felt a bit daunting to\n> start. I am happy to use GSoC as a reason to introduce myself to the\n> Git community and start contributing via microprojects initially. I am\n> aware that I am far late in starting with this but I'd like to use\n> this opportunity to learn and contribute more even if my proposal is\n> not accepted.\n> \n> I am passionate about TDD and work at an organization that fosters a\n> culture for writing tests first and continuously improving tests and\n> thus, naturally, the project idea \"Move existing tests to a unit\n> testing framework\" caught my interest. While I have some ideas around\n> this, I've been focused on choosing a microproject and implementing it\n> lately.\n\nThanks for your interest in the Git project, and welcome to the\ncommunity :)\n\n> I have been working on \"Add more builtin patterns for userdiff\" for\n> Haskell language but a regex for checking the beginning of a function\n> definition here is tricky.\n> \n> Haskell has function definitions that look like - \n> ```haskell\n> main = do\n> \tputStrLn \"The addition of the two numbers is:\"\n> \tprint(add 2 5)\n> ```\n> This is fairly easy to implement and I have been successful is doing so as well with verifying them with tests.\n> \n> However, Haskell also has function definitions that look like - \n> ```haskell\n> zip (x:xs) (y:ys) = (x,y) : zip xs ys\n> zip  xs     ys    = []\n> ```\n> Notice how the function name is repeated on every line. (and this is perfectly legal in Haskell!)\n> I couldn't think of a way around this. Please let me know if you have any ideas on this.\n\nI cannot be of much help with regards to this, and I assume that most\neverybody who is frequenting this mailing list is likely not all that\nfamiliar with Haskell, either. But I saw that you've instead moved on to\nprovide support for TypeScript instead, so that's fine, too.\n\n> I'd like to know if there are any criteria for selecting languages to\n> write built-in drivers for the hunk header as I only see a small\n> subset of languages already added. Is it left open as a\n> good-first-contribution for beginners and so can we add any\n> language/s?\n\nI don't really think we have any specific criteria for adding languages\nto the userdiff intrastructure. It should probably have more than one\nuser so that it's actually useful to somebody, but other than that you\nare basically to add whatever you think makes sense.\n\n> I am asking this because I noticed a pattern for css and instantly\n> thought of it for writing for scss files and would like to understand\n> any implications of this before I send a patch.\n> \n> I observed that javascript and typescript have not been added yet\n> despite being popular languages. It seems that someone else has\n> already been working on javascript, so I'll implement it for\n> typescript language.\n\nThese seem to be good candidates then :)\n\n> Upon implement this locally, I got confused a bit about `t/t4034/`\n> directory. Could you tell me more about it please and especially\n> `expect` files here? Are these auto generated? How can I trace these?\n\nI assume you already figured this out by now given that your patch\ncontains tests in t4034 for TypeScript. Let me know in case things are\nstill unclear though.\n\nPatrick\n"}]}