Skip to content

Instantly share code, notes, and snippets.

View rocketnia's full-sized avatar

Ross Angle rocketnia

View GitHub Profile
@Metaxal
Metaxal / paint.rkt
Last active October 25, 2020 08:52
A very simple painting program
#lang racket
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require racket/gui/base
pict)
(define line-width-init 1)
@fizbin
fizbin / regexequiv.hs
Last active January 19, 2023 22:50
Code to determine whether two regular expressions are equivalent, and if not to find a distinguishing string
{-# OPTIONS_GHC -Wall #-}
module Main (main) where
-- Takes two arguments in a limited regex-like language, and tells if
-- they are equivalent. This equivalence is shown by either saying
-- "there is no string which matches one regex but not the other" or
-- by giving a string which matches one but not the other.
-- (i.e. if the distinguishing string is Just "blah", then the regexes
-- aren't equivalent and onw matches "blah" and the other doesn't. If the