Skip to content

Instantly share code, notes, and snippets.

View nick-paul's full-sized avatar
🪀

Nick Paul nick-paul

🪀
View GitHub Profile
@nick-paul
nick-paul / two_wrongs.ijs
Created December 10, 2016 17:42
Two Wrongs Sometimes Equal a Right
NB. Nicholas Paul
NB. 9 Dec 2016
NB. Suppose every letter below represents a distinct positive
NB. integer, non of which are zero. What is a possible value
NB. for each letter?
NB.
NB. W R O N G
NB. + W R O N G
NB. -----------
@nick-paul
nick-paul / tic-tac-toe.hs
Created November 23, 2016 05:10
A simple tic-tac-toe game written in Haskell
-- Nicholas Paul
-- A simple tic-tac-toe game written in Haskell
import Data.List
import Data.Char
import Data.Time.Clock.POSIX
-- Main function. We will simply call our gameLoop with
-- an empty board
main = do
@nick-paul
nick-paul / maze_generator.lua
Created November 23, 2016 03:46
A lua script for generating and solving mazes
--Maze Generator
--Nicholas Paul
-- ZeroBrane's turtle library
require "turtle"
math.randomseed(os.time())
SIZE = 100 --Width of tiles in the maze
SCALE = 8 --Drawing Scale
@nick-paul
nick-paul / julia_set.ijs
Created November 23, 2016 03:30
A J script for drawing fractals from the julia set
NB. A J script for drawing fractals from the julia set.
NB. Algorithm from:
NB. http://mathemartician.blogspot.com/2012/07/julia-set-in-julia.html
require 'viewmat'
S =: 100 NB. Detail level of image
NB. The iteration verb
julia =: 3 : 0 "0