I hereby claim:
- I am travisby on github.
- I am travisby (https://keybase.io/travisby) on keybase.
- I have a public key whose fingerprint is CF83 0F41 2F3C FD90 7365 F15A 0EF3 6F58 BC1A 6525
To claim this, I am signing this object:
| .EQU @,$000 ;Initialize Program Counter | |
| .EQU KBDCTRL,$000 ;Keyboard Control Port | |
| .EQU KBDSTS,$000 ; Keyboard Status Port, same thing | |
| .EQU KBDATA,$001 ;Keyboard Data Port | |
| .EQU VDBUF,$101 ;Video Buffer's First Address (it's really the second, but it printed too close) | |
| .EQU VDCTRL,$316 ;Video Control Port | |
| .EQU VDDATA,$317 ;Video Data Port | |
| .EQU HEIGHT,14 ;The height of CUSP's Screen | |
| .EQU WIDTH,38 ;The Width of CUSP's Screen | |
| .EQU LEN,5 ;The length I wanted each line to be |
| """ | |
| Each new term in the Fibonacci sequence is generated by adding the previous two | |
| terms. By starting with 1 and 2, the first 10 terms will be: | |
| 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... | |
| By considering the terms in the Fibonacci sequence whose values do not | |
| exceed four million, find the sum of the even-valued term | |
| """ |
| travis@localhost ~/Documents/dev/school/language_study/chapter5 $ cat Prettify.hs | |
| data Doc = Empty | |
| | Char Char | |
| | Text String | |
| | Line | |
| | Concat Doc Doc | |
| | Union Doc Doc | |
| deriving (Show,Eq) | |
| empty :: Doc | |
| empty = Empty |
| Lola Price, 95, 41177 | |
| India Everett, 96, 31714 | |
| Dixie Morse, 95, 92854 | |
| Silas Stokes, 98, 45099 | |
| Roscoe Walls, 95, 16564 | |
| Sullivan Mason, 96, 89813 | |
| Hugo Fields, 95, 28145 | |
| Dashiell Taylor, 99, 39338 | |
| Otis Pineda, 99, 35551 | |
| Lionel Maxwell, 97, 51885 |
| // the first few dozen lines are more boilerplate that we will probably already have built-in with OCaml | |
| // In addition, the Token prototype is really a do-nothing. A real token prototype/datatype will be much, much cooler | |
| Object.prototype.keys = function () { | |
| var keys = []; | |
| for (var key in this) { | |
| keys.push(key); | |
| } |
| [~]$ pr -m -t test1.c test2.c | |
| int main() { int main() { | |
| int x; int x; | |
| if (x == 0) { switch (x) { | |
| // case 0: | |
| } else if (x == 1) { break; | |
| // case 1: | |
| } break; | |
| return 0; } | |
| } } |
I hereby claim:
To claim this, I am signing this object:
| module Main where | |
| import Data.Maybe | |
| import Data.List | |
| main = do | |
| content <- getContents | |
| let boxes = map (fromJust . strToBox) $ lines content | |
| putStr "Paper: " | |
| print . sum . map boxToPaper $ boxes | |
| putStr "Ribbon: " |
| module Main where | |
| import Data.Maybe | |
| import Data.List | |
| main = do | |
| content <- getContents | |
| -- get rid of \n | |
| let c = init content | |
| putStr "Single Santa traveled: " |
| module Main where | |
| import Data.Hash.MD5 | |
| main = do | |
| input <- getContents | |
| let key = init input | |
| let firstResult = head . filter (isAdventCoin key 5) $ [1..] | |
| putStr "00000...: " | |
| print firstResult |