News for hackers. Stuff that matters.
Re:Rust Discovery, Or: How I Figure Things Out by pshc on Monday May 11, 2015 @11:40AM (#9525528)
Nice 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...

Re:Rust Discovery, Or: How I Figure Things Out by carols10cents on Monday May 11, 2015 @11:45AM (#9525564)
Thanks! 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 :)

Re:Rust Discovery, Or: How I Figure Things Out by erikano on Monday May 11, 2015 @01:35PM (#9526408)
Dead 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.

Re:Rust Discovery, Or: How I Figure Things Out by carols10cents on Monday May 11, 2015 @02:06PM (#9526618)
Thank you, both of you! :)
Re:Rust Discovery, Or: How I Figure Things Out by copsarebastards on Monday May 11, 2015 @02:16PM (#9526704)
This 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.
Re:Rust Discovery, Or: How I Figure Things Out by carols10cents on Monday May 11, 2015 @08:04PM (#9528676)
Thank you! <3
Re:Rust Discovery, Or: How I Figure Things Out by jarrettc on Monday May 11, 2015 @01:38PM (#9526431)
Thanks so much for working on the grammar docs! This is much needed and very helpful, considering how quickly Rust's grammar has been evolving.
Re:Rust Discovery, Or: How I Figure Things Out by carols10cents on Monday May 11, 2015 @02:06PM (#9526621)
You're welcome! <3
Re:Rust Discovery, Or: How I Figure Things Out by e12e on Monday May 11, 2015 @05:54PM (#9528105)
Great 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?

Re:Rust Discovery, Or: How I Figure Things Out by carols10cents on Monday May 11, 2015 @08:03PM (#9528673)
Yeah, 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

Re:Rust Discovery, Or: How I Figure Things Out by e12e on Tuesday May 12, 2015 @01:11AM (#9529716)
So, 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.

Re:Rust Discovery, Or: How I Figure Things Out by acqq on Tuesday May 12, 2015 @01:41AM (#9529770)
I was also wondering why not autogenerating a "documentation" grammar out of the working code.
Re:Rust Discovery, Or: How I Figure Things Out by steveklabnik on Tuesday May 12, 2015 @08:43AM (#9531280)
There were only three temporarily: today, the reference grammar is all gone, subsumed into the documentation/testing grammar.
Re:Rust Discovery, Or: How I Figure Things Out by ExpiredLink on Monday May 11, 2015 @11:25AM (#9525437)
What is this stream of consciousness?
Re:Rust Discovery, Or: How I Figure Things Out by carols10cents on Monday May 11, 2015 @11:45AM (#9525566)
Welcome to my brain. Please use a coaster.