Moving to the internal SB wiki.
This file contains hidden or 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
justin ~/Code/ruby_ukanren $ rake | |
Run options: --seed 3533 | |
# Running tests: | |
F...F......................... | |
Finished tests in 0.025549s, 1174.2143 tests/s, 1330.7762 assertions/s. | |
1) Failure: |
This file contains hidden or 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
{ | |
"auto_complete_commit_on_tab": true, | |
"color_scheme": "Packages/Color Scheme - Default/Pastels on Dark.tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 12.0, | |
"hot_exit": false, | |
"ignored_packages": | |
[ | |
"Vintage" |
This file contains hidden or 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
def test_stack_size(call_count = 0) | |
puts "Current call count: #{call_count}" | |
test_stack_size(call_count + 1) | |
end | |
RubyVM::InstructionSequence.compile_option = { | |
:tailcall_optimization => true, | |
:trace_instruction => false | |
} |
This file contains hidden or 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
class Person | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
def reverse_name | |
funreverse | |
end |
This file contains hidden or 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
-- Hope you have a functional 2014! | |
-- Author: Justin Leitgeb | |
-- Web: http://justinleitgeb.com | |
-- Twitter: @justinleitgeb | |
-- Consulting: http://stackbuilders.com | |
-- Try Elm: http://elm-lang.org | |
render time = |
This file contains hidden or 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
to star | |
repeat 5 [ fd 100 rt 144 ] | |
end | |
clearscreen | |
star | |
to square :length | |
repeat 4 [ fd :length rt 90 ] | |
end | |
clearscreen |
This file contains hidden or 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
λ: import qualified Data.Map as M | |
λ: :t M.keys Metadata.Prelude.interfaces | |
M.keys Metadata.Prelude.interfaces :: [String] | |
λ: M.keys Metadata.Prelude.interfaces | |
["Automaton","Basics","Bitwise","Char","Color","Date","Dict","Either","Http","JavaScript","Json","Keyboard","List","Maybe","Mouse","Prelude","Random","Regex","Set","Signal","String","Text","Time","Touch","Transform2D","WebSocket","Window","Graphics.Collage","Graphics.Element","Graphics.Input","JavaScript.Experimental"] | |
λ: M.member "Graphics.Element" Metadata.Prelude.interfaces | |
False | |
λ: M.member "Graphics.Element" $ M.fromList $ M.toList Metadata.Prelude.interfaces | |
True |
This file contains hidden or 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
Main | |
Main.$gameHeightgameWidth | |
_Tuple2 | |
number | |
number | |
Main.$halfHeighthalfWidth | |
_Tuple2 | |
number | |
number | |
Main.Ball |
This file contains hidden or 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
import Test.HUnit | |
import Control.Applicative | |
data Piece = Cross | Circle deriving (Show, Eq) | |
isWon :: [Maybe Piece] -> Bool | |
isWon [] = False | |
isWon (x:xs) | |
| x == Nothing = False | |
| null xs = True |