Vim activities ◦ Create plugins ▪ Not really famous ones ◦ Writing articles for publishing ▪ Software Design (July 2012 and October 2013) ◦ Send patches ▪ 3 in 2016 and 2017; I became a contributor About me
patches to Vim? • Skills ◦ That obscure source code written in C is called the Demon World • Manners ◦ English ◦ How should I behave at vim_dev? ◦ Hey all pull requests in the Vim repository are closed... • Opportunities ◦ What should I contribute? From these things, you may feel a big hurdle, but, all you need is a great passion that you want to be a contributor
years ◦ C: Almost college level ◦ English: Thank you, @ujm • My attitude toward OSS ◦ Sending lots pull requests aggressively?: No ◦ Like to discuss at many issues?: No ◦ When I find something wrong, backing up by operation?: Yes
after build • Found out the cause was v8.0.0101 from commit logs ◦ And it is ridiculous to back up by operation... • Decided to write a patch ◦ Enthusiasm was rising by VimConf 2016 held on the same month ◦ Using dictionary completion is minorities, so I thought that I had to fix it myself ◦ I taught dictionary completion to my teammates a while ago, and it will be in trouble if it can't be used ◦ Maybe it was a careless mistake, but I'd like to add a test code so that it will not reoccur at all E474: Invalid argument: dictionary=/usr/share/dict/words
test added in same day ◦ I didn't know how to add tests, nay, how to run tests • Decided to send patch to vim_dev, after wondering where to send ◦ There were issues on GitHub, but there was a person reporting it with vim_dev earlier than that • However, Bram declared the fix in vim_dev, so I sent only the test part ◦ It seemed to be fixed without doing anything, but I didn't want to waste the effort so far • Merged in the next morning patch 8.0.0102 Problem: Cannot set 'dictionary' to a path. Solution: Allow for slash and backslash. Add a test (partly by Daisuke Suzuki, closes #1279, closes #1284)
included in v8.0.0101, so I doubted that it was forgotten • The previous patch only added tests, so I thought it was a chance ◦ Add a test (partly by Daisuke Suzuki ... ◦ Enthusiasm was not cool down yet
◦ The contents are almost the same ◦ But, test has been added • Create a pull request on GitHub • It was merged in less than an hour patch 8.0.0104 Problem: Value of 'thesaurus' option not checked properly. Solution: Add P_NDNAME flag. (Daisuke Suzuki)
completion might be a long time. • There was unnecessary waiting when looking for candidates from files and buffers • That is, as there are more candidates like dictionary completion becomes slow ◦ There was also an influence on other completions, but it doesn't matter when not many candidates ◦ It occurred only in the CUI version of Linux and Mac, and it did not affect Windows or MacVim
to my PC, ◦ The specs were not so good ◦ Despite this, heavy background processing was frequently performed • Colleague said it's became slow, so I found out ◦ It was fast when turn back v8.0.0104 to v8.0.0000 • I planned to make my colleague a contributor, ◦ At least, nobody seemed to be in trouble ◦ Even if he could not make it to the end, I thought that just only have to report the results so far ◦ I had been investigating so that I can give him a hint anytime • Without progress, decided to change my job and write a patch
caused it ◦ It is v8.0.0050, result of git bisect ◦ mch_inchar() in os_unix.c was greatly modified • But I could not find a root cause at all, so trial and error over and over ◦ using debugger • I managed to fix it, but no confidence, so I asked vim-jp for help ◦ Thank you, @h_east ◦ • After that, I created a pull request and it was merged on the same day patch 8.0.0512: check for available characters takes too long Problem: Check for available characters takes too long. Solution: Only check did_start_blocking if wtime is negative. (Daisuke Suzuki, closes #1591)
Recommended for beginner ◦ Building Vim everyday is a good habit to find problems • Vim talk at work is important ◦ There is something new discovery ◦ It leads to problem solving
100000 (gdb) ignore 2 100000 (gdb) continue (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x000000000052fa50 in mch_inchar at os_unix.c:399 breakpoint already hit 3615 times ignore next 96385 hits 2 breakpoint keep y 0x000000000052fb02 in mch_inchar at os_unix.c:507 breakpoint already hit 20073 times ignore next 79927 hits • gdb ◦ n(next), s(step), l(list), bt(backtrace), b(break) ◦ Count the numbers executed with the combination of break and ignore
◦ A patch can be attached or a link to gist ▪ Unified diff format is preferred ◦ Posting requires approval of account • GitHub ◦ https://github.com/vim/vim ◦ Pull request like other OSS ◦ But instead of merging on github, it is merged at Bram's hand and committed to master
contributor or interested in become contributor! ◦ Let's get started from where you can • (For Japanese) If there is something, feel free to contact vim-jp! ◦ It's better than holding alone or just posted to twitter ◦ Someone will take a consultation even when there is no confidence in the patch or English