Skip to content

Instantly share code, notes, and snippets.

View Kixiron's full-sized avatar

Chase Wilson Kixiron

View GitHub Profile
declare i32 @printf(i8* noalias nocapture, ...)
@.str = private unnamed_addr constant [4 x i8] c"%i\0A\00", align 1
define i32 @main() {
entry:
br label %header
header:
%x = phi i32 [ 10, %entry ], [ %next_x, %header ]
#!/bin/sh
YELLOW="\033[1;33m"
GREEN="\033[0;32m"
RED="\033[0;31m"
# Remove coloring
NO_COLOR="\033[0m"
error() {
local message="$1"
use core::num::Wrapping;
pub(crate) struct Pcg64 {
state: Wrapping<u128>,
increment: Wrapping<u128>,
}
impl Pcg64 {
const MULTIPLIER: Wrapping<u128> = Wrapping(6_364_136_223_846_793_005);
pub trait StringInterner:
salsa::Database + salsa::plumbing::HasQueryGroup<InternerDatabase> + Database
{
fn intern_string(&self, key0: S) -> IStr;
fn lookup_intern_string(&self, key0: IStr) -> (S);
}
/// Representative struct for the query group.
pub struct InternerDatabase {}
impl salsa::plumbing::QueryGroup for InternerDatabase {
macro_rules! compile_expr {
($(
if #[$meta:meta] {
$( $stmt:tt )*
} $(else if #[$else_if_meta:meta] {
$( $else_if_stmt:tt )*
})* $(else {
$( $else_stmt:tt )*
})?
)+) => {
use pyo3::prelude::*;
use pyo3::wrap_pyfunction;
/// The lib_pacman_utils module
#[pymodule]
fn lib_pacman_utils(_py: Python, module: &PyModule) -> PyResult<()> {
module.add_wrapped(wrap_pyfunction!(circle_collision))?;
module.add_wrapped(wrap_pyfunction!(rect_collision))?;
Ok(())
@Kixiron
Kixiron / console_log.rs
Created May 4, 2019 14:33
WASM Console.log()
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(js_namespace = console)]
fn log(s: &str);
}
macro_rules! console_log {
($($t:tt)*) => (log(&format_args!($($t)*).to_string()))
}
This file has been truncated, but you can view the full file.
[
"aahed",
"aahing",
"aalii",
"aaliis",
"aardvark",
"aardvarks",
"aardwolf",
"aardwolves",
"aargh",
@Kixiron
Kixiron / .gitignore
Last active March 17, 2019 18:41
Kixiron's CSGO Settings
# Ignorelist
*.cfg
*.vdf
*.ekv
*.txt
*.scr
*.rc
*.kv3
# Directories