Skip to content

Instantly share code, notes, and snippets.

View DieracDelta's full-sized avatar
💭
2565 7B91 AD2D 02C6 1B7F 9819 E682 81EB 2ABC E9B8

Justin Restivo DieracDelta

💭
2565 7B91 AD2D 02C6 1B7F 9819 E682 81EB 2ABC E9B8
View GitHub Profile
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
hp = pkgs.haskell.packages.ghc98.override {
#include <stdio.h>
#include <stdlib.h>
// EX_0:
// - array declaration
// - array initialization on stack
// - array reads and writes
void ex_0() {
int balance[2][3] = {
{1000, 1000, 1000},
#include <stdio.h>
#include <stdlib.h>
// EX_0:
// - array declaration
// - array initialization on stack
// - array reads and writes
void ex_0() {
int balance[2][3] = {
{1000, 1000, 1000},
#include <stdio.h>
#include <stdlib.h>
// EX_0:
// - array declaration
// - array initialization on stack
// - array reads and writes
void ex_0() {
int balance[2][3] = {
{1000, 1000, 1000},
// I only have three examples. Ran out of ideas for more.
// I can make VLA example if helpful? But, since this is discouraged in class, opted not to.
#include <stdio.h>
// EX0: No typedef
struct Sensor {
int id;
double reading;
#include <stdio.h>
#include <stdlib.h>
// EX_0:
// - array declaration
// - array initialization on stack
// - array reads and writes
void ex_0() {
int balance[2][3] = {
{1000, 1000, 1000},
// I only have three examples. Ran out of ideas for more.
// I can make VLA example if helpful? But, since this is discouraged in class, opted not to.
#include <stdio.h>
// EX0: No typedef
struct Sensor {
int id;
double reading;
@DieracDelta
DieracDelta / gist:7f1c9ab817a3f9c45a4bbef332c08bf9
Created November 12, 2024 00:47
isomorphisms to representative elements
Phi:
r:
1->1
2->2
3->3
4->4
5->5
s:
1->1
2->2
@DieracDelta
DieracDelta / gist:c788fb2d4dee0f452aa158e8d0724c4b
Created November 12, 2024 00:45
List of possible actions (not up to isomorphism)
r:
1->1
2->2
3->3
4->4
5->5
s:
1->1
2->2
3->5
use std::collections::HashSet;
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
struct Mat {
a: u8,
c: u8,
b: u8,
}
fn mat_mult(a: Mat, b: Mat) -> Mat {