4 ms·
Rust Discovery, Or: How I Figure Things Out
- bombless 12y agoAbout the ‵mod′ keyword in ‵use′, if you ask it on IRC I'm sure many people including me would point you the relevant PR that was made around October. Nice article by the way.
- ExpiredLink 12y agoWhat is this stream of consciousness?
- carols10cents 12y agoWelcome to my brain. Please use a coaster.
- pshc 12y agoNice find with the grammar mismatch! Thanks for showing your methods in depth. I also liked the intro bit about knowing how to delve into a system. Seems like hoisting the entire Rust compiler distribution into one brain would be uncomfortable; there's so much going on in there. Tangentially, digital archaeology is fascinating. I want to see some kind of VR "Git Simulator 201X" for exploring history in 3D. Maybe render commits projected spatially by date and be able to zoom into the diffs? If it could pull down all the PR comments from GitHub and then annotate the graph/blames... well, it might be useful, or might be more distracting than productive. Maybe a project for some rainy winter...
- carols10cents 12y agoThanks! There's more grammar and reference work to be done, hint hint to anyone reading this and looking for something to do on Rust ;) I'd love to be able to follow a chunk of code around visually, wherever it gets moved, play back the commits touching it... not sure how it'd work exactly, but I think you're onto something there :)
- erikano 12y agoDead comment by user bombless. Reposting so Carol gets to see the comment (since she asked specifically for additional ways to find information) in case she doesn't have show dead on. >About the ‵mod′ keyword in ‵use′, if you ask it on IRC I'm sure many people including me would point you the relevant PR that was made around October. Nice article by the way.
- carols10cents 12y agoThank you, both of you! :)
- jarrettc 12y agoThanks so much for working on the grammar docs! This is much needed and very helpful, considering how quickly Rust's grammar has been evolving.
- carols10cents 12y agoYou're welcome! <3
- copsarebastards 12y agoThis post is really great. Often when trying out a new ecosystem the longest part of the learning process isn't learning the language or tools themselves, but learning a process that works best for the language. This gives a lot of insight about how you approach Rust and the other tools in your toolbox.
- carols10cents 12y agoThank you! <3
- e12e 12y agoGreat write-up! (And great work). A little surprised there's no mention of looking at the implementation (src/grammar/parswr-larl.y, eg line 308) -- perhaps in the next installment?
- carols10cents 12y agoYeah, I was going to get into the implementation when I was going to figure out what `path` should be, which was also when I decided the post was getting too long ;) Note that src/grammar/parser-lalr.y is a reference grammar for testing [1] and the actual implementation is in src/libsyntax, afaik. [1] - https://github.com/rust-lang/rust/pull/21452 https://github.com/rust-lang/rust/pull/21452
- e12e 12y agoSo, there's three "official" grammars for Rust? The one in the documentation, the reference grammar (that serves as documentation and testing) - and the actual grammar, used in the reference implementation? No wonder there are inconsistencies... Sounds like paring it down to two: a reference/testing grammar that is well documented; perhaps written/maintained with a literate programming tool and the actual implementation is a good idea. Kill off the "only documentation" grammar and/or merge it with the larl-one.
- acqq 12y agoI was also wondering why not autogenerating a "documentation" grammar out of the working code.
- steveklabnik 12y agoThere were only three temporarily: today, the reference grammar is all gone, subsumed into the documentation/testing grammar.