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::collections::{HashSet, VecDeque}; | |
use anyhow::Context as _; | |
pub type Card = usize; | |
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | |
pub enum Winner { | |
Player1, | |
Player2, |
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
#!/usr/bin/env perl | |
use v5.18; | |
use strict; | |
our %rules; | |
sub compile_rule { | |
state %compiled; |
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
#!/usr/bin/env perl | |
use v5.18; | |
use strict; | |
our %rules; | |
sub compile_rule { | |
state %compiled; |
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
POP_TOP 1 0x1 | |
ROT_TWO 2 0x2 | |
ROT_THREE 3 0x3 | |
DUP_TOP 4 0x4 | |
DUP_TOP_TWO 5 0x5 | |
ROT_FOUR 6 0x6 | |
NOP 9 0x9 | |
UNARY_POSITIVE 10 0xA | |
UNARY_NEGATIVE 11 0xB | |
UNARY_NOT 12 0xC |
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
# pylint: disable=all | |
from __future__ import annotations | |
from typing import Callable, Generic, List, Optional, TypeVar, Union | |
T = TypeVar('T') | |
S = TypeVar('S') | |
R = TypeVar('R') | |
Transform = Callable[[T], S] |
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
" Sections (use <Leader>s to quick jump to section) | |
" 1. Basic options [S_BASIC] | |
" 2. Plugins [S_PLUGINS] | |
" 3. Colors [S_COLORS] | |
" 4. Autocommands [S_AUTO] | |
" 5. Mappings [S_MAPPINGS] | |
" 6. Lightline [S_LIGHTLINE] | |
" 7. NeoMake [S_NEOMAKE] | |
" 8. LSP & similar things [S_LSP] | |
" 9. Firenvim (using NeoVim in browser) [S_FIRENVIM] |
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
#![feature(prelude_import)] | |
#[prelude_import] | |
use std::prelude::v1::*; | |
#[macro_use] | |
extern crate std; | |
use std::rc::Rc; | |
pub struct Container<T>(Rc<T>); | |
#[automatically_derived] | |
#[allow(unused_qualifications)] | |
impl<T: ::core::clone::Clone> ::core::clone::Clone for Container<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
test.o: file format elf64-x86-64 | |
Disassembly of section .text: | |
0000000000000000 <f>: | |
0: 8d 47 01 lea 0x1(%rdi),%eax | |
3: c3 retq | |
4: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) |
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
#include <stdio.h> | |
#define IS_INT_LONG(N) _Generic((N), \ | |
int: no_int, \ | |
long int: yes_long, \ | |
long long int: yes_long_long, \ | |
default: no_no_int \ | |
)() | |
void no_int() { |
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
#include <stdio.h> | |
#define IS_INT_LONG(N) _Generic((N), \ | |
int: no_int, \ | |
long int: yes_long, \ | |
long long int: yes_long_long, \ | |
default: no_no_int \ | |
)() | |
void no_int() { |