Skip to content

Instantly share code, notes, and snippets.

View zohnannor's full-sized avatar
🦀

zohnannor

🦀
View GitHub Profile

Objectives

[Eden]

Name Description Unlock ID Item Quality % Unlocked
[Eden's Blessing] Unlocked a new item. Defeat [Hush] as [Eden] 188 3 20.5%
[Eden's Soul] Unlocked a new item. Defeat [Delirium] as [Eden] 289 3 16.4%
[Everything Jar] Complete the final chapter with Eden. Defeat [The Beast] as [Eden] 459 3 10.9%
[Blank Card] Unlocked a new item. Defeat [Isaac] as [Eden] 121 2 30.1% [ ]
@zohnannor
zohnannor / main.rs
Created January 7, 2023 18:56 — forked from U007D/main.rs
Lifetime GAT emulation on stable rust
// This is a technique to emulate lifetime GATs (generic associated types) on stable rust starting
// with rustc 1.33.
//
// I haven't seen this exact technique before, but I would be surprised if no one else came up with
// it. I think this avoids most downsides of other lifetime GAT workarounds I've seen.
//
// In particular, neither implementing nor using traits with emulated lifetime GATs requires adding
// any helper items. Only defining the trait requires a single helper trait (+ a single helper impl
// for the 2nd variant) per GAT. This also makes the technique viable without any boilerplate
// reducing macros.
trait Tuple<const ARITY: usize> {
fn hashes(&self) -> [u64; ARITY];
}
// trait TupleHasType<T> {}
macro_rules! impl_tuples {
// tt counter
(@count ) => { 0 };

Palaye Royale

The Bastards

Little Bastards

Sometimes I've been loosing my mind
Running out of faith
Lonely I've been feeling lonely
Put me in my place

@zohnannor
zohnannor / main.rs
Created October 23, 2022 21:02
`adt_const_params` fun
#![feature(adt_const_params)]
#![allow(incomplete_features, clippy::disallowed_names)]
#[derive(Debug)]
struct Foo {
bar: i32,
baz: String,
}
trait Field<T, const NAME: &'static str> {}

Achievements progression

Name Description Unlock ID Item Quality % Unlocked
[Ipecac] Unlocked a new item. Defeat [Mom's Heart] 6 times 140 4 48.9%
[A Fetus in a Jar] Unlocked a new item. Defeat [Mom's Heart] 9 times 11 4 46%
[Mom's Knife] Unlocked a new item. Defeat [Satan] as [Isaac] 43 4 42%
[Satanic Bible] Unlocked a new item. Defeat [Isaac] as [Azazel] 126 4 37.6%
[The D6] Isaac now holds the D6! Defeat [Isaac] as [???] 29 4 35.4%
[Haemolacria] Unlocked a new item. Acquire [Blood Clot] 10 times 377 4 26.8% [x]
function "btw,"(){print '\033[38;2;23;147;209m
I use
▟█▙
▟███▙
▟█████▙
▟███████▙
▂▔▀▜██████▙
▟██▅▂▝▜█████▙
▟█████████████▙
#![feature(test)]
#[cfg(test)]
mod test {
extern crate test;
use std::{hint, ops::RangeInclusive};
use rand::{distributions::Uniform, Rng};
use test::Bencher;
{
/* VSCODE */
"explorer.confirmDragAndDrop": false,
"explorer.incrementalNaming": "smart",
"explorer.confirmDelete": false,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.ts": "${capture}.js",
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
"*.jsx": "${capture}.js",
@zohnannor
zohnannor / theme.md
Last active May 23, 2022 16:54
моя тема в вскоде