about summary refs log blame commit diff stats
path: root/cpp/.traces/divide_literal
blob: 47f8690fc21a457b908ea2d3efc651538ea2f84b (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                           
parse/0: instruction: 5
parse/0:   ingredient: {name: "8", type: 0}
parse/0:   ingredient: {name: "2", type: 0}
parse/0:   product: {name: "1", type: 1}
run/0: instruction 0
run/0: ingredient 0 is 8
run/0: ingredient 1 is 2
run/0: ingredient 1 is 2
run/0: product 0 is 4
mem/0: storing in location 1
' href='#n13'>13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
29
30
31
32
33
34
35
36
37
38
         

                    
              
 
       
            
 
           


















                                                                                   

                                 

                                           



                                               
                                                                      
 
use clap;
use log::info;
use std::sync::mpsc;
use std::time;

mod db;
mod logging;

fn main() {
    let arg_matches = clap::App::new("clinte")
        .version(clap::crate_version!())
        .author("Ben Morrison (gbmor)")
        .about("Command-line community notices system")
        .subcommand(clap::SubCommand::with_name("list").about("Display notices"))
        .subcommand(clap::SubCommand::with_name("post").about("Post a new notice"))
        .subcommand(
            clap::SubCommand::with_name("update")
                .about("Update a notice you've posted")
                .arg(clap::Arg::with_name("id").help("Numeric ID of the post")),
        )
        .subcommand(
            clap::SubCommand::with_name("delete")
                .about("Delete a notice you've posted")
                .arg(clap::Arg::with_name("id").help("Numeric ID of the post")),
        )
        .get_matches();

    let start = time::Instant::now();
    logging::init();
    info!("clinte starting up!");
    println!("clinte-0.1-dev");
    println!("a community notices system");

    let (_tx, rx) = mpsc::channel::<db::Cmd>();
    let db = db::Conn::new(rx);

    info!("Startup completed in {:?}ms", start.elapsed().as_millis());
}