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 super::assets::{Assets, Sprite}; | |
| use std::borrow::Cow; | |
| use std::cell::Cell; | |
| use std::cell::UnsafeCell; | |
| use std::mem; | |
| use std::mem::ManuallyDrop; | |
| use std::mem::MaybeUninit; | |
| use std::num::NonZeroU32; | |
| use std::ptr; | |
| use std::slice; |
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
| diff --git a/Cargo.lock b/Cargo.lock | |
| index 82399df..ada411b 100644 | |
| --- a/Cargo.lock | |
| +++ b/Cargo.lock | |
| @@ -1124,6 +1124,7 @@ dependencies = [ | |
| "log", | |
| "nanoserde", | |
| "thiserror", | |
| + "tinyvec", | |
| "vek", |
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::{ | |
| alloc::Layout, | |
| any::TypeId, | |
| cmp::Ordering, | |
| hash::{Hash, Hasher}, | |
| mem, | |
| ptr, | |
| }; | |
| #[derive(Debug, Copy, Clone, Eq)] |
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
| pub struct KeyBindingSet<const N: usize, A> | |
| where | |
| A: Action, | |
| { | |
| bindings: [(Button, A); N], | |
| } | |
| impl<const N: usize, A> KeyBindingSet<N, A> | |
| where | |
| A: Action, |
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
| What the heck did you just freaking say about me, you little dumbo? I'll have you know I graduated top of my class in the Rust Beginners course, and I've been involved in numerous secret raids on the Go mailing list, and I have over 300 confirmed conversions. I am trained in crab warfare and I'm the top sniper in the entire RESF unarmed forces. You are nothing to me but just another target. I will convert you the frick out with precision the likes of which has never been seen before on this Earth, mark my flipping words. You think you can get away with saying that crap to me over the Internet? Think again, you silly. As we speak I am contacting my secret network of crab-people across the RESF and your IP is being traced right now so you better prepare for the storm, moron. The storm that wipes out the pathetic little thing you call your "programming language choice". You're frigging converted, kid. I can be anywhere, anytime, and I can convert you in over seven hundred ways, and that's just with my bare hands |
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
| function generateByteHexTable(): string[] { | |
| const table = new Array(256); | |
| for (let i = 0; i < 256; i++) { | |
| table[i] = (i + 0x100).toString(16).substr(1); | |
| } | |
| return table; | |
| } | |
| function generateQuadHexTable(): 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
| func safeSend(ch chan bool, value bool) (closed bool) { | |
| defer func() { | |
| if recover() != nil { | |
| closed = true | |
| } | |
| }() | |
| ch <- value | |
| return false | |
| } |
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 hashbrown::{hash_map, HashMap}; | |
| use super::TaggedHandle; | |
| pub struct ObjectSet { | |
| set: HashMap<TaggedHandle, (), ()>, | |
| } | |
| impl ObjectSet { | |
| pub fn new() -> Self { |
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
| -- The Great Computer Language Shootout | |
| -- http://shootout.alioth.debian.org/ | |
| -- contributed by Isaac Gouy, tuned by Mike Pall | |
| local sqrt = math.sqrt | |
| local PI = 3.141592653589793 | |
| local SOLAR_MASS = 4 * PI * PI | |
| local DAYS_PER_YEAR = 365.24 |
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::{HashMap, HashSet}, | |
| iter, | |
| }; | |
| use cstree::{self, interning::TokenInterner}; | |
| use super::{ | |
| super::parser::syntax::{Root, Stmt}, | |
| bytecode::{Capture, Instruction}, |