{{ message }}

Instantly share code, notes, and snippets.

# Safsafiire

Created Nov 17, 2016
View keybase.md

### Keybase proof

I hereby claim:

• I am safiire on github.
• I am safiire (https://keybase.io/safiire) on keybase.
• I have a public key whose fingerprint is 06DC 5901 70E2 350A 4BCE 7C1D 9EFD 7244 59CC 7EB0

To claim this, I am signing this object:

Created Oct 11, 2016
My Dual Number implementation
View dual.h
 #pragma once #include #include #include #include "saf_math.h" //// Some more information for adding more functionality here: //// http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/other/dualNumbers/functions/
Last active Sep 19, 2016
Modeling a filter's difference equation, so that it can invert itself.
View difference_equation.rb
 #!/usr/bin/env ruby # Really inefficient toy #### ## A little wrapper to make signals either with ## lambda functions or arrays. class SignalFunction def self.ramp SignalFunction.new(lambda{|n| n < 0 ? 0r : n/1r}) end
Created May 16, 2016
Interesting way of using the new variadic templates to create a variadic print() function.
 // Compile with: g++ -std=c++11 variadic_print.cpp -o variadic_print #include // No argument case void print() {} // Recursive Variadic Template template void print(const HEAD& head, const TAIL& ... tail) {
Last active Mar 15, 2016
This is a C program to decrypt pokémon files
View pokémon_decrypt.c
 #include #include #include #include #include #define NICKNAMED(x) ((x & 0x80000000) >> 31) #define IS_EGG(x) ((x & 0x40000000) >> 30) #define SP_DEF_IV(x) ((x & 0x3e000000) >> 25) #define SP_ATT_IV(x) ((x & 0x01f00000) >> 20)
Last active Sep 4, 2015
RC Filter Circuit simulation in Scheme
View rc_filter_simulation.scm
 ;;;; RC Filter Simulation ;; Calculates the frequency response of an RC filter ;; and displays it with ASCII art ;; This is just a program I always write to learn a new programming language ;; I tried out Scheme's lazy lists for this ;; ;; Frequency Response ;; ---------------------------------------------------------------- ;; |****************************** | ;; | ***** |
Created Sep 3, 2015
A working .csirc file for Scheme readline
View .csirc