This file contains 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
environment.systemPackages = with pkgs; | |
let | |
agda-with-stdlib = agda.withPackages (agda-packages: with agda-packages; [ | |
standard-library | |
]); | |
in [ | |
agda-with-stdlib | |
]; |
This file contains 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
#include <memory> | |
#include <unordered_map> | |
/// -------------- | |
class ImplBase; | |
class Class { | |
std::unique_ptr<ImplBase> impl; |
This file contains 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
while True: | |
b=512 | |
while b >= 0: | |
g = 512 | |
while g >= 0: | |
r = 512 | |
while r >= 0: | |
print("r={:>3}, g={:>3}, b={:>3}".format(r,g,b)) | |
r -= 8 | |
g -= 8 |
This file contains 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
#[derive(Debug, Serialize, Deserialize)] | |
struct Thing { | |
value: String, | |
} | |
pub fn do_the_thing() { | |
let mut cfg = cfg::Config::default(); | |
cfg.set("value", "didn't do the thing").unwrap(); | |
cfg.merge(cfg::File::with_name("./thing.yml")).unwrap(); | |
// --- |
This file contains 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
int[] lookupTable = new int[] { | |
0b00000000_00000000_00000000_00000000, | |
0b00000000_00000000_00000000_00000001, | |
0b00000000_00000000_00000000_00001000, | |
0b00000000_00000000_00000000_00001001, | |
0b00000000_00000000_00000000_01000000, | |
0b00000000_00000000_00000000_01000001, | |
0b00000000_00000000_00000000_01001000, | |
0b00000000_00000000_00000000_01001001, | |
0b00000000_00000000_00000010_00000000, |
This file contains 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
ENTRY(start) | |
SECTIONS { | |
. = 1M; | |
.boot : | |
{ | |
KEEP(*(.multiboot_header)) | |
} |
This file contains 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
global internal_cpuid | |
section .text | |
bits 64 | |
; params: | |
; rdi - cpuid call | |
; rsi - pointer to a continous 16 bytes of memory | |
; which will be filled | |
internal_cpuid: |
This file contains 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
pub trait Formula { | |
type C: Clause; | |
fn get_unit(&self) -> Option<&Self::C>; | |
fn force_assignment(&mut self, lit: Literal, reason: &Self::C); | |
} | |
fn unit<F: Formula>(f: &mut F) -> bool { | |
let unit_clause = match f.get_unit() { | |
Some(x) => x, | |
None => return false |
This file contains 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
fmt=0 streamId3 | |
[>>>] 03 | |
[>>>] ff | |
[>>>] ff | |
[>>>] c2 | |
[>>>] 00 | |
[>>>] 02 | |
[>>>] 17 | |
[>>>] 14 | |
[>>>] 00 |
This file contains 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
type Rules<'a> = HashMap<ProdElem<'a>, Vec<Vec<ProdElem<'a>>>>; | |
type ParseTable<'a> = HashMap<ProdElem<'a>, HashMap<ProdElem<'a>, &'a Vec<ProdElem<'a>>>>; | |
fn mk_parse_table<'a>(rules: &Rules<'a>, first_set: &FirstSet<'a>, follow_set: &FollowSet<'a>) -> ParseTable<'a> { | |
let mut result = HashMap::new(); | |
/// :t elem = ProdElem<'a> | |
/// :t productions = &Vec<Vec<ProdElem<'a>> |
NewerOlder