This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
number_of_atoms = 10e80 -- quantity | |
size_of_universe = 46e9 * 3.15569e7 -- light years to seconds | |
smallest_distance = 5.3910632e-44 -- seconds | |
speed_of_light = 299792458 | |
bits_in_universe = ( | |
{- x -} log(size_of_universe / smallest_distance) / log(2) | |
{- y -} + log(size_of_universe / smallest_distance) / log(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = 5 | |
b = 3 | |
c = a + b = 15 | |
a a a a a | |
b c c c c c | |
b c c c c c | |
b c c c c c | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
setInterval(function () { | |
var elements = document.querySelectorAll('.blink'); // I'm pulling every element from the DOM with class "blink" | |
for (var i = 0; i < elements.length; i += 1) { // iterate through all the elements | |
var element = elements[i]; | |
if (!element.style.visibility) { // if no visibility is set, it means it's displayed | |
element.style.visibility = 'hidden'; // so lets hide it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Arduino | |
1. $65.94 -- Buy Ardunio Yun -- http://www.amazon.com/Arduino-A000008-Y%C3%9AN/dp/B00F6YJK3S | |
2. $8.95 -- Buy LCD Shield -- http://www.amazon.com/ZITRADES-Keypad-Display-Arduino-Duemilanove/dp/B00BOMPW60 | |
3. $6.97 -- Buy Jumper Cables -- http://www.amazon.com/RioRand-Dupont-Male-Male-Female-Female-Female-Male/dp/B00J5NSOVA | |
3. Program ticker software | |
4. ??? | |
5. Profit! | |
Total $81.86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Explicitly stating the order of computation `a (b c)` makes this not compile | |
-- While, if we used a C style, order of computation would be explicit by default `a(b(c))` vs `a(b, c)` | |
example1 = a b c | |
where | |
a first second = first ++ second | |
b = "hey" | |
c = " world" | |
-- Explicitly stating `a (b c)` makes this compile | |
example2 = a b c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Dockerfile; | |
if (!req.body.modules.length) { | |
Dockerfile = multiline.stripIndent(function () { return undefined; /* | |
FROM haskell-online-ghc | |
ADD execute.sh . | |
*/ }); | |
} else { | |
Dockerfile = multiline.stripIndent(function () { return undefined; /* | |
FROM haskell-online-ghc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myFunction :: Record -> Record -> a | |
foobar = myFunction Record { meow = "face" } | |
Record { meow = "face" } | |
-- vs -- | |
myFunction :: (Record, Record) -> a | |
foobar = myFunction( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running sch2hdl... | |
Command Line: sch2hdl -batch C:/Users/Ryan/pong/sch2HdlBatchFile | |
Release 14.7 - sch2hdl P.20131013 (nt64) | |
Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved. | |
Started : "Synthesize - XST". | |
Running xst... | |
Command Line: xst -intstyle ise -ifn "C:/Users/Ryan/pong/pong_top.xst" -ofn "C:/Users/Ryan/pong/pong_top.syr" | |
Reading design: pong_top.prj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timescale 1ns / 1ps | |
module BinToDec( | |
input mclk, | |
input [7:0] sw, | |
output reg [3:0] an, | |
output reg [6:0] seg, | |
output reg [7:0] Led | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func apply<A, B> (data : A, fn : B) -> A { | |
return fn(data) // '(A) -> $T2' is not identical to 'B' | |
} | |
func apply<A, B : A -> A> (data : A, fn : B) -> A { // Expected '>' to complete generic parameter list | |
return fn(data) | |
} |