This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern crate rand; | |
| mod text; | |
| fn main() { | |
| use rand::SeedableRng; | |
| let mut lex = text::Lexicon::new(rand::Isaac64Rng::from_seed(&[1, 2, 3, 4])); | |
| let nowhere = lex.source("nowhere".to_string()); | |
| let nobody = lex.author(nowhere.clone(), "nobody".to_string()); | |
| let message = lex.tell(nowhere.clone(), nobody, "nothing".to_string()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Category: | |
| Cocategory: | |
| nothing ~ nothing is bad | |
| everything ~ everything is good | |
| nothing ~ nothing is good | |
| Category: | |
| Cocategory: | |
| good ~ everything is good | |
| bad ~ nothing is bad | |
| good ~ nothing is good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::rc::Rc; | |
| use std::cell; | |
| use std::ops::{Deref, DerefMut}; | |
| pub struct SCell<T>(Rc<cell::RefCell<T>>); | |
| pub struct Ref<'a, T: 'a>(cell::Ref<'a, T>); | |
| pub struct RefMut<'a, T: 'a>(cell::RefMut<'a, T>); | |
| impl<T> SCell<T> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Iterate forwards weaving between messages and adding instances to the vec | |
| while let Some(i) = {instances.back().unwrap().borrow().next_instance()} { | |
| instances.push_back(i); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Iterate forwards weaving between messages and adding instances to the vec | |
| loop { | |
| let ins = instances.back().unwrap().borrow().next_instance(); | |
| if let Some(i) = ins { | |
| instances.push_back(i); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ iverilog -g2012 -t null -I src/ src/core0.sv | |
| src/core0.sv:7: syntax error | |
| src/core0.sv:5: Errors in port declarations. | |
| src/core0.sv:21: syntax error | |
| src/core0.sv:21: error: Invalid module instantiation | |
| src/core0.sv:22: error: Invalid module instantiation | |
| src/core0.sv:23: error: Invalid module instantiation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include "../../../Utilities/BitField.h" | |
| union spu_opcode_t | |
| { | |
| u32 opcode; | |
| bf_t<u32, 0, 7> rt; // 25..31, for 3-op instructions | |
| bf_t<u32, 0, 7> rc; // 25..31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include "../../../Utilities/BitField.h" | |
| union spu_opcode_t | |
| { | |
| u32 opcode; | |
| bf_t<u32, 0, 7> rt; // 25..31, for 3-op instructions | |
| bf_t<u32, 0, 7> rc; // 25..31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| CLIENT_ID="e442433569512b1" | |
| CLIENT_SECRET="b088d1efe225fb9cfa8bad79290a77209c13de5e" | |
| EXPIRE_TIME="3500" | |
| CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/imgur" | |
| mkdir -p "$CACHE_DIR" | |
| ACCESS_TOKEN_FILE="$CACHE_DIR/token-access" | |
| REFRESH_TOKEN_FILE="$CACHE_DIR/token-refresh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| filename=$(date +%s).png | |
| import "${filename}" | |
| echo "${filename}" | |
| imgur dTKCq "${filename}" |