Here is a list of crates that will make your code and general Rust experience more readable and clean, because Rust can get pretty ugly sometimes.
I encourage you to check through each item in this list to determine if it is of some use to you.
/* | |
CSShock v0.2: rapid styling for your web interfaces | |
*/ | |
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap'); | |
:root { | |
/* Colors */ | |
--text-color: #E0E0E0; | |
--background-color: #1A1A2E; |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script defer src="stackbunch.js"></script> | |
</head> | |
<body mobile="500px" tablet="700px" desktop="1000px"> | |
<stack> | |
<bunch class="titlebar"> | |
<div class="logo"> |
// Rat - Cat but it's in Rust | |
use pico_args::{Arguments, Error}; | |
use std::fs; | |
// Help message | |
const HELP: &str = "\ | |
rat - A program to read and display files | |
Usage: | |
rat [options] FILE | |
Options: |
// A simple pratt parser in Rust | |
use std::fmt; | |
// Tree enum, for representing trees | |
pub enum Tree { | |
// This holds a number e.g. `3` | |
Number(usize), | |
// This holds an operation e.g. `1 + 2` | |
Operation(Box<Tree>, char, Box<Tree>), | |
} |
Here is a list of crates that will make your code and general Rust experience more readable and clean, because Rust can get pretty ugly sometimes.
I encourage you to check through each item in this list to determine if it is of some use to you.
# Import things | |
import sequtils | |
import strutils | |
import regex | |
import os | |
# Read data from file | |
var data = paramStr(1).readFile.toLowerAscii | |
# Remove the parts of the file we don't want to count |