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
| enum FingerTree<A> { Empty | |
| , Single(A) | |
| , Deep (Digit<A>, @FingerTree<Node<A>>, Digit<A>) | |
| } | |
| enum Node<A> { Node2(A,A), Node3(A,A,A) } | |
| enum Digit<A> { One(A) | |
| , Two(A,A) | |
| , Three(A,A,A) | |
| , Four(A,A,A,A) |
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
| echo2_helper(socket,stat) = | |
| begin | |
| println(stat) | |
| show(socket) | |
| c = accept(socket) | |
| println(c) | |
| line = read_line(c) | |
| println(line) | |
| while line != "0\n" | |
| write(c,line) |
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
| struct Level1<A> { | |
| data : @mut [@A * 5] | |
| , mut current : int | |
| } | |
| struct Level2<A> { | |
| data : @mut [@Level1<A> * 32] | |
| , mut current : int | |
| } |
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
| make[1]: Entering directory `/home/leah/code/servo/build/src/pixman' | |
| make all-recursive | |
| make[2]: Entering directory `/home/leah/code/servo/build/src/pixman' | |
| Making all in pixman | |
| make[3]: Entering directory `/home/leah/code/servo/build/src/pixman/pixman' | |
| make[3]: Nothing to be done for `all'. | |
| make[3]: Leaving directory `/home/leah/code/servo/build/src/pixman/pixman' | |
| Making all in demos | |
| make[3]: Entering directory `/home/leah/code/servo/build/src/pixman/demos' | |
| make[3]: Nothing to be done for `all'. |
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
| configure: looking for configure programs | |
| configure: found cmp | |
| configure: found mkdir | |
| configure: found printf | |
| configure: found cut | |
| configure: found grep | |
| configure: found xargs | |
| configure: found cp | |
| configure: found find | |
| configure: found uname |
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
| module Foo | |
| export @timeof, @bench, BinaryTree, Node, Leaf, insert | |
| macro timeof(expr) | |
| quote | |
| t1 = time() | |
| value = $(expr) | |
| t2 = time() | |
| t2-t1 |
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
| #Pkg.add for JSON | |
| #Pkg.clone for Vega.jl, JSTypes | |
| xs = open("xs.txt","r") | |
| ys = open("ys.txt","r") | |
| xarr = readdlm(xs) | |
| yarr = readdlm(ys) | |
| x2 = Float64[x for x in xarr] | |
| y2 = Float64[y for y in yarr] |
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
| module Test | |
| export TwoVals, addtwovals | |
| type TwoVals | |
| val1 | |
| val2 | |
| end | |
| function addtwovals(v::TwoVals) | |
| v.val1 + v.val2 |
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 Mouse | |
| # Separating main and squares was key to making lift work | |
| # I don't know how to convert Signal (Int,Int) to Signal (Float,Float) | |
| # so I separated x and y into different arguments | |
| main = lift2 squares (toFloat <~ Mouse.x) | |
| (toFloat <~ Mouse.y) | |
| squares : Float -> Float -> Element | |
| squares x y = |
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 Math.Vector3 (..) | |
| import Math.Matrix4 (..) | |
| import Graphics.WebGL (..) | |
| import Mouse | |
| -- Create a cube in which each vertex has a position and color | |
| type Vertex = { color:Vec3, position:Vec3 } |
OlderNewer