diff --git a/drafts/church-encoding-in-javascript.markdown b/drafts/church-encoding-in-javascript.markdown new file mode 100644 index 0000000..beadd8c --- /dev/null +++ b/drafts/church-encoding-in-javascript.markdown @@ -0,0 +1,13 @@ +--- +title: Church Encoding in JS +author: Collin J. Doering +date: Jun 19, 2015 +description: Encoding various types using only variables and functions +tags: general +--- + +TODO + + + +TODO diff --git a/drafts/computer-from-scratch.markdown b/drafts/computer-from-scratch.markdown new file mode 100644 index 0000000..e7a2cf3 --- /dev/null +++ b/drafts/computer-from-scratch.markdown @@ -0,0 +1,33 @@ +--- +title: Computer From Scratch +author: Collin J. Doering +date: Jun 19, 2015 +description: Building a computer from scratch using VHDL +tags: general, programming, hardware, nand-to-tetris +--- + +Recently I have had the pleasure of completing the course *Nand to Tetris* on +[Coursea](http://coursera.org). Firstly, I'd like to highly recommend it to anyone! I never +thought it would be possible for me to understand computers all the way down to the hardware +level (past assembly that is); *Nand to Tetris* has shown me otherwise! It has also inspired me +to pursue learning a real world hardware description language and attempt to implement the +*Hack* system on an FPGA. In this article I will describe how the process is coming and the +what remains to be completed. + + + +After implementing the *Hack Computer System* in the hardware description language described by +the course, I went on to implement everything in [VHDL](https://en.wikipedia.org/wiki/VHDL), +with the end goal of being able to realize the design on a +[FPGA](https://en.wikipedia.org/wiki/Field-programmable_gate_array) (Field Programmable Gate +Array). I also needed a set of test benches to verify correctness of the design through +simulation. Initially I set out to find a completely open source solution. To my dismay, I +found that FPGA's are incredibly proprietary. Namely, the process of *synthesis* cannot be done +using open source tools, though there exists a few projects which are reverse engineering the +bit file format of various FPGA's in order to develop a open solution to synthesis, they are +not yet ready for use. So, synthesis needs to be done with proprietary tools. + + +which is +taking the hardware description (either VHDL or Verilog) and convert it to a bit file (a format +the FPGA can use). diff --git a/drafts/dfa-simulator.markdown b/drafts/dfa-simulator.markdown new file mode 100644 index 0000000..a59e92f --- /dev/null +++ b/drafts/dfa-simulator.markdown @@ -0,0 +1,13 @@ +--- +title: DFA Simulator +author: Collin J. Doering +date: Feb 21, 2015 +description: Deterministic Finite State Machines implemented using functions in haskell and racket +tags: general, programming +--- + +TODO + + + +TODO diff --git a/drafts/quines.markdown b/drafts/quines.markdown new file mode 100644 index 0000000..fc12b52 --- /dev/null +++ b/drafts/quines.markdown @@ -0,0 +1,67 @@ +--- +title: Fun with Quines +author: Collin J. Doering +date: Feb 21, 2015 +description: Self replicating programs +tags: programming +--- + +Quines are cute. + + >"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation. + +See wikipedia on quines: + + + +``` {.haskell .code-term .numberLines} +a = "main = putStrLn $ \"a = \" ++ show a ++ \"\\n\" ++ a" +main = putStrLn $ "a = " ++ show a ++ "\n" ++ a +``` + +``` {.haskell .code-term .numberLines} +-- (C) Copyright Collin Doering 2013 +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +-- File: Quine.hs +-- Author: Collin J. Doering +-- Date: Apr 14, 2013 + +import Data.List (intercalate) + +header = [ "-- (C) Copyright Collin Doering 2013" + , "-- " + , "-- This program is free software: you can redistribute it and/or modify" + , "-- it under the terms of the GNU General Public License as published by" + , "-- the Free Software Foundation, either version 3 of the License, or" + , "-- (at your option) any later version." + , "-- " + , "-- This program is distributed in the hope that it will be useful," + , "-- but WITHOUT ANY WARRANTY; without even the implied warranty of" + , "-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" + , "-- GNU General Public License for more details." + , "-- " + , "-- You should have received a copy of the GNU General Public License" + , "-- along with this program. If not, see ." + , "" + , "-- File: haskell-quine.hs" + , "-- Author: Collin J. Doering " + , "-- Date: Apr 14, 2013" + , "" + , "import Data.List (intercalate)"] + +dta = "main = putStrLn $ intercalate \"\\n\" header ++ \"\\n\\nheader = \" ++ \"[ \\\"\" ++ intercalate \"\\\"\\n , \\\"\" header ++ \"\\\"]\" ++ \"\\n\\ndta = \" ++ show dta ++ \"\\n\" ++ dta" +main = putStrLn $ intercalate "\n" header ++ "\n\nheader = " ++ "[ \"" ++ intercalate "\"\n , \"" header ++ "\"]" ++ "\n\ndta = " ++ show dta ++ "\n" ++ dta +``` diff --git a/drafts/simple-assembler.markdown b/drafts/simple-assembler.markdown new file mode 100644 index 0000000..7d591a2 --- /dev/null +++ b/drafts/simple-assembler.markdown @@ -0,0 +1,13 @@ +--- +title: Simple Assembler +author: Collin J. Doering +date: Feb 21, 2015 +description: Building a simple assembler for the Hack platform +tags: general, computers, programming, haskell, nand-to-tetris +--- + +TODO + + + +TODO