layout | title | published |
---|---|---|
post |
Decrease Memory Using Enums in Rust |
true |
I am slowly building a sort of atom/universe generator/visualizer in Rust with friends. The project is called Oxidizy.
use rayon::prelude::*; | |
const VEC_SIZE: usize = 1_000_000_001; | |
const CHUNK_SIZE: usize = 128; | |
enum FizzBuzz { | |
FIFTEEN, | |
THREE, | |
FIVE, | |
VALUE(u32), |
layout | title | published |
---|---|---|
post |
Decrease Memory Using Enums in Rust |
true |
I am slowly building a sort of atom/universe generator/visualizer in Rust with friends. The project is called Oxidizy.
sudo ls /var/crash | |
sudo rm /var/crash/* | |
sudo ls /var/crash |
I hereby claim:
To claim this, I am signing this object:
defmodule Encrypto do | |
@encrypto_secret_key System.get_env("ENCRYPTO_SECRET_KEY") | |
@encrypto_aad_context System.get_env("ENCRYPTO_AAD_CONTEXT") | |
def encrypt(msg) do | |
decoded_key = Base.decode16!(@encrypto_secret_key) | |
iv = :crypto.strong_rand_bytes(32) | |
{ct, tag} = :crypto.block_encrypt(:aes_gcm, decoded_key, iv, {@encrypto_aad_context, msg}) |
package main | |
import ( | |
"flag" | |
"fmt" | |
"math/rand" | |
"os" | |
"sync" | |
"time" | |
) |
########################## | |
# THIS ONLY WORKS ON LINUX | |
########################## | |
# $ amidi -l | |
# Dir Device Name | |
# IO hw:1,0,0 Elektron Digitone MIDI 1 | |
set -e |
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"runtime" | |
"strings" | |
"sync" |
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"runtime" | |
"strings" | |
"sync" |
#!/usr/bin/env bash | |
###### | |
# This script assumes you are on Ubuntu 18.04 LTS | |
# Everything will be setup/installed in your home dir | |
###### | |
set -e | |
cd $HOME |