Skip to content

Instantly share code, notes, and snippets.

Avatar
🪀

Nick Paul nick-paul

🪀
View GitHub Profile
@nick-paul
nick-paul / julia_set.ijs
Created November 23, 2016 03:30
A J script for drawing fractals from the julia set
View julia_set.ijs
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
@nick-paul
nick-paul / maze_generator.lua
Created November 23, 2016 03:46
A lua script for generating and solving mazes
View maze_generator.lua
--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 / tic-tac-toe.hs
Created November 23, 2016 05:10
A simple tic-tac-toe game written in Haskell
View tic-tac-toe.hs
-- 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 / two_wrongs.ijs
Created December 10, 2016 17:42
Two Wrongs Sometimes Equal a Right
View two_wrongs.ijs
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. -----------