Skip to content

Instantly share code, notes, and snippets.

View jlagarespo's full-sized avatar

Jacob Lagares Pozo jlagarespo

  • Catalunya, Spain
View GitHub Profile
@jlagarespo
jlagarespo / Polyominoes.hs
Created December 26, 2021 21:05
Simple haskell program to find polyominoes or polyplets of up to N bits.
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Polyominoes (Polyominoes, findPolyominoes, findPolyplets) where
import Data.HashSet (HashSet)
import qualified Data.HashSet as HS
import Data.List (nub, intercalate)
type Polyomino = HashSet (Int, Int)
import this
@jlagarespo
jlagarespo / strings.c
Last active March 2, 2020 12:47
Implementation of some string utils
void strcpy(const char *src, char *dst);
void strcat(char *src, const char *str);
int strlen(const char *src);
void strcpy(const char *src, char *dst)
{
for (int i = 0; src[i] != '\0'; i++)
dst[i] = src[i];
}
@jlagarespo
jlagarespo / hello_gist.c
Created May 28, 2019 16:46
First time using gist. This looks cool!
#include <iostream>
int main(int argc, char *argv[]) {
printf("hello, world");
return 0;
}