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
impl <'a> IntoIterator for &'a Bitmap { | |
type Item = u16; | |
type IntoIter = SharedBitmapIterator<'a>; | |
fn into_iter(self) -> Self::IntoIter { | |
return SharedBitmapIterator { offset: 0, bitmap: &self }; | |
} | |
} | |
impl IntoIterator for Bitmap { | |
type Item = u16; |
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
extern crate rayon; | |
use rayon::prelude::*; | |
use std::time::Instant; | |
fn collatz(mut x: u64) -> usize { | |
let mut steps = 0; | |
while x != 1 { | |
if x % 2 == 0 { | |
x /= 2; |
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
iload_0 ; [a] | |
iconst_1 ; [a, 1] | |
ieq ; [a==1] | |
dup ; [a==1, a==1] | |
jmp_nonzero OR ; [a==1] | |
drop ; [] | |
iload_1 ; [b] | |
OR: | |
istore_2 ; [] | |
iload_2 ; [c] |
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
/* C code */ | |
int add(int x, int y) { | |
return x+y; | |
} | |
void caller() { | |
int a = add(3, 4); | |
} | |
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 <err.h> | |
#include <inttypes.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/time.h> | |
#define CACHE_LINES 64 |
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
fn deserialize_deals<'de, D>(de: D) -> ::std::result::Result<HashMap<u8, BTreeSet<String>>, D::Error> | |
where D: Deserializer<'de> | |
{ | |
struct DealsVisitor; | |
impl<'de> Visitor<'de> for DealsVisitor { | |
type Value = HashMap<u8, BTreeSet<String>>; | |
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
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
Seeded DCSS version 0.23.2 (console) character file. | |
Game seed: 18127138284784505733 | |
1676291 gotm the Invulnerable (level 27, 271/271 HPs) | |
Began as a Minotaur Gladiator on July 28, 2019. | |
Was a High Priest of Trog. | |
Escaped with the Orb | |
... and 3 runes on July 30, 2019! | |
OlderNewer