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
private auto typeDispatch(T, Cs...)(T value, Cs callbacks) { | |
/*static*/ foreach(i, C; Cs) { | |
if((cast(ParameterTypeTuple!C[0]) value) !is null) { | |
return callbacks[i](cast(ParameterTypeTuple!C[0]) value); | |
} | |
} | |
throw new SemanticError("Can't compile that!"); | |
} | |
// ... |
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
fun name (n, v) = n; | |
fun vals (n, v) = v; | |
fun get([], a) = 0 | |
| get((b, v) :: tail, a) = if a = b then v else get(tail, a); | |
fun ig(a, S, C) = | |
(* TODO :( *) | |
C(S, name 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
module apriori; | |
import std.stdio; | |
import std.string; | |
import std.conv; | |
bool contains(A, E)(A array, E element) { | |
foreach(E e; array) { | |
if(e == element) return 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
#include <signal.h> | |
#include <errno.h> | |
#include <pthread.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
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
#!/bin/bash | |
raw=`cat /sys/bus/iio/devices/iio:device0/in_temp0_raw` | |
offset=`cat /sys/bus/iio/devices/iio:device0/in_temp0_offset` | |
scale=`cat /sys/bus/iio/devices/iio:device0/in_temp0_scale` | |
c_temp=`echo "scale=1;(($raw + $offset) * $scale) / 1000" | bc` | |
f_temp=`echo "scale=1;(($c_temp * 9) / 5) + 32" | bc` | |
echo | |
echo "Zynq Temp: $c_temp C / $f_temp F" |
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
# Contributor: Vlad Kolotvin <[email protected]> | |
# Maintainer: Stefan Husmann <[email protected]> | |
pkgname=emscripten-git | |
pkgver=11558 | |
pkgrel=1 | |
pkgdesc="LLVM-to-JavaScript compiler" | |
arch=('i686' 'x86_64') | |
url="http://emscripten.org" | |
license=('custom') |
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
(ns component.core | |
(:require [com.stuartsierra.component :as component])) | |
(defrecord AppConfig [file path] | |
component/Lifecycle | |
(start [this] | |
(println "Starting AppConfig!") | |
this) |
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 graham; | |
import std.algorithm; | |
import std.array; | |
import std.math; | |
import std.conv; | |
struct Point { | |
double x; | |
double 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
|------------+-------+--------+--------| | |
| samogłoska | F1 | F2 | F3 | | |
|------------+-------+--------+--------| | |
| a | 713.4 | 1202.3 | 2570.9 | | |
| | 623.5 | 1141.7 | 2423.0 | | |
| | 622.7 | 1175.4 | 2652.8 | | |
|------------+-------+--------+--------| | |
| e | 559.0 | 1665.1 | 2449.1 | | |
| | 546.8 | 1727.7 | 2521.8 | | |
| | 543.4 | 1737.3 | 2410.7 | |
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
;; Code: | |
'(letrec ((even? (lambda (x) (if (= 0 x) 't (odd? (- x 1))))) | |
(odd? (lambda (x) (if (= 0 x) 'n (even? (- x 1)))))) | |
(even? 7)) | |
;; Compiled code: | |
'(let ((__evenQUEST '()) (__oddQUEST '())) | |
(do (set! | |
__evenQUEST | |
(lambda (__x __cont1) |