Skip to content

Conversation

@SOF3
Copy link

@SOF3 SOF3 commented Jun 12, 2020

This would compile README into an executable rust file that would output the same contents as the markdown content.

One can obtain the executable by running just build. Currently the justfile only supports Linux-like systems.


### Y U HATE RUST SO MUCH?

I don't, actually. I believe that those who spend their time asking people to rewrite their projects are probably not themselves active Rust developers, as those active devs are probably busy [writing memory-safe code](https://trac.torproject.org/projects/tor/ticket/11331).
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTPS links have // which prevents the () from being paired, causing errors at the lexing stage. They have been migrated to footnote style which does not wrap URLs inside brackets.

fn test() {
use std::{fs, path::PathBuf};

let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test.txt");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test file was made external instead of using quote!(), because quote!() does not allow literal expressions with a #.

@SOF3
Copy link
Author

SOF3 commented Jun 12, 2020

The CI is currently failing because of rust-lang/cargo#8354 failing to install just. It has been tested to work on older nightly versions.

@ansuz
Copy link
Owner

ansuz commented Jun 12, 2020

This is an impressive display of over-engineering. Kudos!

The only thing that seems to be missing at this point is instructions for how to build the readme within the readme.

@progval progval added approved this repository maintainers' like this post help wanted link to a ticket by someone asking for a rust rewrite work in progress someone is working on the Rust rewrite labels Aug 31, 2020
@SOF3
Copy link
Author

SOF3 commented Mar 4, 2021

I have added the instructions to build the readme. I have also added a rust-toolchain file so that a nightly compiler with proc_macro_span support is used.

README.md Outdated
This readme is written in Rust to further rebut arguments that Rust has low readability.
The readme can be built into an executable by running the [just][just] command:

> just build
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code blocks can be inserted in markdown by indenting with four spaces.

@emerson-proenca
Copy link

Consider adding a [unsafe] block when referecing "### Y U HATE RUST SO MUCH?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved this repository maintainers' like this post help wanted link to a ticket by someone asking for a rust rewrite work in progress someone is working on the Rust rewrite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants