It's Me, The Google Sucker Of Code
While browsing through the Web, I found the Rust Discord Server Where The Cool Kids Hang Out and found some pearls in the chat history:
lol which fortunate T-compiler person is willing to mentor the run-make test RiiR GSoC project - Jieyou Xu
You, apparently!
the poor GSoC candidate does not know what evil lies ahead of them - Jieyou Xu
I am only beginning to realize.
Hello, it's me, the sucker who was roped into this - Oneirical (me)
Welcome
suckeresteemed person! - Jubilee
i like how we keep discovering new cursedness and WTF moments in test suites - Jieyou Xu
Hm, the production of WTFs per minute has just started becoming noticeable. In fact, to find this exact quote, I searched "WTF by:(Jieyou's username)" and found exactly 72 matches, with almost every single one tied to some horribly cursed Bash command hack. The point where I truly scored my foothold in the WTF manufactory economy was likely in this specific moment:
ifneq (,$(findstring x86,$(TARGET)))
findstring returns $(TARGET) (non-empty) if it contains the substring x86 or an empty string otherwise, so checking that findstring does not return an empty string checks that target contains the substring... - Jieyou Xu
I beg your pardon? This is actually a great explanation... once you read it 5 times or so.
This is really making me want to compile some of the biggest WTF moments throughout this project and build a little "run-make House of Horror" to spook and scare Rust enjoyers. I already have an excellent introductory addition, with no doubt more to come. I'm pretty sure I noticed a sleep 1
getting changed into a sleep 2
somewhere for the sole purpose of securing compatibility with the FreeBSD operating system...
Anyhow, this week was marked with the first line of code committed to the Rust repository during the summer, with more to accompany it:
Merged
- 3 Very Similar Alloc Tests
- c-link-to-rust-va-list-fn
- reachable-extern-fn-available-lto
- same-lib-two-locations-no-panic, where I learned all the fun of OS-specific file extensions.
- c-link-to-rust-staticlib, where I clicked on a button on GitHub and was just one command away from pinging the entire Rust maintainer team again. Disaster averted. I have learned.
- no-cdylib-as-rdylib
- panic-impl-transitive
- static-unwinding
- share-generics-export-again
- box-struct-no-segfault
Open
- pgo-branch-weights, a much scarier test, which contained the cursed
ifneq
shown above and which will require some further review until it looks mergeable. - no-intermediate-extras
- reset-codegen-1
- no-mark-noalias
- external-crate-panic-handle-no-lint
That's a bucketload of pull requests... which did not go unnoticed. Dialing it down and bundling some tests together should be warranted from now on.
Most of these were quite easy and required adding few helper functions... so I wouldn't get too excited just yet. This project is likely getting extended to some amount of weeks that is bigger than 16.
Reading, Much Harder Than Writing?
I used to get a little intimidated when I finished a 10 lines of code pull request, and see that in the meantime, another GSoC contributor (if you're reading this, hello FractalFir :3) was building their own personal virtual cathedral, stained glass masterpieces included.
I am obviously not as experienced as them, but there's something else at play... the Rust-.NET code generator is practically a solo project, without a code review process, while directly making pull requests to a gigantic established codebase requires not only understanding what has been written by people-who-are-not-you, but also integrating your own work within... ensuring that the aforementioned people-who-are-not-you will be able to make heads and tails of it.
It's the first time I am part of something so massive in the technology field. I've always done solo projects like this where I would dump huge bucketloads of code in my personal repository daily. Going from this to the snail's pace of open source is a true change of paradigm... but one I find so very educational. I already knew "lines of code are not a good metric", but experiencing directly such a striking example really hardens this truth.
It is amusing to think that the Rust-.NET code generator may eventually become one such open source project, with a code review process and integration in software like Unity... Maybe it's going to be a GSoC organization one day.
Hehe, that's a far-fetched thought. Keep building your cathedral, Fractal, you have something very awesome on your hands.
The run-make
test rewrites may not be as glamorous as a Whole New Thing, but we all have our part to play in the ecosystem. Each brick we put down is one step closer to higher quality engineering. I am glad to be part of this community :3