Live data from Hacker News

Rust Discovery, Or: How I Figure Things Out

carol-nichols.com

11–17 of 17 posts

Re: Rust Discovery, Or: How I Figure Things Out

#11
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

#13
post #12

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?

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

#14

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.

Thank you! <3

Re: Rust Discovery, Or: How I Figure Things Out

#15
post #12

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?

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

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

#16
post #15

Earlier quoted context omitted.

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

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 implementat…

I was also wondering why not autogenerating a "documentation" grammar out of the working code.

Re: Rust Discovery, Or: How I Figure Things Out

#17
post #15

Earlier quoted context omitted.

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

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 implementat…

There were only three temporarily: today, the reference grammar is all gone, subsumed into the documentation/testing grammar.
Post reply on HN