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
cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS:BOOL=ON -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 -DCMAKE_INSTALL_PREFIX:PATH=/usr ../llvm |
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
type count int32 | |
type incrementable interface { | |
Inc() | |
} | |
type countable interface { | |
incrementable | |
Dec() |
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
consumeRPN [] st = last st | |
consumeRPN (x:xs) st | |
| x == "+" = consumeRPN xs (ll ++ [l1 + l2]) | |
| x == "-" = consumeRPN xs (ll ++ [l1 - l2]) | |
| x == "*" = consumeRPN xs (ll ++ [l1 * l2]) | |
| x == "/" = consumeRPN xs (ll ++ [l1 / l2]) | |
| otherwise = consumeRPN xs (st ++ [read x]) | |
where | |
l2 = last st | |
l1 = last $ init st |
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 Main | |
total | |
minusS : (n : Nat) -> (m : Nat) -> LTE m n -> Nat | |
minusS n m x = n - m | |
total | |
decNat : Nat -> Nat | |
decNat k with (isLTE 1 k) | |
decNat k | (Yes prf) = minusS k 1 prf |
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
ch := make(chan interface{}) | |
msg := "foo" | |
go func() { | |
x := <- ch | |
if _, ok := x.(string); ok { | |
jlib.JPrint("%s", x.(string)) | |
} | |
close(ch) | |
}() |
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
#include <cstdlib> | |
#include <vector> | |
#include <climits> | |
#include <algorithm> | |
#include <iostream> | |
class Computer; | |
class Link { | |
public: |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
class Vertex { | |
public: | |
// Vertex id in vertexes. | |
int id; | |
// Index of vertex begin edge (first). | |
int idx; |
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
-1.585 * | |
( | |
if (((1.262 * a + 1.262 * b) + -0.000) > 0) | |
then ((1.262 * a + 1.262 * b) + -0.000) | |
else 0 | |
) | |
+ | |
1.303 * |
OlderNewer